@@ -30,15 +30,16 @@ LookupMergeTreeCompactRewriter<T>::LookupMergeTreeCompactRewriter(
3030 const BinaryRow& partition, int32_t bucket, int64_t schema_id,
3131 const std::vector<std::string>& trimmed_primary_keys, const CoreOptions& options,
3232 const std::shared_ptr<arrow::Schema>& data_schema,
33- const std::shared_ptr<arrow::Schema>& write_schema,
33+ const std::shared_ptr<arrow::Schema>& write_schema, DeletionVector::Factory dv_factory,
3434 const std::shared_ptr<FileStorePathFactoryCache>& path_factory_cache,
3535 std::unique_ptr<MergeFileSplitRead>&& merge_file_split_read,
3636 MergeFunctionWrapperFactory merge_function_wrapper_factory,
3737 const std::shared_ptr<MemoryPool>& pool)
38- : ChangelogMergeTreeRewriter(
39- max_level, /* force_drop_delete=*/ dv_maintainer != nullptr , partition, bucket, schema_id,
40- trimmed_primary_keys, options, data_schema, write_schema, path_factory_cache,
41- std::move (merge_file_split_read), std::move(merge_function_wrapper_factory), pool),
38+ : ChangelogMergeTreeRewriter(max_level, /* force_drop_delete=*/ dv_maintainer != nullptr ,
39+ partition, bucket, schema_id, trimmed_primary_keys, options,
40+ data_schema, write_schema, std::move(dv_factory),
41+ path_factory_cache, std::move(merge_file_split_read),
42+ std::move (merge_function_wrapper_factory), pool),
4243 lookup_levels_(std::move(lookup_levels)),
4344 dv_maintainer_(dv_maintainer) {}
4445
@@ -49,6 +50,7 @@ LookupMergeTreeCompactRewriter<T>::Create(
4950 const std::shared_ptr<BucketedDvMaintainer>& dv_maintainer,
5051 MergeFunctionWrapperFactory merge_function_wrapper_factory, int32_t bucket,
5152 const BinaryRow& partition, const std::shared_ptr<TableSchema>& table_schema,
53+ DeletionVector::Factory dv_factory,
5254 const std::shared_ptr<FileStorePathFactoryCache>& path_factory_cache,
5355 const CoreOptions& options, const std::shared_ptr<MemoryPool>& pool) {
5456 PAIMON_ASSIGN_OR_RAISE (std::vector<std::string> trimmed_primary_keys,
@@ -65,16 +67,17 @@ LookupMergeTreeCompactRewriter<T>::Create(
6567 PAIMON_ASSIGN_OR_RAISE (
6668 std::shared_ptr<InternalReadContext> internal_context,
6769 InternalReadContext::Create (read_context, table_schema, options.ToMap ()));
68- PAIMON_ASSIGN_OR_RAISE (std::shared_ptr<FileStorePathFactory> path_factory,
69- path_factory_cache-> GetOrCreatePathFactory (
70- options.GetFileFormat ()->Identifier ()));
70+ PAIMON_ASSIGN_OR_RAISE (
71+ std::shared_ptr<FileStorePathFactory> path_factory,
72+ path_factory_cache-> GetOrCreatePathFactory ( options.GetFileFormat ()->Identifier ()));
7173 PAIMON_ASSIGN_OR_RAISE (
7274 std::unique_ptr<MergeFileSplitRead> merge_file_split_read,
7375 MergeFileSplitRead::Create (path_factory, internal_context, pool, CreateDefaultExecutor ()));
7476 return std::unique_ptr<LookupMergeTreeCompactRewriter>(new LookupMergeTreeCompactRewriter (
7577 std::move (lookup_levels), dv_maintainer, max_level, partition, bucket, table_schema->Id (),
76- trimmed_primary_keys, options, data_schema, write_schema, path_factory_cache,
77- std::move (merge_file_split_read), std::move (merge_function_wrapper_factory), pool));
78+ trimmed_primary_keys, options, data_schema, write_schema, std::move (dv_factory),
79+ path_factory_cache, std::move (merge_file_split_read),
80+ std::move (merge_function_wrapper_factory), pool));
7881}
7982
8083template <typename T>
0 commit comments