Browse Source

Fixed error when no results for Druid

Andrew Kane 6 năm trước cách đây
mục cha
commit
120cd8f9f6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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