public class HiveAvroSerializer extends Object
| Constructor and Description |
|---|
HiveAvroSerializer(org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector objectInspector,
List<String> columnNames,
List<org.apache.hadoop.hive.serde2.typeinfo.TypeInfo> columnTypes) |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.avro.Schema |
getOtherTypeFromNullableType(org.apache.avro.Schema unionSchema)
If the union schema is a nullable union, get the schema for the non-nullable type.
|
static boolean |
isNullableType(org.apache.avro.Schema schema)
Determine if an Avro schema is of type Union[T, NULL].
|
static org.apache.avro.generic.GenericRecord |
rewriteRecordIgnoreResultCheck(org.apache.avro.generic.GenericRecord oldRecord,
org.apache.avro.Schema newSchema) |
org.apache.avro.generic.GenericRecord |
serialize(Object o,
org.apache.avro.Schema schema) |
public org.apache.avro.generic.GenericRecord serialize(Object o, org.apache.avro.Schema schema)
public static boolean isNullableType(org.apache.avro.Schema schema)
When a Hive union type is used with AVRO, the schema type becomes Union[NULL, T1, T2, ...]. The NULL in the union should be silently removed
public static org.apache.avro.Schema getOtherTypeFromNullableType(org.apache.avro.Schema unionSchema)
public static org.apache.avro.generic.GenericRecord rewriteRecordIgnoreResultCheck(org.apache.avro.generic.GenericRecord oldRecord,
org.apache.avro.Schema newSchema)
Copyright © 2024 The Apache Software Foundation. All rights reserved.