Changeset: 771b92d1b410 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=771b92d1b410 Modified Files: monetdb5/mal/mal_function.c sql/backends/monet5/UDF/pyapi/convert_loops.h sql/test/BugTracker-2017/Tests/All Branch: default Log Message:
Merge with Dec2016 branch. diffs (75 lines): diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c --- a/monetdb5/mal/mal_function.c +++ b/monetdb5/mal/mal_function.c @@ -924,7 +924,7 @@ showFlowDetails(MalBlkPtr mb, MalStkPtr { (void) mb; /* fool the compiler */ (void) stk; /* fool the compiler */ - mnstr_printf(f, "n%d [fontsize=8, shape=box, label=\"%s\"]\n", pc, getFunctionId(p)); + mnstr_printf(f, "n%d [fontsize=8, shape=box, label=\"%s\"]\n", pc, getFunctionId(p) ? getFunctionId(p) : "<noname>"); } /* Produce a file with the flow graph in dot format. diff --git a/sql/backends/monet5/UDF/pyapi/convert_loops.h b/sql/backends/monet5/UDF/pyapi/convert_loops.h --- a/sql/backends/monet5/UDF/pyapi/convert_loops.h +++ b/sql/backends/monet5/UDF/pyapi/convert_loops.h @@ -171,6 +171,34 @@ } \ } \ } } +#define NP_COL_BAT_LOOPF(bat, mtpe_to, mtpe_from,index) { \ + if (mask == NULL) \ + { \ + for (iu = 0; iu < ret->count; iu++) \ + { \ + if (isnan(((mtpe_from*)data)[index_offset * ret->count + iu])) { \ + bat->tnil = 1; \ + ((mtpe_to*) Tloc(bat, 0))[index + iu] = mtpe_to##_nil; \ + } else { \ + ((mtpe_to*) Tloc(bat, 0))[index + iu] = (mtpe_to)((mtpe_from*)data)[index_offset * ret->count + iu]; \ + } \ + } \ + } \ + else \ + { \ + for (iu = 0; iu < ret->count; iu++) \ + { \ + if (mask[index_offset * ret->count + iu] == TRUE || isnan(((mtpe_from*)data)[index_offset * ret->count + iu])) \ + { \ + bat->tnil = 1; \ + ((mtpe_to*) Tloc(bat, 0))[index + iu] = mtpe_to##_nil; \ + } \ + else \ + { \ + ((mtpe_to*) Tloc(bat, 0))[index + iu] = (mtpe_to)(*(mtpe_from*)(&data[(index_offset * ret->count + iu) * ret->memory_size]));\ + } \ + } \ + } } // This #define converts a Numpy Array to a BAT by copying the internal data to the BAT. It converts the data from the Numpy Array to the BAT using a function // This function has to have the prototype 'bool function(void *data, size_t memory_size, mtpe_to *resulting_value)', and either return False (if conversion fails) @@ -253,9 +281,9 @@ case NPY_ULONG: NP_COL_BAT_LOOP(bat, mtpe, unsigned long, index); break; \ case NPY_ULONGLONG: NP_COL_BAT_LOOP(bat, mtpe, unsigned long long, index); break; \ case NPY_FLOAT16: \ - case NPY_FLOAT: NP_COL_BAT_LOOP(bat, mtpe, float, index); break; \ - case NPY_DOUBLE: NP_COL_BAT_LOOP(bat, mtpe, double, index); break; \ - case NPY_LONGDOUBLE: NP_COL_BAT_LOOP(bat, mtpe, long double, index); break; \ + case NPY_FLOAT: NP_COL_BAT_LOOPF(bat, mtpe, float, index); break; \ + case NPY_DOUBLE: NP_COL_BAT_LOOPF(bat, mtpe, double, index); break; \ + case NPY_LONGDOUBLE: NP_COL_BAT_LOOPF(bat, mtpe, long double, index); break; \ case NPY_STRING: NP_COL_BAT_LOOP_FUNC(bat, mtpe, str_to_##mtpe, char, index); break; \ case NPY_UNICODE: NP_COL_BAT_LOOP_FUNC(bat, mtpe, unicode_to_##mtpe, PythonUnicodeType, index); break; \ case NPY_OBJECT: NP_COL_BAT_LOOP_FUNC(bat, mtpe, pyobject_to_##mtpe, PyObject*, index); break; \ diff --git a/sql/test/BugTracker-2017/Tests/All b/sql/test/BugTracker-2017/Tests/All --- a/sql/test/BugTracker-2017/Tests/All +++ b/sql/test/BugTracker-2017/Tests/All @@ -15,7 +15,7 @@ complicated_logic.Bug-105 crash_on_count_div_count.Bug-6201 oidx-on-strings.Bug-6202 group-by-on-constant.Bug-6082 -rel2bin_project-assert.Bug-6080 +HAVE_NETCDF?rel2bin_project-assert.Bug-6080 str2decimal.Bug-6202 integer_addition_overflow.Bug-6205 dce_bug-6177 _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list