This is an automated email from the ASF dual-hosted git repository.
pgaref 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 475e172 ORC-840: Remove Superfluous Array Fill in RecordReaderImpl
(#744)
475e172 is described below
commit 475e172aa4eb87a5c9a034bc853a2c755ff27323
Author: belugabehr <[email protected]>
AuthorDate: Sun Jul 18 08:21:48 2021 -0400
ORC-840: Remove Superfluous Array Fill in RecordReaderImpl (#744)
### What changes were proposed in this pull request?
Remove Superfluous Array Fill in RecordReaderImpl.
### Why are the changes needed?
Less code. Performance.
### How was this patch tested?
No changes in functionality. Use existing unit tests.
---
java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java
b/java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java
index d015516..5fc9fae 100644
--- a/java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java
+++ b/java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java
@@ -173,8 +173,7 @@ public class RecordReaderImpl implements RecordReader {
List<PredicateLeaf> sargLeaves,
SchemaEvolution evolution) {
int[] result = new int[sargLeaves.size()];
- Arrays.fill(result, -1);
- for(int i=0; i < result.length; ++i) {
+ for (int i = 0; i < sargLeaves.size(); ++i) {
String colName = sargLeaves.get(i).getColumnName();
result[i] = findColumns(evolution, colName);
}