You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "clintropolis (via GitHub)" <gi...@apache.org> on 2024/01/09 22:32:10 UTC
[PR] fix issue with json paths not correctly handling negative index for Object[] like it has for List (druid)
clintropolis opened a new pull request, #15650:
URL: https://github.com/apache/druid/pull/15650
### Description
Fixes a bug with `NestedPathArrayElement` which was missing negative index handling for `Object[]` like it had for `List`. This meant that while a query like `json_query(c1, '$.a_array[-2].a_str')` would work correctly because it would get a `List` from the raw data, something like `json_query(json_query_array(c1, '$.a_array'), '$[-2].a_str')` would fail with an array out of bounds exception because `json_query_array` spits out `Object[]`. This PR fixes the problem so that both are consistent.
<hr>
This PR has:
- [x] been self-reviewed.
- [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [x] been tested in a test Druid cluster.
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] fix issue with json paths not correctly handling negative index for Object[] like it has for List (druid)
Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 merged PR #15650:
URL: https://github.com/apache/druid/pull/15650
--
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@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org