Skip to content

Commit

Permalink
support ubuntu24.04 (#503)
Browse files Browse the repository at this point in the history
### What problem were solved in this pull request?

Issue Number: close #502 

Problem:

### What is changed and how it works?

### Other information
  • Loading branch information
nautaa authored Feb 12, 2025
1 parent 3527da8 commit 228b1c3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
sudo apt-get update && sudo apt-get install -y lcov
cd build_debug
rm -rf unittest
lcov -c -d ./ -o coverage.info
lcov -c -d ./ -o coverage.info --ignore-errors source
- uses: codecov/codecov-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ INCLUDE_DIRECTORIES(. ${PROJECT_SOURCE_DIR}/deps ${PROJECT_SOURCE_DIR}/src /usr/

IF(WITH_UNIT_TESTS)
IF (ENABLE_COVERAGE)
SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -fprofile-arcs -ftest-coverage")
SET(CMAKE_COMMON_FLAGS "${CMAKE_COMMON_FLAGS} -fprofile-arcs -ftest-coverage -fprofile-update=atomic")
ENDIF (ENABLE_COVERAGE)
enable_testing()
ENDIF(WITH_UNIT_TESTS)
Expand Down
10 changes: 5 additions & 5 deletions src/observer/sql/operator/explain_physical_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ void ExplainPhysicalOperator::generate_physical_plan()
ss << "OPERATOR(NAME)\n";

int level = 0;
vector<bool> ends;
ends.push_back(true);
vector<uint8_t> ends;
ends.push_back(1);
const auto children_size = static_cast<int>(children_.size());
for (int i = 0; i < children_size - 1; i++) {
to_string(ss, children_[i].get(), level, false /*last_child*/, ends);
Expand Down Expand Up @@ -83,7 +83,7 @@ Tuple *ExplainPhysicalOperator::current_tuple() { return &tuple_; }
* @param ends 表示当前某个层级上的算子,是否已经没有其它的节点,以判断使用什么打印符号
*/
void ExplainPhysicalOperator::to_string(
ostream &os, PhysicalOperator *oper, int level, bool last_child, vector<bool> &ends)
ostream &os, PhysicalOperator *oper, int level, bool last_child, vector<uint8_t> &ends)
{
for (int i = 0; i < level - 1; i++) {
if (ends[i]) {
Expand All @@ -95,7 +95,7 @@ void ExplainPhysicalOperator::to_string(
if (level > 0) {
if (last_child) {
os << "└─";
ends[level - 1] = true;
ends[level - 1] = 1;
} else {
os << "├─";
}
Expand All @@ -111,7 +111,7 @@ void ExplainPhysicalOperator::to_string(
if (static_cast<int>(ends.size()) < level + 2) {
ends.resize(level + 2);
}
ends[level + 1] = false;
ends[level + 1] = 0;

vector<unique_ptr<PhysicalOperator>> &children = oper->children();
const auto size = static_cast<int>(children.size());
Expand Down
2 changes: 1 addition & 1 deletion src/observer/sql/operator/explain_physical_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ExplainPhysicalOperator : public PhysicalOperator
}

private:
void to_string(ostream &os, PhysicalOperator *oper, int level, bool last_child, vector<bool> &ends);
void to_string(ostream &os, PhysicalOperator *oper, int level, bool last_child, vector<uint8_t> &ends);

void generate_physical_plan();

Expand Down

0 comments on commit 228b1c3

Please sign in to comment.