-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29379][SQL]SHOW FUNCTIONS show '!=', '<>' , 'between', 'case' #26053
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
911007a
ba22b62
074ee0e
9b8d63e
b066088
3d6c85d
85556a6
22b3487
60cd8a8
522193c
a285290
9f68ead
bc04f99
7ac4d16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2065,12 +2065,12 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils { | |
| test("show functions") { | ||
| withUserDefinedFunction("add_one" -> true) { | ||
| val numFunctions = FunctionRegistry.functionSet.size.toLong | ||
|
||
| assert(sql("show functions").count() === numFunctions) | ||
| assert(sql("show functions").count() === numFunctions + 4L) | ||
| assert(sql("show system functions").count() === numFunctions) | ||
| assert(sql("show all functions").count() === numFunctions) | ||
| assert(sql("show user functions").count() === 0L) | ||
| spark.udf.register("add_one", (x: Long) => x + 1) | ||
| assert(sql("show functions").count() === numFunctions + 1L) | ||
| assert(sql("show functions").count() === numFunctions + 5L) | ||
| assert(sql("show system functions").count() === numFunctions) | ||
| assert(sql("show all functions").count() === numFunctions + 1L) | ||
| assert(sql("show user functions").count() === 1L) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -563,8 +563,8 @@ class HiveUDFSuite extends QueryTest with TestHiveSingleton with SQLTestUtils { | |
| checkAnswer( | ||
| sql("SELECT testUDFToListInt(s) FROM inputTable"), | ||
| Seq(Row(Seq(1, 2, 3)))) | ||
| assert(sql("show functions").count() == numFunc + 1) | ||
| assert(spark.catalog.listFunctions().count() == numFunc + 1) | ||
| assert(sql("show functions").count() == numFunc + 5) | ||
|
||
| assert(spark.catalog.listFunctions().count() == numFunc + 5) | ||
| } | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shall we put this code in
getFunctions?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good ideal, I will try this.