Selaa lähdekoodia

Fixed error when no results for Druid

Andrew Kane 6 vuotta sitten
vanhempi
commit
120cd8f9f6
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lib/blazer/adapters/druid_adapter.rb

+ 1 - 1
lib/blazer/adapters/druid_adapter.rb

@@ -30,7 +30,7 @@ module Blazer
               error = Blazer::TIMEOUT_MESSAGE
             end
           else
-            columns = response.first.keys || []
+            columns = (response.first || {}).keys
             rows = response.map { |r| r.values }
 
             # Druid doesn't return column types