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

Add "timezone_region" and "timezone_abbr" support for EXTRACT (and DATE_PART) #1090

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

alexander-beedie
Copy link
Contributor

@alexander-beedie alexander-beedie commented Jan 12, 2024

Adds "timezone_region" and "timezone_abbr"1 as recognised DateTimeField values.

EXTRACT(timezone_abbr FROM "dt")
EXTRACT(timezone_region FROM "dt")

Footnotes

  1. Oracle: EXTRACT docs

@coveralls
Copy link

coveralls commented Jan 12, 2024

Pull Request Test Coverage Report for Build 7527965721

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 87.858%

Totals Coverage Status
Change from base Build 7527748620: 0.003%
Covered Lines: 18849
Relevant Lines: 21454

💛 - Coveralls

@alexander-beedie alexander-beedie changed the title Support "timezone_region" for EXTRACT and DATE_PART Add "timezone_region" support for EXTRACT and DATE_PART Jan 12, 2024
@alexander-beedie alexander-beedie changed the title Add "timezone_region" support for EXTRACT and DATE_PART Add "timezone_region" and "timezone_abbr" support for EXTRACT (and DATE_PART) Jan 15, 2024
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.

Thank you for the contribution @alexander-beedie - the code and tests look good in this PR . I am not sure about the commented out test however.

tests/sqlparser_common.rs Outdated Show resolved Hide resolved
@alexander-beedie
Copy link
Contributor Author

Thank you for the contribution @alexander-beedie - the code and tests look good in this PR . I am not sure about the commented out test however.

Fixed; sorry about that one ;)

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.

LGTM -- thanks again @alexander-beedie

@alamb alamb merged commit 3ec337e into apache:main Jan 16, 2024
10 checks passed
@alexander-beedie alexander-beedie deleted the extract-timezone-region branch January 16, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants