Changeset: 545283ab883a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=545283ab883a
Modified Files:
sql/storage/store.c
Branch: merge-partitions
Log Message:
COLcopy is even better to duplicate a BAT. Thanks Roberto
diffs (31 lines):
diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -1496,12 +1496,7 @@ dup_sql_part(sql_allocator *sa, sql_tabl
BAT *b = NULL, *o = NULL;
if((o = BATdescriptor(opt->part.values)) == NULL) /* TODO the
bat operations might fail :( */
return NULL;
- if ((b = COLnew(0, opt->tpe, BATcount(o), TRANSIENT)) == NULL) {
- BBPunfix(o->batCacheid);
- return NULL;
- }
- if(BATappend(b, o, NULL, FALSE) != GDK_SUCCEED) {
- BBPunfix(b->batCacheid);
+ if ((b = COLcopy(o, opt->tpe, 0, TRANSIENT)) == NULL) {
BBPunfix(o->batCacheid);
return NULL;
}
@@ -2483,12 +2478,7 @@ part_dup(sql_trans *tr, int flag, sql_pa
BAT *b = NULL, *o = NULL;
if((o = BATdescriptor(opt->part.values)) == NULL) /* TODO the
bat operations might fail :( */
return NULL;
- if ((b = COLnew(0, opt->tpe, BATcount(o), TRANSIENT)) == NULL) {
- BBPunfix(o->batCacheid);
- return NULL;
- }
- if(BATappend(b, o, NULL, FALSE) != GDK_SUCCEED) {
- BBPunfix(b->batCacheid);
+ if ((b = COLcopy(o, opt->tpe, 0, TRANSIENT)) == NULL) {
BBPunfix(o->batCacheid);
return NULL;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list