-
Notifications
You must be signed in to change notification settings - Fork 191
feat!: remove deprecated time, timestamp and timestamp_tz types #994
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
Open
nielspardon
wants to merge
3
commits into
substrait-io:main
Choose a base branch
from
nielspardon:par-rm-depr-datetime
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,16 @@ | ||
| ### SUBSTRAIT_SCALAR_TEST: v1.0 | ||
| ### SUBSTRAIT_INCLUDE: '/extensions/functions_datetime.yaml' | ||
|
|
||
| # timestamps: examples using the timestamp types | ||
| add('2016-12-31T13:30:15'::ts, 'P5D'::iday) = '2017-01-05T13:30:15'::ts | ||
| add('2016-12-01T13:30:15'::ts, 'P5Y'::iyear) = '2021-12-01T13:30:15'::ts | ||
| add('2016-12-01T13:30:15'::ts, 'PT5H'::iday) = '2016-12-01T18:30:15'::ts | ||
| # timestamps: examples using the precision_timestamp types | ||
| add('2016-12-31T13:30:15'::pts<6>, 'P5D'::iday<6>) = '2017-01-05T13:30:15'::pts<6> | ||
| add('2016-12-01T13:30:15'::pts<6>, 'P5Y'::iyear) = '2021-12-01T13:30:15'::pts<6> | ||
| add('2016-12-01T13:30:15'::pts<6>, 'PT5H'::iday<6>) = '2016-12-01T18:30:15'::pts<6> | ||
|
|
||
| # date_to_timestamp: examples using the date types and resulting in a timestamp | ||
| add('2020-12-31'::date, 'P5D'::iday) = '2021-01-05T00:00:00'::ts | ||
| add('2020-12-31'::date, 'P5D'::iday<6>) = '2021-01-05T00:00:00'::pts<6> | ||
| add('2020-12-31'::date, 'P5Y'::iyear) = '2025-12-31'::date | ||
| add('2020-12-31'::date, 'P5M'::iyear) = '2021-05-31'::date | ||
|
|
||
| # null_input: examples with null args or return | ||
| add(null::date?, 'P5D'::iday) = null::ts? | ||
| add(null::date?, 'P5D'::iday<6>) = null::pts?<6> | ||
| add(null::date?, 'P5Y'::iyear) = null::date? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,31 @@ | ||
| ### SUBSTRAIT_SCALAR_TEST: v1.0 | ||
| ### SUBSTRAIT_INCLUDE: '/extensions/functions_datetime.yaml' | ||
|
|
||
| # timestamps: examples using the timestamp and timestamptz types | ||
| extract(YEAR::enum, '2016-12-31T13:30:15'::ts) = 2016::i64 | ||
| extract(ISO_YEAR::enum, '2016-01-01T13:30:15'::ts) = 2015::i64 | ||
| extract(QUARTER::enum, '2016-12-31T13:30:15'::ts) = 4::i64 | ||
| extract(MONTH::enum, '2016-12-31T13:30:15'::ts) = 12::i64 | ||
| extract(ISO_WEEK::enum, '2016-12-31T13:30:15'::ts) = 52::i64 | ||
| extract(DAY::enum, '2016-12-31T13:30:15'::ts) = 31::i64 | ||
| extract(SUNDAY_DAY_OF_WEEK::enum, '2016-12-25T13:30:15'::ts) = 7::i64 | ||
| extract(MONDAY_DAY_OF_WEEK::enum, '2016-12-25T13:30:15'::ts) = 0::i64 | ||
| extract(DAY_OF_YEAR::enum, '2016-12-25T13:30:15'::ts) = 360::i64 | ||
| extract(HOUR::enum, '2016-12-31T13:30:15'::ts) = 13::i64 | ||
| extract(MINUTE::enum, '2016-12-31T13:30:15'::ts) = 30::i64 | ||
| extract(SECOND::enum, '2016-12-31T13:30:15'::ts) = 15::i64 | ||
| extract(MILLISECOND::enum, '2016-12-31T13:30:15'::ts) = 15000::i64 | ||
| extract(MICROSECOND::enum, '2016-12-31T13:30:15.220000'::ts) = 15220000::i64 | ||
| extract(UNIX_TIME::enum, '2016-12-31T13:30:15'::ts) = 1483191015::i64 | ||
| # timestamps: examples using the precision_timestamp and precision_timestamp_tz types | ||
| extract(YEAR::enum, '2016-12-31T13:30:15'::pts<6>) = 2016::i64 | ||
| extract(ISO_YEAR::enum, '2016-01-01T13:30:15'::pts<6>) = 2015::i64 | ||
| extract(QUARTER::enum, '2016-12-31T13:30:15'::pts<6>) = 4::i64 | ||
| extract(MONTH::enum, '2016-12-31T13:30:15'::pts<6>) = 12::i64 | ||
| extract(ISO_WEEK::enum, '2016-12-31T13:30:15'::pts<6>) = 52::i64 | ||
| extract(DAY::enum, '2016-12-31T13:30:15'::pts<6>) = 31::i64 | ||
| extract(SUNDAY_DAY_OF_WEEK::enum, '2016-12-25T13:30:15'::pts<6>) = 7::i64 | ||
| extract(MONDAY_DAY_OF_WEEK::enum, '2016-12-25T13:30:15'::pts<6>) = 0::i64 | ||
| extract(DAY_OF_YEAR::enum, '2016-12-25T13:30:15'::pts<6>) = 360::i64 | ||
| extract(HOUR::enum, '2016-12-31T13:30:15'::pts<6>) = 13::i64 | ||
| extract(MINUTE::enum, '2016-12-31T13:30:15'::pts<6>) = 30::i64 | ||
| extract(SECOND::enum, '2016-12-31T13:30:15'::pts<6>) = 15::i64 | ||
| extract(MILLISECOND::enum, '2016-12-31T13:30:15'::pts<6>) = 15000::i64 | ||
| extract(MICROSECOND::enum, '2016-12-31T13:30:15.220000'::pts<6>) = 15220000::i64 | ||
| extract(UNIX_TIME::enum, '2016-12-31T13:30:15'::pts<6>) = 1483191015::i64 | ||
|
|
||
| # date: examples using the date type | ||
| extract(YEAR::enum, '2020-12-31'::date) = 2020::i64 | ||
| extract(MONTH::enum, '2020-12-31'::date) = 12::i64 | ||
| extract(DAY::enum, '2020-12-31'::date) = 31::i64 | ||
|
|
||
| # time: examples using the time type | ||
| extract(HOUR::enum, '01:02:03'::time) = 1::i64 | ||
| extract(MINUTE::enum, '01:02:03'::time) = 2::i64 | ||
| extract(SECOND::enum, '01:02:03'::time) = 3::i64 | ||
| extract(MILLISECOND::enum, '01:02:03.155'::time) = 3155::i64 | ||
| extract(MICROSECOND::enum, '01:02:03.45'::time) = 3450000::i64 | ||
| # time: examples using the precision_time type | ||
| extract(HOUR::enum, '01:02:03'::pt<6>) = 1::i64 | ||
| extract(MINUTE::enum, '01:02:03'::pt<6>) = 2::i64 | ||
| extract(SECOND::enum, '01:02:03'::pt<6>) = 3::i64 | ||
| extract(MILLISECOND::enum, '01:02:03.155'::pt<6>) = 3155::i64 | ||
| extract(MICROSECOND::enum, '01:02:03.45'::pt<6>) = 3450000::i64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this one go up so much?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been asking Claude for an explanation and it gave a very detailed one:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... if that is the case, what do you think about only deleting the old impls in this PR, and we can add new ones if we need in a subsequent one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only adding new impls when there would be no equivalent impls after removing the old ones. This PR retain parity in terms of functionality with before the change aka if there was an impl with time, timestamp, timestamp_tz before and there wouldn't be one after removing all impls using those then I'm adding the equivalent precision impl. If we do these in separate PRs then we risk having a Substrait release that has less functionality than before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea what's going on here. The explanation that Claude Code gave does not match the current code on
main. Currently,num_function_overloadsis essentially the total number ofimplsacross all extension YAMLs. I rebased this PR branch on latest main and nownum_function_overloadsdecreases now from533to498which sounds more reasonable than the previous8,466.