Skip to content

http engine fails to parse arrays with quoted strings #142

@theory

Description

@theory

Test:

SELECT clickhouse_raw_query('CREATE TABLE http_inserts_test.arrays (
    c1 Int32, c2 Array(Int32), c3 Array(String)
) ENGINE = MergeTree PARTITION BY c1 ORDER BY (c1);
');

INSERT INTO arrays VALUES
	(1, ARRAY[1,2], ARRAY['x']),
	(2, ARRAY[3,4,5], ARRAY['😀', '🦁']),
	(3, ARRAY[6,4], ARRAY['Oberlin', 'O''Berlin']),
	(4, '{}'::int[], '{"[bracketed]"}'::text[]),
	(5, ARRAY[0], ARRAY['[]']);
SELECT * FROM arrays ORDER BY c1;

Output from the SELECT:

ERROR:  malformed array literal: "{'{bracketed}'}"
DETAIL:  Unexpected "{" character.

Spotted by @serprex.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdriversImprove binary and/or http driver support

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions