Skip to content

Conversation

@zhengruifeng
Copy link
Contributor

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?

@zhengruifeng zhengruifeng changed the title [WIP][CONNECT] Initial configuration implementation [WIP][CONNECT] Initial runtime SQL configuration implementation Feb 13, 2023
@zhengruifeng zhengruifeng force-pushed the connect_config branch 2 times, most recently from f8bd91f to ed724cf Compare February 15, 2023 06:18
@zhengruifeng zhengruifeng force-pushed the connect_config branch 2 times, most recently from 875f4fb to 1bba128 Compare February 15, 2023 10:03
simplify

simplify

simplify

init

init

init

init
Comment on lines +199 to +212
// (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;
Copy link
Contributor

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;
}

Copy link
Contributor

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 {
Copy link
Contributor

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;
   }
}



Copy link
Contributor

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.

@HyukjinKwon
Copy link
Member

cc @ueshin

HyukjinKwon pushed a commit that referenced this pull request Feb 25, 2023
### 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>
HyukjinKwon pushed a commit that referenced this pull request Feb 25, 2023
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>
@zhengruifeng zhengruifeng deleted the connect_config branch February 27, 2023 00:47
snmvaughan pushed a commit to snmvaughan/spark that referenced this pull request Jun 20, 2023
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>
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.

3 participants