Skip to content

Commit

Permalink
json fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vuule committed Oct 21, 2024
1 parent 6b9881b commit 39d16f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/src/io/json/json_column.cu
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,14 @@ table_with_metadata device_parse_nested_json(device_span<SymbolT const> d_input,
#endif

bool const is_array_of_arrays = [&]() {
auto const size_to_copy = std::min(size_t{2}, gpu_tree.node_categories.size());
auto const size_to_copy = std::min(size_t{2}, gpu_tree.node_categories.size());
if (size_to_copy == 0) return false;
auto const h_node_categories = cudf::detail::make_host_vector_sync(
device_span<NodeT const>{gpu_tree.node_categories.data(), size_to_copy}, stream);

if (options.is_enabled_lines()) return h_node_categories[0] == NC_LIST;
return h_node_categories[0] == NC_LIST and h_node_categories[1] == NC_LIST;
return h_node_categories.size() >= 2 and h_node_categories[0] == NC_LIST and
h_node_categories[1] == NC_LIST;
}();

auto [gpu_col_id, gpu_row_offsets] =
Expand Down

0 comments on commit 39d16f7

Please sign in to comment.