kbendick commented on code in PR #4697:
URL: https://github.com/apache/iceberg/pull/4697#discussion_r865522274
##########
flink/v1.15/flink/src/test/java/org/apache/iceberg/flink/TestFlinkTableSource.java:
##########
@@ -121,6 +115,16 @@ public void testLimitPushDown() {
);
assertSameElements(expectedList, resultExceed);
+ String querySql = String.format("SELECT * FROM %s LIMIT 1", TABLE_NAME);
+ String explain = getTableEnv().explainSql(querySql);
+ String expectedExplain = "limit=[1]";
+ Assert.assertTrue("Explain should contain LimitPushDown",
explain.contains(expectedExplain));
+ List<Row> result = sql(querySql);
+ Assert.assertEquals("Should have 1 record", 1, result.size());
+ Assertions.assertThat(result)
+ .containsAnyElementsOf(expectedList)
+ .size().isEqualTo(1);
Review Comment:
For people who cherry-pick, I'm not sure if this reordering is the best way
to go about this.
I needed to use `expectedList`, so I just moved the test to be below the
test that declares all 3 expected records of that table. Given that there are
already multiple tests in this single test function, I think it should be fine.
--
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]