Add Spark interop test for reading Puffin deletion vectors#3476
Open
moomindani wants to merge 1 commit into
Open
Add Spark interop test for reading Puffin deletion vectors#3476moomindani wants to merge 1 commit into
moomindani wants to merge 1 commit into
Conversation
ebyhr
approved these changes
Jun 10, 2026
ebyhr
left a comment
Member
There was a problem hiding this comment.
Looks good to me except for comments.
Comment on lines
+25
to
+27
| def run_spark_commands(spark: SparkSession, sqls: list[str]) -> None: | ||
| for sql in sqls: | ||
| spark.sql(sql) |
Member
There was a problem hiding this comment.
I'm not certain if we truly require this method, as calling the sql method is simpler.
spark.sql(f"DROP TABLE IF EXISTS {identifier}")
vs
run_spark_commands(spark, [f"DROP TABLE IF EXISTS {identifier}"])No requested change. I know there's already a similar method in other classes.
|
|
||
|
|
||
| @pytest.mark.integration | ||
| def test_read_spark_written_puffin_dv(spark: SparkSession, session_catalog: RestCatalog) -> None: |
Member
There was a problem hiding this comment.
How about moving this test to test_deletes.py?
Comment on lines
+64
to
+68
| assert len(delete_manifests) > 0, "Expected delete manifest with DVs" | ||
|
|
||
| delete_manifest = delete_manifests[0] | ||
| entries = list(delete_manifest.fetch_manifest_entry(table.io)) | ||
| assert len(entries) > 0, "Expected at least one delete file entry" |
Member
There was a problem hiding this comment.
Is there any reason we avoid using the ... == 1 condition?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Extracted from #3474 per review feedback (#3474 (comment)): this integration test verifies that PyIceberg can read Puffin deletion vectors written by Spark, which holds independently of the
PuffinWriterchanges in that PR.Are these changes tested?
This PR is test-only. The test passed CI as part of #3474 (integration-test job) before being extracted.
Are there any user-facing changes?
No.