[Monetdb-developers] [Monetdb-pf-checkins] pathfinder/compiler/algebra/opt opt_set.c, 1.1, 1.2

Maurice van Keulen m.vankeulen at utwente.nl
Fri Nov 17 15:34:06 CET 2006


Hi Jan,

I just thought: how does your duplicate generating scjoins relate to the
generalized scjoin I proposed in my TDM 2004-paper?
<http://db.cs.utwente.nl/Publications/PaperStore/db-utwente-0000003587.pdf>

Maurice.

Jan Rittinger wrote:
> Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
> In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23019/algebra/opt
>
> Modified Files:
> 	opt_set.c 
> Log Message:
> -- Rewrite scjoin operators into duplicate generating ones as intermediate
>    step. (This helps the join pushdown phase to push down more joins.)
>
>
> Index: opt_set.c
> ===================================================================
> RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_set.c,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -d -r1.1 -r1.2
> --- opt_set.c	13 Nov 2006 17:10:59 -0000	1.1
> +++ opt_set.c	17 Nov 2006 14:03:41 -0000	1.2
> @@ -50,6 +50,11 @@
>  #define L(p) ((p)->child[0])
>  /** starting from p, make a step right */
>  #define R(p) ((p)->child[1])
> +/** and so on ... */
> +#define LL(p) (L(L(p)))
> +#define LR(p) (R(L(p)))
> +#define RL(p) (L(R(p)))
> +#define RR(p) (R(R(p)))
>  
>  #define SEEN(p) ((p)->bit_dag)
>  
> @@ -71,6 +76,56 @@
>  
>      /* action code */
>      switch (p->kind) {
> +        case la_eqjoin:
> +            /* Rewrite scjoin into duplicate generating scjoins
> +               (underneath join operators). This hopefully allows
> +               the above join to be pushed down in a later phase. */
> +            if (PFprop_set (p->prop) &&
> +                L(p)->kind == la_scjoin &&
> +                PFprop_set (L(p)->prop)) {
> +                PFalg_att_t item_res;
> +                item_res = PFalg_ori_name (
> +                               PFalg_unq_name (att_item, 0),
> +                               ~(L(p)->sem.scjoin.item |
> +                                 L(p)->sem.scjoin.iter));
> +                *L(p) = *PFla_project (
> +                             PFla_dup_scjoin (
> +                                 LL(p),
> +                                 LR(p),
> +                                 L(p)->sem.scjoin.axis,
> +                                 L(p)->sem.scjoin.ty,
> +                                 L(p)->sem.scjoin.item,
> +                                 item_res),
> +                             PFalg_proj (L(p)->sem.scjoin.iter,
> +                                         L(p)->sem.scjoin.iter),
> +                             PFalg_proj (L(p)->sem.scjoin.item,
> +                                         item_res));
> +                break;
> +            }
> +            if (PFprop_set (p->prop) &&
> +                R(p)->kind == la_scjoin &&
> +                PFprop_set (R(p)->prop)) {
> +                PFalg_att_t item_res;
> +                item_res = PFalg_ori_name (
> +                               PFalg_unq_name (att_item, 0),
> +                               ~(R(p)->sem.scjoin.item |
> +                                 R(p)->sem.scjoin.iter));
> +                *R(p) = *PFla_project (
> +                             PFla_dup_scjoin (
> +                                 RL(p),
> +                                 RR(p),
> +                                 R(p)->sem.scjoin.axis,
> +                                 R(p)->sem.scjoin.ty,
> +                                 R(p)->sem.scjoin.item,
> +                                 item_res),
> +                             PFalg_proj (R(p)->sem.scjoin.iter,
> +                                         R(p)->sem.scjoin.iter),
> +                             PFalg_proj (R(p)->sem.scjoin.item,
> +                                         item_res));
> +                break;
> +            }
> +            break;
> +            
>          case la_distinct:
>              if (PFprop_set (p->prop))
>                  *p = *PFla_dummy (L(p));
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Monetdb-pf-checkins mailing list
> Monetdb-pf-checkins at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
>   

-- 
----------------------------------------------------------------------
Dr.Ir. M. van Keulen - Assistant Professor, Data Management Technology
Univ. of Twente, Dept of EEMCS, POBox 217, 7500 AE Enschede, Netherlands
Email: m.vankeulen at utwente.nl, Phone: +31 534893688, Fax: +31 534892927
Room: ZI 3039, WWW: http://www.cs.utwente.nl/~keulen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20061117/9590b0c9/attachment.html>


More information about the developers-list mailing list