use of org.apache.hadoop.hive.ql.io.orc.encoded.EncodedTreeReaderFactory.SettableTreeReader in project hive by apache.
the class OrcEncodedDataConsumer method repositionInStreams.
private void repositionInStreams(TreeReaderFactory.TreeReader[] columnReaders, EncodedColumnBatch<OrcBatchKey> batch, boolean sameStripe, ConsumerStripeMetadata stripeMetadata) throws IOException {
PositionProvider[] pps = createPositionProviders(columnReaders, batch.getBatchKey(), stripeMetadata);
if (pps == null)
return;
for (int i = 0; i < columnReaders.length; i++) {
TreeReader reader = columnReaders[i];
// Note: we assume this never happens for SerDe reader - the batch would never have vectors.
// That is always true now; but it wasn't some day, the below would throw in getColumnData.
((SettableTreeReader) reader).setBuffers(batch, sameStripe);
// SettableTreeReader so that we can avoid this check.
if (reader instanceof EncodedTreeReaderFactory.TimestampStreamReader && !sameStripe) {
((EncodedTreeReaderFactory.TimestampStreamReader) reader).updateTimezone(stripeMetadata.getWriterTimezone());
}
reader.seek(pps);
}
}
Aggregations