trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
9.97k stars 2.88k forks source link

JSON_PARSE to honor duplicate key check? #22329

Open walterddr opened 1 month ago

walterddr commented 1 month ago

when running

json_parse('{"k": "v1", "k": "v2"}')

this doesn't throw exception at all but according to the document it doesn't allow duplicate key. so we should throw in this case right?

walterddr commented 1 month ago

looks like what's missing is only the parser config https://github.com/trinodb/trino/commit/05487a77febfccd5f94f86ff4a7ddf491a54a0e3

we can either default enable it. or gated it with a flag for backward compatibility. thoughts?

wendigo commented 1 month ago

cc @martint