Skip to content

Commit b62697b

Browse files
committed
work
1 parent 174e514 commit b62697b

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

cpp/cmake_modules/FindsimdjsonAlt.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ if(SimdjsonAlt_FOUND)
8282
OUTPUT_VARIABLE SIMDJSON_INCLUDE_DIR
8383
OUTPUT_STRIP_TRAILING_WHITESPACE)
8484
endif()
85-
add_library(simdjson::simdjson STATIC IMPORTED)
85+
# Detect library type based on file extension
86+
if("${SIMDJSON_LIBRARY}" MATCHES "\\.(so|dylib)(\\.[0-9]+)*$"
87+
OR "${SIMDJSON_LIBRARY}" MATCHES "\\.dll$")
88+
add_library(simdjson::simdjson SHARED IMPORTED)
89+
else()
90+
add_library(simdjson::simdjson STATIC IMPORTED)
91+
endif()
8692
set_target_properties(simdjson::simdjson
8793
PROPERTIES IMPORTED_LOCATION "${SIMDJSON_LIBRARY}"
8894
INTERFACE_INCLUDE_DIRECTORIES

cpp/src/arrow/extension/opaque_test.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,13 @@ TEST(OpaqueType, Deserialize) {
130130
EXPECT_RAISES_WITH_MESSAGE_THAT(
131131
Invalid,
132132
testing::AnyOf(testing::HasSubstr("The document is empty"),
133-
testing::HasSubstr("EMPTY")),
133+
testing::HasSubstr("EMPTY"), testing::HasSubstr("no JSON found")),
134134
type->Deserialize(null(), R"()"));
135-
EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid,
136-
testing::AnyOf(testing::HasSubstr("Missing a name"),
137-
testing::HasSubstr("TAPE_ERROR")),
138-
type->Deserialize(null(), R"({)"));
135+
EXPECT_RAISES_WITH_MESSAGE_THAT(
136+
Invalid,
137+
testing::AnyOf(testing::HasSubstr("Missing a name"), testing::HasSubstr("TAPE_ERROR"),
138+
testing::HasSubstr("improper structure")),
139+
type->Deserialize(null(), R"({)"));
139140
EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid, testing::HasSubstr("not an object"),
140141
type->Deserialize(null(), R"([])"));
141142
EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid, testing::HasSubstr("missing type_name"),

0 commit comments

Comments
 (0)