cloud-fan commented on a change in pull request #27952: [SPARK-31184][SQL] 
Support getTablesByType API of Hive Client
URL: https://github.com/apache/spark/pull/27952#discussion_r394810540
 
 

 ##########
 File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala
 ##########
 @@ -363,6 +370,15 @@ private[client] class Shim_v0_12 extends Shim with 
Logging {
     conf.getIntVar(HiveConf.ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY) * 
1000L
   }
 
+  override def getTablesByType(
+      hive: Hive,
+      dbName: String,
+      pattern: String,
+      tableType: TableType): Seq[String] = {
+    throw new UnsupportedOperationException("Hive 2.2 and lower versions don't 
support " +
+      "getTablesByType. Please use Hive 2.3 or higher version.")
 
 Review comment:
   Can't we do the fallback here? It's better to make the low-level API 
completed, e.g. `getTablesByType` always sucess, but may be optimized with Hive 
2.3+ 

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to