clickhouse
                                
                                
                                
                                    clickhouse copied to clipboard
                            
                            
                            
                        Long queries cause error 400 due to usage of GET request
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