Skip to content

[SPARK-59148][PYTHON][CONNECT][TEST][4.0] Skip test_nested_dataframes in the Spark Connect compatibility test - #58446

Closed
LuciferYang wants to merge 1 commit into
apache:branch-4.0from
LuciferYang:skip-nested-dataframes-compat-40
Closed

[SPARK-59148][PYTHON][CONNECT][TEST][4.0] Skip test_nested_dataframes in the Spark Connect compatibility test#58446
LuciferYang wants to merge 1 commit into
apache:branch-4.0from
LuciferYang:skip-nested-dataframes-compat-40

Conversation

@LuciferYang

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Skip StreamingForeachBatchParityTests.test_nested_dataframes when SPARK_SKIP_CONNECT_COMPAT_TESTS is set.

Why are the changes needed?

The Spark Connect compatibility jobs run this branch's pyspark-connect tests against a server built from master. The pyspark-connect-old-client job in build_and_test.yml and build_python_connect40.yml both clone branch-4.0 for the client side.

#55410 (SPARK-44462) changes the server so the DataFrame handed to foreachBatch is bound to the session StreamExecution clones for the query, which is what classic foreachBatch already does. test_nested_dataframes creates a temp view from the batch DataFrame and reads it back through the client session, so against that server it fails:

File ".../connect/streaming/test_parity_foreach_batch.py", line 49, in test_nested_dataframes
    collected = self.spark.sql("select * from batch_updates").collect()
pyspark.errors.exceptions.connect.AnalysisException: [TABLE_OR_VIEW_NOT_FOUND] The table or view `batch_updates` cannot be found.

Failing run: https://github.com/LuciferYang/spark/actions/runs/33346837991/job/99354964415

The assertion holds for a 4.0 server, so the guard is scoped to the compatibility jobs and this branch's own CI keeps running the test. SPARK-52077 skipped ArrowUDTFParityTests the same way.

Does this PR introduce any user-facing change?

No, test-only.

How was this patch tested?

test_nested_dataframes still runs with SPARK_SKIP_CONNECT_COMPAT_TESTS unset and is skipped with it set to 1. This branch's CI cannot exercise the case the guard is for, since it runs against a 4.0 server; the pyspark-connect-old-client job on #55410 is what verifies it, once this lands.

Pass GitHub Actions.

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

Generated-by: Claude Code

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, cc @HyukjinKwon here, as per #55410

@HyukjinKwon HyukjinKwon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM!

LuciferYang added a commit that referenced this pull request Sep 2, 2026
… in the Spark Connect compatibility test

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

Skip `StreamingForeachBatchParityTests.test_nested_dataframes` when `SPARK_SKIP_CONNECT_COMPAT_TESTS` is set.

### Why are the changes needed?

The Spark Connect compatibility jobs run this branch's `pyspark-connect` tests against a server built from `master`. The `pyspark-connect-old-client` job in `build_and_test.yml` and `build_python_connect40.yml` both clone `branch-4.0` for the client side.

#55410 (SPARK-44462) changes the server so the DataFrame handed to `foreachBatch` is bound to the session `StreamExecution` clones for the query, which is what classic `foreachBatch` already does. `test_nested_dataframes` creates a temp view from the batch DataFrame and reads it back through the client session, so against that server it fails:

```
File ".../connect/streaming/test_parity_foreach_batch.py", line 49, in test_nested_dataframes
    collected = self.spark.sql("select * from batch_updates").collect()
pyspark.errors.exceptions.connect.AnalysisException: [TABLE_OR_VIEW_NOT_FOUND] The table or view `batch_updates` cannot be found.
```

Failing run: https://github.com/LuciferYang/spark/actions/runs/33346837991/job/99354964415

The assertion holds for a 4.0 server, so the guard is scoped to the compatibility jobs and this branch's own CI keeps running the test. SPARK-52077 skipped `ArrowUDTFParityTests` the same way.

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

No, test-only.

### How was this patch tested?

`test_nested_dataframes` still runs with `SPARK_SKIP_CONNECT_COMPAT_TESTS` unset and is skipped with it set to `1`. This branch's CI cannot exercise the case the guard is for, since it runs against a 4.0 server; the `pyspark-connect-old-client` job on #55410 is what verifies it, once this lands.

Pass GitHub Actions.

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

Generated-by: Claude Code

Closes #58446 from LuciferYang/skip-nested-dataframes-compat-40.

Authored-by: YangJie <yangjie01@baidu.com>
Signed-off-by: yangjie01 <yangjie01@baidu.com>
@LuciferYang LuciferYang closed this Sep 2, 2026
@LuciferYang

Copy link
Copy Markdown
Contributor Author

Merge Summary:

Posted by merge_spark_pr.py

@LuciferYang

Copy link
Copy Markdown
Contributor Author

Thank you @HyukjinKwon @uros-b

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.

3 participants