Changeset: 796d0faa6040 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=796d0faa6040
Modified Files:
gdk/gdk_batop.c
Branch: Oct2014
Log Message:
Use BATcopy to return an input bat.
This should set some trivial properties if they weren't set by the
input, such as (rev)sorted in case the bat has length 1.
diffs (28 lines):
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1145,8 +1145,9 @@ BATsubsort(BAT **sorted, BAT **order, BA
* return group information, or we can trivially
* deduce the groups */
if (sorted) {
- BBPfix(b->batCacheid);
- bn = b;
+ bn = BATcopy(b, TYPE_void, b->ttype, 0, TRANSIENT);
+ if (bn == NULL)
+ goto error;
*sorted = bn;
}
if (order) {
@@ -1234,8 +1235,10 @@ BATsubsort(BAT **sorted, BAT **order, BA
if (order)
*order = on;
if (groups) {
- BBPfix(g->batCacheid);
- *groups = g;
+ gn = BATcopy(g, TYPE_void, g->ttype, 0,
TRANSIENT);
+ if (gn == NULL)
+ goto error;
+ *groups = gn;
}
return GDK_SUCCEED;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list