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

Use resolution-dependent default units for lazy time encoding #10017

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

spencerkclark
Copy link
Member

@spencerkclark spencerkclark commented Feb 1, 2025

When lazily encoding non-nanosecond times, the appropriate optimal integer encoding units are resolution-dependent. This PR updates our encoding pipeline accordingly.

Note that due to our internal reliance on pandas for date string parsing, we are still not able to round trip times outside the range -9999-01-01 to 9999-12-31 with pandas / NumPy, but this at least should pick more natural default units than nanoseconds for chunked arrays of non-nanosecond precision times. This gives users another way of addressing #9154 (i.e. use non-nanosecond time arrays).

  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

@spencerkclark spencerkclark force-pushed the better-non-nanosecond-encoding branch from d4ad1e9 to 0216112 Compare February 1, 2025 15:27
Copy link
Contributor

@kmuehlbauer kmuehlbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @spencerkclark! Looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants