forward3d / rbhive

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

Raise error when async_execute failed. #41

Closed ojima-h closed 8 years ago

ojima-h commented 8 years ago

I tried async_execute. When invalid SQL is passed, async_execute does not raise an exception about Hive but NoMethodError.

[8] pry(main)> handles = connnection.async_execute("something wrong")                                       
Executing query asynchronously: something wrong
NoMethodError: undefined method `operationId' for nil:NilClass
from /home/ojima-h/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rbhive-1.0.3.pre/lib/rbhive/t_c_l_i_connection.rb:206:in `async_execute'

So, I called raise_error_if_failed before retrieving operationHandle.

Thank you.