reduce allocation rate in LookupTransformFunction#8204
reduce allocation rate in LookupTransformFunction#8204richardstartin merged 2 commits intoapache:masterfrom
Conversation
351d32c to
ccc40cb
Compare
There was a problem hiding this comment.
(minor) Let annotate value as nullable, same for other places
There was a problem hiding this comment.
I annotated the interface.
There was a problem hiding this comment.
Suggest also annotating the methods to inform the developers to handle null value properly
...src/main/java/org/apache/pinot/core/operator/transform/function/LookupTransformFunction.java
Outdated
Show resolved
Hide resolved
ccc40cb to
611b69b
Compare
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
Should we also cache this value because getDefaultNullValueString() does have some overhead
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* reduce allocation rate in LookupTransformFunction * default values for array types
Addresses high allocation rates observed in
LookupTransformFunctionby:BaseTransformFunctionwhich are reused between block evaluations