morningman commented on a change in pull request #2877: [FIX] fix a bug when 
using grouping set without all column in a grouping set item
URL: https://github.com/apache/incubator-doris/pull/2877#discussion_r377633873
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/GroupingInfo.java
 ##########
 @@ -85,12 +86,11 @@ public VirtualSlotRef addGroupingSlots(List<Expr> 
realSlots, Analyzer analyzer)
     // generate the bitmap that repeated node will repeat rows according to
     public void buildRepeat(ArrayList<Expr> groupingExprs, 
List<ArrayList<Expr>> groupingSetList) {
         groupingIdList = new ArrayList<>();
-        BitSet bitSetAll = new BitSet();
+        bitSetAll = new BitSet();
         bitSetAll.set(0, groupingExprs.size(), true);
-        groupingIdList.add(bitSetAll);
         switch (groupingType) {
             case CUBE:
-                for (int i = 0; i < (1 << groupingExprs.size()) - 1; i++) {
+                for (int i = 0; i < (1 << groupingExprs.size()); i++) {
 
 Review comment:
   Would add some examples for all these cases?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to