1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-25875: JSON_TABLE: extract document fragment into JSON column

Accept JSON values for the JSON fields.
This commit is contained in:
Alexey Botchkov
2021-05-31 13:48:09 +04:00
committed by Rucha Deodhar
parent 6b6d745b9e
commit a9f6abedde
6 changed files with 74 additions and 20 deletions

View File

@ -814,6 +814,16 @@ select * from json_table('{"a":"foo", "b":1, "c":1000}', '$.*' columns(converted
select * from json_table('{"a":"foo", "b":1, "c":1000}', '$.*' columns(converted tinyint path '$', original text path '$')) as jt order by original;
select * from
json_table('[{"color": "blue", "price": { "high": 10, "low": 5}},
{"color": "white", "price": "pretty low"},
{"color": "yellow", "price": 256.20},
{"color": "red", "price": { "high": 20, "low": 8}}]',
'$[*]' columns(color varchar(100) path '$.color',
price json path '$.price'
)
) as T;
--echo #
--echo # MDEV-27696 Json table columns accept redundant COLLATE syntax
--echo #