Changeset: 5839828dc891 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5839828dc891
Modified Files:
        sql/backends/monet5/UDF/udf.c
Branch: default
Log Message:

UDF: added extra type check


diffs (16 lines):

diff --git a/sql/backends/monet5/UDF/udf.c b/sql/backends/monet5/UDF/udf.c
--- a/sql/backends/monet5/UDF/udf.c
+++ b/sql/backends/monet5/UDF/udf.c
@@ -77,6 +77,12 @@ str UDFBATreverse ( bat *ret , bat *bid 
        if ((left = BATdescriptor(*bid)) == NULL)
                throw(MAL, "batudf.reverse", RUNTIME_OBJECT_MISSING);
 
+       /* check tail type */
+       if (left->ttype != TYPE_str) {
+               BBPreleaseref(left->batCacheid);
+               throw(MAL, "batudf.reverse", "tail-type of input BAT must be 
TYPE_str");
+       }
+
        /* allocate result BAT */
        bn = BATnew(left->htype, TYPE_str, BATcount(left));
        if (bn == NULL) {
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to