return new TimestampColumnVector(batchSize); case DECIMAL: if (useDecimal64ColumnVectors && type.getPrecision() <= TypeDescription.MAX_DECIMAL64_PRECISION) { return new Decimal64ColumnVector(batchSize, type.getPrecision(), type.getScale()); } else { return new DecimalColumnVector(batchSize, type.getPrecision(), type.getScale());
case DECIMAL: type.setKind(OrcProto.Type.Kind.DECIMAL); type.setPrecision(schema.getPrecision()); type.setScale(schema.getScale()); break;
columnType.getPrecision() <= TypeDescription.MAX_DECIMAL64_PRECISION) { return Decimal64StreamReader.builder() .setColumnIndex(columnIndex) .setPrecision(columnType.getPrecision()) .setScale(columnType.getScale()) .setPresentStream(present) return DecimalStreamReader.builder() .setColumnIndex(columnIndex) .setPrecision(columnType.getPrecision()) .setScale(columnType.getScale()) .setPresentStream(present)
return DecimalStreamReader.builder() .setColumnIndex(columnIndex) .setPrecision(columnType.getPrecision()) .setScale(columnType.getScale()) .setPresentStream(present)
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); }
output.print(type.getPrecision()); output.print(','); output.print(type.getScale());
return new TimestampColumnVector(batchSize); case DECIMAL: if (useDecimal64ColumnVectors && type.getPrecision() <= TypeDescription.MAX_DECIMAL64_PRECISION) { return new Decimal64ColumnVector(batchSize, type.getPrecision(), type.getScale()); } else { return new DecimalColumnVector(batchSize, type.getPrecision(), type.getScale());
return new TimestampConverter(); case DECIMAL: if (schema.getPrecision() <= Decimal.MAX_LONG_DIGITS()) { return new Decimal18Converter(schema.getPrecision(), schema.getScale()); } else { return new Decimal38Converter(schema.getPrecision(), schema.getScale());
return Types.TimestampType.withoutZone(); case DECIMAL: return Types.DecimalType.of(schema.getPrecision(), schema.getScale()); case STRUCT: { List<String> fieldNames = schema.getFieldNames();
return new StringStatisticsImpl(); case DECIMAL: if (schema.getPrecision() <= TypeDescription.MAX_DECIMAL64_PRECISION) { return new Decimal64StatisticsImpl(schema.getScale()); } else {
return new StringConverter(); case DECIMAL: return schema.getPrecision() <= 18 ? new Decimal18Converter(schema) : new Decimal38Converter(schema);
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); } } }
case DECIMAL: if (version == OrcFile.Version.UNSTABLE_PRE_2_0 && fileType.getPrecision() <= TypeDescription.MAX_DECIMAL64_PRECISION){ return new Decimal64TreeReader(fileType.getId(), fileType.getPrecision(), fileType.getScale(), context); return new DecimalTreeReader(fileType.getId(), fileType.getPrecision(), fileType.getScale(), context); case STRUCT: