Skip to content

Commit 8486680

Browse files
committed
[SPARK-24544][SQL][FOLLOWUP] Remove a wrong warning on Hive fallback lookup
## What changes were proposed in this pull request? This PR is a follow-up of #21790 which causes a regression to show misleading warnings always at first invocation for all Hive function. Hive fallback lookup should not be warned. It's a normal process in function lookups. **CURRENT (Showing `NoSuchFunctionException` and working)** ```scala scala> sql("select histogram_numeric(a,2) from values(1) T(a)").show 19/06/02 22:02:10 WARN HiveSessionCatalog: Encountered a failure during looking up function: org.apache.spark.sql.catalyst.analysis.NoSuchFunctionException: Undefined function: 'histogram_numeric'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; at org.apache.spark.sql.catalyst.catalog.SessionCatalog.failFunctionLookup(SessionCatalog.scala:1234) at org.apache.spark.sql.catalyst.catalog.SessionCatalog.lookupFunction(SessionCatalog.scala:1302) ... +------------------------+ |histogram_numeric( a, 2)| +------------------------+ | [[1.0, 1.0]]| +------------------------+ ``` ## How was this patch tested? Manually execute the above query. Closes #24773 from dongjoon-hyun/SPARK-24544. Authored-by: Dongjoon Hyun <dhyun@apple.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
1 parent 8b18ef5 commit 8486680

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ private[sql] class HiveSessionCatalog(
142142
// let's try to load it as a Hive's built-in function.
143143
// Hive is case insensitive.
144144
val functionName = funcName.unquotedString.toLowerCase(Locale.ROOT)
145-
logWarning("Encountered a failure during looking up function:" +
146-
s" ${Utils.exceptionString(error)}")
147145
if (!hiveFunctions.contains(functionName)) {
148146
failFunctionLookup(funcName, Some(error))
149147
}

0 commit comments

Comments
 (0)