lib/impala/cursor.rb in impala-0.1.0 vs lib/impala/cursor.rb in impala-0.1.1

- old
+ new

@@ -71,14 +71,26 @@ row end def convert_raw_value(value, schema) + return nil if value == 'NULL' + case schema.type when 'string' value + when 'boolean' + if value == 'true' + true + elsif value == 'false' + false + else + raise "Invalid value for boolean: #{value}" + end when 'tinyint', 'int', 'bigint' value.to_i + when 'double' + value.to_f else raise "Unknown type: #{schema.type}" #TODO end end end \ No newline at end of file