-
Notifications
You must be signed in to change notification settings - Fork 1.4k
reduce allocation rate in LookupTransformFunction #8204
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
reduce allocation rate in LookupTransformFunction #8204
Conversation
351d32c to
ccc40cb
Compare
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I annotated the interface.
There was a problem hiding this comment.
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
...src/main/java/org/apache/pinot/core/operator/transform/function/LookupTransformFunction.java
Outdated
Show resolved
Hide resolved
ccc40cb to
611b69b
Compare
Jackie-Jiang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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 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