ClickHouse/tests/queries/0_stateless/02370_extractAll_regress.sql
2022-12-13 12:48:14 +01:00

6 lines
302 B
SQL

-- Regression for UB (stack-use-after-scope) in extactAll()
SELECT
'{"a":"1","b":"2","c":"","d":"4"}{"a":"1","b":"2","c":"","d":"4"}{"a":"1","b":"2","c":"","d":"4"}{"a":"1","b":"2","c":"","d":"4"}' AS json,
extractAll(json, '"([^"]*)":') AS keys,
extractAll(json, ':"\0[^"]*)"') AS values;