phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1140) Incorrect padding for row key columns
Date Mon, 04 Aug 2014 22:53:12 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14085438#comment-14085438
] 

Hudson commented on PHOENIX-1140:
---------------------------------

SUCCESS: Integrated in Phoenix | Master | Hadoop1 #314 (See [https://builds.apache.org/job/Phoenix-master-hadoop1/314/])
PHOENIX-1140 Incorrect padding for row key columns (Samarth Jain) (jtaylor: rev a9dfc135da7e7093791e0d2e88eca0bbf9909deb)
* phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryPlanIT.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/ScanRanges.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/PDataType.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/CaseExpression.java
* phoenix-core/src/main/java/org/apache/phoenix/util/ByteUtil.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/VariableLengthPKIT.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/PrefixFunction.java
* phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
* phoenix-core/src/main/java/org/apache/phoenix/query/KeyRange.java
* phoenix-core/src/main/java/org/apache/phoenix/util/ScanUtil.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
* phoenix-core/src/test/java/org/apache/phoenix/compile/StatementHintsCompilationTest.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/RTrimFunction.java
* phoenix-core/src/test/java/org/apache/phoenix/compile/WhereCompilerTest.java
* phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/InListExpression.java
* phoenix-core/src/main/java/org/apache/phoenix/expression/function/ScalarFunction.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
* phoenix-core/src/test/java/org/apache/phoenix/util/ScanUtilTest.java
* phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java


> Incorrect padding for row key columns
> -------------------------------------
>
>                 Key: PHOENIX-1140
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1140
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: Samarth Jain
>             Fix For: 5.0.0, 3.1, 4.1
>
>         Attachments: PHOENIX-1140_3.0.patch, PHOENIX-1140_v2.patch
>
>
> {code}
> @Test 
>     public void testInListOfRVC6() throws Exception {
>         String tenantId = "ABC";
>         String tableDDL = "CREATE TABLE t (tenantId char(15) NOT NULL, pk2 char(15) NOT
NULL, pk3 INTEGER NOT NULL, c1 INTEGER constraint pk primary key (tenantId,pk2,pk3))";
>         createTestTable(getUrl(), tableDDL, null, nextTimestamp());
>         Connection conn = nextConnection(getUrl());
>         conn.createStatement().executeUpdate("upsert into t (tenantId, pk2, pk3, c1)
values ('ABC', 'hel1', 1, 1)");
>         conn.createStatement().executeUpdate("upsert into t (tenantId, pk2, pk3, c1)
values ('ABC', 'hel2', 2, 2)");
>         conn.createStatement().executeUpdate("upsert into t (tenantId, pk2, pk3, c1)
values ('ABC', 'hel3', 3, 3)");
>         conn.createStatement().executeUpdate("upsert into t (tenantId, pk2, pk3, c1)
values ('ABC', 'hel4', 4, 4)");
>         conn.createStatement().executeUpdate("upsert into t (tenantId, pk2, pk3, c1)
values ('ABC', 'hel5', 5, 5)");
>         conn.commit();
>         conn.close();
>         conn = nextConnection(getUrl());
>         //order by needed on the query to make the order of rows returned deterministic.
>         PreparedStatement stmt = conn.prepareStatement("select pk2, pk3 from t WHERE
(tenantId, pk2, pk3) IN ((?, ?, ?), (?, ?, ?))");
>         stmt.setString(1, tenantId);
>         stmt.setString(2, "hel3");
>         stmt.setInt(3, 3);
>         stmt.setString(4, tenantId);
>         stmt.setString(5, "hel5");
>         stmt.setInt(6, 5);
>         ResultSet rs = stmt.executeQuery();
>         assertTrue(rs.next());
>         assertEquals("hel3", rs.getString(1));
>         assertEquals(3, rs.getInt(2));
>         assertTrue(rs.next());
>         assertEquals("hel5", rs.getString(1));
>         assertEquals(5, rs.getInt(2));
>         conn.close();
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message