Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20677/compiler/sql

Modified Files:
      Tag: PF_ROX
        lalg2sql.brg 
Log Message:
propagated changes of Friday May 30 2008 - Saturday May 31 2008
from the development trunk to the PF_ROX branch

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/05/30 - mayrm: compiler/algebra/builtins.c,1.97(Current_DailyBuild-31)
        compiler/algebra/logical.c,1.100(Current_DailyBuild-31)
        compiler/debug/logdebug.c,1.102(Current_DailyBuild-31)
        compiler/include/algebra.h,1.87(Current_DailyBuild-31)
        compiler/include/builtins.h,1.51(Current_DailyBuild-31)
        compiler/semantics/xquery_fo.c,1.162(Current_DailyBuild-31)
        compiler/sql/lalg2sql.brg,1.134(Current_DailyBuild-31)

Implementation for ``fn:node-name($arg as node()?) as xs:QName?'',
which forms the backbone of
  - fn:name (),
  - fn:local_name() and
  - fn:namespace_uri ().

doc_access-operator now has another accessor ``doc_QName'',
which supports access to the QName. ``doc_QName'' is not supported
by the MIL translation, yet.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/05/31 - stmane: compiler/algebra/physical.c,1.71(Current_DailyBuild-31)
        compiler/algebra/planner.c,1.64(Current_DailyBuild-31)
        compiler/algebra/opt/opt_complex.c,1.46(Current_DailyBuild-31)
        compiler/debug/physdebug.c,1.63(Current_DailyBuild-31)
propagated changes of Friday May 30 2008 - Saturday May 31 2008
from the XQuery_0-24 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/05/30 - tsheyar:
        
compiler/debug/physdebug.c,1.62.2.1(XQuery_0-24,xrpcdemo_sync,Stable_DailyBuild-31)
-- Only print properties if we really have them (fixes a segfault).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/05/30 - tsheyar:
        compiler/algebra/physical.c,1.69.2.2(XQuery_0-24,Stable_DailyBuild-31)
-- doc_tbl is trivially sorted for inputs of cardinality 1.
   (This change avoids the planning of a physical sort operator.)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/05/30 - tsheyar:
        compiler/algebra/planner.c,1.62.2.2(XQuery_0-24,Stable_DailyBuild-31)
-- add missing physical implementation for the step_join operator.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/05/30 - tsheyar:
        
compiler/algebra/opt/opt_complex.c,1.45.2.1(XQuery_0-24,Stable_DailyBuild-31)
-- performance fix for step_joins.
   (Merge step_join pair implementing descendant-or-self::node()/child::___
    into a single step_join descendant::___.)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2008/05/31 - stmane: compiler/algebra/planner.c,1.62.2.3(XQuery_0-24)

fixed compilation: removed unused variable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


U lalg2sql.brg
Index: lalg2sql.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/lalg2sql.brg,v
retrieving revision 1.108.2.12
retrieving revision 1.108.2.13
diff -u -d -r1.108.2.12 -r1.108.2.13
--- lalg2sql.brg        14 May 2008 20:12:45 -0000      1.108.2.12
+++ lalg2sql.brg        31 May 2008 11:45:23 -0000      1.108.2.13
@@ -3614,9 +3614,24 @@
                 case alg_fun_fn_substring:
                 case alg_fun_fn_substring_dbl:
                 case alg_fun_fn_normalize_space:
-
+                    assert (!"missing");
+                    break;
                 case alg_fun_fn_name:
+                /* Returns the name of a node, as an xs:string that is either 
the
+                 * zero length string or the lexical form of an xs:QName.
+                 * If the argument is the empty sequence, the function returns
+                 * the zero lenght-string.
+                 * If the target node has no name (that is, if it is a 
document node,
+                 * a comment a text node, or a namespace binding) the functions
+                 * returns the zero length string.
+                 */
+                {
+                    
+                } break;
                 case alg_fun_fn_local_name:
+                {
+                    
+                } break;
                 case alg_fun_fn_namespace_uri:
 
                 case alg_fun_fn_qname:
@@ -4574,6 +4589,7 @@
                         item_res = p->sem.doc_access.res;
             PFalg_simple_type_t item_ty = type_of (p, item),
                                 item_res_ty = type_of (p, item_res);
+            PFalg_doc_t doc_col = p->sem.doc_access.doc_col;
             PFsql_aident_t ctxalias;
 
             /* copy all existing column, from, and where lists */
@@ -4589,8 +4605,23 @@
                                     col_env_lookup (COLMAP(p), item, 
item_ty)));
             }
 
-            /* add the new column to the column map */
-            col_env_add (COLMAP(p), item_res, item_res_ty, VALUE(ctxalias));
+            switch ( doc_col ) {
+                case doc_atext:
+                case doc_text:
+                case doc_comm:
+                case doc_pi_text:
+                                       col_env_add (COLMAP(p), item_res, 
item_res_ty, VALUE(ctxalias));
+                    break;
+                case doc_qname:
+                                       col_env_add (COLMAP(p), item_res, 
aat_qname_loc, NAME(ctxalias));
+                                       col_env_add (COLMAP(p), item_res, 
aat_qname_uri, NS_URI(ctxalias));
+                    break;
+                default: PFoops (OOPS_FATAL,
+                                    "SQLgen: Unknown access identifier in "
+                                    "document access");
+            }
+            
+            
         }   break;
 
         /* Rel:    roots_ (Constr) */


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to