Changeset: ec1875c99e5c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ec1875c99e5c
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        clients/Tests/exports.stable.out
        gdk/ChangeLog
        gdk/gdk.h
        gdk/gdk_batop.c
        monetdb5/ChangeLog
        monetdb5/modules/kernel/bat5.c
        monetdb5/modules/kernel/bat5.h
        monetdb5/modules/kernel/bat5.mal
        monetdb5/modules/mal/Tests/inspect05.stable.out.int128
Branch: default
Log Message:

Removed bat.order() and bat.orderReverse() with their implementations.
I.e., also removed BATorder and BATorder_rev.


diffs (truncated from 314 to 300 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -31313,14 +31313,6 @@ pattern bat.new(ht:oid,tt:any_1):bat[:oi
 address CMDBATnew;
 comment Creates a new empty transient BAT, with head- and tail-types as 
indicated.
 
-command bat.orderReverse(b:bat[:oid,:any_1]):bat[:oid,:any_1] 
-address BKCorder_rev;
-comment Reverse sorts the BAT itself on the head, in place. 
-
-command bat.order(b:bat[:oid,:any_1]):bat[:oid,:any_1] 
-address BKCorder;
-comment Sorts the BAT itself on the head, in place. 
-
 pattern bat.partition(b:bat[:oid,:any_1],pieces:int,n:int):bat[:oid,:any_1] 
 address CMDBATpartition2;
 comment Create the n-th slice over the BAT broken into several pieces.
diff --git a/clients/Tests/MAL-signatures.stable.out.int128 
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -40358,14 +40358,6 @@ pattern bat.new(ht:oid,tt:any_1):bat[:oi
 address CMDBATnew;
 comment Creates a new empty transient BAT, with head- and tail-types as 
indicated.
 
-command bat.orderReverse(b:bat[:oid,:any_1]):bat[:oid,:any_1] 
-address BKCorder_rev;
-comment Reverse sorts the BAT itself on the head, in place. 
-
-command bat.order(b:bat[:oid,:any_1]):bat[:oid,:any_1] 
-address BKCorder;
-comment Sorts the BAT itself on the head, in place. 
-
 pattern bat.partition(b:bat[:oid,:any_1],pieces:int,n:int):bat[:oid,:any_1] 
 address CMDBATpartition2;
 comment Create the n-th slice over the BAT broken into several pieces.
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -156,8 +156,6 @@ void BATmsync(BAT *b);
 gdk_return BATmultiprintf(stream *f, int argc, BAT *argv[], int printoid, int 
order, int printorderby);
 int BATname(BAT *b, const char *nme);
 BAT *BATnew(int hdtype, int tltype, BUN capacity, int role) 
__attribute__((warn_unused_result));
-gdk_return BATorder(BAT *b);
-gdk_return BATorder_rev(BAT *b);
 int BATordered(BAT *b);
 int BATordered_rev(BAT *b);
 BAT *BATouterjoin(BAT *l, BAT *r, BUN estimate);
@@ -883,8 +881,6 @@ str BKCisTransient(bit *res, const bat *
 str BKCmergecand(bat *ret, const bat *aid, const bat *bid);
 str BKCmirror(bat *ret, const bat *bid);
 str BKCnewBAT(bat *res, const int *ht, const int *tt, const BUN *cap, int 
role);
-str BKCorder(bat *ret, const bat *bid);
-str BKCorder_rev(bat *ret, const bat *bid);
 str BKCpersists(void *r, const bat *bid, const bit *flg);
 str BKCreuseBAT(bat *ret, const bat *bid, const bat *did);
 str BKCreuseBATmap(bat *ret, const bat *bid, const bat *did);
diff --git a/gdk/ChangeLog b/gdk/ChangeLog
--- a/gdk/ChangeLog
+++ b/gdk/ChangeLog
@@ -1,6 +1,9 @@
 # ChangeLog file for MonetDB
 # This file is updated with Maddlog
 
+* Tue Sep  8 2015 Sjoerd Mullender <sjo...@acm.org>
+- Removed obsolete functions BATorder() and BATorder_rev().
+
 * Sat Sep  5 2015 Sjoerd Mullender <sjo...@acm.org>
 - Implemented BATsubdiff which returns a list of OIDs (sorted, i.e. usable
   as candidate list) of tuples in the left input whose value does not
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1606,10 +1606,6 @@ gdk_export gdk_return BATmultiprintf(str
  * @item BAT *
  * @tab BATsort_rev (BAT *b)
  * @item BAT *
- * @tab BATorder (BAT *b)
- * @item BAT *
- * @tab BATorder_rev (BAT *b)
- * @item BAT *
  * @tab BATrevert (BAT *b)
  * @item int
  * @tab BATordered (BAT *b)
@@ -1627,17 +1623,13 @@ gdk_export gdk_return BATmultiprintf(str
  * The BATsort functions return a copy of the input BAT, sorted in
  * ascending order on the head column. BATordered starts a check on
  * the head values to see if they are ordered. The result is returned
- * and stored in the hsorted field of the BAT.  BATorder is similar to
- * BATsort, but sorts the BAT itself, rather than returning a copy
- * (BEWARE: this operation destroys the delta
- * information. TODO:fix). The BATrevert puts all the live BUNs of a
- * BAT in reverse order. It just reverses the sequence, so this does
- * not necessarily mean that they are sorted in reverse order!
+ * and stored in the hsorted field of the BAT.  The BATrevert puts all
+ * the live BUNs of a BAT in reverse order. It just reverses the
+ * sequence, so this does not necessarily mean that they are sorted in
+ * reverse order!
  */
 gdk_export BAT *BATsort(BAT *b);
 gdk_export BAT *BATsort_rev(BAT *b);
-gdk_export gdk_return BATorder(BAT *b);
-gdk_export gdk_return BATorder_rev(BAT *b);
 gdk_export gdk_return BATrevert(BAT *b);
 gdk_export int BATordered(BAT *b);
 gdk_export int BATordered_rev(BAT *b);
@@ -3225,26 +3217,6 @@ gdk_export BAT *BATsample(BAT *b, BUN n)
                                (c)->dense ? "dense" : "oid" :          \
                         ATOMname((c)->type))
 
-#define BATorder(b)                                                    \
-       ({                                                              \
-               BAT *_b = (b);                                          \
-               HEADLESSDEBUG fprintf(stderr,                           \
-                       "#BATorder([%s,%s]#"BUNFMT") %s[%s:%d]\n",      \
-                       _COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
-                       __func__, __FILE__, __LINE__);                  \
-               BATorder(_b);                                           \
-       })
-
-#define BATorder_rev(b)                                                        
\
-       ({                                                              \
-               BAT *_b = (b);                                          \
-               HEADLESSDEBUG fprintf(stderr,                           \
-                       "#BATorder_rev([%s,%s]#"BUNFMT") %s[%s:%d]\n",  \
-                       _COL_TYPE(_b->H), _COL_TYPE(_b->T), BATcount(_b), \
-                       __func__, __FILE__, __LINE__);                  \
-               BATorder_rev(_b);                                       \
-       })
-
 #define BATsort(b)                                                     \
        ({                                                              \
                BAT *_b = (b);                                          \
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1080,7 +1080,7 @@ BATslice(BAT *b, BUN l, BUN h)
 
 /*
  *  BAT Sorting
- * BATsort returns a sorted copy. BATorder sorts the BAT itself.
+ * BATsort returns a sorted copy.
  */
 int
 BATordered(BAT *b)
@@ -1194,25 +1194,11 @@ BATorder_internal(BAT *b, int stable, in
        return b;
 }
 
-#undef BATorder
-#undef BATorder_rev
 #undef BATsort
 #undef BATsort_rev
 #undef BATssort
 #undef BATssort_rev
 
-gdk_return
-BATorder(BAT *b)
-{
-       return BATorder_internal(b, 0, 0, 0, "BATorder") ? GDK_SUCCEED : 
GDK_FAIL;
-}
-
-gdk_return
-BATorder_rev(BAT *b)
-{
-       return BATorder_internal(b, 0, 1, 0, "BATorder_rev") ? GDK_SUCCEED : 
GDK_FAIL;
-}
-
 BAT *
 BATsort(BAT *b)
 {
diff --git a/monetdb5/ChangeLog b/monetdb5/ChangeLog
--- a/monetdb5/ChangeLog
+++ b/monetdb5/ChangeLog
@@ -1,6 +1,9 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Tue Sep  8 2015 Sjoerd Mullender <sjo...@acm.org>
+- Removed bat.order and bat.orderReverse functions.
+
 * Mon Sep  7 2015 Sjoerd Mullender <sjo...@acm.org>
 - Changed client.getUsers to return two bats, one with the user id
   and one with the user name.
diff --git a/monetdb5/modules/kernel/bat5.c b/monetdb5/modules/kernel/bat5.c
--- a/monetdb5/modules/kernel/bat5.c
+++ b/monetdb5/modules/kernel/bat5.c
@@ -500,40 +500,6 @@ BKCrevert(bat *r, const bat *bid)
 }
 
 str
-BKCorder(bat *r, const bat *bid)
-{
-       BAT *b;
-
-       if ((b = BATdescriptor(*bid)) == NULL)
-               throw(MAL, "bat.order", RUNTIME_OBJECT_MISSING);
-       if ((b = setaccess(b, BAT_WRITE)) == NULL)
-               throw(MAL, "bat.order", OPERATION_FAILED);
-       if (BATorder(b) != GDK_SUCCEED) {
-               BBPunfix(b->batCacheid);
-               throw(MAL, "bat.order", GDK_EXCEPTION);
-       }
-       BBPkeepref(*r = b->batCacheid);
-       return MAL_SUCCEED;
-}
-
-str
-BKCorder_rev(bat *r, const bat *bid)
-{
-       BAT *b;
-
-       if ((b = BATdescriptor(*bid)) == NULL)
-               throw(MAL, "bat.order_rev", RUNTIME_OBJECT_MISSING);
-       if ((b = setaccess(b, BAT_WRITE)) == NULL)
-               throw(MAL, "bat.order_rev", OPERATION_FAILED);
-       if (BATorder_rev(b) != GDK_SUCCEED) {
-               BBPunfix(b->batCacheid);
-               throw(MAL, "bat.order_rev", GDK_EXCEPTION);
-       }
-       BBPkeepref(*r = b->batCacheid);
-       return MAL_SUCCEED;
-}
-
-str
 BKCinsert_bat(bat *r, const bat *bid, const bat *sid)
 {
        BAT *b, *s;
diff --git a/monetdb5/modules/kernel/bat5.h b/monetdb5/modules/kernel/bat5.h
--- a/monetdb5/modules/kernel/bat5.h
+++ b/monetdb5/modules/kernel/bat5.h
@@ -31,8 +31,6 @@ bat5_export str BKCdensebat(bat *ret, co
 bat5_export str BKCreverse(bat *ret, const bat *bid);
 bat5_export str BKCmirror(bat *ret, const bat *bid);
 bat5_export str BKCrevert(bat *ret, const bat *bid);
-bat5_export str BKCorder(bat *ret, const bat *bid);
-bat5_export str BKCorder_rev(bat *ret, const bat *bid);
 bat5_export str BKCinsert_bat(bat *r, const bat *bid, const bat *sid);
 bat5_export str BKCinsert_bat_force(bat *r, const bat *bid, const bat *sid, 
const bit *force);
 bat5_export str BKCdelete_all(bat *r, const bat *bid);
diff --git a/monetdb5/modules/kernel/bat5.mal b/monetdb5/modules/kernel/bat5.mal
--- a/monetdb5/modules/kernel/bat5.mal
+++ b/monetdb5/modules/kernel/bat5.mal
@@ -49,14 +49,6 @@ address BKCbat_inplace_force
 comment "Perform replace for all BUNs of the second BAT into the first.";
 
 
-command order(b:bat[:oid,:any_1]) :bat[:oid,:any_1] 
-address BKCorder
-comment "Sorts the BAT itself on the head, in place. ";
-
-command orderReverse(b:bat[:oid,:any_1]) :bat[:oid,:any_1] 
-address BKCorder_rev
-comment "Reverse sorts the BAT itself on the head, in place. ";
-
 command append( i:bat[:oid,:any_1], u:bat[:oid,:any_1] ) :bat[:oid,:any_1]
 address BKCappend_wrap
 comment "append the content of u to i";
diff --git a/monetdb5/modules/mal/Tests/inspect05.stable.out.int128 
b/monetdb5/modules/mal/Tests/inspect05.stable.out.int128
--- a/monetdb5/modules/mal/Tests/inspect05.stable.out.int128
+++ b/monetdb5/modules/mal/Tests/inspect05.stable.out.int128
@@ -87,30 +87,28 @@ end user.main;
 [ 46@0,        "new_persistent",       "pattern",      "bat",  
"(ht:oid,tt:any_1,size:lng):bat[:oid,:any_1] ", "CMDBATnew;"  ]
 [ 47@0,        "new_persistent",       "pattern",      "bat",  
"(ht:oid,tt:any_1,size:int):bat[:oid,:any_1] ", "CMDBATnew;"  ]
 [ 48@0,        "new_persistent",       "pattern",      "bat",  
"(ht:oid,tt:any_1):bat[:oid,:any_1] ",  "CMDBATnew;"  ]
-[ 49@0,        "order",        "command",      "bat",  
"(b:bat[:oid,:any_1]):bat[:oid,:any_1] ",       "BKCorder_rev;"  ]
-[ 50@0,        "orderReverse", "command",      "bat",  
"(b:bat[:oid,:any_1]):bat[:oid,:any_1] ",       "BKCorder;"  ]
-[ 51@0,        "partition",    "pattern",      "bat",  
"(b:bat[:oid,:any_1],pieces:int,n:int):bat[:oid,:any_1] ",      
"CMDBATpartition2;"  ]
-[ 52@0,        "partition",    "pattern",      "bat",  
"(b:bat[:oid,:any_1]):bat[:oid,:any_1]... ",    "CMDBATpartition;"  ]
-[ 53@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],del:bat[:oid,:oid]):bat[:oid,:oid] ",      
"BKCreuseBATmap;"  ]
-[ 54@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],del:bat[:oid,:oid]):bat[:oid,:any_1] ",    "BKCreuseBAT;"  
]
-[ 55@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],rid:bat[:oid,:oid],val:bat[:oid,:any_1],force:bit):bat[:oid,:any_1]
 ",     "BKCbat_inplace_force;"  ]
-[ 56@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],rid:bat[:oid,:oid],val:bat[:oid,:any_1]):bat[:oid,:any_1] 
",       "BKCbat_inplace;"  ]
-[ 57@0,        "reuse",        "command",      "bat",  
"(b:bat[:oid,:any_1],h:oid,t:any_1,force:bit):bat[:oid,:any_1] ",       
"BKCbun_inplace_force;"  ]
-[ 58@0,        "reuseMap",     "command",      "bat",  
"(b:bat[:oid,:any_1],h:oid,t:any_1):bat[:oid,:any_1] ", "BKCbun_inplace;"  ]
-[ 59@0,        "reverse",      "command",      "bat",  
"(b:bat[:any_1,:any_2]):bat[:any_2,:any_1] ",   "BKCreverse;"  ]
-[ 60@0,        "save", "pattern",      "bat",  "(val:any_1):bat[:oid,:any_1] 
",        "CMDBATsingle;"  ]
-[ 61@0,        "save", "command",      "bat",  "(b:bat[:oid,:any_1]):bit ",    
"BKCsetImprints;"  ]
-[ 62@0,        "setAccess",    "command",      "bat",  
"(b:bat[:oid,:any_1]):bit ",    "BKCsetHash;"  ]
-[ 63@0,        "setColumn",    "command",      "bat",  "(nme:str):bit ",       
"BKCsave;"  ]
-[ 64@0,        "setColumn",    "command",      "bat",  
"(nme:bat[:oid,:any_1]):void ", "BKCsave2;"  ]
-[ 65@0,        "setHash",      "command",      "bat",  
"(b:bat[:oid,:any_1]):void ",   "BKCsetPersistent;"  ]
-[ 66@0,        "setImprints",  "command",      "bat",  
"(b:bat[:oid,:any_1]):void ",   "BKCsetTransient;"  ]
-[ 67@0,        "setKey",       "command",      "bat",  
"(b:bat[:oid,:any_1],h:str,t:str):void ",       "BKCsetColumns;"  ]
-[ 68@0,        "setName",      "command",      "bat",  
"(b:bat[:oid,:any_1],t:str):void ",     "BKCsetColumn;"  ]
-[ 69@0,        "setPersistent",        "command",      "bat",  
"(b:bat[:oid,:any_1],h:str,t:str):void ",       "BKCsetRole;"  ]
-[ 70@0,        "setRole",      "command",      "bat",  
"(b:bat[:oid,:any_1],s:str):void ",     "BKCsetName;"  ]
-[ 71@0,        "setTransient", "command",      "bat",  
"(b:bat[:oid,:any_1],mode:str):bat[:oid,:any_1] ",      "BKCsetAccess;"  ]
-[ 72@0,        "single",       "command",      "bat",  
"(b:bat[:oid,:any_1],mode:bit):bat[:oid,:any_1] ",      "BKCsetkey;"  ]
+[ 49@0,        "partition",    "pattern",      "bat",  
"(b:bat[:oid,:any_1],pieces:int,n:int):bat[:oid,:any_1] ",      
"CMDBATpartition2;"  ]
+[ 50@0,        "partition",    "pattern",      "bat",  
"(b:bat[:oid,:any_1]):bat[:oid,:any_1]... ",    "CMDBATpartition;"  ]
+[ 51@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],del:bat[:oid,:oid]):bat[:oid,:oid] ",      
"BKCreuseBATmap;"  ]
+[ 52@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],del:bat[:oid,:oid]):bat[:oid,:any_1] ",    "BKCreuseBAT;"  
]
+[ 53@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],rid:bat[:oid,:oid],val:bat[:oid,:any_1],force:bit):bat[:oid,:any_1]
 ",     "BKCbat_inplace_force;"  ]
+[ 54@0,        "replace",      "command",      "bat",  
"(b:bat[:oid,:any_1],rid:bat[:oid,:oid],val:bat[:oid,:any_1]):bat[:oid,:any_1] 
",       "BKCbat_inplace;"  ]
+[ 55@0,        "reuse",        "command",      "bat",  
"(b:bat[:oid,:any_1],h:oid,t:any_1,force:bit):bat[:oid,:any_1] ",       
"BKCbun_inplace_force;"  ]
+[ 56@0,        "reuseMap",     "command",      "bat",  
"(b:bat[:oid,:any_1],h:oid,t:any_1):bat[:oid,:any_1] ", "BKCbun_inplace;"  ]
+[ 57@0,        "reverse",      "command",      "bat",  
"(b:bat[:any_1,:any_2]):bat[:any_2,:any_1] ",   "BKCreverse;"  ]
+[ 58@0,        "save", "pattern",      "bat",  "(val:any_1):bat[:oid,:any_1] 
",        "CMDBATsingle;"  ]
+[ 59@0,        "save", "command",      "bat",  "(b:bat[:oid,:any_1]):bit ",    
"BKCsetImprints;"  ]
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to