Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ set(ICEBERG_SOURCES
file_writer.cc
inheritable_metadata.cc
json_internal.cc
manifest_adapter.cc
manifest_entry.cc
manifest_list.cc
manifest_reader.cc
manifest_reader_internal.cc
manifest_writer.cc
manifest/manifest_adapter.cc
manifest/manifest_entry.cc
manifest/manifest_list.cc
manifest/manifest_reader.cc
manifest/manifest_reader_internal.cc
manifest/manifest_writer.cc
manifest/v1_metadata.cc
manifest/v2_metadata.cc
manifest/v3_metadata.cc
metadata_columns.cc
name_mapping.cc
partition_field.cc
Expand Down Expand Up @@ -74,10 +77,7 @@ set(ICEBERG_SOURCES
util/temporal_util.cc
util/timepoint.cc
util/truncate_util.cc
util/uuid.cc
v1_metadata.cc
v2_metadata.cc
v3_metadata.cc)
util/uuid.cc)

set(ICEBERG_STATIC_BUILD_INTERFACE_LIBS)
set(ICEBERG_SHARED_BUILD_INTERFACE_LIBS)
Expand Down Expand Up @@ -131,6 +131,7 @@ iceberg_install_all_headers(iceberg)

add_subdirectory(catalog)
add_subdirectory(expression)
add_subdirectory(manifest)
add_subdirectory(row)
add_subdirectory(util)

Expand Down
4 changes: 2 additions & 2 deletions src/iceberg/inheritable_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

#include <iceberg/result.h>

#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/snapshot.h"

namespace iceberg {
Expand Down
18 changes: 18 additions & 0 deletions src/iceberg/manifest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

iceberg_install_all_headers(iceberg/manifest)
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@
* under the License.
*/

#include "iceberg/manifest_adapter.h"

#include <memory>
#include <utility>

#include <nanoarrow/nanoarrow.h>

#include "iceberg/arrow/nanoarrow_status_internal.h"
#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_adapter_internal.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/result.h"
#include "iceberg/schema.h"
#include "iceberg/util/checked_cast.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

/// \file iceberg/manifest_adapter.h
/// \file iceberg/manifest/manifest_adapter_internal.h
/// Base class for adapters handling v1/v2/v3/v4 manifest metadata.

#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

#include "iceberg/manifest_entry.h"
#include "iceberg/manifest/manifest_entry.h"

#include <memory>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#pragma once

/// \file iceberg/manifest/manifest_entry.h

#include <cstdint>
#include <map>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_list.h"

#include "iceberg/schema.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

/// \file iceberg/manifest_list.h
/// \file iceberg/manifest/manifest_list.h

#include <cstdint>
#include <optional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* under the License.
*/

#include "iceberg/manifest_reader.h"
#include "iceberg/manifest/manifest_reader.h"

#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest_reader_internal.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/manifest/manifest_reader_internal.h"
#include "iceberg/schema.h"
#include "iceberg/schema_internal.h"
#include "iceberg/type.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

/// \file iceberg/manifest_reader.h
/// \file iceberg/manifest/manifest_reader.h
/// Data reader interface for manifest files.

#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "iceberg/arrow/nanoarrow_status_internal.h"
#include "iceberg/arrow_c_data_guard_internal.h"
#include "iceberg/file_format.h"
#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/schema.h"
#include "iceberg/type.h"
#include "iceberg/util/checked_cast.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

#pragma once

/// \file iceberg/internal/manifest_reader_internal.h
/// \file iceberg/manifest/manifest_reader_internal.h
/// Reader implementation for manifest list files and manifest files.

#include "iceberg/file_reader.h"
#include "iceberg/inheritable_metadata.h"
#include "iceberg/manifest_reader.h"
#include "iceberg/manifest/manifest_reader.h"

namespace iceberg {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
* under the License.
*/

#include "iceberg/manifest_writer.h"
#include "iceberg/manifest/manifest_writer.h"

#include <optional>

#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/manifest/v1_metadata_internal.h"
#include "iceberg/manifest/v2_metadata_internal.h"
#include "iceberg/manifest/v3_metadata_internal.h"
#include "iceberg/partition_summary_internal.h"
#include "iceberg/result.h"
#include "iceberg/schema.h"
#include "iceberg/table_metadata.h"
#include "iceberg/util/macros.h"
#include "iceberg/v1_metadata.h"
#include "iceberg/v2_metadata.h"
#include "iceberg/v3_metadata.h"

namespace iceberg {

Expand Down Expand Up @@ -360,6 +360,12 @@ Result<std::unique_ptr<ManifestWriter>> ManifestWriter::MakeV3Writer(
manifest_location, first_row_id);
}

ManifestListWriter::ManifestListWriter(std::unique_ptr<Writer> writer,
std::unique_ptr<ManifestFileAdapter> adapter)
: writer_(std::move(writer)), adapter_(std::move(adapter)) {}

ManifestListWriter::~ManifestListWriter() = default;

Status ManifestListWriter::Add(const ManifestFile& file) {
if (adapter_->size() >= kBatchSize) {
ICEBERG_ASSIGN_OR_RAISE(auto array, adapter_->FinishAppending());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

/// \file iceberg/manifest_writer.h
/// \file iceberg/manifest/manifest_writer.h
/// Data writer interface for manifest files and manifest list files.

#include <memory>
Expand All @@ -28,7 +28,6 @@

#include "iceberg/file_writer.h"
#include "iceberg/iceberg_export.h"
#include "iceberg/manifest_adapter.h"
#include "iceberg/metrics.h"
#include "iceberg/result.h"
#include "iceberg/type_fwd.h"
Expand Down Expand Up @@ -183,10 +182,9 @@ class ICEBERG_EXPORT ManifestWriter {
class ICEBERG_EXPORT ManifestListWriter {
public:
ManifestListWriter(std::unique_ptr<Writer> writer,
std::unique_ptr<ManifestFileAdapter> adapter)
: writer_(std::move(writer)), adapter_(std::move(adapter)) {}
std::unique_ptr<ManifestFileAdapter> adapter);

~ManifestListWriter() = default;
~ManifestListWriter();

/// \brief Write manifest file to manifest list file.
/// \param file Manifest file to write.
Expand Down
26 changes: 26 additions & 0 deletions src/iceberg/manifest/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

install_headers(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to be consistent with CMakeLists.txt?

[
'manifest_entry.h',
'manifest_list.h',
'manifest_reader.h',
'manifest_writer.h',
],
subdir: 'iceberg/manifest',
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
* under the License.
*/

#include "iceberg/v1_metadata.h"

#include <memory>

#include "iceberg/json_internal.h"
#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/manifest/v1_metadata_internal.h"
#include "iceberg/schema.h"
#include "iceberg/schema_internal.h"
#include "iceberg/type.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#pragma once

#include "iceberg/manifest_adapter.h"
/// \file iceberg/manifest/v1_metadata_internal.h

/// \file iceberg/v1_metadata.h
#include "iceberg/manifest/manifest_adapter_internal.h"

namespace iceberg {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
* under the License.
*/

#include "iceberg/v2_metadata.h"

#include "iceberg/json_internal.h"
#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/manifest/v2_metadata_internal.h"
#include "iceberg/schema.h"
#include "iceberg/schema_internal.h"
#include "iceberg/util/macros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#pragma once

/// \file iceberg/v2_metadata.h
/// \file iceberg/manifest/v2_metadata_internal.h

#include "iceberg/manifest_adapter.h"
#include "iceberg/manifest/manifest_adapter_internal.h"

namespace iceberg {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@
* under the License.
*/

#include "iceberg/v3_metadata.h"

#include <memory>
#include <optional>

#include "iceberg/json_internal.h"
#include "iceberg/manifest_entry.h"
#include "iceberg/manifest_list.h"
#include "iceberg/manifest/manifest_entry.h"
#include "iceberg/manifest/manifest_list.h"
#include "iceberg/manifest/v3_metadata_internal.h"
#include "iceberg/result.h"
#include "iceberg/schema.h"
#include "iceberg/schema_internal.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#pragma once

/// \file iceberg/v3_metadata.h
/// \file iceberg/manifest/v3_metadata_internal.h

#include "iceberg/manifest_adapter.h"
#include "iceberg/manifest/manifest_adapter_internal.h"
#include "iceberg/result.h"

namespace iceberg {
Expand Down
Loading
Loading