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

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

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

    https://github.com/apache/phoenix/pull/154#discussion_r57663883
  
    --- Diff: 
phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java ---
    @@ -233,6 +233,34 @@ public void testDerivedTableWithWhere() throws 
Exception {
                 assertEquals(9,rs.getInt(1));
     
                 assertFalse(rs.next());
    +
    +            // Inner limit < outer query offset
    +            query = "SELECT t.eid, t.x + 9 FROM (SELECT entity_id eid, 
b_string b, a_byte + 1 x FROM aTable LIMIT 1 OFFSET 1 ) AS t WHERE t.b = '"
    +                    + C_VALUE + "' OFFSET 2";
    +            statement = conn.prepareStatement(query);
    +            rs = statement.executeQuery();
    +            assertFalse(rs.next());
    +
    +            // (offset) where
    +            query = "SELECT t.eid, t.x + 9 FROM (SELECT entity_id eid, 
b_string b, a_byte + 1 x FROM aTable WHERE a_byte + 1 < 9 OFFSET 2) AS t";
    --- End diff --
    
    This is (offset where) rather than (offset) where. I think it would make 
more sense to test "(offset) where" here.


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

Reply via email to