Skip to content

Conversation

@HyukjinKwon
Copy link
Member

What changes were proposed in this pull request?

This PR proposes the Python implementations for #42009.

Why are the changes needed?

For the feature parity, and better control of query cancelation in Spark Connect

Does this PR introduce any user-facing change?

Yes. New Apis in Spark Connect Python client:

SparkSession.addTag
SparkSession.removeTag
SparkSession.getTags
SparkSession.clearTags
SparkSession.interruptTag
SparkSession.interruptOperation

How was this patch tested?

Unittests were added, and manually tested too.

Copy link
Contributor

@juliuszsompolski juliuszsompolski left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@HyukjinKwon
Copy link
Member Author

Merged to master and branch-3.5.

HyukjinKwon added a commit that referenced this pull request Jul 25, 2023
…Connect Python client

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

This PR proposes the Python implementations for #42009.

### Why are the changes needed?

For the feature parity, and better control of query cancelation in Spark Connect

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

Yes. New Apis in Spark Connect Python client:

```
SparkSession.addTag
SparkSession.removeTag
SparkSession.getTags
SparkSession.clearTags
SparkSession.interruptTag
SparkSession.interruptOperation
```

### How was this patch tested?

Unittests were added, and manually tested too.

Closes #42120 from HyukjinKwon/SPARK-44509.

Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit 5ee462d)
Signed-off-by: Hyukjin Kwon <[email protected]>
the $USER environment. Defining the user ID as part of the connection string
takes precedence.
"""
self.thread_local = threading.local()
Copy link
Member Author

Choose a reason for hiding this comment

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

BTW, there is difference here. Python's threadlocal isn't inheritable (and there's no such implementation in Python). So we should somehow workaround this ...

HyukjinKwon added a commit that referenced this pull request Jul 26, 2023
…cancellation API

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

This PR is a kind of a followup of #42120. This addresses my own comment at #42120 (comment) by adding the support of `InheritableThread` with Spark Connect.

### Why are the changes needed?

In order to allow the thread local hierarchy supported in Scala side.

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

The main PR is not released out yet so it doesn't have user-facing change.

### How was this patch tested?

Unittests were added.

Closes #42149 from HyukjinKwon/SPARK-44509-followup.

Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
HyukjinKwon added a commit that referenced this pull request Jul 31, 2023
### What changes were proposed in this pull request?

This PR is a followup of #42120 that fixes the test class name from `ArrowParityTests` to `JobCancellationTests`.

### Why are the changes needed?

The test class name doesn't make sense. It tests job cancellation.

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

No

### How was this patch tested?

Existing unittests should be good enough.

Closes #42229 from HyukjinKwon/minor-rename.

Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
HyukjinKwon added a commit that referenced this pull request Jul 31, 2023
### What changes were proposed in this pull request?

This PR is a followup of #42120 that fixes the test class name from `ArrowParityTests` to `JobCancellationTests`.

### Why are the changes needed?

The test class name doesn't make sense. It tests job cancellation.

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

No

### How was this patch tested?

Existing unittests should be good enough.

Closes #42229 from HyukjinKwon/minor-rename.

Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit af6e177)
Signed-off-by: Hyukjin Kwon <[email protected]>
@HyukjinKwon HyukjinKwon deleted the SPARK-44509 branch January 15, 2024 00:48
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