public class RowCompactedSerializer extends Object implements Serializer<InternalRow>
Serializer
for InternalRow
using compacted binary.Constructor and Description |
---|
RowCompactedSerializer(RowType rowType) |
Modifier and Type | Method and Description |
---|---|
static int |
calculateBitSetInBytes(int arity) |
InternalRow |
copy(InternalRow from)
Creates a deep copy of the given element in a new element.
|
Comparator<MemorySlice> |
createSliceComparator() |
InternalRow |
deserialize(byte[] bytes) |
InternalRow |
deserialize(DataInputView source)
De-serializes a record from the given source input view.
|
Serializer<InternalRow> |
duplicate()
Creates a deep copy of this serializer if it is necessary, i.e.
|
boolean |
equals(Object o) |
int |
hashCode() |
void |
serialize(InternalRow record,
DataOutputView target)
Serializes the given record to the given target output view.
|
byte[] |
serializeToBytes(InternalRow record) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
deserializeFromString, serializeToString
public RowCompactedSerializer(RowType rowType)
public static int calculateBitSetInBytes(int arity)
public Serializer<InternalRow> duplicate()
Serializer
We need this because Serializers might be used in several threads. Stateless serializers are inherently thread-safe while stateful serializers might not be thread-safe.
duplicate
in interface Serializer<InternalRow>
public InternalRow copy(InternalRow from)
Serializer
copy
in interface Serializer<InternalRow>
from
- The element reuse be copied.public void serialize(InternalRow record, DataOutputView target) throws IOException
Serializer
serialize
in interface Serializer<InternalRow>
record
- The record to serialize.target
- The output view to write the serialized data to.IOException
- Thrown, if the serialization encountered an I/O related error. Typically
raised by the output view, which may have an underlying I/O channel to which it
delegates.public InternalRow deserialize(DataInputView source) throws IOException
Serializer
deserialize
in interface Serializer<InternalRow>
source
- The input view from which to read the data.IOException
- Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.public byte[] serializeToBytes(InternalRow record)
public InternalRow deserialize(byte[] bytes)
public Comparator<MemorySlice> createSliceComparator()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.