Class DateTime
java.lang.Object
org.apache.beam.sdk.schemas.logicaltypes.DateTime
- All Implemented Interfaces:
Serializable
,Schema.LogicalType<LocalDateTime,
Row>
A datetime without a time-zone.
It cannot represent an instant on the time-line without additional information such as an offset or time-zone.
Its input type is a LocalDateTime
, and base type is a Row
containing Date
field and Time field. Date field is the same as the base type of Date
, which is a Long
that represents incrementing count of days where day 0 is 1970-01-01 (ISO). Time field is the
same as the base type of Time
, which is a Long that represents a count of time in
nanoseconds.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAn optional argument to configure the type.A schema type representing how to interpret the argument.The baseSchema.FieldType
used to store values of this type.The unique identifier for this type.toBaseType
(LocalDateTime input) Convert the input type to the type Java type used by the baseSchema.FieldType
.toInputType
(Row base) Convert the Java type used by the baseSchema.FieldType
to the input type.
-
Field Details
-
IDENTIFIER
- See Also:
-
DATE_FIELD_NAME
- See Also:
-
TIME_FIELD_NAME
- See Also:
-
DATETIME_SCHEMA
-
-
Constructor Details
-
DateTime
public DateTime()
-
-
Method Details
-
getIdentifier
Description copied from interface:Schema.LogicalType
The unique identifier for this type.- Specified by:
getIdentifier
in interfaceSchema.LogicalType<LocalDateTime,
Row>
-
getArgumentType
Description copied from interface:Schema.LogicalType
A schema type representing how to interpret the argument.null
indicates this logical type is not parameterized by an argument.- Specified by:
getArgumentType
in interfaceSchema.LogicalType<LocalDateTime,
Row>
-
getArgument
Description copied from interface:Schema.LogicalType
An optional argument to configure the type.- Specified by:
getArgument
in interfaceSchema.LogicalType<LocalDateTime,
Row>
-
getBaseType
Description copied from interface:Schema.LogicalType
The baseSchema.FieldType
used to store values of this type.- Specified by:
getBaseType
in interfaceSchema.LogicalType<LocalDateTime,
Row>
-
toBaseType
Description copied from interface:Schema.LogicalType
Convert the input type to the type Java type used by the baseSchema.FieldType
.- Specified by:
toBaseType
in interfaceSchema.LogicalType<LocalDateTime,
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<LocalDateTime,
Row>
-