Skip to content

Commit

Permalink
if expr in GetIndexedField is null, then always return nullable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Newhouse committed Apr 18, 2024
1 parent 4b9d841 commit dcb1631
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datafusion/expr/src/expr_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,8 @@ impl ExprSchemable for Expr {
Expr::GetIndexedField(GetIndexedField { expr, field }) => {
// If schema is nested, check if parent is nullable
// if it is, return early
if let Expr::Column(col) = expr.as_ref() {
if input_schema.nullable(col)? {
return Ok(true);
}
if expr.nullable(input_schema)? {
return Ok(true);
}
field_for_index(expr, field, input_schema).map(|x| x.is_nullable())
}
Expand Down

0 comments on commit dcb1631

Please sign in to comment.