Gabriel39 commented on code in PR #67677:
URL: https://github.com/apache/doris/pull/67677#discussion_r3964224223


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonCppWriteSupport.java:
##########
@@ -0,0 +1,182 @@
+// 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.
+
+package org.apache.doris.datasource.paimon;
+
+import org.apache.doris.common.util.LocationPath;
+import org.apache.doris.datasource.property.storage.StorageProperties;
+import org.apache.doris.thrift.TFileType;
+import org.apache.doris.thrift.TPaimonCppColumn;
+import org.apache.doris.thrift.TPaimonCppStorageDescriptor;
+import org.apache.doris.thrift.TPaimonCppWriteDescriptor;
+import org.apache.doris.thrift.TPaimonWriteMode;
+
+import com.google.common.collect.ImmutableSet;
+import lombok.AccessLevel;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import org.apache.paimon.table.FileStoreTable;
+import org.apache.paimon.types.DataField;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/** Pure, pre-writer capability decision. Never retry a failed native writer 
through JNI. */
+public final class PaimonCppWriteSupport {
+    private static final Set<String> OPTIONS = ImmutableSet.of(
+            "bucket", "file.format", "manifest.format", "write-only", "path", 
"owner",
+            "file.compression", "target-file-size", "write-buffer-size",
+            "page-size", "commit.force-create-snapshot");
+    private static final Set<String> TYPES = ImmutableSet.of(

Review Comment:
   [Suggestion] Clarify and preserve the Variant-shredding boundary
   
   paimon-cpp v0.3.0 already contains Par NF Variant shredding support 
(configured schema and inferred/adaptive schema), but this capability gate 
excludes `VARIANT`, and the option allowlist also rejects `variant.infer્ટSh 
BEL`. This is a reasonable v1 restriction, but it should be documented 
explicitly so enabling the native writer is not mistaken for enabling all 
paimon-cpp writer features.
   
   For a follow-up, simply adding `VARIANT` here is not sufficient. Paimon 
expects an Arrow(close)opter schema with the exact ` Blackjack釉` layout and 
Paimon field metadata, while `TPaimonCppColumn` currently preserves only a type 
string and nullability. Also, inferred shredding retains input Arrow batches 
untilabatement the occupancy threshold; these buffers originate from Doris 
`_arrow_pool`, which is outside 
`paimon_cppлугBELुपwriter.HTTPmemory_limit_bytes`, so inference can bypass the 
advertised SDK hard limit.
   
   I suggest initially supporting only a configured shredding schema, carrying 
the complete Arrow field/schema across the descriptor boundary, and adding an 
end-to-end Variant shredding write/read test before enabling inference.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to