You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ashutosh-jindal (via GitHub)" <gi...@apache.org> on 2026/10/15 16:57:41 UTC
[PR] [SPARK-54733][SQL] Desc As Json GeographyType [spark]
ashutosh-jindal opened a new pull request, #59517:
URL: https://github.com/apache/spark/pull/59517
### What changes were proposed in this pull request?
Adds a dedicated `GeographyType` case to `DescribeRelationJsonCommand.jsonType()` so `DESCRIBE TABLE AS JSON` reports the SRID as a structured `srid` field instead of folding it into the type name string, matching the existing `decimal`/`varchar`/`char` pattern.
Output shape:
```json
{"name": "geography", "srid": "4326"}
```
Mixed-SRID columns report `"srid": "ANY"`.
### Why are the changes needed?
`GeographyType` currently falls through to the generic default case in `jsonType()`, so its SRID is embedded in the `name` string (e.g. `"geography(4326)"`) instead of being exposed as a separate field, making it harder for JSON consumers to parse.
### Does this PR introduce _any_ user-facing change?
Yes. `DESCRIBE TABLE AS JSON` output for `GeographyType` columns now includes a structured `srid` field. See `docs/sql-ref-syntax-aux-describe-table.md` for the updated JSON schema and example.
### How was this patch tested?
Added tests in `v1/DescribeTableSuite.scala` covering a fixed-SRID column, a mixed-SRID (`ANY`) column on a temp view, and a `GeographyType` field nested in a struct.
### Was this patch authored or co-authored using generative AI tooling?
Yes. Generated-by: Code Puppy (pawder), an AI coding agent, with human review.
--
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