Skip to content

docs: clarify SparkPhysicalExprAdapter cast checks differ from CometCast.isSupported - #5232

Open
mbutrovich wants to merge 1 commit into
apache:mainfrom
mbutrovich:cast_docs
Open

docs: clarify SparkPhysicalExprAdapter cast checks differ from CometCast.isSupported#5232
mbutrovich wants to merge 1 commit into
apache:mainfrom
mbutrovich:cast_docs

Conversation

@mbutrovich

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

SparkPhysicalExprAdapter::replace_with_spark_cast (native, scan-time Parquet schema evolution) and CometCast.isSupported (Scala, Catalyst Cast expression legality) enforce two different Spark surfaces but feed the same native cast kernel, which made it easy to assume they should cross-check each other. Nothing is broken today, but neither function said which Spark reference it is supposed to track, inviting a future change to conflate the two.

What changes are included in this PR?

  • Doc comment on replace_with_spark_cast noting it mirrors Spark's vectorized Parquet reader (ParquetVectorUpdaterFactory.getUpdater) for schema-evolution casts, not CometCast.isSupported.
  • Doc comment on the catch-all arm in cast_array naming both independent callers (CometCast.isSupported for the expression path, the schema adapter for the scan path) that are expected to have already gated the cast before it reaches the native kernel.

How are these changes tested?

Comment-only change, no behavior change. No new tests.

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