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
Constructors Constructor Description SliceDictionaryColumnWriter(OrcColumnId columnId, Type type, CompressionKind compression, int bufferSize, Supplier<SliceColumnStatisticsBuilder> statisticsBuilderSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginRowGroup()voidclose()Map<OrcColumnId,ColumnStatistics>finishRowGroup()List<StreamDataOutput>getBloomFilters(CompressedMetadataWriter metadataWriter)longgetBufferedBytes()This method returns the size of the flushed data plus any unflushed data.Map<OrcColumnId,ColumnEncoding>getColumnEncodings()Map<OrcColumnId,ColumnStatistics>getColumnStripeStatistics()List<StreamDataOutput>getDataStreams()Get the data streams to be written.intgetDictionaryBytes()intgetDictionaryEntries()intgetIndexBytes()List<StreamDataOutput>getIndexStreams(CompressedMetadataWriter metadataWriter)Write index streams to the output and return the streams in the order in which they were written.longgetNonNullValueCount()longgetRawBytes()longgetRetainedBytes()longgetValueCount()voidreset()OptionalInttryConvertToDirect(int maxDirectBytes)voidwriteBlock(Block block)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.trino.orc.writer.ColumnWriter
getNestedColumnWriters
-
-
-
-
Constructor Detail
-
SliceDictionaryColumnWriter
public SliceDictionaryColumnWriter(OrcColumnId columnId, Type type, CompressionKind compression, int bufferSize, Supplier<SliceColumnStatisticsBuilder> statisticsBuilderSupplier)
-
-
Method Detail
-
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
public OptionalInt tryConvertToDirect(int maxDirectBytes)
- Specified by:
tryConvertToDirectin interfaceDictionaryCompressionOptimizer.DictionaryColumn
-
getColumnEncodings
public Map<OrcColumnId,ColumnEncoding> getColumnEncodings()
- Specified by:
getColumnEncodingsin interfaceColumnWriter
-
beginRowGroup
public void beginRowGroup()
- Specified by:
beginRowGroupin interfaceColumnWriter
-
writeBlock
public void writeBlock(Block block)
- Specified by:
writeBlockin interfaceColumnWriter
-
finishRowGroup
public Map<OrcColumnId,ColumnStatistics> finishRowGroup()
- Specified by:
finishRowGroupin interfaceColumnWriter
-
close
public void close()
- Specified by:
closein interfaceColumnWriter
-
getColumnStripeStatistics
public Map<OrcColumnId,ColumnStatistics> 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
public List<StreamDataOutput> 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
-
-