Update of /cvsroot/monetdb/pathfinder/compiler/include
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30615/include

Modified Files:
        Makefile.ag physical.h physical_mnemonic.h 
Added Files:
        intro_borders.h 
Removed Files:
        intro_rec_border.h 
Log Message:
-- Renamed algebra/intro_rec_border.c into algebra/intro_borders.c.
-- Renamed include/intro_rec_border.h into include/intro_borders.h.

-- Extended the physical algebra with a dependent cross product operator
   that only evaluates its right side if the left side produces at least
   one row.

   This change implicitely implements a control structure for some conditionals.
   E.g., the following query conditionally evaluates the independent
   expressions ('doc("xmark-sf0.001.xml")//*' and 'doc("xmark-sf100.xml")//*'):

   if (1 = (1,2,3))
   then doc("xmark-sf0.1.xml")//*
   else doc("xmark-sf100.xml")//*

   With the dependent cross product operator in place this leads to the 
evaluation
   of the (previously independent) then-branch and the avoidance of the 
evaluation
   of the (expensive) else-branch.

-- Adjusted stable output.


U Makefile.ag
Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/Makefile.ag,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- Makefile.ag 7 May 2009 20:00:16 -0000       1.53
+++ Makefile.ag 20 May 2009 16:00:45 -0000      1.54
@@ -53,7 +53,7 @@
        functions.h \
        heuristic.h \
        import.h \
-        intro_rec_border.h \
+        intro_borders.h \
        la_proxy.h \
        la_thetajoin.h \
        logdebug.h \

--- intro_rec_border.h DELETED ---

U physical_mnemonic.h
Index: physical_mnemonic.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical_mnemonic.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- physical_mnemonic.h 6 Feb 2009 13:01:53 -0000       1.39
+++ physical_mnemonic.h 20 May 2009 16:00:46 -0000      1.40
@@ -49,6 +49,11 @@
 /** cartesian product */
 #define cross(a,b)           PFpa_cross ((a),(b))
 
+/** dependent cross product */
+#define dep_cross(a,b)       PFpa_dep_cross ((a),(b))
+/** dependent border indicator */
+#define dep_border(a)        PFpa_dep_border ((a))
+
 /** join that preserves the order of the first argument */
 #define leftjoin(a,b,c,d)    PFpa_leftjoin ((a), (b), (c), (d))
 

U physical.h
Index: physical.h
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/include/physical.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- physical.h  10 Mar 2009 12:20:43 -0000      1.54
+++ physical.h  20 May 2009 16:00:46 -0000      1.55
@@ -53,7 +53,9 @@
     , pa_empty_tbl      =   3 /**< empty literal table */
     , pa_attach         =   4 /**< ColumnAttach */
     , pa_cross          =  10 /**< Cross */
-    , pa_leftjoin       =  11 /**< LeftJoin */
+    , pa_dep_cross      =  11 /**< dependent Cross product */
+    , pa_dep_border     =  12 /**< border of a dependent plan fragment */
+    , pa_leftjoin       =  13 /**< LeftJoin */
     , pa_eqjoin         =  14 /**< Generic join implementation */
     , pa_semijoin       =  15 /**< Semijoin implementation */
     , pa_thetajoin      =  16 /**< Thetajoin implementation */
@@ -465,6 +467,19 @@
 PFpa_op_t * PFpa_cross (const PFpa_op_t *n1, const PFpa_op_t *n2);
 
 /**
+ * Cross product (Cartesian product) of two relations
+ * where the second argument is only evaluated if the first argument
+ * produces at least one tuple.
+ */
+PFpa_op_t * PFpa_dep_cross (const PFpa_op_t *n1, const PFpa_op_t *n2);
+
+/**
+ * Border for dependent operator describing which operators
+ * lie in-/outside.
+ */
+PFpa_op_t * PFpa_dep_border (const PFpa_op_t *n);
+
+/**
  * LeftJoin: Equi-Join on two relations, preserving the ordering
  *           of the left operand.
  */

--- NEW FILE: intro_borders.h ---
/**
 * @file
 *
 * Introduce the borders of recursion and branch bodies..
 * (This enables the MIL generation to detect expressions
 *  that are invariant to the recursion or branch body.)
 *
 * Copyright Notice:
 * -----------------
 *
 * The contents of this file are subject to the Pathfinder Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License.  You may obtain a copy of the License at
 * http://monetdb.cwi.nl/Legal/PathfinderLicense-1.1.html
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
 * the License for the specific language governing rights and limitations
 * under the License.
 *
 * The Original Code is the Pathfinder system.
 *
 * The Original Code has initially been developed by the Database &
 * Information Systems Group at the University of Konstanz, Germany and
 * the Database Group at the Technische Universitaet Muenchen, Germany.
 * It is now maintained by the Database Systems Group at the Eberhard
 * Karls Universitaet Tuebingen, Germany.  Portions created by the
 * University of Konstanz, the Technische Universitaet Muenchen, and the
 * Universitaet Tuebingen are Copyright (C) 2000-2005 University of
 * Konstanz, (C) 2005-2008 Technische Universitaet Muenchen, and (C)
 * 2008-2009 Eberhard Karls Universitaet Tuebingen, respectively.  All
 * Rights Reserved.
 *
 * $Id: intro_borders.h,v 1.1 2009/05/20 16:00:45 tsheyar Exp $
 */

#ifndef INTRO_BORDERS_H
#define INTRO_BORDERS_H

#include "physical.h"

/**
 * Introduce boundary operators.
 */
PFpa_op_t * PFpa_intro_borders (PFpa_op_t *n);

#endif  /* INTRO_BORDERS_H */

/* vim:set shiftwidth=4 expandtab: */


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to