Hi, Could you please provide me with information on the following behavior? I'm working with the official 1.39 release. I have an operation in Calcite that no longer provides the same result (vs. 1.37). It's a simple query based on the TPCH model: "SELECT c.c_name FROM customer c WHERE c.c_acctbal >= 1002.2"
In TypeCoercionImpl.binaryComparisonCoercion(SqlCallBinding) , for the comparison "c.c_acctbal >= 1002.2", we have two RelDataTypes corresponding to the two arguments: DECIMAL(1000,0) and DECIMAL(5.1). In the 1.39 version, the CteTypeFactoryImpl.leastRestrictive(List<RelDataType>) method considers the least restrictive version to be DECIMAL(1000,0). So we keep this version and end up with `C`.`c_acctbal` >= CAST(1002.2 AS DECIMAL(1000, 0)) which is not the desired result. (I saw that there was this ticket CALCITE-6913 since the release but I don't think that will fix this problem ) Thanks for your help.
