Opened 15 years ago

Closed 11 years ago

#16 closed defect (fixed)

condense count

Reported by: j.yu@… Owned by: Jinsongdi Yu
Priority: minor Milestone: 8.4
Component: manuals_and_examples Version: 8.0
Keywords: Cc:
Complexity: Medium

Description

select condense + over x in sdom(a) where a[x] using 1 from mr as a — for cell count is not correct, get from ql-guide 9.6
should be
select condense + over x in sdom(a) where (bool)a[x] using 1 from mr as a
but if a[x]=0 the result is not correct either,
so
select condense + over x in sdom(a) where (bool)((bool)a[x]+1) using 1 from mr as a
could be a solution

Change History (6)

comment:1 by Peter Baumann, 14 years ago

Priority: majorminor

comment:2 by Dimitar Misev, 12 years ago

Component: qlparsermanuals_and_examples
Owner: set to Peter Baumann

comment:3 by Peter Baumann, 11 years ago

Owner: changed from Peter Baumann to Jinsongdi Yu
Status: newassigned

comment:4 by Peter Baumann, 11 years ago

Milestone: Future8.4

hm, count_cells() should count all non-zero cells, right?
So this should do:

select condense + over x in sdom(a) where a[x]!=0 using 1
from mr as a

or

select condense + over x in sdom(a) using a[x]!=0
from mr as a

Please let me know what to write.

comment:5 by Dimitar Misev, 11 years ago

First one is right, the second results in a boolean (true)..

comment:6 by Peter Baumann, 11 years ago

Resolution: fixed
Status: assignedclosed

fixed with documentation 8.4.

Note: See TracTickets for help on using tickets.