WingsGo commented on issue #3887:
URL: 
https://github.com/apache/incubator-doris/issues/3887#issuecomment-645097140


   > > > > 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?
   
   Yes, the PR didn't solve these problems, so if we need to avoid such 
situation, we much need much more test to ensure more situation is taken into 
conside.Currently we can only avoid by our sql.


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to