private static int getColInfoPos(ExprNodeDesc aggExpr, GBInfo gbInfo ) {
    //first see if it is gbkeys
    int gbKeyIndex = ExprNodeDescUtils.indexOf(aggExpr, gbInfo.gbKeys);
    if(gbKeyIndex < 0 )  {
        //then check if it is distinct key
      int distinctKeyIndex = ExprNodeDescUtils.indexOf(aggExpr, gbInfo.distExprNodes);
      if(distinctKeyIndex < 0) {
        // lastly it should be in deDupedNonDistIrefs
        int deDupValIndex = ExprNodeDescUtils.indexOf(aggExpr, gbInfo.deDupedNonDistIrefs);
        assert(deDupValIndex >= 0);
        return gbInfo.gbKeys.size() + gbInfo.distExprNodes.size() + deDupValIndex;
      }
      else {
        //aggExpr is part of distinct key
        return gbInfo.gbKeys.size() + distinctKeyIndex;
      }

    }
    else {
        return gbKeyIndex;
    }
  }
RS-GB0

@param inputOpAf
@param gbInfo
@param gbMode
@return
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/opconventer/HiveGBOpConvUtil.java