-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29482][SQL] ANALYZE TABLE should look up catalog/table like v2 commands #26129
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
|
Test build #112118 has finished for PR 26129 at commit
|
| * Create an [[AnalyzeTableStatement]], or an [[AnalyzeColumnStatement]]. | ||
| * Example SQL for analyzing a table or a set of partitions : | ||
| * {{{ | ||
| * ANALYZE TABLE [db_name.]tablename [PARTITION (partcol1[=val1], partcol2[=val2], ...)] |
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.
nit: db_name. needs to be updated now that multipartIdentifier is parsed? (although the scenario is not currently supported)
imback82
left a comment
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.
LGTM (one minor comment)
|
Test build #112136 has finished for PR 26129 at commit
|
|
retest this please |
|
Test build #112164 has finished for PR 26129 at commit
|
| case class UseStatement(isNamespaceSet: Boolean, nameParts: Seq[String]) extends ParsedStatement | ||
|
|
||
| /** | ||
| * A ANALYZE TABLE statement, as parsed from SQL. |
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.
Nit: A => An
| noScan: Boolean) extends ParsedStatement | ||
|
|
||
| /** | ||
| * A ANALYZE TABLE FOR COLUMNS statement, as parsed from SQL. |
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.
ditto
gengliangwang
left a comment
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.
LGTM except minor comments
|
Test build #112255 has finished for PR 26129 at commit
|
|
retest this please. |
|
Test build #112259 has finished for PR 26129 at commit
|
|
Thanks, merging to master! |
What changes were proposed in this pull request?
Add
AnalyzeTableStatementandAnalyzeColumnStatement, and make ANALYZE TABLE go through the same catalog/table resolution framework of v2 commands.Why are the changes needed?
It's important to make all the commands have the same table resolution behavior, to avoid confusing end-users. e.g.
Does this PR introduce any user-facing change?
yes. When running ANALYZE TABLE, Spark fails the command if the current catalog is set to a v2 catalog, or the table name specified a v2 catalog.
How was this patch tested?
new tests