Update of /cvsroot/monetdb/sql/src/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12075/src/include

Modified Files:
        sql_relation.h 
Log Message:
sql_relational.h: added some handy operator tests (is_semi and is_union etc)

rel_optimizer.mx: 
        we push joins stemming from sql 'in' as lowest join expressions, as 
they are similar to selects, which we also prefer over other operators.

        we rewrite semi/anti join ( l, group by (r) [groupby exps] [exps] )
        into semi/anti join (l, project(r) [exps] )
                if the group by was done on the join columns
rel_select.mx:
        we only create a new select operator if needed, ie if we allready have
        one we simply add the expression.

        bug fix: in SQL_OR handling we first project all columns then to the
        union. Else the columns of the left and right relations of the union 
        maybe become differently sorted by the optimizer later.

        only SQL_NOT_IN requires removal of nulls on the left hand of the IN.



U sql_relation.h
Index: sql_relation.h
===================================================================
RCS file: /cvsroot/monetdb/sql/src/include/sql_relation.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- sql_relation.h      23 Jul 2008 19:41:12 -0000      1.24
+++ sql_relation.h      4 Aug 2008 13:18:49 -0000       1.25
@@ -92,10 +92,18 @@
        (op == op_left || op == op_right || op == op_full)
 #define is_join(op) \
        (op == op_join || is_outerjoin(op))
+#define is_semi(op) \
+       (op == op_semi || op == op_anti)
 #define is_select(op) \
        (op == op_select || op == op_semi || op == op_anti)
 #define is_set(op) \
        (op == op_union || op == op_inter || op == op_except)
+#define is_union(op) \
+       (op == op_union)
+#define is_inter(rel) \
+       (op == op_inter)
+#define is_except(rel) \
+       (op == op_except)
 #define is_project(op) \
        (op == op_project || op == op_groupby || is_set(op))
 #define is_groupby(op) \


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to