Skip to content

feat: Add support for 'isoyear' in date_part function#19821

Merged
alamb merged 2 commits intoapache:mainfrom
cht42:isoyear
Jan 16, 2026
Merged

feat: Add support for 'isoyear' in date_part function#19821
alamb merged 2 commits intoapache:mainfrom
cht42:isoyear

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
@alamb alamb added this pull request to the merge queue Jan 16, 2026
@alamb
Copy link
Contributor

alamb commented Jan 16, 2026

Thanks @cht42 and @Jefffrey

Merged via the queue into apache:main with commit f3f6dec Jan 16, 2026
29 checks passed
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

3 participants