morningman opened a new pull request #1422: Cast the type of constant value in 
binary predicate to column type.
URL: https://github.com/apache/incubator-doris/pull/1422
 
 
   If one child of a binary predicate is column, and the other is a constant 
expr,
   set the compatible type to column's type.
   eg:
   k1(int):
   ... WHERE k1 = "123"  -->  k1 = cast("123" as int);
   
   k2(varchar):
   ... WHERE 123 = k2 --> cast(123 as varchar) = k2
   
   This optimization is for the case that some users may use a int column to 
save date, eg: 20190703,
   but query with predicate: col = "20190703".
   
   If not casting "20190703" to int, query optimizer can not do partition prune 
correctly.

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


With regards,
Apache Git Services

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

Reply via email to