amol- commented on a change in pull request #10123:
URL: https://github.com/apache/arrow/pull/10123#discussion_r620370903



##########
File path: python/pyarrow/array.pxi
##########
@@ -1990,6 +1990,12 @@ cdef class DictionaryArray(Array):
     def dictionary_encode(self):
         return self
 
+    def dictionary_decode(self):
+        """
+        Decodes the DictionaryArray to an Array.
+        """
+        return self.dictionary.take(self.indices)
+

Review comment:
       I thought about that, but I realised it didn't make much sense to expose 
a `dictionary_decode` method in `Array` which is not dictionary encoded.
   On the opposite a `dictionary_encode` method makes sense on `Array` as it's 
something that can be dictionary encoded.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to