924060929 commented on code in PR #14496:
URL: https://github.com/apache/doris/pull/14496#discussion_r1030221668


##########
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:
   you can delete this method and use `withNullable` method



##########
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:
   wider type is nessesary, if there is some bug, you should fix it, but not 
delete this widerType



##########
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:
   leave behind some comment for adjestNullableXxx



-- 
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-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to