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 2020/07/09 19:38:27 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #7691: ARROW-8655: [Python][Dataset] Provide helper method to get keys from a partition expression

jorisvandenbossche commented on a change in pull request #7691:
URL: https://github.com/apache/arrow/pull/7691#discussion_r452446416



##########
File path: python/pyarrow/includes/libarrow_dataset.pxd
##########
@@ -314,6 +314,10 @@ cdef extern from "arrow/dataset/api.h" namespace "arrow::dataset" nogil:
             const CExpression& partition_expression,
             CRecordBatchProjector* projector)
 
+    cdef CResult[unordered_map[c_string, shared_ptr[CScalar]]] \
+        CGetPartitionKeys "arrow::dataset::KeyValuePartitioning::GetKeys"(

Review comment:
       One question for my education: `GetKeys` is a method on the `KeyValuePartitioning` class, but since that method doesn't use any of the initialized variabled of the object, you can just use it as a free function like this independent from a KeyValuePartitioning object in C++? (like a static/class method in Python, but then without needing to mark it as such)




----------------------------------------------------------------
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:
users@infra.apache.org