-
Notifications
You must be signed in to change notification settings - Fork 591
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: create nested table schema according to proto file #1078
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1078 +/- ##
============================================
+ Coverage 70.28% 70.40% +0.11%
Complexity 2766 2766
============================================
Files 997 997
Lines 83966 84342 +376
Branches 1790 1790
============================================
+ Hits 59016 59378 +362
- Misses 24059 24073 +14
Partials 891 891
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
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 lgtm, @st1page PTAL
column_desc: Some(ProstColumnDesc { | ||
column_id: 0, | ||
name: ROWID_NAME.to_string(), | ||
field_descs: vec![], | ||
column_type: Some(DataType::Int32.to_protobuf()), | ||
type_name: String::new(), | ||
}), |
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.
column_desc: Some(ProstColumnDesc { | |
column_id: 0, | |
name: ROWID_NAME.to_string(), | |
field_descs: vec![], | |
column_type: Some(DataType::Int32.to_protobuf()), | |
type_name: String::new(), | |
}), | |
column_desc: Some(ProstColumnDesc::new_atomic( | |
ROWID_NAME.to_string(), | |
DataType::Varchar.to_protobuf(), | |
"", | |
}), |
Why didn't you just refactor all occurrences of direct struct instantiation?
and actully you can simplify more:
pub fn new_atomic(data_type: DataType, name: impl Into<String>, column_id: i32) -> Self {
Self {
column_type: Some(data_type.to_protobuf()), // you can get away from to_protobuf() every where
column_id,
name: name.into(), // use Into<String> for arguments that can possibily be either &str or String,
..Default::default()
}
}
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.
LGTM
What's changed and what's your intention?
PLEASE DO NOT LEAVE THIS EMPTY !!!
Please explain IN DETAIL what the changes are in this PR and why they are needed:
Checklist
Refer to a related PR or issue link (optional)
#575