Hi all,

I am using the 'RexLiteral.getValueAs()' method to convert a literal to a
java object. I recently noticed that this method returns an unscaled value
when you convert a decimal literal to a Long object. As a result, this
method returns '1230' for the decimal literal of '123.0'. The code piece in
question can be found in
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rex/RexLiteral.java#L1051-L1054.
I checked the git commit associated with this behavior, but could not find
anything from it. I would like to understand this behavior better. Can
someone explain the rationale for this?

Thanks,
Jihoon

Reply via email to