Skip to content

Commit

Permalink
check struct nullability for physical GetIndexedFieldExpr
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Newhouse committed Mar 18, 2024
1 parent ac33c34 commit 4b9d841
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions datafusion/physical-expr/src/expressions/get_indexed_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ impl PhysicalExpr for GetIndexedFieldExpr {

fn nullable(&self, input_schema: &Schema) -> Result<bool> {
let arg_dt = self.arg.data_type(input_schema)?;
self.schema_access(input_schema)?
.get_accessed_field(&arg_dt)
.map(|f| f.is_nullable())
Ok(self.arg.nullable(input_schema)?
|| self
.schema_access(input_schema)?
.get_accessed_field(&arg_dt)
.map(|f| f.is_nullable())?)
}

fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
Expand Down
2 changes: 1 addition & 1 deletion datafusion/physical-plan/src/metrics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl MetricsSet {

pub fn clear(&mut self) {
self.metrics.clear();
}
}
}

impl Display for MetricsSet {
Expand Down

0 comments on commit 4b9d841

Please sign in to comment.