nizarhejazi commented on code in PR #8927:
URL: https://github.com/apache/pinot/pull/8927#discussion_r916439619
##########
pinot-core/src/main/java/org/apache/pinot/core/data/table/TableResizer.java:
##########
@@ -84,9 +84,23 @@ public TableResizer(DataSchema dataSchema, QueryContext
queryContext) {
_orderByValueExtractors[i] =
getOrderByValueExtractor(orderByExpression.getExpression());
comparators[i] = orderByExpression.isAsc() ? Comparator.naturalOrder() :
Comparator.reverseOrder();
}
+ boolean isNullHandlingEnabled = queryContext.isNullHandlingEnabled();
_intermediateRecordComparator = (o1, o2) -> {
for (int i = 0; i < _numOrderByExpressions; i++) {
- int result = comparators[i].compare(o1._values[i], o2._values[i]);
+ Object v1 = o1._values[i];
+ Object v2 = o2._values[i];
+ if (isNullHandlingEnabled) {
Review Comment:
I did not do that at first because it requires writing duplicate code ..
makes sense for perf reasons.
--
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]