From 344b9c55bf37e5be7a8954075b4d059cd976cf95 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Thu, 26 Mar 2026 18:36:29 +0100 Subject: [PATCH 1/3] Update chicory to 1.7.5 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 121aef8..0705583 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ all,-missing clean verify -DskipTests - 1.7.2 + 1.7.5 From 679989463fcda90d8b6a4573e18c20fd5f2af8d6 Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Thu, 26 Mar 2026 19:54:28 +0100 Subject: [PATCH 2/3] Update python to 3.14 --- CMakeLists.txt | 4 ++-- Dockerfile | 39 ++++++++++++++++++++++++++------------- build-wasm.sh | 8 +++++--- pom.xml | 2 +- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ed461f..cd28a7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,10 +6,10 @@ set(CMAKE_EXECUTABLE_SUFFIX ".wasm") add_compile_options(-Werror -Wall -Wextra -Wimplicit-fallthrough) -add_link_options(-Wl,--max-memory=67108864) +add_link_options(-Wl,--max-memory=67108864 -z stack-size=16777216 -Wl,--stack-first -Wl,--initial-memory=41943040) add_executable(python-host pyhost.c) find_package(Python COMPONENTS Development) -target_link_libraries(python-host PUBLIC Python::Python wasi_vfs) +target_link_libraries(python-host PUBLIC Python::Python wasi_vfs wasi-emulated-signal wasi-emulated-getpid wasi-emulated-process-clocks) diff --git a/Dockerfile b/Dockerfile index ca9d131..175a498 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ ENV WASMTIME_VERSION=42.0.1 ENV WIZER_VERSION=10.0.0 ENV WASI_VFS_VERSION=0.6.2 ENV PYTHON_PATH=/opt/wasi-python -ENV PYTHON_PYLIB=${PYTHON_PATH}/lib/python3.13 +ENV PYTHON_PYLIB=${PYTHON_PATH}/lib/python3.14 ENV PYTHON_SITE=${PYTHON_PYLIB}/site-packages RUN <io.trino trino-wasm-python - 3.13-6-SNAPSHOT + 3.14-1-SNAPSHOT jar ${project.artifactId} From 9bcc5899421df13936a1c67e126fde990386e13b Mon Sep 17 00:00:00 2001 From: "Mateusz \"Serafin\" Gajewski" Date: Thu, 26 Mar 2026 20:52:35 +0100 Subject: [PATCH 3/3] Add support to Trino NUMBER type --- pyhost.c | 12 ++++++++---- pyhost.h | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pyhost.c b/pyhost.c index 747af1f..39ff70b 100644 --- a/pyhost.c +++ b/pyhost.c @@ -149,6 +149,7 @@ static void skipType(const u8** const type) case JSON: case UUID: case IPADDRESS: + case NUMBER: break; default: FATAL("Unsupported Trino type %d", trinoType); @@ -241,7 +242,8 @@ static PyObject* doBuildArgs(const u8** const type, const u8** const data) *data += sizeof(f32); return checked(PyFloat_FromDouble(value)); } - case DECIMAL: { + case DECIMAL: + case NUMBER: { PyObject* number = readString(data); PyObject* value = checked(PyObject_CallOneArg(decimalClass, number)); Py_DECREF(number); @@ -643,15 +645,17 @@ static bool buildResult(const u8** const type, PyObject* input, Buffer* buffer) bufferAppend(buffer, (u8*)&value, sizeof(f32)); return true; } - case DECIMAL: { + case DECIMAL: + case NUMBER: { + const char* typeName = trinoType == DECIMAL ? "DECIMAL" : "NUMBER"; PyObject* string = PyObject_CallOneArg(decimalToStringFunction, input); if (string == NULL) { - resultError(input, "DECIMAL"); + resultError(input, typeName); return false; } if (!bufferAppendString(buffer, string)) { Py_DECREF(string); - resultError(input, "DECIMAL"); + resultError(input, typeName); return false; } Py_DECREF(string); diff --git a/pyhost.h b/pyhost.h index 44fdfc1..0e10f65 100644 --- a/pyhost.h +++ b/pyhost.h @@ -32,6 +32,7 @@ typedef enum JSON = 20, UUID = 21, IPADDRESS = 22, + NUMBER = 23, } TrinoType; // WebAssembly types