[jira] [Created] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)
Francis Chuang created CALCITE-1181:
---

 Summary: 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
Reporter: Francis Chuang
Assignee: Julian Hyde


Assuming I have a table called my_table which is created and seeded like so:

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

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

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



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


[jira] [Updated] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang updated CALCITE-1181:

Description: 
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}

  was:
Assuming I have a table called my_table which is created and seeded like so:

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

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

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


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


[jira] [Created] (CALCITE-1182) Add ProjectRemoveRule to pre-processing program of materialization substitution

2016-04-03 Thread Maryann Xue (JIRA)
Maryann Xue created CALCITE-1182:


 Summary: Add ProjectRemoveRule to pre-processing program of 
materialization substitution
 Key: CALCITE-1182
 URL: https://issues.apache.org/jira/browse/CALCITE-1182
 Project: Calcite
  Issue Type: Improvement
  Components: core
Reporter: Maryann Xue
Assignee: Maryann Xue
Priority: Minor


In VolcanoPlanner, we apply a simple pre-processing hep program to normalize 
the "target" and "query" rels before materialization substitution. Currently 
this program runs with two rules: FilterProjectTransposeRule and 
ProjectMergeRule.
We need an extra rule ProjectRemoveRule for the Phoenix use case where a 
secondary index (modeled as materialized views) is defined on a view so the 
materialized view "queryRel" may have an identity projection introduced by this 
view.



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


[jira] [Commented] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Julian Hyde (JIRA)

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

Julian Hyde commented on CALCITE-1181:
--

Maybe some rows are being returned in the response to {{prepareAndExecute}}?

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


[jira] [Commented] (CALCITE-1182) Add ProjectRemoveRule to pre-processing program of materialization substitution

2016-04-03 Thread Julian Hyde (JIRA)

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

Julian Hyde commented on CALCITE-1182:
--

Makes sense. A unit test would make it clearer.

> Add ProjectRemoveRule to pre-processing program of materialization 
> substitution
> ---
>
> Key: CALCITE-1182
> URL: https://issues.apache.org/jira/browse/CALCITE-1182
> Project: Calcite
>  Issue Type: Improvement
>  Components: core
>Reporter: Maryann Xue
>Assignee: Maryann Xue
>Priority: Minor
>  Labels: materializedviews, phoenix
>
> In VolcanoPlanner, we apply a simple pre-processing hep program to normalize 
> the "target" and "query" rels before materialization substitution. Currently 
> this program runs with two rules: FilterProjectTransposeRule and 
> ProjectMergeRule.
> We need an extra rule ProjectRemoveRule for the Phoenix use case where a 
> secondary index (modeled as materialized views) is defined on a view so the 
> materialized view "queryRel" may have an identity projection introduced by 
> this view.



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


[jira] [Commented] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang commented on CALCITE-1181:
-

In `prepareAndExecute`, I get 1 row back (the select statement should return 2 
rows) and `done` is false.
When I use `fetch` to fetch the remaining row, `done` is false, but the array 
of rows is empty.

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


[jira] [Comment Edited] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang edited comment on CALCITE-1181 at 4/3/16 9:52 PM:
-

In {code}prepareAndExecute{code}, I get 1 row back (the select statement should 
return 2 rows) and {code}done{code} is false.
When I use {code}fetch{code} to fetch the remaining row, {code}done{code} is 
false, but the array of rows is empty.


was (Author: francischuang):
In `prepareAndExecute`, I get 1 row back (the select statement should return 2 
rows) and `done` is false.
When I use `fetch` to fetch the remaining row, `done` is false, but the array 
of rows is empty.

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


[jira] [Comment Edited] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang edited comment on CALCITE-1181 at 4/3/16 9:53 PM:
-

In {{prepareAndExecute}}, I get 1 row back (the select statement should return 
2 rows) and {{done}} is false.
When I use {[fetch}} to fetch the remaining row, {{done}} is false, but the 
array of rows is empty.


was (Author: francischuang):
In {code}prepareAndExecute{code}, I get 1 row back (the select statement should 
return 2 rows) and {code}done{code} is false.
When I use {code}fetch{code} to fetch the remaining row, {code}done{code} is 
false, but the array of rows is empty.

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


[jira] [Comment Edited] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang edited comment on CALCITE-1181 at 4/3/16 9:53 PM:
-

In {{prepareAndExecute}}, I get 1 row back (the select statement should return 
2 rows) and {{done}} is false.
When I use {{fetch}} to fetch the remaining row, {{done}} is false, but the 
array of rows is empty.


was (Author: francischuang):
In {{prepareAndExecute}}, I get 1 row back (the select statement should return 
2 rows) and {{done}} is false.
When I use {[fetch}} to fetch the remaining row, {{done}} is false, but the 
array of rows is empty.

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


[jira] [Comment Edited] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang edited comment on CALCITE-1181 at 4/3/16 9:55 PM:
-

In {{prepareAndExecute}}, I get 1 row back (the select statement should return 
2 rows) and {{done}} is false.
When I use {{fetch}} to fetch the remaining row, {{done}} is true, but the 
array of rows is empty.


was (Author: francischuang):
In {{prepareAndExecute}}, I get 1 row back (the select statement should return 
2 rows) and {{done}} is false.
When I use {{fetch}} to fetch the remaining row, {{done}} is false, but the 
array of rows is empty.

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


[jira] [Updated] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang updated CALCITE-1181:

Environment: HBase 1.1 and Phoenix 4.7.0, HBase 1.1 and Phoenix 
4.8.0-SNAPSHOT  (was: HBase 1.1 and Phoenix 4.7.0)

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


[jira] [Commented] (CALCITE-1181) FetchResponse always return no rows

2016-04-03 Thread Francis Chuang (JIRA)

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

Francis Chuang commented on CALCITE-1181:
-

I just tested Phoenix 4.8.0-SNAPSHOT which uses avatica 1.7.1 and it also 
exhibits the same problem.

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