Konstantin Orlov created IGNITE-18883:
-----------------------------------------

             Summary: Bug. Potentially incorrect definition of rows to insert 
for MERGE
                 Key: IGNITE-18883
                 URL: https://issues.apache.org/jira/browse/IGNITE-18883
             Project: Ignite
          Issue Type: Bug
          Components: sql
            Reporter: Konstantin Orlov


Currently we decide whether to insert row or to update row by taking a look at 
value at updateOffset. The problem here is that NULL can be a legit value, but 
we incorrectly put this row to insert collection:
{code:java}
// ModifyNode#splitMerge
private Pair<List<RowT>, List<RowT>> splitMerge(List<RowT> rows) {
        ...
        if (!hasUpsertSemantic) {
           ...
        } else {
            ...
            for (RowT row : rows) {
                if (handler.get(updateColumnOffset, row) == null) {
                    rowsToInsert.add(row);
                } else {
                    rowsToUpdate.add(row);
                }
            }
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to