Tom-Newton commented on code in PR #40119:
URL: https://github.com/apache/arrow/pull/40119#discussion_r1496716697
##########
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:
I think my main problem was that `ObjectAppendStream` is defined inside an
anonymous namespace but I still haven't got it working as you describe.
Are you suggesting to use `AzureFileSystem *azure_file_system` or
`AzureFileSystem:Impl *azure_file_system` as the argument to
`ObjectAppendStream::Impl`. I don't know how I can get a `AzureFileSystem`
pointer from inside `AzureFileSystem::Impl` and using `AzureFileSystem::Impl`
as the argument leads to `incomplete type` errors which I don't think I can
avoid.
Also if you wouldn't mind I would be interested to know what the
disadvantage of a lambda function is compared to what you proposed.
Sorry about my lacking C++ knowledge here.
--
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]