Opened 5 years ago

Last modified 5 years ago

#2162 closed defect

Union of null values is not done correctly — at Version 1

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 (1)

comment:1 by Dimitar Misev, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.