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: introduce date type #46

Merged
merged 7 commits into from
Jan 21, 2025

Conversation

dshaaban01
Copy link
Contributor

@dshaaban01 dshaaban01 commented Jan 1, 2025

This PR introduces the date atomic type and its associated attribute types. The date type represents a calendar date within the range [1000-01-01..9999-12-31]. Internally, it is stored as an int32 value representing the number of days since the epoch date (1970-01-01).

@dshaaban01 dshaaban01 force-pushed the dalia/types/date branch 2 times, most recently from 86688a3 to 4f24fa3 Compare January 1, 2025 15:25
Copy link
Collaborator

@ingomueller-net ingomueller-net left a comment

Choose a reason for hiding this comment

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

LGTM modulo minor nit.

%0 = named_table @t1 as ["a"] : tuple<!substrait.date>
yield %0 : tuple<!substrait.date>
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: final line break.

Consider configuring VS Code to add those line breaks automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha thank you! This indeed is the smarter approach.

@dshaaban01 dshaaban01 force-pushed the dalia/types/date branch 2 times, most recently from 6cca2f1 to 122a2be Compare January 16, 2025 14:17
@ingomueller-net ingomueller-net merged commit b0e640e into substrait-io:main Jan 21, 2025
7 checks passed
}
}

// -----
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ingomueller-net I think that I accidentally duplicated the test for timestamp, timestamp_tz and that it snuck in here during the rebase :((

In the time PR, I basically delete the duplicated timestamp test. So thats why it looks like I'm replacing tests - it's because I deleted one. I didn't realize that it had snuck into this PR, I'm so sorry!

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.

2 participants