mapleFU commented on code in PR #36418:
URL: https://github.com/apache/arrow/pull/36418#discussion_r1252061401
##########
cpp/src/arrow/array/array_dict.cc:
##########
@@ -106,8 +106,9 @@ DictionaryArray::DictionaryArray(const
std::shared_ptr<DataType>& type,
SetData(data);
}
-std::shared_ptr<Array> DictionaryArray::dictionary() const {
+const std::shared_ptr<Array>& DictionaryArray::dictionary() const {
if (!dictionary_) {
+ // FIXME this isn't thread safe
Review Comment:
Atomic shared pointer tent to use `mutex` (folly has implement one using
atomic swap). I guess it may hurts the performance
--
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]