@Test
public void testRVCAllColsForTableWithSecondaryIndexBasic() throws Exception {
Connection conn = DriverManager.getConnection(getUrl());
conn.createStatement().execute("CREATE TABLE T (k VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR)");
conn.createStatement().execute("CREATE INDEX IDX ON T(v1, v2)");
PhoenixStatement stmt = conn.createStatement().unwrap(PhoenixStatement.class);
String query = "select * from t where (k, v1, v2) <= ('3', '1', '2')";
QueryPlan plan = stmt.optimizeQuery(query);
assertEquals("T", plan.getTableRef().getTable().getTableName().getString());
}