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/07/15 09:28:56 UTC

[GitHub] [flink] twalthr opened a new pull request #12904: [FLINK-18569][table] Support limit() for unordered tables

twalthr opened a new pull request #12904:
URL: https://github.com/apache/flink/pull/12904


   ## What is the purpose of the change
   
   Removes the limitation for `offset/fetch` on unbounded tables in Table API. It also improves the documentation.
   
   ## Brief change log
   
   - Remove check for streaming mode in `SortOperationFactory`
   - Add a shortcut in Java Table API to easily find the `limit()` operation
   - Improve documentation
   
   ## Verifying this change
   
   This change is already covered by existing tests, such as `LimitITCase`
   
   ## 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)`: yes
     - 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? yes
     - If yes, how is the feature documented? docs
   


----------------------------------------------------------------
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] twalthr commented on pull request #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   Thanks @aljoscha and @KurtYoung. I hope I could address your feedback. I will merge this once the build is green.


----------------------------------------------------------------
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] KurtYoung commented on a change in pull request #12904: [FLINK-18569][table] Support limit() for unordered tables

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



##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/table/validation/SortValidationTest.scala
##########
@@ -26,22 +26,6 @@ import org.junit._
 
 class SortValidationTest extends TableTestBase {
 
-  @Test(expected = classOf[ValidationException])

Review comment:
        We could activate these tests instead of deleting them?




----------------------------------------------------------------
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] twalthr closed pull request #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   


----------------------------------------------------------------
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] aljoscha commented on a change in pull request #12904: [FLINK-18569][table] Support limit() for unordered tables

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



##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/OperationTreeBuilder.java
##########
@@ -402,19 +402,20 @@ private ResolvedExpression resolveSingleExpression(Expression expression, Expres
 	}
 
 	public QueryOperation sort(List<Expression> fields, QueryOperation child) {
-
 		ExpressionResolver resolver = getResolver(child);
 		List<ResolvedExpression> resolvedFields = resolver.resolve(fields);
 
 		return sortOperationFactory.createSort(resolvedFields, child, resolver.postResolverFactory());
 	}
 
 	public QueryOperation limitWithOffset(int offset, QueryOperation child) {
-		return sortOperationFactory.createLimitWithOffset(offset, child);
+		ExpressionResolver resolver = getResolver(child);

Review comment:
       You would have to explain to me why this is necessary. 😅 




----------------------------------------------------------------
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 #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4efba99139063f911fb977ad1d1ef8562fe982d3 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 #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529",
       "triggerID" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40d048a077885f435381c372eab315a276908ad8",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4538",
       "triggerID" : "40d048a077885f435381c372eab315a276908ad8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40d048a077885f435381c372eab315a276908ad8 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4538) 
   
   <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 #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529",
       "triggerID" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40d048a077885f435381c372eab315a276908ad8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4538",
       "triggerID" : "40d048a077885f435381c372eab315a276908ad8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4efba99139063f911fb977ad1d1ef8562fe982d3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529) 
   * 40d048a077885f435381c372eab315a276908ad8 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4538) 
   
   <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 #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   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 4efba99139063f911fb977ad1d1ef8562fe982d3 (Wed Jul 15 09:31:28 UTC 2020)
   
   **Warnings:**
    * Documentation files were touched, but no `.zh.md` files: Update Chinese documentation or file Jira ticket.
   
   
   <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 #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529",
       "triggerID" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4efba99139063f911fb977ad1d1ef8562fe982d3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529) 
   
   <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 #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529",
       "triggerID" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "40d048a077885f435381c372eab315a276908ad8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "40d048a077885f435381c372eab315a276908ad8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4efba99139063f911fb977ad1d1ef8562fe982d3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529) 
   * 40d048a077885f435381c372eab315a276908ad8 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 #12904: [FLINK-18569][table] Support limit() for unordered tables

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529",
       "triggerID" : "4efba99139063f911fb977ad1d1ef8562fe982d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4efba99139063f911fb977ad1d1ef8562fe982d3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4529) 
   
   <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] twalthr commented on a change in pull request #12904: [FLINK-18569][table] Support limit() for unordered tables

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



##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/table/validation/SortValidationTest.scala
##########
@@ -26,22 +26,6 @@ import org.junit._
 
 class SortValidationTest extends TableTestBase {
 
-  @Test(expected = classOf[ValidationException])

Review comment:
       The fetch is activated in the `LimitITCase`. I will add a offset test as well there.




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