You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem seems to be in the ScalarUDFImpl for CoalesceFunc:
fnreturn_type(&self,arg_types:&[DataType]) -> Result<DataType>{Ok(arg_types[0].clone())}// If all the element in coalesce is non-null, the result is non-nullfnis_nullable(&self,args:&[Expr],schema:&dynExprSchema) -> bool{
args.iter().any(|e| e.nullable(schema).ok().unwrap_or(true))}
The return_type is the first one when it should be the first non-null, and is_nullable returns true if any of the args is null
The text was updated successfully, but these errors were encountered:
Describe the bug
This issue was first reported in datafusion-python; upon further inspection, this appears to be a bug in datafusion itself.
To Reproduce
This fails:
Expected behavior
The code should not fail.
Additional context
The problem seems to be in the
ScalarUDFImpl
forCoalesceFunc
:The
return_type
is the first one when it should be the first non-null, andis_nullable
returns true if any of theargs
is nullThe text was updated successfully, but these errors were encountered: