File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -36,18 +36,13 @@ Status ManifestAdapter::StartAppending() {
3636 if (size_ > 0 ) {
3737 return InvalidArgument (" Adapter buffer not empty, cannot start appending." );
3838 }
39- if (is_initialized_) {
40- // reset buffer
41- ArrowArrayRelease (&array_);
42- }
4339 array_ = {};
4440 size_ = 0 ;
4541 ArrowError error;
4642 auto status = ArrowArrayInitFromSchema (&array_, &schema_, &error);
4743 NANOARROW_RETURN_IF_NOT_OK (status, error);
4844 status = ArrowArrayStartAppending (&array_);
4945 NANOARROW_RETURN_IF_NOT_OK (status, error);
50- is_initialized_ = true ;
5146 return {};
5247}
5348
@@ -471,6 +466,7 @@ Status ManifestEntryAdapter::InitSchema(const std::unordered_set<int32_t>& field
471466 }
472467 manifest_schema_ = std::make_shared<Schema>(fields);
473468 ICEBERG_RETURN_UNEXPECTED (ToArrowSchema (*manifest_schema_, &schema_));
469+ is_initialized_ = true ;
474470 return {};
475471}
476472
@@ -701,6 +697,7 @@ Status ManifestFileAdapter::InitSchema(const std::unordered_set<int32_t>& fields
701697 }
702698 manifest_list_schema_ = std::make_shared<Schema>(fields);
703699 ICEBERG_RETURN_UNEXPECTED (ToArrowSchema (*manifest_list_schema_, &schema_));
700+ is_initialized_ = true ;
704701 return {};
705702}
706703
You can’t perform that action at this time.
0 commit comments