AngersZhuuuu opened a new pull request #31257:
URL: https://github.com/apache/spark/pull/31257
### What changes were proposed in this pull request?
Support `SHOW TABLES` command as a table valued function.
So user can be easy to reach metadata system information use SQL and
analysis directory.
### Why are the changes needed?
user can be easy to reach metadata system information use SQL and analysis
directory.
### Does this PR introduce _any_ user-facing change?
Yea, user can get table list by call table valued function `show_table()`
```
sql("CREATE DATABASE d1")
sql("CREATE TABLE t1(a INT) USING PARQUET")
sql("CREATE TABLE d1.t1(a INT) USING PARQUET")
sql("CREATE TABLE d1.t2(a INT) USING PARQUET")
sql("SELECT * from show_tables()")
sql("SELECT * from show_tables('default')")
sql("SELECT * from show_tables('d1')")
sql("SELECT * from show_tables('d1', 't1*')")
```
### 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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]