Changeset: f340d287ce45 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f340d287ce45
Modified Files:
        sql/backends/monet5/sql.c
Branch: nested
Log Message:

Fixes empty array json insert case


diffs (12 lines):

diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -6037,7 +6037,7 @@ insert_json_array(char **msg, JSON *js, 
                return -10;
        if (id == -1)
                bat_offset += composite_type_resultsize(t) - 1;
-       if (elm > 0 && BUNappend(bats[bat_offset++], &id, false) != GDK_SUCCEED)
+       if (elm >= 0 && BUNappend(bats[bat_offset++], &id, false) != 
GDK_SUCCEED)
                elm = -2;
        *BO = bat_offset;
        return (tail == 0)?elm:elm-1;//+1;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to