rbhive
rbhive copied to clipboard
Can't get results from fetches
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.
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.
Yep, confirmed that using version 12 works. Thanks.
On Tue, Dec 1, 2015 at 3:11 PM, Lloyd Pick [email protected] 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.
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.