use of org.apache.orc.storage.common.type.HiveDecimal in project flink by apache.
the class AbstractOrcNoHiveVector method createDecimalVector.
private static DecimalColumnVector createDecimalVector(int batchSize, int precision, int scale, Object value) {
DecimalColumnVector dv = new DecimalColumnVector(batchSize, precision, scale);
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
dv.isRepeating = true;
} else {
dv.set(0, value instanceof HiveDecimal ? (HiveDecimal) value : HiveDecimal.create((BigDecimal) value));
dv.isRepeating = true;
dv.isNull[0] = false;
}
return dv;
}
Aggregations