morrySnow commented on code in PR #15595: URL: https://github.com/apache/doris/pull/15595#discussion_r1062087740
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rewrite/rules/TypeCoercion.java: ########## @@ -149,7 +150,8 @@ public Expression visitInPredicate(InPredicate inPredicate, ExpressionRewriteCon InPredicate newInPredicate = inPredicate.withChildren(rewrittenChildren); if (newInPredicate.getOptions().stream().map(Expression::getDataType) - .allMatch(dt -> dt.equals(newInPredicate.getCompareExpr().getDataType()))) { + .allMatch(dt -> dt.equals(NullType.INSTANCE) + || dt.equals(newInPredicate.getCompareExpr().getDataType()))) { return newInPredicate; } Optional<DataType> optionalCommonType = TypeCoercionUtils.findWiderCommonType(newInPredicate.children() Review Comment: should also filter null type, when we do cast -- 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