Skip to content

[SPARK-56165][PYTHON][TESTS] Use temporary directory instead of saveAsTable in test_data_source_segfault#54964

Closed
Yicong-Huang wants to merge 2 commits intoapache:masterfrom
Yicong-Huang:SPARK-56165
Closed

[SPARK-56165][PYTHON][TESTS] Use temporary directory instead of saveAsTable in test_data_source_segfault#54964
Yicong-Huang wants to merge 2 commits intoapache:masterfrom
Yicong-Huang:SPARK-56165

Conversation

@Yicong-Huang
Copy link
Contributor

@Yicong-Huang Yicong-Huang commented Mar 23, 2026

What changes were proposed in this pull request?

Replace saveAsTable("test_table") with .save(tempdir) in test_data_source_segfault's two write/commit subtests.

Why are the changes needed?

This is consistent with how other write tests in the same file are structured.

Does this PR introduce any user-facing change?

No. Test-only change.

How was this patch tested?

python/pyspark/sql/tests/test_python_datasource.py::test_data_source_segfault

Was this patch authored or co-authored using generative AI tooling?

No.

…sTable in test_data_source_segfault

### What changes were proposed in this pull request?

Replace `saveAsTable("test_table")` with `.save(tempdir)` in `test_data_source_segfault`'s two write/commit subtests.

### Why are the changes needed?

`saveAsTable()` triggers catalog format validation which can reject the custom `"test"` data source format. Using `.save(tempdir)` avoids catalog validation while exercising the same Python worker write/commit code paths. This is also consistent with how other write tests in the same file are structured.

### Does this PR introduce _any_ user-facing change?

No. Test-only change.

### How was this patch tested?

`python/pyspark/sql/tests/test_python_datasource.py::test_data_source_segfault` (12 subtests passed).

### Was this patch authored or co-authored using generative AI tooling?

No.
@Yicong-Huang
Copy link
Contributor Author

cc @ueshin @allisonwang-db

@zhengruifeng
Copy link
Contributor

merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants