huaxingao commented on code in PR #13907:
URL: https://github.com/apache/iceberg/pull/13907#discussion_r2298637250


##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/sql/TestStoragePartitionedJoins.java:
##########
@@ -133,7 +133,44 @@ public void removeTables() {
     sql("DROP TABLE IF EXISTS %s", tableName(OTHER_TABLE_NAME));
   }
 
-  // TODO: add tests for truncate transforms once SPARK-40295 is released
+  // TODO: Truncate is not supported by SPJ yet (even after SPARK-40295).
+  // Add tests for full support once SPARK-50593 is resolved.
+  @TestTemplate
+  public void testJoinsWithIncompatibleTruncateSpecs() {
+
+    sql(
+        "CREATE TABLE %s (id BIGINT, int_col INT, dep STRING) "
+            + "USING iceberg "
+            + "PARTITIONED BY (truncate(4, dep)) "
+            + "TBLPROPERTIES (%s)",
+        tableName, tablePropsAsString(TABLE_PROPERTIES));
+
+    sql("INSERT INTO %s VALUES (1L, 100, 'software')", tableName);
+    sql("INSERT INTO %s VALUES (2L, 200, 'software')", tableName);
+    sql("INSERT INTO %s VALUES (3L, 300, 'software')", tableName);
+
+    sql(
+        "CREATE TABLE %s (id BIGINT, int_col INT, dep STRING) "
+            + "USING iceberg "
+            + "PARTITIONED BY (truncate(4, dep)) "

Review Comment:
   The test name says `...IncompatibleTruncateSpecs` but both tables use the 
same partitioning `(truncate(4, dep))`. Could you change the test name?



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