-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-17167] [SQL] Issue Exceptions when Analyze Table on In-Memory Cataloged Tables #14729
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-17167] [SQL] Issue Exceptions when Analyze Table on In-Memory Cataloged Tables #14729
Conversation
|
Test build #64134 has finished for PR 14729 at commit
|
|
retest this please |
|
Test build #64143 has finished for PR 14729 at commit
|
|
@gatorsmile shouldn't we do this the other way around? And enable Temporary tables might be a bit more difficult, but I feel like we should support them at some point. |
|
@hvanhovell In the current master branch, if we want to support In-Memory cataloged tables, we need to support data source tables. You know, If we plan to support |
|
@hvanhovell Not related to this PR. But I would like to ask that do we need to support temporary tables in |
|
@gatorsmile yeah, we should fix this issue for @viirya we do not need to support all kinds of temporary tables. However, you are allowed to create a temporary read only table (confusingly named a temporary view), which connects to some source using the data sources API. I want to make sure we support this case. |
|
@hvanhovell as I know, a temporary table will be resolved as arbitrary logical plan, instead of |
|
@viirya Yeah, a normal temporary table would be resolved as a LogicalPlan. Analyze Table does not give us any benefit there. However, you are also allowed to do this: CREATE TEMPORARY VIEW tmp1
USING parquet
OPTIONS(path 'some/location')For these I would like to be able to collect statistics. |
|
@hvanhovell Will submit a PR for Spark 2.0 tomorrow. Thanks! |
|
Thanks! |
|
The PR #14781 is opened. This one will be closed. Thanks! |
What changes were proposed in this pull request?
Currently,
Analyze Tableis only used for Hive-serde tables. We should issue exceptions in all the other cases. When the tables are data source tables, we issued an exception. However, when tables are In-Memory Cataloged tables, we do not issue any exception.This PR is to issue an exception when the tables are in-memory cataloged. For example,
tblis aSimpleCatalogRelationwhen the hive support is not enabled.How was this patch tested?
Added two test cases. One of them is just to improve the test coverage when the analyzed table is data source tables.