gatorsmile commented on a change in pull request #24947: [SPARK-28143][SQL] 
Expressions without proper constructors should throw AnalysisException
URL: https://github.com/apache/spark/pull/24947#discussion_r305662678
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
 ##########
 @@ -583,7 +583,9 @@ object FunctionRegistry {
           val validParametersCount = constructors
             .filter(_.getParameterTypes.forall(_ == classOf[Expression]))
 
 Review comment:
   If we remove this line, what is the outcome?
   
   In this PR, the logic is to add a special case. When unable to find a 
constructor whose parameters are all Expressions, we use the remaining 
constructors. [Note, headOption means we only choose the first one] Could you 
please check whether we should list all of them in the error messages?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to