paything commented on issue #29931:
URL: https://github.com/apache/doris/issues/29931#issuecomment-1897851549
you can excute the sql
the sample data is a sub query
select
json1,
array_map(x->x,array1) as test1,
array_map(x->concat('$.',x),array1) as test2,
get_json_string(json1,concat('$.',1)) as test4,
array_map(x->get_json_string(json1,concat('$.',x)),array1) as test3,
array_map(x->x/1=1,array1) as test5
from (
select
ids,
split_by_string(ids, ',') as array1
,json1
from (select '1,3,6' as ids union all
select '1,9,11' as ids union all
select '1' as ids union all
select '1,12,13' as ids
) temp
cross join (select
json_parse(concat("{",group_concat(concat('"',id,'":"',name,'"')),"}")) as
json1 from (
select 1 as id,'张三' as name union all
select 6 as id,'张四' as name union all
select 9 as id,'王武' as name
) tags) t2 ) t1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]