Changeset: 7f5da9aa9136 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f5da9aa9136
Modified Files:
        monetdb5/modules/mal/mal_weld.c
Branch: mal-weld
Log Message:

weld.group - don't compute the counts and the ids at the same times, the counts 
might not be used


diffs (34 lines):

diff --git a/monetdb5/modules/mal/mal_weld.c b/monetdb5/modules/mal/mal_weld.c
--- a/monetdb5/modules/mal/mal_weld.c
+++ b/monetdb5/modules/mal/mal_weld.c
@@ -932,13 +932,17 @@ WeldGroup(Client cntxt, MalBlkPtr mb, Ma
        "               merge(b, 0L)"
        "       )"
        ");"
-       "let idsAndCounts = for(zip(%s), {appender[i64], vecmerger[i64, 
+](empty)}, |b, i, n|"
+       "let ids = for(zip(%s), appender[i64], |b, i, n|"
        "       let groupId = lookup(groupIdsDict, %s);"
-       "       {merge(b.$0, groupId), merge(b.$1, {groupId, 1L})}"
+       "       merge(b, groupId)"
        ");"
-       "let v%d = result(idsAndCounts.$0);"
+       "let counts = for(zip(%s), vecmerger[i64, +](empty), |b, i, n|"
+       "       let groupId = lookup(groupIdsDict, %s);"
+       "       merge(b, {groupId, 1L})"
+       ");"
+       "let v%d = result(ids);"
        "let v%dhseqbase = 0;"
-       "let v%d = result(idsAndCounts.$1);"
+       "let v%d = result(counts);"
        "let v%dhseqbase = 0;"
        "let v%d = result("
        "       for(groupHashVec, vecmerger[i64, +](empty), |b, i, n|"
@@ -946,7 +950,7 @@ WeldGroup(Client cntxt, MalBlkPtr mb, Ma
        "       )"
        ");"
        "let v%dhseqbase = 0;",
-       zipStmt, dictTypeStmt, dictKeyStmt, dictTypeStmt, zipStmt, dictKeyStmt, 
groups, groups, histo, histo,
+       zipStmt, dictTypeStmt, dictKeyStmt, dictTypeStmt, zipStmt, dictKeyStmt, 
zipStmt, dictKeyStmt, groups, groups, histo, histo,
        extents, extents);
        appendWeldStmt(wstate, weldStmt);
        return MAL_SUCCEED;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to