Skip to content

[FLINK] Replace LinkedList with ArrayDeque and pre-size HashSet in Flink module#11789

Closed
acvictor wants to merge 1 commit into
apache:mainfrom
acvictor:acvictor/flinkMinor
Closed

[FLINK] Replace LinkedList with ArrayDeque and pre-size HashSet in Flink module#11789
acvictor wants to merge 1 commit into
apache:mainfrom
acvictor:acvictor/flinkMinor

Conversation

@acvictor
Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

This PR makes minor collection improvements in Flink by replacing LinkedList with ArrayDeque for the internal row buffer - provides O(1) for add at tail, remove(0) from head with better cache locality than LinkedList which allocates a separate node object per element, and using pre-size HashSet in analyzeJoinKeys to avoid rehashing when the key count exceeds the default capacity (16 initial capacity x 0.75 load factor = rehash after 12 elements).

How was this patch tested?

Existing UTs

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions Bot added the FLINK label Mar 19, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the stale stale label May 4, 2026
@github-actions
Copy link
Copy Markdown

This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks.

@github-actions github-actions Bot closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant