type.setKind(OrcProto.Type.Kind.DECIMAL); type.setPrecision(schema.getPrecision()); type.setScale(schema.getScale()); break; case LIST:
.setColumnIndex(columnIndex) .setPrecision(columnType.getPrecision()) .setScale(columnType.getScale()) .setPresentStream(present) .setValueStream(data) .setColumnIndex(columnIndex) .setPrecision(columnType.getPrecision()) .setScale(columnType.getScale()) .setPresentStream(present) .setValueStream(data)
.setColumnIndex(columnIndex) .setPrecision(columnType.getPrecision()) .setScale(columnType.getScale()) .setPresentStream(present) .setValueStream(data)
Decimal38Converter(TypeDescription schema) { precision = schema.getPrecision(); scale = schema.getScale(); } public void addValue(int rowId, int column, SpecializedGetters data,
Decimal18Converter(TypeDescription schema) { precision = schema.getPrecision(); scale = schema.getScale(); }
StringGroupFromDecimalTreeReader(int columnId, TypeDescription fileType, TypeDescription readerType, Context context) throws IOException { super(columnId); this.precision = fileType.getPrecision(); this.scale = fileType.getScale(); this.readerType = readerType; decimalTreeReader = new DecimalTreeReader(columnId, precision, scale, context); setConvertTreeReader(decimalTreeReader); scratchBuffer = new byte[HiveDecimal.SCRATCH_BUFFER_LEN_TO_BYTES]; }
AnyIntegerFromDecimalTreeReader(int columnId, TypeDescription fileType, TypeDescription readerType, Context context) throws IOException { super(columnId); this.precision = fileType.getPrecision(); this.scale = fileType.getScale(); this.readerType = readerType; decimalTreeReader = new DecimalTreeReader(columnId, precision, scale, context); setConvertTreeReader(decimalTreeReader); }
FloatFromDecimalTreeReader(int columnId, TypeDescription fileType, TypeDescription readerType, Context context) throws IOException { super(columnId); this.precision = fileType.getPrecision(); this.scale = fileType.getScale(); decimalTreeReader = new DecimalTreeReader(columnId, precision, scale, context); setConvertTreeReader(decimalTreeReader); }
DoubleFromDecimalTreeReader(int columnId, TypeDescription fileType, Context context) throws IOException { super(columnId); this.precision = fileType.getPrecision(); this.scale = fileType.getScale(); decimalTreeReader = new DecimalTreeReader(columnId, precision, scale, context); setConvertTreeReader(decimalTreeReader); }
TimestampFromDecimalTreeReader(int columnId, TypeDescription fileType, Context context) throws IOException { super(columnId); this.precision = fileType.getPrecision(); this.scale = fileType.getScale(); decimalTreeReader = new DecimalTreeReader(columnId, precision, scale, context); setConvertTreeReader(decimalTreeReader); }
DecimalFromDecimalTreeReader(int columnId, TypeDescription fileType, TypeDescription readerType, Context context) throws IOException { super(columnId); filePrecision = fileType.getPrecision(); fileScale = fileType.getScale(); decimalTreeReader = new DecimalTreeReader(columnId, filePrecision, fileScale, context); setConvertTreeReader(decimalTreeReader); }
public Decimal64TreeWriter(int columnId, TypeDescription schema, WriterContext writer, boolean nullable) throws IOException { super(columnId, schema, writer, nullable); OutStream stream = writer.createStream(id, OrcProto.Stream.Kind.DATA); // Use RLEv2 until we have the new RLEv3. valueWriter = new RunLengthIntegerWriterV2(stream, true, true); scale = schema.getScale(); if (rowIndexPosition != null) { recordPosition(rowIndexPosition); } }
output.print(type.getPrecision()); output.print(','); output.print(type.getScale()); output.print(')'); break;
return Types.TimestampType.withoutZone(); case DECIMAL: return Types.DecimalType.of(schema.getPrecision(), schema.getScale()); case STRUCT: { List<String> fieldNames = schema.getFieldNames();
case DECIMAL: if (schema.getPrecision() <= TypeDescription.MAX_DECIMAL64_PRECISION) { return new Decimal64StatisticsImpl(schema.getScale()); } else { return new DecimalStatisticsImpl();
public static ColumnStatisticsImpl deserialize(TypeDescription schema, OrcProto.ColumnStatistics stats) { if (stats.hasBucketStatistics()) { return new BooleanStatisticsImpl(stats); } else if (stats.hasIntStatistics()) { return new IntegerStatisticsImpl(stats); } else if (stats.hasDoubleStatistics()) { return new DoubleStatisticsImpl(stats); } else if (stats.hasStringStatistics()) { return new StringStatisticsImpl(stats); } else if (stats.hasDecimalStatistics()) { if (schema != null && schema.getPrecision() <= TypeDescription.MAX_DECIMAL64_PRECISION) { return new Decimal64StatisticsImpl(schema.getScale(), stats); } else { return new DecimalStatisticsImpl(stats); } } else if (stats.hasDateStatistics()) { return new DateStatisticsImpl(stats); } else if (stats.hasTimestampStatistics()) { return new TimestampStatisticsImpl(stats); } else if(stats.hasBinaryStatistics()) { return new BinaryStatisticsImpl(stats); } else { return new ColumnStatisticsImpl(stats); } } }