Skip to content

Commit 4ccd041

Browse files
committed
WIP: Fix planning_topk_having test
1 parent e40a2e6 commit 4ccd041

File tree

1 file changed

+20
-21
lines changed
  • rust/cubestore/cubestore-sql-tests/src

1 file changed

+20
-21
lines changed

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

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4093,18 +4093,18 @@ async fn planning_topk_having(service: Box<dyn SqlClient>) {
40934093
show_hints.show_filters = true;
40944094
assert_eq!(
40954095
pp_phys_plan_ext(p.worker.as_ref(), &show_hints),
4096-
"Projection, [url, SUM(Data.hits)@1:hits]\
4097-
\n AggregateTopK, limit: 3, having: SUM(Data.hits)@1 > 10\
4096+
"Projection, [url, sum(Data.hits)@1:hits]\
4097+
\n AggregateTopKExec\
40984098
\n Worker\
40994099
\n Sort\
4100-
\n FullInplaceAggregate\
4100+
\n SortedSingleAggregate\
41014101
\n MergeSort\
41024102
\n Union\
4103-
\n MergeSort\
4104-
\n Scan, index: default:1:[1]:sort_on[url], fields: [url, hits]\
4103+
\n Scan, index: default:1:[1]:sort_on[url], fields: [url, hits]\
4104+
\n Sort\
41054105
\n Empty\
4106-
\n MergeSort\
4107-
\n Scan, index: default:2:[2]:sort_on[url], fields: [url, hits]\
4106+
\n Scan, index: default:2:[2]:sort_on[url], fields: [url, hits]\
4107+
\n Sort\
41084108
\n Empty"
41094109
);
41104110

@@ -4121,20 +4121,19 @@ async fn planning_topk_having(service: Box<dyn SqlClient>) {
41214121
show_hints.show_filters = true;
41224122
assert_eq!(
41234123
pp_phys_plan_ext(p.worker.as_ref(), &show_hints),
4124-
"Projection, [url, hits, CARDINALITY(MERGE(Data.uhits)@2):uhits]\
4125-
\n Projection, [url, SUM(Data.hits)@1:hits, MERGE(Data.uhits)@2:MERGE(uhits)]\
4126-
\n AggregateTopK, limit: 3, having: SUM(Data.hits)@1 > 10 AND CAST(CARDINALITY(MERGE(Data.uhits)@2) AS Int64) > 5\
4127-
\n Worker\
4128-
\n Sort\
4129-
\n FullInplaceAggregate\
4130-
\n MergeSort\
4131-
\n Union\
4132-
\n MergeSort\
4133-
\n Scan, index: default:1:[1]:sort_on[url], fields: *\
4134-
\n Empty\
4135-
\n MergeSort\
4136-
\n Scan, index: default:2:[2]:sort_on[url], fields: *\
4137-
\n Empty"
4124+
"Projection, [url, sum(Data.hits)@1:hits, cardinality(merge(Data.uhits)@2):uhits]\
4125+
\n AggregateTopKExec\
4126+
\n Worker\
4127+
\n Sort\
4128+
\n SortedSingleAggregate\
4129+
\n MergeSort\
4130+
\n Union\
4131+
\n Scan, index: default:1:[1]:sort_on[url], fields: *\
4132+
\n Sort\
4133+
\n Empty\
4134+
\n Scan, index: default:2:[2]:sort_on[url], fields: *\
4135+
\n Sort\
4136+
\n Empty"
41384137
);
41394138
// Checking execution because the column name MERGE(Data.uhits) in the top projection in the
41404139
// above assertion seems incorrect, but the column number is correct.

0 commit comments

Comments
 (0)