public class LongDirectSelectiveStreamReader extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
nulls |
protected int |
outputPositionCount |
protected int[] |
outputPositions |
protected boolean |
outputRequired |
protected Type |
outputType |
protected long[] |
values |
Constructor and Description |
---|
LongDirectSelectiveStreamReader(StreamDescriptor streamDescriptor,
Optional<TupleDomainFilter> filter,
Optional<Type> outputType,
OrcLocalMemoryContext systemMemoryContext) |
Modifier and Type | Method and Description |
---|---|
protected Block |
buildOutputBlock(int[] positions,
int positionCount,
boolean includeNulls) |
protected BlockLease |
buildOutputBlockView(int[] positions,
int positionCount,
boolean includeNulls) |
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() |
protected void |
prepareNextRead(int positionCount,
boolean withNulls) |
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 |
startRowGroup(InputStreamSources dataStreamSources) |
void |
startStripe(Stripe stripe) |
void |
throwAnyError(int[] positions,
int positionCount)
Throws any error that occurred while reading specified positions.
|
protected final boolean outputRequired
@Nullable protected long[] values
@Nullable protected boolean[] nulls
@Nullable protected int[] outputPositions
protected int outputPositionCount
public LongDirectSelectiveStreamReader(StreamDescriptor streamDescriptor, Optional<TupleDomainFilter> filter, Optional<Type> outputType, OrcLocalMemoryContext systemMemoryContext)
public int read(int offset, int[] positions, int positionCount) throws IOException
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 Block getBlock(int[] positions, int positionCount)
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
public void startStripe(Stripe stripe)
public void startRowGroup(InputStreamSources dataStreamSources)
public void close()
public long getRetainedSizeInBytes()
getRetainedSizeInBytes
in interface StreamReader
protected void prepareNextRead(int positionCount, boolean withNulls)
public int[] getReadPositions()
getReadPositions
in interface SelectiveStreamReader
public void throwAnyError(int[] positions, int positionCount)
SelectiveStreamReader
throwAnyError
in interface SelectiveStreamReader
protected BlockLease buildOutputBlockView(int[] positions, int positionCount, boolean includeNulls)
protected Block buildOutputBlock(int[] positions, int positionCount, boolean includeNulls)
Copyright © 2012–2021. All rights reserved.