wangyum commented on a change in pull request #32446:
URL: https://github.com/apache/spark/pull/32446#discussion_r627106096
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -273,7 +273,9 @@ private[hive] class HiveClientImpl(
if (clientLoader.cachedHive != null) {
clientLoader.cachedHive.asInstanceOf[Hive]
} else {
- val c = Hive.get(conf)
+ // don't register all Hive permanent functions in Hive's
FunctionRegistry since Spark loads
+ // them through direct HMS API calls
+ val c = Hive.getWithFastCheck(conf, false)
Review comment:
Verify the failed tests with the following changes?
```scala
import java.lang.{Boolean => JBoolean}
val hiveClass = Utils.classForName("org.apache.hadoop.hive.ql.metadata.Hive")
val getInternalMethod = hiveClass.getDeclaredMethod("getInternal",
classOf[HiveConf], classOf[Boolean], classOf[Boolean], classOf[Boolean])
getInternalMethod.setAccessible(true)
val c = getInternalMethod.invoke(hiveClass, conf, JBoolean.FALSE,
JBoolean.FALSE, JBoolean.FALSE).asInstanceOf[Hive]
clientLoader.cachedHive = c
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]