morrySnow commented on code in PR #14867: URL: https://github.com/apache/doris/pull/14867#discussion_r1045844784
########## fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rewrite/rules/TypeCoercion.java: ########## @@ -160,6 +164,17 @@ public Expression visitInPredicate(InPredicate inPredicate, ExpressionRewriteCon .orElse(newInPredicate); } + @Override + public Expression visitBitNot(BitNot bitNot, ExpressionRewriteContext context) { + Expression child = rewrite(bitNot.child(), context); + if (child.getDataType().toCatalogDataType().getPrimitiveType().ordinal() + > PrimitiveType.LARGEINT.ordinal()) { + child = new Cast(child, BigIntType.INSTANCE); + return bitNot.withChildren(child); + } + return bitNot; Review Comment: en..., it is still not right, need to substitute child when child has changed -- 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