wutiangan commented on a change in pull request #3527: URL: https://github.com/apache/incubator-doris/pull/3527#discussion_r430819150
########## File path: fe/src/main/java/org/apache/doris/analysis/BinaryPredicate.java ########## @@ -263,15 +263,9 @@ public void vectorizedAnalyze(Analyzer analyzer) { private boolean canCompareDate(PrimitiveType t1, PrimitiveType t2) { if (t1.isDateType()) { - if (t2.isDateType() || t2.isStringType()) { - return true; - } - return false; + return t2.isDateType() || t2.isStringType(); } else if (t2.isDateType()) { - if (t1.isStringType()) { - return true; - } - return false; + return t1.isStringType(); Review comment: why not modify to “return t1.isDateType() || t1.isStringType()” ########## File path: fe/src/main/java/org/apache/doris/analysis/BinaryPredicate.java ########## @@ -306,6 +300,10 @@ private Type getCmpType() { return Type.LARGEINT; } + if ((t1.isNumericType() && t2.isStringType()) || (t1.isStringType() && t2.isNumericType())) { + return t1.isNumericType() ? Type.fromPrimitiveType(t1) : Type.fromPrimitiveType(t2); + } Review comment: what about if "LargeIntType"(16byte) compare "DoubelType"(8byte) ? what about if "DecimalValuetType"(16byte) compare "DoubelType"(8byte) ? what about if "LargeIntType" compare "DecimalType" ? what about if "DecimalType" compare "DecimalType" ? ---------------------------------------------------------------- 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. 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