GitHub user gatorsmile opened a pull request: https://github.com/apache/spark/pull/17646
[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. You can merge this pull request into a Git repository by running: $ git pull https://github.com/gatorsmile/spark showFunctions Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17646.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17646 ---- commit 7e26e5a00368977bdd6ef337169c9de8b25d6c58 Author: Xiao Li <gatorsm...@gmail.com> Date: 2017-04-16T07:24:44Z fix. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org