[
https://issues.apache.org/jira/browse/PHOENIX-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15634812#comment-15634812
]
James Taylor commented on PHOENIX-3441:
---------------------------------------
These are actual failures due to a change in behavior then. Let's file separate
JIRAs for them.
For {{MutationTest.testDurability}}, with auto commit off, no attempt should be
made to contact the server. For the DELETE statement, we generate the HBase
Delete on the client side and only send it over when a commit is done. This
sounds like a bug in our DML implementation.
{code}
private void testDurability(boolean disableWAL) throws Exception {
Connection conn = DriverManager.getConnection(getUrl());
try {
Durability expectedDurability = disableWAL ? Durability.SKIP_WAL :
Durability.USE_DEFAULT;
conn.setAutoCommit(false);
conn.createStatement().execute("CREATE TABLE t1 (k integer not null
primary key, a.k varchar, b.k varchar) " + (disableWAL ? "DISABLE_WAL=true" :
""));
conn.createStatement().execute("UPSERT INTO t1 VALUES(1,'a','b')");
conn.createStatement().execute("DELETE FROM t1 WHERE k=2");
assertDurability(conn,expectedDurability);
conn.createStatement().execute("DELETE FROM t1 WHERE k=1");
assertDurability(conn,expectedDurability);
conn.createStatement().execute("DROP TABLE t1");
} finally {
conn.close();
}
}
{code}
For {{QueryCompilerTest.testDeleteFromImmutableWithKV}}, we should get a
validation error when the DELETE statement runs, prior to attempting to send
the deleted rows to the server.
For {{PhoenixPerpareStatementTest.testMutationUsingExecuteQueryShouldFail}}, we
should get an error attempting to run a DML statement through
statement.executeQuery().
> PhoenixTableModify calls on ResultSet for unit tests
> ----------------------------------------------------
>
> Key: PHOENIX-3441
> URL: https://issues.apache.org/jira/browse/PHOENIX-3441
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Eric Lomore
>
> This is similar to PHOENIX-3394 in that rs.next() is causing unit tests to
> fail. It looks like DELETE statements end up in
> PhoenixTableModify.deleteRows() which ultimately tries to use a ResultSet,
> and hence ConnectionlessQueryServicvesImpl.getTable()
> {{conn.createStatement().execute("DELETE FROM t1 WHERE k=2")}}
> {code}
> Caused by: java.lang.UnsupportedOperationException
> at
> org.apache.phoenix.query.ConnectionlessQueryServicesImpl.getTable(ConnectionlessQueryServicesImpl.java:157)
> at
> org.apache.phoenix.query.DelegateConnectionQueryServices.getTable(DelegateConnectionQueryServices.java:70)
> at
> org.apache.phoenix.execute.MutationState.getHTable(MutationState.java:361)
> at
> org.apache.phoenix.iterate.TableResultIterator.<init>(TableResultIterator.java:101)
> at
> org.apache.phoenix.iterate.DefaultTableResultIteratorFactory.newIterator(DefaultTableResultIteratorFactory.java:33)
> at
> org.apache.phoenix.iterate.ParallelIterators.submitWork(ParallelIterators.java:104)
> at
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:860)
> ... 62 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)