cloud-fan commented on code in PR #55441:
URL: https://github.com/apache/spark/pull/55441#discussion_r3440692017


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala:
##########
@@ -1480,6 +1480,29 @@ class SparkSqlAstBuilder extends AstBuilder {
     }
   }
 
+  /**
+   * Overrides `SHOW PARTITIONS` parsing to intercept the `AS JSON` variant.
+   *
+   * When `AS JSON` is absent, parsing is delegated to the superclass
+   * ([[AstBuilder#visitShowPartitions]]), which produces a [[ShowPartitions]] 
logical plan
+   *
+   * When `AS JSON` is present, this method produces a 
[[ShowPartitionsJsonCommand]] directly —
+   * a runnable command that returns partition metadata as a single-row JSON 
document.

Review Comment:
   Two trivial Scaladoc cleanups: the first sentence is missing its period, and 
the em-dash is non-ASCII (Spark keeps comments ASCII-only).
   ```suggestion
      * ([[AstBuilder#visitShowPartitions]]), which produces a 
[[ShowPartitions]] logical plan.
      *
      * When `AS JSON` is present, this method produces a 
[[ShowPartitionsJsonCommand]] directly -
      * a runnable command that returns partition metadata as a single-row JSON 
document.
   ```



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