jayzhan211 commented on code in PR #11989:
URL: https://github.com/apache/datafusion/pull/11989#discussion_r1722943534
##########
datafusion/expr/src/expr_schema.rs:
##########
@@ -335,18 +335,28 @@ impl ExprSchemable for Expr {
}
}
Expr::Cast(Cast { expr, .. }) => expr.nullable(input_schema),
+ Expr::ScalarFunction(ScalarFunction { func, args }) => {
+ Ok(func.is_nullable(args, input_schema))
+ }
Expr::AggregateFunction(AggregateFunction { func, .. }) => {
- // TODO: UDF should be able to customize nullability
- if func.name() == "count" {
- Ok(false)
- } else {
- Ok(true)
- }
+ Ok(func.is_nullable())
}
+ Expr::WindowFunction(WindowFunction { fun, .. }) => match fun {
+ WindowFunctionDefinition::BuiltInWindowFunction(func) => {
+ if func.name() == "RANK"
+ || func.name() == "NTILE"
+ || func.name() == "CUME_DIST"
Review Comment:
Temporary code, there would be no name checking after #8709 is done. We can
see that `Row_Number` is gone
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]