harshilv17 opened a new pull request, #2820:
URL: https://github.com/apache/iceberg-go/pull/2820

   Fixes #2755.
   
   Follow-up to #2487. A file task's identity partition work is now done once 
per task and passed down:
   
   - **Converted constants.** `projectToRequestedSchema` converted the 
partition constants, allocating a new map, on every record batch. Both pipeline 
steps that project now convert once when the pipeline is built, and 
`projectToRequestedSchema` takes the converted values.
   - **Folded filters.** The new `foldTaskFilters` folds the row filter and the 
row-group filter with the file's constants once, returning them in a small 
`taskFilters` value. `recordsFromTask` and `producePosDeletesFromTask` use it, 
and `processRecordsWithPlans` takes the folded row-group filter instead of 
folding it a second time.
   - **Cache-skip check.** Whether the task can use the plans cached by file 
schema is decided in one helper, `cachedFilterPlansForTask`, which both task 
paths call. `recordsFromTask` also skips them for a task with its own residual, 
as before.
   
   No behavior change, with one small exception: a partition value that can't 
be converted to its requested type now fails when the task starts, rather than 
on the first batch that isn't already in the target schema.
   
   `BenchmarkScanFillsIdentityPartitionColumn` scans 10,000 rows in batches of 
100 from a file that leaves an identity partition column to its partition value:
   
   | | allocs/op | B/op |
   |---|---:|---:|
   | main | 15,356 | 1,897,517 |
   | this PR | 14,860 | 1,866,937 |
   
   That's about 5 fewer allocations per batch. The existing #2487 tests cover 
the behavior, and `go test ./table/...` passes.


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