pzhdfy commented on code in PR #66227:
URL: https://github.com/apache/doris/pull/66227#discussion_r4060186276


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/source/PaimonScanNode.java:
##########
@@ -411,10 +412,102 @@ private void setPaimonParams(TFileRangeDesc rangeDesc, 
PaimonSplit paimonSplit)
 
         String fileFormat = getFileFormat(paimonSplit.getPathString());
         if (split != null) {
+            // use jni reader / paimon-cpp reader / paimon-rust reader
             rangeDesc.setFormatType(TFileFormatType.FORMAT_JNI);
-            // A logical DataSplit may span multiple files, so keep it intact 
for the JNI reader.
-            fileDesc.setReaderType(TPaimonReaderType.PAIMON_JNI);
-            fileDesc.setPaimonSplit(PaimonUtil.encodeObjectToString(split));
+            // paimon-cpp and paimon-rust both consume Paimon native binary 
serialization,
+            // which only supports DataSplit. Any other split type falls back 
to JNI.
+            boolean nativeSplit = split instanceof DataSplit;

Review Comment:
   Fixed — canUseRust gates fallback reads to JNI through both shapes: a 
wrapped split (split instanceof FallbackReadFileStoreTable.FallbackSplit, the 
public interface every FallbackDataSplit implements) and the table wrapper 
itself (processedTable instanceof FallbackReadFileStoreTable — both read sides 
of a fallback table produce wrapped splits, so the whole wrapper routes to JNI 
until the rust ABI can represent both sides). The routing test exercises the 
genuine wire shape rather than a mock: an ordinary DataSplit serialized, the 
isFallback byte appended exactly like FallbackDataSplit.serialize, and the 
result deserialized through the public FallbackDataSplit.deserialize factory — 
asserting JNI routing for both the split and the table-wrapper shapes; 
PaimonScanNodeTest 51/51.



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