Opened 5 years ago

Closed 5 years ago

#2162 closed defect (fixed)

Union of null values is not done correctly

Reported by: Dimitar Misev Owned by: apercov
Priority: major Milestone: 10.0
Component: qlparser Version: 9.8
Keywords: Cc: Peter Baumann
Complexity: Medium

Description (last modified by Dimitar Misev)

We have a query

select encode( (m null values [5]) + (m null values [7]), "json")
from nulltest m

which essentially does

[[1,2,3,4],[2,3,4,5],[3,4,5,6],[4,5,6,7]]  (null value 5)
+
[[1,2,3,4],[2,3,4,5],[3,4,5,6],[4,5,6,7]]  (null value 7)
=
[[2,4,6,8],[4,6,8,10],[6,8,10,12],[8,10,12,7]] (current result)

However, according to the documentation:

  • "The null value set of an operation with two input MDD objects is the union of the null sets of the input MDDs."
  • "if at least one of the operands of a cell operation is null then the overall result of this cell operation is null."

I.e. the result should be

[[2,4,6,8],[4,6,8,5],[6,8,5,12],[8,5,12,7]] (correct output)

The null value 5 of the first array is ignored currently.

Change History (3)

comment:1 by Dimitar Misev, 5 years ago

Description: modified (diff)

comment:2 by apercov, 5 years ago

Status: newaccepted

comment:3 by apercov, 5 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.