nikepan / clickhouse-bulk

Collects many small inserts to ClickHouse and send in big inserts
Apache License 2.0
474 stars 87 forks source link

'FORMAT' in string field broke insert query #12

Closed levonet closed 4 years ago

levonet commented 5 years ago

For example, this query:

INSERT INTO test (date, args) VALUES ('2019-06-13', 'query=select%20args%20from%20test%20group%20by%20date%20FORMAT%20JSON')

or this

INSERT INTO test (date, args) VALUES ('2019-06-13', 'query=select%2520args%2520from%2520test%2520group%2520by%2520date%2520FORMAT%2520JSON')

generates an error:

2019/06/13 12:49:46 Send ERROR 500: Code: 27, e.displayText() = DB::Exception: Cannot parse input: expected ( before: \'NDA\', ...: (at row 2)
nikepan commented 4 years ago

https://github.com/nikepan/clickhouse-bulk/releases/tag/v1.2.1