When the args are empty in aggregate function like
SELECT COUNT() FROM users; // This is valid
SELECT AVG() from users; // this must give error
The value of info.args.as_ref() is None which make the program crash due to unwrap().
All the implementation till now of aggrigate function check the args using args.len() then are assuming that the args after unwrap will be an empty array. But that not the case as we have explained before.
This pr, created an empty args vector then the args is None.
When the args are empty in aggregate function like
The value of
info.args.as_ref()
isNone
which make the program crash due tounwrap()
. All the implementation till now of aggrigate function check the args usingargs.len()
then are assuming that theargs
afterunwrap
will be an empty array. But that not the case as we have explained before.This pr, created an
empty args
vector then the args isNone
.