Changeset: 4069a36b0609 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4069a36b0609
Modified Files:
        monetdb5/optimizer/Tests/All
        monetdb5/optimizer/Tests/ESexample.mal
        monetdb5/optimizer/Tests/ESexample.stable.out
        monetdb5/optimizer/opt_costModel.c
        monetdb5/optimizer/opt_emptySet.c
Branch: default
Log Message:

Remove obsolete functions kdifference kunion


diffs (115 lines):

diff --git a/monetdb5/optimizer/Tests/All b/monetdb5/optimizer/Tests/All
--- a/monetdb5/optimizer/Tests/All
+++ b/monetdb5/optimizer/Tests/All
@@ -44,7 +44,7 @@ reorder00
 #rangePush01
 
 #emptyset00 Optimizer does not deal with subselects
-emptyset01
+#emptyset01 no more kdifference
 
 inline00
 inline01
diff --git a/monetdb5/optimizer/Tests/ESexample.mal 
b/monetdb5/optimizer/Tests/ESexample.mal
--- a/monetdb5/optimizer/Tests/ESexample.mal
+++ b/monetdb5/optimizer/Tests/ESexample.mal
@@ -1,11 +1,7 @@
 function tst();
     V1 := bat.new(:oid,:oid);
-    V7 := bat.new(:oid,:oid);
-    V10{rows=0} := bat.new(:oid,:oid);
-    V11 := bat.reverse(V10);
-    V12 := algebra.kdifference(V7,V11);
-    V16 := algebra.mark(V12);
-    V17 := algebra.join(V16,V7);
+    V7{rows=0} := bat.new(:oid,:oid);
+    V17 := algebra.join(V1,V7);
     bat.append(V1,V17);
 end tst;
     optimizer.costModel("user","tst");
diff --git a/monetdb5/optimizer/Tests/ESexample.stable.out 
b/monetdb5/optimizer/Tests/ESexample.stable.out
--- a/monetdb5/optimizer/Tests/ESexample.stable.out
+++ b/monetdb5/optimizer/Tests/ESexample.stable.out
@@ -15,11 +15,7 @@ stdout of test 'ESexample` in directory 
 function user.tst():void;
     V1 := bat.new(:oid,:oid);
     V7 := bat.new(:oid,:oid);
-    V10 := bat.new(:oid,:oid);
-    V11 := bat.reverse(V10);
-    V12 := algebra.kdifference(V7,V11);
-    V16 := algebra.mark(V12);
-    V17 := algebra.join(V16,V7);
+    V17 := algebra.join(V1,V7);
     bat.append(V1,V17);
 end tst;
 function user.main():void;
@@ -27,11 +23,10 @@ function user.main():void;
 end main;
 function user.tst():void;               #  0 tst:void := user.tst() {G}
     V1 := bat.new(:oid,:oid);           #  1 V1:bat[:oid,:oid] := 
CMDBATnew(_2:oid, _2:oid) {G}
-    V7 := bat.new(:oid,:oid);           #  2 V7:bat[:oid,:oid] := 
CMDBATnew(_2:oid, _2:oid) {G}
-    V16 := algebra.mark(V7);            #  3 V16:bat[:oid,:oid] := 
ALGtmark_default(V7:bat[:oid,:oid]) {G}
-    V17 := algebra.join(V16,V7);        #  4 V17:bat[:oid,:oid] := 
ALGjoin(V16:bat[:oid,:oid], V7:bat[:oid,:oid]) {G}
-    bat.append(V1,V17);                 #  5 _10:bat[:oid,:oid] := 
BKCappend_wrap(V1:bat[:oid,:oid], V17:bat[:oid,:oid]) {G}
-end tst;                                #  6  
+    V7{rows=0} := bat.new(:oid,:oid);   #  2 V7:bat[:oid,:oid] := 
CMDBATnew(_2:oid, _2:oid) {G}
+    V17 := algebra.join(V1,V7{rows=0}); #  3 V17:bat[:oid,:oid] := 
ALGjoin(V1:bat[:oid,:oid], V7:bat[:oid,:oid]) {G}
+    bat.append(V1,V17);                 #  4 _6:bat[:oid,:oid] := 
BKCappend_wrap(V1:bat[:oid,:oid], V17:bat[:oid,:oid]) {G}
+end tst;                                #  5  
 
 # 22:08:09 >  
 # 22:08:09 >  Done.
diff --git a/monetdb5/optimizer/opt_costModel.c 
b/monetdb5/optimizer/opt_costModel.c
--- a/monetdb5/optimizer/opt_costModel.c
+++ b/monetdb5/optimizer/opt_costModel.c
@@ -68,10 +68,6 @@ OPTcostModelImplementation(Client cntxt,
                                getFunctionId(p) == subsortRef  ||
                                getFunctionId(p) == projectRef  ){
                                newRows(1,1,c1,0);
-                       } else if(getFunctionId(p) == kunionRef) {
-                               newRows(1,2,(c1+c2),0);
-                       } else if (getFunctionId(p)== kdifferenceRef) {
-                               newRows(1,2,(c1==0?0:c2==0?c1: c1 - c2 < 0 ? 1 
: c1 - c2+1),0);
                        } else if (getFunctionId(p) == joinRef ||
                                getFunctionId(p) == leftfetchjoinRef ||
                                getFunctionId(p) == leftjoinRef ||
diff --git a/monetdb5/optimizer/opt_emptySet.c 
b/monetdb5/optimizer/opt_emptySet.c
--- a/monetdb5/optimizer/opt_emptySet.c
+++ b/monetdb5/optimizer/opt_emptySet.c
@@ -52,7 +52,6 @@ ESevaluate(Client cntxt, MalBlkPtr mb, c
        int i, j, actions = 0;
        InstrPtr p;
        str existRef = putName("exist", 5);
-       str kintersectRef = putName("kintersect", 10);
        str fragmentRef = putName("fragment", 8);
        int *alias;
        int runonce= FALSE;
@@ -159,27 +158,16 @@ ESevaluate(Client cntxt, MalBlkPtr mb, c
                                             f == sortHTRef  || 
                                             f == sortTHRef  || 
                                             f == semijoinRef ||
-                                            f == kintersectRef  ||
                                             f == fragmentRef ){
 
                                                /* result is empty */
                                                propagate(1);
                                                break;
                                        } 
-                                       if ( f == differenceRef || 
-                                            f == kdifferenceRef ) {
+                                       if ( f == differenceRef ) {
                                                propagate(1);
                                                break;
                                        }
-                                       if ( f == kunionRef) {
-                                               /* copy non-empty argument */
-                                               if( j == 1) {
-                                                       propagate(2);
-                                               } else {
-                                                       propagate(1);
-                                               }
-                                               break;
-                                       } 
                                }
                                if (getModuleId(p)== batRef) {
                                        if ( f == reverseRef || f == mirrorRef 
){
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to