[SPARK-58593][CONNECT] Add extension Any field to AnalyzePlanResponse - #57797
Open
mehdigharam-db wants to merge 1 commit into
Open
[SPARK-58593][CONNECT] Add extension Any field to AnalyzePlanResponse#57797mehdigharam-db wants to merge 1 commit into
mehdigharam-db wants to merge 1 commit into
Conversation
mehdigharam-db
marked this pull request as ready for review
August 5, 2026 17:22
Adds a `repeated google.protobuf.Any extensions = 999` field to AnalyzePlanResponse in base.proto, and regenerates the PySpark stubs. The field is placed outside the `result` oneof (unlike ExecutePlanResponse, where the extension is a oneof arm). AnalyzePlan is a unary RPC that returns a single response, so a single message must be able to carry both the regular result (e.g. the `schema` arm) and an accompanying extension; putting it inside the oneof would make them mutually exclusive.
mehdigharam-db
force-pushed
the
SPARK-58593-analyze-plan-response-extension
branch
from
August 5, 2026 17:29
a2adb17 to
a327bf0
Compare
HyukjinKwon
approved these changes
Aug 6, 2026
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?
Adds a
repeated google.protobuf.Any extensions = 999field toAnalyzePlanResponseinbase.proto, and regenerates the PySpark stubs accordingly.The field is placed outside the
resultoneof, unlikeExecutePlanResponsewhere theextension is a oneof arm. This is intentional:
AnalyzePlanis a unary RPC that returns asingle response, so a single message must be able to carry both the regular result (e.g.
the
schemaarm) and an accompanying extension. Putting it inside the oneof would makethe two mutually exclusive.
Why are the changes needed?
To let a Connect provider attach provider-specific metadata to an analyze response, the way
other messages in the protocol already allow.
AnalyzePlanResponseis currently the only major Spark Connect response type without anextension point.
ExecutePlanResponsehas one, as doUserContext,AnalyzePlanRequest.RequestOption,GetStatusRequestandGetStatusResponse. So aprovider that wants to return extra information alongside an analyze result -- schema
metadata, for instance -- has nowhere to put it today, and has to route the information through a separate call.
Does this PR introduce any user-facing change?
No. This adds a new optional proto field that nothing reads or writes yet.
How was this patch tested?
No new tests. This is a proto field addition with no server- or client-side behavior to
exercise.
Verified locally with the same checks the
bufCI job runs:dev/check-protos.py-- bothpyspark-connectandpyspark-streamingreport SUCCESS,confirming the committed stubs match the
.proto.buf breaking --against '...#branch=branch-4.0,subdir=sql/connect/common/src/main'--clean, as expected for adding a new field number.
Was this patch authored or co-authored using generative AI tooling?
Yes.
Co-authored using Claude Opus 5