MonetDB: default - comment out not used code

2020-06-29 Thread Niels Nes
Changeset: 93feecec9609 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93feecec9609
Modified Files:
sql/server/rel_optimizer.c
Branch: default
Log Message:

comment out not used code


diffs (19 lines):

diff --git a/sql/server/rel_optimizer.c b/sql/server/rel_optimizer.c
--- a/sql/server/rel_optimizer.c
+++ b/sql/server/rel_optimizer.c
@@ -5645,6 +5645,7 @@ rel_push_project_down(visitor *v, sql_re
return l;
}
return rel;
+#if 0
/* keep important internal columns */
for (node *n = l->exps->h; n; n = n->next) {
sql_exp *e = n->data;
@@ -5657,6 +5658,7 @@ rel_push_project_down(visitor *v, sql_re
rel_destroy(rel);
v->changes++;
return l;
+#endif
} else if (list_check_prop_all(rel->exps, 
(prop_check_func)_is_useless_rename)) {
if (is_select(l->op)) {
/* push project under select (include exps used 
by selection) */
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - comment out test code for integer sums.

2020-06-19 Thread Aris Koning
Changeset: 59fd32f66e8b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=59fd32f66e8b
Modified Files:
ctest/tools/monetdbe/cmocka_test.c
Branch: default
Log Message:

comment out test code for integer sums.


diffs (16 lines):

diff --git a/ctest/tools/monetdbe/cmocka_test.c 
b/ctest/tools/monetdbe/cmocka_test.c
--- a/ctest/tools/monetdbe/cmocka_test.c
+++ b/ctest/tools/monetdbe/cmocka_test.c
@@ -120,9 +120,11 @@ static void query_table_test3(void **sta
 
assert_int_equal((int) result->ncols, 3);
 
+   /* TODO: Figure out what is expected here.
assert_true(CHECK_COLUMN(result, 0, BIGGEST_INTEGER_TPE, {{15}}));
assert_true(CHECK_COLUMN(result, 1, BIGGEST_INTEGER_TPE, {{150}}));
-   /* FAIL assert_true(CHECK_COLUMN(result, 2, BIGGEST_INTEGER_TPE, 
{1500})); */
+   assert_true(CHECK_COLUMN(result, 2, BIGGEST_INTEGER_TPE, {1500}));
+   */
 
err = monetdbe_cleanup_result(mdbe, result);
 
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Comment.

2020-03-19 Thread Sjoerd Mullender
Changeset: d13ab98ddb09 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d13ab98ddb09
Modified Files:
gdk/gdk_qsort.c
Branch: default
Log Message:

Comment.


diffs (22 lines):

diff --git a/gdk/gdk_qsort.c b/gdk/gdk_qsort.c
--- a/gdk/gdk_qsort.c
+++ b/gdk/gdk_qsort.c
@@ -340,7 +340,17 @@ struct qsort_t {
 #undef SUFF
 #undef TPE
 
-/* the interface functions */
+/* Sort the array `h' of `n' elements with size `hs' each and type
+ * `ts' in ascending or descending (if `reverse' is true) order.  If
+ * the type `tpe' indicates a variable-sized type, `h' contains
+ * offsets into the `base' array which should be NULL otherwise.  The
+ * array `t', if not NULL, contains `n' values of size `ts' each which
+ * will be moved around together with the corresponding elements in
+ * `h' (i.e. `t' is the payload).  If `nilslast' is true, nils sort at
+ * the end, otherwise at the beginning of the result.
+ *
+ * This function uses a variant of quicksort and is thus not a stable
+ * sort. */
 void
 GDKqsort(void *restrict h, void *restrict t, const void *restrict base,
 size_t n, int hs, int ts, int tpe, bool reverse, bool nilslast)
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Comment

2016-02-04 Thread Martin Kersten
Changeset: 3194783ce768 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3194783ce768
Modified Files:
monetdb5/optimizer/opt_volcano.c
Branch: default
Log Message:

Comment


diffs (13 lines):

diff --git a/monetdb5/optimizer/opt_volcano.c b/monetdb5/optimizer/opt_volcano.c
--- a/monetdb5/optimizer/opt_volcano.c
+++ b/monetdb5/optimizer/opt_volcano.c
@@ -7,7 +7,8 @@
  */
 
 /*
- * Mark the production and use of candidate lists.
+ * Selectively inject serialization operations when we know the
+ * raw footprint of the query exceeds 80% of RAM.
  */
 
 #include "monetdb_config.h"
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Comment fixes.

2013-10-29 Thread Sjoerd Mullender
Changeset: 669b7b7851e4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=669b7b7851e4
Modified Files:
gdk/gdk_join.c
Branch: default
Log Message:

Comment fixes.


diffs (28 lines):

diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -488,8 +488,9 @@ mergejoin(BAT *r1, BAT *r2, BAT *l, BAT 
 * if we're not inserting NILs for missing
 * values in r (nil_on_miss set, i.e., outer
 * join).
-* The next value to in r is the first if
-* equal_order is set, the last otherwise. */
+* The next value to match in r is the first
+* if equal_order is set, the last
+* otherwise. */
if (rcand) {
if (rcand == rcandend)
break;
@@ -1885,10 +1886,10 @@ BATsubjoin(BAT **r1p, BAT **r2p, BAT *l,
/* only right has hash, don't swap */
swap = 0;
} else if (l-tsorted || l-trevsorted) {
-   /* left is sorted, swap */
+   /* only left is sorted, swap */
return mergejoin(r2, r1, r, l, sr, sl, nil_matches, 0, 0, 0);
} else if (r-tsorted || r-trevsorted) {
-   /* right is sorted, don't swap */
+   /* only right is sorted, don't swap */
return mergejoin(r1, r2, l, r, sl, sr, nil_matches, 0, 0, 0);
} else if (BATcount(l)  BATcount(r)) {
/* no hashes, not sorted, create hash on smallest BAT */
___
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Comment fixes.

2013-02-12 Thread Sjoerd Mullender
Changeset: 24ce19223683 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=24ce19223683
Modified Files:
monetdb5/extras/rdf/rdf_shredder.mx
sql/scripts/30_rdf.sql
Branch: default
Log Message:

Comment fixes.


diffs (32 lines):

diff --git a/monetdb5/extras/rdf/rdf_shredder.mx 
b/monetdb5/extras/rdf/rdf_shredder.mx
--- a/monetdb5/extras/rdf/rdf_shredder.mx
+++ b/monetdb5/extras/rdf/rdf_shredder.mx
@@ -318,13 +318,13 @@ parserData_create (str location, BAT** g
  * @-
  * After the RDF document has been shredded into 3 bats and a lexical value
  * dictionary, a post-shred processing step follows that orders the lexical
- * dictionary, re-maps oids to match the ordered dictionary and finaly creates
+ * dictionary, re-maps oids to match the ordered dictionary and finally creates
  * all 6 permutations of the (subject, predicate, object) order.
  *
  * However, it is still to be examined if it worth the time to refine the order
  * of the last column. In most cases, during query time, the last column will 
need
- * to be re-order for a subsequent sort-merge join. We introduce sort3 and 
sort2
- * so we can investigate both possibilities. In addition, the first column 
need to
+ * to be re-ordered for a subsequent sort-merge join. We introduce order3 and 
order2
+ * so we can investigate both possibilities. In addition, the first column 
needs to
  * be stored only once for each couple of orders with the same first column. 
For
  * example, it holds that S_SPO == S_SOP.
  */
diff --git a/sql/scripts/30_rdf.sql b/sql/scripts/30_rdf.sql
--- a/sql/scripts/30_rdf.sql
+++ b/sql/scripts/30_rdf.sql
@@ -26,7 +26,7 @@ create schema rdf;
 create table rdf.graph (gname string, gid int);
 
 -- create a procudure to load an RDF document
--- the chema string should be removed in the future and auto-fill it from
+-- the schema string should be removed in the future and auto-fill it from
 -- the backend
 create procedure rdf_shred(location string, gname string, sch string)
external name sql.rdfshred;
___
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Comment changes/fixes.

2013-02-04 Thread Sjoerd Mullender
Changeset: 835cbed94e4e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=835cbed94e4e
Modified Files:
gdk/gdk_calc.c
Branch: default
Log Message:

Comment changes/fixes.


diffs (21 lines):

diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -46,7 +46,7 @@
 #define FMToid OIDFMT
 
 /* Most of the internal routines return a count of the number of NIL
- * values the produced.  They indicate an error by returning a value
+ * values they produced.  They indicate an error by returning a value
  * = BUN_NONE.  BUN_NONE means that the error was dealt with by
  * calling GDKerror (generally for overflow or conversion errors).
  * BUN_NONE+1 is returned by the DIV and MOD functions to indicate
@@ -81,6 +81,8 @@ checkbats(BAT *b1, BAT *b2, const char *
end = (i) + 1;  \
}
 
+/* fill in NILs from low to high, used to write NILs before and after
+ * the range that the candidates list covers */
 #define CANDLOOP(dst, i, NIL, low, high)   \
do {\
for ((i) = (low); (i)  (high); (i)++)  \
___
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Comment and whitespace changes.

2012-08-01 Thread Sjoerd Mullender
Changeset: f7053323c597 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f7053323c597
Modified Files:
monetdb5/extras/mal_optimizer_template/opt_sql_append.c
Branch: default
Log Message:

Comment and whitespace changes.


diffs (117 lines):

diff --git a/monetdb5/extras/mal_optimizer_template/opt_sql_append.c 
b/monetdb5/extras/mal_optimizer_template/opt_sql_append.c
--- a/monetdb5/extras/mal_optimizer_template/opt_sql_append.c
+++ b/monetdb5/extras/mal_optimizer_template/opt_sql_append.c
@@ -3,14 +3,14 @@
  * 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-2012 MonetDB B.V.
@@ -51,7 +51,8 @@
  *
  * i.e., handing a BAT view v2 of BAT v0 as argument to the sql.append()
  * statement, rather than the original BAT v0.
- * My advice, always use new variable names, it may capture some easy to make 
errors.
+ * My advice, always use new variable names, it may capture some easy
+ * to make errors.
  *
  * As a refinement, patterns like
  *
@@ -77,7 +78,7 @@
 /*
  * It is mandatory to make optimizers part of the 'optimizer' module.
  * This allows the optimizer implementation to find them and react on them.
-*/
+ */
 #include monetdb_config.h
 #include opt_sql_append.h
 #include mal_interpreter.h
@@ -164,9 +165,11 @@ OPTsql_appendImplementation(Client cntxt
/* look for
 *  v5 := ... v0 ...;
 */
-   /* an expensive loop, better would be to remember that 
v0 has a different role.
-* A typical method is to keep a map from variable - 
instruction where it was
-* detected. Then you can check each assignment for use 
of v0
+   /* an expensive loop, better would be to remember that 
v0
+* has a different role.  A typical method is to keep a
+* map from variable - instruction where it was
+* detected. Then you can check each assignment for use 
of
+* v0
*/
for (j = i+1; !found   j  limit; j++)
for (k = old[j]-retc; !found  k  
old[j]-argc; k++)
@@ -182,8 +185,11 @@ OPTsql_appendImplementation(Client cntxt
 
/* push new v1 := aggr.count( v0 ); unless 
already available */
if (q1 == NULL) {
-   /* use mal_builder.h primitives q1 = 
newStmt(mb, aggrRef,countRef); setArgType(mb,q1,TYPE_wrd) */
-   /* it will be added to the block and 
even my re-use MAL instructions */
+   /* use mal_builder.h primitives
+* q1 = newStmt(mb, aggrRef,countRef);
+* setArgType(mb,q1,TYPE_wrd) */
+   /* it will be added to the block and 
even my
+* re-use MAL instructions */
q1 = newInstruction(mb,ASSIGNsymbol);
getArg(q1,0) = newTmpVariable(mb, 
TYPE_wrd);
setModuleId(q1, aggrRef);
@@ -193,7 +199,8 @@ OPTsql_appendImplementation(Client cntxt
}
 
/* push new v2 := algebra.slice( v0, 0, v1 ); */
-   /* use mal_builder.h primitives q1 = 
newStmt(mb, algebraRef,sliceRef); */
+   /* use mal_builder.h primitives
+* q1 = newStmt(mb, algebraRef,sliceRef); */
q2 = newInstruction(mb,ASSIGNsymbol);
getArg(q2,0) = newTmpVariable(mb, TYPE_any);
setModuleId(q2, algebraRef);
@@ -242,17 +249,17 @@ OPTsql_appendImplementation(Client cntxt
  */
 
 /* Optimizer code wrapper
-The optimizer wrapper code is the interface to the MAL optimizer calls.
-It prepares the environment for the optimizers to do their work and removes
-the call itself to avoid endless recursions.
-
-Before an optimizer is finished, it should leave a clean state behind.
-Moreover, the information of the optimization step is saved for
-debugging and analysis.
-

MonetDB: default - Comment fix.

2012-07-24 Thread Sjoerd Mullender
Changeset: 4dbe32c8656e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4dbe32c8656e
Modified Files:
gdk/gdk_search.c
Branch: default
Log Message:

Comment fix.


diffs (29 lines):

diff --git a/gdk/gdk_search.c b/gdk/gdk_search.c
--- a/gdk/gdk_search.c
+++ b/gdk/gdk_search.c
@@ -462,7 +462,7 @@ SORTfndwhich(BAT *b, const void *v, int 
if (which  0) {
end = lo;
if (lo = hi || atom_GE(BUNtail(bi, lo), v, b-ttype)) {
-   /* shortcut: if BAT is empty of first (and
+   /* shortcut: if BAT is empty or first (and
 * hence all) tail value is = v, we're
 * done */
return lo;
@@ -470,7 +470,7 @@ SORTfndwhich(BAT *b, const void *v, int 
} else if (which  0) {
end = hi;
if (lo = hi || atom_LE(BUNtail(bi, hi - 1), v, b-ttype)) {
-   /* shortcut: if BAT is empty of last (and
+   /* shortcut: if BAT is empty or last (and
 * hence all) tail value is = v, we're
 * done */
return hi;
@@ -542,6 +542,7 @@ SORTfndwhich(BAT *b, const void *v, int 
 BUN
 SORTfnd(BAT *b, const void *v)
 {
+   /* works on HEAD column! */
return SORTfndwhich(BATmirror(b), v, 0);
 }
 
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - comment about future work

2010-08-19 Thread Niels Nes
Changeset: 32ef46b52453 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=32ef46b52453
Modified Files:
sql/src/server/rel_optimizer.mx
Branch: default
Log Message:

comment about future work


diffs (19 lines):

diff -r e0562ba062d9 -r 32ef46b52453 sql/src/server/rel_optimizer.mx
--- a/sql/src/server/rel_optimizer.mx   Thu Aug 19 18:04:27 2010 +0200
+++ b/sql/src/server/rel_optimizer.mx   Thu Aug 19 18:05:06 2010 +0200
@@ -3735,6 +3735,15 @@
 }
 #endif
 
+   /* TODO
+   expensive (functions) in select and/or join expressions should
+   be push-up into new projections after (ie executed when the
+   tables are reduced allready).
+
+   select bla = true/false should be rewriten into select bla.
+   and not(bla).
+   (were bla is an compare expression)
+   */
/* make parts conditional (via debug flag) */
 
/* simple merging of projects */
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list