Skip to content

Conversation

@richardstartin
Copy link
Member

Addresses high allocation rates observed in LookupTransformFunction by:

  • avoiding conversion of primitive blocks to boxed arrays
  • use the arrays in BaseTransformFunction which are reused between block evaluations
  • don't materialise a temporary join column output, write the result directly into the output

@richardstartin richardstartin force-pushed the reduce-lookup-allocation branch 2 times, most recently from 351d32c to ccc40cb Compare February 15, 2022 13:20
Copy link
Contributor

Choose a reason for hiding this comment

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

(minor) Let annotate value as nullable, same for other places

Copy link
Member Author

Choose a reason for hiding this comment

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

I annotated the interface.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest also annotating the methods to inform the developers to handle null value properly

@richardstartin richardstartin force-pushed the reduce-lookup-allocation branch from ccc40cb to 611b69b Compare February 15, 2022 23:33
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

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest also annotating the methods to inform the developers to handle null value properly

if (value != null) {
_stringValuesSV[index] = String.valueOf(value);
} else {
_stringValuesSV[index] = _lookupColumnFieldSpec.getDefaultNullValueString();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also cache this value because getDefaultNullValueString() does have some overhead

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2022

Codecov Report

Merging #8204 (3005614) into master (8042408) will decrease coverage by 3.57%.
The diff coverage is 73.52%.

❗ Current head 3005614 differs from pull request most recent head 611b69b. Consider uploading reports for the commit 611b69b to get more accurate results

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #8204      +/-   ##
============================================
- Coverage     70.97%   67.39%   -3.58%     
+ Complexity     4313     4233      -80     
============================================
  Files          1626     1226     -400     
  Lines         84851    61896   -22955     
  Branches      12790     9631    -3159     
============================================
- Hits          60221    41714   -18507     
+ Misses        20496    17220    -3276     
+ Partials       4134     2962    -1172     
Flag Coverage Δ
integration1 ?
integration2 ?
unittests1 67.39% <73.52%> (-0.01%) ⬇️
unittests2 ?

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

Impacted Files Coverage Δ
...or/transform/function/LookupTransformFunction.java 79.05% <73.52%> (-9.06%) ⬇️
...a/org/apache/pinot/common/metrics/MinionMeter.java 0.00% <0.00%> (-100.00%) ⬇️
...g/apache/pinot/common/metrics/ControllerMeter.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/pinot/common/metrics/BrokerQueryPhase.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/pinot/common/metrics/MinionQueryPhase.java 0.00% <0.00%> (-100.00%) ⬇️
...ache/pinot/server/access/AccessControlFactory.java 0.00% <0.00%> (-100.00%) ⬇️
...he/pinot/common/messages/SegmentReloadMessage.java 0.00% <0.00%> (-100.00%) ⬇️
...pinot/core/data/manager/realtime/TimerService.java 0.00% <0.00%> (-100.00%) ⬇️
...not/common/exception/HttpErrorStatusException.java 0.00% <0.00%> (-100.00%) ⬇️
...t/core/plan/StreamingInstanceResponsePlanNode.java 0.00% <0.00%> (-100.00%) ⬇️
... and 615 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8042408...611b69b. Read the comment docs.

@richardstartin richardstartin merged commit 916d807 into apache:master Feb 16, 2022
xiangfu0 pushed a commit to xiangfu0/pinot that referenced this pull request Feb 23, 2022
* reduce allocation rate in LookupTransformFunction

* default values for array types
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