lxy-9602 commented on code in PR #222:
URL: https://github.com/apache/paimon-cpp/pull/222#discussion_r3842749058


##########
include/paimon/table/format/format_data_split.h:
##########
@@ -0,0 +1,103 @@
+/*
+ * 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 <limits>
+#include <map>
+#include <string>
+#include <vector>
+
+#include "paimon/table/source/split.h"
+#include "paimon/visibility.h"
+
+namespace paimon {
+
+/// A split of a format table: the data files of one partition directory, or 
of the table
+/// directory itself when the table is not partitioned.
+///
+/// Every file is held whole, since parquet and orc each record where their 
own row groups and
+/// stripes begin and a reader handed a byte range of one would have to find 
that out for itself.
+/// The partition is carried on the split rather than read from the files: a 
Hive-style layout
+/// keeps partition values in the directory names.
+class PAIMON_EXPORT FormatDataSplit : public Split {

Review Comment:
   I prefer option (b): move `ListPartitions()` to the common `TableScan` 
interface, and move `FormatTableScan`, `FormatTableRead`, `FormatTableWrite`, 
`FormatTableCommit`, `FormatDataSplit`, and `FormatCommitMessage` under `src` 
as internal implementation details. Only `FormatTable` should remain public, 
while callers access format tables through the existing generic scan, read, 
write, and commit entry points. This keeps the public API smaller and avoids 
exposing format-table-specific implementation types. Thanks a lot for your 
effort!



-- 
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