[ 
https://issues.apache.org/jira/browse/PHOENIX-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Samarth Jain reassigned PHOENIX-2842:
-------------------------------------

    Assignee: Samarth Jain  (was: Ankit Singhal)

> Queries with offset shouldn't be using Spooling and chunked result iterators
> ----------------------------------------------------------------------------
>
>                 Key: PHOENIX-2842
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2842
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>
> While reworking our serial queries for PHOENIX-2724, I noticed that queries 
> with offset are always using SpoolingResultIterator and ChunkedResultIterator 
> when there is no non-row key order by. 
> In ScanPlan.java
> {code}
> private static ParallelIteratorFactory 
> buildResultIteratorFactory(StatementContext context, FilterableStatement 
> statement,
>             TableRef table, OrderBy orderBy, Integer limit,Integer offset, 
> boolean allowPageFilter) throws SQLException {
>         if ((isSerial(context, statement, table, orderBy, limit, offset, 
> allowPageFilter)
>                 || ScanUtil.isRoundRobinPossible(orderBy, context) || 
> ScanUtil.isPacingScannersPossible(context))
>                 && *offset == null*) { return 
> ParallelIteratorFactory.NOOP_FACTORY; }
> {code}
> Spooling and chunking is deprecated. So the code shouldn't be relying on them 
> to be used always. Removing the offset != null check, unfortunately causes 
> tests to fail in QueryWithOffsetIT.java. This is because if we don't create 
> chunked result iterators, server side scanners are not getting advanced up to 
> the offset. 
> [~ankit.singhal] - can you please check?  



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

Reply via email to