Skip to content

Conversation

@andygrove
Copy link
Member

@andygrove andygrove commented Dec 27, 2025

Which issue does this PR close?

  • N/A

Rationale for this change

Add new functions: hour, minute, and second.

What changes are included in this PR?

  • Implementation
  • Unit Tests
  • slt tests

Are these changes tested?

Yes, tests added as part of this PR.

Are there any user-facing changes?

No, these are new functions.

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) spark labels Dec 27, 2025
)]),
TypeSignature::Exact(vec![DataType::Timestamp(
arrow::datatypes::TimeUnit::Microsecond,
Some(Arc::from("")),
Copy link
Member Author

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(
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spark sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants