Skip to content

Commit 7e2cca8

Browse files
authored
Remove RowAccumulators and datafusion-row (#6968)
* Remove `RowAccumulators` * Remove `datafusion-row` * Update datafusion cli * update depes
1 parent eb9a702 commit 7e2cca8

File tree

26 files changed

+101
-3327
lines changed

26 files changed

+101
-3327
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
[workspace]
1919
exclude = ["datafusion-cli"]
20-
members = ["datafusion/common", "datafusion/core", "datafusion/expr", "datafusion/execution", "datafusion/optimizer", "datafusion/physical-expr", "datafusion/proto", "datafusion/proto/gen", "datafusion/row", "datafusion/sql", "datafusion/substrait", "datafusion-examples", "test-utils", "benchmarks",
20+
members = ["datafusion/common", "datafusion/core", "datafusion/expr", "datafusion/execution", "datafusion/optimizer", "datafusion/physical-expr", "datafusion/proto", "datafusion/proto/gen", "datafusion/sql", "datafusion/substrait", "datafusion-examples", "test-utils", "benchmarks",
2121
]
2222
resolver = "2"
2323

datafusion-cli/Cargo.lock

Lines changed: 41 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/core/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ datafusion-execution = { path = "../execution", version = "27.0.0" }
6767
datafusion-expr = { path = "../expr", version = "27.0.0" }
6868
datafusion-optimizer = { path = "../optimizer", version = "27.0.0", default-features = false }
6969
datafusion-physical-expr = { path = "../physical-expr", version = "27.0.0", default-features = false }
70-
datafusion-row = { path = "../row", version = "27.0.0" }
7170
datafusion-sql = { path = "../sql", version = "27.0.0" }
7271
flate2 = { version = "1.0.24", optional = true }
7372
futures = "0.3"

datafusion/core/src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@
398398
//! * [datafusion_execution]: State and structures needed for execution
399399
//! * [datafusion_optimizer]: [`OptimizerRule`]s and [`AnalyzerRule`]s
400400
//! * [datafusion_physical_expr]: [`PhysicalExpr`] and related expressions
401-
//! * [datafusion_row]: Row based representation
402401
//! * [datafusion_sql]: SQL planner ([`SqlToRel`])
403402
//!
404403
//! [sqlparser]: https://docs.rs/sqlparser/latest/sqlparser
@@ -468,11 +467,6 @@ pub mod physical_expr {
468467
pub use datafusion_physical_expr::*;
469468
}
470469

471-
/// re-export of [`datafusion_row`] crate
472-
pub mod row {
473-
pub use datafusion_row::*;
474-
}
475-
476470
/// re-export of [`datafusion_sql`] crate
477471
pub mod sql {
478472
pub use datafusion_sql::*;

datafusion/core/src/physical_plan/aggregates/mod.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use datafusion_common::{DataFusionError, Result};
3333
use datafusion_execution::TaskContext;
3434
use datafusion_expr::Accumulator;
3535
use datafusion_physical_expr::{
36-
aggregate::row_accumulator::RowAccumulator,
3736
equivalence::project_equivalence_properties,
3837
expressions::{Avg, CastExpr, Column, Sum},
3938
normalize_out_expr_with_columns_map, reverse_order_bys,
@@ -1093,7 +1092,6 @@ fn merge_expressions(
10931092
}
10941093

10951094
pub(crate) type AccumulatorItem = Box<dyn Accumulator>;
1096-
pub(crate) type RowAccumulatorItem = Box<dyn RowAccumulator>;
10971095

10981096
fn create_accumulators(
10991097
aggr_expr: &[Arc<dyn AggregateExpr>],
@@ -1104,21 +1102,6 @@ fn create_accumulators(
11041102
.collect::<Result<Vec<_>>>()
11051103
}
11061104

1107-
#[allow(dead_code)]
1108-
fn create_row_accumulators(
1109-
aggr_expr: &[Arc<dyn AggregateExpr>],
1110-
) -> Result<Vec<RowAccumulatorItem>> {
1111-
let mut state_index = 0;
1112-
aggr_expr
1113-
.iter()
1114-
.map(|expr| {
1115-
let result = expr.create_row_accumulator(state_index);
1116-
state_index += expr.state_fields().unwrap().len();
1117-
result
1118-
})
1119-
.collect::<Result<Vec<_>>>()
1120-
}
1121-
11221105
/// returns a vector of ArrayRefs, where each entry corresponds to either the
11231106
/// final value (mode = Final, FinalPartitioned and Single) or states (mode = Partial)
11241107
fn finalize_aggregation(

datafusion/core/src/physical_plan/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ use arrow::record_batch::RecordBatch;
3232
use datafusion_common::utils::DataPtr;
3333
pub use datafusion_expr::Accumulator;
3434
pub use datafusion_expr::ColumnarValue;
35-
pub use datafusion_physical_expr::aggregate::row_accumulator::RowAccumulator;
3635
use datafusion_physical_expr::equivalence::OrderingEquivalenceProperties;
3736
pub use display::{DefaultDisplay, DisplayAs, DisplayFormatType, VerboseDisplay};
3837
use futures::stream::{Stream, TryStreamExt};

0 commit comments

Comments
 (0)