Empty results when using parameters

Create issue
Issue #13 closed
Olivier Beiler created an issue


First, thanks a lot for your work, it's quite useful :).

It seems I have encountered a similar issue than #5 which occurs anytime I use parameters with my request.

Here is a sample code reproducing it (Phoenix has been loaded with the sample dataset available here, and I'm using I'm Phoenix 4.8.2, HBase 1.2.3 and phoenixdb 0.5 retrieved from pip).

import phoenixdb

database_url = 'http://myserver:8765/'
conn = phoenixdb.connect(database_url, autocommit=True)

cursor = conn.cursor()

print cursor.fetchall()
# Works fine: returns [[u'CA', u'Los Angeles', 3844829L], [u'IL', u'Chicago', 2842518L], [u'NY', u'New York', 8143197L], [u'TX', u'Houston', 2016582L]]

cursor.execute('SELECT * FROM US_POPULATION WHERE POPULATION>?',[2000000,])
print cursor.fetchall()
# Doesn't work: returns []

I tried to implement the solution from Issue#5 and set maxRowsInFirstFrame to -1. But from what I understood, with Avatica Protocol Buffer interface, this parameter is only available for PrepareAndExecuteRequest and not for ExecuteRequest method (the one used in my case).

Do you have any idea how to solve it?

Thanks a lot.

Comments (3)

  1. Log in to comment