Skip to content

Conversation

orlp
Copy link
Member

@orlp orlp commented Sep 26, 2025

This allows Polars to parse compact ISO 8601 datetime strings which lack any separators such as 20190418T224555.555123Z which are commonly found in logfiles/filenames.

I also drastically reduced the number of patterns by using chrono's %.f instead of repeating the pattern for %.3f, %.6f, etc.

@MarcoGorelli

@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 Sep 26, 2025
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.83%. Comparing base (59f1ee9) to head (3916fd3).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24629   +/-   ##
=======================================
  Coverage   81.83%   81.83%           
=======================================
  Files        1689     1688    -1     
  Lines      230063   229981   -82     
  Branches     2974     2974           
=======================================
- Hits       188262   188198   -64     
+ Misses      41048    41030   -18     
  Partials      753      753           

☔ 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.

@ritchie46 ritchie46 force-pushed the main branch 3 times, most recently from ddf5907 to d0914d4 Compare September 27, 2025 11:06
@MarcoGorelli
Copy link
Collaborator

MarcoGorelli commented Sep 27, 2025

This allows Polars to parse compact ISO 8601 datetime strings which lack any separators

nice!

I also drastically reduced the number of patterns by using chrono's %.f

🤔 I recalled there being some issue with this due to the length of the string non being inferrable from the format, but perhaps that's not an issue anymore, or it doesn't affect the path where the format is auto-inferred by Polars anyway, as it looks like it doesn't go to

pub(super) fn fmt_len(fmt: &[u8]) -> Option<u16> {

at all in this case anyway

Should be fine then!

@Julian-J-S
Copy link
Contributor

I also drastically reduced the number of patterns by using chrono's %.f instead of repeating the pattern for %.3f, %.6f, etc.

Very vaguely remember that the fixed size versions had performance improvements and some other benefits I don't quite remember. But could be solved by now 🤓

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 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