public class Conversions extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Conversions.DecimalConversion |
static class |
Conversions.UUIDConversion |
| Constructor and Description |
|---|
Conversions() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
convertToLogicalType(Object datum,
Schema schema,
LogicalType type,
Conversion<?> conversion)
Convert an underlying representation of a logical type (such as a ByteBuffer)
to a higher level object (such as a BigDecimal).
|
static <T> Object |
convertToRawType(Object datum,
Schema schema,
LogicalType type,
Conversion<T> conversion)
Convert a high level representation of a logical type (such as a BigDecimal)
to its underlying representation object (such as a ByteBuffer)
|
public static Object convertToLogicalType(Object datum, Schema schema, LogicalType type, Conversion<?> conversion)
datum - The object to be converted.schema - The schema of datum. Cannot be null if datum is not null.type - The LogicalType of datum. Cannot be
null if datum is not null.conversion - The tool used to finish the conversion. Cannot be null if
datum is not null.IllegalArgumentException - if datum is not null, but schema, type or
conversion is.public static <T> Object convertToRawType(Object datum, Schema schema, LogicalType type, Conversion<T> conversion)
datum - The object to be converted.schema - The schema of datum. Cannot be null if datum is not null.type - The LogicalType of datum. Cannot be
null if datum is not null.conversion - The tool used to finish the conversion. Cannot be null if
datum is not null.IllegalArgumentException - if datum is not null, but schema, type or
conversion is.Copyright © 2009–2023 The Apache Software Foundation. All rights reserved.