Hi, I have implemented HBase's checkAndPut like functionality for Apache Phoenix, based on the comments on PHOENIX-6 (https://issues.apache.org/jira/browse/PHOENIX-6). The Upsert statement is modified to support compare clause, which allows us to pass in an expression. The expression is evaluated against the current record and Upsert is only performed when the expression evaluates to true. This enables conditional updates to the records. I have listed some examples on the github fork here https://github.com/babartareen/phoenix.
I would appreciate your feedback and am hopping that this change could be merged back into the Apache Phoenix project. Thanks, Babar
