github-actions[bot] commented on code in PR #18183:
URL: https://github.com/apache/doris/pull/18183#discussion_r1153992655


##########
be/src/io/fs/file_system.h:
##########
@@ -29,6 +29,23 @@
 namespace doris {
 namespace io {
 
+#ifndef FILESYSTEM_M
+#define FILESYSTEM_M(stmt)                    \

Review Comment:
   warning: macro is not used [clang-diagnostic-unused-macros]
   ```cpp
   #define FILESYSTEM_M(stmt)                    \
           ^
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -143,12 +142,7 @@ void delete_meta(DataDir* data_dir) {
 
 Status init_data_dir(const std::string& dir, std::unique_ptr<DataDir>* ret) {
     std::string root_path;
-    Status st = FileUtils::canonicalize(dir, &root_path);
-    if (!st.ok()) {
-        std::cout << "invalid root path:" << FLAGS_root_path << ", error: " << 
st.to_string()
-                  << std::endl;
-        return Status::InternalError("invalid root path");
-    }
+    RETURN_IF_ERROR(io::global_local_filesystem()->canonicalize(dir, 
&root_path));

Review Comment:
   warning: use of undeclared identifier 'io' [clang-diagnostic-error]
   ```cpp
       RETURN_IF_ERROR(io::global_local_filesystem()->canonicalize(dir, 
&root_path));
                       ^
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -301,14 +294,14 @@
 }
 
 void show_segment_footer(const std::string& file_name) {
-    std::unique_ptr<RandomAccessFile> input_file;
-    Status status = doris::Env::Default()->new_random_access_file(file_name, 
&input_file);
+    doris::io::FileReaderSPtr file_reader;
+    Status st = doris::io::global_local_filesystem()->open_file(file_name, 
&file_reader);
     if (!status.ok()) {

Review Comment:
   warning: use of undeclared identifier 'status' [clang-diagnostic-error]
   ```cpp
       if (!status.ok()) {
            ^
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -194,7 +188,7 @@
         }
         // 1. get dir
         std::string dir;
-        Status st = FileUtils::canonicalize(v[0], &dir);
+        Status st = io::global_local_filesystem()->canonicalize(v[0], &dir);

Review Comment:
   warning: use of undeclared identifier 'io' [clang-diagnostic-error]
   ```cpp
           Status st = io::global_local_filesystem()->canonicalize(v[0], &dir);
                       ^
   ```
   



##########
be/src/vec/exec/jni_connector.h:
##########
@@ -0,0 +1,313 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+#include <jni.h>

Review Comment:
   warning: 'jni.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <jni.h>
            ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
            ^
   ```
   



##########
be/test/io/fs/local_file_system_test.cpp:
##########
@@ -0,0 +1,616 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "io/fs/local_file_system.h"
+
+#include <algorithm>
+#include <filesystem>
+#include <fstream>
+#include <set>
+#include <vector>
+
+#include "common/status.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "io/fs/file_reader.h"
+#include "io/fs/file_writer.h"
+
+namespace doris {
+
+class LocalFileSystemTest : public testing::Test {
+public:
+    virtual void SetUp() {

Review Comment:
   warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' 
[modernize-use-override]
   
   ```suggestion
       void SetUp() override {
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
                ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@ TEST_F(TestRowCursor, FullKeyCmp) {
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_arena.get());
            ^
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -301,14 +294,14 @@
 }
 
 void show_segment_footer(const std::string& file_name) {
-    std::unique_ptr<RandomAccessFile> input_file;
-    Status status = doris::Env::Default()->new_random_access_file(file_name, 
&input_file);
+    doris::io::FileReaderSPtr file_reader;
+    Status st = doris::io::global_local_filesystem()->open_file(file_name, 
&file_reader);
     if (!status.ok()) {
-        std::cout << "open file failed: " << status.to_string() << std::endl;
+        std::cout << "open file failed: " << status << std::endl;
         return;
     }
     SegmentFooterPB footer;
-    status = get_segment_footer(input_file.get(), &footer);
+    status = get_segment_footer(file_reader.get(), &footer);
     if (!status.ok()) {

Review Comment:
   warning: use of undeclared identifier 'status' [clang-diagnostic-error]
   ```cpp
       if (!status.ok()) {
            ^
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -301,14 +294,14 @@
 }
 
 void show_segment_footer(const std::string& file_name) {
-    std::unique_ptr<RandomAccessFile> input_file;
-    Status status = doris::Env::Default()->new_random_access_file(file_name, 
&input_file);
+    doris::io::FileReaderSPtr file_reader;
+    Status st = doris::io::global_local_filesystem()->open_file(file_name, 
&file_reader);
     if (!status.ok()) {
-        std::cout << "open file failed: " << status.to_string() << std::endl;
+        std::cout << "open file failed: " << status << std::endl;

Review Comment:
   warning: use of undeclared identifier 'status' [clang-diagnostic-error]
   ```cpp
           std::cout << "open file failed: " << status << std::endl;
                                                ^
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -301,14 +294,14 @@
 }
 
 void show_segment_footer(const std::string& file_name) {
-    std::unique_ptr<RandomAccessFile> input_file;
-    Status status = doris::Env::Default()->new_random_access_file(file_name, 
&input_file);
+    doris::io::FileReaderSPtr file_reader;
+    Status st = doris::io::global_local_filesystem()->open_file(file_name, 
&file_reader);
     if (!status.ok()) {
-        std::cout << "open file failed: " << status.to_string() << std::endl;
+        std::cout << "open file failed: " << status << std::endl;
         return;
     }
     SegmentFooterPB footer;
-    status = get_segment_footer(input_file.get(), &footer);
+    status = get_segment_footer(file_reader.get(), &footer);
     if (!status.ok()) {
         std::cout << "get footer failed: " << status.to_string() << std::endl;

Review Comment:
   warning: use of undeclared identifier 'status' [clang-diagnostic-error]
   ```cpp
           std::cout << "get footer failed: " << status.to_string() << 
std::endl;
                                                 ^
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -334,7 +327,7 @@
         show_meta();
     } else if (FLAGS_operation == "batch_delete_meta") {
         std::string tablet_file;
-        Status st = FileUtils::canonicalize(FLAGS_tablet_file, &tablet_file);
+        Status st = 
io::global_local_filesystem()->canonicalize(FLAGS_tablet_file, &tablet_file);

Review Comment:
   warning: use of undeclared identifier 'io' [clang-diagnostic-error]
   ```cpp
           Status st = 
io::global_local_filesystem()->canonicalize(FLAGS_tablet_file, &tablet_file);
                       ^
   ```
   



##########
be/test/io/fs/local_file_system_test.cpp:
##########
@@ -0,0 +1,616 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "io/fs/local_file_system.h"
+
+#include <algorithm>
+#include <filesystem>
+#include <fstream>
+#include <set>
+#include <vector>
+
+#include "common/status.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "io/fs/file_reader.h"
+#include "io/fs/file_writer.h"
+
+namespace doris {
+
+class LocalFileSystemTest : public testing::Test {
+public:
+    virtual void SetUp() {
+        EXPECT_TRUE(
+                
io::global_local_filesystem()->delete_and_create_directory(_s_test_data_path).ok());
+    }
+
+    Status save_string_file(const std::filesystem::path& filename, const 
std::string& content) {
+        io::FileWriterPtr file_writer;
+        RETURN_IF_ERROR(io::global_local_filesystem()->create_file(filename, 
&file_writer));
+        RETURN_IF_ERROR(file_writer->append(content));
+        return file_writer->close();
+    }
+
+    bool check_exists(const std::string& file) {
+        bool exists = true;
+        EXPECT_TRUE(io::global_local_filesystem()->exists(file, &exists).ok());
+        return exists;
+    }
+
+    bool is_dir(const std::string& path) {
+        bool is_dir = true;
+        EXPECT_TRUE(io::global_local_filesystem()->is_directory(path, 
&is_dir).ok());
+        return is_dir;
+    }
+
+    Status list_dirs_files(const std::string& path, std::vector<std::string>* 
dirs,
+                           std::vector<std::string>* files) {
+        bool only_file = true;
+        if (dirs != nullptr) {
+            only_file = false;
+        }
+        std::vector<io::FileInfo> file_infos;
+        bool exists = true;
+        RETURN_IF_ERROR(io::global_local_filesystem()->list(path, only_file, 
&file_infos, &exists));
+        for (auto& file_info : file_infos) {
+            if (file_info.is_file && files != nullptr) {
+                files->push_back(file_info.file_name);
+            }
+            if (!file_info.is_file && dirs != nullptr) {
+                dirs->push_back(file_info.file_name);
+            }
+        }
+        return Status::OK();
+    }
+
+    Status delete_file_paths(const std::vector<std::string>& ps) {
+        for (auto& p : ps) {
+            bool exists = true;
+            RETURN_IF_ERROR(io::global_local_filesystem()->exists(p, &exists));
+            if (!exists) {
+                continue;
+            }
+            bool is_dir = true;
+            RETURN_IF_ERROR(io::global_local_filesystem()->is_directory(p, 
&is_dir));
+            if (is_dir) {
+                
RETURN_IF_ERROR(io::global_local_filesystem()->delete_directory(p));
+            } else {
+                RETURN_IF_ERROR(io::global_local_filesystem()->delete_file(p));
+            }
+        }
+        return Status::OK();
+    }
+
+    // delete the mock cgroup folder
+    virtual void TearDown() {

Review Comment:
   warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' 
[modernize-use-override]
   
   ```suggestion
       void TearDown() override {
   ```
   



##########
be/src/tools/meta_tool.cpp:
##########
@@ -301,14 +294,14 @@
 }
 
 void show_segment_footer(const std::string& file_name) {
-    std::unique_ptr<RandomAccessFile> input_file;
-    Status status = doris::Env::Default()->new_random_access_file(file_name, 
&input_file);
+    doris::io::FileReaderSPtr file_reader;
+    Status st = doris::io::global_local_filesystem()->open_file(file_name, 
&file_reader);
     if (!status.ok()) {
-        std::cout << "open file failed: " << status.to_string() << std::endl;
+        std::cout << "open file failed: " << status << std::endl;
         return;
     }
     SegmentFooterPB footer;
-    status = get_segment_footer(input_file.get(), &footer);
+    status = get_segment_footer(file_reader.get(), &footer);

Review Comment:
   warning: use of undeclared identifier 'status' [clang-diagnostic-error]
   ```cpp
       status = get_segment_footer(file_reader.get(), &footer);
       ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
                ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
     EXPECT_EQ(compare_row(left, right_eq), 0);

Review Comment:
   warning: use of undeclared identifier 'compare_row' [clang-diagnostic-error]
   ```cpp
       EXPECT_EQ(compare_row(left, right_eq), 0);
                 ^
   ```
   



##########
be/test/olap/key_coder_test.cpp:
##########
@@ -22,18 +22,14 @@
 
 #include <limits>
 
-#include "runtime/mem_pool.h"
 #include "util/debug_util.h"
 
 namespace doris {
 
 class KeyCoderTest : public testing::Test {
 public:
-    KeyCoderTest() : _pool() {}
-    virtual ~KeyCoderTest() {}
-
-private:
-    MemPool _pool;
+    KeyCoderTest() = default;
+    virtual ~KeyCoderTest() = default;

Review Comment:
   warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' 
[modernize-use-override]
   
   ```suggestion
       ~KeyCoderTest() override = default;
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
     EXPECT_EQ(compare_row(left, right_eq), 0);
 
     RowCursor right_lt;
     res = right_lt.init(tablet_schema);
     Slice r_char_lt("well");
     int32_t r_int_lt = 11;
-    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_mem_pool.get());
-    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_mem_pool.get());
+    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_arena.get());
+    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_arena.get());
                ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
     EXPECT_EQ(compare_row(left, right_eq), 0);
 
     RowCursor right_lt;
     res = right_lt.init(tablet_schema);
     Slice r_char_lt("well");
     int32_t r_int_lt = 11;
-    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_mem_pool.get());
-    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_mem_pool.get());
+    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_arena.get());
                ^
   ```
   



##########
be/test/olap/rowid_conversion_test.cpp:
##########
@@ -45,21 +45,17 @@ class TestRowIdConversion : public 
testing::TestWithParam<std::tuple<KeysType, b
         char buffer[MAX_PATH_LEN];
         EXPECT_NE(getcwd(buffer, MAX_PATH_LEN), nullptr);
         absolute_dir = std::string(buffer) + kTestDir;
-
-        if (FileUtils::check_exist(absolute_dir)) {
-            EXPECT_TRUE(FileUtils::remove_all(absolute_dir).ok());
-        }
-        EXPECT_TRUE(FileUtils::create_dir(absolute_dir).ok());
-        EXPECT_TRUE(FileUtils::create_dir(absolute_dir + "/tablet_path").ok());
+        
EXPECT_TRUE(io::global_local_filesystem()->delete_and_create_directory(absolute_dir).ok());
+        EXPECT_TRUE(io::global_local_filesystem()
+                            ->create_directory(absolute_dir + "/tablet_path")
+                            .ok());
         doris::EngineOptions options;
         k_engine = new StorageEngine(options);
         StorageEngine::_s_instance = k_engine;

Review Comment:
   warning: '_s_instance' is a private member of 'doris::StorageEngine' 
[clang-diagnostic-error]
   ```cpp
           StorageEngine::_s_instance = k_engine;
                          ^
   ```
   **be/src/olap/storage_engine.h:323:** declared private here
   ```cpp
   _is_all_cluster_id_exist;
                                                        ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
     EXPECT_EQ(compare_row(left, right_eq), 0);
 
     RowCursor right_lt;
     res = right_lt.init(tablet_schema);
     Slice r_char_lt("well");
     int32_t r_int_lt = 11;
-    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_mem_pool.get());
-    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_mem_pool.get());
+    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_arena.get());
+    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_arena.get());
     EXPECT_LT(compare_row(left, right_lt), 0);
 
     RowCursor right_gt;
     res = right_gt.init(tablet_schema);
     Slice r_char_gt("good");
     int32_t r_int_gt = 10;
-    right_gt.set_field_content(0, reinterpret_cast<char*>(&r_char_gt), 
_mem_pool.get());
-    right_gt.set_field_content(1, reinterpret_cast<char*>(&r_int_gt), 
_mem_pool.get());
+    right_gt.set_field_content(0, reinterpret_cast<char*>(&r_char_gt), 
_arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       right_gt.set_field_content(0, reinterpret_cast<char*>(&r_char_gt), 
_arena.get());
                ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
     EXPECT_EQ(compare_row(left, right_eq), 0);
 
     RowCursor right_lt;
     res = right_lt.init(tablet_schema);
     Slice r_char_lt("well");
     int32_t r_int_lt = 11;
-    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_mem_pool.get());
-    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_mem_pool.get());
+    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_arena.get());
+    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_arena.get());
     EXPECT_LT(compare_row(left, right_lt), 0);
 
     RowCursor right_gt;
     res = right_gt.init(tablet_schema);
     Slice r_char_gt("good");
     int32_t r_int_gt = 10;
-    right_gt.set_field_content(0, reinterpret_cast<char*>(&r_char_gt), 
_mem_pool.get());
-    right_gt.set_field_content(1, reinterpret_cast<char*>(&r_int_gt), 
_mem_pool.get());
+    right_gt.set_field_content(0, reinterpret_cast<char*>(&r_char_gt), 
_arena.get());
+    right_gt.set_field_content(1, reinterpret_cast<char*>(&r_int_gt), 
_arena.get());

Review Comment:
   warning: no member named 'set_field_content' in 'doris::RowCursor' 
[clang-diagnostic-error]
   ```cpp
       right_gt.set_field_content(1, reinterpret_cast<char*>(&r_int_gt), 
_arena.get());
                ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
     EXPECT_EQ(compare_row(left, right_eq), 0);
 
     RowCursor right_lt;
     res = right_lt.init(tablet_schema);
     Slice r_char_lt("well");
     int32_t r_int_lt = 11;
-    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_mem_pool.get());
-    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_mem_pool.get());
+    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_arena.get());
+    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_arena.get());
     EXPECT_LT(compare_row(left, right_lt), 0);

Review Comment:
   warning: use of undeclared identifier 'compare_row' [clang-diagnostic-error]
   ```cpp
       EXPECT_LT(compare_row(left, right_lt), 0);
                 ^
   ```
   



##########
be/test/olap/row_cursor_test.cpp:
##########
@@ -342,31 +341,31 @@
 
     Slice l_char("well");
     int32_t l_int = 10;
-    left.set_field_content(0, reinterpret_cast<char*>(&l_char), 
_mem_pool.get());
-    left.set_field_content(1, reinterpret_cast<char*>(&l_int), 
_mem_pool.get());
+    left.set_field_content(0, reinterpret_cast<char*>(&l_char), _arena.get());
+    left.set_field_content(1, reinterpret_cast<char*>(&l_int), _arena.get());
 
     RowCursor right_eq;
     res = right_eq.init(tablet_schema);
     Slice r_char_eq("well");
     int32_t r_int_eq = 10;
-    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_mem_pool.get());
-    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_mem_pool.get());
+    right_eq.set_field_content(0, reinterpret_cast<char*>(&r_char_eq), 
_arena.get());
+    right_eq.set_field_content(1, reinterpret_cast<char*>(&r_int_eq), 
_arena.get());
     EXPECT_EQ(compare_row(left, right_eq), 0);
 
     RowCursor right_lt;
     res = right_lt.init(tablet_schema);
     Slice r_char_lt("well");
     int32_t r_int_lt = 11;
-    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_mem_pool.get());
-    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_mem_pool.get());
+    right_lt.set_field_content(0, reinterpret_cast<char*>(&r_char_lt), 
_arena.get());
+    right_lt.set_field_content(1, reinterpret_cast<char*>(&r_int_lt), 
_arena.get());
     EXPECT_LT(compare_row(left, right_lt), 0);
 
     RowCursor right_gt;
     res = right_gt.init(tablet_schema);
     Slice r_char_gt("good");
     int32_t r_int_gt = 10;
-    right_gt.set_field_content(0, reinterpret_cast<char*>(&r_char_gt), 
_mem_pool.get());
-    right_gt.set_field_content(1, reinterpret_cast<char*>(&r_int_gt), 
_mem_pool.get());
+    right_gt.set_field_content(0, reinterpret_cast<char*>(&r_char_gt), 
_arena.get());
+    right_gt.set_field_content(1, reinterpret_cast<char*>(&r_int_gt), 
_arena.get());
     EXPECT_GT(compare_row(left, right_gt), 0);

Review Comment:
   warning: use of undeclared identifier 'compare_row' [clang-diagnostic-error]
   ```cpp
       EXPECT_GT(compare_row(left, right_gt), 0);
                 ^
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to