Skip to content

Conversation

@sduzh
Copy link
Contributor

@sduzh sduzh commented Nov 26, 2020

Proposed changes

Clang-format all c++ source files. (#4918)

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] If this change need a document change, I have updated the document
  • [] Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@yangzhg
Copy link
Member

yangzhg commented Nov 27, 2020

Include guard still has many format such as #pragma once, #ifndef DORIS_BE_SRC_xxxx #ifndef OLAP_xxx
We should take this opportunity to unify the include guard format

@sduzh
Copy link
Contributor Author

sduzh commented Nov 27, 2020

Include guard still has many format such as #pragma once, #ifndef DORIS_BE_SRC_xxxx #ifndef OLAP_xxx
We should take this opportunity to unify the include guard format

Clang-format does not have this feature now.

kangkaisen
kangkaisen previously approved these changes Nov 27, 2020
Copy link
Contributor

@kangkaisen kangkaisen left a comment

Choose a reason for hiding this comment

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

+1

@kangkaisen kangkaisen added approved Indicates a PR has been approved by one committer. kind/refactor Issues or PRs to refactor code labels Nov 27, 2020
@sduzh
Copy link
Contributor Author

sduzh commented Nov 28, 2020

Failed to build the fe module in master branch of commit 4c63dc0. cc @morningman

@morningman
Copy link
Contributor

morningman commented Nov 28, 2020

Still has compilation error like:

812 /home/disk1/cmy/git/doris/core/be/src/olap/rowset/segment_v2/options.h:27:14: error: ‘size_t’ does not name a type; did you mean ‘__size_t’?
813  static const size_t DEFAULT_PAGE_SIZE = 1024 * 1024; // default size: 1M
814               ^~~~~~
815               __size_t
816 /home/disk1/cmy/git/doris/core/be/src/olap/rowset/segment_v2/options.h:30:5: error: ‘size_t’ does not name a type; did you mean ‘__size_t’?
817      size_t data_page_size = DEFAULT_PAGE_SIZE;
818      ^~~~~~
819      __size_t
820 /home/disk1/cmy/git/doris/core/be/src/olap/rowset/segment_v2/options.h:32:5: error: ‘size_t’ does not name a type; did you mean ‘__size_t’?
821      size_t dict_page_size = DEFAULT_PAGE_SIZE;
822      ^~~~~~
823      __size_t

and

826 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp:59:25: error: ‘struct doris::segment_v2::PageBuilderOptions’ has no member named ‘data_page_size’
827          builder_options.data_page_size = 256 * 1024;
828                          ^~~~~~~~~~~~~~
829 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp: In member function ‘virtual void doris::RlePageTest_TestRleInt32BlockEncoderSize_Test::TestBody()’:
830 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp:161:21: error: ‘struct doris::segment_v2::PageBuilderOptions’ has no member named ‘data_page_size’
831      builder_options.data_page_size = 256 * 1024;
832                      ^~~~~~~~~~~~~~
833 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp: In member function ‘virtual void doris::RlePageTest_TestRleBoolBlockEncoderSize_Test::TestBody()’:
834 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp:197:21: error: ‘struct doris::segment_v2::PageBuilderOptions’ has no member named ‘data_page_size’
835      builder_options.data_page_size = 256 * 1024;
836                      ^~~~~~~~~~~~~~

Please run sh run-be-ut.sh --run in your local env.

And you need to rebase the master to solve a compilation error in FE.

@sduzh
Copy link
Contributor Author

sduzh commented Nov 28, 2020

Still has compilation error like:

812 /home/disk1/cmy/git/doris/core/be/src/olap/rowset/segment_v2/options.h:27:14: error: ‘size_t’ does not name a type; did you mean ‘__size_t’?
813  static const size_t DEFAULT_PAGE_SIZE = 1024 * 1024; // default size: 1M
814               ^~~~~~
815               __size_t
816 /home/disk1/cmy/git/doris/core/be/src/olap/rowset/segment_v2/options.h:30:5: error: ‘size_t’ does not name a type; did you mean ‘__size_t’?
817      size_t data_page_size = DEFAULT_PAGE_SIZE;
818      ^~~~~~
819      __size_t
820 /home/disk1/cmy/git/doris/core/be/src/olap/rowset/segment_v2/options.h:32:5: error: ‘size_t’ does not name a type; did you mean ‘__size_t’?
821      size_t dict_page_size = DEFAULT_PAGE_SIZE;
822      ^~~~~~
823      __size_t

and

826 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp:59:25: error: ‘struct doris::segment_v2::PageBuilderOptions’ has no member named ‘data_page_size’
827          builder_options.data_page_size = 256 * 1024;
828                          ^~~~~~~~~~~~~~
829 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp: In member function ‘virtual void doris::RlePageTest_TestRleInt32BlockEncoderSize_Test::TestBody()’:
830 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp:161:21: error: ‘struct doris::segment_v2::PageBuilderOptions’ has no member named ‘data_page_size’
831      builder_options.data_page_size = 256 * 1024;
832                      ^~~~~~~~~~~~~~
833 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp: In member function ‘virtual void doris::RlePageTest_TestRleBoolBlockEncoderSize_Test::TestBody()’:
834 /home/disk1/cmy/git/doris/core/be/test/olap/rowset/segment_v2/rle_page_test.cpp:197:21: error: ‘struct doris::segment_v2::PageBuilderOptions’ has no member named ‘data_page_size’
835      builder_options.data_page_size = 256 * 1024;
836                      ^~~~~~~~~~~~~~

Please run sh run-be-ut.sh --run in your local env.

And you need to rebase the master to solve a compilation error in FE.

All fixed.

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@sduzh sduzh requested a review from kangkaisen November 28, 2020 10:36
@morningman morningman merged commit 6fedf58 into apache:master Nov 28, 2020
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/refactor Issues or PRs to refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants