Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
fix privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
connortsui20 committed Feb 25, 2024
1 parent e025452 commit da7eb9e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
10 changes: 5 additions & 5 deletions eggstrain/src/execution/operators/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ use tokio::sync::broadcast;
use tokio::sync::broadcast::error::RecvError;

/// TODO docs
pub struct Filter {
pub predicate: Arc<dyn PhysicalExpr>,
pub children: Vec<Arc<dyn ExecutionPlan>>,
pub(crate) struct Filter {
predicate: Arc<dyn PhysicalExpr>,
children: Vec<Arc<dyn ExecutionPlan>>,
}

/// TODO docs
impl Filter {
pub fn new(predicate: Arc<dyn PhysicalExpr>, children: Vec<Arc<dyn ExecutionPlan>>) -> Self {
pub(crate) fn new(predicate: Arc<dyn PhysicalExpr>, children: Vec<Arc<dyn ExecutionPlan>>) -> Self {
Self {
predicate,
children,
Expand All @@ -27,7 +27,7 @@ impl Filter {

/// Taken from DataFusion's `FilterExec`
/// [code](https://docs.rs/datafusion-physical-plan/36.0.0/src/datafusion_physical_plan/filter.rs.html#307)
pub fn batch_filter(&self, batch: RecordBatch) -> Result<RecordBatch> {
fn batch_filter(&self, batch: RecordBatch) -> Result<RecordBatch> {
self.predicate
.evaluate(&batch)
.and_then(|v| v.into_array(batch.num_rows()))
Expand Down
12 changes: 5 additions & 7 deletions eggstrain/src/execution/operators/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ use tokio::sync::broadcast;
use tokio::sync::broadcast::error::RecvError;

/// TODO docs
pub struct Project {
pub output_expr: Vec<(Arc<dyn PhysicalExpr>, String)>,
pub input_schema: SchemaRef, // TODO
pub output_schema: SchemaRef,
pub children: Vec<Arc<dyn ExecutionPlan>>,
pub(crate) struct Project {
output_expr: Vec<(Arc<dyn PhysicalExpr>, String)>,
input_schema: SchemaRef, // TODO
children: Vec<Arc<dyn ExecutionPlan>>,
}

/// TODO docs
impl Project {
pub fn new(input_schema: SchemaRef, projection_plan: &ProjectionExec) -> Self {
pub(crate) fn new(input_schema: SchemaRef, projection_plan: &ProjectionExec) -> Self {
Self {
output_expr: Vec::from(projection_plan.expr()),
input_schema,
output_schema: projection_plan.schema(),
children: projection_plan.children(),
}
}
Expand Down
4 changes: 2 additions & 2 deletions eggstrain/src/execution/query_dag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use tokio::sync::broadcast;
///
/// TODO docs
#[derive(Clone)]
pub(crate) enum EggstrainOperator {
enum EggstrainOperator {
Project(Arc<dyn UnaryOperator<In = RecordBatch, Out = RecordBatch>>),
Filter(Arc<dyn UnaryOperator<In = RecordBatch, Out = RecordBatch>>),

Expand Down Expand Up @@ -121,7 +121,7 @@ fn datafusion_execute(plan: Arc<dyn ExecutionPlan>, tx: broadcast::Sender<Record
continue;
}

tx.send(batch.clone())
tx.send(batch)
.expect("Unable to send rb to project node");
}
}
Expand Down

0 comments on commit da7eb9e

Please sign in to comment.