From bd1fe85e2fd4abde4680b4bbcf6516c8ed291a70 Mon Sep 17 00:00:00 2001 From: LiBinfeng <1204975323@qq.com> Date: Fri, 15 Sep 2023 12:16:53 +0800 Subject: [PATCH] [Fix](Nereids) fix case when to if error in function signature --- .../doris/nereids/trees/expressions/functions/scalar/If.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/If.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/If.java index df8bc78a27a6e4b..5d16e3ff8f18cc2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/If.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/If.java @@ -40,6 +40,7 @@ import org.apache.doris.nereids.types.HllType; import org.apache.doris.nereids.types.IntegerType; import org.apache.doris.nereids.types.LargeIntType; +import org.apache.doris.nereids.types.NullType; import org.apache.doris.nereids.types.SmallIntType; import org.apache.doris.nereids.types.StringType; import org.apache.doris.nereids.types.TinyIntType; @@ -59,6 +60,8 @@ public class If extends ScalarFunction implements TernaryExpression, ExplicitlyCastableSignature { public static final List SIGNATURES = ImmutableList.of( + FunctionSignature.ret(NullType.INSTANCE) + .args(BooleanType.INSTANCE, NullType.INSTANCE, NullType.INSTANCE), FunctionSignature.ret(DateTimeV2Type.SYSTEM_DEFAULT) .args(BooleanType.INSTANCE, DateTimeV2Type.SYSTEM_DEFAULT, DateTimeV2Type.SYSTEM_DEFAULT), FunctionSignature.ret(DateV2Type.INSTANCE)