[
https://issues.apache.org/jira/browse/PHOENIX-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648604#comment-16648604
]
Thomas D'Silva edited comment on PHOENIX-172 at 10/13/18 12:02 AM:
-------------------------------------------------------------------
[~lhofhansl] I was looking through this JIRA and saw that you came up with the
original suggestion to support paging through data using row value
constructors. I don't think this works if the pk columns are in mixed sort
order. For example if we have a
table with A desc, B asc with the following data:
{code}
A (desc), B (asc)
c , 1
b , 1
b , 2
b , 3
a , 2
{code}
If the last row that was read was ('b',2) and we query with RVC WHERE (A, B) <
('b',2) the following rows would be returned
{code}
('b',1)
('a',2)
{code}
We wouldn't want ('b',1) to be returned. I think we can only use RVCs to page
through data if the sort order of the pk columns is the same, WDYT?
FYI [[email protected]], [~dbwong]
was (Author: tdsilva):
[~lhofhansl] I was looking through this JIRA and saw that you came up with the
original suggestion to support paging through data using row value
constructors. I don't think this works if the pk columns are in mixed sort
order. For example if we have a
table with A desc, B asc with the following data:
{code}
A (desc), B (asc)
c , 1
b , 1
b , 2
b , 3
a , 2
{code}
If the last row that was read was ('b',2) and we query with RVC WHERE (A, B) <
('b',2) the following rows would be returned
{code}
('b',1)
('a',2)
{code}
We wouldn't want ('b',1) to be returned. I think we can only use RVCs to page
through data if the sort order of the pk columns is the same, WDYT?
> Support the ability for a client to do query more
> -------------------------------------------------
>
> Key: PHOENIX-172
> URL: https://issues.apache.org/jira/browse/PHOENIX-172
> Project: Phoenix
> Issue Type: Task
> Affects Versions: 2.1.0
> Reporter: James Taylor
> Assignee: Samarth Jain
> Labels: enhancement
>
> Clients often need the ability to "page" through query results that have more
> row results than are displayable on a single screen. SQL provides LIMIT and
> OFFSET which is often used for this purpose, however supporting OFFSET in a
> performant manner is not possible with HBase. Instead, an alternate way of
> supporting query-more functionality (suggested by @larsh) is through [row
> values
> constructors](http://publib.boulder.ibm.com/infocenter/soliddb/v6r3/index.jsp?topic=/com.ibm.swg.im.soliddb.sql.doc/doc/row.value.constructors.html)
> which has been in the SQL spec since SQL-92. It has PostGres support as
> well with the benefits explained well
> [here](https://wiki.postgresql.org/images/3/35/Pagination_Done_the_PostgreSQL_Way.pdf)
> .
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)