AngersZhuuuu commented on pull request #29054:
URL: https://github.com/apache/spark/pull/29054#issuecomment-656938573


   > But, the relationship of `1.` and `2.` looks ambiguous to me. Does the 
message mean that there are two reasons for the failure? Could you brush up the 
message more?
   
   Yea, when we use Spark SQL in support hive mode, the real SessionCatalog is 
HiveSessionCatalog, when we create and use UDAF,  it call 
`makeExpressionFunction`. In the code for UDAf, you can see that it will call 
`super.makeExpressionFunction` first, so it will check if the UDAF is follow 
spark's UDAF (class implement UserDefinedAggregateFunction), if failed, it will 
try  hive's UDAF solution. 
   
   So in my test case, it's follow spark's UDAF definition, but 
`makeExpressionFunction` failed since when I use it, the argument number is 
wrong. In origin code, it will only show 
   ```
   No handler for UDF/UDAF/UDTF 
'org.apache.spark.sql.hive.execution.LongProductSum'
   ```
   But what we real need know is 
   ```
   Invalid number of arguments for function longProductSum
   ```
   
   These two error is from different level 1. Spark UDAF 2. Hive UDAF.
   `1.` `2.` seems really  ambiguous,  how about `For Spark UDAF: ` & `For Hive 
UDAF` to make it more clear


----------------------------------------------------------------
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]



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

Reply via email to