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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org