public class SchemaUtil extends Object
Constructor and Description |
---|
SchemaUtil() |
Modifier and Type | Method and Description |
---|---|
static VectorContainer |
coerceContainer(VectorAccessible in,
BatchSchema toSchema,
BufferAllocator allocator) |
static VectorContainer |
coerceContainer(VectorAccessible in,
BatchSchema toSchema,
OperatorContext context)
Creates a copy a record batch, converting any fields as necessary to coerce it into the provided schema
|
static TupleMetadata |
fromBatchSchema(BatchSchema batchSchema) |
static List<SchemaPath> |
getSchemaPaths(TupleMetadata schema)
Returns list of
SchemaPath for fields taken from specified schema. |
static BatchSchema |
mergeSchemas(BatchSchema... schemas)
Returns the merger of schemas.
|
public static BatchSchema mergeSchemas(BatchSchema... schemas)
schemas
- public static VectorContainer coerceContainer(VectorAccessible in, BatchSchema toSchema, OperatorContext context)
in
- toSchema
- context
- public static VectorContainer coerceContainer(VectorAccessible in, BatchSchema toSchema, BufferAllocator allocator)
public static TupleMetadata fromBatchSchema(BatchSchema batchSchema)
public static List<SchemaPath> getSchemaPaths(TupleMetadata schema)
SchemaPath
for fields taken from specified schema.schema
- the source of fields to returnSchemaPath
Copyright © 1970 The Apache Software Foundation. All rights reserved.