pitrou commented on PR #13633:
URL: https://github.com/apache/arrow/pull/13633#issuecomment-1208210324

   > I'm not sure how to handle passing the strategy in the `__reduce__` 
method. A bit stuck there.
   
   Oh, that's a good point. If we want to solve this properly, we probably need 
to make the C++ `S3RetryStrategy` more inspectable. I can't really think of a 
simple and elegant design unfortunately.
   
   Perhaps something like this:
   ```c++
   class ARROW_EXPORT S3RetryStrategy {
    public:
     ...
     // "custom" by default, but could be "aws_standard" or "aws_default"
     virtual const char* kind_name();
     // Kind-specific serialization, requires some knowledge at the call site
     // of each supported kind.
     virtual std::string Serialize() = 0;
   ```
   
   General-purpose serialization of C++ classes is not available, so Python 
would only support serializing the "aws_standard" and "aws_default" kinds.
   
   @lidavidm Would you have a better 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