Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-48112][CONNECT] Expose session in SparkConnectPlanner to plugins #46363

Closed
wants to merge 2 commits into from

Conversation

tomvanbussel
Copy link
Contributor

What changes were proposed in this pull request?

This PR makes session in SparkConnectPlanner public so that it can be accessed by Spark Connect plugins. This method was public before but was made private. To prevent this from happening I have added @DeveloperApi as an annotation.

Why are the changes needed?

To allow the development of Spark Connect plugins.

Does this PR introduce any user-facing change?

No

How was this patch tested?

N/A

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

No

@@ -101,7 +101,8 @@ class SparkConnectPlanner(
throw new IllegalArgumentException("executeHolder does not belong to sessionHolder")
}

private[connect] def session: SparkSession = sessionHolder.session
@DeveloperApi
def session: SparkSession = sessionHolder.session
Copy link
Member

Choose a reason for hiding this comment

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

I am fine with this for now but I really think we should probably make SparkConnectPlanner an API first

@HyukjinKwon
Copy link
Member

Merged to master.

@dongjoon-hyun
Copy link
Member

Thank you. +1, LGTM.

JacobZheng0927 pushed a commit to JacobZheng0927/spark that referenced this pull request May 11, 2024
### What changes were proposed in this pull request?

This PR makes `session` in `SparkConnectPlanner` public so that it can be accessed by Spark Connect plugins. This method was public before but was made private. To prevent this from happening I have added `DeveloperApi` as an annotation.

### Why are the changes needed?

To allow the development of Spark Connect plugins.

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

No

### How was this patch tested?

N/A

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

No

Closes apache#46363 from tomvanbussel/SPARK-48112.

Authored-by: Tom van Bussel <tom.vanbussel@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants