alex-plekhanov commented on code in PR #13407:
URL: https://github.com/apache/ignite/pull/13407#discussion_r3675539453


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SortAggregateIntegrationTest.java:
##########
@@ -155,6 +155,30 @@ public void testNullsReordering() {
             .check();
     }
 
+    /**
+     * Tests that sort aggregate node correctly handles the case when input 
data
+     * ends exactly when the requested number of rows is satisfied.
+     */
+    @Test
+    public void testRequestRowsAfterInputEnds() {
+        /**
+         * With 512 input rows (equal to buffer size), the last row completes 
both

Review Comment:
   fixed



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SortAggregateIntegrationTest.java:
##########
@@ -155,6 +155,30 @@ public void testNullsReordering() {
             .check();
     }
 
+    /**
+     * Tests that sort aggregate node correctly handles the case when input 
data
+     * ends exactly when the requested number of rows is satisfied.
+     */
+    @Test
+    public void testRequestRowsAfterInputEnds() {
+        /**
+         * With 512 input rows (equal to buffer size), the last row completes 
both
+         * the input data and the requested count in the same cycle. This 
triggers
+         * a synchronous request() call from within push() to fill the buffer, 
and
+         * the node must properly handle the termination on the subsequent 
request()
+         * call rather than on end().
+         */
+        int bufSize = 512;

Review Comment:
   fixed



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

Reply via email to