Skip to content

Conversation

@cht42
Copy link
Contributor

@cht42 cht42 commented Jan 15, 2026

Which issue does this PR close?

Rationale for this change

isoyear part is available in both PG and Spark EXTRACT functions.

https://www.postgresql.org/docs/current/functions-datetime.html#:~:text=the%20week%20numbering.-,isoyear,-The%20ISO%208601
https://github.com/apache/spark/blob/a03bedb6c1281c5263a42bfd20608d2ee005ab05/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala#L3360

What changes are included in this PR?

Support for part isoyear in date_part function.

Are these changes tested?

yes in SLT

Are there any user-facing changes?

yes

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Jan 15, 2026
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 15, 2026
@cht42 cht42 mentioned this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for 'isoyear' in date_part function

2 participants