Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26776/compiler/sql
Modified Files:
lalg2sql.brg sql.c
Log Message:
coalesce operator and expressionlist added
Index: sql.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/sql.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- sql.c 4 Feb 2007 12:15:08 -0000 1.16
+++ sql.c 9 Feb 2007 08:08:58 -0000 1.17
@@ -277,6 +277,12 @@
/*............ Aggregat Functions ...........*/
PFsql_t*
+PFsql_coalesce(PFsql_t* expr)
+{
+ return wire1 (sql_clsc, expr);
+}
+
+PFsql_t*
PFsql_count(bool dist, const PFsql_t *expr)
{
PFsql_t* ret = wire1(sql_count, expr);
@@ -791,17 +797,22 @@
PFsql_from_list_( count-1, list+1 ),
list[0]);
return NULL; /* satisfy picky compilers */
+}
- //if( count == 1)
- //{
- // return wire2(sql_frm_list, list[0], terminator());
- //}
- //else
- //{
- // return wire2(sql_frm_list, list[0],
- // PFsql_from_list_(count - 1, list + 1));
- //}
- //return NULL; /* satisfy picky compilers */
+PFsql_t*
+PFsql_expression_list_(unsigned int count, const PFsql_t **list)
+{
+ assert (count > 0);
+
+ if (list[0] == NULL)
+ return PFsql_expression_list_ (count-1, list+1);
+ else if (count == 1)
+ return (PFsql_t*)list[0];
+ else
+ return wire2(sql_expr_list,
+ PFsql_expression_list_ (count-1, list+1),
+ list[0]);
+ return NULL; /* satisfy picky compilers */
}
/**
Index: lalg2sql.brg
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/lalg2sql.brg,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- lalg2sql.brg 7 Feb 2007 00:55:18 -0000 1.27
+++ lalg2sql.brg 9 Feb 2007 08:08:58 -0000 1.28
@@ -2305,6 +2305,7 @@
p->dirty = true;
} break;
+ /* FIXME stringjoin is false */
/* Rel: string_join (Rel, Rel) */
case 88:
/* even string_join is implemented as identity operator,
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins