Skip to content

Commit

Permalink
Merge branch 'branch-23.02' into arrow_10
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar authored Dec 16, 2022
2 parents e830685 + 4133b28 commit 120cd2c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cpp/cmake/thirdparty/get_arrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,16 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB
# Turn off CPM using `find_package` so we always download and make sure we get proper static
# library.
set(CPM_DOWNLOAD_Arrow TRUE)
# By default ARROW will try to search for a static version of OpenSSL which is a bad idea given
# that shared linking is advised for critical components like SSL. If a static build is
# requested, we honor ARROW's default of static linking, but users may consider setting
# ARROW_OPENSSL_USE_SHARED even in static builds.
else()
set(ARROW_BUILD_SHARED ON)
set(ARROW_BUILD_STATIC OFF)
# By default ARROW will try to search for a static version of OpenSSL which is a bad idea given
# that shared linking is advised for critical components like SSL
set(ARROW_OPENSSL_USE_SHARED ON)
endif()

set(ARROW_PYTHON_OPTIONS "")
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/strings/json/json_path.cu
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,8 @@ std::unique_ptr<cudf::column> get_json_object(cudf::strings_column_view const& c
CUDF_EXPECTS(std::get<1>(preprocess) <= max_command_stack_depth,
"Encountered JSONPath string that is too complex");

if (col.is_empty()) return make_empty_column(type_id::STRING);

// allocate output offsets buffer.
auto offsets = cudf::make_fixed_width_column(
data_type{type_id::INT32}, col.size() + 1, mask_state::UNALLOCATED, stream, mr);
Expand Down
10 changes: 9 additions & 1 deletion cpp/tests/strings/json_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ TEST_F(JsonPathTests, GetJsonObjectEmptyQuery)

TEST_F(JsonPathTests, GetJsonObjectEmptyInputsAndOutputs)
{
// empty input -> null
// empty string input -> null
{
cudf::test::strings_column_wrapper input{""};
std::string json_path("$");
Expand All @@ -507,6 +507,14 @@ TEST_F(JsonPathTests, GetJsonObjectEmptyInputsAndOutputs)
}
}

TEST_F(JsonPathTests, GetJsonObjectEmptyInput)
{
cudf::test::strings_column_wrapper input{};
std::string json_path("$");
auto result = cudf::strings::get_json_object(cudf::strings_column_view(input), json_path);
CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*result, input);
}

// badly formed JSONpath strings
TEST_F(JsonPathTests, GetJsonObjectIllegalQuery)
{
Expand Down

0 comments on commit 120cd2c

Please sign in to comment.