You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/15 05:24:03 UTC

[GitHub] [arrow] kou commented on a diff in pull request #13334: ARROW-14314: [C++] Sorting dictionary array not implemented

kou commented on code in PR #13334:
URL: https://github.com/apache/arrow/pull/13334#discussion_r921821992


##########
cpp/src/arrow/array/array_dict.h:
##########
@@ -111,6 +111,10 @@ class ARROW_EXPORT DictionaryArray : public Array {
 
   const DictionaryType* dict_type() const { return dict_type_; }
 
+  bool IsNull(int64_t i) const {
+    return indices_->IsNull(i) || dictionary_->IsNull(GetValueIndex(i));

Review Comment:
   Could you use `dictionary()` instead of touching `dictionary_` directory?
   
   ```suggestion
       return indices_->IsNull(i) || dictionary()->IsNull(GetValueIndex(i));
   ```
   
   `dictionary_` is initialized lazily.



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