You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by pg...@apache.org on 2021/08/02 11:49:51 UTC

[orc] branch main updated: optimization loop termination condition (#803)

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 3d12132  optimization loop termination condition (#803)
3d12132 is described below

commit 3d12132c1f6521ac0ca60d3997332beeb7c9e3df
Author: guiyanakaung <gu...@gmail.com>
AuthorDate: Mon Aug 2 19:49:46 2021 +0800

    optimization loop termination condition (#803)
    
    Co-authored-by: zhangyiqun <zh...@huya.com>
---
 java/core/src/java/org/apache/orc/OrcFile.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/java/core/src/java/org/apache/orc/OrcFile.java b/java/core/src/java/org/apache/orc/OrcFile.java
index 6ef6c69..572a4ac 100644
--- a/java/core/src/java/org/apache/orc/OrcFile.java
+++ b/java/core/src/java/org/apache/orc/OrcFile.java
@@ -1039,7 +1039,7 @@ public class OrcFile {
     if (first.length != next.length) {
       return false;
     }
-    for(int k = 0; k < first.length && k < next.length; ++k) {
+    for(int k = 0; k < first.length; ++k) {
       if (!first[k].getKeyName().equals(next[k].getKeyName()) ||
           first[k].getKeyVersion() != next[k].getKeyVersion() ||
           first[k].getAlgorithm() != next[k].getAlgorithm()) {
@@ -1054,7 +1054,7 @@ public class OrcFile {
     if (first.length != next.length) {
       return false;
     }
-    for(int k = 0; k < first.length && k < next.length; ++k) {
+    for(int k = 0; k < first.length; ++k) {
       if (!first[k].getName().equals(next[k].getName())) {
         return false;
       }
@@ -1063,7 +1063,7 @@ public class OrcFile {
       if (firstParam.length != nextParam.length) {
         return false;
       }
-      for(int p=0; p < firstParam.length && p < nextParam.length; ++p) {
+      for(int p=0; p < firstParam.length; ++p) {
         if (!firstParam[p].equals(nextParam[p])) {
           return false;
         }
@@ -1073,7 +1073,7 @@ public class OrcFile {
       if (firstRoots.length != nextRoots.length) {
         return false;
       }
-      for(int r=0; r < firstRoots.length && r < nextRoots.length; ++r) {
+      for(int r=0; r < firstRoots.length; ++r) {
         if (firstRoots[r].getId() != nextRoots[r].getId()) {
           return false;
         }
@@ -1087,7 +1087,7 @@ public class OrcFile {
     if (first.length != next.length) {
       return false;
     }
-    for(int k = 0; k < first.length && k < next.length; ++k) {
+    for(int k = 0; k < first.length; ++k) {
       if ((first[k].getKeyDescription() == null) !=
               (next[k].getKeyDescription() == null) ||
           !first[k].getKeyDescription().getKeyName().equals(