public abstract class AbstractDecimalSelectiveStreamReader extends Object implements SelectiveStreamReader
Modifier and Type | Field and Description |
---|---|
protected DecimalInputStream |
dataStream |
protected TupleDomainFilter |
filter |
protected boolean |
nonDeterministicFilter |
protected boolean[] |
nulls |
protected boolean |
nullsAllowed |
protected int |
outputPositionCount |
protected int[] |
outputPositions |
protected boolean |
outputRequired |
protected BooleanInputStream |
presentStream |
protected int |
scale |
protected LongInputStream |
scaleStream |
protected long[] |
values |
Constructor and Description |
---|
AbstractDecimalSelectiveStreamReader(StreamDescriptor streamDescriptor,
Optional<TupleDomainFilter> filter,
Optional<Type> outputType,
OrcLocalMemoryContext systemMemoryContext,
int valuesPerPosition) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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.
|
protected void |
skip(int items) |
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() |
protected final TupleDomainFilter filter
protected final boolean nullsAllowed
protected final boolean outputRequired
protected final boolean nonDeterministicFilter
protected final int scale
protected long[] values
protected boolean[] nulls
protected int[] outputPositions
protected int outputPositionCount
protected BooleanInputStream presentStream
protected DecimalInputStream dataStream
protected LongInputStream scaleStream
public AbstractDecimalSelectiveStreamReader(StreamDescriptor streamDescriptor, Optional<TupleDomainFilter> filter, Optional<Type> outputType, OrcLocalMemoryContext systemMemoryContext, int valuesPerPosition)
public void startStripe(Stripe stripe)
startStripe
in interface StreamReader
public void startRowGroup(InputStreamSources dataStreamSources)
startRowGroup
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
protected void skip(int items) throws IOException
IOException
public int[] getReadPositions()
getReadPositions
in interface SelectiveStreamReader
public void throwAnyError(int[] positions, int positionCount)
SelectiveStreamReader
throwAnyError
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 close()
close
in interface StreamReader
Copyright © 2012–2021. All rights reserved.