-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Implement Spark functions hour, minute, second #19512
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
Conversation
| )]), | ||
| TypeSignature::Exact(vec![DataType::Timestamp( | ||
| arrow::datatypes::TimeUnit::Microsecond, | ||
| Some(Arc::from("")), |
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 not sure about the empty timezone here
|
|
||
| /// Creates a signature for datetime extraction functions that accept timestamp types. | ||
| fn extract_signature() -> Signature { | ||
| Signature::one_of( |
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.
Can use this signature:
Signature::coercible(vec![Coercion::new_exact(TypeSignatureClass::Timestamp)], Volatility::Immutable)Accepts any timestamp type with any timezone (or no timezone)
|
Took the liberty of fixing CI & merging up from main to get this good to merge |
|
Thanks @andygrove |
Which issue does this PR close?
Rationale for this change
Add new functions: hour, minute, and second.
What changes are included in this PR?
Are these changes tested?
Yes, tests added as part of this PR.
Are there any user-facing changes?
No, these are new functions.