Gabriel39 commented on code in PR #11796:
URL: https://github.com/apache/doris/pull/11796#discussion_r950032082


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java:
##########
@@ -376,18 +376,15 @@ private Type getCmpType() throws AnalysisException {
         // When int column compares with string, Mysql will convert string to 
int.
         // So it is also compatible with Mysql.
 
-        if (t1 == PrimitiveType.BIGINT && (t2 == PrimitiveType.VARCHAR || t2 
== PrimitiveType.STRING)) {
-            Expr rightChild = getChild(1);
-            Long parsedLong = Type.tryParseToLong(rightChild);
-            if (parsedLong != null) {
+        if (t1.isStringType() || t2.isStringType()) {
+            if (t1 == PrimitiveType.BIGINT && 
Type.canParseToBigInt(getChild(1))
+                    || t2 == PrimitiveType.BIGINT && 
Type.canParseToBigInt(getChild(0))) {

Review Comment:
   if ((t1 == PrimitiveType.BIGINT && Type.canParseToBigInt(getChild(1)))
                       || (t2 == PrimitiveType.BIGINT && 
Type.canParseToBigInt(getChild(0))))



-- 
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

Reply via email to