apache / apache/datafusion

Enhance ArrayAgg to preserve input field nullability

Open
#19,768 2 comments 0 reactions 1 assignee Claimed by @GaneshPatil7517 View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

`ArrayAgg` produces an output with data type:

```
DataType::List(Arc::new(Field::new_list_field(
arg_types[0].clone(),
true,
)))
```

If the input field is non-nullable, then we should be able to preserve this in the output.

### Describe the solution you'd like

Implement `return_field` and remove `return_type`. Preserve nullability of the input.

### Describe alternatives you've considered

_No response_

### Additional context

There are additional updates that will need to be made in the accumulator.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.