-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-41115][CONNECT] Add ClientType to proto to indicate which client sends a request #38630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid changing this all the time a new client comes along, this should most likely be a string.
| ClientType client_type = 4; | |
| optional string client_type = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // From which client this request was sent from. | |
| // Provides optional information about the client sending the request. This field | |
| // can be used for language or version specific information and is only intended for | |
| // logging purposes and will not be interpreted by the server. |
grundprinzip
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a specific use case in mind?
|
@grundprinzip I actually want to log to different entries for the usage from different clients. The perfect logging to me is x jobs submitted through proto (which literally is the entire connect usage) Maybe, just say maybe, we will see user self-implemented clients by this field (or if this field is not set we will also know). Also I would still imagine that we need send through client side language spec (language type, version, etc.) which you already mentioned in the suggestion. Maybe eventually we need a message named client metadata. But right now only which client is added to proto for this metadata. We can see if we need client side language spec eventually (when we deal with UDF probably) |
|
All this in mind it still makes more sense to keep this as an optional string field instead of an enum. |
grundprinzip
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the type from enum to string.
|
Yeah let me take a look. |
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this do the same thing as user_context.extensions ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is purely a string and not an extension type based on Any
… client sends a request.
5d8bc64 to
6c772f0
Compare
|
@amaliujia can you please update the pr description to remove the enum part. |
|
Merged to master. |
…nt sends a request ### What changes were proposed in this pull request? This PRs introduces a `ClientType` into Connect proto that can be included into Request to indicate the client type (e.g. Python client, Scala client, etc.) ### Why are the changes needed? Better understand requests by the server. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UT Closes apache#38630 from amaliujia/client-type. Authored-by: Rui Wang <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
…nt sends a request ### What changes were proposed in this pull request? This PRs introduces a `ClientType` into Connect proto that can be included into Request to indicate the client type (e.g. Python client, Scala client, etc.) ### Why are the changes needed? Better understand requests by the server. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UT Closes apache#38630 from amaliujia/client-type. Authored-by: Rui Wang <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
…nt sends a request ### What changes were proposed in this pull request? This PRs introduces a `ClientType` into Connect proto that can be included into Request to indicate the client type (e.g. Python client, Scala client, etc.) ### Why are the changes needed? Better understand requests by the server. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UT Closes apache#38630 from amaliujia/client-type. Authored-by: Rui Wang <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
This PRs introduces a
ClientTypeinto Connect proto that can be included into Request to indicate the client type (e.g. Python client, Scala client, etc.)Why are the changes needed?
Better understand requests by the server.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing UT