github-actions[bot] commented on code in PR #66008:
URL: https://github.com/apache/doris/pull/66008#discussion_r3649603189
##########
be/src/exec/scan/file_scanner_v2.cpp:
##########
@@ -108,10 +109,26 @@ bool is_supported_arrow_table_format(const
TFileRangeDesc& range) {
bool is_supported_jni_table_format(const TFileRangeDesc& range) {
const auto table_format = table_format_name(range);
if (table_format == "paimon") {
- return range.__isset.table_format_params &&
- range.table_format_params.__isset.paimon_params &&
- range.table_format_params.paimon_params.__isset.reader_type &&
- range.table_format_params.paimon_params.reader_type ==
TPaimonReaderType::PAIMON_JNI;
+ if (!range.__isset.table_format_params ||
+ !range.table_format_params.__isset.paimon_params) {
+ return false;
+ }
+ const auto& params = range.table_format_params.paimon_params;
+ if (params.__isset.reader_type) {
+ if (params.reader_type == TPaimonReaderType::PAIMON_JNI) {
+ return params.__isset.paimon_split;
+ }
+ // V2 cannot pass a logical DataSplit through a raw native child
without silently
+ // dropping its multi-file semantics, so PAIMON_CPP must remain on
the V1 fallback.
+ return false;
+ }
+ if (params.__isset.paimon_split) {
Review Comment:
[P1] Preserve old-FE native Paimon splits
A missing `reader_type` does not mean the split is Java-serialized. Before
field 17 existed, an FE with `enable_paimon_cpp_reader=true` encoded a
`DataSplit` with `encodeDataSplitToString`, and V1 still uses that query option
to select `PaimonCppReader`. This branch instead admits every legacy
`paimon_split` into V2, where the hybrid/JNI path sends those native bytes to
Java deserialization, so old-FE/new-BE rolling upgrades fail. The new
compatibility test only covers the option-disabled Java case. Keep the
absent-discriminator/native shape on V1 (or negotiate/support that payload) and
cover `enable_paimon_cpp_reader=true`.
--
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]