Changeset: 133315b76aa3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=133315b76aa3
Removed Files:
sql/scripts/18_compress.sql
Modified Files:
sql/backends/monet5/sql.c
sql/backends/monet5/sql.h
sql/scripts/Makefile.ag
Branch: mosaic
Log Message:
Remove the temporary compression interface
diffs (192 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
@@ -4012,133 +4012,6 @@ SQLargRecord(Client cntxt, MalBlkPtr mb,
}
/*
- * Table (de-)compression schemes
- */
-str
-SQLcompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
- str *sch = (str *) getArgReference(stk, pci, 1);
- str *tbl = (str *) getArgReference(stk, pci, 2);
- sql_trans *tr;
- sql_schema *s;
- sql_table *t;
- sql_column *c;
- mvc *m = NULL;
- str msg;
- bat bid;
- BAT *b;
- node *o;
-
- if ((msg = getSQLContext(cntxt, mb, &m, NULL)) != NULL)
- return msg;
- if ((msg = checkSQLContext(cntxt)) != NULL)
- return msg;
- s = mvc_bind_schema(m, *sch);
- if (s == NULL)
- throw(SQL, "sql.compress", "3F000!Schema missing");
- t = mvc_bind_table(m, s, *tbl);
- if (t == NULL)
- throw(SQL, "sql.compress", "42S02!Table missing");
- if (t->access != TABLE_READONLY)
- throw(SQL, "sql.compress", "!Table must be read only");
- tr = m->session->tr;
- t->base.wtime = s->base.wtime = tr->wtime = tr->wstime;
- t->base.rtime = s->base.rtime = tr->rtime = tr->stime;
-
- for (o = t->columns.set->h; o; o = o->next) {
- sql_delta *d;
- BAT *bn;
- c = o->data;
- b = store_funcs.bind_col(tr, c, 0);
- if (b == NULL)
- throw(SQL, "sql.compress", "Can not access descriptor");
- // simplified test case
- bn = BATcopy(b,b->htype, b->ttype,0,PERSISTENT);
- BBPkeepref(bn->batCacheid);
- bid = bn->batCacheid;
- //msg =MOScompressInternal(cntxt, &bid, &b->batCacheid,0);
- BBPreleaseref(b->batCacheid);
- if (msg)
- return msg;
- d = c->data;
- if (d->bid)
- BBPdecref(d->bid, TRUE);
- //if (d->ibid)
- //BBPdecref(d->ibid, TRUE);
- d->bid = bid;
- d->ibase = 0;
- //d->ibid = 0; /* use the insert bat */
- c->base.wtime = tr->wstime;
- c->base.rtime = tr->stime;
- }
- /* bat was cleared */
- t->cleared = 1;
- return MAL_SUCCEED;
-}
-
-str
-SQLdecompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
- str *sch = (str *) getArgReference(stk, pci, 1);
- str *tbl = (str *) getArgReference(stk, pci, 2);
- sql_trans *tr;
- sql_schema *s;
- sql_table *t;
- sql_column *c;
- mvc *m = NULL;
- str msg;
- bat bid;
- BAT *b;
- node *o;
-
- if ((msg = getSQLContext(cntxt, mb, &m, NULL)) != NULL)
- return msg;
- if ((msg = checkSQLContext(cntxt)) != NULL)
- return msg;
- s = mvc_bind_schema(m, *sch);
- if (s == NULL)
- throw(SQL, "sql.decompress", "3F000!Schema missing");
- t = mvc_bind_table(m, s, *tbl);
- if (t == NULL)
- throw(SQL, "sql.decompress", "42S02!Table missing");
- if (t->access != TABLE_READONLY)
- throw(SQL, "sql.compress", "!Table must be read only");
- tr = m->session->tr;
- t->base.wtime = s->base.wtime = tr->wtime = tr->wstime;
- t->base.rtime = s->base.rtime = tr->rtime = tr->stime;
-
- for (o = t->columns.set->h; o; o = o->next) {
- sql_delta *d;
- BAT *bn;
- c = o->data;
- b = store_funcs.bind_col(tr, c, 0);
- if (b == NULL)
- throw(SQL, "sql.decompress", "Can not access
descriptor");
- // simplified test case
- bn = BATcopy(b,b->htype, b->ttype,0,PERSISTENT);
- BBPkeepref(bn->batCacheid);
- bid = bn->batCacheid;
- //msg =MOSdecompressInternal(cntxt, &bid, &b->batCacheid);
- BBPreleaseref(b->batCacheid);
- if (msg)
- return msg;
- d = c->data;
- if (d->bid)
- BBPdecref(d->bid, TRUE);
- //if (d->ibid)
- //BBPdecref(d->ibid, TRUE);
- d->bid = bid;
- d->ibase = 0;
- //d->ibid = 0; /* use the insert bat */
- c->base.wtime = tr->wstime;
- c->base.rtime = tr->stime;
- }
- /* bat was cleared */
- t->cleared = 1;
- return MAL_SUCCEED;
-}
-
-/*
* The table is searched for all columns and they are
* re-clustered on the hash value over the primary key.
* Initially the first column
diff --git a/sql/backends/monet5/sql.h b/sql/backends/monet5/sql.h
--- a/sql/backends/monet5/sql.h
+++ b/sql/backends/monet5/sql.h
@@ -133,8 +133,6 @@ sql5_export str mvc_restart_seq(Client c
sql5_export str zero_or_one(ptr ret, int *bid);
sql5_export str not_unique(bit *ret, int *bid);
sql5_export str not_unique_oids(bat *ret, bat *bid);
-sql5_export str SQLcompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
-sql5_export str SQLdecompress(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
sql5_export str SQLcluster1(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
sql5_export str SQLcluster2(Client cntxt, MalBlkPtr mb, MalStkPtr stk,
InstrPtr pci);
sql5_export str SQLshrink(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
diff --git a/sql/scripts/18_compress.sql b/sql/scripts/18_compress.sql
deleted file mode 100644
--- a/sql/scripts/18_compress.sql
+++ /dev/null
@@ -1,26 +0,0 @@
--- The contents of this file are subject to the MonetDB Public License
--- Version 1.1 (the "License"); you may not use this file except in
--- compliance with the License. You may obtain a copy of the License at
--- http://www.monetdb.org/Legal/MonetDBLicense
---
--- Software distributed under the License is distributed on an "AS IS"
--- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
--- License for the specific language governing rights and limitations
--- under the License.
---
--- The Original Code is the MonetDB Database System.
---
--- The Initial Developer of the Original Code is CWI.
--- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
--- Copyright August 2008-2014 MonetDB B.V.
--- All Rights Reserved.
-
--- Compression is defined for read only tables only!
--- Upon a call, an attempt is made to reduce storage footprint
-
-create procedure compress(sys string, tab string)
- external name sql.compress;
-
-create procedure decompress(sys string, tab string)
- external name sql.decompress;
-
diff --git a/sql/scripts/Makefile.ag b/sql/scripts/Makefile.ag
--- a/sql/scripts/Makefile.ag
+++ b/sql/scripts/Makefile.ag
@@ -20,7 +20,7 @@ MT_SAFE
headers_sql = {
HEADERS = sql
DIR = libdir/monetdb5/createdb
- SOURCES = 09_like.sql 10_math.sql 11_times.sql 12_url.sql 13_date.sql
14_inet.sql 15_querylog.sql 16_tracelog.sql 18_compress.sql 19_cluster.sql
20_vacuum.sql 21_dependency_functions.sql 22_clients.sql 23_skyserver.sql
24_zorder.sql 25_debug.sql 26_sysmon.sql 39_analytics.sql 40_json.sql
41_jsonstore.sql 45_uuid.sql 75_storagemodel.sql 80_statistics.sql 99_system.sql
+ SOURCES = 09_like.sql 10_math.sql 11_times.sql 12_url.sql 13_date.sql
14_inet.sql 15_querylog.sql 16_tracelog.sql 19_cluster.sql 20_vacuum.sql
21_dependency_functions.sql 22_clients.sql 23_skyserver.sql 24_zorder.sql
25_debug.sql 26_sysmon.sql 39_analytics.sql 40_json.sql 41_jsonstore.sql
45_uuid.sql 75_storagemodel.sql 80_statistics.sql 99_system.sql
}
headers_hge = {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list