[FLUSS][Spark] Add set_cluster_configs and reset_cluster_configs procedures#3204
Open
XuQianJin-Stars wants to merge 1 commit intoapache:mainfrom
Open
[FLUSS][Spark] Add set_cluster_configs and reset_cluster_configs procedures#3204XuQianJin-Stars wants to merge 1 commit intoapache:mainfrom
XuQianJin-Stars wants to merge 1 commit intoapache:mainfrom
Conversation
…edures for Spark connector
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.
Purpose
Linked issue: close #3203
This PR adds
set_cluster_configsandreset_cluster_configsprocedures to the Spark connector, aligning it with the Flink connector which already provides a complete set of cluster configuration management procedures (get_cluster_configs,set_cluster_configs,reset_cluster_configs).Currently, Spark users can only read cluster configurations via
get_cluster_configsbut cannot dynamically modify or reset them through SQL. This change closes that gap.Brief change log
SetClusterConfigsProcedureto dynamically set cluster configuration values viaCALL sys.set_cluster_configs(config_pairs => ARRAY('key1', 'value1', 'key2', 'value2')).ResetClusterConfigsProcedureto reset cluster configurations to their default values viaCALL sys.reset_cluster_configs(config_keys => ARRAY('key1', 'key2')).SparkProcedures.Admin.alterClusterConfigs()API withAlterConfigOpType.SETandAlterConfigOpType.DELETErespectively.Tests
SetClusterConfigsProcedureTest:set_cluster_configs: set a single configuration— sets a config and verifies it viaget_cluster_configsset_cluster_configs: set multiple configurations— sets multiple configs in one callset_cluster_configs: empty config_pairs should fail— validates error on empty inputset_cluster_configs: odd number of config_pairs should fail— validates error on malformed inputResetClusterConfigsProcedureTest:reset_cluster_configs: set and then reset a configuration— sets a config, resets it, and verifies it's no longer DYNAMICreset_cluster_configs: reset multiple configurations— resets multiple configs in one callreset_cluster_configs: empty config_keys should fail— validates error on empty inputAPI and Format
No. This change only adds new Spark SQL procedures. No existing API or storage format is affected.
Documentation
Yes. Updated
website/docs/engine-spark/procedures.mdwith documentation for bothset_cluster_configsandreset_cluster_configsprocedures, including syntax, parameters, return types, examples, and notes.