Changeset: d30283645508 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d30283645508
Modified Files:
        monetdb5/optimizer/opt_costModel.c
Branch: default
Log Message:

Don;t use asserts where you should not need them


diffs (24 lines):

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
@@ -16,9 +16,7 @@
                c1 = getRowCnt(mb, getArg(p,W));\
                c2 = getRowCnt(mb, getArg(p,X));\
                /* just to ensure that rowcnt was/is never set to -1 */\
-               assert(c1 != (BUN) -1);\
-               assert(c2 != (BUN) -1);\
-               if (c1 == BUN_NONE || c2 == BUN_NONE) \
+               if (c1 == (BUN) -1 || c2 == (BUN) -1 || c1 == BUN_NONE || c2 == 
BUN_NONE) \
                        continue;\
                setRowCnt(mb, getArg(p,Z), (Y));\
 }
@@ -138,8 +136,7 @@ OPTcostModelImplementation(Client cntxt,
                        /* copy the rows property */
                        c1 = getRowCnt(mb, getArg(p,1));
                        /* just to ensure that rowcnt was/is never set to -1 */
-                       assert(c1 != (BUN) -1);
-                       if (c1 != BUN_NONE)
+                       if (c1 != (BUN) -1 && c1 != BUN_NONE)
                                setRowCnt(mb, getArg(p,0), c1);
                }
        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to