lib/impala/cursor.rb in impala-0.4.2 vs lib/impala/cursor.rb in impala-0.4.3
- old
+ new
@@ -85,11 +85,11 @@
def fetch_batch
raise CursorError.new("Cursor has expired or been closed") unless @open
begin
res = @service.fetch(@handle, false, BUFFER_SIZE)
- rescue Protocol::Beeswax::BeeswaxException => e
+ rescue Protocol::Beeswax::BeeswaxException
@open = false
raise CursorError.new("Cursor has expired or been closed")
end
rows = res.data.map { |raw| parse_row(raw) }
@@ -127,10 +127,10 @@
else
raise ParsingError.new("Invalid value for boolean: #{value}")
end
when 'tinyint', 'smallint', 'int', 'bigint'
value.to_i
- when 'double', 'float'
+ when 'double', 'float', 'decimal'
value.to_f
when "timestamp"
Time.parse(value)
else
raise ParsingError.new("Unknown type: #{schema.type}")