Changeset: b0da96943c54 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/b0da96943c54 Modified Files: clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test clients/Tests/exports.stable.out monetdb5/mal/mal_dataflow.c monetdb5/modules/mal/CMakeLists.txt monetdb5/optimizer/optimizer.c sql/backends/monet5/sql_optimizer.c Branch: simplify_scenario Log Message:
merged with default diffs (truncated from 1575 to 300 lines): diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -33395,12 +33395,12 @@ PCREreplacefirst_bat_wrap; (empty) batpyapi3 eval -unsafe pattern batpyapi3.eval(X_0:lng, X_1:ptr, X_2:str):any... +unsafe pattern batpyapi3.eval(X_0:lng, X_1:ptr, X_2:str):bat[:any_1] PYAPI3PyAPIevalStd; Execute a simple Python script value batpyapi3 eval -unsafe pattern batpyapi3.eval(X_0:ptr, X_1:str, X_2:any...):any... +unsafe pattern batpyapi3.eval(X_0:ptr, X_1:str, X_2:any...):bat[:any]... PYAPI3PyAPIevalStd; Execute a simple Python script value batpyapi3 @@ -46739,11 +46739,6 @@ pattern json.renderobject(X_0:any...):js JSONrenderobject; (empty) json -resultSet -command json.resultSet(X_0:bat[:uuid], X_1:bat[:lng], X_2:bat[:json]):json -JSONresultSet; -Converts the json store into a single json string: -json str command json.str(X_0:json):str JSONjson2str; @@ -48239,26 +48234,6 @@ pattern optimizer.inline(X_0:str, X_1:st OPTwrapper; Expand inline functions optimizer -jit -pattern optimizer.jit():str -OPTwrapper; -(empty) -optimizer -jit -pattern optimizer.jit(X_0:str, X_1:str):str -OPTwrapper; -Propagate candidate lists in just-in-time optimization -optimizer -json -pattern optimizer.json():str -OPTwrapper; -(empty) -optimizer -json -pattern optimizer.json(X_0:str, X_1:str):str -OPTwrapper; -Unroll the mat.pack operation -optimizer macro pattern optimizer.macro(X_0:str, X_1:str):void OPTmacro; @@ -48269,16 +48244,6 @@ pattern optimizer.macro(X_0:str, X_1:str OPTmacro; Inline a target function used in a specific function. optimizer -mask -pattern optimizer.mask():str -OPTwrapper; -(empty) -optimizer -mask -pattern optimizer.mask(X_0:str, X_1:str):str -OPTwrapper; -Manipulate the MSK objects -optimizer matpack pattern optimizer.matpack():str OPTwrapper; @@ -48610,7 +48575,7 @@ CMDstopTrace; Stop collecting trace information pyapi3 eval -unsafe pattern pyapi3.eval(X_0:ptr, X_1:str):any +unsafe pattern pyapi3.eval(X_0:ptr, X_1:str):any_1 PYAPI3PyAPIevalStd; Execute a simple Python script returning a single value pyapi3 diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -24590,12 +24590,12 @@ PCREreplacefirst_bat_wrap; (empty) batpyapi3 eval -unsafe pattern batpyapi3.eval(X_0:lng, X_1:ptr, X_2:str):any... +unsafe pattern batpyapi3.eval(X_0:lng, X_1:ptr, X_2:str):bat[:any_1] PYAPI3PyAPIevalStd; Execute a simple Python script value batpyapi3 eval -unsafe pattern batpyapi3.eval(X_0:ptr, X_1:str, X_2:any...):any... +unsafe pattern batpyapi3.eval(X_0:ptr, X_1:str, X_2:any...):bat[:any]... PYAPI3PyAPIevalStd; Execute a simple Python script value batpyapi3 @@ -35174,11 +35174,6 @@ pattern json.renderobject(X_0:any...):js JSONrenderobject; (empty) json -resultSet -command json.resultSet(X_0:bat[:uuid], X_1:bat[:lng], X_2:bat[:json]):json -JSONresultSet; -Converts the json store into a single json string: -json str command json.str(X_0:json):str JSONjson2str; @@ -36669,26 +36664,6 @@ pattern optimizer.inline(X_0:str, X_1:st OPTwrapper; Expand inline functions optimizer -jit -pattern optimizer.jit():str -OPTwrapper; -(empty) -optimizer -jit -pattern optimizer.jit(X_0:str, X_1:str):str -OPTwrapper; -Propagate candidate lists in just-in-time optimization -optimizer -json -pattern optimizer.json():str -OPTwrapper; -(empty) -optimizer -json -pattern optimizer.json(X_0:str, X_1:str):str -OPTwrapper; -Unroll the mat.pack operation -optimizer macro pattern optimizer.macro(X_0:str, X_1:str):void OPTmacro; @@ -36699,16 +36674,6 @@ pattern optimizer.macro(X_0:str, X_1:str OPTmacro; Inline a target function used in a specific function. optimizer -mask -pattern optimizer.mask():str -OPTwrapper; -(empty) -optimizer -mask -pattern optimizer.mask(X_0:str, X_1:str):str -OPTwrapper; -Manipulate the MSK objects -optimizer matpack pattern optimizer.matpack():str OPTwrapper; @@ -37040,7 +37005,7 @@ CMDstopTrace; Stop collecting trace information pyapi3 eval -unsafe pattern pyapi3.eval(X_0:ptr, X_1:str):any +unsafe pattern pyapi3.eval(X_0:ptr, X_1:str):any_1 PYAPI3PyAPIevalStd; Execute a simple Python script returning a single value pyapi3 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 @@ -4,6 +4,7 @@ int ATOMallocate(const char *nme); void *ATOMdup(int id, const void *val); uint8_t ATOMelmshift(int sz) __attribute__((__const__)); char *ATOMformat(int id, const void *val); +gdk_return ATOMheap(int id, Heap *hp, size_t cap) __attribute__((__warn_unused_result__)); int ATOMindex(const char *nme); size_t ATOMlen(int id, const void *v); const char *ATOMname(int id); @@ -1233,7 +1234,6 @@ void strAfterCall(ValPtr v, ValPtr bak); void strBeforeCall(ValPtr v, ValPtr bak); const char *strRef; const char *streamsRef; -const char *strimpFilterSelectRef; const char *strimpsRef; const char *subavgRef; const char *subcountRef; diff --git a/gdk/gdk.h b/gdk/gdk.h --- a/gdk/gdk.h +++ b/gdk/gdk.h @@ -1269,6 +1269,8 @@ gdk_export gdk_return BATextend(BAT *b, /* internal */ gdk_export uint8_t ATOMelmshift(int sz) __attribute__((__const__)); +gdk_export gdk_return ATOMheap(int id, Heap *hp, size_t cap) + __attribute__((__warn_unused_result__)); gdk_export const char *BATtailname(const BAT *b); gdk_export gdk_return GDKupgradevarheap(BAT *b, var_t v, BUN cap, BUN ncopy) diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h --- a/gdk/gdk_private.h +++ b/gdk/gdk_private.h @@ -35,9 +35,6 @@ enum heaptype { dataheap }; -gdk_return ATOMheap(int id, Heap *hp, size_t cap) - __attribute__((__warn_unused_result__)) - __attribute__((__visibility__("hidden"))); bool ATOMisdescendant(int id, int parentid) __attribute__((__visibility__("hidden"))); int ATOMunknown_find(const char *nme) diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c --- a/monetdb5/mal/mal_dataflow.c +++ b/monetdb5/mal/mal_dataflow.c @@ -303,6 +303,7 @@ DFLOWworker(void *T) srand((unsigned int) GDKusec()); #endif assert(t->errbuf != NULL); + t->errbuf[0] = 0; GDKsetbuf(t->errbuf); /* where to leave errors */ t->errbuf = NULL; @@ -741,8 +742,8 @@ DFLOWscheduler(DataFlow flow, struct wor fe[i].argclaim = 0; for (j = p->retc; j < p->argc; j++) fe[i].argclaim += getMemoryClaim(fe[0].flow->mb, fe[0].flow->stk, p, j, FALSE); + flow->status[i].state = DFLOWrunning; q_enqueue(todo, flow->status + i); - flow->status[i].state = DFLOWrunning; } MT_lock_unset(&flow->flowlock); MT_sema_up(&w->s); @@ -768,8 +769,8 @@ DFLOWscheduler(DataFlow flow, struct wor if (flow->status[i].state == DFLOWpending) { flow->status[i].argclaim += f->hotclaim; if (flow->status[i].blocks == 1 ) { + flow->status[i].blocks--; flow->status[i].state = DFLOWrunning; - flow->status[i].blocks--; q_enqueue(todo, flow->status + i); } else { flow->status[i].blocks--; diff --git a/monetdb5/modules/mal/CMakeLists.txt b/monetdb5/modules/mal/CMakeLists.txt --- a/monetdb5/modules/mal/CMakeLists.txt +++ b/monetdb5/modules/mal/CMakeLists.txt @@ -34,7 +34,6 @@ target_sources(malmodules txtsim.c tokenizer.c sample.c - json_util.c querylog.c querylog.h sysmon.c tracer.c diff --git a/monetdb5/modules/mal/json_util.c b/monetdb5/modules/mal/json_util.c deleted file mode 100644 --- a/monetdb5/modules/mal/json_util.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * SPDX-License-Identifier: MPL-2.0 - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. - */ - -/* - * (c) Martin Kersten - */ - -#include "monetdb_config.h" -#include "gdk.h" -#include "mal_exception.h" - -typedef str json; - -static str -JSONresultSet(json *res, bat *uuid, bat *rev, bat *js) -{ - BAT *bu, *br, *bj; - char *result; - size_t sz, len=0; - - if ((bu = BBPquickdesc(*uuid)) == NULL) - throw(MAL, "json.resultset", INTERNAL_BAT_ACCESS); - if ((br = BBPquickdesc(*rev)) == NULL) - throw(MAL, "json.resultset", INTERNAL_BAT_ACCESS); - if ((bj = BBPquickdesc(*js)) == NULL) - throw(MAL, "json.resultset", INTERNAL_BAT_ACCESS); - if ( !(BATcount(bu) == BATcount(br) && BATcount(br) == BATcount(bj)) ) - throw(MAL, "json.resultset", "Input not aligned"); - sz= (22 + 12 + 20) * BATcount(bu); - result = (char*) GDKmalloc(sz); - if (result == NULL) - throw(MAL, "json.resultset", SQLSTATE(HY013) MAL_MALLOC_FAIL); - len += snprintf(result,sz,"["); - /* here the dirty work follows */ - /* loop over the triple store */ - snprintf(result+len,sz-len,"]"); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org