You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ayushbilala (via GitHub)" <gi...@apache.org> on 2026/06/01 16:59:47 UTC
Re: [PR] [SPARK-53840][SQL] Add AS JSON output support for SHOW TABLES and SHOW TABLE EXTENDED [spark]
ayushbilala commented on code in PR #54824:
URL: https://github.com/apache/spark/pull/54824#discussion_r3335832573
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala:
##########
@@ -1371,17 +1371,22 @@ case class RenameTable(
case class ShowTables(
namespace: LogicalPlan,
pattern: Option[String],
+ asJson: Boolean = false,
override val output: Seq[Attribute] = ShowTables.getOutputAttrs) extends UnaryCommand {
override def child: LogicalPlan = namespace
override protected def withNewChildInternal(newChild: LogicalPlan): ShowTables =
copy(namespace = newChild)
+ override protected def stringArgs: Iterator[Any] = Iterator(pattern, output)
Review Comment:
`stringArgs` override was added as a workaround for golden-file CI failures caused by adding `asJson: Boolean = false` to ShowTables/ShowTablesExtended/ShowTablesCommand (changing their simpleString output).
We plan to fix this by removing asJson from those plan nodes entirely. Since `AS JSON` queries will create a dedicated command node, there will be no reason for `ShowTables`/`ShowTablesExtended`/`ShowTablesCommand` to carry `asJson` at all making the stringArgs workaround unnecessary.
Does this approach match your intent?
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org