phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] swaroopak commented on a change in pull request #494: PHOENIX-5262 Wrong Result on Salted table with Varbinary PK
Date Sun, 28 Apr 2019 04:46:09 GMT
swaroopak commented on a change in pull request #494: PHOENIX-5262 Wrong Result on Salted table
with Varbinary PK
URL: https://github.com/apache/phoenix/pull/494#discussion_r279177259
 
 

 ##########
 File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/salted/SaltedTableVarLengthRowKeyIT.java
 ##########
 @@ -87,4 +89,36 @@ public void testSelectValueWithPointKeyQuery() throws Exception {
             conn.close();
         }
     }
+
+    @Test
+    public void testSaltedVarbinaryUpperBoundQuery() throws Exception {
+        String tableName = generateUniqueName();
+        String ddl = "CREATE TABLE " + tableName +
+                " ( k VARBINARY PRIMARY KEY, a INTEGER ) SALT_BUCKETS = 3";
+        String dml = "UPSERT INTO " + tableName + " values (?, ?)";
+        String sql2 = "SELECT * FROM " + tableName + " WHERE k = ?";
+
+        try (Connection conn = DriverManager.getConnection(getUrl())) {
+            conn.createStatement().execute(ddl);
+            PreparedStatement stmt = conn.prepareStatement(dml);
+            stmt.setInt(2, 1);
+
+            stmt.setBytes(1, new byte[] { 5 });
 
 Review comment:
   NVM. I assume it is because of logic on upsert.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message