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

feat: Support date/datetime for hive parts #17256

Merged
merged 12 commits into from
Jun 28, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Jun 28, 2024

We now re-use the same functions as the CSV reader for type inference and parsing on hive parts

lf = pl.scan_parquet(
    "hive_dates/date1=2024-01-01/date2=2023-01-01%2000%3A00%3A00.000000/00000000.parquet",
    hive_partitioning=True,
)

print(lf.collect())

# shape: (1, 3)
# ┌────────────┬─────────────────────┬─────┐
# │ date1      ┆ date2               ┆ x   │
# │ ---        ┆ ---                 ┆ --- │
# │ date       ┆ datetime[μs]        ┆ i32 │
# ╞════════════╪═════════════════════╪═════╡
# │ 2024-01-01 ┆ 2023-01-01 00:00:00 ┆ 1   │
# └────────────┴─────────────────────┴─────┘

Closes #12894

@github-actions github-actions bot added the internal An internal refactor or improvement label Jun 28, 2024
@nameexhaustion nameexhaustion changed the title test hive dates feat: Support date/datetime for hive parts Jun 28, 2024
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Jun 28, 2024
Copy link

codecov bot commented Jun 28, 2024

Codecov Report

Attention: Patch coverage is 90.54054% with 7 lines in your changes missing coverage. Please review.

Project coverage is 80.84%. Comparing base (01a65f0) to head (1e33bff).
Report is 2 commits behind head on main.

Files Patch % Lines
crates/polars-plan/src/plans/hive.rs 89.39% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17256      +/-   ##
==========================================
+ Coverage   80.82%   80.84%   +0.02%     
==========================================
  Files        1466     1466              
  Lines      192324   192345      +21     
  Branches     2745     2745              
==========================================
+ Hits       155437   155509      +72     
+ Misses      36384    36333      -51     
  Partials      503      503              

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

@ritchie46 ritchie46 merged commit af75a1d into pola-rs:main Jun 28, 2024
27 checks passed
@nameexhaustion nameexhaustion deleted the hive-date branch July 8, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature 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.

Support Date type hive partition columns in polars.scan_parquet method
2 participants