You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/05 02:47:24 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #4697: Flink 1.15 - Fix flaky test that has implicit order dependency in TestFlinkTableSource

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org