vladimirg-db opened a new pull request, #46365:
URL: https://github.com/apache/spark/pull/46365

   ### What changes were proposed in this pull request?
   Error message template regex is now precompiled to avoid unnecessary work
   
   
   ### Why are the changes needed?
   `SparkRuntimeException` uses `SparkThrowableHelper`, which uses 
`ErrorClassesJsonReader` to create error message string from templates in 
`error-conditions.json`, but template regex is compiled on every 
`SparkRuntimeException` constructor invocation. This slows down error 
construction, in particular `UnivocityParser` + `FailureSafeParser`, where it's 
a hot path.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   `testOnly org.apache.spark.sql.errors.QueryExecutionErrorsSuite`
   
   
   ### 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