From 951da11c2b7b7710e63f2b8a6a88f7318948ebed Mon Sep 17 00:00:00 2001 From: LiBinfeng <1204975323@qq.com> Date: Thu, 19 Sep 2024 11:09:06 +0800 Subject: [PATCH] fix p0 problem --- .../rules/expression/rules/FoldConstantRuleOnBE.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java index b237a3d6c5eed6..810d281ac579ac 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnBE.java @@ -177,7 +177,12 @@ private static Expression replace( hasNewChildren = true; } if (!newChild.getDataType().equals(child.getDataType())) { - newChildren.add(newChild.castTo(child.getDataType())); + try { + newChildren.add(newChild.castTo(child.getDataType())); + } catch (Exception e) { + LOG.warn("expression of type {} cast to {} failed. ", newChild.getDataType(), child.getDataType()); + newChildren.add(newChild); + } } else { newChildren.add(newChild); }