Please sign in to comment.
[SPARK-29922][SQL] SHOW FUNCTIONS should do multi-catalog resolution
### What changes were proposed in this pull request? Add ShowFunctionsStatement and make SHOW FUNCTIONS go through the same catalog/table resolution framework of v2 commands. We don’t have this methods in the catalog to implement an V2 command * catalog.listFunctions ### Why are the changes needed? It's important to make all the commands have the same table resolution behavior, to avoid confusing `SHOW FUNCTIONS LIKE namespace.function` ### Does this PR introduce any user-facing change? Yes. When running SHOW FUNCTIONS LIKE namespace.function Spark fails the command if the current catalog is set to a v2 catalog. ### How was this patch tested? Unit tests. Closes #26667 from planga82/feature/SPARK-29922_ShowFunctions_V2Catalog. Authored-by: Pablo Langa <firstname.lastname@example.org> Signed-off-by: Liang-Chi Hsieh <email@example.com>
- Loading branch information
Showing with 78 additions and 40 deletions.
- +16 −0 sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
- +9 −0 sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statements.scala
- +26 −0 sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DDLParserSuite.scala
- +17 −0 sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
- +0 −24 sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala
- +9 −0 sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
- +0 −15 sql/core/src/test/scala/org/apache/spark/sql/execution/SparkSqlParserSuite.scala
- +1 −1 sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala