You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2023/02/23 08:45:00 UTC

[jira] [Created] (IGNITE-18883) Bug. Potentially incorrect definition of rows to insert for MERGE

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)