-
Couldn't load subscription status.
- Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Describe the bug
If you have table schema like
DFSchema {
fields: [
DFField {
qualifier: Some(
Bare {
table: "nexmark",
},
),
field: Field {
name: "bid",
data_type: Struct(
[
Field {
name: "auction",
data_type: Int64,
nullable: false,
},
nullable: true,
}
And run a query like SELECT bid.auction FROM nexmark you'll get an error when bid is null. Error looks like
ArrowError(InvalidArgumentError("Column 'nexmark.bid[datetime]' is declared as non-nullable but contains null values"))
The problem is that the nullable() method only looks at the sub-fields nullability, ignoring that the parent field may be null.
https://github.com/apache/arrow-datafusion/blob/main/datafusion/expr/src/expr_schema.rs#L280.
To Reproduce
No response
Expected behavior
The expression should be nullable, as its parent may not be present.
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers