You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2026/03/19 14:13:48 UTC
Re: [PR] fix: validate wrapped negation during type coercion [datafusion]
alamb commented on code in PR #20965:
URL: https://github.com/apache/datafusion/pull/20965#discussion_r2960364160
##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -559,6 +561,20 @@ impl TreeNodeRewriter for TypeCoercionRewriter<'_> {
Expr::IsNotUnknown(expr) => Ok(Transformed::yes(is_not_unknown(
get_casted_expr_for_bool_op(*expr, self.schema)?,
))),
+ Expr::Negative(expr) => {
+ let data_type = expr.get_type(self.schema)?;
Review Comment:
I double checked that this matches the check in physical expr: https://github.com/apache/datafusion/blob/5d37babf3685cba060f46dd1b9c78507d2c0c048/datafusion/physical-expr/src/expressions/negative.rs#L194-L195
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org