Skip to content

Commit 025cfc0

Browse files
committed
fix review
1 parent 7176212 commit 025cfc0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cpp/src/parquet/arrow/schema.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ Status ResolveList(const GroupNode& group, const Node& list_node,
704704
auto check_two_level_list_repeated = [](const GroupNode& group) -> Status {
705705
// When it is repeated, the LIST-annotated 2-level structure can only serve as an
706706
// element within another LIST-annotated 2-level structure.
707-
if (group.is_repeated() && group.parent() != nullptr &&
708-
!group.parent()->logical_type()->is_list()) {
707+
if (group.is_repeated() &&
708+
(group.parent() == nullptr || !group.parent()->logical_type()->is_list())) {
709709
return Status::Invalid("LIST-annotated groups must not be repeated.");
710710
}
711711
return {};
@@ -725,6 +725,7 @@ Status ResolveList(const GroupNode& group, const Node& list_node,
725725

726726
if (list_group.logical_type()->is_none() && HasListElementName(list_group, group)) {
727727
// Backward-compatibility rule 4
728+
RETURN_NOT_OK(check_two_level_list_repeated(group));
728729
return GroupToStruct(list_group, current_levels, ctx, out, child_field);
729730
}
730731

0 commit comments

Comments
 (0)