You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/12/28 10:09:16 UTC

[GitHub] [flink] wenlong88 opened a new pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

wenlong88 opened a new pull request #14506:
URL: https://github.com/apache/flink/pull/14506


   ## What is the purpose of the change
   Separate the implementations of BatchExecRank
   
   ## Brief change log
   Introduce BatchPhysicalRank, and make BatchExecRank only extended from ExecNode
   
   ## Verifying this change
   This change is already covered by existing tests
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (no)
   


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641",
       "triggerID" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fb616e97afc33ccbd931d353d8726de9778902f6 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438) 
   * d6898f2dc86d5aace855d67bad773ded1a137b12 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d9a698f4dc82ec429e3b2934afac81815d971e45 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] godfreyhe commented on a change in pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on a change in pull request #14506:
URL: https://github.com/apache/flink/pull/14506#discussion_r551181199



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.
+ *
+ * <p>This node supports two-stage(local and global) rank to reduce data-shuffling.
+ */
+public class BatchExecRank extends ExecNodeBase<RowData> implements BatchExecNode<RowData> {
+
+    private final int[] partitionFields;
+    private final int[] sortFields;
+    private final long rankStart;
+    private final long rankEnd;
+    private final boolean outputRankNumber;
+
+    public BatchExecRank(
+            int[] partitionFields,
+            int[] sortFields,
+            long rankStart,
+            long rankEnd,
+            boolean outputRankNumber,
+            ExecEdge inputEdge,
+            LogicalType outputType,
+            String description) {
+        super(Collections.singletonList(inputEdge), outputType, description);
+        this.partitionFields = partitionFields;
+        this.sortFields = sortFields;
+        this.rankStart = rankStart;
+        this.rankEnd = rankEnd;
+        this.outputRankNumber = outputRankNumber;
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
+
+        Transformation<RowData> input =
+                (Transformation<RowData>) getInputNodes().get(0).translateToPlan(planner);
+
+        RowType outputType = (RowType) getOutputType();

Review comment:
       nit: this field definition is unnecessary 

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.

Review comment:
       correct the comments

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.
+ *
+ * <p>This node supports two-stage(local and global) rank to reduce data-shuffling.
+ */
+public class BatchExecRank extends ExecNodeBase<RowData> implements BatchExecNode<RowData> {
+
+    private final int[] partitionFields;
+    private final int[] sortFields;
+    private final long rankStart;
+    private final long rankEnd;
+    private final boolean outputRankNumber;
+
+    public BatchExecRank(
+            int[] partitionFields,
+            int[] sortFields,
+            long rankStart,
+            long rankEnd,
+            boolean outputRankNumber,
+            ExecEdge inputEdge,
+            LogicalType outputType,

Review comment:
       RowType

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.
+ *
+ * <p>This node supports two-stage(local and global) rank to reduce data-shuffling.
+ */
+public class BatchExecRank extends ExecNodeBase<RowData> implements BatchExecNode<RowData> {
+
+    private final int[] partitionFields;
+    private final int[] sortFields;
+    private final long rankStart;
+    private final long rankEnd;
+    private final boolean outputRankNumber;
+
+    public BatchExecRank(
+            int[] partitionFields,
+            int[] sortFields,
+            long rankStart,
+            long rankEnd,
+            boolean outputRankNumber,
+            ExecEdge inputEdge,
+            LogicalType outputType,
+            String description) {
+        super(Collections.singletonList(inputEdge), outputType, description);
+        this.partitionFields = partitionFields;
+        this.sortFields = sortFields;
+        this.rankStart = rankStart;
+        this.rankEnd = rankEnd;
+        this.outputRankNumber = outputRankNumber;
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
+
+        Transformation<RowData> input =
+                (Transformation<RowData>) getInputNodes().get(0).translateToPlan(planner);
+
+        RowType outputType = (RowType) getOutputType();
+        RowType inputType = (RowType) getInputNodes().get(0).getOutputType();
+
+        LogicalType[] partitionTypes =
+                IntStream.of(partitionFields)
+                        .mapToObj(inputType::getTypeAt)
+                        .toArray(LogicalType[]::new);
+        LogicalType[] sortTypes =
+                IntStream.of(sortFields).mapToObj(inputType::getTypeAt).toArray(LogicalType[]::new);
+
+        // operator needn't cache data
+        // The collation for the partition-by and order-by fields is inessential here,
+        // we only use the comparator to distinguish fields change.
+        RankOperator operator =
+                new RankOperator(
+                        ComparatorCodeGenerator.gen(
+                                planner.getTableConfig(),
+                                "PartitionByComparator",
+                                partitionFields,
+                                partitionTypes,
+                                new boolean[partitionFields.length],
+                                new boolean[partitionFields.length]),
+                        ComparatorCodeGenerator.gen(
+                                planner.getTableConfig(),
+                                "OrderByComparator",
+                                sortFields,
+                                sortTypes,
+                                new boolean[sortFields.length],
+                                new boolean[sortFields.length]),
+                        rankStart,
+                        rankEnd,
+                        outputRankNumber);
+
+        OneInputTransformation<RowData, RowData> ret =
+                ExecNodeUtil.createOneInputTransformation(
+                        input,
+                        getDesc(),
+                        SimpleOperatorFactory.of(operator),
+                        InternalTypeInfo.of(outputType),
+                        input.getParallelism(),
+                        0);

Review comment:
       I prefer to use `new OneInputTransformation()`, because `0` is unnecessary.

##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalRank.scala
##########
@@ -237,52 +229,16 @@ class BatchExecRank(
 
   //~ ExecNode methods -----------------------------------------------------------

Review comment:
       remove it

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.
+ *
+ * <p>This node supports two-stage(local and global) rank to reduce data-shuffling.
+ */
+public class BatchExecRank extends ExecNodeBase<RowData> implements BatchExecNode<RowData> {
+
+    private final int[] partitionFields;
+    private final int[] sortFields;
+    private final long rankStart;
+    private final long rankEnd;
+    private final boolean outputRankNumber;
+
+    public BatchExecRank(
+            int[] partitionFields,
+            int[] sortFields,
+            long rankStart,
+            long rankEnd,
+            boolean outputRankNumber,
+            ExecEdge inputEdge,
+            LogicalType outputType,
+            String description) {
+        super(Collections.singletonList(inputEdge), outputType, description);
+        this.partitionFields = partitionFields;
+        this.sortFields = sortFields;
+        this.rankStart = rankStart;
+        this.rankEnd = rankEnd;
+        this.outputRankNumber = outputRankNumber;
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
+
+        Transformation<RowData> input =
+                (Transformation<RowData>) getInputNodes().get(0).translateToPlan(planner);
+
+        RowType outputType = (RowType) getOutputType();
+        RowType inputType = (RowType) getInputNodes().get(0).getOutputType();
+
+        LogicalType[] partitionTypes =
+                IntStream.of(partitionFields)
+                        .mapToObj(inputType::getTypeAt)
+                        .toArray(LogicalType[]::new);
+        LogicalType[] sortTypes =
+                IntStream.of(sortFields).mapToObj(inputType::getTypeAt).toArray(LogicalType[]::new);
+
+        // operator needn't cache data
+        // The collation for the partition-by and order-by fields is inessential here,
+        // we only use the comparator to distinguish fields change.
+        RankOperator operator =
+                new RankOperator(
+                        ComparatorCodeGenerator.gen(
+                                planner.getTableConfig(),
+                                "PartitionByComparator",
+                                partitionFields,
+                                partitionTypes,
+                                new boolean[partitionFields.length],
+                                new boolean[partitionFields.length]),
+                        ComparatorCodeGenerator.gen(
+                                planner.getTableConfig(),
+                                "OrderByComparator",
+                                sortFields,
+                                sortTypes,
+                                new boolean[sortFields.length],
+                                new boolean[sortFields.length]),

Review comment:
       ditto

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.
+ *
+ * <p>This node supports two-stage(local and global) rank to reduce data-shuffling.
+ */
+public class BatchExecRank extends ExecNodeBase<RowData> implements BatchExecNode<RowData> {
+
+    private final int[] partitionFields;
+    private final int[] sortFields;
+    private final long rankStart;
+    private final long rankEnd;
+    private final boolean outputRankNumber;
+
+    public BatchExecRank(
+            int[] partitionFields,
+            int[] sortFields,
+            long rankStart,
+            long rankEnd,
+            boolean outputRankNumber,
+            ExecEdge inputEdge,
+            LogicalType outputType,
+            String description) {
+        super(Collections.singletonList(inputEdge), outputType, description);
+        this.partitionFields = partitionFields;
+        this.sortFields = sortFields;
+        this.rankStart = rankStart;
+        this.rankEnd = rankEnd;
+        this.outputRankNumber = outputRankNumber;
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
+
+        Transformation<RowData> input =
+                (Transformation<RowData>) getInputNodes().get(0).translateToPlan(planner);
+
+        RowType outputType = (RowType) getOutputType();
+        RowType inputType = (RowType) getInputNodes().get(0).getOutputType();
+
+        LogicalType[] partitionTypes =
+                IntStream.of(partitionFields)
+                        .mapToObj(inputType::getTypeAt)
+                        .toArray(LogicalType[]::new);
+        LogicalType[] sortTypes =
+                IntStream.of(sortFields).mapToObj(inputType::getTypeAt).toArray(LogicalType[]::new);
+
+        // operator needn't cache data
+        // The collation for the partition-by and order-by fields is inessential here,
+        // we only use the comparator to distinguish fields change.
+        RankOperator operator =
+                new RankOperator(
+                        ComparatorCodeGenerator.gen(
+                                planner.getTableConfig(),
+                                "PartitionByComparator",
+                                partitionFields,
+                                partitionTypes,
+                                new boolean[partitionFields.length],
+                                new boolean[partitionFields.length]),

Review comment:
       the values of boolean array are always true. 
   see original code: `val partitionBySortCollation = partitionBySortingKeys.map(_ => (true, true))
   `




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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641",
       "triggerID" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2409555b0a80fa8971a4cd502a2eeaada6668584",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2409555b0a80fa8971a4cd502a2eeaada6668584",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d6898f2dc86d5aace855d67bad773ded1a137b12 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641) 
   * 2409555b0a80fa8971a4cd502a2eeaada6668584 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] wenlong88 commented on a change in pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
wenlong88 commented on a change in pull request #14506:
URL: https://github.com/apache/flink/pull/14506#discussion_r551711093



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.
+ *
+ * <p>This node supports two-stage(local and global) rank to reduce data-shuffling.
+ */
+public class BatchExecRank extends ExecNodeBase<RowData> implements BatchExecNode<RowData> {
+
+    private final int[] partitionFields;
+    private final int[] sortFields;
+    private final long rankStart;
+    private final long rankEnd;
+    private final boolean outputRankNumber;
+
+    public BatchExecRank(
+            int[] partitionFields,
+            int[] sortFields,
+            long rankStart,
+            long rankEnd,
+            boolean outputRankNumber,
+            ExecEdge inputEdge,
+            LogicalType outputType,
+            String description) {
+        super(Collections.singletonList(inputEdge), outputType, description);
+        this.partitionFields = partitionFields;
+        this.sortFields = sortFields;
+        this.rankStart = rankStart;
+        this.rankEnd = rankEnd;
+        this.outputRankNumber = outputRankNumber;
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
+
+        Transformation<RowData> input =
+                (Transformation<RowData>) getInputNodes().get(0).translateToPlan(planner);
+
+        RowType outputType = (RowType) getOutputType();
+        RowType inputType = (RowType) getInputNodes().get(0).getOutputType();
+
+        LogicalType[] partitionTypes =
+                IntStream.of(partitionFields)
+                        .mapToObj(inputType::getTypeAt)
+                        .toArray(LogicalType[]::new);
+        LogicalType[] sortTypes =
+                IntStream.of(sortFields).mapToObj(inputType::getTypeAt).toArray(LogicalType[]::new);
+
+        // operator needn't cache data
+        // The collation for the partition-by and order-by fields is inessential here,
+        // we only use the comparator to distinguish fields change.
+        RankOperator operator =
+                new RankOperator(
+                        ComparatorCodeGenerator.gen(
+                                planner.getTableConfig(),
+                                "PartitionByComparator",
+                                partitionFields,
+                                partitionTypes,
+                                new boolean[partitionFields.length],
+                                new boolean[partitionFields.length]),

Review comment:
       see the comment above, we just care field changes here, so we don't need to set orders and nullIsLasts.




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



[GitHub] [flink] wenlong88 commented on a change in pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
wenlong88 commented on a change in pull request #14506:
URL: https://github.com/apache/flink/pull/14506#discussion_r551711093



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/batch/BatchExecRank.java
##########
@@ -0,0 +1,123 @@
+/*
+ * 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.batch;
+
+import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
+import org.apache.flink.streaming.api.transformations.OneInputTransformation;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.planner.codegen.sort.ComparatorCodeGenerator;
+import org.apache.flink.table.planner.delegation.PlannerBase;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecEdge;
+import org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase;
+import org.apache.flink.table.planner.plan.nodes.exec.utils.ExecNodeUtil;
+import org.apache.flink.table.runtime.operators.sort.RankOperator;
+import org.apache.flink.table.runtime.typeutils.InternalTypeInfo;
+import org.apache.flink.table.types.logical.LogicalType;
+import org.apache.flink.table.types.logical.RowType;
+
+import java.util.Collections;
+import java.util.stream.IntStream;
+
+/**
+ * Batch physical ExecNode for Rank.
+ *
+ * <p>This node supports two-stage(local and global) rank to reduce data-shuffling.
+ */
+public class BatchExecRank extends ExecNodeBase<RowData> implements BatchExecNode<RowData> {
+
+    private final int[] partitionFields;
+    private final int[] sortFields;
+    private final long rankStart;
+    private final long rankEnd;
+    private final boolean outputRankNumber;
+
+    public BatchExecRank(
+            int[] partitionFields,
+            int[] sortFields,
+            long rankStart,
+            long rankEnd,
+            boolean outputRankNumber,
+            ExecEdge inputEdge,
+            LogicalType outputType,
+            String description) {
+        super(Collections.singletonList(inputEdge), outputType, description);
+        this.partitionFields = partitionFields;
+        this.sortFields = sortFields;
+        this.rankStart = rankStart;
+        this.rankEnd = rankEnd;
+        this.outputRankNumber = outputRankNumber;
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    protected Transformation<RowData> translateToPlanInternal(PlannerBase planner) {
+
+        Transformation<RowData> input =
+                (Transformation<RowData>) getInputNodes().get(0).translateToPlan(planner);
+
+        RowType outputType = (RowType) getOutputType();
+        RowType inputType = (RowType) getInputNodes().get(0).getOutputType();
+
+        LogicalType[] partitionTypes =
+                IntStream.of(partitionFields)
+                        .mapToObj(inputType::getTypeAt)
+                        .toArray(LogicalType[]::new);
+        LogicalType[] sortTypes =
+                IntStream.of(sortFields).mapToObj(inputType::getTypeAt).toArray(LogicalType[]::new);
+
+        // operator needn't cache data
+        // The collation for the partition-by and order-by fields is inessential here,
+        // we only use the comparator to distinguish fields change.
+        RankOperator operator =
+                new RankOperator(
+                        ComparatorCodeGenerator.gen(
+                                planner.getTableConfig(),
+                                "PartitionByComparator",
+                                partitionFields,
+                                partitionTypes,
+                                new boolean[partitionFields.length],
+                                new boolean[partitionFields.length]),

Review comment:
       see the comment above, we just care field changes there, so we don't need to set orders and nullIsLasts.




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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641",
       "triggerID" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2409555b0a80fa8971a4cd502a2eeaada6668584",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11680",
       "triggerID" : "2409555b0a80fa8971a4cd502a2eeaada6668584",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d6898f2dc86d5aace855d67bad773ded1a137b12 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641) 
   * 2409555b0a80fa8971a4cd502a2eeaada6668584 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11680) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] godfreyhe commented on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-755299209


   Some changes are missed, such as: BatchExecRankRule should be renamed to BatchPhysicalRankRule, etc. I will fix them and merge the pr


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d9a698f4dc82ec429e3b2934afac81815d971e45 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383) 
   * fb616e97afc33ccbd931d353d8726de9778902f6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751660848


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 2409555b0a80fa8971a4cd502a2eeaada6668584 (Fri May 28 07:01:21 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641",
       "triggerID" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2409555b0a80fa8971a4cd502a2eeaada6668584",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11680",
       "triggerID" : "2409555b0a80fa8971a4cd502a2eeaada6668584",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2409555b0a80fa8971a4cd502a2eeaada6668584 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11680) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot commented on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751660848


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit d9a698f4dc82ec429e3b2934afac81815d971e45 (Mon Dec 28 10:11:45 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-20782).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d9a698f4dc82ec429e3b2934afac81815d971e45 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fb616e97afc33ccbd931d353d8726de9778902f6 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438) 
   * d6898f2dc86d5aace855d67bad773ded1a137b12 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fb616e97afc33ccbd931d353d8726de9778902f6 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] godfreyhe closed pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
godfreyhe closed pull request #14506:
URL: https://github.com/apache/flink/pull/14506


   


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



[GitHub] [flink] flinkbot commented on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d9a698f4dc82ec429e3b2934afac81815d971e45 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d9a698f4dc82ec429e3b2934afac81815d971e45 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383) 
   * fb616e97afc33ccbd931d353d8726de9778902f6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] wenlong88 commented on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
wenlong88 commented on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-755065891


   thanks for the review @godfreyhe , I have updated the pr to address the comments.


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



[GitHub] [flink] godfreyhe commented on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-755294216


   Thanks for the update, LGTM, I will merge this pr


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



[GitHub] [flink] flinkbot edited a comment on pull request #14506: [FLINK-20782][table-planner-blink] Separate implementation of BatchExecRank

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14506:
URL: https://github.com/apache/flink/pull/14506#issuecomment-751662858


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11383",
       "triggerID" : "d9a698f4dc82ec429e3b2934afac81815d971e45",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11438",
       "triggerID" : "fb616e97afc33ccbd931d353d8726de9778902f6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641",
       "triggerID" : "d6898f2dc86d5aace855d67bad773ded1a137b12",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d6898f2dc86d5aace855d67bad773ded1a137b12 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=11641) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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