Class NanosDuration
- java.lang.Object
-
- org.apache.beam.sdk.schemas.logicaltypes.NanosDuration
-
- All Implemented Interfaces:
java.io.Serializable
,Schema.LogicalType<java.time.Duration,Row>
public class NanosDuration extends java.lang.Object
A duration represented in nanoseconds.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
protected Schema
schema
-
Constructor Summary
Constructors Constructor Description NanosDuration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getArgument()
An optional argument to configure the type.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.Duration input)
Convert the input type to the type Java type used by the baseSchema.FieldType
.java.time.Duration
toInputType(Row row)
Convert the Java type used by the baseSchema.FieldType
to the input type.
-
-
-
Field Detail
-
IDENTIFIER
public static final java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
-
schema
protected final Schema schema
-
-
Method Detail
-
toBaseType
public Row toBaseType(java.time.Duration input)
Description copied from interface:Schema.LogicalType
Convert the input type to the type Java type used by the baseSchema.FieldType
.
-
toInputType
public java.time.Duration toInputType(Row row)
Description copied from interface:Schema.LogicalType
Convert the Java type used by the baseSchema.FieldType
to the input type.
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:Schema.LogicalType
The unique identifier for this type.- Specified by:
getIdentifier
in interfaceSchema.LogicalType<T,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<T,Row>
-
getArgument
public java.lang.String getArgument()
Description copied from interface:Schema.LogicalType
An optional argument to configure the type.- Specified by:
getArgument
in interfaceSchema.LogicalType<T,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<T,Row>
-
-