Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6af3a3e
feat: implement map_agg aggregate function
rizzabhdwaj Nov 15, 2026
05d4a60
Merge branch 'main' into map_agg
rizzabhdwaj Nov 15, 2026
82ccaf9
Merge branch 'main' into map_agg
rizzabhdwaj Nov 16, 2026
408bd90
Merge branch 'main' into map_agg
rizzabhdwaj Nov 16, 2026
641b8b0
Merge branch 'main' into map_agg
rizzabhdwaj Nov 16, 2026
8928d04
Merge branch 'main' into map_agg
rizzabhdwaj Nov 22, 2026
b816947
order fix
rizzabhdwaj Nov 23, 2026
701ca6f
Merge branch 'main' into map_agg
rizzabhdwaj Nov 23, 2026
6b84b24
Update map_agg.slt
rizzabhdwaj Nov 23, 2026
2a0e34e
normalize arrayref
rizzabhdwaj Nov 23, 2026
9435d0f
share map_arr compact_payload
rizzabhdwaj Nov 23, 2026
107ec20
test
rizzabhdwaj Nov 23, 2026
1ed402c
Merge branch 'map_agg' of https://github.com/rizzabhdwaj/datafusion i…
rizzabhdwaj Nov 23, 2026
fc157cf
Merge branch 'main' into map_agg
rizzabhdwaj Nov 24, 2026
2a5a335
Merge branch 'main' into map_agg
rizzabhdwaj Nov 27, 2026
084782c
fix as per feedback
rizzabhdwaj Nov 27, 2026
3130cc4
Merge branch 'main' into map_agg
rizzabhdwaj Nov 30, 2026
3163c78
fix: remove trailing whitespace in update_aggr_exprs
rizzabhdwaj Nov 30, 2026
5fabbe6
fix: compact MAP_AGG list views and declare DISTINCT unsupported
rizzabhdwaj Dec 3, 2026
94bc79a
Merge branch 'main' into map_agg
rizzabhdwaj Dec 3, 2026
afde3b4
fix: preserve shared MAP_AGG list view ranges
rizzabhdwaj Dec 4, 2026
c29f8be
Merge branch 'main' into map_agg
rizzabhdwaj Dec 4, 2026
520bab3
fix: preserve MAP_AGG list view sharing in ordered and fixed-size lists
rizzabhdwaj Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion datafusion/common/src/nested_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,15 @@ type CompactedListView<O> = (ScalarBuffer<O>, ScalarBuffer<O>, ArrayRef);
/// ListView ranges may overlap or appear in any order, so selecting each row
/// independently could duplicate a large number of child values. Merging the
/// ranges first preserves sharing while excluding unreachable values.
fn compact_list_view_values<O: arrow::array::OffsetSizeTrait>(
/// Returns `None` when all child values are reachable.
///
/// # Public Only for Internal Use:
///
/// This is not a public API and is for internal use only; see [API policy] for details.
///
/// [API policy]: https://datafusion.apache.org/contributor-guide/api-health.html#internal-public-apis
#[doc(hidden)]
pub fn compact_list_view_values<O: arrow::array::OffsetSizeTrait>(
list: &GenericListViewArray<O>,
) -> Result<Option<CompactedListView<O>>> {
let mut dense_end = 0;
Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions-aggregate/src/array_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@ impl OrderSensitiveArrayAggAccumulator {
/// Dictionary GC removes unused values without decoding the dictionary, while
/// view GC copies only referenced bytes. Recurse into children so nested payloads
/// cannot retain the source buffers either.
fn compact_payload(array: ArrayRef) -> Result<ArrayRef> {
pub(crate) fn compact_payload(array: ArrayRef) -> Result<ArrayRef> {
match array.data_type() {
DataType::Utf8View => Ok(Arc::new(array.as_string_view().gc())),
DataType::BinaryView => Ok(Arc::new(array.as_binary_view().gc())),
Expand Down
3 changes: 3 additions & 0 deletions datafusion/functions-aggregate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub mod covariance;
pub mod first_last;
pub mod grouping;
pub mod hyperloglog;
pub mod map_agg;
pub mod median;
pub mod min_max;
pub mod nth_value;
Expand Down Expand Up @@ -111,6 +112,7 @@ pub mod expr_fn {
pub use super::first_last::first_value;
pub use super::first_last::last_value;
pub use super::grouping::grouping;
pub use super::map_agg::map_agg;
pub use super::median::median;
pub use super::min_max::max;
pub use super::min_max::min;
Expand Down Expand Up @@ -138,6 +140,7 @@ pub fn all_default_aggregate_functions() -> Vec<Arc<AggregateUDF>> {
vec![
any_value::any_value_udaf(),
array_agg::array_agg_udaf(),
map_agg::map_agg_udaf(),
first_last::first_value_udaf(),
first_last::last_value_udaf(),
covariance::covar_samp_udaf(),
Expand Down
Loading