Skip to content

feat(execute): add create table PhysicalOperator#27

Merged
KKould merged 3 commits intoKipData:mainfrom
loloxwg:feat/execute
Jul 26, 2023
Merged

feat(execute): add create table PhysicalOperator#27
KKould merged 3 commits intoKipData:mainfrom
loloxwg:feat/execute

Conversation

@loloxwg
Copy link
Copy Markdown
Member

@loloxwg loloxwg commented Jul 25, 2023

What problem does this PR solve?

create table execute

Issue link: #5

What is changed and how it works?

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

cargo fmt code
add rust-toolchain to enable ci

@loloxwg loloxwg force-pushed the feat/execute branch 2 times, most recently from b5a44cd to 459a133 Compare July 25, 2023 04:45
Comment thread src/db.rs Outdated

let mut builder = PhysicalPlanBuilder::new();
let operator = builder.build_plan(&logical_plan)?;
println!("operator: {:#?}", logical_plan);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Suggested change
println!("operator: {:#?}", logical_plan);
println!("operator: {:#?}", operator);


let _ = storage.create_table(
plan.table_name.as_str(),
vec![RecordBatch::new_empty(schema)]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

  1. field
  2. schema
  3. batch record
    good job

Comment thread src/storage/memory.rs
struct Inner {
catalog: RootCatalog,
tables: HashMap<TableId, InMemoryTable>,
tables: Vec<InMemoryTable>,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Why did you change from a hash table to an array?

@KKould KKould merged commit d284291 into KipData:main Jul 26, 2023
@loloxwg loloxwg mentioned this pull request Jul 28, 2023
11 tasks
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.

2 participants