-
- Downloads
[SPARK-20349][SQL] ListFunctions returns duplicate functions after using persistent functions
### What changes were proposed in this pull request? The session catalog caches some persistent functions in the `FunctionRegistry`, so there can be duplicates. Our Catalog API `listFunctions` does not handle it. It would be better if `SessionCatalog` API can de-duplciate the records, instead of doing it by each API caller. In `FunctionRegistry`, our functions are identified by the unquoted string. Thus, this PR is try to parse it using our parser interface and then de-duplicate the names. ### How was this patch tested? Added test cases. Author: Xiao Li <gatorsmile@gmail.com> Closes #17646 from gatorsmile/showFunctions. (cherry picked from commit 01ff0350) Signed-off-by:Xiao Li <gatorsmile@gmail.com>
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala 16 additions, 5 deletions...rg/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala 1 addition, 3 deletions...la/org/apache/spark/sql/execution/command/functions.scala
- sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala 17 additions, 0 deletions...la/org/apache/spark/sql/hive/execution/HiveUDFSuite.scala
Loading
Please register or sign in to comment