adamreeve commented on code in PR #41230:
URL: https://github.com/apache/arrow/pull/41230#discussion_r1567018556


##########
csharp/test/Apache.Arrow.Tests/TestData.cs:
##########
@@ -562,9 +583,13 @@ public void Visit(MapType type)
                     keyBuilder.Append(i.ToString());
                     valueBuilder.Append(i);
                 }
-                //Add a value to check if Values.Length can exceed 
MapArray.Length
-                keyBuilder.Append("0");
-                valueBuilder.Append(0);
+
+                if (Length > 0)

Review Comment:
   This change was needed because otherwise tests that create zero-length 
arrays would fail when doing a strict comparison, as the values array would be 
sliced so would not exactly match the input. It seems logical to only add an 
extra item to the last list if there is actually a list to add to.
   
   The similar change to the `ListViewType` above wasn't strictly needed but 
was just made for consistency.



-- 
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]

Reply via email to