flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3940) Add support for ORDER BY OFFSET FETCH
Date Wed, 03 Aug 2016 07:25:20 GMT

    [ https://issues.apache.org/jira/browse/FLINK-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15405488#comment-15405488
] 

ASF GitHub Bot commented on FLINK-3940:
---------------------------------------

Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2282#discussion_r73291620
  
    --- Diff: docs/apis/table.md ---
    @@ -606,6 +606,28 @@ Table result = in.orderBy("a.asc");
           </td>
         </tr>
     
    +    <tr>
    +      <td><strong>Offset</strong></td>
    +      <td>
    +        <p>Similar to a SQL OFFSET clause. Returns rows from offset position. It
is technically part of the ORDER BY clause.</p>
    +{% highlight java %}
    +Table in = tableEnv.fromDataSet(ds, "a, b, c");
    +Table result = in.orderBy("a.asc").offset(3);
    +{% endhighlight %}
    +      </td>
    +    </tr>
    +    
    +    <tr>
    +      <td><strong>Fetch</strong></td>
    +      <td>
    +        <p>Similar to a SQL FETCH clause. Returns a set number of rows. FETCH can’t
be used by itself, it is used in conjunction with OFFSET.</p>
    --- End diff --
    
    IMO an immutable chain of `orderBy().offset().fetch()` is also not very beautiful. I prefer
`orderBy().limit()` as offset and fetch always belong together. Maybe we need a third opinion
here.
    @aljoscha which syntax do you prefer?


> Add support for ORDER BY OFFSET FETCH
> -------------------------------------
>
>                 Key: FLINK-3940
>                 URL: https://issues.apache.org/jira/browse/FLINK-3940
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>    Affects Versions: 1.1.0
>            Reporter: Fabian Hueske
>            Assignee: GaoLun
>            Priority: Minor
>
> Currently only ORDER BY without OFFSET and FETCH are supported.
> This issue tracks the effort to add support for OFFSET and FETCH and involves:
> - Implementing the execution strategy in `DataSetSort`
> - adapting the `DataSetSortRule` to support OFFSET and FETCH
> - extending the Table API and validation to support OFFSET and FETCH and generate a corresponding
RelNode.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message