浏览代码

Updated for latest drill client

Andrew Kane 7 年之前
父节点
当前提交
e5652dc805
共有 1 个文件被更改,包括 2 次插入2 次删除
  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/, ""))
-          rows = response.map { |r| r.values }
-          columns = rows.any? ? response.first.keys : []
+          columns = response["columns"]
+          rows = response["rows"].map { |r| columns.map { |c| r[c] } }
         rescue => e
           error = e.message
         end