Changeset: 4c6be8caaf2f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/4c6be8caaf2f Modified Files: sql/server/rel_optimize_proj.c sql/server/rel_optimize_sel.c sql/test/emptydb/Tests/check.stable.out.int128 Branch: cleanup_types Log Message:
merged with default diffs (94 lines): diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c --- a/gdk/gdk_logger.c +++ b/gdk/gdk_logger.c @@ -3428,13 +3428,11 @@ log_printinfo(logger *lg) printf("number of flushers: %d\n", (int) ATOMIC_GET(&lg->nr_flushers)); printf("number of catalog entries "BUNFMT", of which "BUNFMT" deleted\n", lg->catalog_bid->batCount, lg->dcatalog->batCount); - int npend = 0; for (logged_range *p = lg->pending; p; p = p->next) { char buf[32]; if (p->output_log == NULL || snprintf(buf, sizeof(buf), ", file size %"PRIu64, (uint64_t) getfilepos(getFile(lg->current->output_log))) >= (int) sizeof(buf)) buf[0] = 0; printf("pending range "ULLFMT": drops %"PRIu64", last_ts %"PRIu64", flushed_ts %"PRIu64", refcount %"PRIu64"%s%s\n", p->id, (uint64_t) ATOMIC_GET(&p->drops), (uint64_t) ATOMIC_GET(&p->last_ts), (uint64_t) ATOMIC_GET(&p->flushed_ts), (uint64_t) ATOMIC_GET(&p->refcount), buf, p == lg->current ? " (current)" : ""); - npend++; } } diff --git a/monetdb5/modules/mal/txtsim.c b/monetdb5/modules/mal/txtsim.c --- a/monetdb5/modules/mal/txtsim.c +++ b/monetdb5/modules/mal/txtsim.c @@ -450,10 +450,16 @@ typedef struct { static inline int popcount64(uint64_t x) { +#if defined(__GNUC__) + return (uint32_t) __builtin_popcountll(x); +#elif defined(_MSC_VER) + return (uint32_t) __popcnt64(x); +#else x = (x & 0x5555555555555555ULL) + ((x >> 1) & 0x5555555555555555ULL); x = (x & 0x3333333333333333ULL) + ((x >> 2) & 0x3333333333333333ULL); x = (x & 0x0F0F0F0F0F0F0F0FULL) + ((x >> 4) & 0x0F0F0F0F0F0F0F0FULL); return (x * 0x0101010101010101ULL) >> 56; +#endif } static int diff --git a/sql/server/rel_optimize_proj.c b/sql/server/rel_optimize_proj.c --- a/sql/server/rel_optimize_proj.c +++ b/sql/server/rel_optimize_proj.c @@ -2935,7 +2935,7 @@ rel_groupjoin(visitor *v, sql_rel *rel) } } if (nr == list_length(gbes)) { - printf("#group by converted\n"); + // printf("#group by converted\n"); j = rel_dup(j); j->attr = rel->exps; v->changes++; diff --git a/sql/server/rel_optimize_sel.c b/sql/server/rel_optimize_sel.c --- a/sql/server/rel_optimize_sel.c +++ b/sql/server/rel_optimize_sel.c @@ -3000,7 +3000,7 @@ rel_simplify_project_fk_join(mvc *sql, s if (!list_empty(r->attr)) { nr = rel_groupby(sql, nr, NULL); if (nr) { - printf("# introduced groupby \n"); + // printf("# introduced groupby \n"); nr->r = append(sa_list(sql->sa), le); nr->exps = r->attr; } @@ -3636,7 +3636,7 @@ rel_select_leftgroup_2_semi(visitor *v, sql_exp *a = attrs->h->data; if (exps_find_exp(l->attr, e->l) && exp_is_true(e->r) && e->flag == cmp_equal /*&& exp_is_true(a)*/) { - printf("# optimize select leftgroup -> semi\n"); + // printf("# optimize select leftgroup -> semi\n"); if (!list_empty(l->exps)) { for(node *m = l->exps->h; m; m = m->next) { sql_exp *j = m->data; diff --git a/sql/test/emptydb/Tests/check.stable.out b/sql/test/emptydb/Tests/check.stable.out --- a/sql/test/emptydb/Tests/check.stable.out +++ b/sql/test/emptydb/Tests/check.stable.out @@ -1701,7 +1701,7 @@ select 'null in fkeys.delete_action', de [ "sys.functions", "json", "integer", "SYSTEM", "create function json.\"integer\"(js json) returns bigint external name json.\"integer\";", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "bigint", 64, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "isarray", "SYSTEM", "create function json.isarray(js json) returns bool external name json.isarray;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "isobject", "SYSTEM", "create function json.isobject(js json) returns bool external name json.isobject;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] -[ "sys.functions", "json", "isvalid", "SYSTEM", "create function json.isvalid(js json) returns bool begin return true; end;", "sql", "SQL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] +[ "sys.functions", "json", "isvalid", "SYSTEM", "create function json.isvalid(js json) returns bool begin return case when js is null then null else true end; end;", "sql", "SQL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "isvalid", "SYSTEM", "create function json.isvalid(js string) returns bool external name json.isvalid;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "clob", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "keyarray", "SYSTEM", "create function json.keyarray(js json) returns json external name json.keyarray;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "json", 0, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "length", "SYSTEM", "create function json.length(js json) returns integer external name json.length;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "int", 32, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] diff --git a/sql/test/emptydb/Tests/check.stable.out.32bit b/sql/test/emptydb/Tests/check.stable.out.32bit --- a/sql/test/emptydb/Tests/check.stable.out.32bit +++ b/sql/test/emptydb/Tests/check.stable.out.32bit @@ -1687,7 +1687,7 @@ select 'null in fkeys.delete_action', de [ "sys.functions", "json", "integer", "SYSTEM", "create function json.\"integer\"(js json) returns bigint external name json.\"integer\";", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "bigint", 64, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "isarray", "SYSTEM", "create function json.isarray(js json) returns bool external name json.isarray;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "isobject", "SYSTEM", "create function json.isobject(js json) returns bool external name json.isobject;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] -[ "sys.functions", "json", "isvalid", "SYSTEM", "create function json.isvalid(js json) returns bool begin return true; end;", "sql", "SQL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] +[ "sys.functions", "json", "isvalid", "SYSTEM", "create function json.isvalid(js json) returns bool begin return case when js is null then null else true end; end;", "sql", "SQL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "isvalid", "SYSTEM", "create function json.isvalid(js string) returns bool external name json.isvalid;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "boolean", 1, 0, "out", "js", "clob", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "keyarray", "SYSTEM", "create function json.keyarray(js json) returns json external name json.keyarray;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "json", 0, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] [ "sys.functions", "json", "length", "SYSTEM", "create function json.length(js json) returns integer external name json.length;", "json", "MAL", "Scalar function", false, false, false, true, NULL, "result", "int", 32, 0, "out", "js", "json", 0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ] _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org