KurtYoung commented on a change in pull request #8206: 
[FLINK-12248][table-planner-blink] Support e2e over window in blink batch
URL: https://github.com/apache/flink/pull/8206#discussion_r276598619
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/BoundComparatorCodeGenerator.scala
 ##########
 @@ -0,0 +1,235 @@
+/*
+ * 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.codegen
+
+import org.apache.flink.table.`type`.{DateType, InternalType, InternalTypes, 
RowType, TimeType, TimestampType}
+import org.apache.flink.table.api.TableConfig
+import org.apache.flink.table.calcite.FlinkTypeFactory
+import org.apache.flink.table.codegen.CodeGenUtils.{BASE_ROW, newName}
+import org.apache.flink.table.codegen.Indenter.toISC
+import org.apache.flink.table.generated.{GeneratedRecordComparator, 
RecordComparator}
+
+import org.apache.calcite.avatica.util.DateTimeUtils
+import org.apache.calcite.rex.{RexInputRef, RexWindowBound}
+import org.apache.calcite.sql.fun.SqlStdOperatorTable.{GREATER_THAN, 
GREATER_THAN_OR_EQUAL, MINUS}
+import org.apache.calcite.tools.RelBuilder
+
+import java.math.BigDecimal
+
+/**
+  * A code generator for generating [[RecordComparator]] on the 
[[RexWindowBound]] based range
+  * over window.
+  *
+  * @param inType       type of the input
+  * @param bound        the bound value for the window, its type may be Long 
or BigDecimal.
+  * @param key          key position describe which fields are keys in what 
order
+  * @param keyType      type for the key field.
+  * @param keyOrder     sort order for the key field.
+  * @param isLowerBound the RexWindowBound is lower or not.
+  */
+class RangeBoundComparatorCodeGenerator(
+    relBuilder: RelBuilder,
+    config: TableConfig,
+    inType: RowType,
+    bound: Any,
+    key: Int = -1,
+    keyType: InternalType = null,
+    keyOrder: Boolean = true,
+    isLowerBound: Boolean = true) {
+
+  def generateBoundComparator(name: String): GeneratedRecordComparator = {
+
 
 Review comment:
   blank line

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


With regards,
Apache Git Services

Reply via email to