linzch3 opened a new pull request, #19113: URL: https://github.com/apache/iceberg/pull/19113
Closes #19109 Projected scans were reporting `schemaId = 0` because `TypeUtil.project` builds a new schema with the default id, and `SnapshotScan.planFiles` used `schema().schemaId()` (the projected schema) in the report. The report already carries `projected_field_ids` / `projected_field_names`, so I just switched that to `tableSchema().schemaId()` — the schema the projection comes from. For data scans, `useSnapshot()` already replaces `tableSchema()` with the snapshot schema, so time travel stays correct. Left `TypeUtil.project` alone. Incremental / changelog scans don't emit `ScanReport`s, so no change there. Tests in `ScanPlanningAndReportingTestBase` (format v2/v3): evolve the schema first so the id isn't 0, then assert a projected `select` report uses the table schema id; plus a time-travel case that lands on an older evolved snapshot and checks that snapshot's id. `./gradlew :iceberg-core:test --tests org.apache.iceberg.TestLocalScanPlanningAndReporting` and `:iceberg-core:spotlessApply` pass locally (JDK 17). -- 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]
