[SPARK-14013][SQL] Proper temp function support in catalog#11972
Closed
andrewor14 wants to merge 6 commits into
Closed
[SPARK-14013][SQL] Proper temp function support in catalog#11972andrewor14 wants to merge 6 commits into
andrewor14 wants to merge 6 commits into
Conversation
Contributor
|
cc @yhuai I took a quick look and it looks good -- but I didn't look at the details. |
|
Test build #54238 has finished for PR 11972 at commit
|
| } | ||
| val db = oldName.database.getOrElse(currentDb) | ||
| if (oldName.database.isDefined || !tempFunctions.containsKey(oldName.funcName)) { | ||
| lazy val oldBuilder = functionRegistry.lookupFunctionBuilder(oldName.funcName) |
Contributor
Author
There was a problem hiding this comment.
if database is defined we don't need to do it; this could save us a call to Hive
Contributor
|
Overall looks good. |
|
Test build #54341 has finished for PR 11972 at commit
|
Contributor
Author
|
retest this please |
|
Test build #54362 has finished for PR 11972 at commit
|
Contributor
Author
|
OK thanks, I'm merging this to unblock progress on other issues. |
|
Test build #54383 has finished for PR 11972 at commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Session catalog was added in #11750. However, it doesn't really support temporary functions properly; right now we only store the metadata in the form of
CatalogFunction, but this doesn't make sense for temporary functions because there is no class name.This patch moves the
FunctionRegistryinto theSessionCatalog. With this, the user can callcatalog.createTempFunctionandcatalog.lookupFunctionto use the function they registered previously. This is currently still dead code, however.How was this patch tested?
SessionCatalogSuite.