Package io.prestosql.decoder.raw
Class RawRowDecoder
- java.lang.Object
-
- io.prestosql.decoder.raw.RawRowDecoder
-
- All Implemented Interfaces:
RowDecoder
public class RawRowDecoder extends java.lang.Object implements RowDecoder
Decoder for raw (direct byte) rows. All field decoders map bytes directly to Presto columns.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME
-
Constructor Summary
Constructors Constructor Description RawRowDecoder(java.util.Set<DecoderColumnHandle> columnHandles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.util.Map<DecoderColumnHandle,FieldValueProvider>>decodeRow(byte[] data, java.util.Map<java.lang.String,java.lang.String> dataMap)Decodes a given set of bytes into field values.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RawRowDecoder
public RawRowDecoder(java.util.Set<DecoderColumnHandle> columnHandles)
-
-
Method Detail
-
decodeRow
public java.util.Optional<java.util.Map<DecoderColumnHandle,FieldValueProvider>> decodeRow(byte[] data, java.util.Map<java.lang.String,java.lang.String> dataMap)
Description copied from interface:RowDecoderDecodes a given set of bytes into field values.- Specified by:
decodeRowin interfaceRowDecoder- Parameters:
data- The row data to decode.dataMap- The row data as fields map- Returns:
- Returns mapping from column handle to decoded value. Unmapped columns will be reported as null. Optional.empty() signals decoding error.
-
-