Skip to content
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

fix : use get_record_batch_memory_size for calculating RecordBatch memory size in topK #13906

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

getChan
Copy link
Contributor

@getChan getChan commented Dec 26, 2024

Which issue does this PR close?

Part of #13430.

Rationale for this change

In Top K, the RecordBatch size is overestimated. Fix it by using get_record_batch_memory_size.

What changes are included in this PR?

Are these changes tested?

Unit tested for a narrow range.

Are there any user-facing changes?

No

@github-actions github-actions bot added the physical-expr Physical Expressions label Dec 26, 2024

// when insert record batch entry
record_batch_store.insert(record_batch_entry);
assert_eq!(record_batch_store.batches_size, 60);
Copy link
Contributor Author

@getChan getChan Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before, it was 252.

@alamb alamb changed the title fix : RecordBatch memory size in topK fix : use get_record_batch_memory_size for calculating RecordBatch memory size in topK Dec 26, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution @getChan -- this PR makes sense to me

It may also help with the situation @gruuya describes on

Copy link
Member

@xudong963 xudong963 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@xudong963 xudong963 merged commit 2d985b4 into apache:main Dec 26, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical-expr Physical Expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants