Skip to content

Conversation

@aradhanahegde
Copy link

@aradhanahegde aradhanahegde commented Oct 3, 2025

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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hnwyllmm hnwyllmm requested a review from Copilot October 9, 2025 01:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 oceanbase closing 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.

#include "common/global_context.h"
#include "sql/parser/parse_defs.h"
#include "storage/buffer/disk_buffer_pool.h"

Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Remove the stray semicolon on line 20. It appears to be a formatting artifact from code restructuring.

Copilot uses AI. Check for mistakes.
bp = iter->second;
return RC::SUCCESS;
}

Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Add a blank line before the closing namespace brace for consistency with other files in the PR.

Suggested change

Copilot uses AI. Check for mistakes.
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");
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

[nitpick] The reformatted single-line static_assert is less readable than the original multi-line format. Consider keeping multi-line format for better readability.

Suggested change
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"
);

Copilot uses AI. Check for mistakes.
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);
;
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

Remove the stray semicolon on line 20. This appears to be a formatting artifact.

Suggested change
;

Copilot uses AI. Check for mistakes.
Comment on lines +248 to +251
int Value::compare(const Value &other) const
{
return DataType::type_instance(this->attr_type_)->compare(*this, other);
}
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

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

[nitpick] The original single-line format for this simple function was more concise. Consider reverting to the original format.

Suggested change
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); }

Copilot uses AI. Check for mistakes.
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.

add oceanbase namespace for observer

2 participants