wirybeaver commented on PR #12532: URL: https://github.com/apache/pinot/pull/12532#issuecomment-1986382381
@Jackie-Jiang the jsonExtractIndexArray functions aims to return contextual json array elements. Meanwhile I plan to support return array_type for arbitrary json path for jsonExtractIndex, including .[0] or .[*], meaning the return result can comes from different contextual array. ``` String[] records = { "{"foo":[{"bar":["x","y"]},{"bar":["a","b"]}],"foo2":["u"]}", "{"foo":[{"bar":["y","z"]}],"foo2":["u"]}" }; ``` when jsonPath = '.foo[*].bar[0]', return ``` ["x", "a"] ["y"] ``` As you can seen, x and a are coming from different arrays. In PR https://github.com/apache/pinot/pull/12466 , the getMatchingDocsMap can return a map from the value to docIds even for the complicated json path containing array index. In order to return MV, I need to traverse that map to get docID -> values. There might be performance penalty since we wanted to support any json path. If I understand correctly, jsonExtractIndexArray aims to optimized the use case where leaf node whose type is array and doesn't have a plan to support jsonPath containing arrayIndex. -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org