phoenix-dev 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] (PHOENIX-2722) support mysql "limit,offset" clauses
Date Tue, 05 Apr 2016 15:24:25 GMT

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

ASF GitHub Bot commented on PHOENIX-2722:
-----------------------------------------

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

    https://github.com/apache/phoenix/pull/154#discussion_r58558564
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/compile/SubselectRewriter.java
---
    @@ -188,6 +190,13 @@ private SelectStatement flatten(SelectStatement select, SelectStatement
subselec
                 }
             }
             
    +        OffsetNode offset = select.getOffset();
    +        if (offsetRewrite != null || (limitRewrite != null & offset != null)) {
    --- End diff --
    
    Based on this not being caught by one of your new unit tests, I'd say that there's likely
a hole in the test coverage. Would you mind adding a unit test that would have caught this?


> support mysql "limit,offset" clauses 
> -------------------------------------
>
>                 Key: PHOENIX-2722
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2722
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Ankit Singhal
>            Assignee: Ankit Singhal
>            Priority: Minor
>         Attachments: PHOENIX-2722.patch, PHOENIX-2722_formatted.patch
>
>
> For serial query(query with “serial" hint or  “limit" without "order by”), we can
limit each scan(using page filter) to “limit+offset” instead of limit earlier.
> And then, for all queries, we can forward the relevant client iterators to the offset
provided and then return the result.
> syntax
> {code}
> [ LIMIT { count } ]
>     [ OFFSET start [ ROW | ROWS ] ]
>     [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
> {code}
> Some new keywords(OFFSET,FETCH,ROW, ROWS,ONLY) are getting introduced so users might
need to see that they are not using them as column name or something.
> WDYT, [~jamestaylor]



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

Mime
View raw message