Skip to content

Commit 13a8ccf

Browse files
authored
Move the plan (logical and eval) and evaluation to DAG model (#209)
- Moves the remaining operators to DAG operators for both `logical` and `evaluation`. - Adds a `extend_with_flows` method to `LogicalPlan` to accept array of `flows` (edges). - Addresses the remaining comments from #202 #207 - Moves `add_flow` to `1-indexed`. - Removes optional value from `EvalResult`. - Renames operators names (E.g. prepends `Eval` to the new ones (E.g. `Scan` to `EvalScan`). - Removes redundant structures related to previous the tree model. - Refactors the current tests to ensure they pass w/ the latest changes.
1 parent 7104a8c commit 13a8ccf

File tree

6 files changed

+484
-776
lines changed

6 files changed

+484
-776
lines changed

partiql-eval/benches/bench_eval.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
use std::cell::RefCell;
2-
use std::rc::Rc;
31
use std::time::Duration;
42

53
use criterion::{black_box, criterion_group, criterion_main, Criterion};
64

75
use partiql_eval::env::basic::MapBindings;
86
use partiql_eval::eval::{
9-
BasicContext, EvalFrom, EvalOutputAccumulator, EvalPath, EvalVarRef, Evaluable, Output,
10-
PathComponent,
7+
BasicContext, EvalPath, EvalPathComponent, EvalScan, EvalVarRef, Evaluable,
118
};
129
use partiql_value::{
1310
partiql_bag, partiql_list, partiql_tuple, Bag, BindingsName, List, Tuple, Value,
@@ -52,19 +49,15 @@ fn data() -> MapBindings<Value> {
5249

5350
fn eval_bench(c: &mut Criterion) {
5451
fn eval(eval: bool) {
55-
let output = Rc::new(RefCell::new(EvalOutputAccumulator::default()));
56-
let eout = Box::new(Output { output });
57-
5852
// eval plan for SELECT * FROM hr.employeesNestScalars
59-
let mut from = EvalFrom::new(
53+
let mut from = EvalScan::new(
6054
Box::new(EvalPath {
6155
expr: Box::new(EvalVarRef {
6256
name: BindingsName::CaseInsensitive("hr".to_string()),
6357
}),
64-
components: vec![PathComponent::Key("employeesNestScalars".to_string())],
58+
components: vec![EvalPathComponent::Key("employeesNestScalars".to_string())],
6559
}),
6660
"x",
67-
eout,
6861
);
6962

7063
let ctx = BasicContext::new(data());

0 commit comments

Comments
 (0)