public class SliceSelectiveStreamReader extends Object implements SelectiveStreamReader
Constructor and Description |
---|
SliceSelectiveStreamReader(StreamDescriptor streamDescriptor,
Optional<TupleDomainFilter> filter,
Optional<Type> outputType,
OrcAggregatedMemoryContext systemMemoryContext) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static int |
computeTruncatedLength(io.airlift.slice.Slice slice,
int offset,
int length,
int maxCodePointCount,
boolean isCharType) |
Block |
getBlock(int[] positions,
int positionCount)
Return a subset of the values extracted during most recent read() for the specified positions
Can be called at most once after each read().
|
BlockLease |
getBlockView(int[] positions,
int positionCount)
Like getBlock(), but returns a temporary view of the data.
|
int[] |
getReadPositions() |
long |
getRetainedSizeInBytes() |
int |
read(int offset,
int[] positions,
int positionCount)
Extract values at the specified positions, apply filter and buffer the values that pass
the filter.
|
void |
resetDataStream() |
void |
startRowGroup(InputStreamSources dataStreamSources) |
void |
startStripe(Stripe stripe) |
void |
throwAnyError(int[] positions,
int positionCount)
Throws any error that occurred while reading specified positions.
|
String |
toString() |
public SliceSelectiveStreamReader(StreamDescriptor streamDescriptor, Optional<TupleDomainFilter> filter, Optional<Type> outputType, OrcAggregatedMemoryContext systemMemoryContext)
public void startStripe(Stripe stripe) throws IOException
startStripe
in interface StreamReader
IOException
public void startRowGroup(InputStreamSources dataStreamSources) throws IOException
startRowGroup
in interface StreamReader
IOException
public void close()
close
in interface StreamReader
public long getRetainedSizeInBytes()
getRetainedSizeInBytes
in interface StreamReader
public int read(int offset, int[] positions, int positionCount) throws IOException
SelectiveStreamReader
read
in interface SelectiveStreamReader
positions
- Monotonically increasing positions to readpositionCount
- Number of valid positions in the positions array; may be less than the
size of the arrayIOException
public int[] getReadPositions()
getReadPositions
in interface SelectiveStreamReader
public Block getBlock(int[] positions, int positionCount)
SelectiveStreamReader
getBlock
in interface SelectiveStreamReader
positions
- Monotonically increasing positions to return; must be a strict subset of both
the list of positions passed into read() and the list of positions returned
from getReadPositions()positionCount
- Number of valid positions in the positions array; may be less than the
size of the arraypublic BlockLease getBlockView(int[] positions, int positionCount)
SelectiveStreamReader
getBlockView
in interface SelectiveStreamReader
public void throwAnyError(int[] positions, int positionCount)
SelectiveStreamReader
throwAnyError
in interface SelectiveStreamReader
public static int computeTruncatedLength(io.airlift.slice.Slice slice, int offset, int length, int maxCodePointCount, boolean isCharType)
public void resetDataStream()
Copyright © 2012–2021. All rights reserved.