Copilot commented on code in PR #12966:
URL: https://github.com/apache/gluten/pull/12966#discussion_r3937564794
##########
backends-velox/src/test/scala/org/apache/gluten/functions/DateFunctionsValidateSuite.scala:
##########
@@ -681,6 +686,26 @@ class DateFunctionsValidateSuite extends
FunctionsValidateSuite {
runQueryAndCompare("select cast(str as timestamp_ntz) from str_view") {
checkGlutenPlan[ProjectExecTransformer]
}
+
+ val datePath = dir.getAbsolutePath + "/date_view"
+ Seq(
+ java.sql.Date.valueOf("1969-12-31"),
+ java.sql.Date.valueOf("1970-01-01"),
+ java.sql.Date.valueOf("2000-01-01")
+ ).toDF("d").coalesce(1).write.mode("overwrite").parquet(datePath)
+ spark.read.parquet(datePath).createOrReplaceTempView("date_view")
+
+ // cast(date as timestamp_ntz)
+ runQueryAndCompare("select cast(d as timestamp_ntz) from date_view") {
+ checkGlutenPlan[ProjectExecTransformer]
+ }
+
+ // The conversion is independent of the session timezone.
Review Comment:
The comment claims the DATE -> TIMESTAMP_NTZ conversion is independent of
session timezone, but this test only verifies native execution under a non-UTC
session timezone (it doesn’t compare results across timezones). Updating the
comment would avoid misleading future readers about what’s actually being
asserted here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]