Github user windpiger commented on a diff in the pull request: https://github.com/apache/spark/pull/16787#discussion_r99460822 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala --- @@ -778,6 +780,22 @@ private[hive] class HiveClientImpl( } + +} + +private[hive] object HiveClientImpl { + private lazy val shimDefault = IsolatedClientLoader.hiveVersion( + HiveUtils.hiveExecutionVersion) match { + case hive.v12 => new Shim_v0_12() + case hive.v13 => new Shim_v0_13() + case hive.v14 => new Shim_v0_14() + case hive.v1_0 => new Shim_v1_0() + case hive.v1_1 => new Shim_v1_1() + case hive.v1_2 => new Shim_v1_2() + } + + private lazy val hiveConf = new HiveConf(classOf[SessionState]) --- End diff -- thanks a lot! But if we don't create an Object, we should create a HiveClientImpl instance(created by HiveUtils) to use its helper function, and HiveUtils will call `IsolatedClientLoader` , I think it is not properly to do this to use the helper funtions.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org