-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-28143][SQL] Expressions without proper constructors should throw AnalysisException #24947
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 4 commits
4af96a1
9ca1990
15c67d6
30ef47e
a0363de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -583,7 +583,9 @@ object FunctionRegistry { | |
| val validParametersCount = constructors | ||
| .filter(_.getParameterTypes.forall(_ == classOf[Expression])) | ||
|
||
| .map(_.getParameterCount).distinct.sorted | ||
| val expectedNumberOfParameters = if (validParametersCount.length == 1) { | ||
| val expectedNumberOfParameters = if (validParametersCount.isEmpty) { | ||
| constructors.headOption.map(_.getParameterCount).getOrElse(0).toString | ||
|
||
| } else if (validParametersCount.length == 1) { | ||
|
||
| validParametersCount.head.toString | ||
| } else { | ||
| validParametersCount.init.mkString("one of ", ", ", " and ") + | ||
yaooqinn marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.