pan3793 commented on a change in pull request #31217:
URL: https://github.com/apache/spark/pull/31217#discussion_r559270420



##########
File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetColumnsOperation.scala
##########
@@ -102,8 +102,9 @@ private[hive] class SparkGetColumnsOperation(
 
       // Global temporary views
       val globalTempViewDb = catalog.globalTempViewManager.database
-      val databasePattern = 
Pattern.compile(CLIServiceUtils.patternToRegex(schemaName))
-      if (databasePattern.matcher(globalTempViewDb).matches()) {
+      if (schemaName == null || schemaName.isEmpty || schemaName == "*"
+        || Pattern.compile(CLIServiceUtils.patternToRegex(schemaName))
+        .matcher(globalTempViewDb).matches()) {

Review comment:
       Thanks for review @wangyum. SPARK-31634 talks about sql command, but 
this change affect thrift meta api. Can you clarify the relation between them?




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