roee88 commented on a change in pull request #9631:
URL: https://github.com/apache/arrow/pull/9631#discussion_r611172212



##########
File path: cpp/src/parquet/encryption/encryption.h
##########
@@ -70,6 +70,26 @@ class PARQUET_EXPORT StringKeyIdRetriever : public 
DecryptionKeyRetriever {
   std::map<std::string, std::string> key_map_;
 };
 
+// Function variant of DecryptionKeyRetriever, taking a state object.

Review comment:
       Not strictly related to the above discussion, but usually these classes 
are implemented in 
https://github.com/apache/arrow/tree/master/cpp/src/arrow/python as far as I 
can tell.
   
   In 
https://docs.google.com/document/d/1i1M5f5azLEmASj9XQZ_aQLl5Fr5F0CvnyPPVu1xaD9U/edit
 @emkornfield  suggested to look at PyFileSystem as an example and I suggest to 
follow the same pattern in terms of implementation (vtable, 
ARROW_PYTHON_EXPORT, and anything else).
   
   > It's not possible to subclass a C++ class in Cython
   
   To be fair to Cython, it's possible (see an 
[example](https://gist.github.com/roee88/49d22e28cfd95dbabde2813e067594aa)). 
However, it's not well documented and might be less efficient w.r.t. GIL so the 
vtable approach used in the arrow codebase is probably better.




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


Reply via email to