#2067 closed defect (fixed)
min/max do not consider null values properly
Reported by: | Dimitar Misev | Owned by: | ahambasan |
---|---|---|---|
Priority: | major | Milestone: | 9.8 |
Component: | qlparser | Version: | 9.7 |
Keywords: | Cc: | Vlad Merticariu | |
Complexity: | Medium |
Description
The attached test script produces the following output:
N = NULL = 10 ------------------------------------------------------- case 1 - area [0:0, 0:9]: slice 1: [N,N,N,N,N,1,1,1,1,1] slice 2: [ , , , , , , , , , ],2,2,2,2,2,2,2,2,2,2 max of slice 1 and 2: 10,10,10,10,10,10,10,10,10,10 min of slice 1 and 2: 10,10,10,10,10, 1, 1, 1, 1, 1 + of slice 1 and 2: 10,10,10,10,10,10,10,10,10,10 ------------------------------------------------------- case 2 - area [0:0, 0:9]: slice 1: [N,N,N,N,N,1,1,1,1,1] slice 2: [ , , ,3,3,3,3,3, , ],2,2,2,2,2,2,2,2,2,2 max of slice 1 and 2: 0,0,0,10,10,3,3,3,0,0 min of slice 1 and 2: 0,0,0, 3, 3,1,1,1,0,0 + of slice 1 and 2: 0,0,0,10,10,4,4,4,0,0 ------------------------------------------------------- case 3 - area [0:0, 2:11]: slice 1: N,N,[N,N,N,1,1,1,1,1, , ] slice 2: , ,[ ,3,3,3,3,3, , ,2,2],2,2,2,2,2,2,2,2 max of slice 1 and 2: 0,10,10,3,3,3,0,0,0,0 min of slice 1 and 2: 0, 3, 3,1,1,1,0,0,0,0 + of slice 1 and 2: 0,10,10,4,4,4,0,0,0,0
Both max and min should produce the same results when one of the operands is null, more particularly "if at least one of the operands of a cell operation is null then the overall result of this cell operation is null" (cf. documentation). However, in all cases above the null values seem to be treated as normal values, so min and max are different when a null value is present.
Attachments (1)
Change History (3)
by , 6 years ago
Attachment: | reproduce.sh added |
---|
comment:1 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 6 years ago
N = NULL = 10 ------------------------------------------------------- case 1 - area [0:0, 0:9]: slice 1: [N,N,N,N,N,1,1,1,1,1] slice 2: [ , , , , , , , , , ],2,2,2,2,2,2,2,2,2,2 max of slice 1 and 2: 10,10,10,10,10,10,10,10,10,10 min of slice 1 and 2: 10,10,10,10,10,10,10,10,10,10 + of slice 1 and 2: 10,10,10,10,10,10,10,10,10,10 ------------------------------------------------------- case 2 - area [0:0, 0:9]: slice 1: [N,N,N,N,N,1,1,1,1,1] slice 2: [ , , ,3,3,3,3,3, , ],2,2,2,2,2,2,2,2,2,2 max of slice 1 and 2: 0,0,0,10,10,3,3,3,0,0 min of slice 1 and 2: 0,0,0,10,10,1,1,1,0,0 + of slice 1 and 2: 0,0,0,10,10,4,4,4,0,0 ------------------------------------------------------- case 3 - area [0:0, 2:11]: slice 1: N,N,[N,N,N,1,1,1,1,1, , ] slice 2: , ,[ ,3,3,3,3,3, , ,2,2],2,2,2,2,2,2,2,2 max of slice 1 and 2: 0,10,10,3,3,3,0,0,0,0 min of slice 1 and 2: 0,10,10,1,1,1,0,0,0,0 + of slice 1 and 2: 0,10,10,4,4,4,0,0,0,0
Note:
See TracTickets
for help on using tickets.
Just to confirm, can you post the output of the script now with the patch applied?