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-33714][SQL] Migrate ALTER VIEW ... SET/UNSET TBLPROPERTIES commands to use UnresolvedView to resolve the identifier #30676

Closed

Conversation

imback82
Copy link
Contributor

@imback82 imback82 commented Dec 8, 2020

What changes were proposed in this pull request?

This PR adds allowTemp flag to UnresolvedView so that Analyzer can check whether to resolve temp views or not.

This PR also migrates ALTER VIEW ... SET/UNSET TBLPROPERTIES to use UnresolvedView to resolve the table/view identifier. This allows consistent resolution rules (temp view first, etc.) to be applied for both v1/v2 commands. More info about the consistent resolution rule proposal can be found in JIRA or proposal doc.

Why are the changes needed?

To use UnresolvedView for view resolution.

One benefit is that the exception message is better for ALTER VIEW ... SET/UNSET TBLPROPERTIES. Before, if a temp view is passed, you will just get NoSuchTableException with Table or view 'tmpView' not found in database 'default'. But with this PR, you will get more description exception message: tmpView is a temp view. ALTER VIEW ... SET TBLPROPERTIES expects a permanent view.

Does this PR introduce any user-facing change?

The exception message changes as describe above.

How was this patch tested?

Updated existing tests.

@github-actions github-actions bot added the SQL label Dec 8, 2020
@SparkQA
Copy link

SparkQA commented Dec 8, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 8, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 8, 2020

Test build #132445 has finished for PR 30676 at commit 73befc3.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class AlterViewSetProperties(
  • case class AlterViewUnsetProperties(

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

Test build #132450 has finished for PR 30676 at commit db48c20.

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

@imback82
Copy link
Contributor Author

imback82 commented Dec 9, 2020

cc @cloud-fan, thanks in advance!

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

Test build #132451 has finished for PR 30676 at commit 99e7d4c.

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

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

Test build #132462 has finished for PR 30676 at commit 3425b99.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class RepairTable(child: LogicalPlan) extends Command

@imback82
Copy link
Contributor Author

imback82 commented Dec 9, 2020

retest this please

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 9, 2020

Test build #132503 has finished for PR 30676 at commit 3425b99.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class RepairTable(child: LogicalPlan) extends Command

@imback82
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Dec 10, 2020

Test build #132536 has finished for PR 30676 at commit 3425b99.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class RepairTable(child: LogicalPlan) extends Command

@imback82
Copy link
Contributor Author

retest this please

@cloud-fan
Copy link
Contributor

The GA shows that the failed tests are the well-known ones from the thrift-server module. I'm merging it to master, thanks!

@cloud-fan cloud-fan closed this in b112e2b Dec 10, 2020
@SparkQA
Copy link

SparkQA commented Dec 10, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 10, 2020

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

@SparkQA
Copy link

SparkQA commented Dec 10, 2020

Test build #132542 has finished for PR 30676 at commit 3425b99.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class RepairTable(child: LogicalPlan) extends Command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants