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 14:39:20 GMT

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

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

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

    https://github.com/apache/flink/pull/2282#discussion_r73349912
  
    --- 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 --
    
    I agree that just `limit()` is nicer for the table API. In our SQL it is still `OFFSET
<> FETCH <>`, correct? There's a tradeoff between making the table API more nicer
and keeping it in line with SQL.
    
    I personally would err on the side of making the table API nicer but that's just personal
preference, IMHO.


> 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