sqd opened a new pull request, #17618: URL: https://github.com/apache/iceberg/pull/17618
DynamicRecordProcessor.collect calls isForwardEligible for every record. That call resolves to DynamicSinkUtil.resolveEqualityFieldNames, which for a record with no user-supplied equality fields returns Schema.identifierFieldNames(), which uses Java Stream API to allocate and build a new HashSet. This HashSet is immediately discarded after isEmpty(). So each record on the hottest and commonest path (a table without identifier fields) allocates a set purely to ask whether it is empty. Ask the same question without materialising anything: test the user-supplied equality fields directly, then consult Schema.identifierFieldIds(), which Schema already memoizes as an ImmutableSet. Behaviour is unchanged and test still covers every branch. -- 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]
