public static class LogicalTypes.Decimal extends LogicalType
LOGICAL_TYPE_PROP
Modifier and Type | Method and Description |
---|---|
Schema |
addToSchema(Schema schema)
Add this logical type to the given Schema.
|
boolean |
equals(Object o) |
int |
getPrecision() |
int |
getScale() |
int |
hashCode() |
void |
validate(Schema schema)
Validate this logical type for the given Schema.
|
getName
public Schema addToSchema(Schema schema)
LogicalType
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.
addToSchema
in class LogicalType
schema
- a Schemapublic int getPrecision()
public int getScale()
public void validate(Schema schema)
LogicalType
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.
validate
in class LogicalType
schema
- a SchemaCopyright © 2009–2016 The Apache Software Foundation. All rights reserved.