Changeset: 9a2bb14e31d7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9a2bb14e31d7
Modified Files:
monetdb5/modules/mal/pp_algebra.c
Branch: pp_hashjoin
Log Message:
merged
diffs (162 lines):
diff --git a/clients/Tests/MAL-signatures-hge.test
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -48088,11 +48088,6 @@ sum_no_nil
unsafe pattern lockedaggr.sum_no_nil(X_0:any_1):bat[:any_1]
LOCKEDAGGRsum_no_nil1
sum values into bat (bat has value, update), using the bat lock
-lockedalgebra
-projection
-command lockedalgebra.projection(X_0:ptr, X_1:bat[:oid],
X_2:bat[:any_1]):bat[:any_1]
-LALGprojection
-Project left input onto right input.
lockedgroup
group
command lockedgroup.group(X_0:bat[:any_1]) (X_1:bat[:oid], X_2:bat[:oid],
X_3:bat[:lng])
diff --git a/clients/Tests/MAL-signatures.test
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -36463,11 +36463,6 @@ sum
unsafe pattern lockedaggr.sum(X_0:any_1):bat[:any_1]
LOCKEDAGGRsum1
sum values into bat (bat has value, update), using the bat lock
-lockedalgebra
-projection
-command lockedalgebra.projection(X_0:ptr, X_1:bat[:oid],
X_2:bat[:any_1]):bat[:any_1]
-LALGprojection
-Project left input onto right input.
lockedgroup
group
command lockedgroup.group(X_0:bat[:any_1]) (X_1:bat[:oid], X_2:bat[:oid],
X_3:bat[:lng])
diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -274,6 +274,8 @@ MCinitClientRecord(Client c, oid user, b
char name[MT_NAME_LEN];
snprintf(name, sizeof(name), "Client%d->s", (int) (c - mal_clients));
MT_sema_init(&c->s, 0, name);
+ snprintf(name, sizeof(name), "Client%d-errlock", (int) (c -
mal_clients));
+ MT_lock_init(&c->error_lock, name);
return c;
}
@@ -407,6 +409,7 @@ MCcloseClient(Client c)
MT_thread_set_qry_ctx(NULL);
//assert(strcmp(MT_thread_getname(), "main-thread") == 0 ||
c->qryctx.datasize == 0);
MT_sema_destroy(&c->s);
+ MT_lock_destroy(&c->error_lock);
MT_lock_set(&mal_contextLock);
c->idle = c->login = c->lastcmd = 0;
ma_destroy(c->qryctx.errorallocator);
diff --git a/monetdb5/modules/mal/pp_algebra.c
b/monetdb5/modules/mal/pp_algebra.c
--- a/monetdb5/modules/mal/pp_algebra.c
+++ b/monetdb5/modules/mal/pp_algebra.c
@@ -918,18 +918,6 @@ LOCKEDAGGRnull(Client ctx, bat *result,
return err;
}
-static str
-LALGprojection(Client ctx, bat *result, const ptr *h, const bat *lid, const
bat *rid)
-{
- Pipeline *p = (Pipeline*)*h;
- str res;
-
- pipeline_lock(p);
- res = ALGprojection(ctx, result, lid, rid);
- pipeline_unlock(p);
- return res;
-}
-
#define unique_(Type, BaseType, INIT_ALLOCATOR, INIT_ITER, NEW_VAL, HASH_VAL,
VAL_NOT_EQUAL, VAL_ASSIGN, ITER_NEXT, NEXTK) \
if (tt == TYPE_##Type) { \
int slots = 0; \
@@ -4934,7 +4922,6 @@ static mel_func pp_algebra_init_funcs[]
pattern("lockedaggr", "min", LOCKEDAGGRmin, true, "min values into bat (bat
has value, update), using the bat lock", args(1,2, sharedbatargany("", 1),
argany("val", 1))),
pattern("lockedaggr", "max", LOCKEDAGGRmax, true, "max values into bat (bat
has value, update), using the bat lock", args(1,2, sharedbatargany("", 1),
argany("val", 1))),
command("lockedaggr", "null", LOCKEDAGGRnull, true, "Returns true or false if
the input contains a NULL or not, nil if the input is empty..", args(1,2,
sharedbatarg("",bit),arg("hadnull",bit))),
- command("lockedalgebra", "projection", LALGprojection, false, "Project left
input onto right input.", args(1,4, batargany("",1), arg("pipeline", ptr),
batarg("left",oid),batargany("right",1))),
command("algebra", "unique", LALGunique, false, "Unique rows.", args(2,5,
batarg("gid", oid), batargany("",1), arg("pipeline", ptr), batargany("b",1),
batarg("s",oid))),
command("algebra", "unique", LALGgroup_unique, false, "Unique per group
rows.", args(2,6, batarg("ngid", oid), batargany("",1), arg("pipeline", ptr),
batargany("b",1), batarg("s",oid), batarg("gid",oid))),
@@ -4994,8 +4981,6 @@ static mel_func pp_algebra_init_funcs[]
command("aggr", "avg", ALGfsum, false, "Return the Kahan/Neumaier
summation.", args(3,4, arg("rsum", dbl), arg("rcom", dbl), arg("rcnt", lng),
batarg("b", dbl))),
command("aggr", "avg", ALGfsum_skipnil, false, "Return the Kahan/Neumaier
summation or nil.", args(3,5, arg("rsum", dbl), arg("rcom", dbl), arg("rcnt",
lng), batarg("b", dbl), arg("skipnil",bit))),
command("aggr", "ord_quantile", LALGquantile, false, "Return the p-th's
quantile per group, where p is between 0 and 100", args(1,4,
batargany("quantile", 1), batarg("gid", oid), batargany("i", 1), arg("p",
bte))),
- //command("aggr", "quantile", LALGquantile, false, "Return the p-th's
quantile per group, where p is between 0 and 100", args(1,5,
batargany("quantile", 1), batarg("gid", oid), batargany("i", 1),
arg("pipeline", ptr), batarg("pid", oid))),
- /* in combine we return the pth row (or avg) */
{ .imp=NULL }
};
#include "mal_import.h"
diff --git a/sql/test/copy/Tests/parse-besteffort.py
b/sql/test/copy/Tests/parse-besteffort.py
--- a/sql/test/copy/Tests/parse-besteffort.py
+++ b/sql/test/copy/Tests/parse-besteffort.py
@@ -3,7 +3,8 @@
import decimal
from decimal import Decimal
import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
from parsetest_support import setup_suite, TestCase
dec = Decimal
diff --git a/sql/test/copy/Tests/parse-decimal.py
b/sql/test/copy/Tests/parse-decimal.py
--- a/sql/test/copy/Tests/parse-decimal.py
+++ b/sql/test/copy/Tests/parse-decimal.py
@@ -3,7 +3,8 @@
import decimal
from decimal import Decimal
import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
from parsetest_support import setup_suite, TestCase
suite = setup_suite()
@@ -102,7 +103,7 @@ run_test(testcase.replace(3, '41|43x').e
# Decimal overflow
-max_digits = 38 if suite.have_hge else 19
+max_digits = 38 if suite.have_hge else 18
decprec = decimal.getcontext().prec
decimal.getcontext().prec = max_digits + 2
for d in range(1, max_digits + 1):
diff --git a/sql/test/copy/Tests/parse-integer.py
b/sql/test/copy/Tests/parse-integer.py
--- a/sql/test/copy/Tests/parse-integer.py
+++ b/sql/test/copy/Tests/parse-integer.py
@@ -3,7 +3,8 @@
import decimal
from decimal import Decimal
import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
from parsetest_support import setup_suite, TestCase
suite = setup_suite()
diff --git a/sql/test/copy/Tests/parse-misc.py
b/sql/test/copy/Tests/parse-misc.py
--- a/sql/test/copy/Tests/parse-misc.py
+++ b/sql/test/copy/Tests/parse-misc.py
@@ -3,7 +3,8 @@
import decimal
from decimal import Decimal
import sys
-
+import os
+sys.path.append(os.getenv('TSTSRCDIR'))
from parsetest_support import setup_suite, TestCase
suite = setup_suite()
diff --git a/sql/test/copy/Tests/parsetest_support.py
b/sql/test/copy/Tests/parsetest_support.py
--- a/sql/test/copy/Tests/parsetest_support.py
+++ b/sql/test/copy/Tests/parsetest_support.py
@@ -275,7 +275,7 @@ class TestSuite:
cursor = conn.cursor()
try:
cursor.execute('SELECT CAST(1 AS HUGEINT)')
- except pymonetdb.OperationError:
+ except pymonetdb.OperationalError:
self.have_hge = False
self.conn.rollback()
finally:
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]