atognolas opened a new pull request, #39155:
URL: https://github.com/apache/beam/pull/39155

   ## Summary
   - Add a `Map<String, Row> keyCache` in 
`AssignDestinationsAndPartitions.AssignDoFn` to reuse Row key objects across 
millions of input rows
   - Only N distinct `(destination, partition)` combinations exist (e.g. 400 
for a 400-bucket table), but every row currently allocates a new Row with 
schema validation overhead
   - After the first N rows, all subsequent lookups are cache hits
   
   ## Motivation
   Observed during production benchmarks at scale (39M users, 400 partitions, 
99-column schema). Row allocation + schema validation dominated bundle 
processing time unnecessarily.
   
   ## Test plan
   - [ ] Existing `AssignDestinationsAndPartitionsTest` passes
   - [ ] Run IcebergIO integration tests
   - [ ] Verify via profiling that Row allocation drops after initial cache 
warm-up
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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

Reply via email to