yashmayya commented on code in PR #16901:
URL: https://github.com/apache/pinot/pull/16901#discussion_r2380607272
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/DistinctFromTransformFunction.java:
##########
@@ -65,38 +64,37 @@ public String getName() {
return TransformFunctionType.IS_NOT_DISTINCT_FROM.getName();
}
- @Override
- public TransformResultMetadata getResultMetadata() {
- return BOOLEAN_SV_NO_DICTIONARY_METADATA;
- }
-
@Override
public int[] transformToIntValuesSV(ValueBlock valueBlock) {
_intValuesSV = super.transformToIntValuesSV(valueBlock);
- RoaringBitmap leftNull = _leftTransformFunction.getNullBitmap(valueBlock);
- RoaringBitmap rightNull =
_rightTransformFunction.getNullBitmap(valueBlock);
- // Both sides are not null.
- if (isEmpty(leftNull) && isEmpty(rightNull)) {
- return _intValuesSV;
- }
- // Left side is not null.
- if (isEmpty(leftNull)) {
- // Mark right null rows as distinct.
- rightNull.forEach((IntConsumer) i -> _intValuesSV[i] = _distinctResult);
- return _intValuesSV;
- }
- // Right side is not null.
- if (isEmpty(rightNull)) {
- // Mark left null rows as distinct.
- leftNull.forEach((IntConsumer) i -> _intValuesSV[i] = _distinctResult);
- return _intValuesSV;
+
+ if (_nullHandlingEnabled) {
Review Comment:
Ah makes sense, without null handling `IS (NOT) DISTINCT FROM` essentially
becomes `(NOT) EQUALS` 🤦
Closing this PR in that case, looks like the only transform functions using
null bitmap when null handling is disabled are the ones that depend on knowing
actual `null` values for semantic correctness.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]