Skip to content

Conversation

@amanomer
Copy link
Contributor

@amanomer amanomer commented Dec 2, 2019

What changes were proposed in this pull request?

Improved error message while creating views.

Why are the changes needed?

Error message should suggest user to use TEMPORARY keyword while creating permanent view referred by temporary view.
#26317 (comment)

Does this PR introduce any user-facing change?

No

How was this patch tested?

Updated test case.

@amanomer
Copy link
Contributor Author

amanomer commented Dec 2, 2019

cc @gatorsmile

@amanomer
Copy link
Contributor Author

amanomer commented Dec 3, 2019

cc @srowen @cloud-fan

// temporary views are only stored in the session catalog
throw new AnalysisException(s"Not allowed to create a permanent view $name by " +
s"referencing a temporary view $ident")
s"referencing a temporary view $ident (use TEMPORARY keyword)")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ... referencing a temporary view $ident. Please create a temp view instead by CREATE TEMP VIEW

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@amanomer
Copy link
Contributor Author

amanomer commented Dec 3, 2019

Jenkins, test this please.

@amanomer amanomer requested a review from cloud-fan December 3, 2019 18:44
@amanomer
Copy link
Contributor Author

amanomer commented Dec 4, 2019

cc @cloud-fan

@cloud-fan
Copy link
Contributor

ok to test

@SparkQA
Copy link

SparkQA commented Dec 4, 2019

Test build #114858 has finished for PR 26731 at commit 8456ecd.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Dec 4, 2019

Test build #114865 has finished for PR 26731 at commit 7815d6e.

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

@amanomer
Copy link
Contributor Author

amanomer commented Dec 5, 2019

cc @cloud-fan

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 0bd8b99 Dec 5, 2019
attilapiros pushed a commit to attilapiros/spark that referenced this pull request Dec 6, 2019
### What changes were proposed in this pull request?
Improved error message while creating views.

### Why are the changes needed?
Error message should suggest user to use TEMPORARY keyword while creating permanent view referred by temporary view.
apache#26317 (comment)

### Does this PR introduce any user-facing change?
No

### How was this patch tested?
Updated test case.

Closes apache#26731 from amanomer/imp_err_msg.

Authored-by: Aman Omer <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
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