Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: json_extract_index out of bounds case #13479

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

itschrispeck
Copy link
Collaborator

@itschrispeck itschrispeck commented Jun 25, 2024

json_extract_index(col, '$.key', 'INT', 0) fails with java.lang.ArrayIndexOutOfBoundsException: Index 10000 out of bounds for length 10000 - there's a typo in one of the functions for converting to INT. This PR fixes this logic.

Unit testing this case looks like a larger change, requiring refactoring most of the transform function test cases since they are currently only tested w/ a single ValueBlock. The functionality is covered w/ the existing single ValueBlock test

@codecov-commenter
Copy link

codecov-commenter commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.97%. Comparing base (59551e4) to head (6b58b8a).
Report is 677 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13479      +/-   ##
============================================
+ Coverage     61.75%   61.97%   +0.22%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2557     +121     
  Lines        133233   141195    +7962     
  Branches      20636    21914    +1278     
============================================
+ Hits          82274    87506    +5232     
- Misses        44911    47038    +2127     
- Partials       6048     6651     +603     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 61.94% <100.00%> (+0.23%) ⬆️
java-21 61.86% <100.00%> (+0.23%) ⬆️
skip-bytebuffers-false 61.96% <100.00%> (+0.21%) ⬆️
skip-bytebuffers-true 61.84% <100.00%> (+34.11%) ⬆️
temurin 61.97% <100.00%> (+0.22%) ⬆️
unittests 61.97% <100.00%> (+0.22%) ⬆️
unittests1 46.67% <100.00%> (-0.22%) ⬇️
unittests2 27.50% <0.00%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jackie-Jiang Jackie-Jiang merged commit d447fcf into apache:master Jun 28, 2024
19 of 20 checks passed
suyashpatel98 pushed a commit to suyashpatel98/pinot that referenced this pull request Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants