You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "YutaLin (via GitHub)" <gi...@apache.org> on 2026/05/20 01:57:33 UTC
[PR] feat: Support Spark expression: convert_timezone [datafusion-comet]
YutaLin opened a new pull request, #4369:
URL: https://github.com/apache/datafusion-comet/pull/4369
## Which issue does this PR close?
Closes #3132
## Rationale for this change
Support expression convert_timezone
## What changes are included in this PR?
Leverage native function `SparkFromUtcTimestamp` and `SparkToUtcTimestamp` so only add `CometConvertTimezone` in datatime.scala
## How are these changes tested?
Add `convert_timezone.sql` and run test in Spark 3.4/3.5/4.0 and linter check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] feat: Support Spark expression: convert_timezone [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead merged PR #4369:
URL: https://github.com/apache/datafusion-comet/pull/4369
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] feat: Support Spark expression: convert_timezone [datafusion-comet]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #4369:
URL: https://github.com/apache/datafusion-comet/pull/4369#issuecomment-4500735111
> Hi @andygrove, Thanks for the review, I've added test case for Null source / target tz.
Thanks @YutaLin
We also currently testing the Claude skill `wire_datafusion_function` which knows about how tests should be built, appreciate if you can try it, share feedback and improve if needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] feat: Support Spark expression: convert_timezone [datafusion-comet]
Posted by "YutaLin (via GitHub)" <gi...@apache.org>.
YutaLin commented on PR #4369:
URL: https://github.com/apache/datafusion-comet/pull/4369#issuecomment-4501380929
Hi @comphead
Thanks for the merge and feedback, i will try it!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] feat: Support Spark expression: convert_timezone [datafusion-comet]
Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #4369:
URL: https://github.com/apache/datafusion-comet/pull/4369#discussion_r3274617485
##########
spark/src/test/resources/sql-tests/expressions/datetime/convert_timezone.sql:
##########
@@ -0,0 +1,41 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied. See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+-- Config: spark.comet.expression.ConvertTimezone.allowIncompatible=true
+-- ConfigMatrix: spark.sql.session.timeZone=UTC,America/Los_Angeles
+
+statement
+CREATE TABLE test_convert_timezone(ts timestamp_ntz, src string, tgt string) USING parquet
+
+statement
Review Comment:
Could you add tests for NULL source and/or target
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] feat: Support Spark expression: convert_timezone [datafusion-comet]
Posted by "YutaLin (via GitHub)" <gi...@apache.org>.
YutaLin commented on PR #4369:
URL: https://github.com/apache/datafusion-comet/pull/4369#issuecomment-4500037082
Hi @andygrove,
Thanks for the review, I've added test case for Null source / target tz.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org