jackye1995 commented on code in PR #6965:
URL: https://github.com/apache/iceberg/pull/6965#discussion_r1129081713
##########
spark/v3.3/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMerge.java:
##########
@@ -1656,20 +1701,20 @@ public void testMergeModifiesNullStruct() {
+ "ON t.id == s.id "
+ "WHEN MATCHED THEN "
+ " UPDATE SET t.s.n1 = s.n1",
- tableName);
+ commitTarget());
assertEquals(
"Output should match",
ImmutableList.of(row(1, row(-10, null))),
- sql("SELECT * FROM %s", tableName));
+ sql("SELECT * FROM %s", selectTarget()));
}
@Test
public void testMergeRefreshesRelationCache() {
createAndInitTable("id INT, name STRING", "{ \"id\": 1, \"name\": \"n1\"
}");
createOrReplaceView("source", "{ \"id\": 1, \"name\": \"n2\" }");
- Dataset<Row> query = spark.sql("SELECT name FROM " + tableName);
+ Dataset<Row> query = spark.sql("SELECT name FROM " + commitTarget());
Review Comment:
All the cache refresh tests are using `commitTarget` for read instead of
`selectTarget`, because I notice when using `AS OF` syntax it does not consider
the relation to be the same and it will not refresh cache unless `REFRESH
TABLE` is called explicitly. I will continue to look into this issue for a fix,
but I think that can be a separated PR.
--
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]