wuchong commented on a change in pull request #15280:
URL: https://github.com/apache/flink/pull/15280#discussion_r606807680
##########
File path:
flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/data/DataFormatConvertersTest.java
##########
@@ -85,7 +85,7 @@
LocalTimeTypeInfo.LOCAL_DATE,
LocalTimeTypeInfo.LOCAL_TIME,
LocalTimeTypeInfo.LOCAL_DATE_TIME,
- StringDataTypeInfo.INSTANCE
+ StringDataTypeInfo.INSTANCE,
Review comment:
remove end `,`?
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/agg/AggsHandlerCodeGenerator.scala
##########
@@ -1082,6 +1100,17 @@ class AggsHandlerCodeGenerator(
}
}
+ private def getShiftEpochMills(itemExpr: String): String = {
+ if ("UTC".equals(shiftTimeZone.getId)) {
+ itemExpr
+ } else {
+ s"""
+ |$TIME_WINDOW_UTIL.toEpochMills(
+ |$itemExpr, java.time.ZoneId.of("${shiftTimeZone.getId}"))
Review comment:
nit: Personally, I suggest to serialize `ZoneId` as a member field to
avoid construct the `ZoneId` per record.
##########
File path:
flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/sql/SqlGroupedWindowFunction.java
##########
@@ -0,0 +1,191 @@
+/*
+ * 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.calcite.sql;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableList;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.sql.type.ExplicitReturnTypeInference;
+import org.apache.calcite.sql.type.ReturnTypes;
+import org.apache.calcite.sql.type.SqlOperandTypeChecker;
+import org.apache.calcite.sql.type.SqlOperandTypeInference;
+import org.apache.calcite.sql.type.SqlReturnTypeInference;
+import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.validate.SqlMonotonicity;
+
+import java.util.List;
+
+/**
+ * SQL function that computes keys by which rows can be partitioned and
aggregated.
+ *
+ * <p>Grouped window functions always occur in the GROUP BY clause. They often
have auxiliary
+ * functions that access information about the group. For example, {@code HOP}
is a group function,
+ * and its auxiliary functions are {@code HOP_START} and {@code HOP_END}. Here
they are used in a
+ * streaming query:
+ *
+ * <p>Note: we copied the implementation from Calcite's {@link
Review comment:
Add Calcite JIRA id.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]