From da7eb9e42f40446c4769904f18367875afc26df5 Mon Sep 17 00:00:00 2001 From: Connor Tsui Date: Sun, 25 Feb 2024 12:00:54 -0500 Subject: [PATCH] fix privacy --- eggstrain/src/execution/operators/filter.rs | 10 +++++----- eggstrain/src/execution/operators/project.rs | 12 +++++------- eggstrain/src/execution/query_dag.rs | 4 ++-- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/eggstrain/src/execution/operators/filter.rs b/eggstrain/src/execution/operators/filter.rs index c091309..d771c18 100644 --- a/eggstrain/src/execution/operators/filter.rs +++ b/eggstrain/src/execution/operators/filter.rs @@ -11,14 +11,14 @@ use tokio::sync::broadcast; use tokio::sync::broadcast::error::RecvError; /// TODO docs -pub struct Filter { - pub predicate: Arc, - pub children: Vec>, +pub(crate) struct Filter { + predicate: Arc, + children: Vec>, } /// TODO docs impl Filter { - pub fn new(predicate: Arc, children: Vec>) -> Self { + pub(crate) fn new(predicate: Arc, children: Vec>) -> Self { Self { predicate, children, @@ -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 { + fn batch_filter(&self, batch: RecordBatch) -> Result { self.predicate .evaluate(&batch) .and_then(|v| v.into_array(batch.num_rows())) diff --git a/eggstrain/src/execution/operators/project.rs b/eggstrain/src/execution/operators/project.rs index 79a04f1..26b8b33 100644 --- a/eggstrain/src/execution/operators/project.rs +++ b/eggstrain/src/execution/operators/project.rs @@ -9,20 +9,18 @@ use tokio::sync::broadcast; use tokio::sync::broadcast::error::RecvError; /// TODO docs -pub struct Project { - pub output_expr: Vec<(Arc, String)>, - pub input_schema: SchemaRef, // TODO - pub output_schema: SchemaRef, - pub children: Vec>, +pub(crate) struct Project { + output_expr: Vec<(Arc, String)>, + input_schema: SchemaRef, // TODO + children: Vec>, } /// 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(), } } diff --git a/eggstrain/src/execution/query_dag.rs b/eggstrain/src/execution/query_dag.rs index 298161a..354fb1f 100644 --- a/eggstrain/src/execution/query_dag.rs +++ b/eggstrain/src/execution/query_dag.rs @@ -20,7 +20,7 @@ use tokio::sync::broadcast; /// /// TODO docs #[derive(Clone)] -pub(crate) enum EggstrainOperator { +enum EggstrainOperator { Project(Arc>), Filter(Arc>), @@ -121,7 +121,7 @@ fn datafusion_execute(plan: Arc, tx: broadcast::Sender