Added namespace oceanbase to src/observer#605
Added namespace oceanbase to src/observer#605aradhanahegde wants to merge 7 commits intooceanbase:mainfrom
Conversation
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds the oceanbase namespace to the entire src/observer directory structure. The changes consistently wrap all existing code in the observer module with the oceanbase namespace to improve code organization and prevent naming conflicts.
Key Changes:
- Added
namespace oceanbase {declarations to all header and implementation files - Added corresponding
} // namespace oceanbaseclosing braces - Reformatted some function definitions from multi-line to single-line style
Reviewed Changes
Copilot reviewed 299 out of 346 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| All .h files | Added namespace wrapper around class/function declarations |
| All .cpp files | Added namespace wrapper around implementations |
| main.cpp | Added namespace wrapper around main function and global variables |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -22,6 +22,8 @@ See the Mulan PSL v2 for more details. */ | |||
|
|
|||
There was a problem hiding this comment.
Remove the stray semicolon on line 20. It appears to be a formatting artifact from code restructuring.
| bp = iter->second; | ||
| return RC::SUCCESS; | ||
| } | ||
|
|
There was a problem hiding this comment.
[nitpick] Add a blank line before the closing namespace brace for consistency with other files in the PR.
| char *Arena::AllocateAligned(size_t bytes) | ||
| { | ||
| const int align = (sizeof(void *) > 8) ? sizeof(void *) : 8; | ||
| static_assert((align & (align - 1)) == 0, "Pointer size should be a power of 2"); |
There was a problem hiding this comment.
[nitpick] The reformatted single-line static_assert is less readable than the original multi-line format. Consider keeping multi-line format for better readability.
| static_assert((align & (align - 1)) == 0, "Pointer size should be a power of 2"); | |
| static_assert( | |
| (align & (align - 1)) == 0, | |
| "Pointer size should be a power of 2" | |
| ); |
| for (const auto &child : child_groups_) { | ||
| hash ^= std::hash<int>()(child) + 0x9e3779b9 + (hash << 6) + (hash >> 2);; | ||
| hash ^= std::hash<int>()(child) + 0x9e3779b9 + (hash << 6) + (hash >> 2); | ||
| ; |
There was a problem hiding this comment.
Remove the stray semicolon on line 20. This appears to be a formatting artifact.
| ; |
| int Value::compare(const Value &other) const | ||
| { | ||
| return DataType::type_instance(this->attr_type_)->compare(*this, other); | ||
| } |
There was a problem hiding this comment.
[nitpick] The original single-line format for this simple function was more concise. Consider reverting to the original format.
| int Value::compare(const Value &other) const | |
| { | |
| return DataType::type_instance(this->attr_type_)->compare(*this, other); | |
| } | |
| int Value::compare(const Value &other) const { return DataType::type_instance(this->attr_type_)->compare(*this, other); } |
What problem were solved in this pull request?
Added namespace oceanbase to the src/observer file
Issue Number: close #515
Problem:
What is changed and how it works?
Other information