weiqingy commented on code in PR #2448:
URL: https://github.com/apache/auron/pull/2448#discussion_r3737899201


##########
auron-flink-extension/auron-flink-planner/src/test/java/org/apache/auron/flink/table/runtime/AuronFlinkCalcITCase.java:
##########
@@ -221,6 +222,19 @@ public void testFilterOrComparison() {
         assertThat(rows).isEqualTo(Arrays.asList(Row.of(1), Row.of(2)));
     }
 
+    /** UNIX_TIMESTAMP over the per-row {@code ts} string converts to the 
native ext function and
+     * yields the epoch seconds. The session timezone is set to Asia/Shanghai 
to make the result
+     * deterministic and to exercise timezone propagation into the native 
plan. */
+    @Test
+    public void testUnixTimestamp() {
+        
tableEnvironment.getConfig().setLocalTimeZone(ZoneId.of("Asia/Shanghai"));

Review Comment:
   Thanks for the review.
   
   The converter resolves the session zone at plan time and hands the id to the 
native function, which only knows IANA zone names. A fixed offset isn't one, so 
it errors during execution:
   
   ```
   Flink_UnixTimestamp: invalid timezone GMT-08:00
   ```
   
   By that point the plan is already native and the Calc operator has no 
runtime fallback, so the task dies. It also doesn't need an explicit `SET`. The 
default resolves to the JVM's default zone, so a TaskManager running with 
`TZ=GMT-08:00` hits it with no config at all.
   
   Fixed by checking the zone at plan time. If native can't resolve it, the 
Calc falls back to Flink and returns correct results, the same way the 
converter already handles formats it can't translate. That covers the 
`GMT±HH:MM` forms and the legacy `SystemV/*` ids.
   
   Added the tests for: `GMT-08:00` and `UTC` IT cases, plus unit tests on the 
gate.
   
   Fixed-offset sessions fall back for now rather than running natively. Filed 
#2455 to follow up with native support for them so they stay on the native path.
   
   



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

Reply via email to