Skip to content

Commit 7ae5d6c

Browse files
authored
Merge branch 'main' into cijothomas/selective-ci
2 parents a595a30 + b3ee4b0 commit 7ae5d6c

File tree

7 files changed

+782
-97
lines changed

7 files changed

+782
-97
lines changed

rust/experimental/query_engine/engine-columnar/benches/filter.rs

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,42 @@ fn bench_filter_pipelines(c: &mut Criterion) {
102102
"logs | where
103103
(attributes[\"code.namespace\"] == \"main\" and attributes[\"code.line\"] == 2)
104104
or
105-
(attributes[\"code.namespace\"] == \"otap_dataflow_engine\" and attributes[\"code.line\"] == 3)",
105+
(attributes[\"code.namespace\"] == \"otap_dataflow_engine\" and attributes[\"code.line.number\"] == 3)",
106+
);
107+
108+
bench_log_pipeline(
109+
c,
110+
&rt,
111+
&batch_sizes,
112+
"and_attrs_short_circuit",
113+
// left expr of "and" should always return false for all rows
114+
"logs | where attributes[\"code.line.number\"] > 1000 and attributes[\"code.line.number\"] == 2",
115+
);
116+
117+
bench_log_pipeline(
118+
c,
119+
&rt,
120+
&batch_sizes,
121+
"and_short_circuit",
122+
// left expr of "and" should be false for all rows
123+
//
124+
// this is different from the case above in that the "and" here is currently something that
125+
// won't get optimized into a Composite<AttributeFilterExec> so we can test the fast path
126+
// in Composite<FilterExec>
127+
"logs | where severity_text == \"invalid value\" and attributes[\"code.line.number\"] == 2",
128+
);
129+
130+
bench_log_pipeline(
131+
c,
132+
&rt,
133+
&batch_sizes,
134+
"or_short_circuit",
135+
// left expr of "or" should be true for all rows
136+
//
137+
// this is different from the case above in that the "and" here is currently something that
138+
// won't get optimized into a Composite<AttributeFilterExec> so we can test the fast path
139+
// in Composite<FilterExec>
140+
"logs | where attributes[\"code.line.number\"] >= 0 or not(attributes[\"some.attr\"] >= 0 and severity_text == \"WARN\")",
106141
);
107142
}
108143

0 commit comments

Comments
 (0)