clickhouse icon indicating copy to clipboard operation
clickhouse copied to clipboard

Long queries cause error 400 due to usage of GET request

Open astudnev opened this issue 7 years ago • 0 comments

Long SQL queries cause clickhouse to respond 400 on a valid query I finally had to switch to POST request in this way:

def query_long part1, part2 data = JSON.parse Clickhouse.connection.execute(part1, part2 + " FORMAT JSONCompact") names = data["meta"].collect{|column| column["name"]} types = data["meta"].collect{|column| column["type"]} Clickhouse::Connection::Query::ResultSet.new data["data"], names, types end

This would be cool if GEM will make this decision automatically

astudnev avatar Jul 09 '18 19:07 astudnev