Viraj Jasani created PHOENIX-7648:
-------------------------------------
Summary: Introduce new Atomic Operation - ON DUPLICATE KEY
UPDATE_ONLY
Key: PHOENIX-7648
URL: https://issues.apache.org/jira/browse/PHOENIX-7648
Project: Phoenix
Issue Type: New Feature
Reporter: Viraj Jasani
Phoenix provides two types of Atomic Update operations: ON DUPLICATE KEY IGNORE
and ON DUPLICATE KEY UPDATE.
The purpose of ON DUPLICATE KEY IGNORE is to perform the insertion of new row
i.e. if the row does not exist, add the row, else ignore the update operation.
The purpose of ON DUPLICATE KEY UPDATE is to provide atomic update based on the
expressions provided on the various non-pk columns. For the conditional updates
that include CASE expression, the atomic update goes through successfully only
if the condition is satisfied on the row.
However, if the row does not already exist, ON DUPLICATE KEY UPDATE performs
the insertion anyways regardless of the condition provided. There are valid use
cases that consider the absence of the row as condition not being satisfied
i.e. if the row does not exist, the condition provided with CASE statement is
not satisfied anyways.
Therefore, the purpose of this Jira is to introduce new type of atomic update
operation with statement ON DUPLICATE KEY UPDATE_ONLY, that performs the
condition evaluation similar to ON DUPLICATE KEY UPDATE, however if the row
does not exist, UPDATE_ONLY is not expected to perform any insertion.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)