public class AvroOrcUtils extends Object
| Constructor and Description |
|---|
AvroOrcUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToVector(org.apache.orc.TypeDescription type,
org.apache.orc.storage.ql.exec.vector.ColumnVector colVector,
org.apache.avro.Schema avroSchema,
Object value,
int vectorPos)
Add an object (of a given ORC type) to the column vector at a given position.
|
static boolean |
addUnionValue(org.apache.orc.storage.ql.exec.vector.UnionColumnVector unionVector,
List<org.apache.orc.TypeDescription> unionChildTypes,
org.apache.avro.Schema avroSchema,
Object value,
int vectorPos)
Match value with its ORC type and add to the union vector at a given position.
|
static org.apache.avro.Schema |
createAvroSchema(org.apache.orc.TypeDescription orcSchema) |
static org.apache.avro.Schema |
createAvroSchemaWithDefaultValue(org.apache.orc.TypeDescription orcSchema,
String recordName,
String namespace,
boolean nullable) |
static org.apache.orc.TypeDescription |
createOrcSchema(org.apache.avro.Schema avroSchema) |
static Object |
readFromVector(org.apache.orc.TypeDescription type,
org.apache.orc.storage.ql.exec.vector.ColumnVector colVector,
org.apache.avro.Schema avroSchema,
int vectorPos)
Read the Column vector at a given position conforming to a given ORC schema.
|
public static void addToVector(org.apache.orc.TypeDescription type,
org.apache.orc.storage.ql.exec.vector.ColumnVector colVector,
org.apache.avro.Schema avroSchema,
Object value,
int vectorPos)
type - ORC schema of the value Object.colVector - The column vector to store the value Object.avroSchema - Avro schema of the value Object.
Only used to check logical types for timestamp unit conversion.value - Object to be added to the column vectorvectorPos - The position in the vector where value will be stored at.public static boolean addUnionValue(org.apache.orc.storage.ql.exec.vector.UnionColumnVector unionVector,
List<org.apache.orc.TypeDescription> unionChildTypes,
org.apache.avro.Schema avroSchema,
Object value,
int vectorPos)
unionVector - The vector to store value.unionChildTypes - All possible types for the value Object.avroSchema - Avro union schema for the value Object.value - Object to be added to the unionVectorvectorPos - The position in the vector where value will be stored at.public static Object readFromVector(org.apache.orc.TypeDescription type, org.apache.orc.storage.ql.exec.vector.ColumnVector colVector, org.apache.avro.Schema avroSchema, int vectorPos)
type - ORC schema of the object to read.colVector - The column vector to read.avroSchema - Avro schema of the object to read.
Only used to check logical types for timestamp unit conversion.vectorPos - The position in the vector where the value to read is stored at.public static org.apache.orc.TypeDescription createOrcSchema(org.apache.avro.Schema avroSchema)
public static org.apache.avro.Schema createAvroSchema(org.apache.orc.TypeDescription orcSchema)
Copyright © 2022 The Apache Software Foundation. All rights reserved.