-
Notifications
You must be signed in to change notification settings - Fork 67
refactor: suppress warnings #328
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
base: main
Are you sure you want to change the base?
Conversation
wgtmac
left a comment
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.
Thanks for working on this! I've left a minor comment. Please also fix the linter errors.
| std::unordered_map<std::string, std::string> defaults; // required | ||
| std::unordered_map<std::string, std::string> overrides; // required | ||
| std::vector<std::string> endpoints; | ||
| std::unordered_map<std::string, std::string> defaults{}; // required |
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.
We don't need to add {} for everything, at least not for STL containers and std::string. Please try to minimize lines of change like this.
| const TableIdentifier& identifier, const Schema& schema, const PartitionSpec& spec, | ||
| const std::string& location, | ||
| const std::unordered_map<std::string, std::string>& properties) { | ||
| [[maybe_unused]] const TableIdentifier& identifier, |
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.
I think we can remove the parameters' names instead of adding [[maybe_unused]] to keep the code clear.
| case TypeId::kFixed: { | ||
| auto target_fixed_type = internal::checked_pointer_cast<FixedType>(target_type); | ||
| if (binary_val.size() == target_fixed_type->length()) { | ||
| if (static_cast<int32_t>(binary_val.size()) == target_fixed_type->length()) { |
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 general, we should convert small types to large types. There are some similar codes in this PR that need to be modified.
| } | ||
|
|
||
| std::shared_ptr<Type> CreateListOfList() { | ||
| [[maybe_unused]] std::shared_ptr<Type> CreateListOfList() { |
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.
@wgtmac Does this method not being used mean we are missing some tests?
| friend bool operator==(const Schema& lhs, const Schema& rhs) { return lhs.Equals(rhs); } | ||
|
|
||
| private: | ||
| using Type::Equals; |
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.
@wgtmac It seems that we should override the Equals methods in Schema instead of adding Schema::Equals(const Schema& other) const at line 108?
Warnings have been suppressed according to the following patterns:
[[maybe_unused]]using base::func.