Amaotomiyabi opened a new issue, #23174:
URL: https://github.com/apache/doris/issues/23174

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   doris version:Doris version doris-1.2.4-3-0f8e3e3
   
   
   ### What's Wrong?
   
   table sql:
   ```sql
   CREATE TABLE `json_test` (
     `id` int(11) NULL,
     `c_json` jsonb NULL
   ) ENGINE=OLAP
   DUPLICATE KEY(`id`)
   COMMENT 'OLAP_JSON'
   DISTRIBUTED BY HASH(`id`) BUCKETS 1
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2",
   "disable_auto_compaction" = "false"
   );
   ```
   
   table data:
   <img width="637" alt="image" 
src="https://github.com/apache/doris/assets/54828366/e6bd1313-2934-4e17-b907-ae86732d87cb";>
   
   sql1:`select get_json_string(c_json,'$.obj.i1') from json_test;`
   sql2:`select jsonb_extract_string(c_json,'$.obj.i1') from json_test;`
   
   sql1-data:
   <img width="374" alt="image" 
src="https://github.com/apache/doris/assets/54828366/5c8da4e8-6608-4e7d-81d9-91f193149a9d";>
   
   sql2-data:
   <img width="392" alt="image" 
src="https://github.com/apache/doris/assets/54828366/d5d34369-81df-46d1-bf49-380a66594479";>
   
   
   When I execute the following SQL statement, I did not get the result I 
wanted:
   ```sql
   select id,e1
   from json_test as t1 lateral view 
explode_json_array_string(jsonb_extract_string(c_json,'$.obj')) tmp1 as e1;
   ```
   
   data:
   <img width="219" alt="image" 
src="https://github.com/apache/doris/assets/54828366/8ebbc86b-8c66-4ed5-91a3-8c7ac86acc67";>
   
   the data obtained on this path should be a json array,but the result was 
null.
   
   
   
   ### What You Expected?
   
   json_extract_string/get_json_string, the execution result should be one.
   
   explode_json_array_string, It should be able to recognize this type of json 
array input data: [{}, {}]
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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]

Reply via email to