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


##########
fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonJniScanner.java:
##########
@@ -192,11 +196,52 @@ private void initReader() throws IOException {
                             fields.length, paimonAllFieldNames.size()));
         }
         int[] projected = getProjected();
+        RowType readType = requiresDatetimeV2PrecisionRepair
+                ? createSafeTimestampReadType(table.rowType()) : 
table.rowType();
         readBuilder.withProjection(projected);
-        readBuilder.withFilter(getPredicates());
+        if (requiresDatetimeV2PrecisionRepair) {
+            // withProjection() derives a read type from the table schema and 
would otherwise
+            // replace the widened timestamp types with the evolved 
(lower-precision) schema.
+            readBuilder.withReadType(readType.project(projected));
+        }
+        readBuilder.withFilter(requiresDatetimeV2PrecisionRepair
+                ? Collections.emptyList() : getPredicates());

Review Comment:
   Fixed in c637de5659b and verified in the latest head. PaimonScanPlanProvider 
now detects timestamp descendants in the table RowType and withholds affected 
predicates from FE split planning; Doris evaluates the residual after JNI 
repair. The added leading-zero Parquet/ORC fixture and predicate regression 
pass in the personal external suite.



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