File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
rust/cubesql/cubesql/src/compile/rewrite/rules Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -134,8 +134,11 @@ impl RewriteRules for MemberRules {
134134 "?old_members" ,
135135 "?filters" ,
136136 "?orders" ,
137- "?limit" ,
138- "?offset" ,
137+ // If CubeScan already have limit and offset ot would be incorrect to push aggregation into it
138+ // Aggregate(CubeScan(limit, offset)) would run aggregation over limited rows
139+ // CubeScan(aggregation, limit, offset) would return limited groups
140+ "CubeScanLimit:None" ,
141+ "CubeScanOffset:None" ,
139142 "?split" ,
140143 "?can_pushdown_join" ,
141144 "CubeScanWrapped:false" ,
@@ -161,8 +164,8 @@ impl RewriteRules for MemberRules {
161164 ) ,
162165 "?filters" ,
163166 "?orders" ,
164- "?limit " ,
165- "?offset " ,
167+ "CubeScanLimit:None " ,
168+ "CubeScanOffset:None " ,
166169 "?split" ,
167170 "?new_pushdown_join" ,
168171 "CubeScanWrapped:false" ,
You can’t perform that action at this time.
0 commit comments