ayushbilala commented on code in PR #54824:
URL: https://github.com/apache/spark/pull/54824#discussion_r3208571236
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowTablesExtendedExec.scala:
##########
@@ -73,6 +85,46 @@ case class ShowTablesExtendedExec(
rows.toSeq
}
+ private def runAsJson(): Seq[InternalRow] = {
+ val jsonRows = new ArrayBuffer[JObject]()
+
+ // fetch tables
+ val tables = catalog.listTables(namespace.toArray)
+ tables.foreach { tableIdent =>
+ if (StringUtils.filterPattern(Seq(tableIdent.name()), pattern).nonEmpty)
{
+ // V2 persistent tables are always TABLE
Review Comment:
Fixed. In ShowTablesJsonExec, each identifier from listTables() /
listTableAndViewSummaries() is now passed through isTempView(ident), which
checks SessionCatalog.isTempView when catalog is V2SessionCatalog.
Temp views returned by listTables() are correctly identified and emitted
with type=VIEW, isTemporary=true.
--
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]