pub trait ComparatorTrait: Send + Sync {
// Required method
fn compare(
&self,
a: &Record,
b: &Record,
schema: &Schema,
) -> ComparisonVector;
// Provided method
fn compare_batch_from_pool(
&self,
pool: &RecordPool,
indices: &[(usize, usize)],
schema: &Schema,
) -> ComparisonBatch { ... }
}Required Methods§
Provided Methods§
Sourcefn compare_batch_from_pool(
&self,
pool: &RecordPool,
indices: &[(usize, usize)],
schema: &Schema,
) -> ComparisonBatch
fn compare_batch_from_pool( &self, pool: &RecordPool, indices: &[(usize, usize)], schema: &Schema, ) -> ComparisonBatch
Pool-native batch comparison, the primary hot path.
Reads RecordPool columns directly: zero HashMap lookups, no
Record::clone(). Implementors SHOULD override this method.
The default falls back to compare per pair, which is correct but
slower than a native pool implementation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".