Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make parquet schema index type consistent #14256

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cpp/src/io/parquet/parquet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include "parquet_common.hpp"

#include <cudf/types.hpp>

#include <thrust/optional.h>

#include <cstdint>
Expand Down Expand Up @@ -153,8 +155,8 @@ struct SchemaElement {
// The following fields are filled in later during schema initialization
int max_definition_level = 0;
int max_repetition_level = 0;
int parent_idx = 0;
std::vector<size_t> children_idx;
size_type parent_idx = 0;
std::vector<size_type> children_idx;
Comment on lines +158 to +159
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how they were both wrong


bool operator==(SchemaElement const& other) const
{
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/io/parquet/reader_impl_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void metadata::sanitize_schema()
// add a struct child and move this element's children to the struct
schema_elem.converted_type = LIST;
schema_elem.repetition_type = OPTIONAL;
auto const struct_node_idx = schema.size();
auto const struct_node_idx = static_cast<size_type>(schema.size());

SchemaElement struct_elem;
struct_elem.name = "struct_node";
Expand Down