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: compare timestamp partition values as timestamps instead of strings #1895

Merged
merged 7 commits into from
Nov 30, 2023

Conversation

sigorbor
Copy link
Contributor

Description

Delta protocol specifies 2 possible formats for timestamp partitions: {year}-{month}-{day} {hour}:{minute}:{second} or {year}-{month}-{day} {hour}:{minute}:{second}.{microsecond}

However, string comparison of partition filter value and partition values was performed, which rendered timestamps like 2020-12-31 23:59:59.000000 and 2020-12-31 23:59:59 as different.

This change uses timestamp comparison instead of string comparison.

Documentation

https://github.com/delta-io/delta/blob/master/PROTOCOL.md#partition-value-serialization

# Description

Delta protocol specifies 2 possible formats for timestamp partitions (https://github.com/delta-io/delta/blob/master/PROTOCOL.md#partition-value-serialization) : {year}-{month}-{day} {hour}:{minute}:{second} or {year}-{month}-{day} {hour}:{minute}:{second}.{microsecond}

However, string comparison of partition filter value and partition values was performed, which rendered
timestamps like 2020-12-31 23:59:59.000000 and 2020-12-31 23:59:59 as different.

This change uses timestamp comparison instead of string comparison.
@github-actions github-actions bot added binding/rust Issues for the Rust crate crate/core labels Nov 21, 2023
Copy link

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@sigorbor sigorbor changed the title Compare timestamp partition values as timestamps instead of strings feat: compare timestamp partition values as timestamps instead of strings Nov 21, 2023
@sigorbor
Copy link
Contributor Author

@rtyler, @roeap, @wjones127 - guys, could you please review?

@rtyler rtyler enabled auto-merge (rebase) November 30, 2023 05:54
@rtyler rtyler disabled auto-merge November 30, 2023 05:54
@rtyler rtyler enabled auto-merge (squash) November 30, 2023 05:55
@rtyler rtyler merged commit b601f9a into delta-io:main Nov 30, 2023
21 checks passed
ion-elgreco pushed a commit to ion-elgreco/delta-rs that referenced this pull request Dec 1, 2023
…ings (delta-io#1895)

Delta protocol specifies 2 possible formats for timestamp partitions:
{year}-{month}-{day} {hour}:{minute}:{second} or {year}-{month}-{day}
{hour}:{minute}:{second}.{microsecond}

However, string comparison of partition filter value and partition
values was performed, which rendered timestamps like 2020-12-31
23:59:59.000000 and 2020-12-31 23:59:59 as different.

This change uses timestamp comparison instead of string comparison.

Co-authored-by: Igor Borodin <[email protected]>
natinimni added a commit to natinimni/delta-rs that referenced this pull request Jan 31, 2024
…ings (delta-io#1895)

    Delta protocol specifies 2 possible formats for timestamp partitions:
    {year}-{month}-{day} {hour}:{minute}:{second} or {year}-{month}-{day}
    {hour}:{minute}:{second}.{microsecond}

    However, string comparison of partition filter value and partition
    values was performed, which rendered timestamps like 2020-12-31
    23:59:59.000000 and 2020-12-31 23:59:59 as different.

    This change uses timestamp comparison instead of string comparison.

    Co-authored-by: Igor Borodin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/rust Issues for the Rust crate crate/core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants