def recurse_where(where_arr)
      result_arr = []
      where_arr.each do |val|
        if val.is_a? Hash
          result_arr << filters_from_key_value_pair(val)
        elsif val.is_a? Array
          result_arr << "(#{recurse_where(val)})"
        elsif val.is_a? String
          result_arr << val
        else
          raise "Recursive where undefined error."
        end
      end
      result_arr.join(" ")
    end
def recurse_where(where_arr)
      result_arr = []
      where_arr.each do |val|
        if val.is_a? Hash
          result_arr << filters_from_key_value_pair(val)
        elsif val.is_a? Array
          result_arr << "(#{recurse_where(val)})"
        elsif val.is_a? String
          result_arr << val
        else
          raise "Recursive where undefined error."
        end
      end
      result_arr.join(" ")
    end
Format the scanner filter for thrift based on the where clause(s)
 of a SELECT query.