xiangfu0 commented on code in PR #11334:
URL: https://github.com/apache/pinot/pull/11334#discussion_r1294234098


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/SortOperator.java:
##########
@@ -175,6 +175,14 @@ private void consumeInputBlocks() {
               _rows.addAll(container.subList(0, _numRowsToKeep - 
_rows.size()));
             }
           }
+          // '_fetch > 0' means this operator can early terminate, so we can 
stop consuming input blocks
+          if (_rows.size() >= _numRowsToKeep && _fetch > 0) {
+            _readyToConstruct = true;
+            _upstreamOperator.close();

Review Comment:
   removed.



##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/SortOperator.java:
##########
@@ -175,6 +175,14 @@ private void consumeInputBlocks() {
               _rows.addAll(container.subList(0, _numRowsToKeep - 
_rows.size()));
             }
           }
+          // '_fetch > 0' means this operator can early terminate, so we can 
stop consuming input blocks
+          if (_rows.size() >= _numRowsToKeep && _fetch > 0) {

Review Comment:
   updated.



-- 
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]

Reply via email to