Changeset: f80a57efdb45 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f80a57efdb45
Modified Files:
monetdb5/modules/kernel/algebra.mx
Branch: default
Log Message:
ALGproject{head,tail}_str gets pointer to str, so deal with it.
Why are there two implementations of algebra.project(BAT,VAL)?
Previously, the implementation in algebraExtensions was used, but that
code was moved to batExtensions and is no longer used due to the order
of the includes.
diffs (49 lines):
diff --git a/monetdb5/modules/kernel/algebra.mx
b/monetdb5/modules/kernel/algebra.mx
--- a/monetdb5/modules/kernel/algebra.mx
+++ b/monetdb5/modules/kernel/algebra.mx
@@ -1057,8 +1057,8 @@ algebra_export str ALGselectNotNil(int *
algebra_export str ALGuhashsplit(int *result, int *bid, int *nfrag);
@= project_export
-algebra_export str ALGprojecthead_@1(int *ret, @1 *val, int *bid);
-algebra_export str ALGprojecttail_@1(int *ret, int *bid, @1 *val);
+algebra_export str ALGprojecthead_@1(int *ret, void *val, int *bid);
+algebra_export str ALGprojecttail_@1(int *ret, int *bid, void *val);
@
@h
@:project_export(int)@
@@ -3616,13 +3616,16 @@ ALGprojectNIL(int *ret, int *bid)
*/
@= projectImpl
str
-ALGprojecthead_@1(int *ret, @1 *val, int *bid)
+ALGprojecthead_@1(int *ret, void *val, int *bid)
{
BAT *b, *bn;
@:getBATdescriptor(bid,b,"batcalc.project")@
b = BATmirror(b);
+#if TYPE_@1 == TYPE_str
+ val = *(str **) val;
+#endif
bn = BATconst(b, TYPE_@1, val);
bn = BATmirror(bn);
@@ -3635,12 +3638,15 @@ ALGprojecthead_@1(int *ret, @1 *val, int
return MAL_SUCCEED;
}
str
-ALGprojecttail_@1(int *ret, int *bid, @1 *val)
+ALGprojecttail_@1(int *ret, int *bid, void *val)
{
BAT *b, *bn;
@:getBATdescriptor(bid,b,"batcalc.project")@
+#if TYPE_@1 == TYPE_str
+ val = *(str **) val;
+#endif
bn = BATconst(b, TYPE_@1, val);
@:tstBAT("algebra.project")@
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list