Skip to content

[SPARK-55275] Add InvalidPlanInput sql states for sql/connect#54652

Open
garlandz-db wants to merge 3 commits intoapache:masterfrom
garlandz-db:SPARK-55275_invalid
Open

[SPARK-55275] Add InvalidPlanInput sql states for sql/connect#54652
garlandz-db wants to merge 3 commits intoapache:masterfrom
garlandz-db:SPARK-55275_invalid

Conversation

@garlandz-db
Copy link
Contributor

@garlandz-db garlandz-db commented Mar 6, 2026

What changes were proposed in this pull request?

Add error class SPARK_CONNECT_INVALID_PLAN_INPUT with 65
subclasses, covering all InvalidPlanInput throw sites across the Spark Connect layer (InvalidInputErrors,
DataTypeProtoConverter, LiteralValueProtoConverter, SparkConnectAnalyzeHandler, SessionHolder,
SparkConnectPlanner).

Why are the changes needed?

InvalidPlanInput exceptions previously defaulted to INTERNAL_ERROR (SQL state XX000), making plan-input validation
failures indistinguishable from genuine internal errors. Follows the pattern of #54056 which added XXSC0 for
IllegalStateException.

Does this PR introduce any user-facing change?

Yes. InvalidPlanInput exceptions now carry SQL state XXSC1 and structured error conditions
(SPARK_CONNECT_INVALID_PLAN_INPUT.<SUBCLASS>) instead of INTERNAL_ERROR / XX000.

How was this patch tested?

Updated InvalidInputErrorsSuite to assert new error conditions and getSqlState() == "XXSC1". All 5 tests pass.
IllegalStateErrorsSuite (17 tests) unchanged and passing.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Sonnet 4.6

@garlandz-db garlandz-db closed this Mar 6, 2026
@garlandz-db garlandz-db reopened this Mar 6, 2026
@garlandz-db garlandz-db changed the title Add InvalidPlanInput sql states for sql/connect [SPARK-55275] Add InvalidPlanInput sql states for sql/connect Mar 6, 2026
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