lichuang commented on issue #13821:
URL: https://github.com/apache/datafusion/issues/13821#issuecomment-2577698922

   after i dig into this bug, here is the report:
   
   `cast(1 as decimal(4, 1))` will get a value `Decimal128(Some(10),4,1)`, and 
`eq` operator transfer to two operation:
   * compare with the min value, which is `PrimitiveArray<Decimal128(4, 1)>[1]} 
lteq Decimal128(Some(10),4,1)`, and return true;
   * compare with the max value, which is `Decimal128(Some(10),4,1) lteq 
PrimitiveArray<Decimal128(4, 1)>[4]}`, and return false;
   
   so `select * from t where col = cast(1 as decimal(4, 1))` cannot filter any 
columns.


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to