spaces-X commented on issue #3887: URL: https://github.com/apache/incubator-doris/issues/3887#issuecomment-644826476
> > > If '20200609' should cast to int will be right. > > > > > > Yeah > > If we change the logic in BinaryPredicate#getCmpType to add a rule like `(t1 = VARCHAR, t2 = FixedPointType: INT/BIGINT/...) -> (compatible type= FixedPointType: INT/BIGINT/...)`, will it be ok? > > We can not simple change like this, you can see this PR #3527 , change the behavior will cause some problem, such as:select '1.1' = 1; if we cast it to int , it will return true.select '0.0' = 0; will throw a error I see.Thanks a lot. So in this pr [#3527](https://github.com/apache/incubator-doris/pull/3527) , String will cast to NumericType in Binary Predicate, which will cause the problem you mentioned : `select '1.1' = 1` and this pr can not be merged. If we want to avoid scaning all partitions, we need some futher more works to do on the partition type itself. Right? ---------------------------------------------------------------- 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