| Modifier and Type | Class and Description |
|---|---|
| public static class | LogicalTypes.Date
Date represents a date without a time |
| public static class | LogicalTypes.Decimal
Decimal represents arbitrary-precision fixed-scale decimal numbers |
| public static class | |
| public static class | |
| public static interface | LogicalTypes.LogicalTypeFactory
Factory interface and SPI for logical types. |
| public static class | LogicalTypes.TimeMicros
TimeMicros represents a time in microseconds without a date |
| public static class | LogicalTypes.TimeMillis
TimeMillis represents a time in milliseconds without a date |
| public static class | LogicalTypes.TimestampMicros
TimestampMicros represents a date and time in microseconds |
| public static class | LogicalTypes.TimestampMillis
TimestampMillis represents a date and time in milliseconds |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final LogicalTypes. | |
| private static final String | |
| private static final String | |
| private static final LogicalTypes. | |
| private static final String | |
| private static final LogicalTypes. | |
| private static final Logger | |
| private static final Map | |
| private static final String | |
| private static final LogicalTypes. | |
| private static final String | |
| private static final LogicalTypes. | |
| private static final String | |
| private static final LogicalTypes. | |
| private static final String | |
| private static final LogicalTypes. | |
| private static final String | |
| private static final LogicalType |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static LogicalTypes. | |
| public static LogicalTypes. | |
| public static LogicalTypes. | |
| public static LogicalType | |
| public static LogicalType | |
| private static LogicalType | |
| public static Map | |
| public static LogicalTypes. | |
| public static LogicalTypes. | |
| public static void | |
| public static void | register(String
The logical type name logicalTypeName, LogicalTypes.The logical type factory factoryRegister a logical type. |
| public static LogicalTypes. | |
| public static LogicalTypes. | |
| public static LogicalTypes. | |
| public static LogicalTypes. | |
| public static LogicalType |
| DATE | back to summary |
|---|---|
| private static final String DATE | |
| DATE_TYPE | back to summary |
|---|---|
| private static final LogicalTypes. | |
| DECIMAL | back to summary |
|---|---|
| private static final String DECIMAL | |
| LOCAL_TIMESTAMP_MICROS | back to summary |
|---|---|
| private static final String LOCAL_TIMESTAMP_MICROS | |
| LOCAL_TIMESTAMP_MICROS_TYPE | back to summary |
|---|---|
| private static final LogicalTypes. | |
| LOCAL_TIMESTAMP_MILLIS | back to summary |
|---|---|
| private static final String LOCAL_TIMESTAMP_MILLIS | |
| LOCAL_TIMESTAMP_MILLIS_TYPE | back to summary |
|---|---|
| private static final LogicalTypes. | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| REGISTERED_TYPES | back to summary |
|---|---|
| private static final Map<String, LogicalTypes. | |
| TIME_MICROS | back to summary |
|---|---|
| private static final String TIME_MICROS | |
| TIME_MICROS_TYPE | back to summary |
|---|---|
| private static final LogicalTypes. | |
| TIME_MILLIS | back to summary |
|---|---|
| private static final String TIME_MILLIS | |
| TIME_MILLIS_TYPE | back to summary |
|---|---|
| private static final LogicalTypes. | |
| TIMESTAMP_MICROS | back to summary |
|---|---|
| private static final String TIMESTAMP_MICROS | |
| TIMESTAMP_MICROS_TYPE | back to summary |
|---|---|
| private static final LogicalTypes. | |
| TIMESTAMP_MILLIS | back to summary |
|---|---|
| private static final String TIMESTAMP_MILLIS | |
| TIMESTAMP_MILLIS_TYPE | back to summary |
|---|---|
| private static final LogicalTypes. | |
| UUID | back to summary |
|---|---|
| private static final String UUID | |
| UUID_TYPE | back to summary |
|---|---|
| private static final LogicalType UUID_TYPE | |
| LogicalTypes | back to summary |
|---|---|
| public LogicalTypes() | |
| date | back to summary |
|---|---|
| public static LogicalTypes. | |
| decimal | back to summary |
|---|---|
| public static LogicalTypes. Create a Decimal LogicalType with the given precision and scale 0 | |
| decimal | back to summary |
|---|---|
| public static LogicalTypes. Create a Decimal LogicalType with the given precision and scale | |
| fromSchema | back to summary |
|---|---|
| public static LogicalType fromSchema(Schema schema) Returns the | |
| fromSchemaIgnoreInvalid | back to summary |
|---|---|
| public static LogicalType fromSchemaIgnoreInvalid(Schema schema) | |
| fromSchemaImpl | back to summary |
|---|---|
| private static LogicalType fromSchemaImpl(Schema schema, boolean throwErrors) | |
| getCustomRegisteredTypes | back to summary |
|---|---|
| public static Map Return an unmodifiable map of any registered custom | |
| localTimestampMicros | back to summary |
|---|---|
| public static LogicalTypes. | |
| localTimestampMillis | back to summary |
|---|---|
| public static LogicalTypes. | |
| register | back to summary |
|---|---|
| public static void register(LogicalTypes. Register a logical type.
| |
| register | back to summary |
|---|---|
| public static void register(String logicalTypeName, LogicalTypes. Register a logical type.
| |
| timeMicros | back to summary |
|---|---|
| public static LogicalTypes. | |
| timeMillis | back to summary |
|---|---|
| public static LogicalTypes. | |
| timestampMicros | back to summary |
|---|---|
| public static LogicalTypes. | |
| timestampMillis | back to summary |
|---|---|
| public static LogicalTypes. | |
| uuid | back to summary |
|---|---|
| public static LogicalType uuid() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | validate(Schema
a Schema schema)Overrides org. |
| Date | back to summary |
|---|---|
| private Date() | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private static final String | |
| private final int | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Schema | addToSchema(Schema
a Schema schema)Overrides org. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| private int | |
| public int | |
| public int | |
| public int | |
| private boolean | |
| private long | |
| public void | validate(Schema
a Schema schema)Overrides org. |
| precision | back to summary |
|---|---|
| private final int precision | |
| PRECISION_PROP | back to summary |
|---|---|
| private static final String PRECISION_PROP | |
| scale | back to summary |
|---|---|
| private final int scale | |
| SCALE_PROP | back to summary |
|---|---|
| private static final String SCALE_PROP | |
| Decimal | back to summary |
|---|---|
| private Decimal(int precision, int scale) | |
| Decimal | back to summary |
|---|---|
| private Decimal(Schema schema) | |
| addToSchema | back to summary |
|---|---|
| public Schema addToSchema(Schema schema) Overrides org. Doc from org. Add this logical type to the given Schema. The "logicalType" property will be set to this type's name, and other type-specific properties may be added. The Schema is first validated to ensure it is compatible. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getInt | back to summary |
|---|---|
| private int getInt(Schema schema, String name) | |
| getPrecision | back to summary |
|---|---|
| public int getPrecision() | |
| getScale | back to summary |
|---|---|
| public int getScale() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasProperty | back to summary |
|---|---|
| private boolean hasProperty(Schema schema, String name) | |
| maxPrecision | back to summary |
|---|---|
| private long maxPrecision(Schema schema) | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | validate(Schema
a Schema schema)Overrides org. |
| LocalTimestampMicros | back to summary |
|---|---|
| private LocalTimestampMicros() | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | validate(Schema
a Schema schema)Overrides org. |
| LocalTimestampMillis | back to summary |
|---|---|
| private LocalTimestampMillis() | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |
LogicalTypeFactory can
be registered in two ways:
register(LogicalTypeFactory) or
register(String, LogicalTypeFactory)LogicalTypeFactory implementation is a
public class with a public no-arg constructor, is named in a file called
/META-INF/services/org.apache.avro.LogicalTypes$LogicalTypeFactory,
and both are available in the classpathServiceLoader
| Modifier and Type | Method and Description |
|---|---|
| public LogicalType | |
| public default String |
| fromSchema | back to summary |
|---|---|
| public LogicalType fromSchema(Schema schema) | |
| getTypeName | back to summary |
|---|---|
| public default String getTypeName() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | validate(Schema
a Schema schema)Overrides org. |
| TimeMicros | back to summary |
|---|---|
| private TimeMicros() | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | validate(Schema
a Schema schema)Overrides org. |
| TimeMillis | back to summary |
|---|---|
| private TimeMillis() | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | validate(Schema
a Schema schema)Overrides org. |
| TimestampMicros | back to summary |
|---|---|
| private TimestampMicros() | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | validate(Schema
a Schema schema)Overrides org. |
| TimestampMillis | back to summary |
|---|---|
| private TimestampMillis() | |
| validate | back to summary |
|---|---|
| public void validate(Schema schema) Overrides org. Doc from org. Validate this logical type for the given Schema. This will throw an exception if the Schema is incompatible with this type. For example, a date is stored as an int and is incompatible with a fixed Schema. | |