GitHub user fhueske opened a pull request:

    https://github.com/apache/flink/pull/4813

    [FLINK-7821] [table] Deprecate Table.limit() and replace it by 
Table.offset() and Table.fetch().

    ## What is the purpose of the change
    
    - `Table.limit(n)` has unexpected semantics of returning all but the first 
`n` rows.
    - Returning the first `n` rows from a sorted result requires to specify a 0 
offset (`table.orderBy(...).limit(0, n)`) which is more complicated than 
necessary.
    
    ## Brief change log
    
    - deprecate `Table.limit()` and replace it by `Table.offset()` and 
`Table.fetch()`
    
    ## Verifying this change
    
    - existing tests for `limit` were adapted for `offset` and `fetch`.
    
    ## 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**
    
    ## Documentation
    
    - Documentation was adapted.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/fhueske/flink tableOffsetFetch

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4813.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4813
    
----
commit 7b1e3cb03a8e863699940b152f727551c2d43ea0
Author: Fabian Hueske <fhue...@apache.org>
Date:   2017-10-12T08:56:19Z

    [FLINK-7821] [table] Deprecate Table.limit() and replace it by 
Table.offset() and Table.fetch().

----


---

Reply via email to