variant.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION.
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 
19 namespace CUDF_EXPORT cudf {
20 namespace io::parquet::experimental {
58 [[nodiscard]] std::unique_ptr<column> get_variant_field(
59  column_view const& variant_column,
60  std::string_view path,
63 
79 [[nodiscard]] std::unique_ptr<column> cast_variant(
80  column_view const& values,
81  data_type desired_type,
84 
100 [[nodiscard]] std::unique_ptr<column> extract_variant_field(
101  column_view const& variant_column,
102  std::string_view path,
103  data_type desired_type,
106 
108 } // namespace io::parquet::experimental
109 } // 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:278
Class definition for cudf::column.
column view class definitions
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
cuDF interfaces
Definition: host_udf.hpp:26
Type declarations for libcudf.