简体   繁体   English

如何以orc格式存储十进制值?

[英]How store bigdecimal value in orc format?

Orc format defines double and float . Orc格式定义 doublefloat Is there a way to store BigDecimal value with scala and precision attributes? 有没有一种方法可以存储具有scala和precision属性的BigDecimal值?

From API specification: 根据API规范:

public final class MathContext

Immutable objects which encapsulate the context settings which describe certain rules for numerical operators, such as those implemented by the BigDecimal class. 不变的对象封装了上下文设置,这些上下文设置描述了数字运算符的某些规则,例如由BigDecimal类实现的规则。 The base-independent settings are: 与基准无关的设置是:

precision: the number of digits to be used for an operation; 精度:用于操作的位数; results are rounded to this precision roundingMode: a RoundingMode object which specifies the algorithm to be used for rounding. 结果将舍入为这种精确的roundingMode:一个RoundingMode对象,该对象指定要用于舍入的算法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM