private void readDictionaryLengthStream(InStream in, OrcProto.ColumnEncoding encoding) throws IOException { int dictionarySize = encoding.getDictionarySize(); if (in != null) { // Guard against empty LENGTH stream. IntegerReader lenReader = createIntegerReader(encoding.getKind(), in, false, false); int offset = 0; if (dictionaryOffsets == null || dictionaryOffsets.length < dictionarySize + 1) { dictionaryOffsets = new int[dictionarySize + 1]; } for (int i = 0; i < dictionarySize; ++i) { dictionaryOffsets[i] = offset; offset += (int) lenReader.next(); } dictionaryOffsets[dictionarySize] = offset; in.close(); } }
private void readDictionaryLengthStream(InStream in, OrcProto.ColumnEncoding encoding) throws IOException { int dictionarySize = encoding.getDictionarySize(); if (in != null) { // Guard against empty LENGTH stream. IntegerReader lenReader = createIntegerReader(encoding.getKind(), in, false, context); int offset = 0; if (dictionaryOffsets == null || dictionaryOffsets.length < dictionarySize + 1) { dictionaryOffsets = new int[dictionarySize + 1]; } for (int i = 0; i < dictionarySize; ++i) { dictionaryOffsets[i] = offset; offset += (int) lenReader.next(); } dictionaryOffsets[dictionarySize] = offset; in.close(); } }
private void readDictionaryLengthStream(InStream in, OrcProto.ColumnEncoding encoding) throws IOException { int dictionarySize = encoding.getDictionarySize(); if (in != null) { // Guard against empty LENGTH stream. IntegerReader lenReader = createIntegerReader(encoding.getKind(), in, false, false); int offset = 0; if (dictionaryOffsets == null || dictionaryOffsets.length < dictionarySize + 1) { dictionaryOffsets = new int[dictionarySize + 1]; } for (int i = 0; i < dictionarySize; ++i) { dictionaryOffsets[i] = offset; offset += (int) lenReader.next(); } dictionaryOffsets[dictionarySize] = offset; in.close(); } }
public Builder mergeFrom(org.apache.orc.OrcProto.ColumnEncoding other) { if (other == org.apache.orc.OrcProto.ColumnEncoding.getDefaultInstance()) return this; if (other.hasKind()) { setKind(other.getKind()); } if (other.hasDictionarySize()) { setDictionarySize(other.getDictionarySize()); } if (other.hasBloomEncoding()) { setBloomEncoding(other.getBloomEncoding()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }