Changeset: c3e44e2c9e9e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c3e44e2c9e9e
Modified Files:
sql/backends/monet5/bin_partition.c
sql/backends/monet5/bin_partition_by_slice.c
sql/backends/monet5/sql_pp_statement.c
sql/backends/monet5/sql_pp_statement.h
Branch: pp_hashjoin
Log Message:
more windows casts added
diffs (140 lines):
diff --git a/sql/backends/monet5/bin_partition.c
b/sql/backends/monet5/bin_partition.c
--- a/sql/backends/monet5/bin_partition.c
+++ b/sql/backends/monet5/bin_partition.c
@@ -59,9 +59,9 @@ pp_nr_slices(sql_rel *rel)
if (est < PP_MIN_SIZE)
nr_slices = 1;
else if (est/GDKnr_threads < PP_MIN_SIZE)
- nr_slices = est/PP_MIN_SIZE;
+ nr_slices = (int)(est/PP_MIN_SIZE);
else
- nr_slices = est/PP_MAX_SIZE;
+ nr_slices = (int)(est/PP_MAX_SIZE);
FORCEMITODEBUG
if (nr_slices < GDKnr_threads)
nr_slices = GDKnr_threads;
diff --git a/sql/backends/monet5/bin_partition_by_slice.c
b/sql/backends/monet5/bin_partition_by_slice.c
--- a/sql/backends/monet5/bin_partition_by_slice.c
+++ b/sql/backends/monet5/bin_partition_by_slice.c
@@ -45,7 +45,7 @@ exp_getcard(mvc *sql, sql_rel *rel, sql_
prop *p;
if ((p = find_prop(e->p, PROP_NUNIQUES)))
- est = p->value.dval;
+ est = (BUN)p->value.dval;
if (est == BUN_NONE || (ulng) est > (ulng) GDK_lng_max) {
cnt = 85000000;
@@ -238,7 +238,7 @@ rel_groupby_prepare_pp(list **aggrresult
sql_exp *e = n->data;
if (!exp_is_scalar(e)) {
sql_subtype *t = exp_subtype(e);
- stmt *s = stmt_bat_new(be, t,
estimate*1.1);
+ stmt *s = stmt_bat_new(be, t,
(lng)(estimate*1.1));
if (!s)
return NULL;
append(*serializedresults, s);
@@ -262,7 +262,7 @@ rel_groupby_prepare_pp(list **aggrresult
for(node *n = obe->h; n; n = n->next) {
sql_exp *e = n->data;
sql_subtype *t = exp_subtype(e);
- stmt *s = stmt_bat_new(be, t,
estimate*1.1);
+ stmt *s = stmt_bat_new(be, t,
(lng)(estimate*1.1));
if (!s)
return NULL;
append(*serializedresults, s);
@@ -321,7 +321,7 @@ rel_groupby_prepare_pp(list **aggrresult
list *gbexps = rel->r;
if (need_serialize) {
- stmt *s = stmt_bat_new(be,
sql_fetch_localtype(TYPE_oid), estimate*1.1);
+ stmt *s = stmt_bat_new(be,
sql_fetch_localtype(TYPE_oid), (lng)(estimate*1.1));
if (!s)
return NULL;
append(*serializedresults, s);
@@ -363,7 +363,7 @@ rel_groupby_prepare_pp(list **aggrresult
int need_distinct = need_distinct(e);
if (need_distinct) { /* need reduced group
(ids) result */
- stmt *s = stmt_bat_new(be,
sql_fetch_localtype(TYPE_oid), estimate*1.1);
+ stmt *s = stmt_bat_new(be,
sql_fetch_localtype(TYPE_oid), (lng)(estimate*1.1));
if (!s)
return NULL;
append(*serializedresults, s);
@@ -372,7 +372,7 @@ rel_groupby_prepare_pp(list **aggrresult
sql_exp *e = n->data;
if (!exp_is_scalar(e)) {
sql_subtype *t = exp_subtype(e);
- stmt *s = stmt_bat_new(be, t,
estimate*1.1);
+ stmt *s = stmt_bat_new(be, t,
(lng)(estimate*1.1));
if (!s)
return NULL;
append(*serializedresults, s);
@@ -400,7 +400,7 @@ rel_groupby_prepare_pp(list **aggrresult
for(node *n = obe->h; n; n = n->next) {
sql_exp *e = n->data;
sql_subtype *t = exp_subtype(e);
- stmt *s = stmt_bat_new(be, t,
estimate*1.1);
+ stmt *s = stmt_bat_new(be, t,
(lng)(estimate*1.1));
if (!s)
return NULL;
append(*serializedresults, s);
@@ -414,7 +414,7 @@ rel_groupby_prepare_pp(list **aggrresult
if (avg && EC_APPNUM(t->type->eclass) && it &&
!EC_APPNUM(it->type->eclass))
t = it;
- stmt *s = nrparts?stmt_mat_new(be, t,
256):stmt_bat_new(be, t, estimate*1.1);
+ stmt *s = nrparts?stmt_mat_new(be, t,
256):stmt_bat_new(be, t, (lng)(estimate*1.1));
if (s == NULL)
return NULL;
append(shared, &s->nr);
@@ -422,14 +422,14 @@ rel_groupby_prepare_pp(list **aggrresult
if (avg || sum) { /* remainder (or compensation) and
count */
s = nrparts?stmt_mat_new(be,
EC_APPNUM(t->type->eclass) ? t: sql_fetch_localtype(TYPE_lng), 256):
- stmt_bat_new(be,
EC_APPNUM(t->type->eclass) ? t: sql_fetch_localtype(TYPE_lng), estimate*1.1);
+ stmt_bat_new(be,
EC_APPNUM(t->type->eclass) ? t: sql_fetch_localtype(TYPE_lng),
(lng)(estimate*1.1));
if (s == NULL)
return NULL;
append(shared, &s->nr);
append(*aggrresults, &s->nr);
s = nrparts?stmt_mat_new(be,
sql_fetch_localtype(TYPE_lng), 256):
- stmt_bat_new(be,
sql_fetch_localtype(TYPE_lng), estimate*1.1);
+ stmt_bat_new(be,
sql_fetch_localtype(TYPE_lng), (lng)(estimate*1.1));
if (s == NULL)
return NULL;
append(shared, &s->nr);
diff --git a/sql/backends/monet5/sql_pp_statement.c
b/sql/backends/monet5/sql_pp_statement.c
--- a/sql/backends/monet5/sql_pp_statement.c
+++ b/sql/backends/monet5/sql_pp_statement.c
@@ -448,7 +448,7 @@ stmt_unique_sharedout(backend *be, stmt
}
stmt *
-stmt_oahash_new(backend *be, sql_subtype *tpe, int estimate, int parent, int
nrparts)
+stmt_oahash_new(backend *be, sql_subtype *tpe, lng estimate, int parent, int
nrparts)
{
InstrPtr q = newStmt(be->mb, nrparts?putName("mat"):putName("oahash"),
newRef);
if (q == NULL)
@@ -459,7 +459,7 @@ stmt_oahash_new(backend *be, sql_subtype
int tt = tpe->type->localtype;
setVarType(be->mb, getArg(q, 0), newBatType(tt)); /* ht_sink */
q = pushType(be->mb, q, tt);
- q = pushInt(be->mb, q, estimate);
+ q = pushLng(be->mb, q, estimate);
if (nrparts)
q = pushArgument(be->mb, q, nrparts);
if (parent)
diff --git a/sql/backends/monet5/sql_pp_statement.h
b/sql/backends/monet5/sql_pp_statement.h
--- a/sql/backends/monet5/sql_pp_statement.h
+++ b/sql/backends/monet5/sql_pp_statement.h
@@ -17,7 +17,7 @@ extern bool get_need_pipeline(backend *b
extern void set_pipeline(backend *be, stmt *pp);
extern stmt * get_pipeline(backend *be);
-extern stmt *stmt_oahash_new(backend *be, sql_subtype *tpe, int estimate, int
parent, int nrparts);
+extern stmt *stmt_oahash_new(backend *be, sql_subtype *tpe, lng estimate, int
parent, int nrparts);
extern stmt *stmt_oahash_hshmrk_init(backend *be, stmt *stmts_ht, bool moveup);
extern stmt *stmt_oahash_build_ht(backend *be, stmt *ht, stmt *key, stmt
*prnt, const stmt *pp);
extern stmt *stmt_oahash_frequency(backend *be, stmt *freq, stmt *prnt, bool
occ_cnt, const stmt *pp);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]