Skip to content

Spark: Use newArrayListWithExpectedSize instead of newArrayList for NDVSketchUtil #12907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

jackylee-ch
Copy link
Contributor

We renamed the method from newArrayList to newArrayListWithExpectedSize because some user tables may contain hundreds or even thousands of columns. If the expected capacity (size) of the collection is not specified in advance, dynamic resizing operations will trigger multiple memory copy operations.

@github-actions github-actions bot added the spark label Apr 27, 2025
@nastra nastra merged commit 346414c into apache:main Apr 28, 2025
27 checks passed
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.

2 participants