dbx_core/sql/executor/
mod.rs1use crate::error::DbxResult;
4use arrow::array::RecordBatch;
5use arrow::compute;
6use arrow::datatypes::Schema;
7use std::sync::Arc;
8
9pub mod expr;
10pub mod operators;
11pub mod parallel_query;
12
13pub use expr::evaluate_expr;
14pub use operators::{
15 FilterOperator, HashAggregateOperator, HashJoinOperator, LimitOperator, PhysicalOperator,
16 ProjectionOperator, SortOperator, TableScanOperator,
17};
18pub use parallel_query::{AggregateResult, AggregateType, ParallelQueryExecutor};
19
20pub fn concat_batches(schema: &Arc<Schema>, batches: &[RecordBatch]) -> DbxResult<RecordBatch> {
22 if batches.len() == 1 {
23 return Ok(batches[0].clone());
24 }
25 Ok(compute::concat_batches(schema, batches)?)
26}