EmmyMiao87 commented on a change in pull request #7800:
URL: https://github.com/apache/incubator-doris/pull/7800#discussion_r788306077
##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
##########
@@ -722,7 +722,9 @@ public SlotDescriptor registerVirtualColumnRef(String
colName, Type type, TupleD
result = addSlotDescriptor(tupleDescriptor);
Column col = new Column(colName, type);
result.setColumn(col);
- result.setIsNullable(true);
+ // now virtual slot: only use in grouping set to generate grouping id,
+ // so it should always is not nullable
+ result.setIsNullable(false);
Review comment:
It is better to use the `isNullable` of the column
##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/RepeatNode.java
##########
@@ -131,7 +131,8 @@ public void init(Analyzer analyzer) throws UserException {
// build tupleDesc according to child's tupleDesc info
outputTupleDesc = groupingInfo.getVirtualTuple();
//set aggregate nullable
- for (Expr slot : groupByClause.getGroupingExprs()) {
+ for (int i = 0; i < groupByClause.getGroupingExprs().size() - 1; i++) {
Review comment:
It doesn't look like it needs to be changed?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]