oleg-zinovev commented on code in PR #12096:
URL: https://github.com/apache/ignite/pull/12096#discussion_r3442657008
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/WindowExecutionTest.java:
##########
@@ -508,13 +492,40 @@ public void testSumRowsAndRowNumberToUnboundedFollowing()
{
new Object[][] {{2, 1}, {2, 2}, {6, 1}, {6, 2}, {6, 3}, {3, 1}});
}
+ /** row_number() over (partition by {0}). */
+ @Test
+ public void testStreamLargeInput() {
+ ExecutionContext<Object[]> ctx = executionContext(F.first(nodes()),
UUID.randomUUID(), 0);
+ Object[][] exp = IntStream.range(0, 10000)
+ .mapToObj(i -> row(i + 1))
+ .toArray(Object[][]::new);
+
+ checkWindow(ctx, rowNumber(), true, createSeqInputNode(ctx, 10000),
exp);
+ }
+
+ /** count(*) over (partition by {0} rows between unbounded prescending and
unbounded following). */
+ @Test
+ public void testBufLargeInput() {
+ ExecutionContext<Object[]> ctx = executionContext(F.first(nodes()),
UUID.randomUUID(), 0);
+ Object[][] exp = IntStream.range(0, 10000)
+ .mapToObj(i -> row(10000))
+ .toArray(Object[][]::new);
+
+ checkWindow(ctx, count(true, UNBOUNDED_PRECEDING,
UNBOUNDED_FOLLOWING), false,
+ createSeqInputNode(ctx, 10000), exp);
+ }
+
/** */
private void checkWindow(Window.Group grp, boolean streaming, Object[][]
expRes) {
- Assert.assertEquals(streaming, WindowFunctions.streamable(grp));
-
ExecutionContext<Object[]> ctx = executionContext(F.first(nodes()),
UUID.randomUUID(), 0);
+ Node<Object[]> input = createSmallInputNode(ctx);
+ checkWindow(ctx, grp, streaming, input, expRes);
+ }
- Node<Object[]> input = createInputNode(ctx);
+ /** */
+ private void checkWindow(ExecutionContext<Object[]> ctx, Window.Group grp,
boolean streaming,
Review Comment:
done
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/WindowPlannerTest.java:
##########
@@ -1,4 +1,5 @@
+
Review Comment:
done
--
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]