I
- internal data structure (see RowData
)E
- external data structure (see DataType.getConversionClass()
)@Internal public interface DataStructureConverter<I,E> extends Serializable
Converters are serializable and can be passed to runtime operators. However, converters are not thread-safe.
Modifier and Type | Method and Description |
---|---|
default boolean |
isIdentityConversion()
Returns whether this conversion is a no-op.
|
default void |
open(ClassLoader classLoader) |
E |
toExternal(I internal)
Converts to external data structure.
|
default E |
toExternalOrNull(I internal)
Converts to external data structure or
null . |
I |
toInternal(E external)
Converts to internal data structure.
|
default I |
toInternalOrNull(E external)
Converts to internal data structure or
null . |
default void open(ClassLoader classLoader)
I toInternal(E external)
Note: Parameter must not be null. Output must not be null.
default I toInternalOrNull(E external)
null
.
The nullability could be derived from the data type. However, this method reduces null checks.
E toExternal(I internal)
Note: Parameter must not be null. Output must not be null.
default E toExternalOrNull(I internal)
null
.
The nullability could be derived from the data type. However, this method reduces null checks.
default boolean isIdentityConversion()
An identity conversion means that the type is already an internal data structure.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.