Class FixedPrecisionNumeric
java.lang.Object
org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType<BigDecimal>
org.apache.beam.sdk.schemas.logicaltypes.FixedPrecisionNumeric
- All Implemented Interfaces:
Serializable
,Schema.LogicalType<BigDecimal,
BigDecimal>
Fixed precision numeric types used to represent jdbc NUMERIC and DECIMAL types.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic FixedPrecisionNumeric
of
(int scale) Create a FixedPrecisionNumeric instance with specified scale and unspecified precision.static FixedPrecisionNumeric
of
(int precision, int scale) Create a FixedPrecisionNumeric instance with specified precision and scale.static FixedPrecisionNumeric
Create a FixedPrecisionNumeric instance with specified argument row.toInputType
(BigDecimal base) Convert the Java type used by the baseSchema.FieldType
to the input type.Methods inherited from class org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType
getArgument, getArgumentType, getBaseType, getIdentifier, toBaseType
-
Field Details
-
IDENTIFIER
- See Also:
-
BASE_IDENTIFIER
Identifier of the unspecified precision numeric type. It corresponds to Java SDK'sSchema.FieldType.DECIMAL
. It is the underlying representation type of FixedPrecisionNumeric logical type in order to be compatible with existing Java field types.
-
-
Method Details
-
of
Create a FixedPrecisionNumeric instance with specified precision and scale. ``precision=-1`` indicates unspecified precision. -
of
Create a FixedPrecisionNumeric instance with specified scale and unspecified precision. -
of
Create a FixedPrecisionNumeric instance with specified argument row. -
toInputType
Description copied from interface:Schema.LogicalType
Convert the Java type used by the baseSchema.FieldType
to the input type.- Specified by:
toInputType
in interfaceSchema.LogicalType<BigDecimal,
BigDecimal> - Overrides:
toInputType
in classPassThroughLogicalType<BigDecimal>
-