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

   ### What changes were proposed in this pull request?
   This PR changes `SparkSQLDriver.scala` to redact a query before 
`setJobDescription`.
   
   ### Why are the changes needed?
   In the current implementation, when a query is executed through 
`SparkSQLDriver`, redaction is done in `SQLExecution.scala` so the description 
in the table on the `/SQL` page is redacted.
   <img width="488" height="252" alt="sql-page-4 1" 
src="https://github.com/user-attachments/assets/bec6cd3d-c655-4bb2-9e95-5d0efb86999a";
 />
   
   But the description in the table on the `/jobs` page is not redacted.
   <img width="444" height="162" alt="jobs-page-before-4 1" 
src="https://github.com/user-attachments/assets/a6c93c26-2a64-4d41-ae1a-23ac77e38f84";
 />
   
   ### Does this PR introduce _any_ user-facing change?
   Yes.
   
   ### How was this patch tested?
   Added new test and confirmed the test `SQL execution description should 
respect spark.sql.redaction.string.regex` added in #56358 passed.
   Also confirmed the description is redacted in UI.
   ```
   $ bin/spark-sql --conf spark.sql.redaction.string.regex="secret.*=.*"
   spark-sql (default)>  CREATE TABLE test1(secret string);
   spark-sql (default)> SELECT * FROM test1 WHERE secret=1;
   ```
   <img width="601" height="205" alt="jobs-page-after-4 1" 
src="https://github.com/user-attachments/assets/c21ae7cc-1089-4e3c-828a-ad022cd2492f";
 />
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Kiro CLI / Claude
   


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