You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by "Michael.Calvin" <77...@qq.com> on 2014/08/05 05:36:45 UTC

Can I get row No.X with Phoeix?

"SELECT MAX(id) FROM table LIMIT X" doesn't work, it returns the last id of whole table.‍‍
"SELECT MAX(id) FROM table ORDER BY id‍ LIMIT X" throws an exepction I don't Understand : "Aggregate may not contain columns not in GROUP BY. ID". Aggregate should work without phrase "GROUP BY". Maybe there's a bug parsing this command. Same happends without phrase "LIMIT X".
‍‍
I know there's no such concept of row number in hbase, what about phoenix ?


------------------
Michael.Calvin.Shi

Re: Can I get row No.X with Phoeix?

Posted by James Taylor <ja...@apache.org>.
Hi Michael,
Take a look at Paged Queries here:
http://phoenix.apache.org/paged.html as well as this email thread:
http://s.apache.org/Dct. Phoenix does not support the OFFSET keyword
in SQL and likely never will as it cannot be implemented efficiently.
Thanks,
James

On Mon, Aug 4, 2014 at 8:36 PM, Michael.Calvin <77...@qq.com> wrote:
> "SELECT MAX(id) FROM table LIMIT X" doesn't work, it returns the last id of
> whole table.‍‍
> "SELECT MAX(id) FROM table ORDER BY id‍ LIMIT X" throws an exepction I don't
> Understand : "Aggregate may not contain columns not in GROUP BY. ID".
> Aggregate should work without phrase "GROUP BY". Maybe there's a bug parsing
> this command. Same happends without phrase "LIMIT X".
> ‍‍
> I know there's no such concept of row number in hbase, what about phoenix ?
>
> ------------------
> Michael.Calvin.Shi
>