-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add session context to evaluation (#446)
- Loading branch information
Showing
29 changed files
with
660 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use partiql_value::{BindingsName, DateTime, Tuple, Value}; | ||
use std::any::Any; | ||
use std::fmt::Debug; | ||
|
||
pub trait Bindings<T>: Debug { | ||
fn get(&self, name: &BindingsName) -> Option<&T>; | ||
} | ||
|
||
impl Bindings<Value> for Tuple { | ||
fn get(&self, name: &BindingsName) -> Option<&Value> { | ||
self.get(name) | ||
} | ||
} | ||
|
||
#[derive(Debug)] | ||
pub struct SystemContext { | ||
pub now: DateTime, | ||
} | ||
|
||
/// Represents a session context that is used during evaluation of a plan. | ||
pub trait SessionContext<'a>: Debug { | ||
fn bindings(&self) -> &dyn Bindings<Value>; | ||
|
||
fn system_context(&self) -> &SystemContext; | ||
|
||
fn user_context(&self, name: &str) -> Option<&(dyn Any)>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
4d9ae54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PartiQL (rust) Benchmark
arith_agg-avg
750597
ns/iter (± 7488
)754554
ns/iter (± 4322
)0.99
arith_agg-avg_distinct
836315
ns/iter (± 3793
)844531
ns/iter (± 2241
)0.99
arith_agg-count
793759
ns/iter (± 19048
)797390
ns/iter (± 13786
)1.00
arith_agg-count_distinct
826980
ns/iter (± 4937
)829564
ns/iter (± 6228
)1.00
arith_agg-min
796934
ns/iter (± 3103
)804063
ns/iter (± 2274
)0.99
arith_agg-min_distinct
832026
ns/iter (± 9211
)839403
ns/iter (± 2762
)0.99
arith_agg-max
803358
ns/iter (± 2992
)810532
ns/iter (± 3029
)0.99
arith_agg-max_distinct
843917
ns/iter (± 2002
)846513
ns/iter (± 2781
)1.00
arith_agg-sum
799575
ns/iter (± 23513
)808493
ns/iter (± 2023
)0.99
arith_agg-sum_distinct
832584
ns/iter (± 13265
)838090
ns/iter (± 2608
)0.99
arith_agg-avg-count-min-max-sum
935970
ns/iter (± 2693
)952146
ns/iter (± 5957
)0.98
arith_agg-avg-count-min-max-sum-group_by
1166138
ns/iter (± 17416
)1193797
ns/iter (± 14549
)0.98
arith_agg-avg-count-min-max-sum-group_by-group_as
1757688
ns/iter (± 17890
)1780324
ns/iter (± 17197
)0.99
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct
1267440
ns/iter (± 16676
)1234325
ns/iter (± 21454
)1.03
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct-group_by
1532572
ns/iter (± 102361
)1509448
ns/iter (± 19471
)1.02
arith_agg-avg_distinct-count_distinct-min_distinct-max_distinct-sum_distinct-group_by-group_as
2101194
ns/iter (± 18999
)2093994
ns/iter (± 19080
)1.00
parse-1
4189
ns/iter (± 17
)4277
ns/iter (± 18
)0.98
parse-15
39717
ns/iter (± 169
)39387
ns/iter (± 147
)1.01
parse-30
79927
ns/iter (± 1192
)77794
ns/iter (± 231
)1.03
compile-1
4182
ns/iter (± 16
)4404
ns/iter (± 13
)0.95
compile-15
30759
ns/iter (± 181
)32097
ns/iter (± 165
)0.96
compile-30
62767
ns/iter (± 193
)65060
ns/iter (± 486
)0.96
plan-1
67023
ns/iter (± 672
)65323
ns/iter (± 523
)1.03
plan-15
1044691
ns/iter (± 28724
)1023202
ns/iter (± 23909
)1.02
plan-30
2085981
ns/iter (± 15790
)2038989
ns/iter (± 5575
)1.02
eval-1
12576519
ns/iter (± 152058
)12530654
ns/iter (± 145755
)1.00
eval-15
85195131
ns/iter (± 1406453
)86425714
ns/iter (± 1706273
)0.99
eval-30
164167304
ns/iter (± 410291
)165648119
ns/iter (± 775470
)0.99
join
9793
ns/iter (± 144
)9722
ns/iter (± 64
)1.01
simple
2513
ns/iter (± 3
)2432
ns/iter (± 5
)1.03
simple-no
442
ns/iter (± 2
)434
ns/iter (± 3
)1.02
numbers
59
ns/iter (± 0
)57
ns/iter (± 0
)1.04
parse-simple
567
ns/iter (± 1
)577
ns/iter (± 3
)0.98
parse-ion
1755
ns/iter (± 6
)1776
ns/iter (± 20
)0.99
parse-group
6093
ns/iter (± 12
)5726
ns/iter (± 84
)1.06
parse-complex
15229
ns/iter (± 905
)14529
ns/iter (± 42
)1.05
parse-complex-fexpr
21704
ns/iter (± 729
)21178
ns/iter (± 656
)1.02
This comment was automatically generated by workflow using github-action-benchmark.