mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Fix JSONExtract String with null value.
This commit is contained in:
parent
14ef66e49b
commit
4d3db821bb
@ -695,6 +695,8 @@ struct JSONExtractTree
|
||||
{
|
||||
if (element.isString())
|
||||
return JSONExtractStringImpl<JSONParser>::insertResultToColumn(dest, element, {});
|
||||
else if (element.isNull())
|
||||
return false;
|
||||
else
|
||||
return JSONExtractRawImpl<JSONParser>::insertResultToColumn(dest, element, {});
|
||||
}
|
||||
|
@ -1 +1,2 @@
|
||||
('123','456','[7,8,9]')
|
||||
\N
|
||||
|
@ -1 +1,3 @@
|
||||
select JSONExtract('{"a": "123", "b": 456, "c": [7, 8, 9]}', 'Tuple(a String, b String, c String)');
|
||||
|
||||
with '{"string_value":null}' as json select JSONExtract(json, 'string_value', 'Nullable(String)');
|
||||
|
Loading…
Reference in New Issue
Block a user