morningman commented on code in PR #69488:
URL: https://github.com/apache/doris/pull/69488#discussion_r4408868696


##########
fe/fe-connector/fe-connector-hive/src/main/java/org/apache/doris/connector/hive/HiveConnectorMetadata.java:
##########
@@ -625,7 +625,8 @@ public ConnectorTableSchema getTableSchema(
                     ConnectorCapability.SUPPORTS_NESTED_COLUMN_PRUNE,
                     ConnectorCapability.SUPPORTS_FIELD_ID_ACCESS_PATH,
                     ConnectorCapability.SUPPORTS_STORAGE_PREDICATE_PRUNING,
-                    ConnectorCapability.SUPPORTS_NESTED_COLUMN_SCHEMA_CHANGE));
+                    ConnectorCapability.SUPPORTS_NESTED_COLUMN_SCHEMA_CHANGE,
+                    ConnectorCapability.SUPPORTS_WRITE_ONLY_DEFAULTS));

Review Comment:
   Correction to my reply above. Since #69299 (merged on 10-26, after that 
reply), the latest Iceberg pin retains its schema, so fe-core publishes the 
schema from `getTableSchema(session, handle, snapshot)` for every statement 
that pins the table, not only for time travel. On an iceberg-on-HMS table that 
overload returns the sibling schema without `reflectSiblingCapabilities`, so 
`hasWriteOnlyDefaults()` is false in those statements: `DEFAULT(c)` in UPDATE 
WHERE / MERGE ON still evaluates to NULL and changes no row, and `SELECT 
DEFAULT(c)` still returns NULL, the same results as master today. Direct 
Iceberg catalogs are not affected, because the Iceberg connector declares the 
capability connector-wide.
   
   From the code, the overload leaves out every capability the Hive connector 
reflects from the sibling, not only this one (auto and sampled analyze, Top-N 
lazy materialization, nested column pruning, field-id access paths, storage 
predicate pruning, nested column DDL). Reflecting them in the snapshot overload 
changes planning for all of them, so it will come in its own PR with its own 
tests, after this one. The PR description now states the iceberg-on-HMS 
limitation.
   



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