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/01/10 08:13:24 UTC

[GitHub] [flink] beyond1920 opened a new pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

beyond1920 opened a new pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823
 
 
   ## What is the purpose of the change
   
   As we described in the doc: https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/table/sql.html#top-n
   
   When rank number is not required, we can reduce some output, like unnecessary retract messages. 
   
   However the optimization does not work for Retractable topN before, the pr aims to resolve the issue.
   
   ## Brief change log
   
     - Update Retractable TopN function
     - Add UT
   
   ## Verifying this change
   
   UT
   
   ## 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, 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? (not applicable)
   

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

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144454573 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   * c57927e992beddecbb3eb93d71919b08abc469a7 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144454573) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   * c57927e992beddecbb3eb93d71919b08abc469a7 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144454573 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c3e59d245648911d90c7c8488fc8e810e8ff6339 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145170969 TriggerType:PUSH TriggerID:c3e59d245648911d90c7c8488fc8e810e8ff6339
   Hash:c3e59d245648911d90c7c8488fc8e810e8ff6339 Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4498 TriggerType:PUSH TriggerID:c3e59d245648911d90c7c8488fc8e810e8ff6339
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   * c57927e992beddecbb3eb93d71919b08abc469a7 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144454573) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353) 
   * c3e59d245648911d90c7c8488fc8e810e8ff6339 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145170969) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4498) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572922918
 
 
   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 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 (Fri Jan 10 08:15:18 UTC 2020)
   
   **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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
wuchong commented on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-575960009
 
 
   @beyond1920  build is failed in compile stage. 

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

[GitHub] [flink] beyond1920 commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
beyond1920 commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#discussion_r366692026
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/operators/rank/RetractableTopNFunctionTest.java
 ##########
 @@ -209,12 +301,12 @@ public void testDisableGenerateRetraction() throws Exception {
 		List<Object> expectedOutput = new ArrayList<>();
 		expectedOutput.add(record("book", 1L, 12));
 		expectedOutput.add(record("book", 2L, 19));
-		expectedOutput.add(record("book", 1L, 12));
 		expectedOutput.add(record("book", 4L, 11));
+		expectedOutput.add(deleteRecord("book", 2L, 19));
 
 Review comment:
   make sense.

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

[GitHub] [flink] wuchong commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#discussion_r368262485
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/rank/RetractableTopNFunction.java
 ##########
 @@ -374,10 +381,10 @@ private void retractRecordWithoutRowNumber(
 			} else if (findsSortKey) {
 				long count = entry.getValue();
 				long tmpRank = curRank + count;
-				if (isInRankEnd(tmpRank)) {
+				if (tmpRank < rankEnd) {
 
 Review comment:
   Could you add some comments on this? IIUC, this is for padding the last entry because we retract a entry from the top-n. 
   Besides, could you improve the local field name of `tmpRank`? It's not easy to understand what the rank it is.

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

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144454573 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c3e59d245648911d90c7c8488fc8e810e8ff6339 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/145170969 TriggerType:PUSH TriggerID:c3e59d245648911d90c7c8488fc8e810e8ff6339
   Hash:c3e59d245648911d90c7c8488fc8e810e8ff6339 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4498 TriggerType:PUSH TriggerID:c3e59d245648911d90c7c8488fc8e810e8ff6339
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   * c57927e992beddecbb3eb93d71919b08abc469a7 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144454573) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353) 
   * c3e59d245648911d90c7c8488fc8e810e8ff6339 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/145170969) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4498) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] beyond1920 commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
beyond1920 commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#discussion_r366692062
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/RankITCase.scala
 ##########
 @@ -1311,4 +1311,49 @@ class RankITCase(mode: StateBackendMode) extends StreamingWithStateTestBase(mode
     assertEquals(expected2.sorted, sink2.getRetractResults.sorted)
   }
 
+  @Test
+  def testRetractRank(): Unit = {
 
 Review comment:
   done

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

[GitHub] [flink] wuchong merged pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823
 
 
   

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

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144454573 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c3e59d245648911d90c7c8488fc8e810e8ff6339 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:c3e59d245648911d90c7c8488fc8e810e8ff6339
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   * c57927e992beddecbb3eb93d71919b08abc469a7 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144454573) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353) 
   * c3e59d245648911d90c7c8488fc8e810e8ff6339 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


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#discussion_r365800715
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/RankITCase.scala
 ##########
 @@ -1311,4 +1311,49 @@ class RankITCase(mode: StateBackendMode) extends StreamingWithStateTestBase(mode
     assertEquals(expected2.sorted, sink2.getRetractResults.sorted)
   }
 
+  @Test
+  def testRetractRank(): Unit = {
 
 Review comment:
   Could you use `testTopNWithGroupByAvgWithoutRowNumber` to verify this which already have a meaningful testing data? 

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

[GitHub] [flink] wuchong commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#discussion_r365803632
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/operators/rank/RetractableTopNFunctionTest.java
 ##########
 @@ -209,12 +301,12 @@ public void testDisableGenerateRetraction() throws Exception {
 		List<Object> expectedOutput = new ArrayList<>();
 		expectedOutput.add(record("book", 1L, 12));
 		expectedOutput.add(record("book", 2L, 19));
-		expectedOutput.add(record("book", 1L, 12));
 		expectedOutput.add(record("book", 4L, 11));
+		expectedOutput.add(deleteRecord("book", 2L, 19));
 
 Review comment:
   We should emit delete/retract record first, then emit accumulate record. Otherwise, there might be some problems, e.g. user may see instantly incorrect results (top3 but see top4 at some point of time).
   

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

[GitHub] [flink] flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10823: [FLINK-15497][table-planner-blink] Reduce outputs when rank number is not required in Retractable topN
URL: https://github.com/apache/flink/pull/10823#issuecomment-572926510
 
 
   <!--
   Meta data
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/143855378 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249 TriggerType:PUSH TriggerID:98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/144454573 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c57927e992beddecbb3eb93d71919b08abc469a7 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353 TriggerType:PUSH TriggerID:c57927e992beddecbb3eb93d71919b08abc469a7
   Hash:c3e59d245648911d90c7c8488fc8e810e8ff6339 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/145170969 TriggerType:PUSH TriggerID:c3e59d245648911d90c7c8488fc8e810e8ff6339
   Hash:c3e59d245648911d90c7c8488fc8e810e8ff6339 Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4498 TriggerType:PUSH TriggerID:c3e59d245648911d90c7c8488fc8e810e8ff6339
   -->
   ## CI report:
   
   * 98b6f5aa1f7623e1aba1d1531a0a2973dbdc5873 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/143855378) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4249) 
   * c57927e992beddecbb3eb93d71919b08abc469a7 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/144454573) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4353) 
   * c3e59d245648911d90c7c8488fc8e810e8ff6339 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/145170969) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4498) 
   
   <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


With regards,
Apache Git Services