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

Hudson commented on PHOENIX-1753:
---------------------------------

FAILURE: Integrated in Phoenix-master #629 (See 
[https://builds.apache.org/job/Phoenix-master/629/])
PHOENIX-1753 Query with RVC that doesn't lead with the row key can return 
incorrect results (jtaylor: rev 46bd0ffdbd089a5a7a6367b8a33ef61d478a4c09)
* phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
* phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java


> Query with RVC that doesn't lead with the row key can return incorrect results
> ------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1753
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1753
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: James Taylor
>              Labels: 4.3.1
>         Attachments: PHOENIX-1753.patch
>
>
> Test case to reproduce the bug:
> {code}
> @Test
>     public void testRVCWithRowKeyNotLeading() throws Exception {
>         String ddl = "CREATE TABLE sorttest4 (rownum BIGINT primary key, name 
> varchar(16), age integer)";
>         Connection conn = nextConnection(getUrl());
>         conn.createStatement().execute(ddl);
>         conn.close();
>         conn = nextConnection(getUrl());
>         String dml = "UPSERT INTO sorttest4 (rownum, name, age) values (?, ?, 
> ?)";
>         PreparedStatement stmt = conn.prepareStatement(dml);
>         stmt.setInt(1, 1);
>         stmt.setString(2, "A");
>         stmt.setInt(3, 1);
>         stmt.executeUpdate();
>         stmt.setInt(1, 2);
>         stmt.setString(2, "B");
>         stmt.setInt(3, 2);
>         stmt.executeUpdate();
>         conn.commit();
>         conn.close();
>         // the below query should only return one record -> (1, "A", 1)
>         String query = "SELECT rownum, name, age FROM sorttest4 where (age, 
> rownum) < (2, 2)";
>         conn = nextConnection(getUrl());
>         ResultSet rs = conn.createStatement().executeQuery(query);
>         int numRecords = 0;
>         while (rs.next()) {
>             assertEquals(1, rs.getInt(1));
>             assertEquals("A", rs.getString(2));
>             assertEquals(1, rs.getInt(3));
>             numRecords++;
>         }
>         assertEquals(1, numRecords);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to