keshen-msft commented on code in PR #41048:
URL: https://github.com/apache/arrow/pull/41048#discussion_r1556259394


##########
csharp/src/Apache.Arrow/Arrays/StringArray.cs:
##########
@@ -93,6 +100,30 @@ public string GetString(int index, Encoding encoding = 
default)
             }
         }
 
+        public void Materialize(Encoding encoding = default)

Review Comment:
   I added regular comments. And after more thinking, I believe that all the 
methods in this class are thread safe. This is because that I only update 
materializedStringStore after I prepare the string[] fully. So there is no race 
between concurrent Materialize (last come wins); and there is no race between 
accessor and Materialize() as well: accessor either sees the store or goes into 
the slow code path. Can you check if I am correct on this @CurtHagenlocher ?



##########
csharp/src/Apache.Arrow/Arrays/StringArray.cs:
##########
@@ -93,6 +100,30 @@ public string GetString(int index, Encoding encoding = 
default)
             }
         }
 
+        public void Materialize(Encoding encoding = default)

Review Comment:
   I added regular comments. And after more thinking, I believe that all the 
methods in this class are thread safe. This is because that I only update 
materializedStringStore after I prepare the string[] fully. So there is no race 
between concurrent Materialize (last come wins); and there is no race between 
accessor and Materialize() as well: accessor either sees the store or goes into 
the slow code path. Can you check if I am correct on this @CurtHagenlocher ?



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