Changeset: 3110782bda0e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3110782bda0e
Removed Files:
sql/backends/monet5/sql_strimps.c
sql/backends/monet5/sql_strimps.h
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
sql/backends/monet5/CMakeLists.txt
sql/backends/monet5/sql.c
Branch: default
Log Message:
Remove strimps explicit SQL interface.
diffs (184 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
@@ -49649,11 +49649,6 @@ unsafe pattern sql.createorderindex(X_0:
sql_createorderindex
Instantiate the order index on a column
sql
-createstrimps
-unsafe pattern sql.createstrimps(X_0:str, X_1:str, X_2:str):void
-sql_createstrimps
-Instantiate the strimps index on a column
-sql
cume_dist
pattern sql.cume_dist(X_0:any_1, X_1:bit, X_2:bit):dbl
SQLcume_dist
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
@@ -38109,11 +38109,6 @@ unsafe pattern sql.createorderindex(X_0:
sql_createorderindex
Instantiate the order index on a column
sql
-createstrimps
-unsafe pattern sql.createstrimps(X_0:str, X_1:str, X_2:str):void
-sql_createstrimps
-Instantiate the strimps index on a column
-sql
cume_dist
pattern sql.cume_dist(X_0:any_1, X_1:bit, X_2:bit):dbl
SQLcume_dist
diff --git a/sql/backends/monet5/CMakeLists.txt
b/sql/backends/monet5/CMakeLists.txt
--- a/sql/backends/monet5/CMakeLists.txt
+++ b/sql/backends/monet5/CMakeLists.txt
@@ -156,7 +156,6 @@ target_sources(sql
sql_round_impl.h
sql_fround.c sql_fround_impl.h
sql_orderidx.c sql_orderidx.h
- sql_strimps.c sql_strimps.h
sql_time.c
sql_bincopy.c sql_bincopyconvert.c sql_bincopyconvert.h
sql_datetrunc.c
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
@@ -5473,7 +5473,6 @@ SQLstr_stop_vacuum(Client cntxt, MalBlkP
#include "sql_assert.h"
#include "sql_execute.h"
#include "sql_orderidx.h"
-#include "sql_strimps.h"
#include "sql_subquery.h"
#include "sql_statistics.h"
#include "sql_transaction.h"
@@ -5799,7 +5798,6 @@ static mel_func sql_init_funcs[] = {
pattern("sql", "storage", sql_storage, false, "return a table with storage
information for a particular column", args(17,20,
batarg("schema",str),batarg("table",str),batarg("column",str),batarg("type",str),batarg("mode",str),batarg("location",str),batarg("count",lng),batarg("atomwidth",int),batarg("columnsize",lng),batarg("heap",lng),batarg("hashes",lng),batarg("phash",bit),batarg("imprints",lng),batarg("sorted",bit),batarg("revsorted",bit),batarg("key",bit),batarg("orderidx",lng),arg("sname",str),arg("tname",str),arg("cname",str))),
pattern("sql", "createorderindex", sql_createorderindex, true, "Instantiate
the order index on a column", args(0,3,
arg("sch",str),arg("tbl",str),arg("col",str))),
pattern("sql", "droporderindex", sql_droporderindex, true, "Drop the order
index on a column", args(0,3, arg("sch",str),arg("tbl",str),arg("col",str))),
- pattern("sql", "createstrimps", sql_createstrimps, true, "Instantiate the
strimps index on a column", args(0,3,
arg("sch",str),arg("tbl",str),arg("col",str))),
command("calc", "identity", SQLidentity, false, "Returns a unique row
identitfier.", args(1,2, arg("",oid),argany("",0))),
command("batcalc", "identity", BATSQLidentity, false, "Returns the unique row
identitfiers.", args(1,2, batarg("",oid),batargany("b",0))),
pattern("batcalc", "identity", PBATSQLidentity, false, "Returns the unique
row identitfiers.", args(2,4,
batarg("resb",oid),arg("ns",oid),batargany("b",0),arg("s",oid))),
diff --git a/sql/backends/monet5/sql_strimps.c
b/sql/backends/monet5/sql_strimps.c
deleted file mode 100644
--- a/sql/backends/monet5/sql_strimps.c
+++ /dev/null
@@ -1,94 +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 https://mozilla.org/MPL/2.0/.
- *
- * For copyright information, see the file debian/copyright.
- */
-
-#include "monetdb_config.h"
-#include "mal_backend.h"
-#include "sql_strimps.h"
-
-static str
-sql_load_bat(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, BAT **b)
-{
- mvc *m = NULL;
- str msg = getSQLContext(cntxt, mb, &m, NULL);
- str sch,tbl,col;
- sql_schema *s;
- sql_table *t;
- sql_column *c;
-
- if (msg != MAL_SUCCEED || (msg = checkSQLContext(cntxt)) != NULL)
- return msg;
-
- sch = *getArgReference_str(stk, pci, 1);
- tbl = *getArgReference_str(stk, pci, 2);
- col = *getArgReference_str(stk, pci, 3);
-
- if (strNil(sch))
- throw(SQL, "sql.createstrimps", SQLSTATE(42000) "Schema name
cannot be NULL");
- if (strNil(tbl))
- throw(SQL, "sql.createstrimps", SQLSTATE(42000) "Table name
cannot be NULL");
- if (strNil(col))
- throw(SQL, "sql.createstrimps", SQLSTATE(42000) "Column name
cannot be NULL");
-
- if (!(s = mvc_bind_schema(m, sch)))
- throw(SQL, "sql.createstrimps", SQLSTATE(3FOOO) "Unknown schema
%s", sch);
-
- if (!mvc_schema_privs(m, s))
- throw(SQL, "sql.createstrimps", SQLSTATE(42000) "Access denied
for %s to schema '%s'",
- get_string_global_var(m, "current_user"),
s->base.name);
- if (!(t = mvc_bind_table(m, s, tbl)))
- throw(SQL, "sql.createstrimps", SQLSTATE(42S02) "Unknown table
%s.%s", sch, tbl);
- if (!isTable(t))
- throw(SQL, "sql.createstrimps", SQLSTATE(42000) "%s '%s' is not
persistent",
- TABLE_TYPE_DESCRIPTION(t->type, t->properties),
t->base.name);
- if (!(c = mvc_bind_column(m, t, col)))
- throw(SQL, "sql.createstrimps", SQLSTATE(38000) "Unknown column
%s.%s.%s", sch, tbl, col);
-
- sqlstore *store = m->session->tr->store;
- *b = store->storage_api.bind_col(m->session->tr, c, RDONLY);
- if (*b == 0)
- throw(SQL, "sql.createstrimps", SQLSTATE(HY005) "Cannot access
column %s", col);
-
- return msg;
-
-}
-
-str
-sql_createstrimps(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
- BAT *b, *s;
- gdk_return res;
- str msg = MAL_SUCCEED;
-
- if ((msg = sql_load_bat(cntxt, mb, stk, pci, &b)) != MAL_SUCCEED)
- return msg;
-
- if (!(s = BATdense(0, 0, b->batCount))) {
- BBPunfix(b->batCacheid);
- throw(SQL, "sql.createstrimps", SQLSTATE(HY013)
MAL_MALLOC_FAIL);
- }
-
- res = STRMPcreate(b, s);
- BBPunfix(b->batCacheid);
- BBPunfix(s->batCacheid);
- if (res != GDK_SUCCEED)
- throw(SQL, "sql.createstrimps", GDK_EXCEPTION);
-
- return MAL_SUCCEED;
-}
-
-/* str */
-/* sql_strimpfilter(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) */
-/* { */
-/* BAT *b; */
-/* if (sql_load_bat(cntxt, mb, stk, pci, &b) != MAL_SUCCEED) */
-/* throw(SQL, "sql.createstrimps", SQLSTATE(HY002)
OPERATION_FAILED); */
-
-/* return MAL_SUCCEED; */
-/* } */
diff --git a/sql/backends/monet5/sql_strimps.h
b/sql/backends/monet5/sql_strimps.h
deleted file mode 100644
--- a/sql/backends/monet5/sql_strimps.h
+++ /dev/null
@@ -1,20 +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 https://mozilla.org/MPL/2.0/.
- *
- * For copyright information, see the file debian/copyright.
- */
-
-/* (co) M.L. Kersten */
-#ifndef _SQL_STRIMPS_DEF
-#define _SQL_STRIMPS_DEF
-
-#include "sql.h"
-
-extern str sql_createstrimps(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
-// extern str sql_droporderindex(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
-
-#endif /* _SQL_STRIMPS_DEF */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]