From 4d6f5e6b4eb5f30b62e81cda9d9a6f574f60e4fe Mon Sep 17 00:00:00 2001 From: kamille Date: Tue, 24 Sep 2024 00:28:51 +0800 Subject: [PATCH] remove some unused codes. --- .../physical-plan/src/aggregates/row_hash.rs | 40 +------------------ 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/datafusion/physical-plan/src/aggregates/row_hash.rs b/datafusion/physical-plan/src/aggregates/row_hash.rs index ccba7de2c199..304360f22b9b 100644 --- a/datafusion/physical-plan/src/aggregates/row_hash.rs +++ b/datafusion/physical-plan/src/aggregates/row_hash.rs @@ -35,7 +35,7 @@ use crate::stream::RecordBatchStreamAdapter; use crate::{aggregates, metrics, ExecutionPlan, PhysicalExpr}; use crate::{RecordBatchStream, SendableRecordBatchStream}; -use arrow::{array::*, compute}; +use arrow::array::*; use arrow::datatypes::SchemaRef; use arrow_schema::SortOptions; use datafusion_common::utils::get_arrayref_at_indices; @@ -1422,41 +1422,3 @@ impl GroupedHashAggregateStream { Ok(states_batch) } } - -// /// ```text -// /// ┌─────┐ ┌─────┐ ┌─────┐ -// /// │true │ │NULL │ │NULL │ -// /// │true │ │ │true │ │true │ -// /// │true │ ───┼─── │false│ ────────▶ │false│ filtered_nulls -// /// │false│ │ │NULL │ │false│ -// /// │false│ │true │ │false│ -// /// └─────┘ └─────┘ └─────┘ -// /// array opt_filter output -// /// .nulls() -// /// -// /// false = NULL true = pass false = NULL Meanings -// /// true = valid false = filter true = valid -// /// NULL = filter -// /// ``` -// /// -// /// [`GroupsAccumulator::convert_to_state`]: datafusion_expr_common::groups_accumulator::GroupsAccumulator -fn create_partitioned_filter() { - // We need a BooleanBuffer - - // Firstly, we make sure the buffer is long enough - - - // Then we set the indexed slot to `true` if `equal to` partition_index, - // and `false` if `not equal to` - - // Finally, take `filter` into consider if it exists - // - `buffer:true` + `filter:true` -> `buffer:true` - // - `buffer:true` + `filter:false` -> `buffer:false` - // - `buffer:true` + `filter:NULL` -> `buffer:NULL` - // - `buffer:false` + `filter:true` -> `buffer:false` - // - `buffer:false` + `filter:false` -> `buffer:false` - // - `buffer:false` + `filter:NULL` -> `buffer:false` - let mut a = BooleanArray::from(vec![Some(true), Some(false), Some(true)]); - let buidler = a.into_data().into_builder(); - compute::binary_mut(a, b, op) -}