Skip to content

Conversation

@chaoqin-li1123
Copy link
Contributor

@chaoqin-li1123 chaoqin-li1123 commented Jun 6, 2024

What changes were proposed in this pull request?

Add back python streaming data source connect test. Previously we remove this test because it fails in pure python spark connect library due to missing py4j.
This is because in python_streaming_source_runner, we import from pyspark.java_gateway instead of pyspark.utils, and pyspark.java_gateway requires py4j
from pyspark.java_gateway import local_connect_and_auth
This was introduced in c8c2492 accidentally.

Why are the changes needed?

Add spark connect test for python streaming data source.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Test change.

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

No.

…reaming data source

### What changes were proposed in this pull request?
Make python streaming data source pyspark test also runs on spark connect. Refactor the test because foreachbatch runs on spark connect server and do not update local variable.

### Why are the changes needed?
Test python streaming data source on spark connect.

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

### How was this patch tested?
Test change.

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

Closes apache#45950 from chaoqin-li1123/source_spark_connect.

Authored-by: Chaoqin Li <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@chaoqin-li1123
Copy link
Contributor Author

@HyukjinKwon Thanks for helping with debugging this issue!

@chaoqin-li1123 chaoqin-li1123 changed the title [WIP] fix python streaming data source connect test [SPARK-47777] fix python streaming data source connect test Jun 11, 2024
@HyukjinKwon
Copy link
Member

Merged to master.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants