pan3793 commented on code in PR #53531:
URL: https://github.com/apache/spark/pull/53531#discussion_r2639891550
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionResolution.scala:
##########
@@ -52,10 +51,11 @@ class FunctionResolution(
resolveBuiltinOrTempFunction(u.nameParts, u.arguments, u).getOrElse {
val CatalogAndIdentifier(catalog, ident) =
relationResolution.expandIdentifier(u.nameParts)
- if (CatalogV2Util.isSessionCatalog(catalog)) {
- resolveV1Function(ident.asFunctionIdentifier, u.arguments, u)
- } else {
- resolveV2Function(catalog.asFunctionCatalog, ident, u.arguments, u)
+ catalog.asFunctionCatalog.loadFunction(ident) match {
+ case V1Function(_) =>
+ resolveV1Function(ident.asFunctionIdentifier, u.arguments, u)
Review Comment:
@cloud-fan yes, the second time lookup looks cheap, do you have any concerns
about that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]