You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "tomtongue (via GitHub)" <gi...@apache.org> on 2025/10/20 04:11:16 UTC
[PR] Spark 3.5, 4.0: Fix the format version parameter to match test parameters [iceberg]
tomtongue opened a new pull request, #14376:
URL: https://github.com/apache/iceberg/pull/14376
## Change
The current test parameters in the `TestRewritePositionDeleteFiles` don't match the actual test values (the details are below). So this PR tries to fix these parameters to match the actual values, and also to parameterize the table format version for the method `createTable`.
### Details
An example of the current test logs (each parameter name like `formatVersion`, `catalogName` etc. doesn’t match the corresponding value as below):
```
TestRewritePositionDeleteFiles > testDatePartition() > formatVersion = testhive, catalogName = org.apache.iceberg.spark.SparkCatalog, implementation = {type=hive, default-namespace=default, cache-enabled=false}, config = {3} STANDARD_ERROR // <= not match
[Test worker] INFO org.apache.spark.sql.internal.SharedState - Setting hive.metastore.warehouse.dir ('null') to the value of spark.sql.warehouse.dir.
[Test worker] INFO org.apache.spark.sql.internal.SharedState - Warehouse path is 'file:/path/to/iceberg/spark/v4.0/spark-extensions/spark-warehouse'.
[Test worker] INFO org.sparkproject.jetty.server.handler.ContextHandler - Started o.s.j.s.ServletContextHandler@708378cc{/SQL,null,AVAILABLE,@Spark}
...
```
After applying this change (each parameter name matches the corresponding value):
```
TestRewritePositionDeleteFiles > testDatePartition() > catalogName = testhive, implementation = org.apache.iceberg.spark.SparkCatalog, config = {type=hive, default-namespace=default, cache-enabled=false}, formatVersion = 2 STANDARD_ERROR // <= match
[Test worker] INFO org.apache.spark.sql.internal.SharedState - Setting hive.metastore.warehouse.dir ('null') to the value of spark.sql.warehouse.dir.
```
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "tomtongue (via GitHub)" <gi...@apache.org>.
tomtongue commented on code in PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#discussion_r2443950944
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java:
##########
@@ -85,17 +89,21 @@ public class TestRewritePositionDeleteFiles extends ExtensionsTestBase {
private static final int DELETE_FILES_PER_PARTITION = 2;
private static final int DELETE_FILE_SIZE = 10;
- @Parameters(name = "formatVersion = {0}, catalogName = {1}, implementation = {2}, config = {3}")
+ @Parameters(name = "catalogName = {0}, implementation = {1}, config = {2}, formatVersion = {3}")
Review Comment:
Sure, thanks for checking this part.
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#discussion_r2443812112
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java:
##########
@@ -85,17 +89,21 @@ public class TestRewritePositionDeleteFiles extends ExtensionsTestBase {
private static final int DELETE_FILES_PER_PARTITION = 2;
private static final int DELETE_FILE_SIZE = 10;
- @Parameters(name = "formatVersion = {0}, catalogName = {1}, implementation = {2}, config = {3}")
+ @Parameters(name = "catalogName = {0}, implementation = {1}, config = {2}, formatVersion = {3}")
Review Comment:
> I believe it's also possible to simply remove the formatVersion parameter if this test is only for V2.
+1 to removing the `formatVersion` from this annotation, since I don't expect any new format versions to be added here given the deletion vectors. We can always parameterize it later if needed.
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#discussion_r2443812112
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java:
##########
@@ -85,17 +89,21 @@ public class TestRewritePositionDeleteFiles extends ExtensionsTestBase {
private static final int DELETE_FILES_PER_PARTITION = 2;
private static final int DELETE_FILE_SIZE = 10;
- @Parameters(name = "formatVersion = {0}, catalogName = {1}, implementation = {2}, config = {3}")
+ @Parameters(name = "catalogName = {0}, implementation = {1}, config = {2}, formatVersion = {3}")
Review Comment:
I think we can remove the `formatVersion` from this annotation and inline the value `2`, since we don't expect to add a new format version here due to deletion vectors. What do you think?
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#discussion_r2443812112
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java:
##########
@@ -85,17 +89,21 @@ public class TestRewritePositionDeleteFiles extends ExtensionsTestBase {
private static final int DELETE_FILES_PER_PARTITION = 2;
private static final int DELETE_FILE_SIZE = 10;
- @Parameters(name = "formatVersion = {0}, catalogName = {1}, implementation = {2}, config = {3}")
+ @Parameters(name = "catalogName = {0}, implementation = {1}, config = {2}, formatVersion = {3}")
Review Comment:
> I believe it's also possible to simply remove the formatVersion parameter if this test is only for V2.
+1 to remove the `formatVersion` from this annotation, since we don't expect to add a new format version here due to deletion vectors.
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on code in PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#discussion_r2443917344
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java:
##########
@@ -85,17 +89,21 @@ public class TestRewritePositionDeleteFiles extends ExtensionsTestBase {
private static final int DELETE_FILES_PER_PARTITION = 2;
private static final int DELETE_FILE_SIZE = 10;
- @Parameters(name = "formatVersion = {0}, catalogName = {1}, implementation = {2}, config = {3}")
+ @Parameters(name = "catalogName = {0}, implementation = {1}, config = {2}, formatVersion = {3}")
Review Comment:
we should actually keep the format version and upgrade the test to also run with V3. I have some changes locally that I created a while ago to do that
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#discussion_r2443812112
##########
spark/v4.0/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestRewritePositionDeleteFiles.java:
##########
@@ -85,17 +89,21 @@ public class TestRewritePositionDeleteFiles extends ExtensionsTestBase {
private static final int DELETE_FILES_PER_PARTITION = 2;
private static final int DELETE_FILE_SIZE = 10;
- @Parameters(name = "formatVersion = {0}, catalogName = {1}, implementation = {2}, config = {3}")
+ @Parameters(name = "catalogName = {0}, implementation = {1}, config = {2}, formatVersion = {3}")
Review Comment:
> I believe it's also possible to simply remove the formatVersion parameter if this test is only for V2.
+1 to removing the `formatVersion` from this annotation, since I don't expect any new format versions to be added here given the deletion vectors.
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "tomtongue (via GitHub)" <gi...@apache.org>.
tomtongue commented on PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#issuecomment-3420803291
Thanks for the review and merge @nastra and thanks for checking this change @ebyhr!
--
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
Re: [PR] Spark 3.5, 4.0: Fix the format version parameter to match test parameters [iceberg]
Posted by "tomtongue (via GitHub)" <gi...@apache.org>.
tomtongue commented on PR #14376:
URL: https://github.com/apache/iceberg/pull/14376#issuecomment-3420478155
I believe it's also possible to simply remove the `formatVersion` parameter if this test is only for V2.
--
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
Re: [PR] Spark 3.5, 4.0: Fix the test parameters to match the corresponding values [iceberg]
Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra merged PR #14376:
URL: https://github.com/apache/iceberg/pull/14376
--
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