You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2017/10/31 02:24:59 UTC
[1/2] phoenix git commit: Revert "PHOENIX-4322 DESC primary key
column with variable length does not work in SkipScanFilter (fix test
failures)"
Repository: phoenix
Updated Branches:
refs/heads/master 45a9c275d -> a7af29f9e
Revert "PHOENIX-4322 DESC primary key column with variable length does not work in SkipScanFilter (fix test failures)"
This reverts commit 45a9c275dbbf9206264236c690f40c309d97da3c.
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6b24e0d5
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6b24e0d5
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6b24e0d5
Branch: refs/heads/master
Commit: 6b24e0d5869839f861f3b7069e865e71d1fc61c6
Parents: 45a9c27
Author: James Taylor <jt...@salesforce.com>
Authored: Mon Oct 30 19:24:36 2017 -0700
Committer: James Taylor <jt...@salesforce.com>
Committed: Mon Oct 30 19:24:36 2017 -0700
----------------------------------------------------------------------
phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/6b24e0d5/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
index 3fe8ad3..8ab4f20 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
@@ -434,7 +434,7 @@ public class ScanUtil {
// The result of an RVC evaluation can come with a trailing separator already, so we
// should avoid adding another one.
if ( !isFixedWidth
- && ( bytes.length == 0 || slotSpan[i] == 0 || key[offset - 1] != sepByte )
+ && ( bytes.length == 0 || key[offset - 1] != sepByte )
&& ( sepByte == QueryConstants.DESC_SEPARATOR_BYTE
|| ( !exclusiveUpper
&& (fieldIndex < schema.getMaxFields() || inclusiveUpper || exclusiveLower) ) ) ) {
[2/2] phoenix git commit: Revert "PHOENIX-4322 DESC primary key
column with variable length does not work in SkipScanFilter"
Posted by ja...@apache.org.
Revert "PHOENIX-4322 DESC primary key column with variable length does not work in SkipScanFilter"
This reverts commit b0220fa7522fd7e1848ad428a47121b205dec504.
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/a7af29f9
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/a7af29f9
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/a7af29f9
Branch: refs/heads/master
Commit: a7af29f9e90308d5a2805cc3eabf4e607fbe3cb2
Parents: 6b24e0d
Author: James Taylor <jt...@salesforce.com>
Authored: Mon Oct 30 19:24:51 2017 -0700
Committer: James Taylor <jt...@salesforce.com>
Committed: Mon Oct 30 19:24:51 2017 -0700
----------------------------------------------------------------------
.../src/it/java/org/apache/phoenix/end2end/SortOrderIT.java | 9 ---------
.../src/main/java/org/apache/phoenix/util/ScanUtil.java | 7 ++-----
2 files changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/a7af29f9/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
index 58bbabb..655dbb1 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SortOrderIT.java
@@ -167,15 +167,6 @@ public class SortOrderIT extends ParallelStatsDisabledIT {
runQueryTest(ddl, upsert("oid", "code"), insertedRows, new Object[][]{{"o2", 2}}, new WhereCondition("oid", "IN", "('o2')"),
table);
}
-
- @Test
- public void inDescCompositePK3() throws Exception {
- String table = generateUniqueName();
- String ddl = "CREATE table " + table + " (oid INTEGER NOT NULL, code VARCHAR NOT NULL constraint pk primary key (oid DESC, code DESC))";
- Object[][] insertedRows = new Object[][]{{1, "o1"}, {2, "o2"}, {3, "o3"}};
- runQueryTest(ddl, upsert("oid", "code"), insertedRows, new Object[][]{{2, "o2"}, {1, "o1"}},
- new WhereCondition("(oid, code)", "IN", "((1, 'o1'), (2, 'o2'))"), table);
- }
@Test
public void likeDescCompositePK1() throws Exception {
http://git-wip-us.apache.org/repos/asf/phoenix/blob/a7af29f9/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
index 8ab4f20..a844226 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
@@ -431,11 +431,8 @@ public class ScanUtil {
anyInclusiveUpperRangeKey |= !range.isSingleKey() && inclusiveUpper;
// A null or empty byte array is always represented as a zero byte
byte sepByte = SchemaUtil.getSeparatorByte(schema.rowKeyOrderOptimizable(), bytes.length == 0, field);
- // The result of an RVC evaluation can come with a trailing separator already, so we
- // should avoid adding another one.
- if ( !isFixedWidth
- && ( bytes.length == 0 || key[offset - 1] != sepByte )
- && ( sepByte == QueryConstants.DESC_SEPARATOR_BYTE
+
+ if ( !isFixedWidth && ( sepByte == QueryConstants.DESC_SEPARATOR_BYTE
|| ( !exclusiveUpper
&& (fieldIndex < schema.getMaxFields() || inclusiveUpper || exclusiveLower) ) ) ) {
key[offset++] = sepByte;