diff --git a/CMake/resolve_dependency_modules/README.md b/CMake/resolve_dependency_modules/README.md index b3c13da17437..9a8764667c71 100644 --- a/CMake/resolve_dependency_modules/README.md +++ b/CMake/resolve_dependency_modules/README.md @@ -31,7 +31,7 @@ by Velox. See details on bundling below. | xsimd | 10.0.0 | Yes | | re2 | 2021-04-01 | Yes | | fmt | 10.1.1 | Yes | -| simdjson | 3.2.0 | Yes | +| simdjson | 3.8.0 | Yes | | folly | v2024.04.01.00 | Yes | | fizz | v2024.04.01.00 | No | | wangle | v2024.04.01.00 | No | @@ -75,4 +75,3 @@ Ideally all patches should be upstream when possible and removed once merged. ## Specify a custom url/file path for an offline build Set environment variables `VELOX__URL` to specify a custom dependency url or local tar file path, an optional sha256 checksum can be provided as `VELOX__SHA256`. - diff --git a/CMake/resolve_dependency_modules/simdjson.cmake b/CMake/resolve_dependency_modules/simdjson.cmake index bff17eaf4d07..279a868e7f47 100644 --- a/CMake/resolve_dependency_modules/simdjson.cmake +++ b/CMake/resolve_dependency_modules/simdjson.cmake @@ -13,9 +13,9 @@ # limitations under the License. include_guard(GLOBAL) -set(VELOX_SIMDJSON_VERSION 3.2.0) +set(VELOX_SIMDJSON_VERSION 3.8.0) set(VELOX_SIMDJSON_BUILD_SHA256_CHECKSUM - 75a684dbbe38cf72b8b3bdbdc430764813f3615899a6029931c26ddd89812da4) + e28e3f46f0012d405b67de6c0a75e8d8c9a612b0548cb59687822337d73ca78b) set(VELOX_SIMDJSON_SOURCE_URL "https://github.com/simdjson/simdjson/archive/refs/tags/v${VELOX_SIMDJSON_VERSION}.tar.gz" ) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9612b017391..9a290d408d01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -437,7 +437,7 @@ if(${VELOX_BUILD_PYTHON_PACKAGE}) endif() set_source(simdjson) -resolve_dependency(simdjson 3.2.0) +resolve_dependency(simdjson 3.8.0) # Locate or build folly. add_compile_definitions(FOLLY_HAVE_INT128_T=1) diff --git a/velox/functions/prestosql/tests/JsonCastTest.cpp b/velox/functions/prestosql/tests/JsonCastTest.cpp index cbfa04886737..642a3e412cc3 100644 --- a/velox/functions/prestosql/tests/JsonCastTest.cpp +++ b/velox/functions/prestosql/tests/JsonCastTest.cpp @@ -828,7 +828,7 @@ TEST_F(JsonCastTest, toInteger) { JSON(), BIGINT(), {"233897314173811950000"_sv}, - "Problem while parsing a number"); + "BIGINT_ERROR: Big integer value that cannot be represented using 64 bits"); } TEST_F(JsonCastTest, toDouble) { diff --git a/velox/functions/prestosql/types/JsonType.cpp b/velox/functions/prestosql/types/JsonType.cpp index 33728eb29653..6f50fefba219 100644 --- a/velox/functions/prestosql/types/JsonType.cpp +++ b/velox/functions/prestosql/types/JsonType.cpp @@ -700,6 +700,9 @@ struct CastFromJsonTypedImpl { case simdjson::ondemand::number_type::unsigned_integer: w = num.get_uint64() != 0; break; + case simdjson::ondemand::number_type::big_integer: + VELOX_UNREACHABLE(); // value.get_number() would have failed + // already. } break; } @@ -962,6 +965,9 @@ struct CastFromJsonTypedImpl { return convertIfInRange(num.get_int64(), writer); case simdjson::ondemand::number_type::unsigned_integer: return simdjson::NUMBER_OUT_OF_RANGE; + case simdjson::ondemand::number_type::big_integer: + VELOX_UNREACHABLE(); // value.get_number() would have failed + // already. } break; }