Skip to content

Conversation

garlandz-db
Copy link
Contributor

@garlandz-db garlandz-db commented Feb 27, 2025

What changes were proposed in this pull request?

  • piggyback off the spark version response and include other env properties like java/scala version

Why are the changes needed?

  • client is not able to know what type of java/scala version the server uses which can be problematic with udfs and client has different build env than server

Does this PR introduce any user-facing change?

  • no. the proto includes an additional response which doesn't change for existing users

How was this patch tested?

existing tests

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

No

@garlandz-db garlandz-db changed the title Add java/scala version in response [SPARK-51334] Add java/scala version in response Feb 27, 2025
@garlandz-db garlandz-db changed the title [SPARK-51334] Add java/scala version in response [SPARK-51334] Add java/scala version in analyze spark_version response Feb 27, 2025
@the-sakthi
Copy link
Member

I think we could add some tests here to verify the change in the response?

@HyukjinKwon HyukjinKwon changed the title [SPARK-51334] Add java/scala version in analyze spark_version response [SPARK-51334][CONNECT] Add java/scala version in analyze spark_version response Feb 28, 2025
@garlandz-db
Copy link
Contributor Author

@the-sakthi do you know where i can write them? im not seeing a relevant test suite that already includes tests for analyze plan handler

Copy link
Contributor

@grundprinzip grundprinzip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, please add a test via the Scala E2E tests.

@garlandz-db garlandz-db requested a review from grundprinzip March 3, 2025 14:35

message SparkVersion {
string version = 1;
// The java version the Spark Connect Service is built with.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct, @garlandz-db ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this is the JRE version not the built version. Same is true for the Scala version likely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, this PR provides the runtime Java version instead of The java version the Spark Connect Service is built with.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to #50102 (review), this PR seems to cause a semantic confusion to SparkConnect eco-system because SparkVersion is completely irrelevant from the underlying runtime Java version which can be Java 17 or Java 21.

message SparkVersion {

@grundprinzip
Copy link
Contributor

@dongjoon-hyun IMHO it is ok to return these values, for language agnostic clients they can simply inquire the server about how it runs. I don't think this creates any inconsistency.

@garlandz-db
Copy link
Contributor Author

@dongjoon-hyun please take another pass thanks!

@dongjoon-hyun
Copy link
Member

To @grundprinzip and @garlandz-db , could you propose new messages instead of touching the existing message SparkVersion ? This kind of piggy-backing is not a good design choice because someone might want to add Python version later and then Photon or (Comet) version later.

SparkVersion is not a gateway to look up the server installation, ins't it?

Copy link

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Jun 16, 2025
@github-actions github-actions bot closed this Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants