Sergey Nuyanzin created FLINK-39945:
---------------------------------------

             Summary: CAST of DECIMAL changed with Calcite 1.38.0
                 Key: FLINK-39945
                 URL: https://issues.apache.org/jira/browse/FLINK-39945
             Project: Flink
          Issue Type: Technical Debt
          Components: Table SQL / Planner
            Reporter: Sergey Nuyanzin


CAST to DECIMAL with 1.38.0  takes into account precision and scale.
this means that CAST(1.2 TO DECIMAL) will return 1.2 in current Flink version 
however will return 1 after Calcite upgrade. The reason is DECIMAL means using 
default precision and scale and in this case default value for scale is 0. In 
order to get 1.2 need to specify scale explicitly like  CAST(1.2 TO DECIMAL(5, 
1)) for instance


For now this behavior disabled, however since this is the way how other vendors 
behave probably need to see if we can enable it in Flink



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to