public class AvroSchemaUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
AVRO_LOGICAL_TYPE_PROPERTY |
static String |
DATE_LOGICAL_TYPE |
static String |
DECIMAL_LOGICAL_TYPE |
static String |
DURATION_LOGICAL_TYPE |
static String |
TIME_MICROS_LOGICAL_TYPE |
static String |
TIME_MILLIS_LOGICAL_TYPE |
static String |
TIMESTAMP_MICROS_LOGICAL_TYPE |
static String |
TIMESTAMP_MILLIS_LOGICAL_TYPE |
| Constructor and Description |
|---|
AvroSchemaUtil() |
| Modifier and Type | Method and Description |
|---|---|
static TupleMetadata |
convert(org.apache.avro.Schema schema)
Converts Avro schema into Drill metadata description of the schema.
|
static org.apache.avro.Schema |
extractSchemaFromNullable(org.apache.avro.Schema schema,
String columnName)
Avro represents nullable type as union of null and another schema: ["null", "some-type"].
|
public static final String AVRO_LOGICAL_TYPE_PROPERTY
public static final String DECIMAL_LOGICAL_TYPE
public static final String TIMESTAMP_MICROS_LOGICAL_TYPE
public static final String TIMESTAMP_MILLIS_LOGICAL_TYPE
public static final String DATE_LOGICAL_TYPE
public static final String TIME_MICROS_LOGICAL_TYPE
public static final String TIME_MILLIS_LOGICAL_TYPE
public static final String DURATION_LOGICAL_TYPE
public static TupleMetadata convert(org.apache.avro.Schema schema)
schema - Avro schemaUserException - if schema contains unsupported typespublic static org.apache.avro.Schema extractSchemaFromNullable(org.apache.avro.Schema schema,
String columnName)
schema - Avro schemacolumnName - column nameUserException - if given schema is not a union or represents complex unionCopyright © 2021 The Apache Software Foundation. All rights reserved.