/** * Adds a type annotation ({@link OriginalType}) to the type being built. * <p> * Type annotations are used to extend the types that parquet can store, by * specifying how the primitive types should be interpreted. This keeps the * set of primitive types to a minimum and reuses parquet's efficient * encodings. For example, strings are stored as byte arrays (binary) with * a UTF8 annotation. * * @param type an {@code OriginalType} * @return this builder for method chaining * * @deprecated use {@link #as(LogicalTypeAnnotation)} with the corresponding logical type instead */ @Deprecated public THIS as(OriginalType type) { this.logicalTypeAnnotation = LogicalTypeAnnotation.fromOriginalType(type, null); return self(); }
/** * Adds a type annotation ({@link LogicalTypeAnnotation}) to the type being built. * <p> * Type annotations are used to extend the types that parquet can store, by * specifying how the primitive types should be interpreted. This keeps the * set of primitive types to a minimum and reuses parquet's efficient * encodings. For example, strings are stored as byte arrays (binary) with * a UTF8 annotation. * * @param type an {@code {@link LogicalTypeAnnotation}} * @return this builder for method chaining */ public THIS as(LogicalTypeAnnotation type) { this.logicalTypeAnnotation = type; this.newLogicalTypeSet = true; return self(); }
/** * Adds a type annotation ({@link OriginalType}) to the type being built. * <p> * Type annotations are used to extend the types that parquet can store, by * specifying how the primitive types should be interpreted. This keeps the * set of primitive types to a minimum and reuses parquet's efficient * encodings. For example, strings are stored as byte arrays (binary) with * a UTF8 annotation. * * @param type an {@code OriginalType} * @return this builder for method chaining */ public THIS as(OriginalType type) { this.originalType = type; return self(); }
/** * adds an id annotation to the type being built. * <p> * ids are used to capture the original id when converting from models using ids (thrift, protobufs) * * @param id the id of the field * @return this builder for method chaining */ public THIS id(int id) { this.id = new ID(id); return self(); }
/** * adds an id annotation to the type being built. * <p> * ids are used to capture the original id when converting from models using ids (thrift, protobufs) * * @param id the id of the field * @return this builder for method chaining */ public THIS id(int id) { this.id = new ID(id); return self(); }
protected final THIS repetition(Type.Repetition repetition) { Preconditions.checkArgument(!repetitionAlreadySet, "Repetition has already been set"); Preconditions.checkNotNull(repetition, "Repetition cannot be null"); this.repetition = repetition; this.repetitionAlreadySet = true; return self(); }
protected final THIS repetition(Type.Repetition repetition) { Preconditions.checkArgument(!repetitionAlreadySet, "Repetition has already been set"); Preconditions.checkNotNull(repetition, "Repetition cannot be null"); this.repetition = repetition; this.repetitionAlreadySet = true; return self(); }