ggjh-159 commented on code in PR #13742:
URL: https://github.com/apache/gluten/pull/13742#discussion_r4707488400


##########
gluten-flink/planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecCalc.java:
##########
@@ -117,10 +127,22 @@ public StreamExecCalc(
   public Transformation<RowData> translateToPlanInternal(
       PlannerBase planner, ExecNodeConfig config) {
     final ExecEdge inputEdge = getInputEdges().get(0);
-    final Transformation<RowData> inputTransform =
-        (Transformation<RowData>) inputEdge.translateToPlan(planner);
 
     // --- Begin Gluten-specific code changes ---
+    // Dissolve a unit-TUMBLE TVF into this Calc: compute the window
+    // columns inline, eliminating the TVF operator boundary.
+    if (inputEdge.getSource() instanceof StreamExecWindowTableFunction) {
+      StreamExecWindowTableFunction tvf = (StreamExecWindowTableFunction) 
inputEdge.getSource();
+      if (tvf.isUnitTumble()) {
+        return translateWithDissolvedTvf(tvf, planner, config);
+      }
+      if (tvf.isAlignedHop()) {

Review Comment:
   Please revert the StreamExecCalc.java changes. They make every Calc 
translation dissolve a unit-TUMBLE or aligned-HOP TVF in its input, and the HOP 
variant replaces window_start, window_end and window_time with the time 
attribute, which is only right when the consumer is the window join that 
recomputes the bounds. A plain `SELECT a, window_start, window_end, window_time 
FROM TABLE(HOP(...))` now returns one row per input row with all three columns 
equal to the time attribute instead of K rows with the real bounds (confirmed 
locally on this PR for size 2s / slide 1s: `+I[1, 2024-12-31T16:00:01.500, 
2024-12-31T16:00:01.500, 2024-12-31T16:00:01.500]`; Flink returns two rows). 
StreamExecCalc is a shared path for every query; keep the stock translation 
there. If the TVF projection is still wanted, do it in the TVF node's own 
translation (StreamExecWindowTableFunction), and keep the HOP-in-join shape 
inside StreamExecWindowJoin.



##########
gluten-flink/planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecJoin.java:
##########
@@ -255,6 +263,10 @@ protected Transformation<RowData> translateToPlanInternal(
         io.github.zhztheplayer.velox4j.type.RowType outputType =
             (io.github.zhztheplayer.velox4j.type.RowType)
                 LogicalTypeConverter.toVLType(getOutputType());
+        // Detect the window join pattern before substituteSameName renames
+        // duplicate columns; variables are shared with the gluten section.
+        leftWindowEndIdx = leftInputType.getNames().indexOf("window_end");

Review Comment:
   Please revert the StreamExecJoin.java changes. StreamExecJoin is the shared 
translation for every stream join, and this PR routes a join to the stateful 
window join as soon as both inputs carry a column literally named window_end: 
any join over a table with a window_end field is keyed by that column and fired 
by watermarks instead of running as a plain join. The same block hard-codes 
maxParallelism = 128 for the velox-side key-group shuffle and leaves an empty 
`if (...) {}` with two orphaned comments. Flink decides the window-join shape 
from the WindowingStrategy on the physical join; that routing already has its 
own translation in StreamExecWindowJoin. Please keep the stock StreamExecJoin.



##########
gluten-flink/planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecWindowTableFunction.java:
##########
@@ -0,0 +1,443 @@
+/*
+ * 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.
+ */
+package org.apache.flink.table.planner.plan.nodes.exec.stream;
+
+import org.apache.gluten.rexnode.Utils;
+import org.apache.gluten.table.runtime.operators.GlutenOneInputOperator;
+import org.apache.gluten.util.LogicalTypeConverter;
+import org.apache.gluten.util.PlanNodeIdGenerator;
+
+import io.github.zhztheplayer.velox4j.expression.CallTypedExpr;
+import io.github.zhztheplayer.velox4j.expression.ConstantTypedExpr;
+import io.github.zhztheplayer.velox4j.expression.FieldAccessTypedExpr;
+import io.github.zhztheplayer.velox4j.expression.TypedExpr;
+import io.github.zhztheplayer.velox4j.plan.EmptyNode;
+import io.github.zhztheplayer.velox4j.plan.PlanNode;
+import io.github.zhztheplayer.velox4j.plan.ProjectNode;
+import io.github.zhztheplayer.velox4j.plan.StatefulPlanNode;
+import io.github.zhztheplayer.velox4j.type.BigIntType;
+import io.github.zhztheplayer.velox4j.type.DoubleType;
+import io.github.zhztheplayer.velox4j.type.IntervalDayTimeType;
+import io.github.zhztheplayer.velox4j.type.TimestampType;
+import io.github.zhztheplayer.velox4j.type.Type;
+import io.github.zhztheplayer.velox4j.type.VarCharType;
+import io.github.zhztheplayer.velox4j.variant.BigIntValue;
+import io.github.zhztheplayer.velox4j.variant.DoubleValue;
+import io.github.zhztheplayer.velox4j.variant.VarCharValue;
+
+import org.apache.flink.FlinkVersion;
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.logical.HoppingWindowSpec;
+import org.apache.flink.table.planner.plan.logical.SessionWindowSpec;
+import 
org.apache.flink.table.planner.plan.logical.TimeAttributeWindowingStrategy;
+import org.apache.flink.table.planner.plan.logical.TumblingWindowSpec;
+import org.apache.flink.table.planner.plan.logical.WindowSpec;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeConfig;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeContext;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeMetadata;
+import org.apache.flink.table.planner.plan.nodes.exec.InputProperty;
+import 
org.apache.flink.table.planner.plan.nodes.exec.common.CommonExecWindowTableFunction;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.planner.utils.TableConfigUtils;
+import org.apache.flink.table.runtime.keyselector.RowDataKeySelector;
+import org.apache.flink.table.runtime.operators.window.TimeWindow;
+import 
org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner;
+import 
org.apache.flink.table.runtime.operators.window.tvf.operator.UnalignedWindowTableFunctionOperator;
+import 
org.apache.flink.table.runtime.operators.window.tvf.operator.WindowTableFunctionOperatorBase;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.runtime.typeutils.RowDataSerializer;
+import org.apache.flink.table.runtime.util.TimeWindowUtil;
+import org.apache.flink.table.types.logical.RowType;
+import org.apache.flink.util.Preconditions;
+
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.time.Duration;
+import java.time.ZoneId;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import static 
org.apache.flink.table.planner.plan.utils.WindowTableFunctionUtil.createWindowAssigner;
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * Gluten override of the stream window table-valued function ExecNode.
+ *
+ * <p>For aligned TUMBLE windows whose size is an exact natural time unit 
(1s/1m/1h/1d, offset
+ * zero), the JVM {@code WindowTableFunctionOperator} is replaced by a velox 
projection that
+ * computes {@code window_start} via {@code date_trunc} and derives {@code 
window_end} / {@code
+ * window_time} by interval arithmetic. This removes the velox→JVM→velox 
crossing that dominates
+ * canonical TVF queries. All other window kinds (HOP, SESSION, CUMULATE, 
non-unit sizes) fall back
+ * to the stock JVM translation.
+ */
+@ExecNodeMetadata(
+    name = "stream-exec-window-table-function",
+    version = 1,
+    consumedOptions = "table.local-time-zone",
+    producedTransformations = 
CommonExecWindowTableFunction.WINDOW_TRANSFORMATION,
+    minPlanVersion = FlinkVersion.v1_15,
+    minStateVersion = FlinkVersion.v1_15)
+public class StreamExecWindowTableFunction extends 
CommonExecWindowTableFunction
+    implements StreamExecNode<RowData> {
+
+  public StreamExecWindowTableFunction(
+      ReadableConfig tableConfig,
+      TimeAttributeWindowingStrategy windowingStrategy,
+      InputProperty inputProperty,
+      RowType outputType,
+      String description) {
+    this(
+        ExecNodeContext.newNodeId(),
+        ExecNodeContext.newContext(StreamExecWindowTableFunction.class),
+        
ExecNodeContext.newPersistedConfig(StreamExecWindowTableFunction.class, 
tableConfig),
+        windowingStrategy,
+        Collections.singletonList(inputProperty),
+        outputType,
+        description);
+  }
+
+  @JsonCreator
+  public StreamExecWindowTableFunction(
+      @JsonProperty(FIELD_NAME_ID) int id,
+      @JsonProperty(FIELD_NAME_TYPE) ExecNodeContext context,
+      @JsonProperty(FIELD_NAME_CONFIGURATION) ReadableConfig persistedConfig,
+      @JsonProperty(FIELD_NAME_WINDOWING) TimeAttributeWindowingStrategy 
windowingStrategy,
+      @JsonProperty(FIELD_NAME_INPUT_PROPERTIES) List<InputProperty> 
inputProperties,
+      @JsonProperty(FIELD_NAME_OUTPUT_TYPE) RowType outputType,
+      @JsonProperty(FIELD_NAME_DESCRIPTION) String description) {
+    super(
+        id, context, persistedConfig, windowingStrategy, inputProperties, 
outputType, description);
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  protected Transformation<RowData> translateToPlanInternal(
+      PlannerBase planner, ExecNodeConfig config) {
+    if (isUnitTumble()) {
+      return translateWithVeloxProjection(planner, config);
+    }
+    if (isSessionWindow()) {

Review Comment:
   The native SESSION stage ignores the partition keys of the TVF. Flink pulls 
the grouping keys into the SESSION TVF as partition keys 
(PullUpWindowTableFunctionIntoWindowAggregateRule, WindowUtil) and computes one 
session per key; `SELECT a, window_start, COUNT(*) FROM TABLE(SESSION(...)) 
GROUP BY a, window_start, window_end` therefore has per-key sessions. 
SessionExpand merges rows of every key on the subtask into one session, so 
window bounds come out wrong for that common shape. Please pass the partition 
keys into the stage and key it by them, or reject a SESSION TVF with partition 
keys; please also add an SQL-level test with two keys.



##########
gluten-flink/runtime/src/main/java/org/apache/gluten/table/runtime/operators/GlutenTwoInputOperator.java:
##########
@@ -281,6 +281,16 @@ public void processWatermarkStatus2(WatermarkStatus 
status) throws Exception {
     processElementInternal();
   }
 
+  /**
+   * Bypasses the Flink key-group range check for the velox-side state. The 
velox WindowJoin manages
+   * its own state without Flink's keyed state backend, so the key-group range 
enforcement is
+   * unnecessary and harmful when the upstream exchange hash differs from the 
velox-side hash chain.
+   */
+  @Override
+  public void setCurrentKey(Object key) {

Review Comment:
   Please revert the framework-level changes in this PR. GlutenTwoInputOperator 
overrides setCurrentKey with an empty body so that Flink's key-group range 
check can no longer fire (the comment says the Flink exchange hash and the 
velox-side hash chain disagree, which is exactly what that check reports); 
GlutenStatefulRecordSerializer switches the stateful exchange to presto-frame 
bytes with a new snapshot version; ArrowVectorWriter gains a writeNull path for 
null struct rows; RexCallConverterFactory registers FLOOR(timestamp) -> 
date_trunc for every query and Utils adds a SEMI join-type mapping. These files 
are shared by every gluten operator and query, and an operator PR must not 
change them. Keep the stock versions; the window join gets its keyed routing 
from Flink (see the general comment), and any general fix belongs in its own 
change.



##########
gluten-flink/ut/src/test/java/org/apache/gluten/table/runtime/stream/custom/WindowJoinPlannerNegativePathTest.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ */
+package org.apache.gluten.table.runtime.stream.custom;
+
+import org.apache.gluten.table.runtime.stream.common.Velox4jEnvironment;
+
+import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
+import org.apache.flink.table.api.EnvironmentSettings;
+import org.apache.flink.table.api.TableException;
+import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
+
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+/** Fails-loud planner paths of the gluten window join: unsupported shapes 
must throw. */
+class WindowJoinPlannerNegativePathTest {
+
+  private static StreamTableEnvironment tEnv;
+
+  @BeforeAll
+  static void setup() {
+    Velox4jEnvironment.initializeOnce();
+    StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
+    env.setParallelism(1);
+    EnvironmentSettings settings = 
EnvironmentSettings.newInstance().inStreamingMode().build();
+    tEnv = StreamTableEnvironment.create(env, settings);
+  }
+
+  @Test

Review Comment:
   The new tests only check the plan. Nothing in the repository runs a window 
TVF or a window join, so the bounds and the row counts they produce are never 
compared with Flink. Two examples from a local run on this PR: `SELECT a, 
window_start, window_end, window_time FROM TABLE(HOP(...))` with size 2s / 
slide 1s returned one row instead of two, and the native SESSION stage returned 
no rows at all for a bounded values table. Neither shows up in the current 
tests. Please add SQL-level tests (GlutenStreamingTestBase) with the expected 
rows for TUMBLE, HOP and SESSION TVFs and for the three window joins, including 
one with a TIMESTAMP_LTZ attribute and one SESSION query with two keys.



##########
gluten-flink/planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecWindowTableFunction.java:
##########
@@ -0,0 +1,443 @@
+/*
+ * 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.
+ */
+package org.apache.flink.table.planner.plan.nodes.exec.stream;
+
+import org.apache.gluten.rexnode.Utils;
+import org.apache.gluten.table.runtime.operators.GlutenOneInputOperator;
+import org.apache.gluten.util.LogicalTypeConverter;
+import org.apache.gluten.util.PlanNodeIdGenerator;
+
+import io.github.zhztheplayer.velox4j.expression.CallTypedExpr;
+import io.github.zhztheplayer.velox4j.expression.ConstantTypedExpr;
+import io.github.zhztheplayer.velox4j.expression.FieldAccessTypedExpr;
+import io.github.zhztheplayer.velox4j.expression.TypedExpr;
+import io.github.zhztheplayer.velox4j.plan.EmptyNode;
+import io.github.zhztheplayer.velox4j.plan.PlanNode;
+import io.github.zhztheplayer.velox4j.plan.ProjectNode;
+import io.github.zhztheplayer.velox4j.plan.StatefulPlanNode;
+import io.github.zhztheplayer.velox4j.type.BigIntType;
+import io.github.zhztheplayer.velox4j.type.DoubleType;
+import io.github.zhztheplayer.velox4j.type.IntervalDayTimeType;
+import io.github.zhztheplayer.velox4j.type.TimestampType;
+import io.github.zhztheplayer.velox4j.type.Type;
+import io.github.zhztheplayer.velox4j.type.VarCharType;
+import io.github.zhztheplayer.velox4j.variant.BigIntValue;
+import io.github.zhztheplayer.velox4j.variant.DoubleValue;
+import io.github.zhztheplayer.velox4j.variant.VarCharValue;
+
+import org.apache.flink.FlinkVersion;
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.configuration.ReadableConfig;
+import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.logical.HoppingWindowSpec;
+import org.apache.flink.table.planner.plan.logical.SessionWindowSpec;
+import 
org.apache.flink.table.planner.plan.logical.TimeAttributeWindowingStrategy;
+import org.apache.flink.table.planner.plan.logical.TumblingWindowSpec;
+import org.apache.flink.table.planner.plan.logical.WindowSpec;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeConfig;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeContext;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeMetadata;
+import org.apache.flink.table.planner.plan.nodes.exec.InputProperty;
+import 
org.apache.flink.table.planner.plan.nodes.exec.common.CommonExecWindowTableFunction;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.planner.utils.TableConfigUtils;
+import org.apache.flink.table.runtime.keyselector.RowDataKeySelector;
+import org.apache.flink.table.runtime.operators.window.TimeWindow;
+import 
org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner;
+import 
org.apache.flink.table.runtime.operators.window.tvf.operator.UnalignedWindowTableFunctionOperator;
+import 
org.apache.flink.table.runtime.operators.window.tvf.operator.WindowTableFunctionOperatorBase;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.runtime.typeutils.RowDataSerializer;
+import org.apache.flink.table.runtime.util.TimeWindowUtil;
+import org.apache.flink.table.types.logical.RowType;
+import org.apache.flink.util.Preconditions;
+
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import 
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.time.Duration;
+import java.time.ZoneId;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import static 
org.apache.flink.table.planner.plan.utils.WindowTableFunctionUtil.createWindowAssigner;
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * Gluten override of the stream window table-valued function ExecNode.
+ *
+ * <p>For aligned TUMBLE windows whose size is an exact natural time unit 
(1s/1m/1h/1d, offset
+ * zero), the JVM {@code WindowTableFunctionOperator} is replaced by a velox 
projection that
+ * computes {@code window_start} via {@code date_trunc} and derives {@code 
window_end} / {@code
+ * window_time} by interval arithmetic. This removes the velox→JVM→velox 
crossing that dominates
+ * canonical TVF queries. All other window kinds (HOP, SESSION, CUMULATE, 
non-unit sizes) fall back
+ * to the stock JVM translation.
+ */
+@ExecNodeMetadata(
+    name = "stream-exec-window-table-function",
+    version = 1,
+    consumedOptions = "table.local-time-zone",
+    producedTransformations = 
CommonExecWindowTableFunction.WINDOW_TRANSFORMATION,
+    minPlanVersion = FlinkVersion.v1_15,
+    minStateVersion = FlinkVersion.v1_15)
+public class StreamExecWindowTableFunction extends 
CommonExecWindowTableFunction
+    implements StreamExecNode<RowData> {
+
+  public StreamExecWindowTableFunction(
+      ReadableConfig tableConfig,
+      TimeAttributeWindowingStrategy windowingStrategy,
+      InputProperty inputProperty,
+      RowType outputType,
+      String description) {
+    this(
+        ExecNodeContext.newNodeId(),
+        ExecNodeContext.newContext(StreamExecWindowTableFunction.class),
+        
ExecNodeContext.newPersistedConfig(StreamExecWindowTableFunction.class, 
tableConfig),
+        windowingStrategy,
+        Collections.singletonList(inputProperty),
+        outputType,
+        description);
+  }
+
+  @JsonCreator
+  public StreamExecWindowTableFunction(
+      @JsonProperty(FIELD_NAME_ID) int id,
+      @JsonProperty(FIELD_NAME_TYPE) ExecNodeContext context,
+      @JsonProperty(FIELD_NAME_CONFIGURATION) ReadableConfig persistedConfig,
+      @JsonProperty(FIELD_NAME_WINDOWING) TimeAttributeWindowingStrategy 
windowingStrategy,
+      @JsonProperty(FIELD_NAME_INPUT_PROPERTIES) List<InputProperty> 
inputProperties,
+      @JsonProperty(FIELD_NAME_OUTPUT_TYPE) RowType outputType,
+      @JsonProperty(FIELD_NAME_DESCRIPTION) String description) {
+    super(
+        id, context, persistedConfig, windowingStrategy, inputProperties, 
outputType, description);
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  protected Transformation<RowData> translateToPlanInternal(
+      PlannerBase planner, ExecNodeConfig config) {
+    if (isUnitTumble()) {

Review Comment:
   This PR offloads the window TVF and the window join without checking the 
type of the time attribute. That matters for TIMESTAMP_LTZ. Example: the time 
attribute is TIMESTAMP_LTZ, table.local-time-zone is Asia/Shanghai, and an 
event arrives at 2025-01-01 07:00 UTC with TUMBLE of one day. Flink cuts the 
day at local midnight, so the window is [2024-12-31 16:00, 2025-01-01 16:00) 
UTC. The velox projection here uses date_trunc in UTC, so the window is 
[2025-01-01 00:00, 2025-01-02 00:00) UTC. The HOP projection, the native 
SESSION stage and the velox window join (its shift zone is fixed to 0) behave 
the same way. Until the velox side carries the shift zone, please reject 
TIMESTAMP_LTZ time attributes at translation time on these paths.



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