Skip to content

feat: Support Spark expression: current_time_zone#4348

Merged
comphead merged 1 commit into
apache:mainfrom
YutaLin:3133-support_spark_expression_current_time_zone
May 15, 2026
Merged

feat: Support Spark expression: current_time_zone#4348
comphead merged 1 commit into
apache:mainfrom
YutaLin:3133-support_spark_expression_current_time_zone

Conversation

@YutaLin
Copy link
Copy Markdown
Contributor

@YutaLin YutaLin commented May 15, 2026

Which issue does this PR close?

Closes #3133

Rationale for this change

Spark's CurrentTimeZone expression is declared Unevaluable. It walks the plan, finds every CurrentTimeZone, reads SQLConf.get.sessionLocalTimeZone at plan time, and substitutes a Literal(, StringType) in place of the expression, so Comet would only see a Literal(String).

We just need test and verify.

What changes are included in this PR?

Add current_timezone.sql

How are these changes tested?

run sql test in spark3.4/3.5/4.0 and prettier check

Copy link
Copy Markdown
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @YutaLin

@comphead comphead merged commit 323b6d7 into apache:main May 15, 2026
77 checks passed
@YutaLin YutaLin deleted the 3133-support_spark_expression_current_time_zone branch May 15, 2026 23:05
@YutaLin
Copy link
Copy Markdown
Contributor Author

YutaLin commented May 15, 2026

Thanks @comphead for the review and merge

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.

[Feature] Support Spark expression: current_time_zone

2 participants