You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ge...@apache.org on 2025/03/26 18:04:58 UTC
(spark) branch master updated: [SPARK-51525][DOCS][SQL] Desc As JSON test for top-level default collation field
This is an automated email from the ASF dual-hosted git repository.
gengliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 400b4d00ac17 [SPARK-51525][DOCS][SQL] Desc As JSON test for top-level default collation field
400b4d00ac17 is described below
commit 400b4d00ac175d87e9eacbdea055f9c9908566ea
Author: Amanda Liu <am...@databricks.com>
AuthorDate: Wed Mar 26 11:04:49 2025 -0700
[SPARK-51525][DOCS][SQL] Desc As JSON test for top-level default collation field
### What changes were proposed in this pull request?
Add collation field to Desc As JSON docs
### Why are the changes needed?
Document support of collation in Desc As JSON
### Does this PR introduce _any_ user-facing change?
Yes, docs change
### How was this patch tested?
NA
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #50404 from asl3/asl3/descasjson-collationdocs.
Authored-by: Amanda Liu <am...@databricks.com>
Signed-off-by: Gengliang Wang <ge...@apache.org>
---
docs/sql-ref-syntax-aux-describe-table.md | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/docs/sql-ref-syntax-aux-describe-table.md b/docs/sql-ref-syntax-aux-describe-table.md
index 100424a865b8..450c6f8f3ee5 100644
--- a/docs/sql-ref-syntax-aux-describe-table.md
+++ b/docs/sql-ref-syntax-aux-describe-table.md
@@ -60,9 +60,9 @@ to return the metadata pertaining to a partition or column respectively.
The supplied column name may be optionally qualified. Parameters `partition_spec`
and `col_name` are mutually exclusive and can not be specified together. Currently
nested columns are not allowed to be specified.
-
+
JSON format is not currently supported for individual columns.
-
+
**Syntax:** `[ database_name. ] [ table_name. ] column_name`
* **AS JSON**
@@ -73,10 +73,10 @@ to return the metadata pertaining to a partition or column respectively.
**Syntax:** `[ AS JSON ]`
**Schema:**
-
+
Below is the full JSON schema.
In actual output, null fields are omitted and the JSON is not pretty-printed (see Examples).
-
+
```sql
{
"table_name": "<table_name>",
@@ -123,7 +123,8 @@ to return the metadata pertaining to a partition or column respectively.
"created_time": "<yyyy-MM-dd'T'HH:mm:ss'Z'>",
"created_by": "<created_by>",
"last_access": "<yyyy-MM-dd'T'HH:mm:ss'Z'>",
- "partition_provider": "<partition_provider>"
+ "partition_provider": "<partition_provider>",
+ "collation": "<default_collation>"
}
```
@@ -138,7 +139,7 @@ to return the metadata pertaining to a partition or column respectively.
| FloatType | `{ "name" : "float" }` |
| DoubleType | `{ "name" : "double" }` |
| DecimalType | `{ "name" : "decimal", "precision": p, "scale": s }` |
-| StringType | `{ "name" : "string" }` |
+| StringType | `{ "name" : "string", "collation": "<collation>" }` |
| VarCharType | `{ "name" : "varchar", "length": n }` |
| CharType | `{ "name" : "char", "length": n }` |
| BinaryType | `{ "name" : "binary" }` |
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org