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

Optimize unnecessary extra array allocation and conversion for raw derived column during segment reload #13115

Conversation

yashmayya
Copy link
Collaborator

  • We added support for generating raw derived columns during segment reload recently in Add support for creating raw derived columns during segment reload #13037.
  • An optimization was pointed out where we could avoid an unnecessary extra array allocation and conversion from arrays of primitive wrapper classes to primitive arrays.
  • This patch adds the optimization and also adds derived numeric MV columns to the existing integration test for segment reload so that these additional code paths are covered (they previously had no test coverage).
  • Note that we can't simply use primitive arrays unconditionally because the dictionary case does cast it into an Object[] which isn't possible for primitive arrays.

@yashmayya yashmayya force-pushed the optimize-segment-reload-raw-derived-column branch from 6acf388 to 3ec3168 Compare May 9, 2024 10:29
@codecov-commenter
Copy link

codecov-commenter commented May 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 70 lines in your changes are missing coverage. Please review.

Project coverage is 62.18%. Comparing base (59551e4) to head (7761140).
Report is 421 commits behind head on master.

Files Patch % Lines
...loader/defaultcolumn/BaseDefaultColumnHandler.java 0.00% 44 Missing ⚠️
...impl/stats/DoubleColumnPreIndexStatsCollector.java 0.00% 5 Missing and 1 partial ⚠️
.../impl/stats/FloatColumnPreIndexStatsCollector.java 0.00% 5 Missing and 1 partial ⚠️
...or/impl/stats/IntColumnPreIndexStatsCollector.java 0.00% 5 Missing and 1 partial ⚠️
...r/impl/stats/LongColumnPreIndexStatsCollector.java 0.00% 5 Missing and 1 partial ⚠️
.../impl/stats/AbstractColumnStatisticsCollector.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13115      +/-   ##
============================================
+ Coverage     61.75%   62.18%   +0.43%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2514      +78     
  Lines        133233   137887    +4654     
  Branches      20636    21342     +706     
============================================
+ Hits          82274    85750    +3476     
- Misses        44911    45742     +831     
- Partials       6048     6395     +347     
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 62.12% <0.00%> (+0.41%) ⬆️
java-21 62.06% <0.00%> (+0.43%) ⬆️
skip-bytebuffers-false 62.16% <0.00%> (+0.41%) ⬆️
skip-bytebuffers-true 62.03% <0.00%> (+34.30%) ⬆️
temurin 62.18% <0.00%> (+0.43%) ⬆️
unittests 62.18% <0.00%> (+0.43%) ⬆️
unittests1 46.82% <0.00%> (-0.07%) ⬇️
unittests2 27.77% <0.00%> (+0.04%) ⬆️

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.

@yashmayya yashmayya force-pushed the optimize-segment-reload-raw-derived-column branch from 3ec3168 to ebee2ba Compare May 9, 2024 11:10
@yashmayya yashmayya force-pushed the optimize-segment-reload-raw-derived-column branch from ebee2ba to 7761140 Compare May 9, 2024 14:10
@yashmayya yashmayya marked this pull request as ready for review May 9, 2024 14:11
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jackie-Jiang Jackie-Jiang merged commit 46b41cc into apache:master May 11, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants