Changeset: d0e6ebf36c11 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d0e6ebf36c11 Modified Files: monetdb5/modules/kernel/arrays.c monetdb5/modules/kernel/arrays.h monetdb5/modules/kernel/arrays.mal sql/backends/monet5/sql_gencode.c Branch: arrays Log Message:
after projecting the array values we do not need the dims anymore diffs (88 lines): diff --git a/monetdb5/modules/kernel/arrays.c b/monetdb5/modules/kernel/arrays.c --- a/monetdb5/modules/kernel/arrays.c +++ b/monetdb5/modules/kernel/arrays.c @@ -568,7 +568,7 @@ str ALGnonDimensionLeftfetchjoin1(bat* r return MAL_SUCCEED; } -str ALGnonDimensionLeftfetchjoin2(bat* result, ptr *dimsRes, const ptr *array_in, const bat *vals, const ptr *dims) { +str ALGnonDimensionLeftfetchjoin2(bat* result, const ptr *array_in, const bat *vals, const ptr *dims) { BAT *materialisedBAT = NULL; BAT *nonDimensionalBAT = NULL; BUN totalCellsNum, neededCellsNum; @@ -598,7 +598,7 @@ str ALGnonDimensionLeftfetchjoin2(bat* r BBPkeepref(*result = nonDimensionalBAT->batCacheid); //sent this to the output so that we do not lose it afterwards - *dimsRes = array; + // *dimsRes = array; return MAL_SUCCEED; } diff --git a/monetdb5/modules/kernel/arrays.h b/monetdb5/modules/kernel/arrays.h --- a/monetdb5/modules/kernel/arrays.h +++ b/monetdb5/modules/kernel/arrays.h @@ -19,8 +19,8 @@ algebra_export str ALGdimensionLeftfetch algebra_export str ALGdimensionLeftfetchjoin3(bat* result, const ptr* dimsCands, const ptr *array); algebra_export str ALGnonDimensionLeftfetchjoin1(bat* result, const bat* mbrOids, const bat *vals, const ptr *dims); -algebra_export str ALGnonDimensionLeftfetchjoin2(bat* result, ptr* dimsRes, const ptr *array, const bat *vals, const ptr *dims); -algebra_export str ALGnonDimensionLeftfetchjoin3(bat* result, const ptr *dimsCands, const bat *vals, const ptr *dims); +algebra_export str ALGnonDimensionLeftfetchjoin2(bat* result, const ptr *array, const bat *vals, const ptr *dims); +//algebra_export str ALGnonDimensionLeftfetchjoin3(bat* result, const ptr *dimsCands, const bat *vals, const ptr *dims); algebra_export str ALGdimensionSubselect2(ptr *dimsRes, const ptr *dim, const ptr* dims, const ptr *dimsCands, const void *low, const void *high, const bit *li, const bit *hi, const bit *anti); 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 @@ -22,11 +22,11 @@ address ALGdimensionLeftfetchjoin3; command algebra.leftfetchjoin(mbrBAT:bat[:oid,:oid], vals:bat[:oid,:any], dims:ptr ) :bat[:oid,:any] address ALGnonDimensionLeftfetchjoin1; #it is called when joining with the array (like tids). It adds NULLs (should add the default value) to missing values -command algebra.leftfetchjoin(array:ptr,vals:bat[:oid,:any],dims:ptr) (:bat[:oid,:any], :ptr) +command algebra.leftfetchjoin(array:ptr,vals:bat[:oid,:any], dims:ptr) :bat[:oid,:any] address ALGnonDimensionLeftfetchjoin2; #it is called when after joining two arrays on the dimensions -command algebra.leftfetchjoin(dimsCands:ptr,vals:bat[:oid,:any],dims:ptr) :bat[:oid,:any] -address ALGnonDimensionLeftfetchjoin3; +#command algebra.leftfetchjoin(dimsCands:ptr,vals:bat[:oid,:any],dims:ptr) :bat[:oid,:any] +#address ALGnonDimensionLeftfetchjoin3; #subselection in dimensions #the first result is the mbr and the second is the oids that satisfy the conditiont 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 @@ -1976,8 +1976,8 @@ static int /* projections, ie left is void headed */ q = newStmt1(mb, algebraRef, "leftfetchjoin"); - if(s->op1->type == st_tid && s->op2->type == st_bat && isArray(s->op2->op4.cval->t)) - q = pushReturn(mb, q, newTmpVariable(mb, TYPE_ptr)); +// if(s->op1->type == st_tid && s->op2->type == st_bat && isArray(s->op2->op4.cval->t)) +// q = pushReturn(mb, q, newTmpVariable(mb, TYPE_ptr)); q = pushArgument(mb, q, l); snprintf(nme, SMALLBUFSIZ, "Y_%d", l); @@ -1993,13 +1993,13 @@ static int return -1; s->nr = getDestVar(q); - if(s->op1->type == st_tid && s->op2->type == st_bat && isArray(s->op2->op4.cval->t)) { - /* left fetch join on a non-dimensional column and the tid - * I need to return also the pointer to dims or it will be lost afterwards */ - - /* rename second result */ - renameVariable(mb, getArg(q, 1), "Y_%d", s->nr); - } +// if(s->op1->type == st_tid && s->op2->type == st_bat && isArray(s->op2->op4.cval->t)) { +// /* left fetch join on a non-dimensional column and the tid +// * I need to return also the pointer to dims or it will be lost afterwards */ +// +// /* rename second result */ +// renameVariable(mb, getArg(q, 1), "Y_%d", s->nr); +// } return s->nr; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list