use of com.bakdata.conquery.models.events.stores.specific.DecimalTypeScaled in project conquery by bakdata.
the class DecimalParser method decideType.
@Override
protected DecimalStore decideType() {
BigInteger unscaled = DecimalTypeScaled.unscale(maxScale, maxAbs);
if (unscaled.bitLength() > 63) {
return DecimalArrayStore.create(getLines());
}
IntegerParser sub = new IntegerParser(getConfig());
sub.setMaxValue(unscaled.longValueExact());
sub.setMinValue(-unscaled.longValueExact());
sub.setLines(getLines());
sub.setNullLines(getNullLines());
IntegerStore subDecision = sub.findBestType();
return new DecimalTypeScaled(maxScale, subDecision);
}
Aggregations