cloud-fan commented on code in PR #55441:
URL: https://github.com/apache/spark/pull/55441#discussion_r3339176333
##########
docs/sql-ref-syntax-aux-show-partitions.md:
##########
@@ -46,6 +46,31 @@ SHOW PARTITIONS table_identifier [ partition_spec ]
**Syntax:** `PARTITION ( partition_col_name = partition_col_val [ , ... ]
)`
+* **AS JSON**
+
+ An optional parameter to return the partition list as a single-row JSON
document
+ instead of the default tabular format. Only supported for V1 (session
catalog / Hive
+ metastore) tables.
+
+ **Syntax:** `[ AS JSON ]`
+
+ **Output schema:** A single column named `json_metadata` of type `STRING
NOT NULL`.
+
+ **Schema:**
+
+ Below is the full JSON schema.
+ In actual output, the JSON is not pretty-printed (see Examples).
+
+ ```json
+ {
+ "partitions": ["<partition_string>", ...]
Review Comment:
we don't parse the value and do type inference, but
`year=2026/month=05/day=26` looks very internal and we should not expose it
directly. It's hive-specific and not all catalogs store like this.
--
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]