Skip to content

Commit d4d2b38

Browse files
committed
fix little
1 parent c4fc518 commit d4d2b38

11 files changed

Lines changed: 21 additions & 21 deletions

include/paimon/global_index/global_index_io_meta.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
namespace paimon {
2929
/// Metadata describing a single file entry in a global index.
3030
struct PAIMON_EXPORT GlobalIndexIOMeta {
31-
GlobalIndexIOMeta(const std::string& _file_path, int64_t _file_size,
32-
const std::shared_ptr<Bytes>& _metadata)
33-
: GlobalIndexIOMeta(_file_path, _file_size, _metadata, std::nullopt) {}
34-
3531
GlobalIndexIOMeta(const std::string& _file_path, int64_t _file_size,
3632
const std::shared_ptr<Bytes>& _metadata,
3733
const std::optional<std::vector<int32_t>>& _extra_field_ids)

src/paimon/common/global_index/btree/btree_compatibility_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ class BTreeCompatibilityTest : public ::testing::Test {
115115
PAIMON_ASSIGN_OR_RAISE(auto file_status, fs_->GetFileStatus(bin_path));
116116
auto file_size = file_status->GetLen();
117117

118-
GlobalIndexIOMeta io_meta(bin_path, file_size, meta_bytes);
118+
GlobalIndexIOMeta io_meta(bin_path, file_size, meta_bytes,
119+
/*extra_field_ids=*/std::nullopt);
119120
std::vector<GlobalIndexIOMeta> metas = {io_meta};
120121

121122
auto schema = arrow::schema({arrow::field("testField", arrow_type)});

src/paimon/common/global_index/btree/btree_file_meta_selector_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ class BTreeFileMetaSelectorTest : public ::testing::Test {
4848
// file6: only-nulls file (no keys, has_nulls=true)
4949
auto meta6 = std::make_shared<BTreeIndexMeta>(nullptr, nullptr, true);
5050
files_ = {
51-
GlobalIndexIOMeta("file1", 1, meta1->Serialize(pool_.get())),
52-
GlobalIndexIOMeta("file2", 1, meta2->Serialize(pool_.get())),
53-
GlobalIndexIOMeta("file3", 1, meta3->Serialize(pool_.get())),
54-
GlobalIndexIOMeta("file4", 1, meta4->Serialize(pool_.get())),
55-
GlobalIndexIOMeta("file5", 1, meta5->Serialize(pool_.get())),
56-
GlobalIndexIOMeta("file6", 1, meta6->Serialize(pool_.get())),
51+
GlobalIndexIOMeta("file1", 1, meta1->Serialize(pool_.get()), std::nullopt),
52+
GlobalIndexIOMeta("file2", 1, meta2->Serialize(pool_.get()), std::nullopt),
53+
GlobalIndexIOMeta("file3", 1, meta3->Serialize(pool_.get()), std::nullopt),
54+
GlobalIndexIOMeta("file4", 1, meta4->Serialize(pool_.get()), std::nullopt),
55+
GlobalIndexIOMeta("file5", 1, meta5->Serialize(pool_.get()), std::nullopt),
56+
GlobalIndexIOMeta("file6", 1, meta6->Serialize(pool_.get()), std::nullopt),
5757
};
5858
}
5959

src/paimon/common/global_index/btree/btree_global_index_integration_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ TEST_P(BTreeGlobalIndexIntegrationTest, CreateReaderWithMultiFieldSchema) {
17031703
{BtreeDefs::kBtreeIndexCompression, GetParam()}};
17041704
ASSERT_OK_AND_ASSIGN(auto indexer, BTreeGlobalIndexer::Create(options));
17051705

1706-
GlobalIndexIOMeta meta("fake_path", 100, nullptr);
1706+
GlobalIndexIOMeta meta("fake_path", 100, nullptr, /*extra_field_ids=*/std::nullopt);
17071707
std::vector<GlobalIndexIOMeta> metas = {meta};
17081708

17091709
ASSERT_NOK_WITH_MSG(indexer->CreateReader(c_schema.get(), file_reader, metas, pool_),

src/paimon/common/global_index/btree/btree_global_index_writer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ Result<std::vector<GlobalIndexIOMeta>> BTreeGlobalIndexWriter::Finish() {
199199
// Create GlobalIndexIOMeta
200200
std::string file_path = file_writer_->ToPath(index_file_name_);
201201
PAIMON_ASSIGN_OR_RAISE(int64_t file_size, file_writer_->GetFileSize(index_file_name_));
202-
GlobalIndexIOMeta io_meta(file_path, file_size, meta_bytes);
202+
GlobalIndexIOMeta io_meta(file_path, file_size, meta_bytes,
203+
/*extra_field_ids=*/std::nullopt);
203204
return std::vector<GlobalIndexIOMeta>{io_meta};
204205
}
205206

src/paimon/common/global_index/wrap/file_index_writer_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class FileIndexWriterWrapper : public GlobalIndexWriter {
6666
PAIMON_RETURN_NOT_OK(out->Flush());
6767
PAIMON_RETURN_NOT_OK(out->Close());
6868
GlobalIndexIOMeta meta(file_manager_->ToPath(file_name), /*file_size=*/bytes->size(),
69-
/*metadata=*/nullptr);
69+
/*metadata=*/nullptr, /*extra_field_ids=*/std::nullopt);
7070
return std::vector<GlobalIndexIOMeta>({meta});
7171
}
7272

src/paimon/global_index/lucene/lucene_global_index_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Result<std::vector<GlobalIndexIOMeta>> LuceneGlobalIndexWriter::Finish() {
237237
PAIMON_RETURN_NOT_OK(RapidJsonUtil::ToJsonString(options_, &options_json));
238238
auto meta_bytes = std::make_shared<Bytes>(options_json, pool_.get());
239239
GlobalIndexIOMeta meta(file_writer_->ToPath(index_file_name), file_size,
240-
/*metadata=*/meta_bytes);
240+
/*metadata=*/meta_bytes, /*extra_field_ids=*/std::nullopt);
241241
return std::vector<GlobalIndexIOMeta>({meta});
242242
}
243243

src/paimon/global_index/lumina/lumina_global_index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ Result<std::vector<GlobalIndexIOMeta>> LuminaIndexWriter::Finish() {
895895
PAIMON_RETURN_NOT_OK(RapidJsonUtil::ToJsonString(lumina_options_, &options_json));
896896
auto meta_bytes = std::make_shared<Bytes>(options_json, pool_->GetPaimonPool().get());
897897
GlobalIndexIOMeta meta(file_manager_->ToPath(index_file_name), file_size,
898-
/*metadata=*/meta_bytes);
898+
/*metadata=*/meta_bytes, /*extra_field_ids=*/std::nullopt);
899899
return std::vector<GlobalIndexIOMeta>({meta});
900900
}
901901

src/paimon/global_index/tantivy/tantivy_equivalence_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ TEST_F(TantivyEquivalenceTest, BenchmarkBuildAndQuery) {
354354
// -------- Lucene: write + open + queries --------
355355
auto lroot = paimon::test::UniqueTestDirectory::Create();
356356
std::map<std::string, std::string> lopt = {{"lucene-fts.write.tmp.directory", lroot->Str()}};
357-
GlobalIndexIOMeta lmeta{"", 0, nullptr};
357+
GlobalIndexIOMeta lmeta{"", 0, nullptr, std::nullopt};
358358
auto lwrite_ms =
359359
time_ms([&] { lmeta = WriteOne("lucene-fts", data_type, lopt, array, lroot->Str()); });
360360
auto lreader = OpenOne("lucene-fts", data_type, lopt, lmeta, lroot->Str());
@@ -371,7 +371,7 @@ TEST_F(TantivyEquivalenceTest, BenchmarkBuildAndQuery) {
371371

372372
// -------- Tantivy: write + open + queries --------
373373
auto troot = paimon::test::UniqueTestDirectory::Create();
374-
GlobalIndexIOMeta tmeta{"", 0, nullptr};
374+
GlobalIndexIOMeta tmeta{"", 0, nullptr, std::nullopt};
375375
auto twrite_ms =
376376
time_ms([&] { tmeta = WriteOne("tantivy-fulltext", data_type, {}, array, troot->Str()); });
377377
auto treader = OpenOne("tantivy-fulltext", data_type, {}, tmeta, troot->Str());

src/paimon/global_index/tantivy/tantivy_global_index_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Result<std::vector<GlobalIndexIOMeta>> TantivyGlobalIndexWriter::Finish() {
162162
PAIMON_RETURN_NOT_OK(RapidJsonUtil::ToJsonString(options_, &options_json));
163163
auto meta_bytes = std::make_shared<Bytes>(options_json, pool_.get());
164164
GlobalIndexIOMeta meta(file_writer_->ToPath(index_file_name), file_size,
165-
/*metadata=*/meta_bytes);
165+
/*metadata=*/meta_bytes, /*extra_field_ids=*/std::nullopt);
166166
return std::vector<GlobalIndexIOMeta>({meta});
167167
}
168168

0 commit comments

Comments
 (0)