Changeset: d292af6d71c1 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d292af6d71c1 Modified Files: monetdb5/modules/atoms/json.c Branch: json-storage Log Message:
merged default diffs (174 lines): 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 @@ -1145,7 +1145,6 @@ InstrPtr pushArgumentId(MalBlkPtr mb, In InstrPtr pushBit(MalBlkPtr mb, InstrPtr q, bit val); InstrPtr pushBte(MalBlkPtr mb, InstrPtr q, bte val); InstrPtr pushDbl(MalBlkPtr mb, InstrPtr q, dbl val); -InstrPtr pushEmptyBAT(MalBlkPtr mb, InstrPtr q, int tpe); InstrPtr pushEndInstruction(MalBlkPtr mb); InstrPtr pushFlt(MalBlkPtr mb, InstrPtr q, flt val); InstrPtr pushHge(MalBlkPtr mb, InstrPtr q, hge val); diff --git a/monetdb5/mal/mal_builder.c b/monetdb5/mal/mal_builder.c --- a/monetdb5/mal/mal_builder.c +++ b/monetdb5/mal/mal_builder.c @@ -698,20 +698,6 @@ pushZero(MalBlkPtr mb, InstrPtr q, int t } InstrPtr -pushEmptyBAT(MalBlkPtr mb, InstrPtr q, int tpe) -{ - if (q == NULL || mb->errors) - return q; - setModuleId(q, getName("bat")); - setFunctionId(q, getName("new")); - - q = pushArgument(mb, q, newTypeVariable(mb, TYPE_void)); - q = pushArgument(mb, q, newTypeVariable(mb, getBatType(tpe))); - q = pushZero(mb, q, TYPE_lng); - return q; -} - -InstrPtr pushValue(MalBlkPtr mb, InstrPtr q, ValPtr vr) { int _t; diff --git a/monetdb5/mal/mal_builder.h b/monetdb5/mal/mal_builder.h --- a/monetdb5/mal/mal_builder.h +++ b/monetdb5/mal/mal_builder.h @@ -50,7 +50,6 @@ mal_export InstrPtr pushNil(MalBlkPtr mb mal_export InstrPtr pushType(MalBlkPtr mb, InstrPtr q, int tpe); mal_export InstrPtr pushNilType(MalBlkPtr mb, InstrPtr q, char *tpe); mal_export InstrPtr pushZero(MalBlkPtr mb, InstrPtr q, int tpe); -mal_export InstrPtr pushEmptyBAT(MalBlkPtr mb, InstrPtr q, int tpe); mal_export InstrPtr pushValue(MalBlkPtr mb, InstrPtr q, ValPtr cst); mal_export int getIntConstant(MalBlkPtr mb, int val); diff --git a/monetdb5/modules/atoms/json.c b/monetdb5/modules/atoms/json.c --- a/monetdb5/modules/atoms/json.c +++ b/monetdb5/modules/atoms/json.c @@ -755,6 +755,7 @@ JSONgetValue(JSON *jt, int idx) return s; } +/* eats res and r */ static str JSONglue(str res, str r, char sep) { @@ -861,8 +862,9 @@ JSONmatch(JSON *jt, int ji, pattern *ter r = JSONgetValue(jt, jt->elm[i].child); if (r == NULL) r = (str) -1; - } else + } else { r = JSONmatch(jt, jt->elm[i].child, terms, ti + 1, terms[ti].index == INT_MAX); + } if (r == (str) -1 || r == (str) -2) { GDKfree(res); return r; @@ -872,7 +874,7 @@ JSONmatch(JSON *jt, int ji, pattern *ter } else { // Keep the last matching value if (res) GDKfree(res); - res = GDKstrdup(r); + res = r; } } cnt++; diff --git a/sql/test/bugs/Tests/groupby_having-bug-sf-947600.test b/sql/test/bugs/Tests/groupby_having-bug-sf-947600.test --- a/sql/test/bugs/Tests/groupby_having-bug-sf-947600.test +++ b/sql/test/bugs/Tests/groupby_having-bug-sf-947600.test @@ -34,6 +34,9 @@ 2 columns columns 1 +columns +sequences +9 functions args 3 @@ -51,7 +54,7 @@ objects 4 functions sequences -3 +4 idxs columns 10 @@ -100,6 +103,9 @@ 4 sequences objects 4 +sequences +sequences +3 statement error select name from tables where "type" = 10 and "system" = true diff --git a/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.test b/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.test --- a/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.test +++ b/sql/test/bugs/Tests/groupby_having_charlength-bug-sf-943566.test @@ -6,17 +6,17 @@ select s.name,char_length(s.name), count ---- json 4 -11 +12 logging 7 -11 +12 profiler 8 -11 +12 sys 3 -11 +12 tmp 3 -11 +12 diff --git a/sql/test/bugs/Tests/innerjoin_multiple-bug-sf-943661.test b/sql/test/bugs/Tests/innerjoin_multiple-bug-sf-943661.test --- a/sql/test/bugs/Tests/innerjoin_multiple-bug-sf-943661.test +++ b/sql/test/bugs/Tests/innerjoin_multiple-bug-sf-943661.test @@ -11,7 +11,7 @@ select schemas.name, tables.name, column 'objects', 'keys', 'modules', 'sequences') order by schemas.name, tables.name, columns.name ---- -366 values hashing to b2d7e870f1beebfa9cb67dbde729c602 +426 values hashing to f0d023420e53dd0beb9114710beaa71f query TTT rowsort select s.name, t.name, c.name from @@ -26,5 +26,5 @@ select s.name, t.name, c.name from 'objects', 'keys', 'modules', 'sequences') order by s.name, t.name, c.name ---- -366 values hashing to b2d7e870f1beebfa9cb67dbde729c602 +426 values hashing to f0d023420e53dd0beb9114710beaa71f diff --git a/sql/test/sys-schema/Tests/webExamplesStringFunctions.test b/sql/test/sys-schema/Tests/webExamplesStringFunctions.test --- a/sql/test/sys-schema/Tests/webExamplesStringFunctions.test +++ b/sql/test/sys-schema/Tests/webExamplesStringFunctions.test @@ -350,16 +350,6 @@ select qgramnormalize(R'Prize €50!') ---- PRIZE 50 -query R -select similarity('MonetDB', 'DB3') ----- -0.400 - -query R -select similarity('MonetDB', 'DB free') ----- -0.286 - query T select soundex('MonetDB') ---- _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org