github-actions[bot] commented on code in PR #67182:
URL: https://github.com/apache/doris/pull/67182#discussion_r3880432014


##########
fe/fe-connector/fe-connector-hive/src/main/java/org/apache/doris/connector/hive/HiveConnectorMetadata.java:
##########
@@ -577,8 +576,9 @@ public ConnectorTableSchema getTableSchema(
         if (supportsHiveSampleAnalyze(tableInfo)) {
             
perTableCapabilities.add(ConnectorCapability.SUPPORTS_SAMPLE_ANALYZE);
         }
-        if (supportsHiveTopNLazyMaterialize(tableInfo)) {
+        if (supportsHiveOrcOrParquetScan(tableInfo)) {
             
perTableCapabilities.add(ConnectorCapability.SUPPORTS_TOPN_LAZY_MATERIALIZE);
+            
perTableCapabilities.add(ConnectorCapability.SUPPORTS_STORAGE_PREDICATE_PRUNING);

Review Comment:
   [P2] Enable this gate for the Iceberg scan routes
   
   This is currently the only production opt-in. Standalone Iceberg data tables 
never declare `SUPPORTS_STORAGE_PREDICATE_PRUNING`, so their `PhysicalFileScan` 
always fails the new gate even though normal native data scans are Parquet/ORC 
and consume bare predicates for pruning. The Iceberg-on-HMS route would still 
lose the marker because `SIBLING_INHERITABLE_CAPABILITIES` does not include it. 
Please expose the capability for native Iceberg data tables without 
over-admitting metadata/system tables, add the Hive sibling-reflection entry, 
and cover both standalone and delegated routes.



##########
fe/fe-connector/fe-connector-spi/src/main/java/org/apache/doris/connector/spi/ConnectorCapability.java:
##########
@@ -153,6 +153,20 @@ public enum ConnectorCapability {
      * over-admission — a text/json table has no field ids, so pruned leaves 
would read back NULL.</p>
      */
     SUPPORTS_NESTED_COLUMN_PRUNE,
+    /**
+     * Indicates that this connector's table scans are backed by storage 
readers that can use extra
+     * bare-column predicates for data skipping, such as ORC/Parquet min/max 
pruning. The planner may
+     * then append safety-checked necessary conditions derived from 
monotonic-function predicates while
+     * retaining the original predicate.
+     *
+     * <p>Row/passthrough connectors such as JDBC and ES must NOT declare this 
capability. Adding derived
+     * predicates to those scans would broaden connector pushdown semantics 
instead of merely exposing ranges
+     * to storage indexes.</p>
+     *
+     * <p><b>Scope: catalog-wide OR per-table.</b> A heterogeneous connector 
may declare it only for tables
+     * whose scan path supports storage-level predicate pruning.</p>
+     */

Review Comment:
   [P1] Bump the connector API major for this SPI addition
   
   `connector.plugin.api.version` remains `6.0`. Since `ApiVersionGate` 
compares only the major and `org.apache.doris.connector.spi.*` is loaded 
parent-first, an updated Hive plugin stamped 6.0 is accepted by an older 6.x FE 
but resolves this field against that FE's older enum and fails with 
`NoSuchFieldError`. The connector compatibility contract classifies any SPI 
surface addition as major. Please bump the version and pinned resources to the 
next major, and extend the surface guard to record public enum constants.



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