shuai-xu commented on code in PR #10320:
URL: 
https://github.com/apache/incubator-gluten/pull/10320#discussion_r2286903677


##########
gluten-flink/planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecLocalWindowAggregate.java:
##########
@@ -157,30 +172,59 @@ protected Transformation<RowData> translateToPlanInternal(
     io.github.zhztheplayer.velox4j.type.RowType outputType =
         (io.github.zhztheplayer.velox4j.type.RowType)
             LogicalTypeConverter.toVLType(getOutputType());
-    List<FieldAccessTypedExpr> partitionKeys = 
Utils.generateFieldAccesses(inputType, grouping);
-    List<WindowFunction> functions = 
AggregateCallConverter.toFunctions(aggCalls, inputType);
+    List<FieldAccessTypedExpr> groupingKeys = 
Utils.generateFieldAccesses(inputType, grouping);
+    List<Aggregate> aggregates = AggregateCallConverter.toAggregates(aggCalls, 
inputType);
     checkArgument(outputType.getNames().size() >= grouping.length + 
aggCalls.length);
-    List<String> colNames =
+    List<String> aggNames =
         outputType.getNames().stream()
             .skip(grouping.length)
             .limit(aggCalls.length)
             .collect(Collectors.toList());
-    PlanNode window =
-        new WindowNode(
+    List<Integer> keyIndexes = 
Arrays.stream(grouping).boxed().collect(Collectors.toList());
+    PartitionFunctionSpec keySelectorSpec = new 
HashPartitionFunctionSpec(inputType, keyIndexes);
+    // TODO: support more window types.
+    Tuple5<Long, Long, Long, Integer, Integer> windowSpecParams =
+        WindowUtils.extractWindowParameters(windowing);
+    long size = windowSpecParams.f0;
+    long slide = windowSpecParams.f1;
+    long offset = windowSpecParams.f2;
+    int rowtimeIndex = windowSpecParams.f3;
+    int windowType = windowSpecParams.f4;
+    PartitionFunctionSpec sliceAssignerSpec =
+        new WindowPartitionFunctionSpec(inputType, rowtimeIndex, size, slide, 
offset, windowType);

Review Comment:
   I have rename related classes to begin with Stream, please help to review 
again.



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