X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fhfta%2Fgroupby_operator.h;h=2d2dc8448db6c189d986e17ddbfe5093cf0ade51;hb=989d19428b3d21982b048cf256f625a8ca664c2e;hp=e831bc0503e8ed89f08b5cc31915afbc9a3494ca;hpb=dec9c93423775db0f4783a93145f016d5d780ffd;p=com%2Fgs-lite.git diff --git a/include/hfta/groupby_operator.h b/include/hfta/groupby_operator.h index e831bc0..2d2dc84 100644 --- a/include/hfta/groupby_operator.h +++ b/include/hfta/groupby_operator.h @@ -47,7 +47,7 @@ public: group grp; if (!func.create_group(tup, (gs_sp_t)&grp)) { if(func.disordered()){ - fprintf(stderr,"Out of order record in %s\n",op_name); + // fprintf(stderr,"Out of order record in %s\n",op_name); return 0; } if (func.flush_needed()){ @@ -64,7 +64,7 @@ public: return 0; } if(func.disordered()){ - fprintf(stderr,"Out of order record in %s\n",op_name); + // fprintf(stderr,"Out of order record in %s\n",op_name); return 0; } @@ -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