HyukjinKwon commented on a change in pull request #34360:
URL: https://github.com/apache/spark/pull/34360#discussion_r734152096



##########
File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -201,12 +201,13 @@ private[hive] class HiveClientImpl(
   }
 
   private def getHive(conf: HiveConf): Hive = {
-    VersionUtils.majorMinorPatchVersion(version.fullVersion).map {
-      case (2, 3, v) if v >= 9 => Hive.getWithoutRegisterFns(conf)
-      case _ => Hive.get(conf)
-    }.getOrElse {
-      throw QueryExecutionErrors.unsupportedHiveMetastoreVersionError(
-        version.fullVersion, HiveUtils.HIVE_METASTORE_VERSION.key)
+    try {
+      Hive.getWithoutRegisterFns(conf)
+    } catch {
+      // Not all Hive versions have the above method (e.g., Hive 2.3.9 has it 
but 2.3.8 don't),

Review comment:
       no big deal but I would add a JIRA number here tho..




-- 
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]

Reply via email to