Changes

Summary

  1. [SPARK-34735][SQL][UI] Add modified configs for SQL execution in UI (details)
Commit 7b50cf065b5ae6c6b9260ddddef5bd1d08fbc26c by gengliang
[SPARK-34735][SQL][UI] Add modified configs for SQL execution in UI

### What changes were proposed in this pull request?

Add `SQL Properties` ins SQL tab that show the modified configs with sql execution.

### Why are the changes needed?

For SQL user, it's very common to add some config to optimize sql. Within a script, it would look like this

```
set k1=v1;
set k2=v2;
set ...

INSERT INTO TABLE t1
SELECT ...

```

It's hard to find the configs used by sql without the raw sql string. Current UI provide a `Environment` tab that we can only get some global initial config, however it's not enough.

Some use case:
* Jar based job, we might set sql config many times due to many sql execution.
* SQL server e.g. (SparkThriftServer), we might execute thousands scripts every day with different session.

We expect a feature that can list the modified configs which could affect the sql execution.

Here is a simple example with `./bin/spark-sql`:
```
set spark.sql.autoBroadcastJoinThreshold = -1;
set spark.sql.adaptive.enabled=false;
SELECT 1;
```
The screen snapshot of SQL tab
![ui-3](https://user-images.githubusercontent.com/12025282/111061224-382c5380-84dd-11eb-81ae-1d6d48955a32.jpg)

### Does this PR introduce _any_ user-facing change?

Yes, the UI cahgned with the `SQL Properties` in SQL tab.

### How was this patch tested?

Add test and munual test.

Closes #31830 from ulysses-you/current-sql-config.

Authored-by: ulysses-you <ulyssesyou18@gmail.com>
Signed-off-by: Gengliang Wang <gengliang@apache.org>
The file was modifiedsql/core/src/test/scala/org/apache/spark/status/api/v1/sql/SqlResourceSuite.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLListener.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/ui/AllExecutionsPageSuite.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/SQLExecutionSuite.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListenerSuite.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/ui/MetricsAggregationBenchmark.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/history/SQLLiveEntitiesEventFilterSuite.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/SQLJsonProtocolSuite.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusStore.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/history/SQLEventFilterBuilderSuite.scala (diff)