Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Move hive partitioning/multi-file handling outside of readers #20203

Merged
merged 15 commits into from
Dec 20, 2024

Conversation

coastalwhite
Copy link
Collaborator

@coastalwhite coastalwhite commented Dec 6, 2024

This is a very early stage PR exploring whether it is possible to take the multi-file handling and hive partitioning out of the readers. This will also make the multi-file and hive partitioning completely file type agnostic.

Currently, this PR does not do anything unless POLARS_NEW_MULTIFILE is set to 1.

Here is a rough todo list.

  • Row Indexes
  • Include File Paths
  • Projection Pushdown
  • Slicing
    • Positive
    • Negative
  • Hive Predicates
  • Non hive predicates
  • Lazy Loading of Non-Hive data
  • Allow Missing Columns
  • All file types
    • Parquet
    • CSV
    • IPC
    • NDJson
  • New streaming engine sink

ping @ritchie46, @nameexhaustion

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Dec 6, 2024
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 9.71660% with 669 lines in your changes missing coverage. Please review.

Project coverage is 78.91%. Comparing base (6e4d717) to head (e01c9d2).
Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
...rates/polars-mem-engine/src/executors/hive_scan.rs 0.00% 370 Missing ⚠️
...es/polars-mem-engine/src/executors/scan/parquet.rs 13.25% 72 Missing ⚠️
crates/polars-mem-engine/src/executors/scan/csv.rs 3.44% 56 Missing ⚠️
crates/polars-expr/src/expressions/apply.rs 13.88% 31 Missing ⚠️
crates/polars-expr/src/expressions/binary.rs 16.66% 20 Missing ⚠️
crates/polars-schema/src/schema.rs 0.00% 18 Missing ⚠️
crates/polars-mem-engine/src/planner/lp.rs 60.00% 16 Missing ⚠️
crates/polars-expr/src/expressions/column.rs 20.00% 12 Missing ⚠️
crates/polars-expr/src/expressions/window.rs 0.00% 9 Missing ⚠️
...polars-stream/src/nodes/io_sources/parquet/init.rs 0.00% 8 Missing ⚠️
... and 14 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20203      +/-   ##
==========================================
- Coverage   79.13%   78.91%   -0.23%     
==========================================
  Files        1572     1567       -5     
  Lines      219839   219920      +81     
  Branches     2462     2465       +3     
==========================================
- Hits       173970   173546     -424     
- Misses      45301    45806     +505     
  Partials      568      568              

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

@coastalwhite coastalwhite changed the title refactor: Move hive partitioning outside of readers refactor: Move hive partitioning/multi-file handling outside of readers Dec 18, 2024
This is a very early stage PR exploring whether it is possible to take the hive
partitioning out of the readers. This will also make the Hive partitioning
complete file type agnostic.

Currently, this PR does not do anything unless `POLARS_NEW_HIVE` is set to `1`.

Here is a rough todo list.

- [x] Row Indexes
- [x] Include File Paths
- [x] Projection Pushdown
- [ ] Slicing
- [ ] Hive Predicates
- [ ] Lazy Loading of Non-Hive data
- [ ] Allow Missing Columns
- [ ] Other file types besides Parquet
- [ ] New streaming engine sink
@coastalwhite coastalwhite marked this pull request as ready for review December 20, 2024 12:03
@ritchie46 ritchie46 merged commit b862887 into pola-rs:main Dec 20, 2024
20 checks passed
@c-peters c-peters added the accepted Ready for implementation label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants