forward3d / rbhive

Ruby gem for querying Apache Hive
http://www.forward3d.com
MIT License
98 stars 75 forks source link

Can't get results from fetches #38

Open aub opened 8 years ago

aub commented 8 years ago

I'm connecting to a spark-sql thrift server, which supports the HiveServer2 protocol. When I make queries using fetch, I can see that the data is returned, but it is in fetch_results.results.columns rather than fetch_results.results.rows, so the code always returns an empty array. Is this a known issue? Perhaps it's only a problem for spark-sql? I'd be happy to submit a patch, but it's unclear from some of the comments here if the gem is currently working for queries.

lloydpick commented 8 years ago

This is probably related to the columnar data return, rbhive doesn't currently support this behaviour correctly. You can try setting the hive_version to 12 when you connect and that might solve your problem. I can't test this myself unfortunately.

aub commented 8 years ago

Yep, confirmed that using version 12 works. Thanks.

On Tue, Dec 1, 2015 at 3:11 PM, Lloyd Pick notifications@github.com wrote:

This is probably related to the columnar data return, rbhive doesn't currently support this behaviour correctly. You can try setting the hive_version to 12 when you connect and that might solve your problem. I can't test this myself unfortunately.

— Reply to this email directly or view it on GitHub https://github.com/forward3d/rbhive/issues/38#issuecomment-161081845.

pyro2927 commented 8 years ago

Have the same issue when running hive 0.13, need to specify hive_version: 12 in the connection. @lloydpick is this on a roadmap to be fixed, or can you point to the code in where the problem may lie? I wouldn't mind attempting to giving it a go in fixing it.