Skip to content

[SPARK-57262][SQL][WEBUI] Job description derived from a query should respect spark.sql.redaction.string.regex#56326

Open
sarutak wants to merge 2 commits into
apache:masterfrom
sarutak:fix-redact-sql-description
Open

[SPARK-57262][SQL][WEBUI] Job description derived from a query should respect spark.sql.redaction.string.regex#56326
sarutak wants to merge 2 commits into
apache:masterfrom
sarutak:fix-redact-sql-description

Conversation

@sarutak
Copy link
Copy Markdown
Member

@sarutak sarutak commented Jun 4, 2026

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, redaction is done in SQLExecution.scala so the description in the table on the top of /SQL/execution is redacted.
sql-execution-page-top-table

But the description in the table on the /jobs page and the one in the table on the bottom of /SQL/execution page are not redacted.
jobs-page-before
sql-execution-page-before

Does this PR introduce any user-facing change?

Yes.

How was this patch tested?

Added new test.
Also confirmed descriptions are 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;
jobs-page-after sql-execution-page-after

Was this patch authored or co-authored using generative AI tooling?

Kiro CLI / Claude

@sarutak sarutak changed the title [SPARK-57262][SQL] Job description derived from a query should respect spark.sql.redaction.string.regex [SPARK-57262][SQL][WEBUI] Job description derived from a query should respect spark.sql.redaction.string.regex Jun 4, 2026
@dongjoon-hyun
Copy link
Copy Markdown
Member

cc @cloud-fan , too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants