private void repositionInStreams(TreeReaderFactory.TreeReader[] columnReaders, EncodedColumnBatch<OrcBatchKey> batch, boolean sameStripe, ConsumerStripeMetadata stripeMetadata) throws IOException { PositionProvider[] pps = createPositionProviders( columnReaders, batch.getBatchKey(), stripeMetadata); if (LlapIoImpl.ORC_LOGGER.isTraceEnabled()) { LlapIoImpl.ORC_LOGGER.trace("Created pps {}", Arrays.toString(pps)); } if (pps == null) return; for (int i = 0; i < columnReaders.length; i++) { TreeReader reader = columnReaders[i]; if (reader == null) continue; // 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); // TODO: When hive moves to java8, make updateTimezone() as default method in // SettableTreeReader so that we can avoid this check. if (reader instanceof EncodedTreeReaderFactory.TimestampStreamReader && !sameStripe) { ((EncodedTreeReaderFactory.TimestampStreamReader) reader) .updateTimezone(stripeMetadata.getWriterTimezone()); } reader.seek(pps); } }
private void repositionInStreams(TreeReaderFactory.TreeReader[] columnReaders, EncodedColumnBatch<OrcBatchKey> batch, boolean sameStripe, ConsumerStripeMetadata stripeMetadata) throws IOException { PositionProvider[] pps = createPositionProviders( columnReaders, batch.getBatchKey(), stripeMetadata); if (LlapIoImpl.ORC_LOGGER.isTraceEnabled()) { LlapIoImpl.ORC_LOGGER.trace("Created pps {}", Arrays.toString(pps)); } if (pps == null) return; for (int i = 0; i < columnReaders.length; i++) { TreeReader reader = columnReaders[i]; if (reader == null) continue; // 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); // TODO: When hive moves to java8, make updateTimezone() as default method in // SettableTreeReader so that we can avoid this check. if (reader instanceof EncodedTreeReaderFactory.TimestampStreamReader && !sameStripe) { ((EncodedTreeReaderFactory.TimestampStreamReader) reader) .updateTimezone(stripeMetadata.getWriterTimezone()); } reader.seek(pps); } }
.build(); case TIMESTAMP: return TimestampStreamReader.builder() .setColumnIndex(columnIndex) .setPresentStream(present)
return TimestampStreamReader.builder() .setColumnIndex(columnIndex) .setPresentStream(present)
public TimestampStreamReader build() throws IOException { SettableUncompressedStream present = StreamUtils .createSettableUncompressedStream(OrcProto.Stream.Kind.PRESENT.name(), presentStream); SettableUncompressedStream data = StreamUtils .createSettableUncompressedStream(OrcProto.Stream.Kind.DATA.name(), dataStream); SettableUncompressedStream nanos = StreamUtils .createSettableUncompressedStream(OrcProto.Stream.Kind.SECONDARY.name(), nanosStream); boolean isFileCompressed = compressionCodec != null; return new TimestampStreamReader(columnIndex, present, data, nanos, isFileCompressed, columnEncoding, context, vectors); }
public void updateTimezone(String writerTimezoneId) throws IOException { base_timestamp = getBaseTimestamp(writerTimezoneId); }
public TimestampStreamReader build() throws IOException { SettableUncompressedStream present = StreamUtils .createSettableUncompressedStream(OrcProto.Stream.Kind.PRESENT.name(), presentStream); SettableUncompressedStream data = StreamUtils .createSettableUncompressedStream(OrcProto.Stream.Kind.DATA.name(), dataStream); SettableUncompressedStream nanos = StreamUtils .createSettableUncompressedStream(OrcProto.Stream.Kind.SECONDARY.name(), nanosStream); boolean isFileCompressed = compressionCodec != null; return new TimestampStreamReader(columnIndex, present, data, nanos, isFileCompressed, columnEncoding, context, vectors); }
public void updateTimezone(String writerTimezoneId) throws IOException { base_timestamp = getBaseTimestamp(writerTimezoneId); }