[SPARK-58942][DOCS] Document CHAR/VARCHAR as a character string type family - #58224
Open
srielau wants to merge 1 commit into
Open
[SPARK-58942][DOCS] Document CHAR/VARCHAR as a character string type family#58224srielau wants to merge 1 commit into
srielau wants to merge 1 commit into
Conversation
…family Present CHAR, VARCHAR, and STRING as peer types with the precedence CHAR -> VARCHAR -> STRING, matching the semantics behind spark.sql.charVarchar.standardSemantics.enabled. Add a SQL reference page for length, CAST vs assignment, least-common-type, expression results, comparisons, collations, schema surfaces, and format/client metadata. Update Data Types, ANSI type coercion, SHOW COLLATIONS, the 4.4 migration guide, and the configuration description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Document
CHAR/VARCHAR/STRINGas a character string type family forSPARK-58942, matching the
behavior behind
spark.sql.charVarchar.standardSemantics.enabled.definitions, enablement, CAST vs assignment, least common type
(
CHAR(n) -> VARCHAR(n) -> STRING, analogous to integral types), expressionresult typing, comparisons and RTRIM collations, schema surfaces, and
format/client metadata.
variants of STRING, and are not limited to table schemas.
assignment to the new page, and add a Spark 4.4 migration note.
configuration description.
Parent: SPARK-58794.
Why are the changes needed?
Existing docs still describe CHAR/VARCHAR as annotated STRING used only in
table schemas. That is the Spark 3.1 story and no longer matches the first-class
type family implemented under
standardSemantics. Users need Spark-centricSQL reference for length, padding, CAST vs assignment, LCT, and STRING-returning
transforms.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Documentation only. Local Markdown links and SQL menu YAML were checked. The
Jekyll site was built with
SKIP_API=1 SKIP_ERRORDOC=1 bundle exec jekyll build.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Cursor Grok 4.6