github-actions[bot] commented on code in PR #65782:
URL: https://github.com/apache/doris/pull/65782#discussion_r3610124093
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -1961,10 +1964,20 @@ public static Schema appendRowLineageFieldsForV3(Schema
schema) {
MetadataColumns.ROW_ID,
MetadataColumns.LAST_UPDATED_SEQUENCE_NUMBER));
}
+ public static boolean shouldCollectColumnStats(Table table) {
+ Schema schema = table.schema();
+ MetricsConfig metricsConfig = MetricsConfig.forTable(table);
+ return TypeUtil.indexById(schema.asStruct()).values().stream()
+ .filter(field -> field.type().isPrimitiveType())
Review Comment:
[P2] Evaluate collection against the actual writer field set
This gate can return false even though the writer has enabled metrics
outside this primitive user-schema set. For ORC `items list<int>` with default
`none` and `column.items=counts`, it drops the top-level `items` field and only
checks `items.element` (still `none`), although both Doris and Iceberg ORC
metrics publish top-level counts. Separately, for a v3 rewrite/merge with
default `counts` and every user field overridden to `none`, this returns false
before the binders append `_row_id` and `_last_updated_sequence_number`; those
appended fields inherit `counts`, and the collectors/helper support their
reserved IDs. In both cases BE skips the footer and requested manifest metrics
disappear. Please evaluate the effective policy against the exact schema/field
set sent to the selected writer (including v3 lineage and ORC top-level complex
fields), with tests for both triggers.
--
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]