Package io.trino.orc.writer
Class SliceDictionaryColumnWriter
java.lang.Object
io.trino.orc.writer.SliceDictionaryColumnWriter
- All Implemented Interfaces:
DictionaryCompressionOptimizer.DictionaryColumn,ColumnWriter
public class SliceDictionaryColumnWriter
extends Object
implements ColumnWriter, DictionaryCompressionOptimizer.DictionaryColumn
-
Constructor Summary
ConstructorsConstructorDescriptionSliceDictionaryColumnWriter(OrcColumnId columnId, Type type, CompressionKind compression, int bufferSize, Supplier<SliceColumnStatisticsBuilder> statisticsBuilderSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()getBloomFilters(CompressedMetadataWriter metadataWriter) longThis method returns the size of the flushed data plus any unflushed data.Get the data streams to be written.intintintgetIndexStreams(CompressedMetadataWriter metadataWriter) Write index streams to the output and return the streams in the order in which they were written.longlonglonglongvoidreset()tryConvertToDirect(int maxDirectBytes) voidwriteBlock(Block block) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.orc.writer.ColumnWriter
getNestedColumnWriters
-
Constructor Details
-
SliceDictionaryColumnWriter
public SliceDictionaryColumnWriter(OrcColumnId columnId, Type type, CompressionKind compression, int bufferSize, Supplier<SliceColumnStatisticsBuilder> statisticsBuilderSupplier)
-
-
Method Details
-
getRawBytes
public long getRawBytes()- Specified by:
getRawBytesin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getDictionaryBytes
public int getDictionaryBytes()- Specified by:
getDictionaryBytesin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getIndexBytes
public int getIndexBytes()- Specified by:
getIndexBytesin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getValueCount
public long getValueCount()- Specified by:
getValueCountin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getNonNullValueCount
public long getNonNullValueCount()- Specified by:
getNonNullValueCountin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getDictionaryEntries
public int getDictionaryEntries()- Specified by:
getDictionaryEntriesin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
tryConvertToDirect
- Specified by:
tryConvertToDirectin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getColumnEncodings
- Specified by:
getColumnEncodingsin interfaceColumnWriter
-
beginRowGroup
public void beginRowGroup()- Specified by:
beginRowGroupin interfaceColumnWriter
-
writeBlock
- Specified by:
writeBlockin interfaceColumnWriter
-
finishRowGroup
- Specified by:
finishRowGroupin interfaceColumnWriter
-
close
public void close()- Specified by:
closein interfaceColumnWriter
-
getColumnStripeStatistics
- Specified by:
getColumnStripeStatisticsin interfaceColumnWriter
-
getIndexStreams
public List<StreamDataOutput> getIndexStreams(CompressedMetadataWriter metadataWriter) throws IOException Description copied from interface:ColumnWriterWrite index streams to the output and return the streams in the order in which they were written. The ordering is critical because the stream only contain a length with no offset.- Specified by:
getIndexStreamsin interfaceColumnWriter- Throws:
IOException
-
getBloomFilters
public List<StreamDataOutput> getBloomFilters(CompressedMetadataWriter metadataWriter) throws IOException - Specified by:
getBloomFiltersin interfaceColumnWriter- Throws:
IOException
-
getDataStreams
Description copied from interface:ColumnWriterGet the data streams to be written.- Specified by:
getDataStreamsin interfaceColumnWriter
-
getBufferedBytes
public long getBufferedBytes()Description copied from interface:ColumnWriterThis method returns the size of the flushed data plus any unflushed data. If the output is compressed, flush data size is the size after compression.- Specified by:
getBufferedBytesin interfaceColumnWriter- Specified by:
getBufferedBytesin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getRetainedBytes
public long getRetainedBytes()- Specified by:
getRetainedBytesin interfaceColumnWriter
-
reset
public void reset()- Specified by:
resetin interfaceColumnWriter
-