antonmks / Alenka

GPU database engine
Other
1.17k stars 120 forks source link

group by operation? #35

Closed sam1988 closed 11 years ago

sam1988 commented 11 years ago

how did you achieve group by operation?since if you do the group by operation segment by segment, and the final result must merge the same record? or you used some another way to achieve group by ?

antonmks commented 11 years ago

I use a combination of merge/reduce_by_key operations. You can look at merge.cu file to see how it is done.

Regards, Anton

sam1988 commented 11 years ago

the early version of merge every segment of groupby result using unordermap seems can not make sure the merge result in groupby order by gropuby multiple keys , and is the new version can make sure that the result is in order instead of put the new record just after the old record?

antonmks commented 11 years ago

This is what it does, puts the records with equal keys one after another using thrust::merge. In the end it uses reduce_by_key to combine the neighbor records with equal keys into one record.