anoopj commented on code in PR #15842:
URL: https://github.com/apache/iceberg/pull/15842#discussion_r3023026474


##########
spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java:
##########
@@ -1926,6 +1927,33 @@ public void testSnapshotProperty() {
     
assertThat(table.currentSnapshot().summary()).containsKeys(commitMetricsKeys);
   }
 
+  @TestTemplate
+  public void testSessionSnapshotProperty() {
+    Table table = createTable(4);
+
+    spark.conf().set(SparkSQLProperties.SNAPSHOT_PROPERTY_PREFIX + 
"session-key", "session-value");
+    try {
+      Result ignored = basicRewrite(table).execute();
+      
assertThat(table.currentSnapshot().summary()).containsEntry("session-key", 
"session-value");
+    } finally {
+      spark.conf().unset(SparkSQLProperties.SNAPSHOT_PROPERTY_PREFIX + 
"session-key");
+    }
+  }
+
+  @TestTemplate
+  public void testExplicitSnapshotPropertyOverridesSession() {
+    Table table = createTable(4);
+
+    spark.conf().set(SparkSQLProperties.SNAPSHOT_PROPERTY_PREFIX + "key", 
"session-value");
+    try {
+      Result ignored =

Review Comment:
   Nit: should be one line - causing a CI failure. You may be able to fix it 
(and the import order) just by running spotless (`./gradlew spotlessApply` at 
the root directory of the source)



##########
spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/actions/TestRewriteDataFilesAction.java:
##########
@@ -111,6 +111,7 @@
 import org.apache.iceberg.relocated.com.google.common.collect.Streams;
 import org.apache.iceberg.spark.FileRewriteCoordinator;
 import org.apache.iceberg.spark.ScanTaskSetManager;
+import org.apache.iceberg.spark.SparkSQLProperties;

Review Comment:
   I think this import should come after SparkRead* classes, and it's causing a 
CI failure.



-- 
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]

Reply via email to