mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-25875: JSON_TABLE: extract document fragment into JSON column
Accept JSON values for the JSON fields.
This commit is contained in:
committed by
Rucha Deodhar
parent
6b6d745b9e
commit
a9f6abedde
@@ -953,6 +953,20 @@ converted original
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'converted' at row 2
|
||||
Warning 1366 Incorrect integer value: 'foo' for column ``.`(temporary)`.`converted` at row 3
|
||||
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;
|
||||
color price
|
||||
blue { "high": 10, "low": 5}
|
||||
white "pretty low"
|
||||
yellow 256.20
|
||||
red { "high": 20, "low": 8}
|
||||
#
|
||||
# MDEV-27696 Json table columns accept redundant COLLATE syntax
|
||||
#
|
||||
|
Reference in New Issue
Block a user