alex-plekhanov commented on code in PR #11471:
URL: https://github.com/apache/ignite/pull/11471#discussion_r1713941073
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/LimitOffsetPlannerTest.java:
##########
@@ -61,6 +61,18 @@ public void testLimit() throws Exception {
.and(hasChildThat(isInstanceOf(IgniteSort.class)))));
}
+ /** */
+ @Test
+ public void testNestedLimitOffsetWithUnion() throws Exception {
+ IgniteSchema publicSchema =
createSchemaWithTable(IgniteDistributions.random());
+
+ assertPlan("(SELECT ID FROM TEST WHERE ID = 2) UNION ALL " +
+ "SELECT ID FROM (SELECT ID from (SELECT ID FROM TEST OFFSET
20) ORDER BY ID OFFSET 10)",
+ publicSchema,
+ nodeOrAnyChild(isInstanceOf(IgniteLimit.class).and(l ->
doubleFromRex(l.offset(), -1) == 10))
Review Comment:
`== 10d`?
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/LimitOffsetIntegrationTest.java:
##########
@@ -88,6 +88,16 @@ public class LimitOffsetIntegrationTest extends
AbstractBasicIntegrationTest {
.setSqlSchema("PUBLIC"));
}
+ /** */
+ @Test
+ public void testNestedLimitOffsetWithUnion() {
+ sql("INSERT into TEST_REPL VALUES (1, 'a'), (2, 'b'), (3, 'c'), (4,
'd')");
+
+ assertQuery("(SELECT id FROM TEST_REPL WHERE id = 2) UNION ALL " +
Review Comment:
Looks like UNION_ALL is not related to the problem and test can be
simplified?
--
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]