EugeneYushin opened a new pull request, #52759:
URL: https://github.com/apache/spark/pull/52759

   ### What changes were proposed in this pull request?
   Pass `SQLConf` values through `ConfigReader` bindings, allowing for 
`${env:xyz} -> sys.env.get("xyz")` substitution before passing the settings to 
`CatalogPlugin` implementations.
   
   
   ### Why are the changes needed?
   Settings for custom (table) catalog defined in `spark-defaults.conf` are not 
being rendered the same way as any other `SQLConf` settings. Particular catalog 
can define its own set of properties along with custom name for that catalog, 
e.g. "spark.sql.catalog.test-name". This prevents from registering these 
properties using 
[SQLConf.buildConf](https://github.com/apache/spark/blob/54dee4a4b59cf3817f15da46d35f42a81a3b1c07/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala#L111)
 machinery, meaning that [ConfigReader 
bindings](https://github.com/apache/spark/blob/fe904e6973b7a8fdadc5e253a6a74e8ccb359287/common/utils/src/main/scala/org/apache/spark/internal/config/ConfigReader.scala#L54-L57)
 are being skipped during properties resolution flow.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   * add unit test to cover env var substitution
   * provide env in a form defined by [ConfigReader unit 
tests](https://github.com/apache/spark/blob/b7763a7eae2b9609012cbb4ce981276c6471cc4e/core/src/test/scala/org/apache/spark/internal/config/ConfigReaderSuite.scala#L27-L31)
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to