Browse Source

Revert "Updated for latest drill client"

This reverts commit e5652dc805b7007321583c09b5bdf74415c8d02c.
Andrew Kane 7 years ago
parent
commit
617f4ae918
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/blazer/adapters/drill_adapter.rb

+ 2 - 2
lib/blazer/adapters/drill_adapter.rb

@@ -9,8 +9,8 @@ module Blazer
         begin
           # remove trailing semicolon
           response = drill.query(statement.sub(/;\s*\z/, ""))
-          columns = response["columns"]
-          rows = response["rows"].map { |r| columns.map { |c| r[c] } }
+          rows = response.map { |r| r.values }
+          columns = rows.any? ? response.first.keys : []
         rescue => e
           error = e.message
         end