Skip to content

Commit

Permalink
Upgrade simdjson to 3.8.0 (from 3.2.0) (facebookincubator#9456)
Browse files Browse the repository at this point in the history
Summary:

[simdjson] third-party library import

Reviewed By: Yuhta

Differential Revision: D56031937
  • Loading branch information
mbasmanova authored and facebook-github-bot committed Apr 11, 2024
1 parent d5f8e8e commit f29a939
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMake/resolve_dependency_modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ by Velox. See details on bundling below.
| fbthrift | v2024.04.01.00 | No |
| DuckDB (testing) | 0.8.1 | Yes |
| cpr (testing) | 1.10.15 | Yes |
| simdjson | 3.8.0 | Yes |

# Bundled Dependency Management
This module provides a dependency management system that allows us to automatically fetch and build dependencies from source if needed.
Expand Down Expand Up @@ -75,4 +76,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_<PACKAGE>_URL` to specify a custom dependency url or local tar file path, an optional sha256 checksum can be provided as `VELOX_<PACKAGE>_SHA256`.

2 changes: 1 addition & 1 deletion CMake/resolve_dependency_modules/simdjson.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# 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)
set(VELOX_SIMDJSON_SOURCE_URL
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion velox/functions/prestosql/tests/JsonCastTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions velox/functions/prestosql/types/JsonType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,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;
}
Expand Down Expand Up @@ -919,6 +922,9 @@ struct CastFromJsonTypedImpl {
return convertIfInRange<T>(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;
}
Expand Down

0 comments on commit f29a939

Please sign in to comment.