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

Support Date - Date (#4383) #4504

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #4383

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jul 10, 2023
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

👨‍🍳 👌

Very nice -- thank you @tustvold

l_s,
r,
r_s,
((l as i64) - (r as i64)) * 86400
Copy link
Contributor

Choose a reason for hiding this comment

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

The units of Date32 are "seconds" so I understand why to multiply by 86400

For clarity I suggest: naming 86400 something like "SECONDS_IN_A_YEAR" via a const

And is the reason to cast to i64 because that is the native type of DurationSecondType?

@tustvold tustvold merged commit 8bcb3fc into apache:master Jul 12, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Date - Date kernel
2 participants