AngersZhuuuu opened a new pull request #35059:
URL: https://github.com/apache/spark/pull/35059


   ### What changes were proposed in this pull request?
   Current QueryExecutionListener only support add constructor parameter of 
SparkConf, but if we  start a SparkContext first, many SQL conf won't be 
applied to SparkContext's SparkConf.
   Also it's a SQL component,  related configuration we defined it as SQLConf. 
But it's hard to use SQLConf in this plugin listener.
   this patch add a new option for your to create QueryExecutionListener then 
can easily got SQLConf in listener's internal code.
   
   
   
   ### Why are the changes needed?
   Make QueryExecutionListener more easier to use.
   
   
   ### Does this PR introduce _any_ user-facing change?
   User can use QueryExecutionListener with SQLConf parameter. For example
   ```
   private class SQLConfQueryExecutionListener(sqlConf: SQLConf) extends 
QueryExecutionListener {
   
     override def onSuccess(funcName: String, qe: QueryExecution, durationNs: 
Long): Unit = {
     }
     override def onFailure(funcName: String, qe: QueryExecution, exception: 
Exception): Unit = {
     }
   }
   ```
   
   
   
   ### How was this patch tested?
   Added UT


-- 
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