starocean999 commented on code in PR #24965: URL: https://github.com/apache/doris/pull/24965#discussion_r1367041405
########## fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java: ########## @@ -411,6 +420,19 @@ private Type getCmpType() throws AnalysisException { } } + if (canCompareIP(getChild(0).getType().getPrimitiveType(), getChild(1).getType().getPrimitiveType())) { + if ((getChild(0).getType().isIP() && getChild(1) instanceof StringLiteral) + || (getChild(1).getType().isIP() && getChild(0) instanceof StringLiteral) + || (getChild(0).getType().isIP() && getChild(1).getType().isIP())) { + if (getChild(0).getType().isIPv4() || getChild(1).getType().isIPv4()) { Review Comment: if IPV4 cmp IPV6, the getCmpType will return IPV4, is this the expected behavior? -- 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