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

[SPARK-51442][SQL] Add time formatters #50190

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Mar 6, 2025

What changes were proposed in this pull request?

In the PR, I propose two new formatters: Iso8601TimeFormatter and FractionTimeFormatter similar to the date or timestamp formatters:

  • The ISO 8601 formatter is capable of formatting and parsing the ISO-8601 extended time format,
  • The fraction formatter is similar to the previous one but does not output trailing zeros in the fraction.

Why are the changes needed?

The datetime formatters are used in CAST and other parsing/formatting expressions.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

By running new test suite:

$ build/sbt "test:testOnly *TimeFormatterSuite"
$ build/sbt "test:testOnly *TimestampFormatterSuite"

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Mar 6, 2025
@MaxGekk MaxGekk changed the title [WIP][SQL] Add TimeFormatter [WIP][SPARK-51442][SQL] Add time formatters Mar 8, 2025
@MaxGekk MaxGekk changed the title [WIP][SPARK-51442][SQL] Add time formatters [SPARK-51442][SQL] Add time formatters Mar 8, 2025
@MaxGekk MaxGekk marked this pull request as ready for review March 8, 2025 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant