-
Notifications
You must be signed in to change notification settings - Fork 166
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
Add option to control whether day/week/month/quarter from extract
is 0- or 1-indexed
#477
Comments
@rok do you have any thoughts about this? |
I suppose this is down to API design. Do we want to:
|
I think option 1 or 2 is preferable to option 3. @westonpace do you agree? I don't have any strong opinion about whether option 1 or 2 is best. Option 1 seems a bit cleaner to me. Option 2 blows up into a lot of new extract components and creates uncertainty about which ones we actually need/want: |
I assumed 3. is preferred, but if that's not the case I'd prefer 1 and can make a PR. There are two more candidates for such a change: |
I don't think this affects |
It's not about indexing indeed :D, but we could collapse three extract functions if we added parameters. |
For indexing let's make it an option (not an argument). Let's defer calendar type for a future PR since it's backwards incompatible. I think I'd want to see at least one non-arrow engine and how they chose to implement the feature first. |
BREAKING CHANGE: This adds an option to control indexing of components as discussed in #477. --------- Co-authored-by: Ian Cook <[email protected]>
Closed by #479 |
This discussion in the DuckDB repo suggests that we should consider adding an option to the Substrait
extract
datetime function to allow Substrait producers to specify whether they expect returned day/week/month/quarter integer values to be 0- or 1-indexed.The text was updated successfully, but these errors were encountered: