Skip to content

[SPARK-58942][DOCS] Document CHAR/VARCHAR as a character string type family - #58224

Open
srielau wants to merge 1 commit into
apache:masterfrom
srielau:serge-rielau_data/SPARK-58942-docs
Open

[SPARK-58942][DOCS] Document CHAR/VARCHAR as a character string type family#58224
srielau wants to merge 1 commit into
apache:masterfrom
srielau:serge-rielau_data/SPARK-58942-docs

Conversation

@srielau

@srielau srielau commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Document CHAR / VARCHAR / STRING as a character string type family for
SPARK-58942, matching the
behavior behind spark.sql.charVarchar.standardSemantics.enabled.

  • Add Character String Types: type
    definitions, enablement, CAST vs assignment, least common type
    (CHAR(n) -> VARCHAR(n) -> STRING, analogous to integral types), expression
    result typing, comparisons and RTRIM collations, schema surfaces, and
    format/client metadata.
  • Rewrite the Data Types page so CHAR and VARCHAR are not described as special
    variants of STRING, and are not limited to table schemas.
  • Extend ANSI type precedence / least common type, link CAST and store
    assignment to the new page, and add a Spark 4.4 migration note.
  • Point SHOW COLLATIONS at the family page and update the generated
    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-centric
SQL 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

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant