#include #include "./server/libaquery.h" #include "./server/hasher.h" #include "./server/aggregations.h" #include "csv.h" extern "C" int __DLLEXPORT__ dllmain(Context* cxt) { using namespace std; using namespace types; auto test = new TableInfo("test", 4); cxt->tables.insert({"test", test}); auto& test_a = *(ColRef *)(&test->colrefs[0]); auto& test_b = *(ColRef *)(&test->colrefs[1]); auto& test_c = *(ColRef *)(&test->colrefs[2]); auto& test_d = *(ColRef *)(&test->colrefs[3]); test_a.init(); test_b.init(); test_c.init(); test_d.init(); io::CSVReader<4> csv_reader_4bTMJ9("test.csv"); csv_reader_4bTMJ9.read_header(io::ignore_extra_column, "a","b","c","d"); int tmp_78E1nhZJ; int tmp_4wnHGd9t; int tmp_5OL9GlRp; int tmp_155GVQC6; while(csv_reader_4bTMJ9.read_row(tmp_78E1nhZJ,tmp_4wnHGd9t,tmp_5OL9GlRp,tmp_155GVQC6)) { test_a.emplace_back(tmp_78E1nhZJ); test_b.emplace_back(tmp_4wnHGd9t); test_c.emplace_back(tmp_5OL9GlRp); test_d.emplace_back(tmp_155GVQC6); } typedef record record_type6jn8Y49; unordered_map, transTypes> g5gn6KEb; for (uint32_t i3V = 0; i3V < test_a.size; ++i3V){ g5gn6KEb[forward_as_tuple(test_a[i3V],test_b[i3V],test_d[i3V])].emplace_back(i3V); } auto out_4DCN = new TableInfo,value_type>,value_type>>("out_4DCN", 3); cxt->tables.insert({"out_4DCN", out_4DCN}); auto& out_4DCN_sumtestc = *(ColRef> *)(&out_4DCN->colrefs[0]); auto& out_4DCN_b = *(ColRef>> *)(&out_4DCN->colrefs[1]); auto& out_4DCN_d = *(ColRef>> *)(&out_4DCN->colrefs[2]); auto lineage = test->bind(out_4DCN); out_4DCN_sumtestc.init(); out_4DCN_b.init(); out_4DCN_d.init(); for(auto& i1s : g5gn6KEb) { auto &key_4Q0aEyH = i1s.first; auto &val_7BUMR6d = i1s.second; out_4DCN_sumtestc.emplace_back(sum(test_c[val_7BUMR6d])); out_4DCN_b.emplace_back(get<1>(key_4Q0aEyH)); out_4DCN_d.emplace_back(get<2>(key_4Q0aEyH)); lineage.emplace_back(val_7BUMR6d[0]); } print(lineage.rid); auto d6X0PMzl = out_4DCN->order_by_view<-3,1>(); print(d6X0PMzl); return 0; }