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

[FEA] disallow nested with_spark_session and throw an exception if it is nested in integration test #9412

Open
thirtiseven opened this issue Oct 10, 2023 · 0 comments
Labels
test Only impacts tests

Comments

@thirtiseven
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
with_spark_session should not allowed to be nested because it will lead to some unexpected behaviors.

with_spark_session calls reset_spark_session_conf which does more than just reset the conf.

It clears out the catalog too with no way to get the original config or catalog back after it exits.

That means with_gpu_session -> with_cpu_session will result in the GPU query running on the CPU after the with_cpu_session.

Describe the solution you'd like
Throw an exception if with_spark_session is nested inside another with_spark_session.
If there are some nested with_spark_session in current integration test, we should also fix them.

Additional context
This is a follow-on issue of #9405

@thirtiseven thirtiseven added feature request New feature or request ? - Needs Triage Need team to review and classify labels Oct 10, 2023
@mattahrens mattahrens added test Only impacts tests and removed feature request New feature or request ? - Needs Triage Need team to review and classify labels Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Only impacts tests
Projects
None yet
Development

No branches or pull requests

2 participants