use std::any::Any;
use polars_core::prelude::*;
use polars_utils::index::ChunkId;
use polars_utils::IdxSize;
use crate::hash_keys::HashKeys;
mod row_encoded;
pub trait ChunkedIdxTable: Any + Send + Sync {
fn new_empty(&self) -> Box<dyn ChunkedIdxTable>;
fn reserve(&mut self, additional: usize);
fn num_keys(&self) -> IdxSize;
fn insert_key_chunk(&mut self, keys: HashKeys, track_unmatchable: bool);
fn probe(
&self,
hash_keys: &HashKeys,
table_match: &mut Vec<ChunkId<32>>,
probe_match: &mut Vec<IdxSize>,
mark_matches: bool,
emit_unmatched: bool,
limit: IdxSize,
) -> IdxSize;
#[allow(clippy::too_many_arguments)]
unsafe fn probe_subset(
&self,
hash_keys: &HashKeys,
subset: &[IdxSize],
table_match: &mut Vec<ChunkId<32>>,
probe_match: &mut Vec<IdxSize>,
mark_matches: bool,
emit_unmatched: bool,
limit: IdxSize,
) -> IdxSize;
fn unmarked_keys(&self, out: &mut Vec<ChunkId<32>>, offset: IdxSize, limit: IdxSize)
-> IdxSize;
}
pub fn new_chunked_idx_table(_key_schema: Arc<Schema>) -> Box<dyn ChunkedIdxTable> {
Box::new(row_encoded::RowEncodedChunkedIdxTable::new())
}