Update of /cvsroot/monetdb/sql/src/storage/bat
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12431/src/storage/bat

Modified Files:
        bat_storage.mx 
Log Message:
added support for 'create cluster name on tname ( column list )'
which caused lots of changes all over the place.

also fixed (moved code out of sql -> mkey)
moved finally copy into over to a function and into relational alg.



U bat_storage.mx
Index: bat_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bat/bat_storage.mx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- bat_storage.mx      30 May 2009 04:29:11 -0000      1.41
+++ bat_storage.mx      25 Jul 2009 22:08:38 -0000      1.42
@@ -412,6 +412,16 @@
        return b->cnt;
 }
 
+static int
+sorted_col(sql_trans *tr, sql_column *col)
+{
+       BAT *b = bind_col(tr, col, RDONLY);
+       int sorted = BATtordered(b);
+       
+       bat_destroy(b);
+       return sorted;
+}
+
 int
 load_delta(sql_delta *bat, int bid, int type)
 {
@@ -538,8 +548,12 @@
        tb = temp_descriptor(i);
        b = BATconst(tb, type, ATOMnilptr(type));
        bat_destroy(tb);
-       tb = BATcopy(b, TYPE_void, b->ttype, TRUE);
-       bat_destroy(b);
+       if (isVIEW(b)) {
+               tb = BATcopy(b, TYPE_void, b->ttype, TRUE);
+               bat_destroy(b);
+       } else {
+               tb = b;
+       }
 
        bat_set_access(tb, BAT_READ);
        BATseqbase(tb, seq);
@@ -1408,6 +1422,7 @@
 
        sf->count_col = (count_col_fptr)&count_col;
        sf->count_idx = (count_idx_fptr)&count_idx;
+       sf->sorted_col = (sorted_col_fptr)&sorted_col;
 
        sf->create_col = (create_col_fptr)&create_col;
        sf->create_idx = (create_idx_fptr)&create_idx;


------------------------------------------------------------------------------
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to