Changeset: 40062e55100f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40062e55100f Modified Files: monetdb5/modules/kernel/arrays.mal sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_statement.h Branch: arrays Log Message:
removed project cells. we will try to delay projection even more diffs (161 lines): diff --git a/monetdb5/modules/kernel/arrays.mal b/monetdb5/modules/kernel/arrays.mal --- a/monetdb5/modules/kernel/arrays.mal +++ b/monetdb5/modules/kernel/arrays.mal @@ -1,8 +1,10 @@ #It gets the candidates and projects the dimensions -command algebra.leftfetchjoin(cands:bat[:oid,:oid], dim:ptr, dims:ptr ) :bat[:oid,:any] +#With project cells: command algebra.leftfetchjoin(cands:bat[:oid,:oid], dim:ptr, dims:ptr ) :bat[:oid,:any] +command algebra.leftfetchjoin(candDims:ptr, candBat:bat[:oid,:oid], dim:ptr, dims:ptr ) :bat[:oid,:any] address ALGdimensionLeftfetchjoin1; #it gets the candidates and the orojects a non-dimensional column -command algebra.leftfetchjoin(cands:bat[:oid,:oid], vals:bat[:oid,:any], dims:ptr ) :bat[:oid,:any] +#with project cells: command algebra.leftfetchjoin(cands:bat[:oid,:oid], vals:bat[:oid,:any], dims:ptr ) :bat[:oid,:any] +command algebra.leftfetchjoin(candDims:ptr, candBat:bat[:oid,:oid], vals:bat[:oid,:any], dims:ptr ) :bat[:oid,:any] address ALGnonDimensionLeftfetchjoin1; #it is called when projecting a non-dimensional column of an array command algebra.leftfetchjoin(tids:bat[:oid,:oid],vals:bat[:oid,:any],dims:ptr) (:bat[:oid,:any], :ptr) diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -2581,6 +2581,7 @@ static int pushDimensionSelections(stmt return changes; } +/* static stmt* addCells(mvc *sql, stmt *s) { //find where the selections over the dimensions start and put an st_cells if((s->type == st_uselect || s->type == st_uselect2) && s->op1->type == st_dimension) { @@ -2591,7 +2592,7 @@ static stmt* addCells(mvc *sql, stmt *s) // s->op3 = addCells(sql, s->op3); return s; } -/* + static stmt *projectCells(mvc *sql, stmt* s) { if(s->type == st_list) { node *n; @@ -2667,8 +2668,8 @@ rel2bin_select( mvc *sql, sql_rel *rel, //if there are selections on dimensions they should be performed at the beggining while(pushDimensionSelections(&sel)); - //if it is an array we need to project the cells - sel = addCells(sql, sel); + ////if it is an array we need to project the cells + //sel = addCells(sql, sel); /* construct relation */ diff --git a/sql/backends/monet5/sql_gencode.c b/sql/backends/monet5/sql_gencode.c --- a/sql/backends/monet5/sql_gencode.c +++ b/sql/backends/monet5/sql_gencode.c @@ -149,10 +149,10 @@ dump_header(mvc *sql, MalBlkPtr mb, stmt size_t fqtnl; char *fqtn; - if(c->type == st_cells) { - fprintf(stderr, "dump_header: st_cells in output ignored\n"); - continue; - } +// if(c->type == st_cells) { +// fprintf(stderr, "dump_header: st_cells in output ignored\n"); +// continue; +// } t = tail_type(c); tname = table_name(sql->sa, c); sname = schema_name(sql->sa, c); @@ -2799,8 +2799,8 @@ static int if (q == NULL) return -1; } break; - case st_cells: { - int l; +/* REMOVED IT case st_cells: { + int l; char nme[SMALLBUFSIZ]; int uval = -1; @@ -2819,7 +2819,7 @@ static int if (q == NULL) return -1; s->nr = getDestVar(q); - } break; + } break; */ case st_dimension: { sql_table *t = s->op4.dval->t; diff --git a/sql/backends/monet5/sql_statement.c b/sql/backends/monet5/sql_statement.c --- a/sql/backends/monet5/sql_statement.c +++ b/sql/backends/monet5/sql_statement.c @@ -403,7 +403,7 @@ stmt_deps(list *dep_list, stmt *s, int d case st_atom: case st_trans: case st_catalog: - case st_cells: +// case st_cells: case st_dimension: break; } @@ -822,6 +822,7 @@ stmt_atom(sql_allocator *sa, atom *op1) return s; } +#if 0 stmt* stmt_cells(sql_allocator *sa, stmt *dims) { stmt *s = stmt_create(sa, st_cells); @@ -829,14 +830,11 @@ stmt* stmt_cells(sql_allocator *sa, stmt s->nrcols = dims->nrcols; return s; } +#endif /*called when the column belongs to an array*/ stmt* stmt_column(sql_allocator *sa, sql_column* col) { //, sql_table *t) { -// stmt *arr = stmt_cells(sa, t); stmt *c = stmt_bat(sa, col, RDONLY); - - //join the dimension with the cells -// return stmt_project(sa, arr, c); return c; } @@ -879,7 +877,6 @@ stmt * stmt_uselect(sql_allocator *sa, stmt *op1, stmt *op2, comp_type cmptype, stmt *sub) { stmt *s = stmt_create(sa, st_uselect); -// stmt *cls = stmt_create(sa, st_cells); s->op1 = op1; s->op2 = op2; @@ -1427,8 +1424,8 @@ char *_column_name(sql_allocator *sa, st char * column_name(sql_allocator *sa, stmt *st) { - if(st->type == st_cells) - return "cells"; +// if(st->type == st_cells) +// return "cells"; if (!st->cname) st->cname = _column_name(sa, st); return st->cname; diff --git a/sql/backends/monet5/sql_statement.h b/sql/backends/monet5/sql_statement.h --- a/sql/backends/monet5/sql_statement.h +++ b/sql/backends/monet5/sql_statement.h @@ -102,7 +102,7 @@ typedef enum stmt_type { st_return, st_assign, - st_cells, +// st_cells, st_dimension } st_type; @@ -176,7 +176,7 @@ extern stmt *stmt_atom_wrd(sql_allocator extern stmt *stmt_atom_wrd_nil(sql_allocator *sa); extern stmt *stmt_bool(sql_allocator *sa, int b); -extern stmt *stmt_cells(sql_allocator *sa, stmt* dims); +//extern stmt *stmt_cells(sql_allocator *sa, stmt* dims); extern stmt *stmt_dimension(sql_allocator *sa, sql_dimension *dim); extern stmt *stmt_column(sql_allocator *sa, sql_column *col); //, sql_table *t); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list