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/07/26 23:58:27 UTC

[GitHub] [pinot] klsince commented on pull request #7208: allow to extract values from array of objects with jsonPathArray

klsince commented on pull request #7208:
URL: https://github.com/apache/pinot/pull/7208#issuecomment-887106377


   As context: 
   
   JsonPath assumes json array is deserialized into a Java Collection ([code snippet](https://github.com/json-path/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/spi/json/AbstractJsonProvider.java#L32)). But Pinot explicitly converts Collection to Object[] ([code snippet](https://github.com/apache/pinot/blob/master/pinot-spi/src/main/java/org/apache/pinot/spi/data/readers/BaseRecordExtractor.java#L47)) before calling those json transformations, thus leading to issues like: either no values were extracted with ingestion transformation like `$.commits[*].sha` or throwing PathNotFoundException with sth like `$.commits[0].sha`. 
   
   The logic to covert Collection to Object[] is necessary, as Object[] is assumed by some transformations, used for MV values on both ingestion and query path. Thus this RP is trying to extend JsonPath to be able to work with Object[] properly.  


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