Update of /cvsroot/monetdb/pathfinder/compiler/algebra/opt
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv29486/algebra/opt

Modified Files:
        opt_algebra_cse.c opt_complex.c opt_const.c opt_general.brg 
        opt_icol.c opt_join_pd.c opt_key.c opt_mvd.c opt_rank.c 
        opt_thetajoin.c 
Log Message:
- Implement pf:product(), pf:log() and pf:sqrt() for the algebra version.
  There is one remaining problem pf:product(()) returns 0 instead of 1.



U opt_algebra_cse.c
Index: opt_algebra_cse.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_algebra_cse.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- opt_algebra_cse.c   10 Mar 2009 09:54:40 -0000      1.48
+++ opt_algebra_cse.c   10 Mar 2009 12:20:40 -0000      1.49
@@ -95,6 +95,7 @@
     , [la_max]             = "la_max"
     , [la_min]             = "la_min"
     , [la_sum]             = "la_sum"
+    , [la_prod]            = "la_prod"
     , [la_count]           = "la_count"
     , [la_rownum]          = "la_rownum"
     , [la_rowrank]         = "la_rowrank"
@@ -997,6 +998,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
         case la_count:
             /* partition column is not necesserily set */
             if (IS_NULL(a->sem.aggr.part)?col_NULL:
@@ -1718,6 +1720,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
             return PFla_aggr (n->kind, CSE(L(n)),
                               create_unq_name (CSE(L(n))->schema,
                                                n->sem.aggr.res),
@@ -2319,6 +2322,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
             actmap = create_actcol_map ();
             INACTCOL (actmap,
                       actcol (cse->sem.aggr.res, ori->sem.aggr.res),

U opt_join_pd.c
Index: opt_join_pd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_join_pd.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- opt_join_pd.c       8 Jan 2009 16:54:09 -0000       1.60
+++ opt_join_pd.c       10 Mar 2009 12:20:40 -0000      1.61
@@ -292,6 +292,7 @@
             case la_max:
             case la_min:
             case la_sum:
+            case la_prod:
             case la_count:
             case la_seqty1:
             case la_all:
@@ -1237,6 +1238,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
         case la_count:
         case la_seqty1:
         case la_all:

U opt_rank.c
Index: opt_rank.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_rank.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- opt_rank.c  6 Feb 2009 13:01:12 -0000       1.15
+++ opt_rank.c  10 Mar 2009 12:20:40 -0000      1.16
@@ -689,6 +689,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
         case la_count:
         case la_seqty1:
         case la_all:

U opt_icol.c
Index: opt_icol.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_icol.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- opt_icol.c  8 Jan 2009 16:54:09 -0000       1.31
+++ opt_icol.c  10 Mar 2009 12:20:40 -0000      1.32
@@ -303,6 +303,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
         case la_count:
         case la_seqty1:
         case la_all:

U opt_const.c
Index: opt_const.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_const.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- opt_const.c 9 Mar 2009 14:59:50 -0000       1.44
+++ opt_const.c 10 Mar 2009 12:20:40 -0000      1.45
@@ -196,6 +196,7 @@
             break;
 
         case la_sum:
+        case la_prod:
             /* introduce attach if necessary */
             if (PFprop_const_left (p->prop, p->sem.aggr.col)) {
                 L(p) = add_attach (L(p), p->sem.aggr.col,
@@ -794,6 +795,7 @@
          result otherwise. */
          
         case la_sum:
+        case la_prod:
             /* if partitiong column is constant remove it
                and attach it after the operator */
             if (p->sem.aggr.part &&

U opt_general.brg
Index: opt_general.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_general.brg,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- opt_general.brg     17 Feb 2009 23:45:47 -0000      1.65
+++ opt_general.brg     10 Mar 2009 12:20:40 -0000      1.66
@@ -158,6 +158,7 @@
 %term  fun_param       =  91
 %term  fun_frag_param  =  92
 %term  string_join     = 102
+%term  prod            = 110
 %term  dummy           = 120
 
 %%
@@ -364,6 +365,9 @@
                     Rec),
                 Rel)                              = 197  (0);
 
+Rel:    prod (Rel)                                = 198 (10);
+EmptyRel:    prod (EmptyRel)                      = 199  (0);
+
 %%
 
 #include "algebra_mnemonic.h"
@@ -1533,6 +1537,9 @@
             SEEN(p) = false;
             relabel (p, kids);
             break;
+        case 199:
+           /* INCOMPLETE, GENERATE A CONSTANT '1' HERE */
+           /* fall through */
 
         default:
             /* every occurrence of EmptyRel already copes with

U opt_complex.c
Index: opt_complex.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_complex.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- opt_complex.c       9 Mar 2009 14:48:13 -0000       1.71
+++ opt_complex.c       10 Mar 2009 12:20:40 -0000      1.72
@@ -2467,6 +2467,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
         case la_count:
         case la_rank:
         case la_type:

U opt_thetajoin.c
Index: opt_thetajoin.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_thetajoin.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- opt_thetajoin.c     10 Mar 2009 09:54:45 -0000      1.39
+++ opt_thetajoin.c     10 Mar 2009 12:20:40 -0000      1.40
@@ -1171,6 +1171,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
         case la_count:
         case la_seqty1:
         case la_all:

U opt_mvd.c
Index: opt_mvd.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_mvd.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- opt_mvd.c   1 Feb 2009 22:34:20 -0000       1.49
+++ opt_mvd.c   10 Mar 2009 12:20:40 -0000      1.50
@@ -1047,6 +1047,9 @@
     case la_sum:
         modified = modify_aggr (p, la_sum) || modified;
         break;
+    case la_prod:
+        modified = modify_aggr (p, la_prod) || modified;
+        break;
     case la_count:
         /* An expression that contains the partitioning column is
            independent of the aggregate. The translation thus moves the

U opt_key.c
Index: opt_key.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/opt/opt_key.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- opt_key.c   8 Jan 2009 16:54:09 -0000       1.21
+++ opt_key.c   10 Mar 2009 12:20:40 -0000      1.22
@@ -81,6 +81,7 @@
         case la_max:
         case la_min:
         case la_sum:
+        case la_prod:
         case la_seqty1:
         case la_all:
             /* if part is key we already have our aggregate */


------------------------------------------------------------------------------
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to