Changeset: 3a20eb00a151 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3a20eb00a151
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
monetdb5/mal/mal_namespace.h
monetdb5/modules/mal/pp_algebra.c
sql/backends/monet5/bin_partition_by_slice.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/rel_pphash.c
sql/backends/monet5/rel_pptopn.c
sql/backends/monet5/sql_pp_statement.c
sql/backends/monet5/sql_pp_statement.h
Branch: pp_hashjoin
Log Message:
removed 'pipeline ptr' from ialgebra.{project,projection} functions
diffs (truncated from 717 to 300 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
@@ -3684,11 +3684,6 @@ pattern algebra.project(X_0:bat[:any_1],
ALGprojecttail
Fill the tail with a constant
algebra
-project
-pattern algebra.project(X_0:bat[:oid], X_1:any_1, X_2:ptr):bat[:any_1]
-LALGconstant
-Project a single value
-algebra
projection
command algebra.projection(X_0:bat[:oid], X_1:bat[:any_1]):bat[:any_1]
ALGprojection
@@ -3699,11 +3694,6 @@ command algebra.projection(X_0:bat[:oid]
ALGprojection2
Project left input onto right inputs which should be consecutive.
algebra
-projection
-command algebra.projection(X_0:bat[:oid], X_1:bat[:any_1], X_2:ptr):bat[:any_1]
-LALGproject
-Project.
-algebra
projectionpath
pattern algebra.projectionpath(X_0:bat[:any]...):bat[:any]
ALGprojectionpath
@@ -48493,6 +48483,16 @@ sum
command iaggr.sum(X_0:bat[:flt], X_1:bit) (X_2:flt, X_3:flt, X_4:lng)
IALGfsum_skipnil_flt
Return the Kahan/Neumaier summation or nil.
+ialgebra
+project
+pattern ialgebra.project(X_0:bat[:oid], X_1:any_1):bat[:any_1]
+LALGconstant
+Project a single value
+ialgebra
+projection
+command ialgebra.projection(X_0:bat[:oid], X_1:bat[:any_1]):bat[:any_1]
+LALGproject
+Project.
igroup
group
command igroup.group(X_0:bat[:oid], X_1:bat[:any_2], X_2:bat[:any_1])
(X_3:bat[:oid], X_4:bat[:any_1])
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
@@ -3124,11 +3124,6 @@ pattern algebra.project(X_0:bat[:any_1],
ALGprojecttail
Fill the tail with a constant
algebra
-project
-pattern algebra.project(X_0:bat[:oid], X_1:any_1, X_2:ptr):bat[:any_1]
-LALGconstant
-Project a single value
-algebra
projection
command algebra.projection(X_0:bat[:oid], X_1:bat[:any_1]):bat[:any_1]
ALGprojection
@@ -3139,11 +3134,6 @@ command algebra.projection(X_0:bat[:oid]
ALGprojection2
Project left input onto right inputs which should be consecutive.
algebra
-projection
-command algebra.projection(X_0:bat[:oid], X_1:bat[:any_1], X_2:ptr):bat[:any_1]
-LALGproject
-Project.
-algebra
projectionpath
pattern algebra.projectionpath(X_0:bat[:any]...):bat[:any]
ALGprojectionpath
@@ -36733,6 +36723,16 @@ sum
command iaggr.sum(X_0:bat[:flt], X_1:bit) (X_2:flt, X_3:flt, X_4:lng)
IALGfsum_skipnil_flt
Return the Kahan/Neumaier summation or nil.
+ialgebra
+project
+pattern ialgebra.project(X_0:bat[:oid], X_1:any_1):bat[:any_1]
+LALGconstant
+Project a single value
+ialgebra
+projection
+command ialgebra.projection(X_0:bat[:oid], X_1:bat[:any_1]):bat[:any_1]
+LALGproject
+Project.
igroup
group
command igroup.group(X_0:bat[:oid], X_1:bat[:any_2], X_2:bat[:any_1])
(X_3:bat[:oid], X_4:bat[:any_1])
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1025,6 +1025,7 @@ const char groupedfirstnRef[];
const char growRef[];
int hasSideEffects(MalBlkPtr mb, InstrPtr p, int strict);
const char hgeRef[];
+const char ialgebraRef[];
const char identityRef[];
const char ifthenelseRef[];
const char igroupRef[];
diff --git a/monetdb5/mal/mal_namespace.h b/monetdb5/mal/mal_namespace.h
--- a/monetdb5/mal/mal_namespace.h
+++ b/monetdb5/mal/mal_namespace.h
@@ -120,6 +120,7 @@
FUNC(groupedfirstn); \
FUNC(grow); \
FUNC(hge); \
+ FUNC(ialgebra); \
FUNC(identity); \
FUNC(ifthenelse); \
FUNC(igroup); \
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
@@ -456,7 +456,7 @@ mulmod(lng a, lng b, lng c)
(x1 > GDK_lng_max / N1 || x1 <
-GDK_lng_max / N1)) || \
(N2 != 0 &&
\
(x2 > GDK_lng_max / N2 || x2 <
-GDK_lng_max / N2))) { \
- err = createException(SQL, "aggr.avg",
\
+ err = createException(SQL,
"lockedaggr.avg", \
SQLSTATE(22003) "overflow in
calculation"); \
goto error;
\
}
\
@@ -601,7 +601,7 @@ LOCKEDAGGRsum_avg(Client cntxt, MalBlkPt
lng n2 = *(lng*)Tloc(c, 0);
avg_aggr_float_comb(flt, a1, r1, n1, a2, r2,
n2);
if (overflow || isinf(a1) || (!n1 &&
isnan(a1))) {
- err = createException(SQL, "pp
aggr.avg", "Overflow in avg()");
+ err = createException(SQL,
"lockedaggr.avg", "Overflow in avg()");
goto error;
}
*(flt*)Tloc(b, 0) = a2;
@@ -619,7 +619,7 @@ LOCKEDAGGRsum_avg(Client cntxt, MalBlkPt
lng n2 = *(lng*)Tloc(c, 0);
avg_aggr_float_comb(dbl, a1, r1, n1, a2, r2,
n2);
if (overflow || isinf(a1) || (!n1 &&
isnan(a1))) {
- err = createException(SQL, "pp
aggr.avg", "Overflow in avg()");
+ err = createException(SQL,
"lockedaggr.avg", "Overflow in avg()");
goto error;
}
*(dbl*)Tloc(b, 0) = a2;
@@ -1624,32 +1624,29 @@ LALGgroup(Client ctx, bat *rid, bat *uid
b = BATdescriptor(*bid);
if (!b)
- return createException(MAL, "pp group.group", SQLSTATE(HY002)
RUNTIME_OBJECT_MISSING);
+ return createException(MAL, "igroup.group", SQLSTATE(HY002)
RUNTIME_OBJECT_MISSING);
if (private) { /* TODO ... create but how big ??? */
u = COLnew(b->hseqbase, b->ttype?b->ttype:TYPE_oid, 0,
TRANSIENT);
if (!u) {
- err = createException(MAL, "pp group.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
}
u->pl_io = (struct
pipeline_io*)ht_create(b->ttype?b->ttype:TYPE_oid, 1, NULL);
if (u->pl_io == NULL) {
- err = createException(MAL, "pp group.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
}
u->tprivate_bat = 1;
} else {
u = BATdescriptor(*uid);
if (!u) {
- err = createException(MAL, "pp group.group",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
+ err = createException(MAL, "igroup.group",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
goto error;
}
}
private = u->tprivate_bat;
- //assert(is_bat_nil(*sid)); /* no cands jet */
- //(void)sid;
-
hash_table *h = (hash_table*)u->pl_io;
assert(h && h->pl_io.type == PIPELINE_IO_HASH_TABLE);
MT_lock_set(&u->theaplock);
@@ -1665,7 +1662,7 @@ LALGgroup(Client ctx, bat *rid, bat *uid
h->allocators =
(allocator**)GDKzalloc(p->p->nr_workers*sizeof(allocator*));
if (!h->allocators) {
pipeline_unlock(p);
- err = createException(MAL, "pp group.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
} else
h->nr_allocators = p->p->nr_workers;
@@ -1677,7 +1674,7 @@ LALGgroup(Client ctx, bat *rid, bat *uid
snprintf(name, sizeof(name), "pp%d", p->wid);
h->allocators[p->wid] = create_allocator(name, false);
if (!h->allocators[p->wid]) {
- err = createException(MAL, "pp group.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
}
}
@@ -1695,7 +1692,7 @@ LALGgroup(Client ctx, bat *rid, bat *uid
ATOMIC_BASE_TYPE expected = 0;
BAT *g = COLnew(b->hseqbase, TYPE_oid, cnt, TRANSIENT);
if (g == NULL) {
- err = createException(MAL, "pp group.group",
MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group",
MAL_MALLOC_FAIL);
goto error;
}
if (cnt && !err) {
@@ -1730,7 +1727,7 @@ LALGgroup(Client ctx, bat *rid, bat *uid
afgroup()
}
ht_deactivate(h);
- TIMEOUT_CHECK(qry_ctx, err = createException(SQL, "pp
group.group", RUNTIME_QRY_TIMEOUT));
+ TIMEOUT_CHECK(qry_ctx, err = createException(SQL,
"igroup.group", RUNTIME_QRY_TIMEOUT));
}
if (err || p->p->status) {
BBPunfix(g->batCacheid);
@@ -1738,7 +1735,7 @@ LALGgroup(Client ctx, bat *rid, bat *uid
* p->p->status doesn't carry much info. yet.
*/
if (!err)
- err = createException(MAL, "pp group.group",
"pipeline execution error");
+ err = createException(MAL, "igroup.group",
"pipeline execution error");
goto error;
}
BATsetcount(g, cnt);
@@ -1909,26 +1906,26 @@ LALGderive(Client ctx, bat *rid, bat *ui
BAT *b = BATdescriptor(*bid);
BAT *G = BATdescriptor(*Gid);
if (b == NULL || G == NULL) {
- err = createException(MAL, "pp group.group(derive)",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
+ err = createException(MAL, "igroup.group(derive)",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
goto error;
}
if (private) { /* TODO ... create but how big ??? */
BAT *H = BATdescriptor(*Ph);
if (!H) {
- err = createException(MAL, "pp group.group(derive)",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
+ err = createException(MAL, "igroup.group(derive)",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
goto error;
}
u = COLnew(b->hseqbase, b->ttype?b->ttype:TYPE_oid, 0,
TRANSIENT);
if (!u) {
BBPunfix(H->batCacheid);
- err = createException(MAL, "pp group.group(derive)",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group(derive)",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
}
/* Lookup parent hash */
u->pl_io = (struct
pipeline_io*)ht_create(b->ttype?b->ttype:TYPE_oid, 1, (hash_table*)H->pl_io);
if (u->pl_io == NULL) {
BBPunfix(H->batCacheid);
- err = createException(MAL, "pp group.group(derive)",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group(derive)",
SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
}
u->tprivate_bat = 1;
@@ -1936,13 +1933,11 @@ LALGderive(Client ctx, bat *rid, bat *ui
} else {
u = BATdescriptor(*uid);
if (!u) {
- err = createException(MAL, "pp group.group(derive)",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
+ err = createException(MAL, "igroup.group(derive)",
SQLSTATE(HY002) RUNTIME_OBJECT_MISSING);
goto error;
}
}
private = u->tprivate_bat;
- //assert(is_bat_nil(*sid)); /* no cands jet */
- //(void)sid;
hash_table *h = (hash_table*)u->pl_io;
assert(h && h->pl_io.type == PIPELINE_IO_HASH_TABLE);
@@ -1959,7 +1954,7 @@ LALGderive(Client ctx, bat *rid, bat *ui
h->allocators =
(allocator**)GDKzalloc(p->p->nr_workers*sizeof(allocator*));
if (!h->allocators) {
pipeline_unlock(p);
- err = createException(MAL, "pp
group.group(derive)", SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL,
"igroup.group(derive)", SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
} else
h->nr_allocators = p->p->nr_workers;
@@ -1971,7 +1966,7 @@ LALGderive(Client ctx, bat *rid, bat *ui
snprintf(name, sizeof(name), "pp%d", p->wid);
h->allocators[p->wid] = create_allocator(name, false);
if (!h->allocators[p->wid]) {
- err = createException(MAL, "pp
group.group(derive)", SQLSTATE(HY013) MAL_MALLOC_FAIL);
+ err = createException(MAL,
"igroup.group(derive)", SQLSTATE(HY013) MAL_MALLOC_FAIL);
goto error;
}
}
@@ -1990,7 +1985,7 @@ LALGderive(Client ctx, bat *rid, bat *ui
ATOMIC_BASE_TYPE expected = 0;
BAT *g = COLnew(b->hseqbase, TYPE_oid, cnt, TRANSIENT);
if (g == NULL) {
- err = createException(MAL, "pp group.group(derive)",
MAL_MALLOC_FAIL);
+ err = createException(MAL, "igroup.group(derive)",
MAL_MALLOC_FAIL);
goto error;
}
if (cnt && !err) {
@@ -2025,10 +2020,10 @@ LALGderive(Client ctx, bat *rid, bat *ui
aderive(str)
}
} else {
- err = createException(MAL, "pp group.derive",
"Type (%s) not handled yet\n", ATOMname(tt));
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]