Interface DataStructureConverter<I,E>
-
- Type Parameters:
I- internal data structure (seeRowData)E- external data structure (seeDataType.getConversionClass())
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ArrayBooleanArrayConverter,ArrayByteArrayConverter,ArrayDoubleArrayConverter,ArrayFloatArrayConverter,ArrayIntArrayConverter,ArrayListConverter,ArrayLongArrayConverter,ArrayObjectArrayConverter,ArrayShortArrayConverter,DateDateConverter,DateLocalDateConverter,DayTimeIntervalDurationConverter,DecimalBigDecimalConverter,IdentityConverter,LocalZonedTimestampInstantConverter,LocalZonedTimestampIntConverter,LocalZonedTimestampLongConverter,LocalZonedTimestampTimestampConverter,MapMapConverter,RawByteArrayConverter,RawObjectConverter,RowRowConverter,StringByteArrayConverter,StringStringConverter,StructuredObjectConverter,TimeLocalTimeConverter,TimeLongConverter,TimestampLocalDateTimeConverter,TimestampTimestampConverter,TimeTimeConverter,YearMonthIntervalPeriodConverter
@Internal public interface DataStructureConverter<I,E> extends Serializable
Converter between internal and external data structure.Converters are serializable and can be passed to runtime operators. However, converters are not thread-safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanisIdentityConversion()Returns whether this conversion is a no-op.default voidopen(ClassLoader classLoader)EtoExternal(I internal)Converts to external data structure.default EtoExternalOrNull(I internal)Converts to external data structure ornull.ItoInternal(E external)Converts to internal data structure.default ItoInternalOrNull(E external)Converts to internal data structure ornull.
-
-
-
Method Detail
-
open
default void open(ClassLoader classLoader)
-
toInternal
I toInternal(E external)
Converts to internal data structure.Note: Parameter must not be null. Output must not be null.
-
toInternalOrNull
default I toInternalOrNull(E external)
Converts to internal data structure ornull.The nullability could be derived from the data type. However, this method reduces null checks.
-
toExternal
E toExternal(I internal)
Converts to external data structure.Note: Parameter must not be null. Output must not be null.
-
toExternalOrNull
default E toExternalOrNull(I internal)
Converts to external data structure ornull.The nullability could be derived from the data type. However, this method reduces null checks.
-
isIdentityConversion
default boolean isIdentityConversion()
Returns whether this conversion is a no-op.An identity conversion means that the type is already an internal data structure.
-
-