Skip to content

Business intelligence made simple

Do not attempt to coerce a value when NULL (#353)

Tilmann Singer6859fa3160a2
diff --git a/lib/blazer/adapters/athena_adapter.rb b/lib/blazer/adapters/athena_adapter.rb
index 31c118ce..33ba6a5e 100644
--- a/lib/blazer/adapters/athena_adapter.rb
+++ b/lib/blazer/adapters/athena_adapter.rb
@@ -62,19 +62,19 @@ module Blazer
case ct
when "timestamp"
rows.each do |row|
- row[i] = utc.parse(row[i])
+ row[i] &&= utc.parse(row[i])
end
when "date"
rows.each do |row|
- row[i] = Date.parse(row[i])
+ row[i] &&= Date.parse(row[i])
end
when "bigint"
rows.each do |row|
- row[i] = row[i].to_i
+ row[i] &&= row[i].to_i
end
when "double"
rows.each do |row|
- row[i] = row[i].to_f
+ row[i] &&= row[i].to_f
end
end
end