variant.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cudf/column/column.hpp>
10 #include <cudf/types.hpp>
13 
14 #include <rmm/cuda_stream_view.hpp>
15 
16 #include <memory>
17 #include <string_view>
18 
24 namespace CUDF_EXPORT cudf {
25 namespace io::parquet::experimental {
61 [[nodiscard]] std::unique_ptr<column> get_variant_field(
62  column_view const& variant_column,
63  std::string_view path,
66 
82 [[nodiscard]] std::unique_ptr<column> cast_variant(
83  column_view const& values,
84  data_type desired_type,
87 
103 [[nodiscard]] std::unique_ptr<column> extract_variant_field(
104  column_view const& variant_column,
105  std::string_view path,
106  data_type desired_type,
109 
111 } // namespace io::parquet::experimental
112 } // namespace CUDF_EXPORT cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Indicator for the logical data type of an element in a column.
Definition: types.hpp:286
Class definition for cudf::column.
column view class definitions
APIs for querying the default CUDA stream and per-thread default stream status.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
std::unique_ptr< column > get_variant_field(column_view const &variant_column, std::string_view path, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Extract the raw VARIANT-encoded bytes of a nested object field by JSONPath-like path.
std::unique_ptr< column > cast_variant(column_view const &values, data_type desired_type, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Decode a VARIANT value column's blobs into a typed cuDF column.
std::unique_ptr< column > extract_variant_field(column_view const &variant_column, std::string_view path, data_type desired_type, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Convenience wrapper: extract a nested object value by path and decode into a typed column.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
APIs for getting and setting the current device memory resource.
cuDF interfaces
Definition: host_udf.hpp:26
Type declarations for libcudf.