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

ASF subversion and git services commented on OPENJPA-3050:
----------------------------------------------------------

Commit 87cd28415d29fcc96f2638951957c10db700724d in openjpa's branch 
refs/heads/OPENJPA-3050 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=87cd28415 ]

[OPENJPA-3050] Return null for arithmetic with a null operand evaluated in 
memory


> In-memory arithmetic treats NULL as 0
> -------------------------------------
>
>                 Key: OPENJPA-3050
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3050
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Richard Zowalla
>            Priority: Major
>
> When a query is evaluated in memory (for example over a candidate 
> collection), arithmetic with a NULL operand returns a number instead of NULL. 
> {{Filters.op}} treats null as 0, so {{-n.intB}} or {{0 - n.intB}} with {{intB 
> = null}} gives 0 in memory, while the database returns NULL. The same applies 
> to {{+}}, {{*}} and {{/}}, and to the in-memory bulk update path in 
> {{JDBCStoreQuery}}, which also calls {{Filters.op}}.
> Found while working on OPENJPA-3044.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
  • [jira] [Commented] (OPENJPA... ASF subversion and git services (Jira) via dev

Reply via email to