[SPARK-30040][SQL] DROP FUNCTION should do multi-catalog resolution#26854
[SPARK-30040][SQL] DROP FUNCTION should do multi-catalog resolution#26854planga82 wants to merge 3 commits intoapache:masterfrom
Conversation
| ShowFunctionsCommand(database, function, userScope, systemScope) | ||
|
|
||
| case DropFunctionStatement( | ||
| CatalogAndIdentifier(catalog, functionIdent), ifExists, isTemp) => |
There was a problem hiding this comment.
nit: This can go to the previous line.
case DropFunctionStatement(CatalogAndIdentifier(catalog, functionIdent), ifExists, isTemp) =>
|
ok to test |
|
Test build #115201 has finished for PR 26854 at commit
|
|
Test build #115215 has finished for PR 26854 at commit
|
| } | ||
|
|
||
| /** | ||
| * Create a [[DropFunctionCommand]] statement. |
There was a problem hiding this comment.
DropFunctionCommand -> DropFunctionStatement?
There was a problem hiding this comment.
Create a plan for a DROP FUNCTION statement. will be better here.
| ShowFunctionsCommand(database, function, userScope, systemScope) | ||
|
|
||
| case DropFunctionStatement(CatalogAndIdentifier(catalog, functionIdent), ifExists, isTemp) => | ||
| if (isSessionCatalog(catalog)) { |
There was a problem hiding this comment.
indentation from 508 to 518.
imback82
left a comment
There was a problem hiding this comment.
LGTM (once @dongjoon-hyun's comments are resolved)
There was a problem hiding this comment.
Looks good after resolving @dongjoon-hyun's comments and few style comments.
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
Outdated
Show resolved
Hide resolved
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
Outdated
Show resolved
Hide resolved
|
Merged to master. |
|
Test build #115252 has finished for PR 26854 at commit
|
What changes were proposed in this pull request?
Add DropFunctionStatement and make DROP FUNCTION 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
DROP FUNCTION namespace.function
Does this PR introduce any user-facing change?
Yes. When running DROP FUNCTION namespace.function Spark fails the command if the current catalog is set to a v2 catalog.
How was this patch tested?
Unit tests.