Skip to content

Commit

Permalink
[Fix] Replace children() with fields(), because children() no longer …
Browse files Browse the repository at this point in the history
…works in Arrow library greater than v6.0.0 (#8)

Co-authored-by: LeAnhMinh <[email protected]>
  • Loading branch information
MinhLA1410 and LeAnhMinh authored Nov 25, 2021
1 parent 6a24715 commit 26eeeff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
*.bc
regression.diffs
regression.out
results
results
2 changes: 1 addition & 1 deletion src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ bytes_to_postgres_type(const char *bytes, arrow::DataType *arrow_type)
arrow::Type::type
get_arrow_list_elem_type(arrow::DataType *type)
{
auto children = type->children();
auto children = type->fields();

Assert(children.size() == 1);
return children[0]->type()->id();
Expand Down
2 changes: 1 addition & 1 deletion src/parquet_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ extract_parquet_fields(const char *path, const char *dirname, Aws::S3::S3Client
Oid pg_subtype;
bool error = false;

if (type->children().size() != 1)
if (type->fields().size() != 1)
throw std::runtime_error("lists of structs are not supported");

subtype_id = get_arrow_list_elem_type(type.get());
Expand Down

0 comments on commit 26eeeff

Please sign in to comment.