Class GlobalDictionaryEncodedFieldColumnWriter<T>

java.lang.Object
org.apache.druid.segment.nested.GlobalDictionaryEncodedFieldColumnWriter<T>
Direct Known Subclasses:
ScalarDoubleFieldColumnWriter, ScalarLongFieldColumnWriter, ScalarStringFieldColumnWriter, VariantArrayFieldColumnWriter, VariantFieldColumnWriter

public abstract class GlobalDictionaryEncodedFieldColumnWriter<T> extends Object
Base class for writer of global dictionary encoded nested field columns for NestedDataColumnSerializer. Nested columns are written in multiple passes. The first pass processes the 'raw' nested data with a StructuredDataProcessor which will call addValue(int, Object) for writers of each field which is present. For this type of writer, this entails building a local dictionary (localDictionary) to map into the global dictionary (globalDictionaryIdLookup) and writes this unsorted localId to an intermediate integer column, intermediateValueWriter.

When processing the 'raw' value column is complete, the writeTo(int, SegmentFileBuilder) 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.

See Also: