OIiveirra commented on code in PR #68161:
URL: https://github.com/apache/doris/pull/68161#discussion_r4314220798


##########
fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonJniScanner.java:
##########
@@ -219,17 +244,28 @@ private void initReader() throws IOException {
             }
             outputToReadIndex[outputIndex] = readIndex;
             DataField tableField = 
table.rowType().getFields().get(projected[readIndex]);
+            if (requiresDatetimeV2PrecisionRepair && dataSource instanceof 
FallbackReadFileStoreTable
+                    && !SpecialFields.isSystemField(tableField.name())) {
+                // Fallback schemas agree positionally, but their names and 
field IDs are independent.
+                // Resolve positions in the data schema, not a system 
wrapper's rowkind-prefixed schema.
+                int dataIndex = 
dataSource.rowType().getFieldIndex(tableField.name());
+                Preconditions.checkState(dataIndex >= 0, "Data field %s not 
found in schema", tableField.name());
+                tableField = policyTableType.getFields().get(dataIndex);

Review Comment:
   Fixed in 5b5f93bfa97886ecf2931d0887ce0dc425a08a31. After binding the 
selected branch field ID/name, JNI now restores the ARRAY of nullable elements 
exposed by BinlogTable.rowType() before projection and timestamp widening. 
Ordinary fallback, audit-log and chain dispatch remain unchanged.
   
   Added real historical p6-to-p0 ORC binlog reader coverage under both branch 
orderings, with independent field IDs, whole-second values, .600000 truncation 
and original NULLs. The test reproduced the ARRAY/SCALAR open failure before 
the fix. Controls cover a missing repair option and explicit repair=false.
   
   Validation passed: 225 tests across six focused FE/JNI classes, Checkstyle 
and quick checks, the standard ASAN FE/BE build, verified personal deployment 
and health checks, and branch-aligned paimon_timestamp_types External 
regression (1 suite, 0 failed/fatal/skipped). Standards and Spec review found 
no remaining actionable issue in this change. These local results do not claim 
the new community CI is already green.



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