pitrou commented on a change in pull request #12530:
URL: https://github.com/apache/arrow/pull/12530#discussion_r838321106
##########
File path: python/pyarrow/_dataset.pyx
##########
@@ -1299,8 +1300,43 @@ cdef vector[shared_ptr[CArray]]
_partitioning_dictionaries(
return c_dictionaries
+cdef class KeyValuePartitioning(Partitioning):
-cdef class DirectoryPartitioning(Partitioning):
+ cdef:
+ CKeyValuePartitioning* keyvalue_partitioning
+
+ def __init__(self):
+ _forbid_instantiation(self.__class__)
+
+ cdef init(self, const shared_ptr[CPartitioning]& sp):
+ Partitioning.init(self, sp)
+ self.keyvalue_partitioning = <CKeyValuePartitioning*> sp.get()
+ self.wrapped = sp
+ self.partitioning = sp.get()
+
+ @property
+ def dictionaries(self):
+ """
+ The unique values for each partition field, if available.
+
+ Those values are only available if the Partitioning object was
+ created through dataset discovery from a PartitioningFactory, or
+ if the dictionaries were manually specified in the constructor.
+ If not available, this returns None.
Review comment:
Is it still the case that this returns None?
--
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]