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

Francis Chuang commented on CALCITE-1181:
-----------------------------------------

Hey Josh,

Thanks for clarifying. I think it would be useful to add that bit of 
information about {{maxRowCount}} to the documentation. I was under the 
impression that it is used to define how many rows you will get back per frame, 
rather than the total number rows for the whole query as the LIMIT clause tends 
to be used in SQL-like languages to limit the result set.

I would love to contribute a unit case, but unfortunately, I have no experience 
writing Java or a dev environment set up for it. However, the original post of 
my issue contains a few quick sets to set up some dummy data and a few curl 
commands to reproduce the issue.

Let me know if there's more I can do to help :)

> FetchResponse always return no rows
> -----------------------------------
>
>                 Key: CALCITE-1181
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1181
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: avatica-1.7.1
>         Environment: HBase 1.1 and Phoenix 4.7.0, HBase 1.1 and Phoenix 
> 4.8.0-SNAPSHOT
>            Reporter: Francis Chuang
>            Assignee: Julian Hyde
>
> Assuming I have a table called my_table which is created and seeded like so:
> {code:sql}
> CREATE TABLE my_table (k BIGINT PRIMARY KEY, v VARCHAR) TRANSACTIONAL=true
> UPSERT INTO my_table VALUES (1,'A')
> UPSERT INTO my_table VALUES (2,'B')
> {code}
> I have 2 rows in the table. If I query the table using SELECT * FROM 
> my_table, and request a maxRowCount of 1, using FetchRequest to request 
> further rows always returns 0 rows.
> For ease of reproduction, I have included CURL commands (avatica will need to 
> have serialization set to JSON):
> {code}
> curl localhost:8765 -XPOST --data '{"request": 
> "openConnection","connectionId": "my-conn"}'
> curl localhost:8765 -XPOST --data '{"request": 
> "createStatement","connectionId": "my-conn"}'
> curl localhost:8765 -XPOST --data '{"request": 
> "prepareAndExecute","connectionId": "my-conn","statementId": 12345,"sql": 
> "SELECT * FROM my_table","maxRowCount": 1}' # update the statementId
> curl localhost:8765 -XPOST --data '{"request": "fetch","connectionId": 
> "my-conn","statementId": 12345,"offset": 0,"fetchMaxRowCount": 1}' # update 
> the statementId
> {code}



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

Reply via email to