Changeset: f6f06f44ad78 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f6f06f44ad78
Modified Files:
        monetdb5/optimizer/opt_prelude.mx
        monetdb5/optimizer/opt_support.mx
Branch: default
Log Message:

A safe SQL function
Using during code generation to upgrade a scalar into a singleton BAT.


diffs (38 lines):

diff --git a/monetdb5/optimizer/opt_prelude.mx 
b/monetdb5/optimizer/opt_prelude.mx
--- a/monetdb5/optimizer/opt_prelude.mx
+++ b/monetdb5/optimizer/opt_prelude.mx
@@ -178,6 +178,7 @@
 opt_export  str setAccessRef;
 opt_export  str setWriteModeRef;
 opt_export  str sliceRef;
+opt_export  str singleRef;
 opt_export  str sortHRef;
 opt_export  str sortHTRef;
 opt_export  str sortRef;
@@ -395,6 +396,7 @@
 str setAccessRef;
 str setWriteModeRef;
 str sliceRef;
+str singleRef;
 str sortHRef;
 str sortHTRef;
 str sortRef;
@@ -608,6 +610,7 @@
                setAccessRef = putName("setAccess",9);
                setWriteModeRef= putName("setWriteMode",12);
                sliceRef = putName("slice",5);
+               singleRef = putName("single",6);
                sortHRef = putName("sortH",5);
                sortHTRef = putName("sortHT",6);
                sortRef = putName("sort",4);
diff --git a/monetdb5/optimizer/opt_support.mx 
b/monetdb5/optimizer/opt_support.mx
--- a/monetdb5/optimizer/opt_support.mx
+++ b/monetdb5/optimizer/opt_support.mx
@@ -1325,6 +1325,7 @@
                if (getFunctionId(p) == not_uniqueRef) return FALSE;
                if (getFunctionId(p) == zero_or_oneRef) return FALSE;
                if (getFunctionId(p) == mvcRef) return FALSE;
+               if (getFunctionId(p) == singleRef) return FALSE;
                /* the update instructions for SQL has side effects.
                   whether this is relevant should be explicitly checked
                   in the environment of the call */
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to