You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/08/25 11:23:00 UTC

[GitHub] [incubator-doris] Astralidea commented on a change in pull request #4445: support StringLiteral try to cast BigInt

Astralidea commented on a change in pull request #4445:
URL: https://github.com/apache/incubator-doris/pull/4445#discussion_r476372131



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
##########
@@ -307,6 +307,16 @@ private Type getCmpType() {
             return Type.LARGEINT;
         }
 
+        // Try parse varchar to bigint
+        if (t1 == PrimitiveType.BIGINT && t2 == PrimitiveType.VARCHAR) {

Review comment:
       > Because we have `NormalizeBinaryPredicatesRule`. You could only consider slot in left and string Literal in right
   但是我试了一下,如果我注释掉代码后,如果SQL这么写,还是转成Double了,虽然很少有人这么写SQL。
   explain select count()
   from app_rt_flow_poi_intent_uv_price_v2
   where '20200730'=datekey
   回头我看一下NormalizeBinaryPredicatesRule的原理。




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org