Skip to content

Commit

Permalink
[refactor][style] Use clang-format to sort includes (#9483)
Browse files Browse the repository at this point in the history
  • Loading branch information
adonis0147 authored May 10, 2022
1 parent ce926a7 commit 718a51a
Show file tree
Hide file tree
Showing 125 changed files with 178 additions and 177 deletions.
2 changes: 0 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ ReflowComments: false
SortUsingDeclarations: false
SpacesBeforeTrailingComments: 1
SpaceBeforeCpp11BracedList: true
#ignore include sort cause adjustment order may leads to compilation failure
SortIncludes: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ derby.log
dependency-reduced-pom.xml
package-lock.json
yarn.lock
ut_dir

# ignore all sub `/bin` and `/build` directory
**/build/
Expand Down
3 changes: 1 addition & 2 deletions be/src/common/configbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
#pragma once

#include <cstdint>

#include <functional>
#include <map>
#include <mutex>
#include <string>
#include <vector>
#include <functional>

namespace doris {
class Status;
Expand Down
2 changes: 1 addition & 1 deletion be/src/common/signal_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@

#pragma once

#include <boost/stacktrace.hpp>
#include <glog/logging.h>
#include <gutil/macros.h>

#include <boost/stacktrace.hpp>
#include <csignal>
#include <ctime>
#ifdef HAVE_UCONTEXT_H
Expand Down
3 changes: 2 additions & 1 deletion be/src/common/status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

#include "common/status.h"

#include <boost/stacktrace.hpp>
#include <glog/logging.h>

#include <boost/stacktrace.hpp>

#include "gutil/strings/fastmem.h" // for memcpy_inlined
namespace doris {

Expand Down
6 changes: 3 additions & 3 deletions be/src/common/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#pragma once

#include <fmt/format.h>
#include <glog/logging.h>

#include <boost/stacktrace.hpp>
#include <iostream>
#include <string>
#include <vector>

#include <boost/stacktrace.hpp>
#include <glog/logging.h>

#include "common/compiler_util.h"
#include "common/logging.h"
#include "gen_cpp/Status_types.h" // for TStatus
Expand Down
3 changes: 2 additions & 1 deletion be/src/env/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
// specific language governing permissions and limitations
// under the License.

#include "common/config.h"
#include "env/env.h"

#include "common/config.h"
#include "env/env_posix.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/env/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "common/status.h"
#include "gen_cpp/AgentService_types.h"
#include "gen_cpp/olap_file.pb.h"
#include "gen_cpp/Types_types.h"
#include "gen_cpp/olap_file.pb.h"
#include "util/slice.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/base_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#include "common/status.h"
#include "exprs/expr.h"
#include "vec/exprs/vexpr.h"
#include "runtime/tuple.h"
#include "util/runtime_profile.h"
#include "vec/exprs/vexpr.h"

namespace doris {

Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/broker_scan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <sstream>

#include "common/object_pool.h"
#include "vec/exec/vbroker_scanner.h"
#include "exec/json_scanner.h"
#include "exec/orc_scanner.h"
#include "exec/parquet_scanner.h"
Expand All @@ -32,6 +31,7 @@
#include "runtime/runtime_state.h"
#include "util/runtime_profile.h"
#include "util/thread.h"
#include "vec/exec/vbroker_scanner.h"

namespace doris {

Expand Down
3 changes: 2 additions & 1 deletion be/src/exec/broker_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
#include "exec/broker_scanner.h"

#include <fmt/format.h>

#include <iostream>
#include <sstream>

#include "common/consts.h"
#include "exec/broker_reader.h"
#include "exec/buffered_reader.h"
#include "exec/decompressor.h"
Expand All @@ -38,7 +40,6 @@
#include "runtime/stream_load/stream_load_pipe.h"
#include "runtime/tuple.h"
#include "util/utf8_check.h"
#include "common/consts.h"

namespace doris {

Expand Down
3 changes: 1 addition & 2 deletions be/src/exec/data_sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
#include "runtime/result_file_sink.h"
#include "runtime/result_sink.h"
#include "runtime/runtime_state.h"

#include "vec/sink/result_sink.h"
#include "vec/sink/vdata_stream_sender.h"
#include "vec/sink/vmysql_table_sink.h"
#include "vec/sink/vmysql_table_writer.h"
#include "vec/sink/vtablet_sink.h"
#include "vec/sink/vmysql_table_sink.h"

namespace doris {

Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/exec_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
#include "vec/exec/vaggregation_node.h"
#include "vec/exec/vanalytic_eval_node.h"
#include "vec/exec/vassert_num_rows_node.h"
#include "vec/exec/vbroker_scan_node.h"
#include "vec/exec/vcross_join_node.h"
#include "vec/exec/vempty_set_node.h"
#include "vec/exec/ves_http_scan_node.h"
Expand All @@ -82,7 +83,6 @@
#include "vec/exec/vsort_node.h"
#include "vec/exec/vtable_function_node.h"
#include "vec/exec/vunion_node.h"
#include "vec/exec/vbroker_scan_node.h"
#include "vec/exprs/vexpr.h"

namespace doris {
Expand Down
3 changes: 2 additions & 1 deletion be/src/exec/json_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@

#include "exec/json_scanner.h"

#include <algorithm>
#include <fmt/format.h>

#include <algorithm>

#include "env/env.h"
#include "exec/broker_reader.h"
#include "exec/buffered_reader.h"
Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/olap_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
#pragma once

#include <stdint.h>
#include <variant>

#include <boost/lexical_cast.hpp>
#include <map>
#include <sstream>
#include <string>
#include <variant>

#include "common/logging.h"
#include "exec/olap_utils.h"
Expand Down
2 changes: 1 addition & 1 deletion be/src/exec/olap_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#include "gen_cpp/PlanNodes_types.h"
#include "olap/delete_handler.h"
#include "olap/olap_cond.h"
#include "olap/tuple_reader.h"
#include "olap/rowset/column_data.h"
#include "olap/storage_engine.h"
#include "olap/tuple_reader.h"
#include "runtime/descriptors.h"
#include "runtime/tuple.h"
#include "runtime/vectorized_row_batch.h"
Expand Down
1 change: 1 addition & 0 deletions be/src/exec/schema_scanner/schema_statistics_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// under the License.

#include "exec/schema_scanner/schema_statistics_scanner.h"

#include "runtime/primitive_type.h"
#include "runtime/string_value.h"

Expand Down
1 change: 0 additions & 1 deletion be/src/exec/tablet_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "runtime/descriptors.h"
#include "runtime/raw_value.h"
#include "runtime/tuple.h"

#include "vec/core/block.h"

namespace doris {
Expand Down
1 change: 0 additions & 1 deletion be/src/exec/tablet_sink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "util/threadpool.h"
#include "util/time.h"
#include "util/uid_util.h"

#include "vec/core/block.h"
#include "vec/sink/vtablet_sink.h"

Expand Down
4 changes: 2 additions & 2 deletions be/src/exprs/agg_fn_evaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
#include <string>
#include <vector>

#include "gen_cpp/Exprs_types.h"
#include "udf/udf.h"
#include "exprs/expr_context.h"
#include "exprs/hybrid_map.h"
#include "gen_cpp/Exprs_types.h"
#include "runtime/descriptors.h"
#include "runtime/runtime_state.h"
#include "runtime/tuple.h"
#include "udf/udf.h"
#include "util/hash_util.hpp"

namespace doris {
Expand Down
1 change: 1 addition & 0 deletions be/src/exprs/hll_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include <string>

#include "udf/udf.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/http/action/stream_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <rapidjson/prettywriter.h>
#include <thrift/protocol/TDebugProtocol.h>

#include "common/consts.h"
#include "common/logging.h"
#include "common/utils.h"
#include "gen_cpp/FrontendService.h"
Expand Down Expand Up @@ -59,7 +60,6 @@
#include "util/thrift_rpc_helper.h"
#include "util/time.h"
#include "util/uid_util.h"
#include "common/consts.h"

namespace doris {

Expand Down
1 change: 1 addition & 0 deletions be/src/http/action/stream_load_2pc.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#pragma once

#include <string>

#include "http/http_handler.h"

namespace doris {
Expand Down
3 changes: 2 additions & 1 deletion be/src/http/action/tablets_distribution_action.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@

#pragma once

#include <string>

#include "http/http_handler.h"
#include "util/easy_json.h"
#include <string>

namespace doris {

Expand Down
3 changes: 2 additions & 1 deletion be/src/http/http_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@

#pragma once

#include <stdint.h>
#include <stddef.h>
#include <stdint.h>

#include <ostream>

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/bloom_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#include <math.h>

#include <string>
#include <sstream>
#include <string>

#include "olap/olap_define.h"
#include "olap/utils.h"
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/bloom_filter_predicate.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
#include "olap/field.h"
#include "runtime/string_value.hpp"
#include "runtime/vectorized_row_batch.h"
#include "vec/columns/column_dictionary.h"
#include "vec/columns/column_nullable.h"
#include "vec/columns/column_vector.h"
#include "vec/columns/predicate_column.h"
#include "vec/utils/util.hpp"
#include "vec/columns/column_dictionary.h"

namespace doris {

Expand Down
3 changes: 1 addition & 2 deletions be/src/olap/data_dir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <sys/file.h>
#include <sys/statfs.h>
#include <utime.h>
#include <atomic>

#include <atomic>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/split.hpp>
Expand All @@ -47,7 +47,6 @@
#include "util/file_utils.h"
#include "util/storage_backend.h"
#include "util/storage_backend_mgr.h"

#include "util/string_util.h"

using strings::Substitute;
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/fs/fs_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include "common/status.h"
#include "gen_cpp/AgentService_types.h"
#include "gen_cpp/olap_file.pb.h"
#include "gen_cpp/Types_types.h"
#include "gen_cpp/olap_file.pb.h"
#include "olap/fs/block_manager.h"

namespace doris {
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/hll.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
#pragma once

#include <math.h>
#include <parallel_hashmap/phmap.h>
#include <stdio.h>

#include <map>
#include <set>
#include <string>
#include <parallel_hashmap/phmap.h>

#ifdef __x86_64__
#include <immintrin.h>
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/in_list_predicate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "runtime/string_value.hpp"
#include "runtime/vectorized_row_batch.h"
#include "vec/columns/column_dictionary.h"
#include "vec/columns/predicate_column.h"
#include "vec/columns/column_nullable.h"
#include "vec/columns/predicate_column.h"

namespace doris {

Expand Down
4 changes: 2 additions & 2 deletions be/src/olap/iterators.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <memory>

#include "common/status.h"
#include "olap/olap_common.h"
#include "olap/column_predicate.h"
#include "olap/block_column_predicate.h"
#include "olap/column_predicate.h"
#include "olap/olap_common.h"
#include "vec/core/block.h"

namespace doris {
Expand Down
4 changes: 2 additions & 2 deletions be/src/olap/memtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include "olap/schema.h"
#include "runtime/tuple.h"
#include "util/doris_metrics.h"
#include "vec/core/field.h"
#include "vec/aggregate_functions/aggregate_function_simple_factory.h"
#include "vec/aggregate_functions/aggregate_function_reader.h"
#include "vec/aggregate_functions/aggregate_function_simple_factory.h"
#include "vec/core/field.h"

namespace doris {

Expand Down
Loading

0 comments on commit 718a51a

Please sign in to comment.