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

Pass existing server_side_parameters to session connection wrapper and use to configure SparkSession. #691

Closed
wants to merge 5 commits into from

Conversation

alarocca-apixio
Copy link
Contributor

resolves #690

Description

Pass existing server_side_parameters to session connection wrapper and use to configure SparkSession.

Checklist

@alarocca-apixio alarocca-apixio requested a review from a team as a code owner March 21, 2023 20:44
@cla-bot cla-bot bot added the cla:yes label Mar 21, 2023
@@ -449,7 +449,7 @@ def open(cls, connection):
SessionConnectionWrapper,
)

handle = SessionConnectionWrapper(Connection())
handle = SessionConnectionWrapper(Connection(), creds.server_side_parameters)
Copy link
Contributor

@Fokko Fokko May 15, 2023

Choose a reason for hiding this comment

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

I would rather pass this in the Connection constructor.

Suggested change
handle = SessionConnectionWrapper(Connection(), creds.server_side_parameters)
handle = SessionConnectionWrapper(Connection(creds.server_side_parameters))

And then the connection can pass it down to the constructor of the Cursor. The config doesn't change between .execute() calls, so I think it makes more sense to pass it in the constructors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Fokko I haven't tested this, but is the new code what you had in mind?

Copy link
Contributor

Choose a reason for hiding this comment

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

@alarocca-apixio That's exactly what I had in mind, thanks!

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

I just gave this a swing locally, and it works like a charm! Thanks @alarocca-apixio for picking this up

@dataders dataders added ok_to_test ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering labels May 17, 2023
@JCZuurmond
Copy link
Collaborator

Prefer PR #823 823

@JCZuurmond JCZuurmond closed this Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADAP-405] [Feature] Use server_side_parameters as SparkSession config in Spark "session" mode
4 participants