flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] KurtYoung commented on a change in pull request #8156: [FLINK-12168][table-planner-blink] Support e2e limit, sortLimit, rank, union in blink batch
Date Mon, 15 Apr 2019 06:33:03 GMT
KurtYoung commented on a change in pull request #8156: [FLINK-12168][table-planner-blink] Support
e2e limit, sortLimit, rank, union in blink batch
URL: https://github.com/apache/flink/pull/8156#discussion_r275220462
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/batch/BatchExecRank.scala
 ##########
 @@ -103,4 +111,66 @@ class BatchExecRank(
     val costFactory = planner.getCostFactory.asInstanceOf[FlinkCostFactory]
     costFactory.makeCost(rowCount, cpuCost, 0, 0, memCost)
   }
+
+  override def getDamBehavior: DamBehavior = DamBehavior.PIPELINED
+
+  override def getInputNodes: util.List[ExecNode[BatchTableEnvironment, _]] =
+    List(getInput.asInstanceOf[ExecNode[BatchTableEnvironment, _]])
+
+  override def translateToPlanInternal(
+      tableEnv: BatchTableEnvironment): StreamTransformation[BaseRow] = {
+    val input = getInputNodes.get(0).translateToPlan(tableEnv)
+        .asInstanceOf[StreamTransformation[BaseRow]]
+    val outputType = FlinkTypeFactory.toInternalRowType(getRowType)
+    val partitionBySortingKeys = partitionKey.toArray
+    // The collation for the partition-by fields is inessential here, we only use the
+    // comparator to distinguish different groups.
+    // (order[is_asc], null_is_last)
+    val partitionBySortCollation = partitionBySortingKeys.map(_ => (true, true))
+
+    val inputRowType = FlinkTypeFactory.toInternalRowType(getInput.getRowType)
+
 
 Review comment:
   too many blank lines

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message