25 #include <cudf/utilities/export.hpp>
28 #include <string_view>
32 namespace CUDF_EXPORT
cudf {
54 FIXED_LEN_BYTE_ARRAY = 7,
79 std::vector<parquet_column_schema> children)
80 : _name{name}, _type_kind{type}, _children{std::move(children)}
89 [[nodiscard]]
auto name()
const {
return _name; }
96 [[nodiscard]]
auto type_kind()
const {
return _type_kind; }
103 [[nodiscard]]
auto const&
children() const& {
return _children; }
109 [[nodiscard]]
auto children() && {
return std::move(_children); }
118 [[nodiscard]]
auto const&
child(
int idx)
const& {
return children().at(idx); }
124 [[nodiscard]]
auto child(
int idx) && {
return std::move(children().at(idx)); }
137 std::vector<parquet_column_schema> _children;
164 [[nodiscard]]
auto const&
root() const& {
return _root; }
170 [[nodiscard]]
auto root() && {
return std::move(_root); }
206 std::vector<row_group_metadata> rg_metadata)
207 : _schema{std::move(schema)},
209 _num_rowgroups{num_rowgroups},
210 _file_metadata{std::move(file_metadata)},
211 _rowgroup_metadata{std::move(rg_metadata)}
220 [[nodiscard]]
auto const&
schema()
const {
return _schema; }
229 [[nodiscard]]
auto num_rows()
const {
return _num_rows; }
243 [[nodiscard]]
auto const&
metadata()
const {
return _file_metadata; }
256 key_value_metadata _file_metadata;
257 std::vector<row_group_metadata> _rowgroup_metadata;
parquet_metadata read_parquet_metadata(source_info const &src_info)
Reads metadata of parquet dataset.
int32_t size_type
Row index type for columns and tables.
cuDF-IO API type definitions
TypeKind
Basic data types in Parquet, determines how data is physically stored.
Schema of a parquet column, including the nested columns.
auto const & child(int idx) const &
Returns schema of the child with the given index.
auto name() const
Returns parquet column name; can be empty.
auto const & children() const &
Returns schemas of all child columns.
auto children() &&
Returns schemas of all child columns.
auto num_children() const
Returns the number of child columns.
auto type_kind() const
Returns parquet type of the column.
parquet_column_schema()=default
Default constructor.
auto child(int idx) &&
Returns schema of the child with the given index.
parquet_column_schema(std::string_view name, parquet::TypeKind type, std::vector< parquet_column_schema > children)
constructor
Schema of a parquet file.
parquet_schema()=default
Default constructor.
auto root() &&
Returns the schema of the struct column that contains all columns as fields.
auto const & root() const &
Returns the schema of the struct column that contains all columns as fields.
parquet_schema(parquet_column_schema root_column_schema)
constructor
Source information for read interfaces.