lszskye commented on code in PR #245:
URL: https://github.com/apache/paimon-cpp/pull/245#discussion_r4035568788


##########
src/paimon/core/index/pk/bucketed_primary_key_index_maintainer.h:
##########
@@ -0,0 +1,144 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+#include <cstdint>
+#include <map>
+#include <memory>
+#include <string>
+#include <unordered_set>
+#include <vector>
+
+#include "paimon/common/data/binary_row.h"
+#include "paimon/core/core_options.h"
+#include "paimon/core/index/index_file_meta.h"
+#include "paimon/core/index/pk/primary_key_index_definition.h"
+#include "paimon/core/io/data_file_meta.h"
+#include "paimon/result.h"
+
+namespace paimon {
+class CommitIncrement;
+class Executor;
+class FileStorePathFactory;
+class IOManager;
+class IndexFileHandler;
+class MemoryPool;
+class PkSortedIndexBuilder;
+class TableSchema;
+
+/// Maintains Java-compatible source-backed primary-key indexes for one 
partition and bucket.
+///
+/// This initial implementation builds synchronously during prepare-commit. 
Synchronous execution
+/// deliberately omits Java's scheduling and retry policy while preserving the 
same source-level
+/// reconciliation and payload format. A build failure does not block the 
data-file commit; readers
+/// fall back to scanning the committed data files until a later maintenance 
attempt succeeds.
+class BucketedPrimaryKeyIndexMaintainer {
+ public:
+    class Factory {
+     public:
+        static std::shared_ptr<Factory> Create(

Review Comment:
   We can remove `Create` here and construct the object directly using the 
constructor.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to