props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 30));
conn = DriverManager.getConnection(getUrl(), props);
stmt = conn.prepareStatement("UPSERT INTO t VALUES(?,?)");
stmt.setString(1, "a");
String[] s = new String[] { "1", "2" };
PhoenixArray array = (PhoenixArray)conn.createArrayOf("VARCHAR", s);
stmt.setArray(2, array);
stmt.execute();
conn.commit();
conn.close();
props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 40));
conn = DriverManager.getConnection(getUrl(), props);
rs = conn.createStatement().executeQuery("SELECT CAST(a AS CHAR ARRAY) FROM t");
assertTrue(rs.next());
PhoenixArray arr = (PhoenixArray)rs.getArray(1);
String[] array2 = (String[])array.getArray();
String[] array3 = (String[])arr.getArray();
assertEquals(array2[0], array3[0]);
assertEquals(array2[1], array3[1]);
conn.close();
}