-
Notifications
You must be signed in to change notification settings - Fork 29k
[WIP][CONNECT] Initial runtime SQL configuration implementation #39995
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
dbda1d7 to
e3a625d
Compare
f8bd91f to
ed724cf
Compare
875f4fb to
1bba128
Compare
1bba128 to
fd1f764
Compare
| // (Optional) | ||
| // | ||
| // Identify which keys will be updated or fetched. | ||
| // Required when the 'operation' is 'SET', 'GET', 'GET_OPTION', 'UNSET', | ||
| // 'CONTAINS', 'IS_MODIFIABLE'. | ||
| repeated string keys = 4; | ||
|
|
||
| // (Optional) | ||
| // | ||
| // Corresponding values to the keys. | ||
| // Required when the 'operation' is 'SET'. | ||
| // Optional when the 'operation' is 'GET', the values here will be used | ||
| // as the default values. | ||
| repeated string values = 5; |
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.
why not make this something like this
repeated KeyValue pair = 4;
message KeyValue {
string key = 1;
string value = 2;
}
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.
I find the reuse in case of GET/SET hard to reason about
| } | ||
|
|
||
| // Request to update or fetch the configurations. | ||
| message ConfigRequest { |
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.
maybe more like
message ConfigRequest {
oneof type {
GetConfig get_config = 1;
SetConfig set_config = 2;
}
message GetConfig {
repeated string keys = 1;
}
message SetConfig {
repeated KeyValue pairs = 1;
}
}
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.
I think it might be good to have explicit messages rather than the combination of the enum plus the message attributes.
|
cc @ueshin |
### What changes were proposed in this pull request? Implements `SparkSession.conf`. Took #39995 over. ### Why are the changes needed? `SparkSession.conf` is a missing feature. ### Does this PR introduce _any_ user-facing change? Yes, `SparkSession.conf` will be available. ### How was this patch tested? Added/enabled related tests. Closes #40150 from ueshin/issues/SPARK-41834/conf. Lead-authored-by: Takuya UESHIN <ueshin@databricks.com> Co-authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Implements `SparkSession.conf`. Took #39995 over. `SparkSession.conf` is a missing feature. Yes, `SparkSession.conf` will be available. Added/enabled related tests. Closes #40150 from ueshin/issues/SPARK-41834/conf. Lead-authored-by: Takuya UESHIN <ueshin@databricks.com> Co-authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit 47951c9) Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Implements `SparkSession.conf`. Took apache#39995 over. `SparkSession.conf` is a missing feature. Yes, `SparkSession.conf` will be available. Added/enabled related tests. Closes apache#40150 from ueshin/issues/SPARK-41834/conf. Lead-authored-by: Takuya UESHIN <ueshin@databricks.com> Co-authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org> (cherry picked from commit 47951c9) Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?