amaliujia commented on code in PR #37241:
URL: https://github.com/apache/spark/pull/37241#discussion_r927007065


##########
sql/core/src/main/scala/org/apache/spark/sql/internal/CatalogImpl.scala:
##########
@@ -120,7 +120,13 @@ class CatalogImpl(sparkSession: SparkSession) extends 
Catalog {
       val plan = ShowTables(UnresolvedNamespace(ident), None)
       val ret = sparkSession.sessionState.executePlan(plan).toRdd.collect()
       val tables = ret
-        .map(row => ident ++ Seq(row.getString(1)))
+        .map(row =>
+          // for views, their namespace are empty

Review Comment:
   For example, for a temp view named `my_temp_table`, this is the internal row 
in-memory value: `[0,2000000000,200000000d,1,5f706d65745f796d,656c626174]` 
   
   `toCatalystRow(table.namespace().quoted, table.name(), isTempView(table))`. 
The isTempView is the third value, which is `200000000d`. 
   
   Also I actually don't know why there are five values in the row....



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