-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-22954][SQL] Fix the exception thrown by Analyze command on temporary views to throw AnalysisException #20177
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
Conversation
…ooked up by session state's catalog.
…d instead of Some('default')
…ad of NoSuchTableException
|
ok to test |
|
what's the error message after this patch? |
|
Test build #85781 has finished for PR 20177 at commit
|
|
The error message after the patch: |
|
can you fix the test? |
| assertNoSuchTable(s"SHOW PARTITIONS $viewName") | ||
| assertNoSuchTable(s"ANALYZE TABLE $viewName COMPUTE STATISTICS") | ||
| assertNoSuchTable(s"ANALYZE TABLE $viewName COMPUTE STATISTICS FOR COLUMNS id") | ||
| assertAnalysisException(s"ANALYZE TABLE $viewName COMPUTE STATISTICS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also check the error message to ensure the AnalysisException is not thrown from elsewhere.
|
We shall also update |
…ands - AnalyzeColum and AnalyzePartition. Fix tests to check if the error messages are proper.
|
Test build #86424 has finished for PR 20177 at commit
|
|
Test build #86425 has finished for PR 20177 at commit
|
|
I updated AnalyzePartitionCommand and AnalyzeColumnCommand. I noticed another one - According to SQLViewSuite, calling truncate on view must throw NoSuchTable, where as in TruncateTableCommand class I noticed this A bug? |
|
Test build #86426 has finished for PR 20177 at commit
|
|
actually it's not really useful to have |
|
I did't understand why the build is getting killed. |
|
retest this please |
|
Test build #86506 has finished for PR 20177 at commit
|
|
Could you also add test cases that cover ANALYZE PARTITION and ANALYZE COLUMN queries? |
…rtition on view throws AnalyzeException telling that it isn't supported on views.
|
Done. Added test cases to cover ANALYZE PARTITION and ANALYZE COLUMN queries. |
|
Test build #86791 has finished for PR 20177 at commit
|
|
ok to test |
|
cc @wzhfy |
|
Test build #90807 has finished for PR 20177 at commit
|
|
Can one of the admins verify this patch? |
Closes apache#17422 Closes apache#17619 Closes apache#18034 Closes apache#18229 Closes apache#18268 Closes apache#17973 Closes apache#18125 Closes apache#18918 Closes apache#19274 Closes apache#19456 Closes apache#19510 Closes apache#19420 Closes apache#20090 Closes apache#20177 Closes apache#20304 Closes apache#20319 Closes apache#20543 Closes apache#20437 Closes apache#21261 Closes apache#21726 Closes apache#14653 Closes apache#13143 Closes apache#17894 Closes apache#19758 Closes apache#12951 Closes apache#17092 Closes apache#21240 Closes apache#16910 Closes apache#12904 Closes apache#21731 Closes apache#21095 Added: Closes apache#19233 Closes apache#20100 Closes apache#21453 Closes apache#21455 Closes apache#18477 Added: Closes apache#21812 Closes apache#21787 Author: hyukjinkwon <[email protected]> Closes apache#21781 from HyukjinKwon/closing-prs.
What changes were proposed in this pull request?
Previously running ANALYZE on temporary views produced NoSuchTableException even though the view was present. It is misleading. So it has to be changed to throw AnalysisException since it comes in the analysis part.
How was this patch tested?
Some unit tests were fixed to intercept AnalysisException instead of NoSuchTableException.