RussellSpitzer commented on code in PR #4697:
URL: https://github.com/apache/iceberg/pull/4697#discussion_r867254031
##########
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:
Not sure why we need the .size().isEqualTo(1); here when we checked that
result.size() == 1 immediately before
--
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]