KevinyhZou commented on code in PR #10248:
URL: 
https://github.com/apache/incubator-gluten/pull/10248#discussion_r2227265648


##########
gluten-flink/ut/src/test/java/org/apache/gluten/table/runtime/stream/custom/ScalarFunctionsTest.java:
##########
@@ -126,4 +126,14 @@ void testEqual() {
     String query4 = "select c = d as x from tblEqual where a > 0";
     runAndCheck(query4, Arrays.asList("+I[false]", "+I[true]", "+I[false]"));
   }
+
+  @Test
+  void testDateFormat() {
+    List<Row> rows =
+        Arrays.asList(Row.of(1, "2024-12-31 12:12:12"), Row.of(2, "2025-02-28 
12:12:12"));
+    createSimpleBoundedValuesTable("dateFormatTbl", "a int, b string", rows);
+    String query =
+        "select a, DATE_FORMAT(cast(b as Timestamp(3)), 'yyyy-MM-dd') from 
dateFormatTbl";

Review Comment:
   In my testing, the timezone does not affect the result of `date_format` of 
flink, 
   `SELECT  date_format(TIMESTAMP '2023-01-01 12:00:00', 'yyyy-MM-dd HH:mm:ss')`
   when set config `table.local-time-zone` value as `UTC` or `Asia/Shanghai`, 
the return result is same. 
   
   So if we pass the session timezone to Velox's config, it may return a 
different result compare to valina flink. @PHILO-HE 



-- 
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]

Reply via email to