You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/02/14 01:51:55 UTC

[GitHub] [arrow-nanoarrow] paleolimbot commented on a diff in pull request #107: fix: set map entries/key to non-nullable

paleolimbot commented on code in PR #107:
URL: https://github.com/apache/arrow-nanoarrow/pull/107#discussion_r1105206747


##########
src/nanoarrow/schema_test.cc:
##########
@@ -139,6 +139,12 @@ TEST(SchemaTest, SchemaTestInitNestedMap) {
             NANOARROW_OK);
   ASSERT_EQ(ArrowSchemaSetType(schema.children[0]->children[1], NANOARROW_TYPE_STRING),
             NANOARROW_OK);
+  ASSERT_STREQ("entries", schema.children[0]->name);
+  ASSERT_STREQ("key", schema.children[0]->children[0]->name);
+  ASSERT_STREQ("value", schema.children[0]->children[1]->name);
+
+  ASSERT_FALSE(schema.children[0]->flags & ARROW_FLAG_NULLABLE);
+  ASSERT_FALSE(schema.children[0]->children[0]->flags & ARROW_FLAG_NULLABLE);

Review Comment:
   Is there a reason why these are `ASSERT`s and not `EXPECT`s? The other expectations I've written also use `XXX(actual, expected)` (but I never looked up which was correct or if there is a correct way to do it...that's just how R's testing works).



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org