MaxGekk commented on a change in pull request #29377:
URL: https://github.com/apache/spark/pull/29377#discussion_r466324216



##########
File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -759,15 +759,17 @@ private[hive] class HiveClientImpl(
       dbName: String,
       pattern: String,
       tableType: CatalogTableType): Seq[String] = withHiveState {
+    val hiveTableType = toHiveTableType(tableType)
     try {
       // Try with Hive API getTablesByType first, it's supported from Hive 
2.3+.
-      shim.getTablesByType(client, dbName, pattern, toHiveTableType(tableType))
+      shim.getTablesByType(client, dbName, pattern, hiveTableType)
     } catch {
       case _: UnsupportedOperationException =>
         // Fallback to filter logic if getTablesByType not supported.
         val tableNames = client.getTablesByPattern(dbName, pattern).asScala
-        val tables = getTablesByName(dbName, tableNames).filter(_.tableType == 
tableType)

Review comment:
       Master's patch conflicts with branch-3.0 because of different base line:
   - master: tableNames.toSeq
   - branch-3.0: tableNames
   
   Not on purpose but I removed @srowen 's changes 
https://github.com/apache/spark/commit/c28a6fa5112c9ba3839f52b737266f24fdfcf75b#diff-6fd847124f8eae45ba2de1cf7d6296feR769
 . I have realised that when I tried to cherry-pick the changes to branch-3.0. 
I will prepare a follow up PR for master.




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

Reply via email to