You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "jackluo923 (via GitHub)" <gi...@apache.org> on 2023/06/28 13:01:02 UTC

[GitHub] [pinot] jackluo923 commented on issue #10981: json_extract_scalar times out when the expression contains index

jackluo923 commented on issue #10981:
URL: https://github.com/apache/pinot/issues/10981#issuecomment-1611358390

   Based on my experimentation and the version of Pinot you are currently using, it appears that there may be difficulties when using json_extract_scalar to extract values from JSON documents that contain keys with an array of maps. A work around is to extract the maps within the array using `regexpExtract` before running `json_extract_scalar`. Specifically, this will work with your example: 
   
   ```
   select json_extract_scalar(regexpExtract("direct_tags", '(?<=\"root_workflow\":\[)[^\]]*'), '$.tag_value', 'STRING') from foo 
    where event_time=1687826999657
   ```


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org