forward3d / rbhive

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

Remove duplicate :bigint entry and return nil for NULL Hive values #26

Closed 4ndypanda closed 8 years ago

4ndypanda commented 9 years ago

We must merge https://github.com/forward3d/rbhive/pull/22 in order to see the benefit of this change.

If the results from Hive are in their correct Ruby types, then the current code will call conversion_method ? value.send(conversion_method) : value to determine what value is returned to the result set. However, if value is nil, then calling the conversion_method on nil will create default values such as 0 and empty string.

robertino commented 8 years ago

See commits: https://github.com/forward3d/rbhive/commit/42e1fb570fa20bfa7382a710be68e3e929b42afe https://github.com/forward3d/rbhive/commit/5858f8d8ab99709fba9eeb436c09363a1f3d9993