Skip to content

Conversation

@zhjwpku
Copy link
Collaborator

@zhjwpku zhjwpku commented Jan 20, 2026

  • Move DataFileSet out of content_file_util.h to data_file_set.h to reduce header dependencies
  • Refactor WriteDataManifests and WriteDeleteManifests to accept iterator begin/end instead of vectors

- Move DataFileSet out of content_file_util.h to data_file_set.h to reduce header dependencies
- Refactor WriteDataManifests and WriteDeleteManifests to accept iterator begin/end instead of vectors

#pragma once

/// \file iceberg/util/data_file_set.h
Copy link
Member

Choose a reason for hiding this comment

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

Please install it in the meson.build

SOURCES
bucket_util_test.cc
config_test.cc
data_file_set_test.cc
Copy link
Member

Choose a reason for hiding this comment

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

Add it to the meson test.

// TODO(xxx): write manifests in parallel
template <typename Iterator>
Result<std::vector<ManifestFile>> WriteDataManifests(
const std::vector<std::shared_ptr<DataFile>>& data_files,
Copy link
Member

Choose a reason for hiding this comment

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

Originally I suggested to use iterator because we need an extra conversion to call this function. Now I found that DataFileSet also uses std::vector internally, do you think it is better to use std::span<const std::shared_ptr<DataFile>> as the input here and add a std:span<const std::shared_ptr<DataFile>> DataFileSet::as_span() const or something similar? In this approach, we can still hide the implementation in the source file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

reasonable, will change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants