aggregate function in MAL

Scott Mathieson scott.mathieson at pb.com
Fri Jul 5 16:55:32 CEST 2013


Further investigation shows that the aggregate works as expected when running on a single threaded server.
Seems to me that I'm missing something in a multi-threaded server that I can use to link the 'g' entries to their actual data OIDs i.e. the links should be

'e'           ->            'g'           ->            ?              ->            'b'

Where '?' is a BAT with the subgroups OIDs to data OIDs

Is there any other MAL functions that I can use to get access to this BAT?

Regards,

Scott


From: users-list [mailto:users-list-bounces+scott.mathieson=pb.com at monetdb.org] On Behalf Of Scott Mathieson
Sent: 05 July 2013 14:00
To: Communication channel for MonetDB users
Subject: RE: aggregate function in MAL


Hi Stefan,



Thanks for your help, however I'm still seeing the same issue with your suggested changes - the 'g'  BAT only contains 4 rows (2 groups x 2 threads) and the 'b' BAT contains the 249k rows which is the size of the data table - I was assuming that either the 'g' and 'b' BATs are the same size or that there is some form of indexing of 'g' to 'b'.



The aggregation I'm testing is this:



select "Gender", bin_samp("CustomerAge"), count(*) from "Customers" group by "Gender";



and the result I get is:



+--------+----------+--------+

| Gender | L1       | L2     |

+========+==========+========+

| Female | 12||12|| | 106024 |

| Male   | 12||50|| | 143703 |

+--------+----------+--------+



I would have expected the bin_samp aggregate to have returned strings of 1000 values pipe delimited per Gender value rather than only 2 values - I'm assuming something is wrong in the mapping of 'g' to 'b' entries



The 'g' bat look like this:



#-----------------#

# h     t         # name

# void  oid       # type

#-----------------#

[ 0 at 0,    0 at 0     ]

[ 1 at 0,    1 at 0     ]

[ 2 at 0,    0 at 0     ]

[ 3 at 0,    1 at 0     ]



And the 'b' bat is:



#-------------------------#

# h             t         # name

# void          int       # type

#-------------------------#

[ 0 at 0,            12      ]

[ 1 at 0,            12      ]

[ 2 at 0,            12      ]

[ 3 at 0,            50      ]

[ 4 at 0,            56      ]

[ 5 at 0,            12      ]

[ 6 at 0,            12      ]

[ 7 at 0,            34      ]

[ 8 at 0,            12      ]

[ 9 at 0,            12      ]

... continues to @249727 at 0





Kind reagards,





Scott Mathieson



________________________________


________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/users-list/attachments/20130705/9b1833c1/attachment.html>


More information about the users-list mailing list