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

Better estimation for ColumnLowCardinality::Reserve and ColumnString::Reserve #346

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Enmk
Copy link
Collaborator

@Enmk Enmk commented Nov 16, 2023

ColumnLowCardinality assumes that not all items are unique, hence dictionary column can be reserved for smaller capacity.

ColumnString now allows to set average value size estimation in constructor or on existing instance.
If estimation is close to real average value size, then memory pre-allocations are close to optimum.

Added method MemoryUsage that provides insight on the amount of RAM used by column instance.

…:Reserve

ColumnLowCardinality assumes that not all items are unique,
  hence dictionary column can be reserved for smaller capacity;
ColumnString now allows to set average value size estimation
  in constructor or on existing instance.
  If estimation is close to real average value size, then memory is pre-allocations are close to optimum.
@Enmk
Copy link
Collaborator Author

Enmk commented Nov 16, 2023

Closing to re-open and to re-trigger CI/CD

@Enmk Enmk closed this Nov 16, 2023
@Enmk Enmk reopened this Nov 16, 2023
…tests

- Added validation for ColumnString::EstimatedValueSize value in ColumnString
- Minor refactoring of block allocation in ColumnString
- Moved test code for ColumnString and ColumnLowCardinality to separate files,
- Added more test cases
Andded PrettyPrintByteSize + some tests
also removed commented out code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant