use arrow::array::BooleanBufferBuilder;
pub use cross_join::CrossJoinExec;
use datafusion_physical_expr::PhysicalExprRef;
pub use hash_join::{
HashExpr, HashJoinExec, HashJoinExecBuilder, HashTableLookupExpr, SeededRandomState,
};
pub use nested_loop_join::{NestedLoopJoinExec, NestedLoopJoinExecBuilder};
use parking_lot::Mutex;
pub use piecewise_merge_join::PiecewiseMergeJoinExec;
pub use sort_merge_join::SortMergeJoinExec;
pub use symmetric_hash_join::SymmetricHashJoinExec;
pub mod chain;
mod cross_join;
mod hash_join;
mod nested_loop_join;
mod piecewise_merge_join;
mod sort_merge_join;
mod stream_join_utils;
mod symmetric_hash_join;
pub mod utils;
mod array_map;
mod join_filter;
pub mod join_hash_map;
use array_map::ArrayMap;
use utils::JoinHashMapType;
pub enum Map {
HashMap(Box<dyn JoinHashMapType>),
ArrayMap(ArrayMap),
}
impl Map {
pub fn num_of_distinct_key(&self) -> usize {
match self {
Map::HashMap(map) => map.len(),
Map::ArrayMap(array_map) => array_map.num_of_distinct_key(),
}
}
pub fn is_empty(&self) -> bool {
self.num_of_distinct_key() == 0
}
}
pub(crate) type MapOffset = (usize, Option<u64>);
#[cfg(test)]
pub mod test_utils;
pub type JoinOn = Vec<(PhysicalExprRef, PhysicalExprRef)>;
pub type JoinOnRef<'a> = &'a [(PhysicalExprRef, PhysicalExprRef)];
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PartitionMode {
Partitioned,
CollectLeft,
Auto,
}
#[derive(Hash, Clone, Copy, Debug, PartialEq, Eq)]
pub enum StreamJoinPartitionMode {
Partitioned,
SinglePartition,
}
type SharedBitmapBuilder = Mutex<BooleanBufferBuilder>;