You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2021/07/21 16:56:21 UTC
[orc] branch main updated: ORC-855: Remove Unused isRepeating from
RunLengthIntegerReaderV2 (#757)
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new 6811191 ORC-855: Remove Unused isRepeating from RunLengthIntegerReaderV2 (#757)
6811191 is described below
commit 6811191e226bc156b74309e8f6e314b2dfcdfb70
Author: belugabehr <12...@users.noreply.github.com>
AuthorDate: Wed Jul 21 12:53:32 2021 -0400
ORC-855: Remove Unused isRepeating from RunLengthIntegerReaderV2 (#757)
### What changes were proposed in this pull request?
Remove unused code in RunLengthIntegerReaderV2
### Why are the changes needed?
Minor cleanup to remove code. Less is more.
### How was this patch tested?
No changes in functionality. Use existing unit tests.
---
java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java | 4 ----
1 file changed, 4 deletions(-)
diff --git a/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java b/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java
index bf96d2b..b2b3dad 100644
--- a/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java
+++ b/java/core/src/java/org/apache/orc/impl/RunLengthIntegerReaderV2.java
@@ -36,7 +36,6 @@ public class RunLengthIntegerReaderV2 implements IntegerReader {
private InStream input;
private final boolean signed;
private final long[] literals = new long[RunLengthIntegerWriterV2.MAX_SCOPE];
- private boolean isRepeating = false;
private int numLiterals = 0;
private int used = 0;
private final boolean skipCorrupt;
@@ -54,7 +53,6 @@ public class RunLengthIntegerReaderV2 implements IntegerReader {
private final static RunLengthIntegerWriterV2.EncodingType[] encodings = RunLengthIntegerWriterV2.EncodingType.values();
private void readValues(boolean ignoreEof) throws IOException {
// read the first 2 bits and determine the encoding type
- isRepeating = false;
int firstByte = input.read();
if (firstByte < 0) {
if (!ignoreEof) {
@@ -103,7 +101,6 @@ public class RunLengthIntegerReaderV2 implements IntegerReader {
// if all number are positive)
long fd = SerializationUtils.readVslong(input);
if (fd == 0) {
- isRepeating = true;
assert numLiterals == 1;
Arrays.fill(literals, numLiterals, numLiterals + len, literals[0]);
numLiterals += len;
@@ -301,7 +298,6 @@ public class RunLengthIntegerReaderV2 implements IntegerReader {
throw new AssertionError("readValues called with existing values present");
}
// repeat the value for length times
- isRepeating = true;
// TODO: this is not so useful and V1 reader doesn't do that. Fix? Same if delta == 0
for(int i = 0; i < len; i++) {
literals[i] = val;