Changeset: a7c05c879665 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a7c05c879665
Modified Files:
monetdb5/optimizer/opt_bincopyfrom.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_bincopyfrom.c
Branch: copybinary
Log Message:
Do not use lng to hold the number of rows imported
triggered by testweb, yay testweb
diffs (73 lines):
diff --git a/monetdb5/optimizer/opt_bincopyfrom.c
b/monetdb5/optimizer/opt_bincopyfrom.c
--- a/monetdb5/optimizer/opt_bincopyfrom.c
+++ b/monetdb5/optimizer/opt_bincopyfrom.c
@@ -168,13 +168,13 @@ extract_column(MalBlkPtr mb, InstrPtr ol
if (!strNil(path)) {
InstrPtr p = newFcnCall(mb, sqlRef, importColumnRef);
setReturnArgument(p, old->argv[idx]);
- int new_count_var = newTmpVariable(mb, TYPE_lng);
+ int new_count_var = newTmpVariable(mb, TYPE_oid);
pushReturn(mb, p, new_count_var);
pushStr(mb, p, method);
pushStr(mb, p, path);
pushInt(mb, p, onclient);
if (count_var < 0)
- pushLng(mb, p, 0);
+ pushOid(mb, p, 0);
else
p = pushArgument(mb, p, count_var);
return new_count_var;
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -5499,7 +5499,7 @@ static mel_func sql_init_funcs[] = {
//we use bat.single now
//pattern("sql", "single", CMDBATsingle, false, "", args(1,2,
batargany("",2),argany("x",2))),
pattern("sql", "importTable", mvc_bin_import_table_wrap, true, "Import a
table from the files (fname)", args(1,5,
batvarargany("",0),arg("sname",str),arg("tname",str),arg("onclient",int),vararg("fname",str))),
- pattern("sql", "importColumn", mvc_bin_import_column_wrap, false, "Import a
column from the given file", args(2, 6, batargany("", 0),arg("", lng),
arg("type",str),arg("path",str),arg("onclient",int),arg("nrows",lng))),
+ pattern("sql", "importColumn", mvc_bin_import_column_wrap, false, "Import a
column from the given file", args(2, 6, batargany("", 0),arg("", oid),
arg("type",str),arg("path",str),arg("onclient",int),arg("nrows",oid))),
command("aggr", "not_unique", not_unique, false, "check if the tail sorted
bat b doesn't have unique tail values", args(1,2, arg("",bit),batarg("b",oid))),
command("sql", "optimizers", getPipeCatalog, false, "", args(3,3,
batarg("",str),batarg("",str),batarg("",str))),
pattern("sql", "optimizer_updates", SQLoptimizersUpdate, false, "", noargs),
diff --git a/sql/backends/monet5/sql_bincopyfrom.c
b/sql/backends/monet5/sql_bincopyfrom.c
--- a/sql/backends/monet5/sql_bincopyfrom.c
+++ b/sql/backends/monet5/sql_bincopyfrom.c
@@ -450,11 +450,11 @@ find_type_rec(str name)
static str
-load_column(struct type_rec *rec, const char *name, BAT *bat, stream *s, lng
rows_estimate, int *eof_reached)
+load_column(struct type_rec *rec, const char *name, BAT *bat, stream *s, BUN
rows_estimate, int *eof_reached)
{
str msg = MAL_SUCCEED;
BUN orig_count, new_count;
- lng rows_added;
+ BUN rows_added;
orig_count = BATcount(bat);
@@ -549,7 +549,7 @@ finish_mapi_file_upload(backend *be, boo
/* Import a single file into a new BAT.
*/
static str
-importColumn(backend *be, bat *ret, lng *retcnt, str method, str path, int
onclient, lng nrows)
+importColumn(backend *be, bat *ret, BUN *retcnt, str method, str path, int
onclient, BUN nrows)
{
// In this function we create the BAT and open the file, and tidy
// up when things go wrong. The actual work happens in load_column().
@@ -642,13 +642,13 @@ mvc_bin_import_column_wrap(Client cntxt,
assert(pci->retc == 2);
bat *ret = getArgReference_bat(stk, pci, 0);
- lng *retcnt = getArgReference_lng(stk, pci, 1);
+ BUN *retcnt = getArgReference_oid(stk, pci, 1);
assert(pci->argc == 6);
str method = *getArgReference_str(stk, pci, 2);
str path = *getArgReference_str(stk, pci, 3);
int onclient = *getArgReference_int(stk, pci, 4);
- lng nrows = *getArgReference_lng(stk, pci, 5);
+ BUN nrows = *getArgReference_oid(stk, pci, 5);
backend *be = cntxt->sqlcontext;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list