Source:
<code>public void testInnerJoin() throws Exception { long ts = nextTimestamp(); initMetaInfoTableValues(ts); <START> String query = "SELECT item.item_id, item.name, supp.supplier_id, supp.name FROM " + JOIN_ITEM_TABLE + " item INNER JOIN " + JOIN_SUPPLIER_TABLE + " supp ON item.supplier_id = supp.supplier_id"; <END> Properties props = new Properties(TEST_PROPERTIES); props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 2)); Connection conn = DriverManager.getConnection(PHOENIX_JDBC_URL, props); try { PreparedStatement statement = conn.prepareStatement(query); ResultSet rs = statement.executeQuery(); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000001"); assertEquals(rs.getString(2), "T1"); assertEquals(rs.getString(3), "0000000001"); assertEquals(rs.getString(4), "S1"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000002"); assertEquals(rs.getString(2), "T2"); assertEquals(rs.getString(3), "0000000001"); assertEquals(rs.getString(4), "S1"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000003"); assertEquals(rs.getString(2), "T3"); assertEquals(rs.getString(3), "0000000002"); assertEquals(rs.getString(4), "S2"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000004"); assertEquals(rs.getString(2), "T4"); assertEquals(rs.getString(3), "0000000002"); assertEquals(rs.getString(4), "S2"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000005"); assertEquals(rs.getString(2), "T5"); assertEquals(rs.getString(3), "0000000005"); assertEquals(rs.getString(4), "S5"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000006"); assertEquals(rs.getString(2), "T6"); assertEquals(rs.getString(3), "0000000006"); assertEquals(rs.getString(4), "S6"); assertFalse(rs.next()); } finally { conn.close(); } }</code><technical_language>Wow, this is impressive! Great cut</technical_language>

Target:
public void testInnerJoin() throws Exception { initMetaInfoTableValues(); String query = "SELECT item.item_id, item.name, supp.supplier_id, supp.name FROM " + JOIN_ITEM_TABLE + " item INNER JOIN " + JOIN_SUPPLIER_TABLE + " supp ON item.supplier_id = supp.supplier_id"; Properties props = new Properties(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(PHOENIX_JDBC_URL, props); try { PreparedStatement statement = conn.prepareStatement(query); ResultSet rs = statement.executeQuery(); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000001"); assertEquals(rs.getString(2), "T1"); assertEquals(rs.getString(3), "0000000001"); assertEquals(rs.getString(4), "S1"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000002"); assertEquals(rs.getString(2), "T2"); assertEquals(rs.getString(3), "0000000001"); assertEquals(rs.getString(4), "S1"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000003"); assertEquals(rs.getString(2), "T3"); assertEquals(rs.getString(3), "0000000002"); assertEquals(rs.getString(4), "S2"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000004"); assertEquals(rs.getString(2), "T4"); assertEquals(rs.getString(3), "0000000002"); assertEquals(rs.getString(4), "S2"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000005"); assertEquals(rs.getString(2), "T5"); assertEquals(rs.getString(3), "0000000005"); assertEquals(rs.getString(4), "S5"); assertTrue (rs.next()); assertEquals(rs.getString(1), "0000000006"); assertEquals(rs.getString(2), "T6"); assertEquals(rs.getString(3), "0000000006"); assertEquals(rs.getString(4), "S6"); assertFalse(rs.next()); } finally { conn.close(); } }