You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/08/23 11:12:18 UTC
[GitHub] [pinot] aesteve opened a new issue #7349: IllegalArgumentException when using JSONPATHARRAY
aesteve opened a new issue #7349:
URL: https://github.com/apache/pinot/issues/7349
When running such query:
```
select JSONPATHARRAYDEFAULTEMPTY(values_str, '$[*].amount') from table
```
Over data where `values_str` column is a JSON index column contains:
(Result of:
```
select values_str from table
```
)
```
[{"amount":404.0,"unit":{"unit":"seconds","type":"duration"}}]
```
I'm getting the following error:
```
Caused by: java.lang.IllegalArgumentException: Unsupported parameter class: class java.lang.Object for method: public static java.lang.Object[] org.apache.pinot.common.function.scalar.JsonFunctions.jsonPathArrayDefaultEmpty(java.lang.Object,java.lang.String)
at shaded.com.google.common.base.Preconditions.checkArgument(Preconditions.java:383) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.operator.transform.function.ScalarTransformFunctionWrapper.<init>(ScalarTransformFunctionWrapper.java:72) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.operator.transform.function.TransformFunctionFactory.get(TransformFunctionFactory.java:201) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.operator.transform.TransformOperator.<init>(TransformOperator.java:56) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.plan.TransformPlanNode.run(TransformPlanNode.java:56) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.plan.SelectionPlanNode.run(SelectionPlanNode.java:83) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.plan.CombinePlanNode$1.callJob(CombinePlanNode.java:139) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.plan.CombinePlanNode$1.callJob(CombinePlanNode.java:125) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
at org.apache.pinot.core.util.trace.TraceCallable.call(TraceCallable.java:44) ~[pinot-all-0.8.0-SNAPSHOT-jar-with-dependencies.jar:0.8.0-SNAPSHOT-7a4eaa97b6968934268e1b64decbb84e0c9438d2]
... 8 more
```
note: same issue with JSONPATHARRAY
I'm probably doing something wrong, but my data seems to really look the same as in the [PR](https://github.com/apache/pinot/pull/7208/files#diff-20502c0f824d5773fcdad02cc354215312d4d653e08a9c546b10e7485a40dc3dR116) and JSON paths work well when using JSON_EXTRACT_SCALAR (although extracting `"[404.0]"` in this case
Or is this not supported when querying and only when ingesting?
--
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] aesteve commented on issue #7349: IllegalArgumentException when using JSONPATHARRAY
Posted by GitBox <gi...@apache.org>.
aesteve commented on issue #7349:
URL: https://github.com/apache/pinot/issues/7349#issuecomment-904892280
Oh thank you!
I didn't realise extracting to an array was possible.
Thanks a lot!
--
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] Jackie-Jiang commented on issue #7349: IllegalArgumentException when using JSONPATHARRAY
Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #7349:
URL: https://github.com/apache/pinot/issues/7349#issuecomment-904855764
@aesteve `JSON_PATH_ARRAY` can only be used for ingestion because the data type is not specified. For querying you need to use `JSON_EXTRAC_SCALAR`: `select JSONEXTRACTSCALAR(values_str, '$[*].amount', 'DOUBLE_ARRAY') from table`
--
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] aesteve closed issue #7349: IllegalArgumentException when using JSONPATHARRAY
Posted by GitBox <gi...@apache.org>.
aesteve closed issue #7349:
URL: https://github.com/apache/pinot/issues/7349
--
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