Skip to content

Commit 3ea1e22

Browse files
committed
WIP: Fixes around topk aggregate pretty printing
1 parent b56f98b commit 3ea1e22

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rust/cubestore/cubestore-sql-tests/src/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4094,7 +4094,7 @@ async fn planning_topk_having(service: Box<dyn SqlClient>) {
40944094
assert_eq!(
40954095
pp_phys_plan_ext(p.worker.as_ref(), &show_hints),
40964096
"Projection, [url, sum(Data.hits)@1:hits]\
4097-
\n AggregateTopKExec\
4097+
\n AggregateTopK, limit: 3, having: sum(Data.hits)@1 > 10\
40984098
\n Worker\
40994099
\n Sort\
41004100
\n SortedSingleAggregate\
@@ -4122,7 +4122,7 @@ async fn planning_topk_having(service: Box<dyn SqlClient>) {
41224122
assert_eq!(
41234123
pp_phys_plan_ext(p.worker.as_ref(), &show_hints),
41244124
"Projection, [url, sum(Data.hits)@1:hits, cardinality(merge(Data.uhits)@2):uhits]\
4125-
\n AggregateTopKExec\
4125+
\n AggregateTopK, limit: 3, having: sum(Data.hits)@1 > 10 AND cardinality(merge(Data.uhits)@2) > 5\
41264126
\n Worker\
41274127
\n Sort\
41284128
\n SortedSingleAggregate\
@@ -4168,7 +4168,7 @@ async fn planning_topk_hll(service: Box<dyn SqlClient>) {
41684168
assert_eq!(
41694169
pp_phys_plan(p.worker.as_ref()),
41704170
"Projection, [url, cardinality(merge(Data.hits)@1):hits]\
4171-
\n AggregateTopKExec\
4171+
\n AggregateTopK, limit: 3\
41724172
\n Worker\
41734173
\n Sort\
41744174
\n SortedSingleAggregate\

rust/cubestore/cubestore/src/queryplanner/pretty_printers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub fn pp_plan_ext(p: &LogicalPlan, opts: &PPOptions) -> String {
151151
LogicalPlan::Aggregate(Aggregate { aggr_expr, .. }) => {
152152
self.output += "Aggregate";
153153
if self.opts.show_aggregations {
154-
self.output += &format!(", aggs: {:?}", aggr_expr)
154+
self.output += &format!(", aggs: {}", pp_exprs(aggr_expr))
155155
}
156156
}
157157
LogicalPlan::Sort(Sort { expr, fetch, .. }) => {

0 commit comments

Comments
 (0)