Changeset: 4f0108afcde7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4f0108afcde7
Modified Files:
sql/backends/monet5/sql_bincopy.c
sql/backends/monet5/sql_bincopyconvert.c
Branch: copyfaster
Log Message:
Use bunfastappend rather than BUNappend
It's much faster and we don't need the additional bookkeeping
BUNappend performs, we simply clear all properties at the end.
diffs (31 lines):
diff --git a/sql/backends/monet5/sql_bincopy.c
b/sql/backends/monet5/sql_bincopy.c
--- a/sql/backends/monet5/sql_bincopy.c
+++ b/sql/backends/monet5/sql_bincopy.c
@@ -213,6 +213,15 @@ load_column(type_record_t *rec, const ch
new_count = BATcount(bat);
rows_added = new_count - orig_count;
+ if (rows_added > 0) {
+ // We don't know anything about the data we just loaded
+ bat->tkey = false;
+ bat->tnonil = false;
+ bat->tsorted = false;
+ bat->trevsorted = false;
+ bat->tascii = false;
+ }
+
if (msg == MAL_SUCCEED && rows_estimate != 0 && rows_estimate !=
rows_added)
bailout(
"inconsistent row count in %s: expected "BUNFMT", got
"BUNFMT,
diff --git a/sql/backends/monet5/sql_bincopyconvert.c
b/sql/backends/monet5/sql_bincopyconvert.c
--- a/sql/backends/monet5/sql_bincopyconvert.c
+++ b/sql/backends/monet5/sql_bincopyconvert.c
@@ -385,7 +385,7 @@ load_zero_terminated_text(BAT *bat, stre
}
value = buffer;
}
- if (BUNappend(bat, value, false) != GDK_SUCCEED) {
+ if (bunfastapp(bat, value) != GDK_SUCCEED) {
msg = createException(SQL, "sql.importColumn",
GDK_EXCEPTION);
goto end;
}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]