[
https://issues.apache.org/jira/browse/IGNITE-22924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103921#comment-18103921
]
Vasily Buter edited comment on IGNITE-22924 at 8/12/26 4:26 AM:
----------------------------------------------------------------
The non-obvious behavior is that if a user writes a query with a filter by the
current value and passes {{null}} as the parameter value, the system updates
the current value to a new one or deletes the record (if no new value is
provided), even though the current value in it is not equal to {{null}} (and
cannot be).
An example of such code:
{code:java}
// Java
sql("test3", "insert into test3 (_key, _val) values (1001, 'SUNDAY')");
var cache = ignite.cache("test3");
ignite.cache("test3") .query(new SqlFieldsQuery("UPDATE test3 SET _val = ?
WHERE _key = ? AND _val = ?") .setArgs("THUESDAY", 1001L, null)) .getAll();
// Here, the record value will become THUESDAY, despite the fact that "SUNDAY"
is not equal to null.{code}
Ideally, an exception should be thrown if {{null}} is passed as the parameter
value for the record's current value. However, this improvement may be
irrelevant due to the absence of such calls from clients.
was (Author: JIRAUSER314175):
The non-obvious behavior is that if a user writes a query with a filter by the
current value and passes {{null}} as the parameter value, the system updates
the current value to a new one or deletes the record (if no new value is
provided), even though the current value in it is not equal to {{null}} (and
cannot be).
An example of such code:
{code:java}
// Java
sql("test3", "insert into test3 (_key, _val) values (1001, 'SUNDAY')");
var cache = ignite.cache("test3");
ignite.cache("test3") .query(new SqlFieldsQuery("UPDATE test3 SET _val = ?
WHERE _key = ? AND _val = ?") .setArgs("THUESDAY", 1001L, null)) .getAll();
// Here, the record value will become THUESDAY, despite the fact that "SUNDAY"
is // not equal to null.{code}
Ideally, an exception should be thrown if {{null}} is passed as the parameter
value for the record's current value. However, this improvement may be
irrelevant due to the absence of such calls from clients.
> FastUpdate#valArg is NULL
> -------------------------
>
> Key: IGNITE-22924
> URL: https://issues.apache.org/jira/browse/IGNITE-22924
> Project: Ignite
> Issue Type: Bug
> Reporter: Oleg Valuyskiy
> Priority: Minor
> Labels: ise
>
> The FastUpdate#valArg property is NULL even when there is a current value
> that is meant to be updated/deleted.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)