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 FixedPrecisionNumericof(int scale) Create a FixedPrecisionNumeric instance with specified scale and unspecified precision.static FixedPrecisionNumericof(int precision, int scale) Create a FixedPrecisionNumeric instance with specified precision and scale.static FixedPrecisionNumericCreate a FixedPrecisionNumeric instance with specified argument row.toInputType(BigDecimal base) Convert the Java type used by the baseSchema.FieldTypeto 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.LogicalTypeConvert the Java type used by the baseSchema.FieldTypeto the input type.- Specified by:
toInputTypein interfaceSchema.LogicalType<BigDecimal,BigDecimal> - Overrides:
toInputTypein classPassThroughLogicalType<BigDecimal>
-