You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "wirybeaver (via GitHub)" <gi...@apache.org> on 2023/06/27 02:51:42 UTC
[GitHub] [pinot] wirybeaver opened a new issue, #10981: json_extract_scalar times out when the expression contains array
wirybeaver opened a new issue, #10981:
URL: https://github.com/apache/pinot/issues/10981
json_extract_scala times out even though the returned number of rows is only 1.
```
SELECT json_extract_scalar(direct_tags, '$.root_workflow[0].tag_value', 'STRING')
FROM foo
where event_time=1687826999657
```
Directly poll the column works.
```
SELECT direct_tags
FROM foo
where event_time=1687826999657
```
The result below
{"parent_workflow":[{"tag_attribute":"direct","tag_value":"XXX"}],"root_workflow":[{"tag_attribute":"direct","tag_value":"YYY"}],"workflow":[{"tag_attribute":"direct","tag_value":"ZZZ"}],"workflow_type":[{"tag_attribute":"direct","tag_value":"UUU"}]}
--
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.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
[GitHub] [pinot] chenboat commented on issue #10981: json_extract_scalar times out when the expression contains index
Posted by "chenboat (via GitHub)" <gi...@apache.org>.
chenboat commented on issue #10981:
URL: https://github.com/apache/pinot/issues/10981#issuecomment-1610280711
cc @Jackie-Jiang @mayankshriv
--
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
[GitHub] [pinot] wirybeaver commented on issue #10981: json_extract_scalar times out when the expression contains index
Posted by "wirybeaver (via GitHub)" <gi...@apache.org>.
wirybeaver commented on issue #10981:
URL: https://github.com/apache/pinot/issues/10981#issuecomment-1610332723
The pinot field spec:
{
"name": "direct_tags",
"dataType": "STRING",
"maxLength": 102400
}
--
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
[GitHub] [pinot] wirybeaver closed issue #10981: json_extract_scalar times out when the expression contains index
Posted by "wirybeaver (via GitHub)" <gi...@apache.org>.
wirybeaver closed issue #10981: json_extract_scalar times out when the expression contains index
URL: https://github.com/apache/pinot/issues/10981
--
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
[GitHub] [pinot] wirybeaver commented on issue #10981: json_extract_scalar times out when the expression contains index
Posted by "wirybeaver (via GitHub)" <gi...@apache.org>.
wirybeaver commented on issue #10981:
URL: https://github.com/apache/pinot/issues/10981#issuecomment-1611972584
version 0.12 works fine. Close this issue
--
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
[GitHub] [pinot] wirybeaver commented on issue #10981: json_extract_scalar times out when the expression contains index
Posted by "wirybeaver (via GitHub)" <gi...@apache.org>.
wirybeaver commented on issue #10981:
URL: https://github.com/apache/pinot/issues/10981#issuecomment-1610334868
```
SELECT *
FROM rta_odin_analytics_staging_audit_v6
where JSON_MATCH(direct_tags, '"$.root_workflow[0].tag_value" = ''foo''')
```
works
--
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
[GitHub] [pinot] jackluo923 commented on issue #10981: json_extract_scalar times out when the expression contains index
Posted by "jackluo923 (via GitHub)" <gi...@apache.org>.
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
[GitHub] [pinot] wirybeaver commented on issue #10981: json_extract_scalar times out when the expression contains index
Posted by "wirybeaver (via GitHub)" <gi...@apache.org>.
wirybeaver commented on issue #10981:
URL: https://github.com/apache/pinot/issues/10981#issuecomment-1610353025
All segments are in Consuming State, i.e., mutable segment
--
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