Changeset: ca240942cc9d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ca240942cc9d
Modified Files:
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_statement.c
sql/include/sql_catalog.h
sql/storage/bat/bat_storage.c
Branch: dict
Log Message:
merged with default
diffs (truncated from 5196 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -71,9 +71,6 @@
%bcond_without fits
%endif
-%{!?__python3: %global __python3 /usr/bin/python3}
-%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-
Name: %{name}
Version: %{version}
Release: %{release}
@@ -98,7 +95,7 @@ BuildRequires: hardlink
BuildRequires: cmake3 >= 3.12
BuildRequires: gcc
BuildRequires: bison
-BuildRequires: /usr/bin/python3
+BuildRequires: python3-devel
%if %{?rhel:1}%{!?rhel:0}
# RH 7 (and for readline also 8)
BuildRequires: bzip2-devel
@@ -682,7 +679,6 @@ package. You probably don't need this,
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
Requires: %{name}-client-tests = %{version}-%{release}
-Requires: /usr/bin/python3
BuildArch: noarch
%description testing-python
@@ -842,6 +838,15 @@ else
/usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux
fi
+# update shebang lines for Python scripts
+%if %{?py3_shebang_fix:1}%{!?py3_shebang_fix:0}
+ # Fedora has py3_shebang_fix macro
+ %{py3_shebang_fix} %{buildroot}%{_bindir}/*.py
+%else
+ # EPEL does not, but we can use the script directly
+ /usr/bin/pathfix.py -pni "%{__python3} -s" %{buildroot}%{_bindir}/*.py
+%endif
+
%changelog
* Thu Sep 30 2021 Sjoerd Mullender <[email protected]> - 11.41.11-20210930
- Rebuilt.
diff --git a/ctest/tools/monetdbe/example1.c b/ctest/tools/monetdbe/example1.c
--- a/ctest/tools/monetdbe/example1.c
+++ b/ctest/tools/monetdbe/example1.c
@@ -36,7 +36,7 @@ main(void)
monetdbe_column* rcol;
if ((err = monetdbe_result_fetch(result, &rcol, c)) !=
NULL)
error(err)
- switch (rcol->type) {
+ switch (rcol->type.type) {
case monetdbe_int32_t: {
monetdbe_column_int32_t * col =
(monetdbe_column_int32_t *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/example2.c b/ctest/tools/monetdbe/example2.c
--- a/ctest/tools/monetdbe/example2.c
+++ b/ctest/tools/monetdbe/example2.c
@@ -43,7 +43,7 @@ main(void)
monetdbe_column* rcol;
if ((err = monetdbe_result_fetch(result, &rcol, c)) !=
NULL)
error(err)
- switch (rcol->type) {
+ switch (rcol->type.type) {
case monetdbe_bool: {
monetdbe_column_bool * col =
(monetdbe_column_bool *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/example_append.c
b/ctest/tools/monetdbe/example_append.c
--- a/ctest/tools/monetdbe/example_append.c
+++ b/ctest/tools/monetdbe/example_append.c
@@ -44,7 +44,7 @@ main(void)
for (size_t c = 0; c < result->ncols; c++) {
if ((err = monetdbe_result_fetch(result, rcol+c, c)) !=
NULL)
error(err)
- switch (rcol[c]->type) {
+ switch (rcol[c]->type.type) {
case monetdbe_int32_t: {
monetdbe_column_int32_t * col =
(monetdbe_column_int32_t *) rcol[c];
if (col->data[r] == col->null_value) {
@@ -129,7 +129,7 @@ main(void)
for (size_t c = 0; c < result->ncols; c++) {
if ((err = monetdbe_result_fetch(result, rcol+c, c)) !=
NULL)
error(err)
- switch (rcol[c]->type) {
+ switch (rcol[c]->type.type) {
case monetdbe_int32_t: {
monetdbe_column_int32_t * col =
(monetdbe_column_int32_t *) rcol[c];
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/example_append_raw.c
b/ctest/tools/monetdbe/example_append_raw.c
--- a/ctest/tools/monetdbe/example_append_raw.c
+++ b/ctest/tools/monetdbe/example_append_raw.c
@@ -38,11 +38,11 @@ main(void)
int32_t i1 = 42;
int32_t i2 = *(int32_t*)monetdbe_null(mdbe, monetdbe_int32_t);
int32_t ints[2] = { i1, i2 };
- monetdbe_column col0 = { .type = monetdbe_int32_t, .data = &ints,
.count = 2 };
+ monetdbe_column col0 = { .type.type = monetdbe_int32_t, .data = &ints,
.count = 2 };
// str
char* dstr[2] = { "Hello", "World" };
- monetdbe_column col1 = { .type = monetdbe_str, .data = &dstr, .count =
2 };
+ monetdbe_column col1 = { .type.type = monetdbe_str, .data = &dstr,
.count = 2 };
// timestamp
monetdbe_data_date dt = { .day = 2, .month = 3, .year = 2020 };
@@ -50,25 +50,25 @@ main(void)
monetdbe_data_timestamp t1 = { .date = dt, .time = tm };
monetdbe_data_timestamp t2 =
*(monetdbe_data_timestamp*)monetdbe_null(mdbe, monetdbe_timestamp);
monetdbe_data_timestamp tss[2] = { t1, t2 };
- monetdbe_column col2 = { .type = monetdbe_timestamp, .data = &tss,
.count = 2 };
+ monetdbe_column col2 = { .type.type = monetdbe_timestamp, .data = &tss,
.count = 2 };
// date
monetdbe_data_date d1 = dt;
monetdbe_data_date d2 = *(monetdbe_data_date*)monetdbe_null(mdbe,
monetdbe_date);
monetdbe_data_date dts[2] = { d1, d2 };
- monetdbe_column col3 = { .type = monetdbe_date, .data = &dts, .count =
2 };
+ monetdbe_column col3 = { .type.type = monetdbe_date, .data = &dts,
.count = 2 };
// time
monetdbe_data_time tm1 = tm;
monetdbe_data_time tm2 = *(monetdbe_data_time*)monetdbe_null(mdbe,
monetdbe_time);
monetdbe_data_time tms[2] = { tm1, tm2 };
- monetdbe_column col4 = { .type = monetdbe_time, .data = &tms, .count =
2 };
+ monetdbe_column col4 = { .type.type = monetdbe_time, .data = &tms,
.count = 2 };
// blob
monetdbe_data_blob b1 = { .size = 1, .data = "33" };
monetdbe_data_blob b2 = *(monetdbe_data_blob*)monetdbe_null(mdbe,
monetdbe_blob);
monetdbe_data_blob bs[2] = { b1, b2 };
- monetdbe_column col5 = { .type = monetdbe_blob, .data = &bs, .count = 2
};
+ monetdbe_column col5 = { .type.type = monetdbe_blob, .data = &bs,
.count = 2 };
monetdbe_column* dcol[6] = { &col0, &col1, &col2, &col3, &col4, &col5 };
if ((err = monetdbe_append(mdbe, "sys", "test", (monetdbe_column**)
&dcol, 6)) != NULL)
@@ -76,7 +76,7 @@ main(void)
// str with wrong utf8
char* dstr2[2] = { "\xc3\x28", "\xe2\x28\xa1" };
- monetdbe_column col12 = { .type = monetdbe_str, .data = &dstr2, .count
= 2 };
+ monetdbe_column col12 = { .type.type = monetdbe_str, .data = &dstr2,
.count = 2 };
monetdbe_column* dcol2[6] = { &col0, &col12, &col2, &col3, &col4, &col5
};
if ((err = monetdbe_append(mdbe, "sys", "test", (monetdbe_column**)
&dcol2, 6)) == NULL)
error("Invalid UTF-8 string expected")
@@ -89,7 +89,7 @@ main(void)
for (size_t c = 0; c < result->ncols; c++) {
if ((err = monetdbe_result_fetch(result, rcol+c, c)) !=
NULL)
error(err)
- switch (rcol[c]->type) {
+ switch (rcol[c]->type.type) {
case monetdbe_int32_t: {
monetdbe_column_int32_t * col =
(monetdbe_column_int32_t *) rcol[c];
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/example_blob.c
b/ctest/tools/monetdbe/example_blob.c
--- a/ctest/tools/monetdbe/example_blob.c
+++ b/ctest/tools/monetdbe/example_blob.c
@@ -38,7 +38,7 @@ main(void)
monetdbe_column* rcol;
if ((err = monetdbe_result_fetch(result, &rcol, c)) !=
NULL)
error(err)
- switch (rcol->type) {
+ switch (rcol->type.type) {
case monetdbe_blob: {
monetdbe_column_blob * col =
(monetdbe_column_blob *) rcol;
if (!col->data[r].data) {
diff --git a/ctest/tools/monetdbe/example_connections.c
b/ctest/tools/monetdbe/example_connections.c
--- a/ctest/tools/monetdbe/example_connections.c
+++ b/ctest/tools/monetdbe/example_connections.c
@@ -38,7 +38,7 @@ main(void)
monetdbe_column* rcol;
if ((err = monetdbe_result_fetch(result, &rcol, c)) !=
NULL)
error(err)
- switch (rcol->type) {
+ switch (rcol->type.type) {
case monetdbe_int32_t: {
monetdbe_column_int32_t * col =
(monetdbe_column_int32_t *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/example_decimals.c
b/ctest/tools/monetdbe/example_decimals.c
--- a/ctest/tools/monetdbe/example_decimals.c
+++ b/ctest/tools/monetdbe/example_decimals.c
@@ -36,7 +36,7 @@ main(void)
monetdbe_column* rcol;
if ((err = monetdbe_result_fetch(result, &rcol, c)) !=
NULL)
error(err)
- switch (rcol->type) {
+ switch (rcol->type.type) {
case monetdbe_bool: {
monetdbe_column_bool * col =
(monetdbe_column_bool *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/example_proxy.c
b/ctest/tools/monetdbe/example_proxy.c
--- a/ctest/tools/monetdbe/example_proxy.c
+++ b/ctest/tools/monetdbe/example_proxy.c
@@ -38,7 +38,7 @@ main(int argc, char** argv)
monetdbe_column* rcol;
if ((err = monetdbe_result_fetch(result, &rcol, c)) !=
NULL)
error(err)
- switch (rcol->type) {
+ switch (rcol->type.type) {
case monetdbe_int32_t: {
monetdbe_column_int32_t * col =
(monetdbe_column_int32_t *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/example_temporal.c
b/ctest/tools/monetdbe/example_temporal.c
--- a/ctest/tools/monetdbe/example_temporal.c
+++ b/ctest/tools/monetdbe/example_temporal.c
@@ -39,7 +39,7 @@ main(void)
monetdbe_column* rcol;
if ((err = monetdbe_result_fetch(result, &rcol, c)) !=
NULL)
error(err)
- switch (rcol->type) {
+ switch (rcol->type.type) {
case monetdbe_int32_t: {
monetdbe_column_int32_t * col =
(monetdbe_column_int32_t *) rcol;
if (col->data[r] == col->null_value) {
diff --git a/ctest/tools/monetdbe/test_helper_template.h
b/ctest/tools/monetdbe/test_helper_template.h
--- a/ctest/tools/monetdbe/test_helper_template.h
+++ b/ctest/tools/monetdbe/test_helper_template.h
@@ -29,7 +29,7 @@ bool CHECK_COLUMN_FUNC (
const monetdbe_types expected_type = TPE_ENUM;
- if (rcol->type != expected_type) {
+ if (rcol->type.type != expected_type) {
printf("Actual column and expected column differ in type.\n");
return false;
}
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -835,7 +835,7 @@ BBPcheckbats(unsigned bbpversion)
}
}
#else
- /* first check string offset heap without widht,
+ /* first check string offset heap without width,
* then with */
#ifdef GDKLIBRARY_TAILN
/* if bbpversion > GDKLIBRARY_TAILN, the offset heap can
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -16835,6 +16835,7 @@ VARconvert(ValPtr ret, const ValRecord *
nils = BUN_NONE;
}
ret->val.mval = tmp.val.btval;
+ ret->len = ATOMsize(TYPE_msk);
} else if (v->vtype == TYPE_msk) {
ValRecord tmp;
tmp.vtype = TYPE_bit;
@@ -16845,9 +16846,11 @@ VARconvert(ValPtr ret, const ValRecord *
if (v->vtype == TYPE_void ||
(*ATOMcompare(v->vtype))(VALptr(v),
ATOMnilptr(v->vtype)) == 0) {
- ret->val.sval = GDKstrdup(str_nil);
+ if (VALinit(ret, TYPE_str, str_nil) == NULL)
+ return GDK_FAIL;
} else if (BATatoms[v->vtype].atomToStr ==
BATatoms[TYPE_str].atomToStr) {
- ret->val.sval = GDKstrdup(v->val.sval);
+ if (VALinit(ret, TYPE_str, v->val.sval) == NULL)
+ return GDK_FAIL;
} else {
ret->len = 0;
ret->val.sval = NULL;
@@ -16858,25 +16861,24 @@ VARconvert(ValPtr ret, const ValRecord *
GDKfree(ret->val.sval);
ret->val.sval = NULL;
ret->len = 0;
- nils = BUN_NONE;
- }
- }
- if (ret->val.sval == NULL)
- nils = BUN_NONE;
+ return GDK_FAIL;
+ }
+ }
} else if (ret->vtype == TYPE_void) {
if (abort_on_error &&
ATOMcmp(v->vtype, VALptr(v), ATOMnilptr(v->vtype)) != 0) {
GDKerror("22003!cannot convert non-nil to void.\n");
- nils = BUN_NONE;
+ return GDK_FAIL;
}
ret->val.oval = oid_nil;
+ ret->len = ATOMsize(TYPE_void);
} else if (v->vtype == TYPE_void) {
if (VALinit(ret, ret->vtype, ATOMnilptr(ret->vtype)) == NULL)
- nils = BUN_NONE;
+ return GDK_FAIL;
} else if (v->vtype == TYPE_str) {
if (strNil(v->val.sval)) {
if (VALinit(ret, ret->vtype, ATOMnilptr(ret->vtype)) ==
NULL)
- nils = BUN_NONE;
+ return GDK_FAIL;
} else if (ATOMstorage(ret->vtype) == TYPE_ptr) {
nils = BUN_NONE + 1;
} else {
@@ -16912,7 +16914,7 @@ VARconvert(ValPtr ret, const ValRecord *
"to type %s failed.\n",
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list