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_r377634636
##########
File path: fe/src/main/java/org/apache/doris/analysis/SelectStmt.java
##########
@@ -351,6 +351,14 @@ public void analyze(Analyzer analyzer) throws
AnalysisException, UserException {
if (groupByClause != null && groupByClause.isGroupByExtension()) {
groupingInfo = new GroupingInfo(analyzer,
groupByClause.getGroupingType());
groupingInfo.substituteGroupingFn(resultExprs, analyzer);
+ } else {
+ for (Expr expr : resultExprs) {
+ if (checkGroupingFn(expr)) {
+ throw new AnalysisException(
+ "cannot use GROUPING functions without [grouping
sets|rollup|cube] a"
Review comment:
```suggestion
"cannot use GROUPING functions without [grouping
sets|rollup|cube] "
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]