Changeset: 4201e08e2f36 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4201e08e2f36
Added Files:
sql/backends/monet5/40_sql.include
sql/backends/monet5/41_sql_hge.include
sql/backends/monet5/generator/90_generator.include
sql/backends/monet5/generator/90_generator_hge.include
sql/backends/monet5/generator/generator.include
sql/backends/monet5/generator/generator_hge.include
sql/backends/monet5/sql.include
sql/backends/monet5/sql_aggr_bte.include
sql/backends/monet5/sql_aggr_dbl.include
sql/backends/monet5/sql_aggr_flt.include
sql/backends/monet5/sql_aggr_hge.include
sql/backends/monet5/sql_aggr_int.include
sql/backends/monet5/sql_aggr_lng.include
sql/backends/monet5/sql_aggr_sht.include
sql/backends/monet5/sql_decimal.include
sql/backends/monet5/sql_decimal_hge.include
sql/backends/monet5/sql_hge.include
sql/backends/monet5/sql_inspect.include
sql/backends/monet5/sql_rank.include
sql/backends/monet5/sql_rank_hge.include
sql/backends/monet5/sql_transaction.include
sql/backends/monet5/sqlcatalog.include
sql/backends/monet5/wlr.include
Modified Files:
monetdb5/mal/mal_embedded.c
monetdb5/mal/mal_embedded.h
monetdb5/modules/prepare.sh
sql/backends/monet5/Makefile.ag
sql/backends/monet5/sql_scenario.c
Branch: mdbl-mal
Log Message:
Prepare the embedding of the MAL signatures in the SQL context
The call to sqlEmbeddedBoot() should be put in the right place still
diffs (truncated from 3422 to 300 lines):
diff --git a/monetdb5/mal/mal_embedded.c b/monetdb5/mal/mal_embedded.c
--- a/monetdb5/mal/mal_embedded.c
+++ b/monetdb5/mal/mal_embedded.c
@@ -14,12 +14,6 @@
* It assumes that all necessary libraries are already loaded.
* A failure to bind the address in the context of an embedded version is not
considered an error.
*/
-#include "monetdb_config.h"
-#include "mal_type.h"
-#include "mal_namespace.h"
-#include "mal_exception.h"
-#include "mal_private.h"
-#include "mal_builder.h"
#include "mal_embedded.h"
static int embeddedinitialized = 0;
diff --git a/monetdb5/mal/mal_embedded.h b/monetdb5/mal/mal_embedded.h
--- a/monetdb5/mal/mal_embedded.h
+++ b/monetdb5/mal/mal_embedded.h
@@ -16,6 +16,7 @@
#include "mal_exception.h"
#include "mal_linker.h"
#include "mal_import.h"
+#include "mal_builder.h"
#include "mal_private.h"
/* #define MAL_EMBEDDED_DEBUG */
diff --git a/monetdb5/modules/prepare.sh b/monetdb5/modules/prepare.sh
--- a/monetdb5/modules/prepare.sh
+++ b/monetdb5/modules/prepare.sh
@@ -6,7 +6,7 @@
# This script should be ran after a change has been made to a MAL signature
file.
-for i in *.mal
+for i in *.mal
do
if [ ${i}x = 'mal_init.malx' ]
then
@@ -15,9 +15,9 @@ do
fi
bn=`basename $i .mal`
incl=${bn}.include
- echo "create the $incl file"
echo ${incl}
echo "{ \"${bn}\"," >${incl}
cat $i | sed -e "s/\\\\/\\\\\\\\/g" -e "/^$/d" -e "s/\"/\\\\\"/g" -e
"s/.*/\"& \\\\n\"/" >>${incl}
echo "}," >>${incl}
done
+
diff --git a/sql/backends/monet5/40_sql.include
b/sql/backends/monet5/40_sql.include
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/40_sql.include
@@ -0,0 +1,12 @@
+{ "40_sql",
+"# This Source Code Form is subject to the terms of the Mozilla Public \n"
+"# License, v. 2.0. If a copy of the MPL was not distributed with this \n"
+"# file, You can obtain one at http://mozilla.org/MPL/2.0/. \n"
+"# \n"
+"# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. \n"
+"# This loads the MonetDB/SQL module \n"
+"include sql; \n"
+"include sqlcatalog; \n"
+"include sql_transaction; \n"
+"include wlr; \n"
+},
diff --git a/sql/backends/monet5/41_sql_hge.include
b/sql/backends/monet5/41_sql_hge.include
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/41_sql_hge.include
@@ -0,0 +1,9 @@
+{ "41_sql_hge",
+"# This Source Code Form is subject to the terms of the Mozilla Public \n"
+"# License, v. 2.0. If a copy of the MPL was not distributed with this \n"
+"# file, You can obtain one at http://mozilla.org/MPL/2.0/. \n"
+"# \n"
+"# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. \n"
+"# This loads the 128-bit support for the MonetDB/SQL module \n"
+"include sql_hge; \n"
+},
diff --git a/sql/backends/monet5/Makefile.ag b/sql/backends/monet5/Makefile.ag
--- a/sql/backends/monet5/Makefile.ag
+++ b/sql/backends/monet5/Makefile.ag
@@ -27,6 +27,7 @@ lib__sql = {
mal_backend.c mal_backend.h \
sql_user.c sql_user.h \
sql_scenario.c sql_scenario.h \
+ sql_embedded.c sql_embedded.h \
sql_execute.c sql_execute.h \
sql_assert.c sql_assert.h \
sql_upgrades.c sql_upgrades.h \
@@ -47,6 +48,7 @@ lib__sql = {
sql_orderidx.c sql_orderidx.h \
wlr.c wlr.h \
sql_rank.c sql_rank.h
+
# libmapi on Windows for mcrypt_*
LIBS = ../../server/libsqlserver \
../../storage/libstore \
@@ -59,39 +61,4 @@ lib__sql = {
WIN32?$(openssl_LIBS)
}
-headers_mal = {
- HEADERS = mal
- DIR = libdir/monetdb5
- SOURCES = sql_aggr_bte.mal sql_aggr_flt.mal sql_aggr_dbl.mal
sql_aggr_int.mal sql_aggr_lng.mal \
- sql_aggr_sht.mal sql_decimal.mal sql_inspect.mal wlr.mal \
- sql_rank.mal sqlcatalog.mal sql_transaction.mal sql.mal
-}
-
-headers_mal_hge = {
- COND = HAVE_HGE
- HEADERS = mal
- DIR = libdir/monetdb5
- SOURCES = sql_hge.mal sql_aggr_hge.mal sql_decimal_hge.mal
-}
-
-headers_autoload = {
- HEADERS = mal
- DIR = libdir/monetdb5/autoload
- SOURCES = 40_sql.mal
-}
-
-headers_autoload_hge = {
- COND = HAVE_HGE
- HEADERS = mal
- DIR = libdir/monetdb5/autoload
- SOURCES = 41_sql_hge.mal
-}
-
-headers_sqlrank_hge = {
- COND = HAVE_HGE
- HEADERS = mal
- DIR = libdir/monetdb5
- SOURCES = sql_rank_hge.mal
-}
-
EXTRA_DIST_DIR = Tests
diff --git a/sql/backends/monet5/generator/90_generator.include
b/sql/backends/monet5/generator/90_generator.include
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/generator/90_generator.include
@@ -0,0 +1,8 @@
+{ "90_generator",
+"# This Source Code Form is subject to the terms of the Mozilla Public \n"
+"# License, v. 2.0. If a copy of the MPL was not distributed with this \n"
+"# file, You can obtain one at http://mozilla.org/MPL/2.0/. \n"
+"# \n"
+"# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. \n"
+"include generator; \n"
+},
diff --git a/sql/backends/monet5/generator/90_generator_hge.include
b/sql/backends/monet5/generator/90_generator_hge.include
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/generator/90_generator_hge.include
@@ -0,0 +1,8 @@
+{ "90_generator_hge",
+"# This Source Code Form is subject to the terms of the Mozilla Public \n"
+"# License, v. 2.0. If a copy of the MPL was not distributed with this \n"
+"# file, You can obtain one at http://mozilla.org/MPL/2.0/. \n"
+"# \n"
+"# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. \n"
+"include generator_hge; \n"
+},
diff --git a/sql/backends/monet5/generator/generator.include
b/sql/backends/monet5/generator/generator.include
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/generator/generator.include
@@ -0,0 +1,163 @@
+{ "generator",
+"# This Source Code Form is subject to the terms of the Mozilla Public \n"
+"# License, v. 2.0. If a copy of the MPL was not distributed with this \n"
+"# file, You can obtain one at http://mozilla.org/MPL/2.0/. \n"
+"# \n"
+"# Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. \n"
+"module generator; \n"
+"pattern series(first:bte,limit:bte):bat[:bte] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:sht,limit:sht):bat[:sht] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:int,limit:int):bat[:int] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:lng,limit:lng):bat[:lng] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:flt,limit:flt):bat[:flt] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:dbl,limit:dbl):bat[:dbl] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:bte,limit:bte,step:bte):bat[:bte] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:sht,limit:sht,step:sht):bat[:sht] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:int,limit:int,step:int):bat[:int] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:lng,limit:lng,step:lng):bat[:lng] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:flt,limit:flt,step:flt):bat[:flt] \n"
+"address VLTgenerator_table; \n"
+"pattern series(first:dbl,limit:dbl,step:dbl):bat[:dbl] \n"
+"address VLTgenerator_table \n"
+"comment \"Create and materialize a generator table\"; \n"
+"pattern series(first:timestamp,limit:timestamp,step:lng):bat[:timestamp] \n"
+"address VLTgenerator_table; \n"
+"pattern parameters(first:bte,limit:bte,step:bte):bat[:bte] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:sht,limit:sht,step:sht):bat[:sht] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:int,limit:int,step:int):bat[:int] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:lng,limit:lng,step:lng):bat[:lng] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:flt,limit:flt,step:flt):bat[:flt] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:dbl,limit:dbl,step:dbl):bat[:dbl] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:timestamp,limit:timestamp,step:lng):bat[:timestamp]
\n"
+"address VLTgenerator_noop \n"
+"comment \"Retain the table definition, but don't materialize\"; \n"
+"pattern parameters(first:bte,limit:bte):bat[:bte] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:sht,limit:sht):bat[:sht] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:int,limit:int):bat[:int] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:lng,limit:lng):bat[:lng] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:flt,limit:flt):bat[:flt] \n"
+"address VLTgenerator_noop; \n"
+"pattern parameters(first:dbl,limit:dbl):bat[:dbl] \n"
+"address VLTgenerator_noop; \n"
+"pattern thetaselect(b:bat[:bte], low:bte, oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:sht], low:sht, oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:int], low:int, oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:lng], low:lng, oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:flt], low:flt, oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:dbl], low:dbl, oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:timestamp], low:timestamp, oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect \n"
+"comment \"Overloaded selection routine\"; \n"
+"pattern thetaselect(b:bat[:bte], cnd:bat[:oid], low:bte, oper:str) :bat[:oid]
\n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:sht], cnd:bat[:oid], low:sht, oper:str) :bat[:oid]
\n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:int], cnd:bat[:oid], low:int, oper:str) :bat[:oid]
\n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:lng], cnd:bat[:oid], low:lng, oper:str) :bat[:oid]
\n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:flt], cnd:bat[:oid], low:flt, oper:str) :bat[:oid]
\n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:dbl], cnd:bat[:oid], low:dbl, oper:str) :bat[:oid]
\n"
+"address VLTgenerator_thetasubselect; \n"
+"pattern thetaselect(b:bat[:timestamp], cnd:bat[:oid], low:timestamp,
oper:str) :bat[:oid] \n"
+"address VLTgenerator_thetasubselect \n"
+"comment \"Overloaded selection routine\"; \n"
+"pattern select(b:bat[:bte], low:bte, high:bte, li:bit, hi:bit, anti:bit)
:bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:sht], low:sht, high:sht, li:bit, hi:bit, anti:bit)
:bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:int], low:int, high:int, li:bit, hi:bit, anti:bit)
:bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:lng], low:lng, high:lng, li:bit, hi:bit, anti:bit)
:bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:flt], low:flt, high:flt, li:bit, hi:bit, anti:bit)
:bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:dbl], low:dbl, high:dbl, li:bit, hi:bit, anti:bit)
:bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:timestamp], low:timestamp, high:timestamp, li:bit,
hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect \n"
+"comment \"Overloaded selection routine\"; \n"
+"pattern select(b:bat[:bte], cand:bat[:oid], low:bte, high:bte, li:bit,
hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:sht], cand:bat[:oid], low:sht, high:sht, li:bit,
hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:int], cand:bat[:oid], low:int, high:int, li:bit,
hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:lng], cand:bat[:oid], low:lng, high:lng, li:bit,
hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:flt], cand:bat[:oid], low:flt, high:flt, li:bit,
hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:dbl], cand:bat[:oid], low:dbl, high:dbl, li:bit,
hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect; \n"
+"pattern select(b:bat[:timestamp], cand:bat[:oid], low:timestamp,
high:timestamp, li:bit, hi:bit, anti:bit) :bat[:oid] \n"
+"address VLTgenerator_subselect \n"
+"comment \"Overloaded selection routine\"; \n"
+"pattern projection(b:bat[:oid], cand:bat[:bte]) :bat[:bte] \n"
+"address VLTgenerator_projection; \n"
+"pattern projection(b:bat[:oid], cand:bat[:sht]) :bat[:sht] \n"
+"address VLTgenerator_projection; \n"
+"pattern projection(b:bat[:oid], cand:bat[:int]) :bat[:int] \n"
+"address VLTgenerator_projection; \n"
+"pattern projection(b:bat[:oid], cand:bat[:lng]) :bat[:lng] \n"
+"address VLTgenerator_projection; \n"
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list