Skip to content

Conversation

JakubValtar
Copy link
Collaborator

This PR removes the scan ID. We rely on caches to ensure that common subplans are executed only once.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Jul 23, 2025
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.30%. Comparing base (f284700) to head (4c3b2c7).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #23697   +/-   ##
=======================================
  Coverage   81.29%   81.30%           
=======================================
  Files        1643     1643           
  Lines      223133   223143   +10     
  Branches     2837     2837           
=======================================
+ Hits       181407   181435   +28     
+ Misses      41027    41010   -17     
+ Partials      699      698    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nameexhaustion
Copy link
Collaborator

Could we add an assertion / panic if the ID already exists in the map?

@JakubValtar
Copy link
Collaborator Author

Do you mean to compensate for #23674?

I will add that until it's fixed, even though I would prefer not to do that (it's adding code that compensates for impl details of UniqueId and it's generally hard to find code that depends on impl details).

@JakubValtar
Copy link
Collaborator Author

JakubValtar commented Jul 23, 2025

Actually I don't think I should add that check, it would be quite involved. The scan would probably get inserted first, so I would also have to check for collisions on cache and partitioned sink insertion.

I am working on a fix for the unsoundness, so it should be resolved soon.

Is that acceptable?

@nameexhaustion
Copy link
Collaborator

It shouldn't be involved - before cache_nodes.insert(), do assert!(!cache_nodes.contains_key(&id)). That should work, assuming we don't expect duplicate IDs?

@JakubValtar
Copy link
Collaborator Author

I added the checks for duplicate ids.

@ritchie46 ritchie46 merged commit 07f7e86 into pola-rs:main Jul 23, 2025
23 checks passed
@JakubValtar JakubValtar deleted the scan-id branch July 23, 2025 15:45
Washiil pushed a commit to Washiil/polars that referenced this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants