dongjoon-hyun commented on a change in pull request #31804:
URL: https://github.com/apache/spark/pull/31804#discussion_r592066222
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -843,11 +843,22 @@ case class ShowTablesCommand(
val database = tableIdent.database.getOrElse("")
val tableName = tableIdent.table
val isTemp = catalog.isTempView(tableIdent)
+ val catalogTable =
catalog.getTempViewOrPermanentTableMetadata(tableIdent)
+ val isView = catalogTable.tableType == CatalogTableType.VIEW
if (isExtended) {
- val information =
catalog.getTempViewOrPermanentTableMetadata(tableIdent).simpleString
- Row(database, tableName, isTemp, s"$information\n")
+ val information = catalogTable.simpleString
+ if (output.size == 5) {
+ Row(database, tableName, isTemp, s"$information\n", isView)
+ } else {
+ Row(database, tableName, isTemp, s"$information\n")
+ }
} else {
- Row(database, tableName, isTemp)
+ if (output.size == 4) {
+ Row(database, tableName, isTemp, isView)
+ } else {
+ Row(database, tableName, isTemp)
Review comment:
Do we still have a test coverage for this line?
----------------------------------------------------------------
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]