long cOffset = sctx.offset + index.getPositions(sctx.streamIndexOffset); : nextIndex.getPositions(sctx.streamIndexOffset);
List<OrcProto.RowIndexEntry> items = index[1].getEntryList(); assertEquals(1, items.size()); assertEquals(3, items.get(0).getPositionsCount()); assertEquals(0, items.get(0).getPositions(0)); assertEquals(0, items.get(0).getPositions(1)); assertEquals(0, items.get(0).getPositions(2)); assertEquals(1, items.get(0).getStatistics().getIntStatistics().getMinimum()); index = recordReader.readRowIndex(1, null, null).getRowGroupIndex(); assertEquals(3, index.length); items = index[1].getEntryList(); assertEquals(2, items.get(0).getStatistics().getIntStatistics().getMaximum());
.setTimestampStatistics(OrcProto.TimestampStatistics.newBuilder().setMaximum(10)).build(); OrcProto.RowIndex ri = OrcProto.RowIndex.newBuilder() .addEntry(OrcProto.RowIndexEntry.newBuilder().addPositions(1)) .addEntry(OrcProto.RowIndexEntry.newBuilder().addPositions(0).addPositions(2).setStatistics(cs)) .build(); OrcProto.RowIndex ri2 = OrcProto.RowIndex.newBuilder() .addEntry(OrcProto.RowIndexEntry.newBuilder().addPositions(3)) .build(); OrcProto.BloomFilterIndex bfi = OrcProto.BloomFilterIndex.newBuilder().addBloomFilter(
throw new AssertionError("RG is not populated for " + columnIx + " rg " + rowGroup); OrcProto.ColumnStatistics stats = entry.getStatistics(); OrcProto.BloomFilter bf = null; OrcProto.Stream.Kind bfk = null;
rowIndexEntry < savedRowIndex.size()) { OrcProto.RowIndexEntry.Builder base = savedRowIndex.get(rowIndexEntry++).toBuilder(); if (useDictionaryEncoding) { rowOutput.getPosition(new RowIndexPositionRecorder(base));
if (streamFactory.buildIndex()) { rowIndex = OrcProto.RowIndex.newBuilder(); rowIndexEntry = OrcProto.RowIndexEntry.newBuilder(); rowIndexPosition = new RowIndexPositionRecorder(rowIndexEntry); } else {
rowIndexEntry < savedRowIndex.size()) { OrcProto.RowIndexEntry.Builder base = savedRowIndex.get(rowIndexEntry++).toBuilder(); if (useDictionaryEncoding) { rowOutput.getPosition(new RowIndexPositionRecorder(base));
childrenWriters = new TreeWriter[0]; rowIndex = OrcProto.RowIndex.newBuilder(); rowIndexEntry = OrcProto.RowIndexEntry.newBuilder(); rowIndexPosition = new RowIndexPositionRecorder(rowIndexEntry); stripeStatsBuilders = Lists.newArrayList();
childrenWriters = new TreeWriter[0]; rowIndex = OrcProto.RowIndex.newBuilder(); rowIndexEntry = OrcProto.RowIndexEntry.newBuilder(); rowIndexPosition = new RowIndexPositionRecorder(rowIndexEntry); stripeStatsBuilders = Lists.newArrayList();
rowIndexEntry < savedRowIndex.size()) { OrcProto.RowIndexEntry.Builder base = savedRowIndex.get(rowIndexEntry++).toBuilder(); if (useDictionaryEncoding) { rowOutput.getPosition(new RowIndexPositionRecorder(base));
public org.apache.orc.OrcProto.RowIndexEntry buildPartial() { org.apache.orc.OrcProto.RowIndexEntry result = new org.apache.orc.OrcProto.RowIndexEntry(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { positions_ = java.util.Collections.unmodifiableList(positions_); bitField0_ = (bitField0_ & ~0x00000001); } result.positions_ = positions_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000001; } if (statisticsBuilder_ == null) { result.statistics_ = statistics_; } else { result.statistics_ = statisticsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public static void addRgFilteredStreamToRanges(OrcProto.Stream stream, boolean[] includedRowGroups, boolean isCompressed, OrcProto.RowIndex index, OrcProto.ColumnEncoding encoding, OrcProto.Type type, int compressionSize, boolean hasNull, long offset, long length, DiskRangeList.CreateHelper list, boolean doMergeBuffers) { for (int group = 0; group < includedRowGroups.length; ++group) { if (!includedRowGroups[group]) continue; int posn = getIndexPosition( encoding.getKind(), type.getKind(), stream.getKind(), isCompressed, hasNull); long start = index.getEntry(group).getPositions(posn); final long nextGroupOffset; boolean isLast = group == (includedRowGroups.length - 1); nextGroupOffset = isLast ? length : index.getEntry(group + 1).getPositions(posn); start += offset; long end = offset + estimateRgEndOffset( isCompressed, isLast, nextGroupOffset, length, compressionSize); list.addOrMerge(start, end, doMergeBuffers, true); } }
public Builder mergeFrom(org.apache.orc.OrcProto.RowIndexEntry other) { if (other == org.apache.orc.OrcProto.RowIndexEntry.getDefaultInstance()) return this; if (!other.positions_.isEmpty()) { if (positions_.isEmpty()) { positions_ = other.positions_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePositionsIsMutable(); positions_.addAll(other.positions_); } onChanged(); } if (other.hasStatistics()) { mergeStatistics(other.getStatistics()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public static void addRgFilteredStreamToRanges(OrcProto.Stream stream, boolean[] includedRowGroups, boolean isCompressed, OrcProto.RowIndex index, OrcProto.ColumnEncoding encoding, OrcProto.Type type, int compressionSize, boolean hasNull, long offset, long length, DiskRangeList.CreateHelper list, boolean doMergeBuffers) { for (int group = 0; group < includedRowGroups.length; ++group) { if (!includedRowGroups[group]) continue; int posn = getIndexPosition( encoding.getKind(), type.getKind(), stream.getKind(), isCompressed, hasNull); long start = index.getEntry(group).getPositions(posn); final long nextGroupOffset; boolean isLast = group == (includedRowGroups.length - 1); nextGroupOffset = isLast ? length : index.getEntry(group + 1).getPositions(posn); start += offset; long end = offset + estimateRgEndOffset( isCompressed, isLast, nextGroupOffset, length, compressionSize); list.addOrMerge(start, end, doMergeBuffers, true); } }
public static void addRgFilteredStreamToRanges(OrcProto.Stream stream, boolean[] includedRowGroups, boolean isCompressed, OrcProto.RowIndex index, OrcProto.ColumnEncoding encoding, OrcProto.Type type, int compressionSize, boolean hasNull, long offset, long length, DiskRangeList.CreateHelper list, boolean doMergeBuffers) { for (int group = 0; group < includedRowGroups.length; ++group) { if (!includedRowGroups[group]) continue; int posn = getIndexPosition( encoding.getKind(), type.getKind(), stream.getKind(), isCompressed, hasNull); long start = index.getEntry(group).getPositions(posn); final long nextGroupOffset; boolean isLast = group == (includedRowGroups.length - 1); nextGroupOffset = isLast ? length : index.getEntry(group + 1).getPositions(posn); start += offset; long end = offset + estimateRgEndOffset( isCompressed, isLast, nextGroupOffset, length, compressionSize); list.addOrMerge(start, end, doMergeBuffers, true); } }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.orc.OrcProto.RowIndexEntry prototype) {
public org.apache.orc.OrcProto.RowIndexEntry getDefaultInstanceForType() { return org.apache.orc.OrcProto.RowIndexEntry.getDefaultInstance(); }
private long getRowCount(OrcProto.RowIndexEntry rowIndexEntry) { return rowIndexEntry.getStatistics().getNumberOfValues(); }
public Builder toBuilder() { return newBuilder(this); }
public static Builder newBuilder(org.apache.orc.OrcProto.RowIndexEntry prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }