-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: support reading form csv file #550
Conversation
Signed-off-by: clundro <[email protected]>
duckdb sql just supports so we can only use 'create table' and then 'copy from' to do this task. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall on the right direction, good work!
CMakeLists.txt
Outdated
@@ -311,6 +311,7 @@ add_custom_target(submit-p2 | |||
) | |||
|
|||
set(P3_FILES | |||
"src/include/execution/executors/copy_file_executor.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should not include in submission files, because it will not be modified by students
private: | ||
const PhysicalCopyFileNode *plan_; | ||
} | ||
} // namespace bustub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably need to add a new line to avoid lint warnings
|
||
protected: | ||
auto PlanNodeToString() const -> std::string override { | ||
return fmt::format("PhysicalCopy {{ file_path={} }}", path_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In BusTub we don't add Physical
to the plan node name
namespace bustub { | ||
class BaseCsvReader { | ||
public: | ||
BaseCsvReader(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no implementation yet? 🤪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I still read the duckdb code and I'm a little slow to catch on that.
Signed-off-by: clundro <[email protected]>
1. build error => copyfrom executor needs to insert table heap. Signed-off-by: clundro <[email protected]>
issue: #404
status: (don't need to review, still be coding)
material impl ref: duckdb, risinglight,
copy syntax specification: copy statement
expected behavior:
task:
get bind_type and create file copy plan.(file path,file format)
csv file: read file based on path and get columns.