panbingkun opened a new pull request, #47422:
URL: https://github.com/apache/spark/pull/47422
### What changes were proposed in this pull request?
The pr aims to introduce `SHOW VARIABLES LIKE ...` SQL syntax to `get
variables`.
### Why are the changes needed?
- currently, regarding `VARIABLE`, we support the following syntax:
```
DECLARE (OR REPLACE)? VARIABLE ...
DROP TEMPORARY VARIABLE (IF EXISTS)? ...
SET (VARIABLE | VAR) ...
```
But we are unable to obtain the current status of `VARIABLE`
- other databases have similar syntax, eg:
snowflake: https://docs.snowflake.com/en/sql-reference/sql/show-variables
<img width="805" alt="image"
src="https://github.com/user-attachments/assets/5c2fd7fe-6f38-4376-902b-d3eebb81d250">
Mysql: https://dev.mysql.com/doc/refman/8.4/en/show-variables.html
oracle:
https://docs.oracle.com/cd/E17952_01/mysql-5.7-en/show-variables.html
teradata:
https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Database-Utilities/Control-GDO-Editor-ctl/Ctl-Commands/PRINT-variable
- so I propose introducing syntax `SHOW VARIABLES LIKE ...` that can
retrieve all variables in the spark system.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Add new UT.
### 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: [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]