Changeset: f53a9a21f358 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f53a9a21f358
Removed Files:
monetdb5/modules/mal/cluster.c
monetdb5/modules/mal/cluster.h
monetdb5/modules/mal/cluster.mal
Modified Files:
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
clients/Tests/exports.stable.out
monetdb5/modules/mal/Makefile.ag
monetdb5/modules/mal/joinpath.c
Branch: default
Log Message:
Removed unused code cluster.*.
diffs (truncated from 1280 to 300 lines):
diff --git a/NT/installer32/MonetDB5-SQL-Installer.vdproj
b/NT/installer32/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer32/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer32/MonetDB5-SQL-Installer.vdproj
@@ -675,12 +675,6 @@
}
"Entry"
{
- "MsmKey" = "8:_B262C796F62A48F596C8828B2470C0D6"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_B2CE130DAD3B4D3FA2F1CE0B77BE0F21"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -3200,26 +3194,6 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
-
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B262C796F62A48F596C8828B2470C0D6"
- {
- "SourcePath" = "8:lib\\monetdb5\\cluster.mal"
- "TargetName" = "8:cluster.mal"
- "Tag" = "8:"
- "Folder" = "8:_B593DAA0787744D6A44D17884E0C3951"
- "Condition" = "8:"
- "Transitive" = "11:FALSE"
- "Vital" = "11:TRUE"
- "ReadOnly" = "11:FALSE"
- "Hidden" = "11:FALSE"
- "System" = "11:FALSE"
- "Permanent" = "11:FALSE"
- "SharedLegacy" = "11:FALSE"
- "PackageAs" = "3:1"
- "Register" = "3:1"
- "Exclude" = "11:FALSE"
- "IsDependency" = "11:FALSE"
- "IsolateTo" = "8:"
- }
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B2CE130DAD3B4D3FA2F1CE0B77BE0F21"
{
"SourcePath" = "8:lib\\monetdb5\\createdb\\11_times.sql"
diff --git a/NT/installer64/MonetDB5-SQL-Installer.vdproj
b/NT/installer64/MonetDB5-SQL-Installer.vdproj
--- a/NT/installer64/MonetDB5-SQL-Installer.vdproj
+++ b/NT/installer64/MonetDB5-SQL-Installer.vdproj
@@ -63,12 +63,6 @@
}
"Entry"
{
- "MsmKey" = "8:_09037EED43A6416AA200DF27BB53F675"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_0C663F8F9CD74DE2A56C520C4E893AA2"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -1180,26 +1174,6 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
-
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_09037EED43A6416AA200DF27BB53F675"
- {
- "SourcePath" = "8:lib\\monetdb5\\cluster.mal"
- "TargetName" = "8:cluster.mal"
- "Tag" = "8:"
- "Folder" = "8:_B593DAA0787744D6A44D17884E0C3951"
- "Condition" = "8:"
- "Transitive" = "11:FALSE"
- "Vital" = "11:TRUE"
- "ReadOnly" = "11:FALSE"
- "Hidden" = "11:FALSE"
- "System" = "11:FALSE"
- "Permanent" = "11:FALSE"
- "SharedLegacy" = "11:FALSE"
- "PackageAs" = "3:1"
- "Register" = "3:1"
- "Exclude" = "11:FALSE"
- "IsDependency" = "11:FALSE"
- "IsolateTo" = "8:"
- }
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_0C663F8F9CD74DE2A56C520C4E893AA2"
{
"SourcePath" = "8:lib\\monetdb5\\querylog.mal"
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
@@ -919,25 +919,6 @@ str CLRstr(str *val, color *c);
str CLRvalue(flt *b, color *c);
str CLRvalueInt(int *b, color *c);
str CLRycc(color *c, int *y, int *cr, int *cb);
-str CLS_create2_bte(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create2_dbl(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create2_flt(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create2_hge(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create2_int(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create2_lng(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create2_sht(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create2_wrd(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset,
bit *order);
-str CLS_create_bte(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_create_dbl(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_create_flt(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_create_hge(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_create_int(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_create_lng(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_create_sht(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_create_wrd(bat *rpsum, bat *rcmap, bat *b, int *bits, int *offset);
-str CLS_map(bat *rb, bat *cmap, bat *b);
-str CLS_map2(bat *rb, bat *psum, bat *cmap, bat *b);
-str CLS_split(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTActions(bat *ret);
str CLTInfo(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTLastCommand(bat *ret);
@@ -972,11 +953,6 @@ str CLTstop(Client cntxt, MalBlkPtr mb,
str CLTsuspend(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CLTusers(bat *ret);
str CLTwakeup(void *ret, int *id);
-str CLUSTER_apply(bat *bid, BAT *nb, BAT *cmap);
-str CLUSTER_column(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CLUSTER_key(bat *M, const bat *B);
-str CLUSTER_map(bat *RB, const bat *B);
-str CLUSTER_table(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDBATderivedByName(bat *ret, str *nme);
str CMDBATimprints(void *ret, bat *bid);
str CMDBATimprintsize(lng *ret, bat *bid);
diff --git a/monetdb5/modules/mal/Makefile.ag b/monetdb5/modules/mal/Makefile.ag
--- a/monetdb5/modules/mal/Makefile.ag
+++ b/monetdb5/modules/mal/Makefile.ag
@@ -21,7 +21,6 @@ lib_mal = {
batExtensions.c batExtensions.h \
bbp.c bbp.h \
clients.c clients.h \
- cluster.c cluster.h \
factories.c factories.h \
groupby.c groupby.h \
inspect.c inspect.h \
@@ -63,7 +62,6 @@ headers_mal = {
transaction.mal \
mal_mapi.mal sabaoth.mal remote.mal \
txtsim.mal recycle.mal \
- cluster.mal \
tokenizer.mal zorder.mal sample.mal json_util.mal \
batmtime.mal querylog.mal sysmon.mal
}
diff --git a/monetdb5/modules/mal/cluster.c b/monetdb5/modules/mal/cluster.c
deleted file mode 100644
--- a/monetdb5/modules/mal/cluster.c
+++ /dev/null
@@ -1,958 +0,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 2008-2015 MonetDB B.V.
- */
-
-/*
- * @a Martin Kersten, Niels Nes
- * @v 1.0
- * @t Hash cluster Algorithms
- *
- * @* Introduction
- * Hash structures in MonetDB are optimized to build in a single scan.
- * Also their use is limited to a single bat. Read optimized hashes (or
clusters)
- * could be used in many algorithms, such as select, join, group by and
- * distinct checking. This calls for physical locality of elements
- * hashing to the same element. Preferrable the elements in a collision
- * list are physically close, as are the lists of subsequent lists.
- *
- * This module extends the built in hashing scheme with a method
- * to reorganize BATs based on their hash key. It is a linear-time,
- * near-optimal N-way reclustering based on hash key ranges.
- *
- * We start with collecting all hash keys from the underlying
- * table into the table H[:oid,:oid].
- * The next step is a reclustering step to bring
- * elements together based on the hash key. This step is based
- * on the assumption that values in the hash-key are uniformly
- * distributed. We create as many buckets as we consider
- * justified in terms of the IO. The tuples are 'thrown' into
- * their bucket until they become full or can be extended
- * by harvesting free space from its direct neighor buckets.
- * If there is no free space left, we circularly look for a bucket
- * with space, partly polluting the clustering objective.
- *
- * The result is a void-oid table that represents an IO
- * 'optimal' sequence of tuples. IO optimal, because
- * with determining N we have 2N read/write pointers
- * in the table. Tuples are reclustered amongst those
- * using an ordinary join operation.
- * The outerloop touches each tuple once, causing
- * the order in the oid list to represent the IO
- * activity too. This means we can use it directly
- * as a driver for redistributing value columns.
- *
- * The remaining step is to perform this in parallel
- * for all BATs comprising a relational table.
- */
-#include "monetdb_config.h"
-#include "cluster.h"
-#include <mal_exception.h>
-#include "algebra.h"
-
-#define CLUSTERKEY(TYPE) \
-static void
\
-CLUSTER_key_##TYPE( BAT *map, BAT *b) \
-{
\
- TYPE *bt, *be;
\
- oid *o;
\
-
\
- assert(BUNfirst(map) == 0); \
- assert(BUNfirst(b) == 0); \
- o = (oid*)Tloc(map, 0); \
- bt = (TYPE*)Tloc(b, 0); \
- be = bt + BATcount(b); \
- for ( ; bt < be; bt++){ \
- BUN h = hash_##TYPE(b->T->hash,bt); \
- *o++= h;
\
- }
\
-}
-
-CLUSTERKEY(bte)
-CLUSTERKEY(sht)
-CLUSTERKEY(int)
-CLUSTERKEY(wrd)
-CLUSTERKEY(lng)
-#ifdef HAVE_HGE
-CLUSTERKEY(hge)
-#endif
-CLUSTERKEY(oid)
-CLUSTERKEY(flt)
-CLUSTERKEY(dbl)
-
-static void
-CLUSTER_key_str( BAT *map, BAT *b)
-{
- char *bt, *be;
- oid *o;
- BUN h;
-
- assert(BUNfirst(b) == 0);
- assert(BUNfirst(map) == 0);
- o = (oid*)Tloc(map, 0);
- bt = (char *)Tloc(b, 0);
- be = bt + (BATcount(b) << b->T->width);
- switch (b->T->width) {
- case 1:
- for ( ; bt < be; bt += 1){
- /* hash on the string reference */
- h = hash_bte(b->T->hash,bt);
- *o++= h;
- }
- break;
- case 2:
- for ( ; bt < be; bt += 2){
- /* hash on the string reference */
- h = hash_sht(b->T->hash,bt);
- *o++= h;
- }
- break;
-#if SIZEOF_VAR_T == 8
- case 4:
- for ( ; bt < be; bt += 4){
- /* hash on the string reference */
- h = hash_int(b->T->hash,bt);
- *o++= h;
- }
- break;
-#endif
- default:
- for ( ; bt < be; bt += 8){
- /* hash on the string reference */
- h = hash_lng(b->T->hash,bt);
- *o++= h;
- }
- break;
- }
-}
-static str
-CLUSTER_column_any(BAT *nb, BAT *b, BAT *cmap)
-{
- oid *ct, *ce, o = 0;
- BATiter bi= bat_iterator(b);
-
- ct = (oid *)Tloc(cmap, 0);
- ce = ct + BATcount(cmap);
- nb->H->heap.dirty = nb->T->heap.dirty= TRUE;
- for ( ; ct < ce; ct++){
- BUNfastins(nb, &o, BUNtail(bi, (BUN) *ct));
- o++;
- if ( (o % 1000000) == 0){
- BATsave(nb);
- nb->H->heap.dirty = nb->T->heap.dirty= TRUE;
- }
- }
- BATsetcount(nb, BATcount(b));
- BATderiveProps(nb, 0);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list