virajjasani commented on code in PR #2226: URL: https://github.com/apache/phoenix/pull/2226#discussion_r2263278206
########## phoenix-core/src/it/java/org/apache/phoenix/end2end/OnDuplicateKey2IT.java: ########## @@ -591,8 +598,8 @@ private static void validateReturnedRowBeforeUpsert(Connection conn, String upse updateCount = resultPair.getFirst(); resultSet = resultPair.getSecond(); } - boolean isOnDuplicateKey = upsertSql.toUpperCase().contains("ON DUPLICATE KEY"); - if (conn.getAutoCommit() && isOnDuplicateKey) { + boolean isReturningRow = upsertSql.toUpperCase().contains("RETURNING *"); Review Comment: The point is these asserts are for executeAtomicUpdateReturnOldRow() only and that will always return some old row, so the logic to ensure whether the statement has `RETURNING *` is almost not useful right? If we were not asserting the results of executeAtomicUpdateReturnOldRow(), then the logic would hage surely made sense. WDYT? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org