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-34152][SQL][FOLLOW-UP] Global temp view's identifier should be correctly stored #31783

Closed
wants to merge 3 commits into from

Conversation

imback82
Copy link
Contributor

@imback82 imback82 commented Mar 9, 2021

What changes were proposed in this pull request?

This PR proposed to fix a bug introduced in #31273 (https://github.com/apache/spark/pull/31273/files#r589494855).

Why are the changes needed?

This fixes a bug where global temp view's database name was not passed correctly.

Does this PR introduce any user-facing change?

Yes, now the global temp view's database is correctly stored.

How was this patch tested?

Added a new test that catches the bug.

@github-actions github-actions bot added the SQL label Mar 9, 2021
@imback82 imback82 changed the title [SPARK-34152][SQL][FOLLOW-UP] Global temp view [SPARK-34152][SQL][FOLLOW-UP] Global temp view's identifier should be correctly stored Mar 9, 2021
@imback82
Copy link
Contributor Author

imback82 commented Mar 9, 2021

cc @cloud-fan TIA!

@@ -909,4 +910,21 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
}
}
}

test("SPARK-34152: global temp view's identifier should be correctly stored") {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move it to the new GlobalTempViewTestSuite? we should slowly move all the view tests to SQLViewTestSuite framework.

Copy link
Member

Choose a reason for hiding this comment

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

+1 for @cloud-fan 's suggestion.


test("SPARK-34152: view's identifier should be correctly stored") {
Seq(true, false).foreach { storeAnalyzed =>
withSQLConf(STORE_ANALYZED_PLAN_FOR_VIEW.key -> storeAnalyzed.toString) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has no effect for permanent view, and please let me know if this is not desirable. I can introduce isTempView for each suite and only apply this if the suite is for a local or global temp view.

Copy link
Contributor

Choose a reason for hiding this comment

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

it's ok to have a little waste in the test.

@SparkQA
Copy link

SparkQA commented Mar 9, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40482/

@SparkQA
Copy link

SparkQA commented Mar 9, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40482/

@SparkQA
Copy link

SparkQA commented Mar 9, 2021

Test build #135900 has finished for PR 31783 at commit 3d2ef7f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in cf8bbc1 Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants