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

   ### What changes were proposed in this pull request?
   In the PR, I propose to extend the `TypedConfigBuilder` API by new method:
   ```scala
     def checkValue(
         validator: T => Boolean,
         errorClass: String,
         parameters: Map[String, String]): TypedConfigBuilder[T] = {
   ```
   which raises `SparkIllegalArgumentException` with an error class when 
`checkValue` fails.
   
   As an example, I ported the check of the SQL config 
`spark.sql.session.timeZone` on the new method.
   
   ### Why are the changes needed?
   To improve user's experience with Spark SQL by migration on unified error 
framework.
   
   ### Does this PR introduce _any_ user-facing change?
   It can if user's code depends on particular format of error messages.
   
   ### How was this patch tested?
   By running the affected test suites:
   ```
   $ build/sbt "test:testOnly *SQLConfSuite"
   $ build/sbt "core/testOnly *SparkThrowableSuite"
   ```
   
   ### 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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to