You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2024/07/26 08:31:00 UTC

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

     [ https://issues.apache.org/jira/browse/IGNITE-18883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maksim Zhuravkov reassigned IGNITE-18883:
-----------------------------------------

    Assignee: Maksim Zhuravkov

> 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
>            Assignee: Maksim Zhuravkov
>            Priority: Major
>              Labels: ignite-3
>
> 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)