phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maryann...@apache.org
Subject [1/2] phoenix git commit: PHOENIX-2828 Ordinality should be 1-based in UNNEST WITH ORDINALITY
Date Fri, 08 Apr 2016 15:54:06 GMT
Repository: phoenix
Updated Branches:
  refs/heads/calcite e0dc286a4 -> 542683540


PHOENIX-2828 Ordinality should be 1-based in UNNEST WITH ORDINALITY


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/05bae1fb
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/05bae1fb
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/05bae1fb

Branch: refs/heads/calcite
Commit: 05bae1fbd75a735628abee3f7da09bb0dee1cbb1
Parents: 776eea9
Author: maryannxue <maryann.xue@gmail.com>
Authored: Fri Apr 8 11:48:58 2016 -0400
Committer: maryannxue <maryann.xue@gmail.com>
Committed: Fri Apr 8 11:48:58 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/phoenix/execute/UnnestArrayPlan.java  | 2 +-
 .../test/java/org/apache/phoenix/execute/UnnestArrayPlanTest.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/05bae1fb/phoenix-core/src/main/java/org/apache/phoenix/execute/UnnestArrayPlan.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/execute/UnnestArrayPlan.java b/phoenix-core/src/main/java/org/apache/phoenix/execute/UnnestArrayPlan.java
index c8fef3f..8905eef 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/UnnestArrayPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/UnnestArrayPlan.java
@@ -170,7 +170,7 @@ public class UnnestArrayPlan extends DelegateQueryPlan {
         @Override
         public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) {
             byte[] lengthBuf = new byte[PInteger.INSTANCE.getByteSize()];
-            PInteger.INSTANCE.getCodec().encodeInt(index, lengthBuf, 0);
+            PInteger.INSTANCE.getCodec().encodeInt(index + 1, lengthBuf, 0);
             ptr.set(lengthBuf);
             return true;
         }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/05bae1fb/phoenix-core/src/test/java/org/apache/phoenix/execute/UnnestArrayPlanTest.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/execute/UnnestArrayPlanTest.java
b/phoenix-core/src/test/java/org/apache/phoenix/execute/UnnestArrayPlanTest.java
index 51b8868..50e2721 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/execute/UnnestArrayPlanTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/execute/UnnestArrayPlanTest.java
@@ -143,7 +143,7 @@ public class UnnestArrayPlanTest {
         List<Object[]> ret = Lists.newArrayList();
         for (Object[] array : arrays) {
             for (int i = 0; i < array.length; i++) {
-                ret.add(new Object[] {array[i], i});
+                ret.add(new Object[] {array[i], i + 1});
             }
         }
         return ret;


Mime
View raw message