Source:
<code>private static void initTableValues(byte[][] splits, long ts) throws Exception { String url = PHOENIX_JDBC_URL + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" + ts; Properties props = new Properties(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(url, props); try { ensureTableCreated(getUrl(), TABLE_WITH_SALTING, splits, ts-2); String query = "UPSERT INTO " + TABLE_WITH_SALTING + " VALUES(?,?,?,?,?)"; PreparedStatement stmt = conn.prepareStatement(query); stmt.setInt(1, 1); stmt.setString(2, "abc"); stmt.setString(3, "123"); stmt.setString(4, "abc"); stmt.setInt(5, 111); stmt.execute(); conn.commit(); stmt.setInt(1, 1); stmt.setString(2, "abc"); stmt.setString(3, "456"); stmt.setString(4, "abc"); stmt.setInt(5, 111); stmt.execute(); conn.commit(); <START> <END> query = "UPSERT INTO " + TABLE_WITH_SALTING + " (a_integer, a_string, a_id, b_string, b_integer) " + " VALUES(?,?,?,?,?)"; stmt = conn.prepareStatement(query); stmt.setInt(1, 1); stmt.setString(2, "def"); stmt.setString(3, "789"); stmt.setString(4, "abc"); stmt.setInt(5, 111); stmt.execute(); conn.commit(); stmt.setInt(1, 2); stmt.setString(2, "abc"); stmt.setString(3, "123"); stmt.setString(4, "def"); stmt.setInt(5, 222); stmt.execute(); conn.commit(); query = "UPSERT INTO " + TABLE_WITH_SALTING + " (a_string, a_integer, a_id, b_string, b_integer) " + " VALUES(?,?,?,?,?)"; stmt = conn.prepareStatement(query); stmt.setString(1, "abc"); stmt.setInt(2, 3); stmt.setString(3, "123"); stmt.setString(4, "ghi"); stmt.setInt(5, 333); stmt.execute(); conn.commit(); } finally { conn.close(); } }</code><technical_language>test read values back, a point query expected salt byte, confirm get back</technical_language>

Target:
private static void initTableValues(byte[][] splits, long ts) throws Exception { String url = PHOENIX_JDBC_URL + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" + ts; Properties props = new Properties(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(url, props); try { ensureTableCreated(getUrl(), TABLE_WITH_SALTING, splits, ts-2); String query = "UPSERT INTO " + TABLE_WITH_SALTING + " VALUES(?,?,?,?,?)"; PreparedStatement stmt = conn.prepareStatement(query); stmt.setInt(1, 1); stmt.setString(2, "abc"); stmt.setString(3, "123"); stmt.setString(4, "abc"); stmt.setInt(5, 111); stmt.execute(); conn.commit(); stmt.setInt(1, 1); stmt.setString(2, "abc"); stmt.setString(3, "456"); stmt.setString(4, "abc"); stmt.setInt(5, 111); stmt.execute(); conn.commit(); query = "UPSERT INTO " + TABLE_WITH_SALTING + " (a_integer, a_string, a_id, b_string, b_integer) " + " VALUES(?,?,?,?,?)"; stmt = conn.prepareStatement(query); stmt.setInt(1, 1); stmt.setString(2, "def"); stmt.setString(3, "123"); stmt.setString(4, "abc"); stmt.setInt(5, 111); stmt.execute(); conn.commit(); stmt.setInt(1, 2); stmt.setString(2, "abc"); stmt.setString(3, "123"); stmt.setString(4, "def"); stmt.setInt(5, 222); stmt.execute(); conn.commit(); query = "UPSERT INTO " + TABLE_WITH_SALTING + " (a_string, a_integer, a_id, b_string, b_integer) " + " VALUES(?,?,?,?,?)"; stmt = conn.prepareStatement(query); stmt.setString(1, "abc"); stmt.setInt(2, 3); stmt.setString(3, "123"); stmt.setString(4, "ghi"); stmt.setInt(5, 333); stmt.execute(); conn.commit(); stmt.setString(1, "abc"); stmt.setInt(2, 4); stmt.setString(3, "123"); stmt.setString(4, "jkl"); stmt.setInt(5, 444); stmt.execute(); conn.commit(); } finally { conn.close(); } }