felipecrv commented on code in PR #40119:
URL: https://github.com/apache/arrow/pull/40119#discussion_r1496327239


##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -716,17 +738,31 @@ class ObjectAppendStream final : public io::OutputStream {
     io::internal::CloseFromDestructor(this);
   }
 
-  Status Init() {
-    if (content_length_ != kNoSize) {
-      DCHECK_GE(content_length_, 0);
-      pos_ = content_length_;
+  Status Init(const bool truncate,
+              std::function<Status()> ensure_not_flat_namespace_directory) {

Review Comment:
   The trick is to forward-declare the class as well.
   
   ```cpp
   diff --git a/cpp/src/arrow/filesystem/azurefs.h 
b/cpp/src/arrow/filesystem/azurefs.h
   index 2a131e40c..d48ef9dd7 100644
   --- a/cpp/src/arrow/filesystem/azurefs.h
   +++ b/cpp/src/arrow/filesystem/azurefs.h
   @@ -44,6 +44,7 @@ class DataLakeServiceClient;
   
    namespace arrow::fs {
   
   +class ObjectAppendStream;
    class TestAzureFileSystem;
   
    /// Options for the AzureFileSystem implementation.
   @@ -180,6 +181,7 @@ class ARROW_EXPORT AzureFileSystem : public FileSystem {
   
      explicit AzureFileSystem(std::unique_ptr<Impl>&& impl);
   
   +  friend class ObjectAppendStream;
      friend class TestAzureFileSystem;
      void ForceCachedHierarchicalNamespaceSupport(int hns_support);
   ```



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