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

feat: refactor type system and add vector type, support stl index #682

Merged
merged 7 commits into from
Jan 13, 2024

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Jan 11, 2024

This pull request refactors the type system and supports more indexes in the system.

  • binder,planner: support using when creating index. users can choose to create hash table index or btree index.
  • index: add stl wrapper into the system. the btree wrapper and hash htable wrapper are now part of the starter code.
  • binder: support bind float.
  • type: add vector type
  • type: refactor the system to represent a type by using Column. for example, VARCHAR(8) will have type id as varchar and the width is stored in the column struct. expressions and planner have been refactored to take this into account. fixed several bugs related to data width inference.
  • add array expressions for vector type. see vector.slt on how to use them. i.e., SELECT ARRAY [1.0, 2.0];
  • tuple: slightly change the tuple format and fix several size computation mistakes.

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
@AveryQi115
Copy link
Contributor

u r crazy🤣🤣🤣🤣oh my gosh

@skyzh
Copy link
Member Author

skyzh commented Jan 11, 2024

the vector thing is for my upcoming vector db tutorial... feel free to ask me to drop if it is not ready for you to maintain.

@AveryQi115
Copy link
Contributor

the vector thing is for my upcoming vector db tutorial... feel free to ask me to drop if it is not ready for you to maintain.

No, it is definitely sooooo cool to have vector support in bustub! 🥹

Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
Signed-off-by: Alex Chi Z <iskyzh@gmail.com>
@ChaosZhai
Copy link
Contributor

Wanted to further refactor index creation this semester now it's done already 🤯👍

@yliang412
Copy link
Member

yliang412 commented Jan 11, 2024

Great! I will take a look later today.

Copy link
Member

@yliang412 yliang412 left a comment

Choose a reason for hiding this comment

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

LGTM.

src/type/type.cpp Outdated Show resolved Hide resolved
test/sql/vector.slt Outdated Show resolved Hide resolved
@skyzh skyzh merged commit a5c45ee into master Jan 13, 2024
3 checks passed
@skyzh skyzh deleted the skyzh/type-index branch January 13, 2024 05:35
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.

None yet

4 participants