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

Update bool type to store values as compact bits #406

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

yangzq50
Copy link
Contributor

@yangzq50 yangzq50 commented Jan 2, 2024

What problem does this PR solve?

Update bool type to store values as compact bits

Issue link:#394

What is changed and how it works?

Added ColumnVectorType::kCompactBit and VectorBufferType::kCompactBit

Update aggregate function count, min, max for BooleanT (for these functions, row id does not matter)

Now we should interact with BooleanT stored in ColumnVector by VectorBuffer::GetCompactBit and VectorBuffer::SetCompactBit

sql statement examples

  • CREATE TABLE boolean1 (i INTEGER, b1 BOOLEAN, b2 BOOLEAN);
  • INSERT some data
  • SELECT * FROM boolean1 WHERE b1 and b2;
  • SELECT * FROM boolean1 WHERE (not b1) and (i > 5) and (not b2);
  • SELECT * FROM boolean1 WHERE b1 <> b2;

Code changes

  • Has Code change
  • Has unittest scripts change
  • Has slt scripts change

Check List

Tests

  • Unit test
  • sqllogictest

@yangzq50 yangzq50 changed the title Update bool type to store as compact bits Update bool type to store values as compact bits Jan 2, 2024
@yingfeng yingfeng added the ci PR can be test label Jan 2, 2024
@yingfeng yingfeng added ci PR can be test and removed ci PR can be test labels Jan 3, 2024
@JinHai-CN JinHai-CN added the ci PR can be test label Jan 3, 2024
@JinHai-CN JinHai-CN merged commit a629783 into infiniflow:main Jan 4, 2024
2 checks passed
@yangzq50 yangzq50 deleted the add_bool_type branch March 21, 2024 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci PR can be test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants