Class MicrosInstant
- java.lang.Object
-
- org.apache.beam.sdk.schemas.logicaltypes.MicrosInstant
-
- All Implemented Interfaces:
java.io.Serializable
,Schema.LogicalType<java.time.Instant,Row>
public class MicrosInstant extends java.lang.Object implements Schema.LogicalType<java.time.Instant,Row>
A timestamp represented as microseconds since the epoch.WARNING: This logical type exists solely for interoperability with other type systems such as SQL and other Beam SDKs. It should never be used in a native Java context where the
java.time.Instant
instances it describes may have higher than microsecond precision. Ignoring this will likely result in anAssertionError
at pipeline execution time.For a more faithful logical type to use with
java.time.Instant
, seeNanosInstant
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
-
Constructor Summary
Constructors Constructor Description MicrosInstant()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Schema.FieldType
getArgumentType()
A schema type representing how to interpret the argument.Schema.FieldType
getBaseType()
The baseSchema.FieldType
used to store values of this type.java.lang.String
getIdentifier()
The unique identifier for this type.Row
toBaseType(java.time.Instant input)
Convert the input type to the type Java type used by the baseSchema.FieldType
.java.time.Instant
toInputType(Row row)
Convert the Java type used by the baseSchema.FieldType
to the input type.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.beam.sdk.schemas.Schema.LogicalType
getArgument
-
-
-
-
Method Detail
-
toBaseType
public Row toBaseType(java.time.Instant input)
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<java.time.Instant,Row>
-
toInputType
public java.time.Instant toInputType(Row row)
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<java.time.Instant,Row>
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:Schema.LogicalType
The unique identifier for this type.- Specified by:
getIdentifier
in interfaceSchema.LogicalType<java.time.Instant,Row>
-
getArgumentType
public Schema.FieldType 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<java.time.Instant,Row>
-
getBaseType
public Schema.FieldType getBaseType()
Description copied from interface:Schema.LogicalType
The baseSchema.FieldType
used to store values of this type.- Specified by:
getBaseType
in interfaceSchema.LogicalType<java.time.Instant,Row>
-
-