Skip to content

Commit

Permalink
remove some unused codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Sep 23, 2024
1 parent e9fe746 commit 4d6f5e6
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions datafusion/physical-plan/src/aggregates/row_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
}

0 comments on commit 4d6f5e6

Please sign in to comment.