dongjoon-hyun commented on a change in pull request #1023:
URL: https://github.com/apache/orc/pull/1023#discussion_r793005252
##########
File path: c++/test/TestType.cc
##########
@@ -404,6 +404,21 @@ namespace orc {
illUnionType.set_kind(proto::Type_Kind_UNION);
testCorruptHelper(illUnionType, footer,
"Illegal UNION type that doesn't contain any subtypes");
+
+ proto::Type illStructType;
+ proto::Type structType;
+ illStructType.set_kind(proto::Type_Kind_STRUCT);
+ structType.set_kind(proto::Type_Kind_STRUCT);
+ structType.add_subtypes(0); // construct a loop back to root
+ structType.add_fieldnames("root");
+ illStructType.add_subtypes(1);
+ illStructType.add_fieldnames("f1");
+ illStructType.add_subtypes(2);
+ *(footer.add_types()) = illStructType;
+ *(footer.add_types()) = structType;
+ testCorruptHelper(illStructType, footer,
+ "Illegal STRUCT type that contains less fieldnames than subtypes");
Review comment:
- Thank you for adding a new test coverage.
- And, please remove the redundant empty line 421.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]