VARIANT data: Casting some of the fixed numeric values to floating-point results in different approximate values (Pending)¶
When this bundle is enabled and you extract a fixed numeric value from a VARIANT value and cast the numeric value to a floating-point type, the resulting value might be different.
This behavior change occurs in cases when the cast is narrow --- in other words, when the cast type cannot hold the value. The cast might return a different approximate value that is closer to the original value.
例如,当 VARIANT 列中的固定数值 264208207.9326154526043824 被类型转换为 FLOAT 时,行为变更前后的结果值不同:
原始数值(类型转换为 FLOAT 前):
264208207.9326154526043824
行为变更之前(类型转换为 FLOAT 之后)的数值:
264208207.93261543
行为变更后的数值(类型转换为 FLOAT 之后):
264208207.93261546
引入此行为变更是为了使类型转换结果与非 VARIANT 数值的类型转换保持一致。
参考:2106