sanjibansg commented on code in PR #12977:
URL: https://github.com/apache/arrow/pull/12977#discussion_r861963368


##########
cpp/src/arrow/dataset/partition.h:
##########
@@ -76,11 +80,8 @@ class ARROW_DS_EXPORT Partitioning {
       const std::shared_ptr<RecordBatch>& batch) const = 0;
 
   /// \brief Parse a path into a partition expression
-  virtual Result<compute::Expression> Parse(const std::string& path) const = 0;
-
-  struct PartitionPathFormat {
-    std::string directory, prefix;
-  };
+  virtual Result<compute::Expression> Parse(const std::string& directory = "",
+                                            const std::string& prefix = "") 
const = 0;

Review Comment:
   - Removed the default parameter
   - Modified the Parse method to use a `PartitionPathFormat` object as an 
argument. As for the PyArrow interface, modified the `parse()` method to accept 
just the two strings (directory & prefix) and then uses a cppclass object to 
form the PartitionPathFormat object which is then passed into the internal 
`Parse()` method. Is this a good approach? 



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

Reply via email to