[ 
https://issues.apache.org/jira/browse/IGNITE-20524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784283#comment-17784283
 ] 

Pavel Tupitsyn commented on IGNITE-20524:
-----------------------------------------

Merged to main: b54f5bbc0c5867e72c51ad24985cdc9b3897dfb0

> Inconsistent behavior of KeyValueView.put with null value
> ---------------------------------------------------------
>
>                 Key: IGNITE-20524
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20524
>             Project: Ignite
>          Issue Type: Improvement
>          Components: thin client
>    Affects Versions: 3.0.0-beta1
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>            Priority: Critical
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> *KeyValueView.put* behavior with null value is inconsistent:
> * Interface method does not have *@Nullable* annotation on *val*
> * *KeyValueBinaryViewImpl* throws an exception when *val* is null
> * *KeyValueViewImpl* does not throw exception right away; null is allowed for 
> simple mapping (e.g. *<Long, String>*), but not allowed with POJOs 
> (<PersonKey, PersonVal>)
> This affects embedded and thin APIs equally.
> It is understood that single-column mapping allows nulls to set nullable 
> column values; however, overall situation is confusing. We can improve it in 
> 3 ways:
> # Keep existing behavior, improve javadoc
> # Always disallow null value (NOTE: makes it impossible to work with nulls in 
> 2-column simple type mapping scenario)
> # Always allow null value (set all mapped columns to null for POJO use case)



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

Reply via email to