X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fhfta%2Fgroupby_operator.h;h=6085907590bbbb10e85edf9f6263f8aeda096a09;hb=refs%2Fchanges%2F56%2F4756%2F1;hp=e831bc0503e8ed89f08b5cc31915afbc9a3494ca;hpb=5a4f9d3d8846452b1b99302d03368565863df62a;p=com%2Fgs-lite.git diff --git a/include/hfta/groupby_operator.h b/include/hfta/groupby_operator.h index e831bc0..6085907 100644 --- a/include/hfta/groupby_operator.h +++ b/include/hfta/groupby_operator.h @@ -77,21 +77,21 @@ public: flush_old(result); } if(n_patterns <= 1){ - aggregate aggr; + char aggr_buffer[sizeof(aggregate)]; // create an aggregate in preallocated buffer - func.create_aggregate(tup, (char*)&aggr); + func.create_aggregate(tup, aggr_buffer); // neeed operator= doing a deep copy - group_table.insert(grp, aggr); + group_table.insert(grp, (*(aggregate*)aggr_buffer)); }else{ int p; // TODO this code is wrong, must check if each pattern is in the group table. for(p=0;p