You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/11/24 03:51:59 UTC
[GitHub] [doris] zhengshiJ commented on a diff in pull request #14496: [feature](Nereids) Implement group by grouping sets, cube and rollup
zhengshiJ commented on code in PR #14496:
URL: https://github.com/apache/doris/pull/14496#discussion_r1031033233
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/SlotReference.java:
##########
@@ -179,32 +167,28 @@ public SlotReference withChildren(List<Expression> children) {
}
public SlotReference withDataType(DataType dataType) {
- return new SlotReference(exprId, name, dataType, nullable, qualifier, canPushDownPredicate, column);
+ return new SlotReference(exprId, name, dataType, nullable, qualifier, column);
}
public SlotReference withNullable(boolean newNullable) {
if (this.nullable == newNullable) {
return this;
}
- return new SlotReference(exprId, name, dataType, newNullable, qualifier, canPushDownPredicate, column);
+ return new SlotReference(exprId, name, dataType, newNullable, qualifier, column);
}
@Override
public SlotReference withQualifier(List<String> qualifiers) {
- return new SlotReference(exprId, name, dataType, nullable, qualifiers, canPushDownPredicate, column);
+ return new SlotReference(exprId, name, dataType, nullable, qualifiers, column);
}
/** withCommonGroupingSetExpression */
public Slot withCommonGroupingSetExpression(boolean isCommonGroupingSetExpression) {
if (isCommonGroupingSetExpression) {
- boolean canPushDownPredicate = true;
- return new SlotReference(exprId, name, dataType, nullable, qualifier,
- Optional.of(canPushDownPredicate), column);
+ return new SlotReference(exprId, name, dataType, nullable, qualifier, column);
} else {
boolean nullable = true;
- boolean canPushDownPredicate = false;
- return new SlotReference(exprId, name, dataType, nullable, qualifier,
- Optional.of(canPushDownPredicate), column);
+ return new SlotReference(exprId, name, dataType, nullable, qualifier, column);
}
}
Review Comment:
done
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSlotReference.java:
##########
@@ -586,4 +612,59 @@ public boolean hasGroupBy() {
return false;
}
}
+
+ private List<NamedExpression> adjustNullableForProjects(
Review Comment:
done
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/If.java:
##########
@@ -90,15 +84,6 @@ public class If extends ScalarFunction
.args(BooleanType.INSTANCE, StringType.INSTANCE, StringType.INSTANCE)
);
- private final Supplier<DataType> widerType = Suppliers.memoize(() -> {
- List<AbstractDataType> argumentsTypes = getSignature().argumentsTypes;
- Type assignmentCompatibleType = ScalarType.getAssignmentCompatibleType(
- argumentsTypes.get(1).toCatalogDataType(),
- argumentsTypes.get(2).toCatalogDataType(),
- true);
- return DataType.fromCatalogType(assignmentCompatibleType);
- });
-
/**
Review Comment:
fixed
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org