From 0612e3f17dd61d10f7c9f81096210991b5ee79bb Mon Sep 17 00:00:00 2001 From: Rong Ma Date: Fri, 24 Jan 2025 10:33:28 +0000 Subject: [PATCH] Add build option for skipping simdjson utf8 validation --- CMake/resolve_dependency_modules/simdjson.cmake | 4 ++++ CMakeLists.txt | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CMake/resolve_dependency_modules/simdjson.cmake b/CMake/resolve_dependency_modules/simdjson.cmake index ddd232050961..a0c55c3758a3 100644 --- a/CMake/resolve_dependency_modules/simdjson.cmake +++ b/CMake/resolve_dependency_modules/simdjson.cmake @@ -29,4 +29,8 @@ FetchContent_Declare( URL ${VELOX_SIMDJSON_SOURCE_URL} URL_HASH ${VELOX_SIMDJSON_BUILD_SHA256_CHECKSUM}) +if(${VELOX_SIMDJSON_SKIPUTF8VALIDATION}) + set(SIMDJSON_SKIPUTF8VALIDATION ON) +endif() + FetchContent_MakeAvailable(simdjson) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8d9508c175e..339d1ed0dda2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,8 @@ option( VELOX_ENABLE_INT64_BUILD_PARTITION_BOUND "make buildPartitionBounds_ a vector int64 instead of int32 to avoid integer overflow when the hashtable has billions of records" OFF) +option(VELOX_SIMDJSON_SKIPUTF8VALIDATION + "Skip simdjson utf8 validation in JSON parsing" OFF) # Explicitly force compilers to generate colored output. Compilers usually do # this by default if they detect the output is a terminal, but this assumption