Gabriel39 commented on PR #65262: URL: https://github.com/apache/doris/pull/65262#issuecomment-4964532681
空投影仍会构造完整 readable_metrics — [IcebergScanNode.java:611](https://github.com/apache/doris/blob/3cc50001622ea07d9c89c1aeff70d5d64519edb0/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java#L611) COUNT(*) 等 0-slot 扫描会得到空的 projectedSchema,这里因此跳过 scan.project(...)。Iceberg 随后使用完整 metadata schema;对于 $files/$data_files,ManifestReadTask.rows() 发现 readable_metrics 后仍会为每行构造它,即使 JNI 不读取任何列。[Iceberg 1.10.1 的实现](https://github.com/apache/iceberg/blob/apache-iceberg-1.10.1/core/src/main/java/org/apache/iceberg/BaseFilesTable.java#L162-L173)明确走这个分支。 因此,对本 PR 中包含 map<boolean, boolean> 的表执行: SELECT count(*) FROM table_name$files; SELECT count(*) FROM table_name$data_files; 仍可能重新触发本 PR 想避免的 readable_metrics 物化失败。 建议空投影时也显式投影;如果 Iceberg 不支持空 schema,则投影一个不会触发问题的轻量标量列,同时保持 JNI 的 required-field 数量为 0。回归测试应补充上述两个 COUNT(*),ORC 和 Parquet 都覆盖。 -- 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]
