Copilot commented on code in PR #67207:
URL: https://github.com/apache/doris/pull/67207#discussion_r3870579557
##########
fe/fe-connector/fe-connector-paimon/src/main/java/org/apache/doris/connector/paimon/PaimonScanPlanProvider.java:
##########
@@ -611,6 +637,22 @@ private List<ConnectorScanRange> planScanInternal(
}
Table table = resolveScanTable(paimonHandle);
+ if (requiresMetadataColumns
+ && (paimonHandle.isForceJni() ||
isForceJniScannerEnabled(session))) {
+ throw new DorisConnectorException(
+ "Paimon metadata columns are only supported by
FileScannerV2 native Parquet/ORC "
+ + "reader; actual reader is JNI");
+ }
+ if (requiresMetadataColumns && !isFileScannerV2Enabled(session)) {
+ throw new DorisConnectorException(
+ "Paimon metadata columns require FileScannerV2 native
Parquet/ORC reader");
+ }
Review Comment:
The same reader-validation errors for `requiresMetadataColumns` are thrown
in multiple places within `planScanInternal` (e.g., when encountering JNI
splits and when native splits are ignored). This duplication increases the risk
of message drift and inconsistent behavior. Consider factoring the validation
into a small helper (similar to Iceberg's `validateMetadataColumnReader`) and
reuse it at each decision point; it keeps the logic centralized and makes
future changes safer.
--
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]