Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-51146][SQL][FOLLOWUP] Respect system env
SPARK_CONNECT_MODE
…
…in places that access the api mode config ### What changes were proposed in this pull request? This is a followup of the additional Spark Connect distribution work. Some places that access the api mode config do not use the config framework and do not respect the defined default value. We need to update them manually to get the default value properly by looking at the special system env `SPARK_CONNECT_MODE` set in scripts of the spark connect distribution. ### Why are the changes needed? to make the additional Spark Connect distribution work as expected. ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? manually tested locally. The expectation is: 1. if `--remote` is specified, then we pick connect mode no matter what the api mode config is 2. if `--master` is specified, then we pick classic or connect mode depending on the api mode config. If the config is not specified, the default value varies between the default distribution and the Spark connect distribution. 3. if neither `--remote` nor `--master` is specified, it's equal to `--master local[*]`, and then it's the same as rule 2. ### Was this patch authored or co-authored using generative AI tooling? no Closes #49930 from cloud-fan/release. Lead-authored-by: Wenchen Fan <cloud0fan@gmail.com> Co-authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
- Loading branch information