Changeset: b5a46a7a7ac9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b5a46a7a7ac9
Modified Files:
        sql/backends/monet5/UDF/pyapi/pyloader.c
Branch: default
Log Message:

Get correct number of columns.


diffs (21 lines):

diff --git a/sql/backends/monet5/UDF/pyapi/pyloader.c 
b/sql/backends/monet5/UDF/pyapi/pyloader.c
--- a/sql/backends/monet5/UDF/pyapi/pyloader.c
+++ b/sql/backends/monet5/UDF/pyapi/pyloader.c
@@ -162,7 +162,7 @@ PYFUNCNAME(PyAPIevalLoader)(Client cntxt
        if (sqlmorefun->colnames) {
                n = sqlmorefun->colnames->h;
                n2 = sqlmorefun->coltypes->h;
-               ncols = pyapi_list_length(sqlmorefun->colnames);
+               ncols = pyapi_list_length(sqlmorefun->coltypes);
                if (ncols == 0) {
                        msg = createException(MAL, "pyapi.eval_loader",
                                                                  "No columns 
supplied.");
@@ -174,7 +174,7 @@ PYFUNCNAME(PyAPIevalLoader)(Client cntxt
                                                                  
SQLSTATE(HY001) MAL_MALLOC_FAIL "column list");
                        goto wrapup;
                }
-               assert(pyapi_list_length(sqlmorefun->colnames) == 
pyapi_list_length(sqlmorefun->coltypes));
+               assert(pyapi_list_length(sqlmorefun->colnames) == 
pyapi_list_length(sqlmorefun->coltypes) * 2);
                i = 0;
                while (n) {
                        sql_subtype* tpe = (sql_subtype*) n2->data;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to