public abstract class GlobalDictionaryEncodedFieldColumnWriter<T> extends Object
NestedDataColumnSerializer.
NestedDataColumnSerializer while processing the 'raw' nested data will call addValue(int, Object)
for all literal writers, which for this type of writer entails building a local dictionary to map into to the global
dictionary (localDictionary) and writes this unsorted localId to an intermediate integer column,
intermediateValueWriter.
When processing the 'raw' value column is complete, the writeTo(int, FileSmoosher) method will sort the
local ids and write them out to a local sorted dictionary, iterate over intermediateValueWriter swapping
the unsorted local ids with the sorted ids and writing to the compressed id column writer
encodedValueSerializer building the bitmap indexes along the way.| Modifier and Type | Field and Description |
|---|---|
protected String |
columnName |
protected int |
cursorPosition |
protected SingleValueColumnarIntsSerializer |
encodedValueSerializer |
protected String |
fieldName |
protected int |
flags |
protected GlobalDictionaryIdLookup |
globalDictionaryIdLookup |
protected IndexSpec |
indexSpec |
protected FixedIndexedIntWriter |
intermediateValueWriter |
protected LocalDimensionDictionary |
localDictionary |
protected SegmentWriteOutMedium |
segmentWriteOutMedium |
protected DictionaryEncodedColumnPartSerde.VERSION |
version |
| Modifier | Constructor and Description |
|---|---|
protected |
GlobalDictionaryEncodedFieldColumnWriter(String columnName,
String fieldName,
SegmentWriteOutMedium segmentWriteOutMedium,
IndexSpec indexSpec,
GlobalDictionaryIdLookup globalDictionaryIdLookup) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(int row,
Object val)
Add a value to the unsorted local dictionary and write to an intermediate column
|
void |
open()
Open the writer so that
addValue(int, Object) can be called |
void |
writeLongAndDoubleColumnLength(WritableByteChannel channel,
int longLength,
int doubleLength) |
void |
writeTo(int finalRowCount,
FileSmoosher smoosher) |
protected final SegmentWriteOutMedium segmentWriteOutMedium
protected final String columnName
protected final String fieldName
protected final IndexSpec indexSpec
protected final GlobalDictionaryIdLookup globalDictionaryIdLookup
protected final LocalDimensionDictionary localDictionary
protected FixedIndexedIntWriter intermediateValueWriter
protected int flags
protected DictionaryEncodedColumnPartSerde.VERSION version
protected SingleValueColumnarIntsSerializer encodedValueSerializer
protected int cursorPosition
protected GlobalDictionaryEncodedFieldColumnWriter(String columnName, String fieldName, SegmentWriteOutMedium segmentWriteOutMedium, IndexSpec indexSpec, GlobalDictionaryIdLookup globalDictionaryIdLookup)
public void open()
throws IOException
addValue(int, Object) can be calledIOExceptionpublic void addValue(int row,
Object val)
throws IOException
IOExceptionpublic void writeTo(int finalRowCount,
FileSmoosher smoosher)
throws IOException
IOExceptionpublic void writeLongAndDoubleColumnLength(WritableByteChannel channel, int longLength, int doubleLength) throws IOException
IOExceptionCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.