forward3d / rbhive

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

Limitation to send commands (create/drop table, select...) for different databases #35

Open barata opened 9 years ago

barata commented 9 years ago

I was looking into your code and found out that you don't support to execute commands in different databases without a "USE [dbname]". If we don't set one, Hive will assume 'default' database. It is kind of ugly to require users to send a 'use [dbname]' every time s/he open a connection to HiveServer in a different database. It would be nice to have something like:

RBHive.tcli_connect('hive.server.address', 10_000, 'dbname') do |connection|
  connection.fetch('SHOW TABLES')
end

Please let me know if you want me to make a PR.

jyothu commented 7 years ago

Is this implemented ?