Skip to content

Commit

Permalink
Do not attempt to coerce a value when NULL (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
til committed Sep 21, 2021
1 parent 0fb3e7f commit 6859fa3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/blazer/adapters/athena_adapter.rb
Expand Up @@ -62,19 +62,19 @@ def run_statement(statement, comment)
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
Expand Down

0 comments on commit 6859fa3

Please sign in to comment.