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 @@ -137,8 +137,11 @@ impl RewriteRules for MemberRules {
137137 "?old_members" ,
138138 "?filters" ,
139139 "?orders" ,
140- "?limit" ,
141- "?offset" ,
140+ // If CubeScan already have limit and offset it would be incorrect to push aggregation into it
141+ // Aggregate(CubeScan(limit, offset)) would run aggregation over limited rows
142+ // CubeScan(aggregation, limit, offset) would return limited groups
143+ "CubeScanLimit:None" ,
144+ "CubeScanOffset:None" ,
142145 "?split" ,
143146 "?can_pushdown_join" ,
144147 "CubeScanWrapped:false" ,
@@ -164,8 +167,8 @@ impl RewriteRules for MemberRules {
164167 ) ,
165168 "?filters" ,
166169 "?orders" ,
167- "?limit " ,
168- "?offset " ,
170+ "CubeScanLimit:None " ,
171+ "CubeScanOffset:None " ,
169172 "?split" ,
170173 "?new_pushdown_join" ,
171174 "CubeScanWrapped:false" ,
You can’t perform that action at this time.
0 commit comments