You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "BiteTheDDDDt (via GitHub)" <gi...@apache.org> on 2023/04/09 13:34:42 UTC

[GitHub] [doris] BiteTheDDDDt opened a new pull request, #18500: [Chore](storage) change FieldType to enum class

BiteTheDDDDt opened a new pull request, #18500:
URL: https://github.com/apache/doris/pull/18500

   # Proposed changes
   
   change FieldType to enum class
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] BiteTheDDDDt commented on pull request #18500: [Chore](storage) change FieldType to enum class

Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on PR #18500:
URL: https://github.com/apache/doris/pull/18500#issuecomment-1501128927

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on a diff in pull request #18500: [Chore](storage) change FieldType to enum class

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #18500:
URL: https://github.com/apache/doris/pull/18500#discussion_r1161288437


##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -72,8 +72,9 @@
         vectorized::Arena pool;
         size_t size = 3;
         std::unique_ptr<ColumnVectorBatch> cvb;
-        ColumnVectorBatch::create(size, true, get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR),
-                                  nullptr, &cvb);
+        ColumnVectorBatch::create(size, true,

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           ColumnVectorBatch::create(size, true,
           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp:
##########
@@ -95,7 +95,7 @@
 
         //check values
         vectorized::Arena pool;
-        auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+        auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
         size_t size = slices.size();
         std::unique_ptr<ColumnVectorBatch> cvb;
         ColumnVectorBatch::create(size, false, type_info, nullptr, &cvb);

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           ColumnVectorBatch::create(size, false, type_info, nullptr, &cvb);
           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -88,8 +89,8 @@
         EXPECT_EQ("Doris", value[2].to_string());
 
         std::unique_ptr<ColumnVectorBatch> cvb2;
-        ColumnVectorBatch::create(1, true, get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR), nullptr,
-                                  &cvb2);
+        ColumnVectorBatch::create(1, true, get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR),
+                                  nullptr, &cvb2);
         ColumnBlock block2(cvb2.get(), &pool);
         ColumnBlockView column_block_view2(&block2);

Review Comment:
   warning: use of undeclared identifier 'ColumnBlockView'; did you mean 'column_block_view'? [clang-diagnostic-error]
   
   ```suggestion
           column_block_view column_block_view2(&block2);
   ```
   **be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:78:** 'column_block_view' declared here
   ```cpp
           ColumnBlockView column_block_view(&block);
                           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp:
##########
@@ -75,7 +75,7 @@ class BinaryPrefixPageTest : public testing::Test {
 
         //check values
         vectorized::Arena pool;
-        auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+        auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
         size_t size = slices.size();
         std::unique_ptr<ColumnVectorBatch> cvb;

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           std::unique_ptr<ColumnVectorBatch> cvb;
                           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -88,8 +89,8 @@
         EXPECT_EQ("Doris", value[2].to_string());
 
         std::unique_ptr<ColumnVectorBatch> cvb2;
-        ColumnVectorBatch::create(1, true, get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR), nullptr,
-                                  &cvb2);
+        ColumnVectorBatch::create(1, true, get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR),
+                                  nullptr, &cvb2);
         ColumnBlock block2(cvb2.get(), &pool);

Review Comment:
   warning: unknown type name 'ColumnBlock' [clang-diagnostic-error]
   ```cpp
           ColumnBlock block2(cvb2.get(), &pool);
           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -72,8 +72,9 @@ class BinaryPlainPageTest : public testing::Test {
         vectorized::Arena pool;
         size_t size = 3;
         std::unique_ptr<ColumnVectorBatch> cvb;

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           std::unique_ptr<ColumnVectorBatch> cvb;
                           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -88,8 +89,8 @@
         EXPECT_EQ("Doris", value[2].to_string());
 
         std::unique_ptr<ColumnVectorBatch> cvb2;
-        ColumnVectorBatch::create(1, true, get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR), nullptr,
-                                  &cvb2);
+        ColumnVectorBatch::create(1, true, get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR),

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           ColumnVectorBatch::create(1, true, get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR),
           ^
   ```
   



##########
be/test/olap/tablet_schema_helper.cpp:
##########
@@ -24,7 +24,7 @@
     TabletColumn column;
     column._unique_id = id;
     column._col_name = std::to_string(id);

Review Comment:
   warning: '_col_name' is a private member of 'doris::TabletColumn' [clang-diagnostic-error]
   ```cpp
       column._col_name = std::to_string(id);
              ^
   ```
   **be/src/olap/tablet_schema.h:105:** declared private here
   ```cpp
       std::string _col_name;
                   ^
   ```
   



##########
be/test/olap/tablet_schema_helper.cpp:
##########
@@ -24,7 +24,7 @@
     TabletColumn column;
     column._unique_id = id;
     column._col_name = std::to_string(id);
-    column._type = OLAP_FIELD_TYPE_INT;
+    column._type = FieldType::OLAP_FIELD_TYPE_INT;
     column._is_key = true;
     column._is_nullable = is_nullable;
     column._length = 4;

Review Comment:
   warning: '_length' is a private member of 'doris::TabletColumn' [clang-diagnostic-error]
   ```cpp
       column._length = 4;
              ^
   ```
   **be/src/olap/tablet_schema.h:118:** declared private here
   ```cpp
       int32_t _length;
               ^
   ```
   



##########
be/test/olap/tablet_schema_helper.cpp:
##########
@@ -24,7 +24,7 @@
     TabletColumn column;
     column._unique_id = id;
     column._col_name = std::to_string(id);
-    column._type = OLAP_FIELD_TYPE_INT;
+    column._type = FieldType::OLAP_FIELD_TYPE_INT;
     column._is_key = true;
     column._is_nullable = is_nullable;

Review Comment:
   warning: '_is_nullable' is a private member of 'doris::TabletColumn' [clang-diagnostic-error]
   ```cpp
       column._is_nullable = is_nullable;
              ^
   ```
   **be/src/olap/tablet_schema.h:109:** declared private here
   ```cpp
       bool _is_nullable = false;
            ^
   ```
   



##########
be/test/olap/tablet_schema_helper.cpp:
##########
@@ -24,7 +24,7 @@
     TabletColumn column;
     column._unique_id = id;
     column._col_name = std::to_string(id);
-    column._type = OLAP_FIELD_TYPE_INT;
+    column._type = FieldType::OLAP_FIELD_TYPE_INT;
     column._is_key = true;

Review Comment:
   warning: '_is_key' is a private member of 'doris::TabletColumn' [clang-diagnostic-error]
   ```cpp
       column._is_key = true;
              ^
   ```
   **be/src/olap/tablet_schema.h:107:** declared private here
   ```cpp
       bool _is_key = false;
            ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -72,8 +72,9 @@
         vectorized::Arena pool;
         size_t size = 3;
         std::unique_ptr<ColumnVectorBatch> cvb;
-        ColumnVectorBatch::create(size, true, get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR),
-                                  nullptr, &cvb);
+        ColumnVectorBatch::create(size, true,
+                                  get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR), nullptr,
+                                  &cvb);
         ColumnBlock block(cvb.get(), &pool);

Review Comment:
   warning: unknown type name 'ColumnBlock' [clang-diagnostic-error]
   ```cpp
           ColumnBlock block(cvb.get(), &pool);
           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp:
##########
@@ -199,7 +200,7 @@
 
             //check values
             vectorized::Arena pool;
-            auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+            auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
             std::unique_ptr<ColumnVectorBatch> cvb;

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
               std::unique_ptr<ColumnVectorBatch> cvb;
                               ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -88,8 +89,8 @@
         EXPECT_EQ("Doris", value[2].to_string());
 
         std::unique_ptr<ColumnVectorBatch> cvb2;

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           std::unique_ptr<ColumnVectorBatch> cvb2;
                           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp:
##########
@@ -199,7 +200,7 @@
 
             //check values
             vectorized::Arena pool;
-            auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+            auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
             std::unique_ptr<ColumnVectorBatch> cvb;
             ColumnVectorBatch::create(1, false, type_info, nullptr, &cvb);

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
               ColumnVectorBatch::create(1, false, type_info, nullptr, &cvb);
               ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp:
##########
@@ -199,7 +200,7 @@
 
             //check values
             vectorized::Arena pool;
-            auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+            auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
             std::unique_ptr<ColumnVectorBatch> cvb;
             ColumnVectorBatch::create(1, false, type_info, nullptr, &cvb);
             ColumnBlock column_block(cvb.get(), &pool);

Review Comment:
   warning: unknown type name 'ColumnBlock' [clang-diagnostic-error]
   ```cpp
               ColumnBlock column_block(cvb.get(), &pool);
               ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp:
##########
@@ -75,7 +75,7 @@
 
         //check values
         vectorized::Arena pool;
-        auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+        auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
         size_t size = slices.size();
         std::unique_ptr<ColumnVectorBatch> cvb;
         ColumnVectorBatch::create(size, false, type_info, nullptr, &cvb);

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           ColumnVectorBatch::create(size, false, type_info, nullptr, &cvb);
           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp:
##########
@@ -96,7 +96,7 @@
         while (true) {
             //check values
             vectorized::Arena pool;
-            auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+            auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
             std::unique_ptr<ColumnVectorBatch> cvb;
             size_t size = 6;
             ColumnVectorBatch::create(size, false, type_info, nullptr, &cvb);

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
               ColumnVectorBatch::create(size, false, type_info, nullptr, &cvb);
               ^
   ```
   



##########
be/test/olap/rowset/segment_v2/frame_of_reference_page_test.cpp:
##########
@@ -108,10 +108,11 @@ TEST_F(FrameOfReferencePageTest, TestInt32BlockEncoderRandom) {
         ints.get()[i] = random();
     }
 
-    test_encode_decode_page_template<OLAP_FIELD_TYPE_INT,
-                                     segment_v2::FrameOfReferencePageBuilder<OLAP_FIELD_TYPE_INT>,
-                                     segment_v2::FrameOfReferencePageDecoder<OLAP_FIELD_TYPE_INT>>(
-            ints.get(), size);
+    test_encode_decode_page_template<

Review Comment:
   warning: no matching member function for call to 'test_encode_decode_page_template' [clang-diagnostic-error]
   ```cpp
       test_encode_decode_page_template<
       ^
   ```
   



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei merged pull request #18500: [Chore](storage) change FieldType to enum class

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #18500:
URL: https://github.com/apache/doris/pull/18500


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on a diff in pull request #18500: [Chore](storage) change FieldType to enum class

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #18500:
URL: https://github.com/apache/doris/pull/18500#discussion_r1161288456


##########
be/test/olap/tablet_schema_helper.cpp:
##########
@@ -24,7 +24,7 @@
     TabletColumn column;
     column._unique_id = id;
     column._col_name = std::to_string(id);
-    column._type = OLAP_FIELD_TYPE_INT;
+    column._type = FieldType::OLAP_FIELD_TYPE_INT;

Review Comment:
   warning: '_type' is a private member of 'doris::TabletColumn' [clang-diagnostic-error]
   ```cpp
       column._type = FieldType::OLAP_FIELD_TYPE_INT;
              ^
   ```
   **be/src/olap/tablet_schema.h:106:** declared private here
   ```cpp
       FieldType _type;
                 ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_plain_page_test.cpp:
##########
@@ -72,8 +72,9 @@
         vectorized::Arena pool;
         size_t size = 3;
         std::unique_ptr<ColumnVectorBatch> cvb;
-        ColumnVectorBatch::create(size, true, get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR),
-                                  nullptr, &cvb);
+        ColumnVectorBatch::create(size, true,
+                                  get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR), nullptr,
+                                  &cvb);
         ColumnBlock block(cvb.get(), &pool);
         ColumnBlockView column_block_view(&block);

Review Comment:
   warning: unknown type name 'ColumnBlockView' [clang-diagnostic-error]
   ```cpp
           ColumnBlockView column_block_view(&block);
           ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_dict_page_test.cpp:
##########
@@ -95,7 +95,7 @@ class BinaryDictPageTest : public testing::Test {
 
         //check values
         vectorized::Arena pool;
-        auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+        auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
         size_t size = slices.size();
         std::unique_ptr<ColumnVectorBatch> cvb;

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
           std::unique_ptr<ColumnVectorBatch> cvb;
                           ^
   ```
   



##########
be/test/olap/tablet_schema_helper.cpp:
##########
@@ -40,7 +40,7 @@
     TabletColumn column;
     column._unique_id = id;

Review Comment:
   warning: '_unique_id' is a private member of 'doris::TabletColumn' [clang-diagnostic-error]
   ```cpp
       column._unique_id = id;
              ^
   ```
   **be/src/olap/tablet_schema.h:104:** declared private here
   ```cpp
       int32_t _unique_id;
               ^
   ```
   



##########
be/test/olap/tablet_schema_helper.cpp:
##########
@@ -24,7 +24,7 @@ TabletColumn create_int_key(int32_t id, bool is_nullable, bool is_bf_column,
     TabletColumn column;
     column._unique_id = id;

Review Comment:
   warning: '_unique_id' is a private member of 'doris::TabletColumn' [clang-diagnostic-error]
   ```cpp
       column._unique_id = id;
              ^
   ```
   **be/src/olap/tablet_schema.h:104:** declared private here
   ```cpp
       int32_t _unique_id;
               ^
   ```
   



##########
be/test/olap/rowset/segment_v2/binary_prefix_page_test.cpp:
##########
@@ -96,7 +96,7 @@
         while (true) {
             //check values
             vectorized::Arena pool;
-            auto type_info = get_scalar_type_info(OLAP_FIELD_TYPE_VARCHAR);
+            auto type_info = get_scalar_type_info(FieldType::OLAP_FIELD_TYPE_VARCHAR);
             std::unique_ptr<ColumnVectorBatch> cvb;

Review Comment:
   warning: use of undeclared identifier 'ColumnVectorBatch' [clang-diagnostic-error]
   ```cpp
               std::unique_ptr<ColumnVectorBatch> cvb;
                               ^
   ```
   



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org