diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/be/src/agent/agent_server.h b/be/src/agent/agent_server.h index 09144f3dee..3998a6b258 100644 --- a/be/src/agent/agent_server.h +++ b/be/src/agent/agent_server.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_AGENT_AGENT_SERVER_H -#define DORIS_BE_SRC_AGENT_AGENT_SERVER_H +#pragma once #include #include @@ -95,5 +94,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_AGENT_AGENT_SERVER_H diff --git a/be/src/agent/cgroups_mgr.h b/be/src/agent/cgroups_mgr.h index be5cc1c105..0ddbc4135f 100644 --- a/be/src/agent/cgroups_mgr.h +++ b/be/src/agent/cgroups_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_AGENT_CGROUPS_MGR_H -#define DORIS_BE_SRC_AGENT_CGROUPS_MGR_H +#pragma once #include #include @@ -168,4 +167,3 @@ private: static std::map _s_resource_cgroups; }; } // namespace doris -#endif diff --git a/be/src/agent/heartbeat_server.h b/be/src/agent/heartbeat_server.h index c492fc608c..3ca7ab8582 100644 --- a/be/src/agent/heartbeat_server.h +++ b/be/src/agent/heartbeat_server.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_AGENT_HEARTBEAT_SERVER_H -#define DORIS_BE_SRC_AGENT_HEARTBEAT_SERVER_H +#pragma once #include @@ -69,4 +68,3 @@ Status create_heartbeat_server(ExecEnv* exec_env, uint32_t heartbeat_server_port ThriftServer** heart_beat_server, uint32_t worker_thread_num, TMasterInfo* local_master_info); } // namespace doris -#endif // DORIS_BE_SRC_AGENT_HEARTBEAT_SERVER_H diff --git a/be/src/agent/task_worker_pool.h b/be/src/agent/task_worker_pool.h index 98895fe5c3..e398e95109 100644 --- a/be/src/agent/task_worker_pool.h +++ b/be/src/agent/task_worker_pool.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_TASK_WORKER_POOL_H -#define DORIS_BE_SRC_TASK_WORKER_POOL_H +#pragma once #include #include @@ -250,4 +249,3 @@ private: DISALLOW_COPY_AND_ASSIGN(TaskWorkerPool); }; // class TaskWorkerPool } // namespace doris -#endif // DORIS_BE_SRC_TASK_WORKER_POOL_H diff --git a/be/src/agent/topic_listener.h b/be/src/agent/topic_listener.h index 1d98c9834b..1ad66b31a6 100644 --- a/be/src/agent/topic_listener.h +++ b/be/src/agent/topic_listener.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_AGENT_TOPIC_LISTENER_H -#define DORIS_BE_SRC_AGENT_TOPIC_LISTENER_H +#pragma once #include "gen_cpp/AgentService_types.h" @@ -34,4 +33,3 @@ public: const TTopicUpdate& topic_update) = 0; }; } // namespace doris -#endif diff --git a/be/src/agent/topic_subscriber.h b/be/src/agent/topic_subscriber.h index 2c5d32feca..2d57f6927d 100644 --- a/be/src/agent/topic_subscriber.h +++ b/be/src/agent/topic_subscriber.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_AGENT_TOPIC_SUBSCRIBER_H -#define DORIS_BE_SRC_AGENT_TOPIC_SUBSCRIBER_H +#pragma once #include #include @@ -42,4 +41,3 @@ private: std::shared_mutex _listener_mtx; }; } // namespace doris -#endif diff --git a/be/src/agent/user_resource_listener.h b/be/src/agent/user_resource_listener.h index 31cb019764..525561f942 100644 --- a/be/src/agent/user_resource_listener.h +++ b/be/src/agent/user_resource_listener.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_AGENT_USER_RESOURCE_LISTENER_H -#define DORIS_BE_SRC_AGENT_USER_RESOURCE_LISTENER_H +#pragma once #include @@ -50,4 +49,3 @@ private: void update_users_resource(int64_t new_version); }; } // namespace doris -#endif diff --git a/be/src/agent/utils.h b/be/src/agent/utils.h index 1e1299ac2c..c22cb8064b 100644 --- a/be/src/agent/utils.h +++ b/be/src/agent/utils.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_AGENT_UTILS_H -#define DORIS_BE_SRC_AGENT_UTILS_H +#pragma once #include "common/status.h" #include "gen_cpp/FrontendService.h" @@ -75,4 +74,3 @@ private: }; // class AgentUtils } // namespace doris -#endif // DORIS_BE_SRC_AGENT_UTILS_H diff --git a/be/src/common/compiler_util.h b/be/src/common/compiler_util.h index 1482134e2f..4b684659ed 100644 --- a/be/src/common/compiler_util.h +++ b/be/src/common/compiler_util.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_COMMON_COMPILER_UTIL_H -#define DORIS_BE_SRC_COMMON_COMMON_COMPILER_UTIL_H +#pragma once // Compiler hint that this branch is likely or unlikely to // be taken. Take from the "What all programmers should know @@ -50,5 +49,3 @@ #define MAY_ALIAS __attribute__((__may_alias__)) #define ALIGN_CACHE_LINE __attribute__((aligned(CACHE_LINE_SIZE))) - -#endif diff --git a/be/src/common/config.h b/be/src/common/config.h index 1c4c91160e..d171af23ec 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_CONFIG_H -#define DORIS_BE_SRC_COMMON_CONFIG_H +#pragma once #include "configbase.h" @@ -740,5 +739,3 @@ CONF_Int32(object_pool_buffer_size, "100"); } // namespace config } // namespace doris - -#endif // DORIS_BE_SRC_COMMON_CONFIG_H diff --git a/be/src/common/configbase.h b/be/src/common/configbase.h index ff41c1bcbb..26a59de94a 100644 --- a/be/src/common/configbase.h +++ b/be/src/common/configbase.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_CONFIGBASE_H -#define DORIS_BE_SRC_COMMON_CONFIGBASE_H +#pragma once #include @@ -186,5 +185,3 @@ std::vector> get_config_info(); } // namespace config } // namespace doris - -#endif // DORIS_BE_SRC_COMMON_CONFIGBASE_H diff --git a/be/src/common/global_types.h b/be/src/common/global_types.h index 014c40218c..cac7bbc65b 100644 --- a/be/src/common/global_types.h +++ b/be/src/common/global_types.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_COMMON_GLOBAL_TYPES_H -#define DORIS_BE_SRC_COMMON_COMMON_GLOBAL_TYPES_H +#pragma once namespace doris { @@ -29,5 +28,3 @@ typedef int TableId; typedef int PlanNodeId; }; // namespace doris - -#endif diff --git a/be/src/common/object_pool.h b/be/src/common/object_pool.h index 865ee87314..253383657a 100644 --- a/be/src/common/object_pool.h +++ b/be/src/common/object_pool.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_COMMON_OBJECT_POOL_H -#define DORIS_BE_SRC_COMMON_COMMON_OBJECT_POOL_H +#pragma once #include #include @@ -83,5 +82,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/common/resource_tls.h b/be/src/common/resource_tls.h index ed72023599..deed16496d 100644 --- a/be/src/common/resource_tls.h +++ b/be/src/common/resource_tls.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_COMMON_RESOURCE_TLS_H -#define DORIS_BE_SRC_COMMON_COMMON_RESOURCE_TLS_H +#pragma once namespace doris { @@ -29,5 +28,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/common/signal_handler.h b/be/src/common/signal_handler.h index 591dc8b6ef..1c19acf15b 100644 --- a/be/src/common/signal_handler.h +++ b/be/src/common/signal_handler.h @@ -31,6 +31,8 @@ // // Implementation of InstallFailureSignalHandler(). +#pragma once + #include #include #include diff --git a/be/src/exec/analytic_eval_node.h b/be/src/exec/analytic_eval_node.h index b0a0aed5d6..39f198d5b0 100644 --- a/be/src/exec/analytic_eval_node.h +++ b/be/src/exec/analytic_eval_node.h @@ -18,12 +18,10 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/analytic-eval-node.h // and modified by Doris -#ifndef INF_DORIS_BE_SRC_EXEC_ANALYTIC_EVAL_NODE_H -#define INF_DORIS_BE_SRC_EXEC_ANALYTIC_EVAL_NODE_H +#pragma once #include "exec/exec_node.h" #include "exprs/expr.h" -//#include "exprs/expr_context.h" #include "runtime/buffered_block_mgr2.h" #include "runtime/buffered_tuple_stream2.h" #include "runtime/buffered_tuple_stream2.inline.h" @@ -333,5 +331,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/assert_num_rows_node.h b/be/src/exec/assert_num_rows_node.h index 2e766f07c4..2f055117d8 100644 --- a/be/src/exec/assert_num_rows_node.h +++ b/be/src/exec/assert_num_rows_node.h @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +#pragma once + #include "exec/exec_node.h" #include "gen_cpp/PlanNodes_types.h" diff --git a/be/src/exec/base_scanner.h b/be/src/exec/base_scanner.h index d98e39e663..3facf8155a 100644 --- a/be/src/exec/base_scanner.h +++ b/be/src/exec/base_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef BE_SRC_EXEC_BASE_SCANNER_H_ -#define BE_SRC_EXEC_BASE_SCANNER_H_ +#pragma once #include "common/status.h" #include "exprs/expr.h" @@ -132,5 +131,3 @@ private: }; } /* namespace doris */ - -#endif /* BE_SRC_EXEC_BASE_SCANNER_H_ */ diff --git a/be/src/exec/blocking_join_node.h b/be/src/exec/blocking_join_node.h index f3efe00eb2..75bbd13e83 100644 --- a/be/src/exec/blocking_join_node.h +++ b/be/src/exec/blocking_join_node.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/blocking-join-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_BLOCKING_JOIN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_BLOCKING_JOIN_NODE_H +#pragma once #include #include @@ -132,5 +131,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/broker_writer.h b/be/src/exec/broker_writer.h index 5858530387..9bb8c4c5a5 100644 --- a/be/src/exec/broker_writer.h +++ b/be/src/exec/broker_writer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXEC_BROKER_WRITER_H -#define DORIS_BE_SRC_EXEC_BROKER_WRITER_H +#pragma once #include @@ -63,5 +62,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_EXEC_BROKER_WRITER_H diff --git a/be/src/exec/cross_join_node.h b/be/src/exec/cross_join_node.h index 6200e05fad..698d397dc1 100644 --- a/be/src/exec/cross_join_node.h +++ b/be/src/exec/cross_join_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_CROSS_JOIN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_CROSS_JOIN_NODE_H +#pragma once #include #include @@ -73,5 +72,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/csv_scan_node.h b/be/src/exec/csv_scan_node.h index 07ba7b6fd9..e59c048ae3 100644 --- a/be/src/exec/csv_scan_node.h +++ b/be/src/exec/csv_scan_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H +#pragma once #include #include @@ -131,5 +130,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H diff --git a/be/src/exec/csv_scanner.h b/be/src/exec/csv_scanner.h index 98259c3813..d55139aaab 100644 --- a/be/src/exec/csv_scanner.h +++ b/be/src/exec/csv_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_CSV_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_CSV_SCANNER_H +#pragma once #include #include @@ -44,4 +43,3 @@ private: }; } // end namespace doris -#endif // DORIS_BE_SRC_QUERY_EXEC_CSV_SCANNER_H diff --git a/be/src/exec/data_sink.h b/be/src/exec/data_sink.h index 311db12a67..608c240d7c 100644 --- a/be/src/exec/data_sink.h +++ b/be/src/exec/data_sink.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/data-sink.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_DATA_SINK_H -#define DORIS_BE_SRC_QUERY_EXEC_DATA_SINK_H +#pragma once #include @@ -103,4 +102,3 @@ protected: }; } // namespace doris -#endif diff --git a/be/src/exec/es/es_predicate.h b/be/src/exec/es/es_predicate.h index 826af0aa7c..28552d3eee 100644 --- a/be/src/exec/es/es_predicate.h +++ b/be/src/exec/es/es_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef BE_EXEC_ES_PREDICATE_H -#define BE_EXEC_ES_PREDICATE_H +#pragma once #include #include @@ -165,5 +164,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/es_http_scanner.h b/be/src/exec/es_http_scanner.h index 054824459b..f1abbd3c7e 100644 --- a/be/src/exec/es_http_scanner.h +++ b/be/src/exec/es_http_scanner.h @@ -16,8 +16,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef BE_EXEC_ES_HTTP_SCANNER_H -#define BE_EXEC_ES_HTTP_SCANNER_H +#pragma once #include #include @@ -97,5 +96,3 @@ protected: }; } // namespace doris - -#endif diff --git a/be/src/exec/exchange_node.h b/be/src/exec/exchange_node.h index 8b3ab2e995..83df46230f 100644 --- a/be/src/exec/exchange_node.h +++ b/be/src/exec/exchange_node.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/exchange-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_EXCHANGE_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_EXCHANGE_NODE_H +#pragma once #include "exec/exec_node.h" #include "exec/sort_exec_exprs.h" @@ -116,5 +115,3 @@ private: }; }; // namespace doris - -#endif diff --git a/be/src/exec/exec_node.h b/be/src/exec/exec_node.h index 1e653024f2..e5b0bd485b 100644 --- a/be/src/exec/exec_node.h +++ b/be/src/exec/exec_node.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/exec-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_EXEC_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_EXEC_NODE_H +#pragma once #include #include @@ -374,5 +373,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/file_writer.h b/be/src/exec/file_writer.h index a77c788cc7..5b08f09830 100644 --- a/be/src/exec/file_writer.h +++ b/be/src/exec/file_writer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXEC_FILE_WRITER_H -#define DORIS_BE_SRC_EXEC_FILE_WRITER_H +#pragma once #include @@ -38,5 +37,3 @@ public: }; } // end namespace doris - -#endif // DORIS_BE_SRC_EXEC_FILE_WRITER_H diff --git a/be/src/exec/hash_join_node.h b/be/src/exec/hash_join_node.h index 3e654c033c..ece87ab1a1 100644 --- a/be/src/exec/hash_join_node.h +++ b/be/src/exec/hash_join_node.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/hash-join-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_HASH_JOIN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_HASH_JOIN_NODE_H +#pragma once #include #include @@ -182,5 +181,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/hash_table.h b/be/src/exec/hash_table.h index 316f8eede7..18e9165525 100644 --- a/be/src/exec/hash_table.h +++ b/be/src/exec/hash_table.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/hash-table.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_HASH_TABLE_H -#define DORIS_BE_SRC_QUERY_EXEC_HASH_TABLE_H +#pragma once #include @@ -440,5 +439,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/json_scanner.h b/be/src/exec/json_scanner.h index 2f5c9e3b82..b12c96f396 100644 --- a/be/src/exec/json_scanner.h +++ b/be/src/exec/json_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef BE_SRC_JSON_SCANNER_H_ -#define BE_SRC_JSON_SCANNER_H_ +#pragma once #include #include @@ -188,4 +187,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/exec/local_file_writer.h b/be/src/exec/local_file_writer.h index a5d2b4d82d..63be5e9d79 100644 --- a/be/src/exec/local_file_writer.h +++ b/be/src/exec/local_file_writer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXEC_LOCAL_FILE_WRITER_H -#define DORIS_BE_SRC_EXEC_LOCAL_FILE_WRITER_H +#pragma once #include @@ -44,5 +43,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_EXEC_LOCAL_FILE_WRITER_H diff --git a/be/src/exec/merge_join_node.h b/be/src/exec/merge_join_node.h index fdb2911633..50c949f339 100644 --- a/be/src/exec/merge_join_node.h +++ b/be/src/exec/merge_join_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_MERGE_JOIN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_MERGE_JOIN_NODE_H +#pragma once #include #include @@ -94,5 +93,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/merge_node.h b/be/src/exec/merge_node.h index ea93da49ba..9b162d47fa 100644 --- a/be/src/exec/merge_node.h +++ b/be/src/exec/merge_node.h @@ -18,8 +18,7 @@ // https://github.com/cloudera/Impala/blob/v0.7refresh/be/src/exec/merge-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_MERGE_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_MERGE_NODE_H +#pragma once #include "exec/exec_node.h" #include "runtime/mem_pool.h" @@ -92,5 +91,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/mysql_scan_node.h b/be/src/exec/mysql_scan_node.h index 3abbf83115..484cbef200 100644 --- a/be/src/exec/mysql_scan_node.h +++ b/be/src/exec/mysql_scan_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCAN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCAN_NODE_H +#pragma once #include @@ -93,5 +92,3 @@ protected: }; } // namespace doris - -#endif diff --git a/be/src/exec/mysql_scanner.h b/be/src/exec/mysql_scanner.h index ea7368760e..a6b1f1909c 100644 --- a/be/src/exec/mysql_scanner.h +++ b/be/src/exec/mysql_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCANNER_H +#pragma once #include @@ -73,5 +72,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/odbc_connector.h b/be/src/exec/odbc_connector.h index 690289c47b..f2cc0f3a6f 100644 --- a/be/src/exec/odbc_connector.h +++ b/be/src/exec/odbc_connector.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_ODBC_CONNECTOR_H -#define DORIS_BE_SRC_QUERY_EXEC_ODBC_CONNECTOR_H +#pragma once #include #include @@ -121,5 +120,3 @@ private: }; } // namespace doris - -#endif \ No newline at end of file diff --git a/be/src/exec/odbc_scan_node.h b/be/src/exec/odbc_scan_node.h index 1754993628..884e172607 100644 --- a/be/src/exec/odbc_scan_node.h +++ b/be/src/exec/odbc_scan_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_ODBC_SCAN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_ODBC_SCAN_NODE_H +#pragma once #include @@ -100,5 +99,3 @@ private: Tuple* _tuple = nullptr; }; } // namespace doris - -#endif diff --git a/be/src/exec/olap_common.h b/be/src/exec/olap_common.h index 661ed94844..737ebf1c27 100644 --- a/be/src/exec/olap_common.h +++ b/be/src/exec/olap_common.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_COMMON_H -#define DORIS_BE_SRC_QUERY_EXEC_OLAP_COMMON_H +#pragma once #include #include @@ -863,7 +862,3 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange& range, int32_t max_sca } } // namespace doris - -#endif - -/* vim: set expandtab ts=4 sw=4 sts=4 tw=100: */ diff --git a/be/src/exec/olap_scanner.h b/be/src/exec/olap_scanner.h index a05d07a66e..6fc9504318 100644 --- a/be/src/exec/olap_scanner.h +++ b/be/src/exec/olap_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_OLAP_SCANNER_H +#pragma once #include #include @@ -155,5 +154,3 @@ protected: }; } // namespace doris - -#endif diff --git a/be/src/exec/olap_utils.h b/be/src/exec/olap_utils.h index 525c688781..eb0cf52e98 100644 --- a/be/src/exec/olap_utils.h +++ b/be/src/exec/olap_utils.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_UTILS_H -#define DORIS_BE_SRC_QUERY_EXEC_OLAP_UTILS_H +#pragma once #include @@ -217,5 +216,3 @@ inline SQLFilterOp to_olap_filter_type(TExprOpcode::type type, bool opposite) { } } // namespace doris - -#endif diff --git a/be/src/exec/orc_scanner.h b/be/src/exec/orc_scanner.h index 31449bb0d3..c13e331fcd 100644 --- a/be/src/exec/orc_scanner.h +++ b/be/src/exec/orc_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef ORC_SCANNER_H -#define ORC_SCANNER_H +#pragma once #include @@ -73,4 +72,3 @@ private: }; } // namespace doris -#endif //ORC_SCANNER_H diff --git a/be/src/exec/partitioned_aggregation_node.h b/be/src/exec/partitioned_aggregation_node.h index 437524638f..fc3c486ce1 100644 --- a/be/src/exec/partitioned_aggregation_node.h +++ b/be/src/exec/partitioned_aggregation_node.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/partitioned-aggregation-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_EXEC_NEW_PARTITIONED_AGGREGATION_NODE_H -#define DORIS_BE_SRC_EXEC_NEW_PARTITIONED_AGGREGATION_NODE_H +#pragma once #include @@ -720,5 +719,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/partitioned_hash_table.h b/be/src/exec/partitioned_hash_table.h index 26da88a2ab..514a592bf5 100644 --- a/be/src/exec/partitioned_hash_table.h +++ b/be/src/exec/partitioned_hash_table.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/partitioned-hash-table.h // and modified by Doris -#ifndef DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_H -#define DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_H +#pragma once #include #include @@ -966,5 +965,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/partitioned_hash_table.inline.h b/be/src/exec/partitioned_hash_table.inline.h index ea6b82ead0..7b5ef02f00 100644 --- a/be/src/exec/partitioned_hash_table.inline.h +++ b/be/src/exec/partitioned_hash_table.inline.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/partitioned-hash-table.inline.h // and modified by Doris -#ifndef DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_INLINE_H -#define DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_INLINE_H +#pragma once #include "exec/partitioned_hash_table.h" #include "exprs/expr.h" @@ -407,5 +406,3 @@ inline int64_t PartitionedHashTable::NumInsertsBeforeResize() const { } } // namespace doris - -#endif diff --git a/be/src/exec/read_write_util.h b/be/src/exec/read_write_util.h index c52fedecb8..e87827bb49 100644 --- a/be/src/exec/read_write_util.h +++ b/be/src/exec/read_write_util.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_READ_WRITE_UTIL_H -#define DORIS_BE_SRC_QUERY_EXEC_READ_WRITE_UTIL_H +#pragma once #include @@ -231,4 +230,3 @@ inline int ReadWriteUtil::decode_vint_size(int8_t byte) { } } // namespace doris -#endif diff --git a/be/src/exec/row_batch_list.h b/be/src/exec/row_batch_list.h index a655d6ca0e..43bc5963de 100644 --- a/be/src/exec/row_batch_list.h +++ b/be/src/exec/row_batch_list.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/row-batch-list.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_ROW_BATCH_LIST_H -#define DORIS_BE_SRC_QUERY_EXEC_ROW_BATCH_LIST_H +#pragma once #include #include @@ -130,5 +129,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scan_node.h b/be/src/exec/schema_scan_node.h index 2439da04f7..46cdfc707e 100644 --- a/be/src/exec/schema_scan_node.h +++ b/be/src/exec/schema_scan_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCAN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCAN_NODE_H +#pragma once #include "exec/scan_node.h" #include "exec/schema_scanner.h" @@ -90,7 +89,3 @@ protected: }; } // namespace doris - -#endif //__DORIS_MYSQLSCANNODE_H - -/* vim: set ts=4 sw=4 sts=4 tw=100 noet: */ diff --git a/be/src/exec/schema_scanner.h b/be/src/exec/schema_scanner.h index c6311dd99d..ea2bc28748 100644 --- a/be/src/exec/schema_scanner.h +++ b/be/src/exec/schema_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_H +#pragma once #include @@ -96,5 +95,3 @@ protected: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_charsets_scanner.h b/be/src/exec/schema_scanner/schema_charsets_scanner.h index e78cfe3708..a95292c710 100644 --- a/be/src/exec/schema_scanner/schema_charsets_scanner.h +++ b/be/src/exec/schema_scanner/schema_charsets_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_CHARSETS_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_CHARSETS_SCANNER_H +#pragma once #include @@ -48,5 +47,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_collations_scanner.h b/be/src/exec/schema_scanner/schema_collations_scanner.h index a76d8b66e0..3378aa700c 100644 --- a/be/src/exec/schema_scanner/schema_collations_scanner.h +++ b/be/src/exec/schema_scanner/schema_collations_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLLATIONS_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLLATIONS_SCANNER_H +#pragma once #include @@ -50,5 +49,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_columns_scanner.h b/be/src/exec/schema_scanner/schema_columns_scanner.h index edc99d40ba..25afa984d6 100644 --- a/be/src/exec/schema_scanner/schema_columns_scanner.h +++ b/be/src/exec/schema_scanner/schema_columns_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLUMNS_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLUMNS_SCANNER_H +#pragma once #include @@ -50,5 +49,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_dummy_scanner.h b/be/src/exec/schema_scanner/schema_dummy_scanner.h index 63fafe18b5..0e5d19acc6 100644 --- a/be/src/exec/schema_scanner/schema_dummy_scanner.h +++ b/be/src/exec/schema_scanner/schema_dummy_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_DUMMY_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_DUMMY_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -35,5 +34,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_files_scanner.h b/be/src/exec/schema_scanner/schema_files_scanner.h index 9c779cd083..012d1ed097 100644 --- a/be/src/exec/schema_scanner/schema_files_scanner.h +++ b/be/src/exec/schema_scanner/schema_files_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_FILES_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_FILES_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -39,5 +38,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_partitions_scanner.h b/be/src/exec/schema_scanner/schema_partitions_scanner.h index a68b1bbb8c..5bce10cfbb 100644 --- a/be/src/exec/schema_scanner/schema_partitions_scanner.h +++ b/be/src/exec/schema_scanner/schema_partitions_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_PARTITIONS_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_PARTITIONS_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -39,5 +38,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_schema_privileges_scanner.h b/be/src/exec/schema_scanner/schema_schema_privileges_scanner.h index 6d4333804c..d2f7c0f9b6 100644 --- a/be/src/exec/schema_scanner/schema_schema_privileges_scanner.h +++ b/be/src/exec/schema_scanner/schema_schema_privileges_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMA_PRIVILEGES_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMA_PRIVILEGES_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -42,5 +41,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_schemata_scanner.h b/be/src/exec/schema_scanner/schema_schemata_scanner.h index 8a1c66b092..f6bc752021 100644 --- a/be/src/exec/schema_scanner/schema_schemata_scanner.h +++ b/be/src/exec/schema_scanner/schema_schemata_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMATA_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMATA_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -40,5 +39,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_statistics_scanner.h b/be/src/exec/schema_scanner/schema_statistics_scanner.h index c9fdd5dfaf..cbf968be4a 100644 --- a/be/src/exec/schema_scanner/schema_statistics_scanner.h +++ b/be/src/exec/schema_scanner/schema_statistics_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_STATISTICS_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_STATISTICS_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -31,5 +30,3 @@ private: static SchemaScanner::ColumnDesc _s_cols_statistics[]; }; } // namespace doris - -#endif // DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_STATISTICS_SCANNER_H diff --git a/be/src/exec/schema_scanner/schema_table_privileges_scanner.h b/be/src/exec/schema_scanner/schema_table_privileges_scanner.h index 8998578865..d14e800522 100644 --- a/be/src/exec/schema_scanner/schema_table_privileges_scanner.h +++ b/be/src/exec/schema_scanner/schema_table_privileges_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLE_PRIVILEGES_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLE_PRIVILEGES_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -42,5 +41,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_tables_scanner.h b/be/src/exec/schema_scanner/schema_tables_scanner.h index 60c38b3b7f..ff95799933 100644 --- a/be/src/exec/schema_scanner/schema_tables_scanner.h +++ b/be/src/exec/schema_scanner/schema_tables_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLES_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLES_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -43,5 +42,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_user_privileges_scanner.h b/be/src/exec/schema_scanner/schema_user_privileges_scanner.h index 724f5cba8d..2e2cbc80da 100644 --- a/be/src/exec/schema_scanner/schema_user_privileges_scanner.h +++ b/be/src/exec/schema_scanner/schema_user_privileges_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_USER_PRIVILEGES_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_USER_PRIVILEGES_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -42,5 +41,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/schema_scanner/schema_variables_scanner.h b/be/src/exec/schema_scanner/schema_variables_scanner.h index e957a4eb3e..25daaf0e4f 100644 --- a/be/src/exec/schema_scanner/schema_variables_scanner.h +++ b/be/src/exec/schema_scanner/schema_variables_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VARIABLES_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VARIABLES_SCANNER_H +#pragma once #include #include @@ -50,4 +49,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/exec/schema_scanner/schema_views_scanner.h b/be/src/exec/schema_scanner/schema_views_scanner.h index c768103fb6..3222b67e89 100644 --- a/be/src/exec/schema_scanner/schema_views_scanner.h +++ b/be/src/exec/schema_scanner/schema_views_scanner.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VIEWS_SCANNER_H -#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VIEWS_SCANNER_H +#pragma once #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" @@ -43,5 +42,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/select_node.h b/be/src/exec/select_node.h index 21b2ffacb0..e20dc6117d 100644 --- a/be/src/exec/select_node.h +++ b/be/src/exec/select_node.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/select-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_SELECT_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_SELECT_NODE_H +#pragma once #include "exec/exec_node.h" #include "runtime/mem_pool.h" @@ -57,5 +56,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/sort_exec_exprs.h b/be/src/exec/sort_exec_exprs.h index 9e1133193f..7ef54e5fc8 100644 --- a/be/src/exec/sort_exec_exprs.h +++ b/be/src/exec/sort_exec_exprs.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/sort-exec-exprs.h // and modified by Doris -#ifndef INF_DORIS_QE_SRC_BE_EXEC_SORT_EXEC_EXPRS_H -#define INF_DORIS_QE_SRC_BE_EXEC_SORT_EXEC_EXPRS_H +#pragma once #include "exprs/expr.h" #include "runtime/runtime_state.h" @@ -91,5 +90,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/spill_sort_node.h b/be/src/exec/spill_sort_node.h index 954df0925a..dc4832fc7c 100644 --- a/be/src/exec/spill_sort_node.h +++ b/be/src/exec/spill_sort_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXEC_SPILL_SORT_NODE_H -#define DORIS_BE_SRC_EXEC_SPILL_SORT_NODE_H +#pragma once #include "exec/exec_node.h" #include "exec/sort_exec_exprs.h" @@ -75,5 +74,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_EXEC_SPILL_SORT_NODE_H diff --git a/be/src/exec/text_converter.h b/be/src/exec/text_converter.h index 36b3254fa7..7d957234a7 100644 --- a/be/src/exec/text_converter.h +++ b/be/src/exec/text_converter.h @@ -15,11 +15,11 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_H -#define DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_H +#pragma once #include "runtime/runtime_state.h" #include "vec/core/block.h" + namespace doris { class MemPool; @@ -65,5 +65,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exec/text_converter.hpp b/be/src/exec/text_converter.hpp index 2799fada2b..0de56b83b3 100644 --- a/be/src/exec/text_converter.hpp +++ b/be/src/exec/text_converter.hpp @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_HPP -#define DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_HPP +#pragma once + #include #include @@ -34,6 +34,7 @@ #include "util/string_parser.hpp" #include "util/types.h" #include "vec/runtime/vdatetime_value.h" + namespace doris { // Note: this function has a codegen'd version. Changing this function requires @@ -299,5 +300,3 @@ inline bool TextConverter::write_column(const SlotDescriptor* slot_desc, } } // namespace doris - -#endif \ No newline at end of file diff --git a/be/src/exec/topn_node.h b/be/src/exec/topn_node.h index 92ff3d35bb..5a7903af37 100644 --- a/be/src/exec/topn_node.h +++ b/be/src/exec/topn_node.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exec/topn-node.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXEC_TOPN_NODE_H -#define DORIS_BE_SRC_QUERY_EXEC_TOPN_NODE_H +#pragma once #include @@ -112,5 +111,3 @@ private: }; }; // namespace doris - -#endif diff --git a/be/src/exprs/agg_fn.h b/be/src/exprs/agg_fn.h index 28342f974a..96a3ef128c 100644 --- a/be/src/exprs/agg_fn.h +++ b/be/src/exprs/agg_fn.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.10.0/be/src/exprs/agg-fn.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_NEW_EXPRS_AGG_FN_H -#define DORIS_BE_SRC_QUERY_NEW_EXPRS_AGG_FN_H +#pragma once #include "exprs/expr.h" #include "runtime/descriptors.h" @@ -186,5 +185,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/agg_fn_evaluator.h b/be/src/exprs/agg_fn_evaluator.h index bfcc757d29..f3f9dc96ac 100644 --- a/be/src/exprs/agg_fn_evaluator.h +++ b/be/src/exprs/agg_fn_evaluator.h @@ -18,15 +18,13 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/agg-fn-evaluator.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_AGG_FN_EVALUATOR_H -#define DORIS_BE_SRC_QUERY_EXPRS_AGG_FN_EVALUATOR_H +#pragma once #include #include #include "gen_cpp/Exprs_types.h" #include "udf/udf.h" -//#include "exprs/opcode_registry.h" #include "exprs/expr_context.h" #include "exprs/hybrid_map.h" #include "runtime/descriptors.h" @@ -346,5 +344,3 @@ inline void AggFnEvaluator::finalize(const std::vector& evaluat } } // namespace doris - -#endif diff --git a/be/src/exprs/aggregate_functions.h b/be/src/exprs/aggregate_functions.h index b995c21d29..b1d6062563 100644 --- a/be/src/exprs/aggregate_functions.h +++ b/be/src/exprs/aggregate_functions.h @@ -18,10 +18,8 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/aggregate-functions.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_AGGREGATE_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_AGGREGATE_FUNCTIONS_H +#pragma once -//#include "exprs/opcode_registry.h" #include "olap/hll.h" #include "udf/udf.h" #include "udf/udf_internal.h" @@ -416,5 +414,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/anyval_util.h b/be/src/exprs/anyval_util.h index cda268af40..f0246d4c53 100644 --- a/be/src/exprs/anyval_util.h +++ b/be/src/exprs/anyval_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/anyval-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_ANYVAL_UTIL_H -#define DORIS_BE_SRC_QUERY_EXPRS_ANYVAL_UTIL_H +#pragma once #include "common/status.h" #include "exprs/expr.h" @@ -481,4 +480,3 @@ Status allocate_any_val(RuntimeState* state, MemPool* pool, const TypeDescriptor const std::string& mem_limit_exceeded_msg, AnyVal** result); } // namespace doris -#endif diff --git a/be/src/exprs/arithmetic_expr.h b/be/src/exprs/arithmetic_expr.h index 4062847479..3f7c8640cc 100644 --- a/be/src/exprs/arithmetic_expr.h +++ b/be/src/exprs/arithmetic_expr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXPRS_ARITHMETIC_EXPR_H -#define DORIS_BE_SRC_EXPRS_ARITHMETIC_EXPR_H +#pragma once #include @@ -180,5 +179,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/array_functions.h b/be/src/exprs/array_functions.h index d0a32f0e91..b2cf2a010d 100644 --- a/be/src/exprs/array_functions.h +++ b/be/src/exprs/array_functions.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_COLLECTION_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_COLLECTION_FUNCTIONS_H +#pragma once #include "anyval_util.h" @@ -34,5 +33,3 @@ public: static CollectionVal array(FunctionContext* context, int num_children, const StringVal* values); }; } // namespace doris - -#endif diff --git a/be/src/exprs/binary_predicate.h b/be/src/exprs/binary_predicate.h index eedee17b2b..0378e15d72 100644 --- a/be/src/exprs/binary_predicate.h +++ b/be/src/exprs/binary_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_BINARY_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_BINARY_PREDICATE_H +#pragma once #include #include @@ -98,4 +97,3 @@ BIN_PRED_FOR_NULL_CLASSES_DEFINE(StringVal) BIN_PRED_FOR_NULL_CLASSES_DEFINE(DateTimeVal) BIN_PRED_FOR_NULL_CLASSES_DEFINE(DecimalV2Val) } // namespace doris -#endif diff --git a/be/src/exprs/bitmap_function.h b/be/src/exprs/bitmap_function.h index f77ca1af94..5c7ba4dff0 100644 --- a/be/src/exprs/bitmap_function.h +++ b/be/src/exprs/bitmap_function.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_BITMAP_FUNCTION_H -#define DORIS_BE_SRC_QUERY_EXPRS_BITMAP_FUNCTION_H +#pragma once #include "udf/udf.h" @@ -156,4 +155,3 @@ public: const StringVal& src); }; } // namespace doris -#endif //DORIS_BE_SRC_QUERY_EXPRS_BITMAP_FUNCTION_H \ No newline at end of file diff --git a/be/src/exprs/block_bloom_filter.hpp b/be/src/exprs/block_bloom_filter.hpp index 0995dec02f..c683f2c40a 100644 --- a/be/src/exprs/block_bloom_filter.hpp +++ b/be/src/exprs/block_bloom_filter.hpp @@ -19,6 +19,7 @@ // and modified by Doris #pragma once + #include "common/status.h" #include "fmt/format.h" #include "gutil/macros.h" diff --git a/be/src/exprs/bloomfilter_predicate.h b/be/src/exprs/bloomfilter_predicate.h index 9632ddb14b..e2e0b27ea3 100644 --- a/be/src/exprs/bloomfilter_predicate.h +++ b/be/src/exprs/bloomfilter_predicate.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_BLOOM_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_BLOOM_PREDICATE_H +#pragma once + #include #include #include @@ -370,4 +370,3 @@ private: constexpr static double _expect_filter_rate = 0.2; }; } // namespace doris -#endif diff --git a/be/src/exprs/case_expr.h b/be/src/exprs/case_expr.h index df3a0a3ee9..06bf56e8b4 100644 --- a/be/src/exprs/case_expr.h +++ b/be/src/exprs/case_expr.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/case-expr.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_CASE_EXPR_H -#define DORIS_BE_SRC_QUERY_EXPRS_CASE_EXPR_H +#pragma once #include @@ -79,5 +78,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/cast_expr.h b/be/src/exprs/cast_expr.h index 808a9174e2..099423f619 100644 --- a/be/src/exprs/cast_expr.h +++ b/be/src/exprs/cast_expr.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/cast-expr.h // and modified by Doris -#ifndef DORIS_BE_SRC_EXPRS_CAST_EXPR_H -#define DORIS_BE_SRC_EXPRS_CAST_EXPR_H +#pragma once #include "common/object_pool.h" #include "exprs/expr.h" @@ -61,5 +60,3 @@ CAST_EXPR_DEFINE(CastFloatExpr); CAST_EXPR_DEFINE(CastDoubleExpr); } // namespace doris - -#endif diff --git a/be/src/exprs/cast_functions.h b/be/src/exprs/cast_functions.h index ca0af09bc9..b45cfac3f6 100644 --- a/be/src/exprs/cast_functions.h +++ b/be/src/exprs/cast_functions.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/cast-functions.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_CAST_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_CAST_FUNCTIONS_H +#pragma once #include "udf/udf.h" @@ -144,5 +143,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/compound_predicate.h b/be/src/exprs/compound_predicate.h index c6627096f8..28aadb37ef 100644 --- a/be/src/exprs/compound_predicate.h +++ b/be/src/exprs/compound_predicate.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/compound-predicate.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_COMPOUND_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_COMPOUND_PREDICATE_H +#pragma once #include @@ -114,5 +113,3 @@ private: friend class OpcodeRegistry; }; } // namespace doris - -#endif diff --git a/be/src/exprs/conditional_functions.h b/be/src/exprs/conditional_functions.h index 3f91bbedc2..cf88e1f134 100644 --- a/be/src/exprs/conditional_functions.h +++ b/be/src/exprs/conditional_functions.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/conditional-functions.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_CONDITIONAL_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_CONDITIONAL_FUNCTIONS_H +#pragma once #include @@ -138,5 +137,3 @@ protected: }; } // namespace doris - -#endif diff --git a/be/src/exprs/decimalv2_operators.h b/be/src/exprs/decimalv2_operators.h index 243a153e12..f37b3d9473 100644 --- a/be/src/exprs/decimalv2_operators.h +++ b/be/src/exprs/decimalv2_operators.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXPRS_DECIMAL_OPERATORS_H -#define DORIS_BE_SRC_EXPRS_DECIMAL_OPERATORS_H +#pragma once #include @@ -83,5 +82,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/encryption_functions.h b/be/src/exprs/encryption_functions.h index 5ab7d41cb7..4c946215ab 100644 --- a/be/src/exprs/encryption_functions.h +++ b/be/src/exprs/encryption_functions.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_ENCRYPTION_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_ENCRYPTION_FUNCTIONS_H +#pragma once #include @@ -98,5 +97,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/es_functions.h b/be/src/exprs/es_functions.h index 600e539a9b..0a6498f062 100644 --- a/be/src/exprs/es_functions.h +++ b/be/src/exprs/es_functions.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_ES_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_ES_FUNCTIONS_H +#pragma once #include "udf/udf.h" @@ -37,5 +36,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/expr.h b/be/src/exprs/expr.h index e8f26bb4d3..7618aa41ab 100644 --- a/be/src/exprs/expr.h +++ b/be/src/exprs/expr.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/expr.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_EXPR_H -#define DORIS_BE_SRC_QUERY_EXPRS_EXPR_H +#pragma once #include #include @@ -473,5 +472,3 @@ inline bool Expr::evaluate(VectorizedRowBatch* batch) { } } // namespace doris - -#endif diff --git a/be/src/exprs/expr_context.h b/be/src/exprs/expr_context.h index 3a79a1be54..32d408e99d 100644 --- a/be/src/exprs/expr_context.h +++ b/be/src/exprs/expr_context.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/expr-context.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_EXPR_CONTEXT_H -#define DORIS_BE_SRC_QUERY_EXPRS_EXPR_CONTEXT_H +#pragma once #include @@ -202,5 +201,3 @@ inline void* ExprContext::get_value(TupleRow* row) { } } // namespace doris - -#endif diff --git a/be/src/exprs/expr_value.h b/be/src/exprs/expr_value.h index 32c5068d14..99a0bd2198 100644 --- a/be/src/exprs/expr_value.h +++ b/be/src/exprs/expr_value.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/expr-value.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_EXPR_VALUE_H -#define DORIS_BE_SRC_QUERY_EXPRS_EXPR_VALUE_H +#pragma once #include "runtime/collection_value.h" #include "runtime/datetime_value.h" @@ -245,5 +244,3 @@ struct ExprValue { }; } // namespace doris - -#endif diff --git a/be/src/exprs/hll_function.h b/be/src/exprs/hll_function.h index a8f7ab0b65..81d5cefdfa 100644 --- a/be/src/exprs/hll_function.h +++ b/be/src/exprs/hll_function.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_HLL_FUNCTION_H -#define DORIS_BE_SRC_QUERY_EXPRS_HLL_FUNCTION_H +#pragma once #include #include "udf/udf.h" @@ -48,5 +47,3 @@ public: static BigIntVal hll_cardinality(FunctionContext* ctx, const StringVal& src); }; } // namespace doris - -#endif diff --git a/be/src/exprs/hll_hash_function.h b/be/src/exprs/hll_hash_function.h index 5ff590e724..4f2c1b3afe 100644 --- a/be/src/exprs/hll_hash_function.h +++ b/be/src/exprs/hll_hash_function.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_HLL_HASH_FUNCTION_H -#define DORIS_BE_SRC_QUERY_EXPRS_HLL_HASH_FUNCTION_H +#pragma once #include "exprs/anyval_util.h" #include "udf/udf.h" @@ -36,5 +35,3 @@ public: static BigIntVal hll_cardinality(FunctionContext* ctx, const HllVal& dest_base); }; } // namespace doris - -#endif diff --git a/be/src/exprs/hybrid_map.h b/be/src/exprs/hybrid_map.h index 7eadf002bd..27652b63f3 100644 --- a/be/src/exprs/hybrid_map.h +++ b/be/src/exprs/hybrid_map.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_HYBRID_MAP_H -#define DORIS_BE_SRC_QUERY_EXPRS_HYBRID_MAP_H +#pragma once #include @@ -59,5 +58,3 @@ private: ObjectPool _pool; }; } // namespace doris - -#endif // DORIS_BE_SRC_QUERY_EXPRS_HYBRID_MAP_H diff --git a/be/src/exprs/hybrid_set.h b/be/src/exprs/hybrid_set.h index e47e53e65e..2f6da691f3 100644 --- a/be/src/exprs/hybrid_set.h +++ b/be/src/exprs/hybrid_set.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_HYBRID_SET_H -#define DORIS_BE_SRC_QUERY_EXPRS_HYBRID_SET_H +#pragma once #include @@ -186,5 +185,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_QUERY_EXPRS_HYBRID_SET_H diff --git a/be/src/exprs/in_predicate.h b/be/src/exprs/in_predicate.h index 6bb603ddd8..c18b7303d7 100644 --- a/be/src/exprs/in_predicate.h +++ b/be/src/exprs/in_predicate.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/in-predicate.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_IN_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_IN_PREDICATE_H +#pragma once #include #include @@ -75,5 +74,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/info_func.h b/be/src/exprs/info_func.h index dd9dbf663e..ff37a6fc12 100644 --- a/be/src/exprs/info_func.h +++ b/be/src/exprs/info_func.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_INFO_FUNC_H -#define DORIS_BE_SRC_QUERY_EXPRS_INFO_FUNC_H +#pragma once #include #include @@ -50,5 +49,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/is_null_predicate.h b/be/src/exprs/is_null_predicate.h index edd0b1c622..7a68a1ecaa 100644 --- a/be/src/exprs/is_null_predicate.h +++ b/be/src/exprs/is_null_predicate.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/is-null-predicate.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_IS_NULL_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_IS_NULL_PREDICATE_H +#pragma once #include @@ -39,4 +38,3 @@ public: }; } // namespace doris -#endif diff --git a/be/src/exprs/json_functions.h b/be/src/exprs/json_functions.h index 0253ac5e83..f62c2f0671 100644 --- a/be/src/exprs/json_functions.h +++ b/be/src/exprs/json_functions.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_JSON_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_JSON_FUNCTIONS_H +#pragma once #include @@ -140,4 +139,3 @@ private: rapidjson::Document::AllocatorType& allocator); }; } // namespace doris -#endif diff --git a/be/src/exprs/like_predicate.h b/be/src/exprs/like_predicate.h index 4658c82935..d9c895b533 100644 --- a/be/src/exprs/like_predicate.h +++ b/be/src/exprs/like_predicate.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/like-predicate.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_LIKE_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_LIKE_PREDICATE_H +#pragma once #include @@ -162,5 +161,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/literal.h b/be/src/exprs/literal.h index de5b917212..7dc93df733 100644 --- a/be/src/exprs/literal.h +++ b/be/src/exprs/literal.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/literal.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_LITERAL_H -#define DORIS_BE_SRC_QUERY_EXPRS_LITERAL_H +#pragma once #include "binary_predicate.h" #include "common/object_pool.h" @@ -61,5 +60,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/math_functions.h b/be/src/exprs/math_functions.h index 8dadcf75d3..edc4a394a7 100644 --- a/be/src/exprs/math_functions.h +++ b/be/src/exprs/math_functions.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/math-functions.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_MATH_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_MATH_FUNCTIONS_H +#pragma once #include @@ -215,5 +214,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/new_agg_fn_evaluator.h b/be/src/exprs/new_agg_fn_evaluator.h index ae9178c23c..c330cd29cd 100644 --- a/be/src/exprs/new_agg_fn_evaluator.h +++ b/be/src/exprs/new_agg_fn_evaluator.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.10.0/be/src/exprs/agg-fn-evaluator.h // and modified by Doris -#ifndef IMPALA_EXPRS_AGG_FN_EVALUATOR_H -#define IMPALA_EXPRS_AGG_FN_EVALUATOR_H +#pragma once #include @@ -318,5 +317,3 @@ inline void NewAggFnEvaluator::Finalize(const std::vector& e } } // namespace doris - -#endif diff --git a/be/src/exprs/new_in_predicate.h b/be/src/exprs/new_in_predicate.h index ea37714a0f..afd54fd710 100644 --- a/be/src/exprs/new_in_predicate.h +++ b/be/src/exprs/new_in_predicate.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_NEW_IN_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_NEW_IN_PREDICATE_H +#pragma once #include @@ -344,5 +343,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/null_literal.h b/be/src/exprs/null_literal.h index 7e03370dfe..af3e5e615a 100644 --- a/be/src/exprs/null_literal.h +++ b/be/src/exprs/null_literal.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/null-literal.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_NULL_LITERAL_H -#define DORIS_BE_SRC_QUERY_EXPRS_NULL_LITERAL_H +#pragma once #include "common/object_pool.h" #include "exprs/expr.h" @@ -56,5 +55,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/operators.h b/be/src/exprs/operators.h index 8b07d2e645..c385896f23 100644 --- a/be/src/exprs/operators.h +++ b/be/src/exprs/operators.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/operators.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_OPERATORS_H -#define DORIS_BE_SRC_QUERY_EXPRS_OPERATORS_H +#pragma once #include "udf/udf.h" @@ -250,5 +249,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/predicate.h b/be/src/exprs/predicate.h index cd6eea6f32..3126da93a8 100644 --- a/be/src/exprs/predicate.h +++ b/be/src/exprs/predicate.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/predicate.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_PREDICATE_H +#pragma once #include "exprs/expr.h" @@ -35,5 +34,3 @@ protected: }; } // namespace doris - -#endif diff --git a/be/src/exprs/quantile_function.h b/be/src/exprs/quantile_function.h index 93d317cf93..15ee658de4 100644 --- a/be/src/exprs/quantile_function.h +++ b/be/src/exprs/quantile_function.h @@ -18,6 +18,7 @@ #pragma once #include "udf/udf.h" + namespace doris { class QuantileStateFunctions { public: diff --git a/be/src/exprs/runtime_filter.h b/be/src/exprs/runtime_filter.h index 0f5b32aec3..f082bc1016 100644 --- a/be/src/exprs/runtime_filter.h +++ b/be/src/exprs/runtime_filter.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_EXPRS_RUNTIME_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_RUNTIME_PREDICATE_H +#pragma once #include #include @@ -306,5 +305,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/scalar_fn_call.h b/be/src/exprs/scalar_fn_call.h index e20d04ca2f..5242e4b56a 100644 --- a/be/src/exprs/scalar_fn_call.h +++ b/be/src/exprs/scalar_fn_call.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/scalar-fn-call.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_SCALAR_FN_CALL_H -#define DORIS_BE_SRC_QUERY_EXPRS_SCALAR_FN_CALL_H +#pragma once #include @@ -133,5 +132,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/slot_ref.h b/be/src/exprs/slot_ref.h index b3c449efc7..35ba68d66c 100644 --- a/be/src/exprs/slot_ref.h +++ b/be/src/exprs/slot_ref.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/slot-ref.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_SLOT_REF_H -#define DORIS_BE_SRC_QUERY_EXPRS_SLOT_REF_H +#pragma once #include "common/object_pool.h" #include "exprs/expr.h" @@ -120,5 +119,3 @@ inline bool SlotRef::is_nullable(Expr* expr) { } } // namespace doris - -#endif diff --git a/be/src/exprs/string_functions.h b/be/src/exprs/string_functions.h index ffe4b0a9c7..28f8dd6084 100644 --- a/be/src/exprs/string_functions.h +++ b/be/src/exprs/string_functions.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/string-functions.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_STRING_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_STRING_FUNCTIONS_H +#pragma once #include @@ -192,5 +191,3 @@ public: const StringVal& match_parameter); }; } // namespace doris - -#endif diff --git a/be/src/exprs/time_operators.h b/be/src/exprs/time_operators.h index 03e869c92a..2959060eb3 100644 --- a/be/src/exprs/time_operators.h +++ b/be/src/exprs/time_operators.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXPRS_TIME_OPERATORS_H -#define DORIS_BE_SRC_EXPRS_TIME_OPERATORS_H +#pragma once #include @@ -45,4 +44,3 @@ public: static DateTimeVal cast_to_datetime_val(FunctionContext*, const DoubleVal&); }; } // namespace doris -#endif diff --git a/be/src/exprs/timestamp_functions.h b/be/src/exprs/timestamp_functions.h index 6a6a9a5e0d..8dd93509b6 100644 --- a/be/src/exprs/timestamp_functions.h +++ b/be/src/exprs/timestamp_functions.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/timestamp-functions.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_TIMESTAMP_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_TIMESTAMP_FUNCTIONS_H +#pragma once #include @@ -439,5 +438,3 @@ public: doris_udf::FunctionContext::FunctionStateScope scope); }; } // namespace doris - -#endif diff --git a/be/src/exprs/topn_function.h b/be/src/exprs/topn_function.h index 78eed2ec8e..8d3d6f345f 100644 --- a/be/src/exprs/topn_function.h +++ b/be/src/exprs/topn_function.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_EXPRS_TOPN_FUNCTION_H -#define DORIS_BE_SRC_EXPRS_TOPN_FUNCTION_H +#pragma once #include "udf/udf.h" @@ -43,5 +42,3 @@ public: }; } // namespace doris - -#endif //DORIS_BE_SRC_EXPRS_TOPN_FUNCTION_H diff --git a/be/src/exprs/tuple_is_null_predicate.h b/be/src/exprs/tuple_is_null_predicate.h index 6370858a51..ee90901d5a 100644 --- a/be/src/exprs/tuple_is_null_predicate.h +++ b/be/src/exprs/tuple_is_null_predicate.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/tuple-is-null-predicate.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_TUPLE_IS_NULL_PREDICATE_H -#define DORIS_BE_SRC_QUERY_EXPRS_TUPLE_IS_NULL_PREDICATE_H +#pragma once #include "common/object_pool.h" #include "exprs/predicate.h" @@ -53,5 +52,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/exprs/udf_builtins.h b/be/src/exprs/udf_builtins.h index 01b2815226..e8ef544646 100644 --- a/be/src/exprs/udf_builtins.h +++ b/be/src/exprs/udf_builtins.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/udf-builtins.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_UDF_BUILTINS_H -#define DORIS_BE_SRC_QUERY_EXPRS_UDF_BUILTINS_H +#pragma once #include "udf/udf.h" @@ -49,5 +48,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/exprs/utility_functions.h b/be/src/exprs/utility_functions.h index 5303ec1f23..b1c38b1a30 100644 --- a/be/src/exprs/utility_functions.h +++ b/be/src/exprs/utility_functions.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/exprs/utility-functions.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_EXPRS_UTILITY_FUNCTIONS_H -#define DORIS_BE_SRC_QUERY_EXPRS_UTILITY_FUNCTIONS_H +#pragma once #include "udf/udf.h" @@ -41,5 +40,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/gutil/arm_instruction_set_select.h b/be/src/gutil/arm_instruction_set_select.h index e2cc71eacc..6d6b84d622 100644 --- a/be/src/gutil/arm_instruction_set_select.h +++ b/be/src/gutil/arm_instruction_set_select.h @@ -5,8 +5,7 @@ // Generalizes the plethora of ARM flavors available to an easier to manage set // Defs reference is at https://wiki.edubuntu.org/ARM/Thumb2PortingHowto -#ifndef ARM_INSTRUCTION_SET_SELECT_H_ -#define ARM_INSTRUCTION_SET_SELECT_H_ +#pragma once #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7A__) #define ARMV7 1 @@ -34,5 +33,3 @@ #if defined(ARMV3) || defined(__ARM_ARCH_2__) #define ARMV2 1 #endif - -#endif // ARM_INSTRUCTION_SET_SELECT_H_ diff --git a/be/src/gutil/atomic_refcount.h b/be/src/gutil/atomic_refcount.h index 640951b71b..439f8809f0 100644 --- a/be/src/gutil/atomic_refcount.h +++ b/be/src/gutil/atomic_refcount.h @@ -1,5 +1,3 @@ -#ifndef BASE_ATOMIC_REFCOUNT_H_ -#define BASE_ATOMIC_REFCOUNT_H_ // Copyright 2008 Google Inc. // All rights reserved. @@ -34,6 +32,8 @@ // // If you need to do something very different from this, use a Mutex. +#pragma once + #include #include "gutil/atomicops.h" @@ -145,5 +145,3 @@ inline bool RefCountIsZero(const volatile AtomicWord* ptr) { #endif } // namespace base - -#endif // BASE_ATOMIC_REFCOUNT_H_ diff --git a/be/src/gutil/atomicops-internals-gcc.h b/be/src/gutil/atomicops-internals-gcc.h index ebac0dca8b..3daa98065c 100644 --- a/be/src/gutil/atomicops-internals-gcc.h +++ b/be/src/gutil/atomicops-internals-gcc.h @@ -35,8 +35,7 @@ // http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html // -#ifndef BASE_ATOMICOPS_INTERNALS_GCC_GENERIC_H_ -#define BASE_ATOMICOPS_INTERNALS_GCC_GENERIC_H_ +#pragma once #include #include @@ -197,5 +196,3 @@ inline Atomic64 Release_Load(volatile const Atomic64* ptr) { } // namespace subtle } // namespace base - -#endif // BASE_ATOMICOPS_INTERNALS_GCC_GENERIC_H_ diff --git a/be/src/gutil/atomicops-internals-tsan.h b/be/src/gutil/atomicops-internals-tsan.h index 4f0efcb5c4..a6868d249e 100644 --- a/be/src/gutil/atomicops-internals-tsan.h +++ b/be/src/gutil/atomicops-internals-tsan.h @@ -5,8 +5,7 @@ // This file is an internal atomic implementation for compiler-based // ThreadSanitizer. Use base/atomicops.h instead. -#ifndef BASE_ATOMICOPS_INTERNALS_TSAN_H_ -#define BASE_ATOMICOPS_INTERNALS_TSAN_H_ +#pragma once // Workaround for Chromium BASE_EXPORT definition #ifndef BASE_EXPORT @@ -188,5 +187,3 @@ inline void PauseCPU() {} } // namespace base #undef ATOMICOPS_COMPILER_BARRIER - -#endif // BASE_ATOMICOPS_INTERNALS_TSAN_H_ diff --git a/be/src/gutil/atomicops-internals-x86.h b/be/src/gutil/atomicops-internals-x86.h index 1d8ee431d1..92762f9be6 100644 --- a/be/src/gutil/atomicops-internals-x86.h +++ b/be/src/gutil/atomicops-internals-x86.h @@ -24,8 +24,7 @@ // be included directly. Clients should instead include // "base/atomicops.h". -#ifndef GUTIL_ATOMICOPS_INTERNALS_X86_H_ -#define GUTIL_ATOMICOPS_INTERNALS_X86_H_ +#pragma once #include #include @@ -460,5 +459,3 @@ inline Atomic64 Barrier_CompareAndSwap(volatile Atomic64* ptr, Atomic64 old_valu } // namespace base #undef ATOMICOPS_COMPILER_BARRIER - -#endif // GUTIL_ATOMICOPS_INTERNALS_X87_H_ diff --git a/be/src/gutil/atomicops.h b/be/src/gutil/atomicops.h index 1d04dd5234..52715d22b1 100644 --- a/be/src/gutil/atomicops.h +++ b/be/src/gutil/atomicops.h @@ -48,8 +48,7 @@ // The intent is eventually to put all of these routines in namespace // base::subtle -#ifndef THREAD_ATOMICOPS_H_ -#define THREAD_ATOMICOPS_H_ +#pragma once #include @@ -266,5 +265,3 @@ inline base::subtle::Atomic64 Acquire_Load(volatile const base::subtle::Atomic64 inline base::subtle::Atomic64 Release_Load(volatile const base::subtle::Atomic64* ptr) { return base::subtle::Release_Load(ptr); } - -#endif // THREAD_ATOMICOPS_H_ diff --git a/be/src/gutil/basictypes.h b/be/src/gutil/basictypes.h index 4378514ecd..f0cebc589d 100644 --- a/be/src/gutil/basictypes.h +++ b/be/src/gutil/basictypes.h @@ -2,8 +2,7 @@ // // Google-specific types -#ifndef BASE_BASICTYPES_H_ -#define BASE_BASICTYPES_H_ +#pragma once #include "gutil/integral_types.h" #include "gutil/macros.h" @@ -23,5 +22,3 @@ enum Ownership { DO_NOT_TAKE_OWNERSHIP, TAKE_OWNERSHIP }; // template inline void ignore_result(const T&) {} - -#endif // BASE_BASICTYPES_H_ diff --git a/be/src/gutil/bits.h b/be/src/gutil/bits.h index acd44c9cfd..4ffc7614bc 100644 --- a/be/src/gutil/bits.h +++ b/be/src/gutil/bits.h @@ -2,15 +2,14 @@ // // A collection of useful (static) bit-twiddling functions. +#pragma once + #include #include "gutil/basictypes.h" #include "gutil/integral_types.h" #include "gutil/macros.h" -#ifndef _BITS_H_ -#define _BITS_H_ - class Bits { public: // Return the number of one bits in the given integer. @@ -260,5 +259,3 @@ inline bool Bits::BytesAllInRange(T bytes, uint8 lo, uint8 hi) { } return !Bits::BytesContainByteLessThan(bytes + (255 - hi) * l, lo + (255 - hi)); } - -#endif // _BITS_H_ diff --git a/be/src/gutil/casts.h b/be/src/gutil/casts.h index 94a3a14faf..95064e6b11 100644 --- a/be/src/gutil/casts.h +++ b/be/src/gutil/casts.h @@ -7,8 +7,7 @@ // any changes here, make sure that you're not breaking any platforms. // -#ifndef BASE_CASTS_H_ -#define BASE_CASTS_H_ +#pragma once #include // for use with down_cast<> #include @@ -385,5 +384,3 @@ inline Enum tight_enum_cast(int e_val) { } return static_cast(e_val); } - -#endif // BASE_CASTS_H_ diff --git a/be/src/gutil/charmap.h b/be/src/gutil/charmap.h index bb9deba098..213d44f726 100644 --- a/be/src/gutil/charmap.h +++ b/be/src/gutil/charmap.h @@ -13,8 +13,7 @@ // // This class is useful for non-character purposes as well. -#ifndef UTIL_GTL_CHARMAP_H_ -#define UTIL_GTL_CHARMAP_H_ +#pragma once #include @@ -75,5 +74,3 @@ protected: } }; DECLARE_POD(Charmap); - -#endif // UTIL_GTL_CHARMAP_H_ diff --git a/be/src/gutil/cpu.h b/be/src/gutil/cpu.h index 37c636b5bf..f7a12bbe43 100644 --- a/be/src/gutil/cpu.h +++ b/be/src/gutil/cpu.h @@ -1,8 +1,8 @@ // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BASE_CPU_H_ -#define BASE_CPU_H_ +#pragma once + #include #include @@ -114,4 +114,3 @@ private: std::string cpu_brand_; }; } // namespace base -#endif // BASE_CPU_H_ diff --git a/be/src/gutil/cycleclock-inl.h b/be/src/gutil/cycleclock-inl.h index 093d301b6e..8a924432f6 100644 --- a/be/src/gutil/cycleclock-inl.h +++ b/be/src/gutil/cycleclock-inl.h @@ -31,8 +31,7 @@ // with modifications by m3b. See also // https://setisvn.ssl.berkeley.edu/svn/lib/fftw-3.0.1/kernel/cycle.h -#ifndef GUTIL_CYCLECLOCK_INL_H_ -#define GUTIL_CYCLECLOCK_INL_H_ +#pragma once #include @@ -208,5 +207,3 @@ inline int64 CycleClock::Now() { // available. #error You need to define CycleTimer for your O/S and CPU #endif - -#endif // GUTIL_CYCLECLOCK_INL_H_ diff --git a/be/src/gutil/endian.h b/be/src/gutil/endian.h index 69ce314b4b..89aacf0153 100644 --- a/be/src/gutil/endian.h +++ b/be/src/gutil/endian.h @@ -27,8 +27,8 @@ // // Buffer routines will copy to and from buffers without causing // a bus error when the architecture requires differnt byte alignments -#ifndef UTIL_ENDIAN_ENDIAN_H_ -#define UTIL_ENDIAN_ENDIAN_H_ + +#pragma once #include @@ -356,5 +356,3 @@ public: // Network byte order is big-endian typedef BigEndian NetworkByteOrder; - -#endif // UTIL_ENDIAN_ENDIAN_H_ diff --git a/be/src/gutil/gscoped_ptr.h b/be/src/gutil/gscoped_ptr.h index 87b9c966a0..d1d88d1da7 100644 --- a/be/src/gutil/gscoped_ptr.h +++ b/be/src/gutil/gscoped_ptr.h @@ -91,13 +91,12 @@ // some of the older compilers we have to support. // ------------------------------------------------------------------------- -#ifndef GUTIL_GSCOPED_PTR_H_ -#define GUTIL_GSCOPED_PTR_H_ - // This is an implementation designed to match the anticipated future TR2 // implementation of the scoped_ptr class, and its closely-related brethren, // scoped_array, scoped_ptr_malloc. +#pragma once + #include #include #include @@ -808,5 +807,3 @@ template gscoped_ptr make_gscoped_ptr(T* ptr) { return gscoped_ptr(ptr); } - -#endif // GUTIL_GSCOPED_PTR_H_ diff --git a/be/src/gutil/hash/builtin_type_hash.h b/be/src/gutil/hash/builtin_type_hash.h index 1173374469..02a868e42b 100644 --- a/be/src/gutil/hash/builtin_type_hash.h +++ b/be/src/gutil/hash/builtin_type_hash.h @@ -4,8 +4,7 @@ // integral and floating point types in the language as well as pointers. This // library provides a minimal set of interfaces for hashing these values. -#ifndef UTIL_HASH_BUILTIN_TYPE_HASH_H_ -#define UTIL_HASH_BUILTIN_TYPE_HASH_H_ +#pragma once #include #include @@ -91,5 +90,3 @@ inline uint64 Hash64DoubleWithSeed(double num, uint64 seed) { a *= kMul; return a; } - -#endif // UTIL_HASH_BUILTIN_TYPE_HASH_H_ diff --git a/be/src/gutil/hash/city.h b/be/src/gutil/hash/city.h index 358092ffbc..bcacaa9147 100644 --- a/be/src/gutil/hash/city.h +++ b/be/src/gutil/hash/city.h @@ -18,8 +18,7 @@ // of a+b is easily derived from the hashes of a and b. This property // doesn't hold for any hash functions in this file. -#ifndef UTIL_HASH_CITY_H_ -#define UTIL_HASH_CITY_H_ +#pragma once #include // for size_t. @@ -48,5 +47,3 @@ uint128 CityHash128(const char* s, size_t len); uint128 CityHash128WithSeed(const char* s, size_t len, uint128 seed); } // namespace util_hash - -#endif // UTIL_HASH_CITY_H_ diff --git a/be/src/gutil/hash/hash.h b/be/src/gutil/hash/hash.h index 7595791434..1eee35ab96 100644 --- a/be/src/gutil/hash/hash.h +++ b/be/src/gutil/hash/hash.h @@ -70,8 +70,7 @@ // property. We already have several such functions; see // hash_unittest.cc for the details and unittests. -#ifndef UTIL_HASH_HASH_H_ -#define UTIL_HASH_HASH_H_ +#pragma once #include #include // for uintptr_t @@ -282,5 +281,3 @@ struct GoodFastHash > { static const size_t bucket_size = 4; // These are required by MSVC static const size_t min_buckets = 8; // 4 and 8 are defaults. }; - -#endif // UTIL_HASH_HASH_H_ diff --git a/be/src/gutil/hash/hash128to64.h b/be/src/gutil/hash/hash128to64.h index c65a381721..1bf870a6d6 100644 --- a/be/src/gutil/hash/hash128to64.h +++ b/be/src/gutil/hash/hash128to64.h @@ -1,8 +1,7 @@ // Copyright 2010 Google Inc. All Rights Reserved. // Authors: jyrki@google.com (Jyrki Alakuijala), gpike@google.com (Geoff Pike) -#ifndef UTIL_HASH_HASH128TO64_H_ -#define UTIL_HASH_HASH128TO64_H_ +#pragma once #include "gutil/int128.h" #include "gutil/integral_types.h" @@ -20,5 +19,3 @@ inline uint64 Hash128to64(const uint128& x) { b *= kMul; return b; } - -#endif // UTIL_HASH_HASH128TO64_H_ diff --git a/be/src/gutil/hash/jenkins.h b/be/src/gutil/hash/jenkins.h index 789a6a861c..cbce0e2ee6 100644 --- a/be/src/gutil/hash/jenkins.h +++ b/be/src/gutil/hash/jenkins.h @@ -7,8 +7,7 @@ // consistent hashing libraries. New code which does not explicitly desire this // behavior should use the generic hashing routines in hash.h. -#ifndef UTIL_HASH_JENKINS_H_ -#define UTIL_HASH_JENKINS_H_ +#pragma once #include "gutil/integral_types.h" @@ -35,5 +34,3 @@ uint64 Hash64StringWithSeed(const char* s, uint32 len, uint64 c); // This is a reference implementation of the same fundamental algorithm as // Hash32StringWithSeed. It is used primarily as a performance metric. uint32 Hash32StringWithSeedReferenceImplementation(const char* s, uint32 len, uint32 c); - -#endif // UTIL_HASH_JENKINS_H_ diff --git a/be/src/gutil/hash/jenkins_lookup2.h b/be/src/gutil/hash/jenkins_lookup2.h index 7be68f510b..ee44f23ba6 100644 --- a/be/src/gutil/hash/jenkins_lookup2.h +++ b/be/src/gutil/hash/jenkins_lookup2.h @@ -12,8 +12,7 @@ // word from memory. This relatively generic functionality probably // shouldn't live in this file. -#ifndef UTIL_HASH_JENKINS_LOOKUP2_H_ -#define UTIL_HASH_JENKINS_LOOKUP2_H_ +#pragma once #include "gutil/integral_types.h" #include "gutil/port.h" @@ -185,5 +184,3 @@ static inline uint32 Google1At(const char* ptr2) { // TODO(user): find occurrences of WORD_HASH and adjust the code to // use more meaningful concepts. #define WORD_HASH - -#endif // UTIL_HASH_JENKINS_LOOKUP2_H_ diff --git a/be/src/gutil/hash/legacy_hash.h b/be/src/gutil/hash/legacy_hash.h index c84e4a218a..9dff097031 100644 --- a/be/src/gutil/hash/legacy_hash.h +++ b/be/src/gutil/hash/legacy_hash.h @@ -7,8 +7,7 @@ // New code should use one of the targeted libraries that provide hash // interfaces for the types needed. See //util/hash/README for details. -#ifndef UTIL_HASH_LEGACY_HASH_H_ -#define UTIL_HASH_LEGACY_HASH_H_ +#pragma once #include "gutil/hash/builtin_type_hash.h" #include "gutil/hash/string_hash.h" @@ -79,5 +78,3 @@ inline uint16 HashTo16(const char* s, uint32 slen) { uint16 retval = Hash32StringWithSeed(s, slen, MIX32) >> 16; return retval == kIllegalHash16 ? static_cast(retval - 1) : retval; } - -#endif // UTIL_HASH_LEGACY_HASH_H_ diff --git a/be/src/gutil/hash/string_hash.h b/be/src/gutil/hash/string_hash.h index 2593e60ad5..70f78d0617 100644 --- a/be/src/gutil/hash/string_hash.h +++ b/be/src/gutil/hash/string_hash.h @@ -8,8 +8,7 @@ // speed. Their values can and will change as their implementations change and // evolve. -#ifndef UTIL_HASH_STRING_HASH_H_ -#define UTIL_HASH_STRING_HASH_H_ +#pragma once #include @@ -76,5 +75,3 @@ inline size_t HashStringThoroughlyWithSeeds(const char* s, size_t len, size_t se mix(a, b, c); return c; } - -#endif // UTIL_HASH_STRING_HASH_H_ diff --git a/be/src/gutil/int128.h b/be/src/gutil/int128.h index 4a80366d1c..62f1581325 100644 --- a/be/src/gutil/int128.h +++ b/be/src/gutil/int128.h @@ -2,8 +2,7 @@ // All Rights Reserved. // -#ifndef BASE_INT128_H_ -#define BASE_INT128_H_ +#pragma once #include using std::ostream; @@ -327,5 +326,3 @@ inline uint128& uint128::operator--() { *this -= 1; return *this; } - -#endif // BASE_INT128_H_ diff --git a/be/src/gutil/macros.h b/be/src/gutil/macros.h index dfebbf0b12..1a176f73b9 100644 --- a/be/src/gutil/macros.h +++ b/be/src/gutil/macros.h @@ -7,8 +7,7 @@ // any changes here, make sure that you're not breaking any platforms. // -#ifndef BASE_MACROS_H_ -#define BASE_MACROS_H_ +#pragma once #include // For size_t @@ -283,5 +282,3 @@ enum LinkerInitialized { LINKER_INITIALIZED }; static_assert(std::is_pointer::value == true, #ptr " must be a pointer"); \ (ptr) = (expr); \ } while ((ptr) == nullptr && errno == EINTR) - -#endif // BASE_MACROS_H_ diff --git a/be/src/gutil/map-util.h b/be/src/gutil/map-util.h index 12b8205fec..2f420ae22d 100644 --- a/be/src/gutil/map-util.h +++ b/be/src/gutil/map-util.h @@ -59,8 +59,7 @@ // has a key of "foo" (type: string) with a value of 3 (type: int). // -#ifndef UTIL_GTL_MAP_UTIL_H_ -#define UTIL_GTL_MAP_UTIL_H_ +#pragma once #include #include @@ -866,5 +865,3 @@ typename MapContainer::mapped_type* const ComputePairIfAbsent( compute_pair_func) .first; }; - -#endif // UTIL_GTL_MAP_UTIL_H_ diff --git a/be/src/gutil/move.h b/be/src/gutil/move.h index 129c3f4e2e..ec19de7095 100644 --- a/be/src/gutil/move.h +++ b/be/src/gutil/move.h @@ -1,10 +1,6 @@ // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - -#ifndef BASE_MOVE_H_ -#define BASE_MOVE_H_ - // Macro with the boilerplate that makes a type move-only in C++03. // // USAGE @@ -201,6 +197,9 @@ // // The workaround is to explicitly declare your copy constructor. // + +#pragma once + #define MOVE_ONLY_TYPE_FOR_CPP_03(type, rvalue_type) \ private: \ struct rvalue_type { \ @@ -216,5 +215,3 @@ public: \ typedef void MoveOnlyTypeForCPP03; \ \ private: - -#endif // BASE_MOVE_H_ diff --git a/be/src/gutil/once.h b/be/src/gutil/once.h index 31eed46d64..fcc6b19373 100644 --- a/be/src/gutil/once.h +++ b/be/src/gutil/once.h @@ -21,8 +21,7 @@ // ... // } -#ifndef BASE_ONCE_H_ -#define BASE_ONCE_H_ +#pragma once #include "gutil/atomicops.h" #include "gutil/dynamic_annotations.h" @@ -115,5 +114,3 @@ private: Atomic32 state_; DISALLOW_COPY_AND_ASSIGN(GoogleOnceDynamic); }; - -#endif // BASE_ONCE_H_ diff --git a/be/src/gutil/port.h b/be/src/gutil/port.h index 0750d4bf58..0139decadd 100644 --- a/be/src/gutil/port.h +++ b/be/src/gutil/port.h @@ -5,8 +5,7 @@ // These are weird things we need to do to get this compiling on // random systems (and on SWIG). -#ifndef BASE_PORT_H_ -#define BASE_PORT_H_ +#pragma once #include // So we can set the bounds of our types #include // for free() @@ -1198,5 +1197,3 @@ enum { kPlatformUsesOPDSections = 1 }; enum { kPlatformUsesOPDSections = 0 }; #define FUNC_PTR_TO_CHAR_PTR(func) (reinterpret_cast(func)) #endif - -#endif // BASE_PORT_H_ diff --git a/be/src/gutil/ref_counted.h b/be/src/gutil/ref_counted.h index b7d82cc602..210ea3ad6c 100644 --- a/be/src/gutil/ref_counted.h +++ b/be/src/gutil/ref_counted.h @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BASE_MEMORY_REF_COUNTED_H_ -#define BASE_MEMORY_REF_COUNTED_H_ +#pragma once #include #include @@ -342,5 +341,3 @@ template struct ScopedRefPtrHashFunctor { size_t operator()(const scoped_refptr& p) const { return reinterpret_cast(p.get()); } }; - -#endif // BASE_MEMORY_REF_COUNTED_H_ diff --git a/be/src/gutil/spinlock_internal.h b/be/src/gutil/spinlock_internal.h index 78fa496871..1deba49d2a 100644 --- a/be/src/gutil/spinlock_internal.h +++ b/be/src/gutil/spinlock_internal.h @@ -33,8 +33,7 @@ * It may not be used directly by code outside of //base. */ -#ifndef BASE_SPINLOCK_INTERNAL_H_ -#define BASE_SPINLOCK_INTERNAL_H_ +#pragma once #include "gutil/atomicops.h" #include "gutil/basictypes.h" @@ -60,4 +59,3 @@ void SpinLockDelay(volatile Atomic32* w, int32 value, int loop); } // namespace internal } // namespace base -#endif diff --git a/be/src/gutil/stl_util.h b/be/src/gutil/stl_util.h index 7e007fe081..6ef7ea3ce5 100644 --- a/be/src/gutil/stl_util.h +++ b/be/src/gutil/stl_util.h @@ -25,8 +25,7 @@ // and Google friendly API. // -#ifndef UTIL_GTL_STL_UTIL_H_ -#define UTIL_GTL_STL_UTIL_H_ +#pragma once #include #include // for memcpy @@ -899,5 +898,3 @@ T* release_ptr(T** ptr) { *ptr = NULL; return tmp; } - -#endif // UTIL_GTL_STL_UTIL_H_ diff --git a/be/src/gutil/stringprintf.h b/be/src/gutil/stringprintf.h index ccbfbf4f3f..790faaa3be 100644 --- a/be/src/gutil/stringprintf.h +++ b/be/src/gutil/stringprintf.h @@ -7,8 +7,7 @@ // SStringPrintf(&result, "%d %s\n", 10, "hello"); // StringAppendF(&result, "%d %s\n", 20, "there"); -#ifndef _BASE_STRINGPRINTF_H -#define _BASE_STRINGPRINTF_H +#pragma once #include @@ -45,5 +44,3 @@ extern const int kStringPrintfVectorMaxArgs; // you don't know how many arguments you'll have at compile time. // StringPrintfVector will LOG(FATAL) if v.size() > kStringPrintfVectorMaxArgs extern string StringPrintfVector(const char* format, const vector& v); - -#endif /* _BASE_STRINGPRINTF_H */ diff --git a/be/src/gutil/strings/ascii_ctype.h b/be/src/gutil/strings/ascii_ctype.h index 62f0f28b33..6d946a2889 100644 --- a/be/src/gutil/strings/ascii_ctype.h +++ b/be/src/gutil/strings/ascii_ctype.h @@ -21,8 +21,7 @@ // (including numerical values greater than 127) // then the output is the same as the input. -#ifndef STRINGS_ASCII_CTYPE_H_ -#define STRINGS_ASCII_CTYPE_H_ +#pragma once // Array of character information. This is an implementation detail. // The individual bits do not have names because the array definition is @@ -89,5 +88,3 @@ extern const unsigned char kAsciiToUpper[256]; static inline char ascii_toupper(unsigned char c) { return kAsciiToUpper[c]; } - -#endif // STRINGS_ASCII_CTYPE_H_ diff --git a/be/src/gutil/strings/charset.h b/be/src/gutil/strings/charset.h index 727c2400d3..482e9b5a24 100644 --- a/be/src/gutil/strings/charset.h +++ b/be/src/gutil/strings/charset.h @@ -1,7 +1,6 @@ // Copyright 2008 Google Inc. All Rights Reserved. -#ifndef STRINGS_CHARSET_H_ -#define STRINGS_CHARSET_H_ +#pragma once #include "gutil/integral_types.h" @@ -67,5 +66,3 @@ private: }; } // namespace strings - -#endif // STRINGS_CHARSET_H_ diff --git a/be/src/gutil/strings/escaping.h b/be/src/gutil/strings/escaping.h index 2ab0db7da9..ba0dd9043d 100644 --- a/be/src/gutil/strings/escaping.h +++ b/be/src/gutil/strings/escaping.h @@ -18,8 +18,7 @@ // - see RE2::QuoteMeta). // And probably many more places, as well. -#ifndef STRINGS_ESCAPING_H_ -#define STRINGS_ESCAPING_H_ +#pragma once #include @@ -650,5 +649,3 @@ using strings::ShellEscapeCommandLine; using strings::ByteStringFromAscii; using strings::ByteStringToAscii; using strings::CleanStringLineEndings; - -#endif // STRINGS_ESCAPING_H_ diff --git a/be/src/gutil/strings/fastmem.h b/be/src/gutil/strings/fastmem.h index db5696482d..dafc6c4a93 100644 --- a/be/src/gutil/strings/fastmem.h +++ b/be/src/gutil/strings/fastmem.h @@ -14,8 +14,7 @@ // Analysis: memcmp, fastmemcmp_inlined, fastmemcmp // 2012-01-30 -#ifndef STRINGS_FASTMEM_H_ -#define STRINGS_FASTMEM_H_ +#pragma once #include #include @@ -158,5 +157,3 @@ inline void memcpy_inlined(void* dst, const void* src, size_t size) { } } // namespace strings - -#endif // STRINGS_FASTMEM_H_ diff --git a/be/src/gutil/strings/join.h b/be/src/gutil/strings/join.h index 115e4aace5..2a42104303 100644 --- a/be/src/gutil/strings/join.h +++ b/be/src/gutil/strings/join.h @@ -4,8 +4,7 @@ // #category: operations on strings // #summary: Functions for joining strings and numbers using a delimiter. // -#ifndef STRINGS_JOIN_H_ -#define STRINGS_JOIN_H_ +#pragma once #include #include @@ -321,5 +320,3 @@ template inline string JoinInts(const CONTAINER& components, const char* delim) { return JoinElements(components, delim); } - -#endif // STRINGS_JOIN_H_ diff --git a/be/src/gutil/strings/memutil.h b/be/src/gutil/strings/memutil.h index ee0eeb774b..0ea0fb190c 100644 --- a/be/src/gutil/strings/memutil.h +++ b/be/src/gutil/strings/memutil.h @@ -50,8 +50,7 @@ // -- MEMCASEIS // strcount MEMCOUNT (strcount is from strutil.h) -#ifndef STRINGS_MEMUTIL_H_ -#define STRINGS_MEMUTIL_H_ +#pragma once #include #include // to get the POSIX mem*() routines @@ -134,5 +133,3 @@ inline int memcount(const char* buf, size_t len, char c) { } return num; } - -#endif // STRINGS_MEMUTIL_H_ diff --git a/be/src/gutil/strings/numbers.h b/be/src/gutil/strings/numbers.h index 01540d2900..52d766570c 100644 --- a/be/src/gutil/strings/numbers.h +++ b/be/src/gutil/strings/numbers.h @@ -3,8 +3,7 @@ // // Convert strings to numbers or numbers to strings. -#ifndef STRINGS_NUMBERS_H_ -#define STRINGS_NUMBERS_H_ +#pragma once #include #include @@ -571,5 +570,3 @@ bool ParseDoubleRange(const char* text, int len, const char** end, double* from, // inline string UInt64ToString(uint64 ui64) { // return StringPrintf("%7" PRIu64, ui64); // } - -#endif // STRINGS_NUMBERS_H_ diff --git a/be/src/gutil/strings/split.h b/be/src/gutil/strings/split.h index c7ca1e13f4..7889a5a8a6 100644 --- a/be/src/gutil/strings/split.h +++ b/be/src/gutil/strings/split.h @@ -17,12 +17,12 @@ // (3) (Optional) Replace old Split*() API calls at call sites with calls to new // Split() API. // -#ifndef STRINGS_SPLIT_H_ -#define STRINGS_SPLIT_H_ +#pragma once #include #include + using std::copy; using std::max; using std::min; @@ -1143,5 +1143,3 @@ bool SplitStringAndParseToList(StringPiece source, StringPiece delim, // END DOXYGEN SplitFunctions grouping /* @} */ - -#endif // STRINGS_SPLIT_H_ diff --git a/be/src/gutil/strings/split_internal.h b/be/src/gutil/strings/split_internal.h index 5c3f817eba..e682175a0e 100644 --- a/be/src/gutil/strings/split_internal.h +++ b/be/src/gutil/strings/split_internal.h @@ -14,8 +14,7 @@ // // IWYU pragma: private, include "strings/split.h" -#ifndef STRINGS_SPLIT_INTERNAL_H_ -#define STRINGS_SPLIT_INTERNAL_H_ +#pragma once #include using std::back_insert_iterator; @@ -389,5 +388,3 @@ private: } // namespace internal } // namespace strings - -#endif // STRINGS_SPLIT_INTERNAL_H_ diff --git a/be/src/gutil/strings/strcat.h b/be/src/gutil/strings/strcat.h index 819db4fd84..f9a3dba656 100644 --- a/be/src/gutil/strings/strcat.h +++ b/be/src/gutil/strings/strcat.h @@ -4,8 +4,7 @@ // #category: operations on strings // #summary: Merges strings or numbers with no delimiter. // -#ifndef STRINGS_STRCAT_H_ -#define STRINGS_STRCAT_H_ +#pragma once #include using std::string; @@ -332,5 +331,3 @@ void StrAppend(string* dest, const AlphaNum& a, const AlphaNum& b, const AlphaNu const AlphaNum& d, const AlphaNum& e, const AlphaNum& f = gEmptyAlphaNum, const AlphaNum& g = gEmptyAlphaNum, const AlphaNum& h = gEmptyAlphaNum, const AlphaNum& i = gEmptyAlphaNum); - -#endif // STRINGS_STRCAT_H_ diff --git a/be/src/gutil/strings/stringpiece.h b/be/src/gutil/strings/stringpiece.h index c76ecf5345..99ef3b6fde 100644 --- a/be/src/gutil/strings/stringpiece.h +++ b/be/src/gutil/strings/stringpiece.h @@ -109,8 +109,7 @@ // (3) A null StringPiece is empty. // An empty StringPiece may or may not be a null StringPiece. -#ifndef STRINGS_STRINGPIECE_H_ -#define STRINGS_STRINGPIECE_H_ +#pragma once #include #include @@ -361,5 +360,3 @@ struct GoodFastHash { // allow StringPiece to be logged extern ostream& operator<<(ostream& o, StringPiece piece); - -#endif // STRINGS_STRINGPIECE_H__ diff --git a/be/src/gutil/strings/strip.h b/be/src/gutil/strings/strip.h index e18bea2999..b9c8d59c42 100644 --- a/be/src/gutil/strings/strip.h +++ b/be/src/gutil/strings/strip.h @@ -4,8 +4,7 @@ // This file contains functions that remove a defined part from the string, // i.e., strip the string. -#ifndef STRINGS_STRIP_H_ -#define STRINGS_STRIP_H_ +#pragma once #include @@ -258,5 +257,3 @@ int memrm(char* str, int strlen, char c); // ---------------------------------------------------------------------- int strrmm(char* str, const char* chars); int strrmm(string* str, const string& chars); - -#endif // STRINGS_STRIP_H_ diff --git a/be/src/gutil/strings/substitute.h b/be/src/gutil/strings/substitute.h index a6bbcde625..f1b5320bf1 100644 --- a/be/src/gutil/strings/substitute.h +++ b/be/src/gutil/strings/substitute.h @@ -1,5 +1,7 @@ // Copyright 2008 Google Inc. All rights reserved. +#pragma once + #include #include @@ -9,9 +11,6 @@ using std::string; #include "gutil/strings/numbers.h" #include "gutil/strings/stringpiece.h" -#ifndef STRINGS_SUBSTITUTE_H_ -#define STRINGS_SUBSTITUTE_H_ - namespace strings { // ---------------------------------------------------------------------- @@ -179,5 +178,3 @@ inline string Substitute(StringPiece format, } } // namespace strings - -#endif // STRINGS_SUBSTITUTE_H_ diff --git a/be/src/gutil/strings/util.h b/be/src/gutil/strings/util.h index fecec84f68..92db70f663 100644 --- a/be/src/gutil/strings/util.h +++ b/be/src/gutil/strings/util.h @@ -23,8 +23,7 @@ // or various forms of equivalence and normalization), take a look at // files in i18n/utf8. -#ifndef STRINGS_UTIL_H_ -#define STRINGS_UTIL_H_ +#pragma once #include #include @@ -482,5 +481,3 @@ int SafeSnprintf(char* str, size_t size, const char* format, ...) PRINTF_ATTRIBU // file, but doesn't copy it into *str. Returns true if read a delim-terminated // line, or false on end-of-file or error. bool GetlineFromStdioFile(FILE* file, string* str, char delim); - -#endif // STRINGS_UTIL_H_ diff --git a/be/src/gutil/strtoint.h b/be/src/gutil/strtoint.h index c253b93503..3c7cb87be2 100644 --- a/be/src/gutil/strtoint.h +++ b/be/src/gutil/strtoint.h @@ -27,8 +27,7 @@ // to provide the right overflow and errno behavior. // -#ifndef BASE_STRTOINT_H_ -#define BASE_STRTOINT_H_ +#pragma once #include // For strtol* functions. #include @@ -88,5 +87,3 @@ inline int32 atoi32(const string& s) { inline int64 atoi64(const string& s) { return atoi64(s.c_str()); } - -#endif // BASE_STRTOINT_H_ diff --git a/be/src/gutil/sysinfo.h b/be/src/gutil/sysinfo.h index 49069398d6..d9da553089 100644 --- a/be/src/gutil/sysinfo.h +++ b/be/src/gutil/sysinfo.h @@ -28,8 +28,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef _SYSINFO_H_ -#define _SYSINFO_H_ +#pragma once #include @@ -66,4 +65,3 @@ extern double CyclesPerSecond(void); extern int ParseMaxCpuIndex(const char* str); } // namespace base -#endif /* #ifndef _SYSINFO_H_ */ diff --git a/be/src/gutil/template_util.h b/be/src/gutil/template_util.h index fa24511072..4ba043a2ab 100644 --- a/be/src/gutil/template_util.h +++ b/be/src/gutil/template_util.h @@ -46,8 +46,7 @@ // Both of these outcomes means that we may be able to directly replace // some of these with boost equivalents. // -#ifndef BASE_TEMPLATE_UTIL_H_ -#define BASE_TEMPLATE_UTIL_H_ +#pragma once namespace base { @@ -158,5 +157,3 @@ template struct is_class : integral_constant(0)) == sizeof(YesType)> {}; } // namespace base - -#endif // BASE_TEMPLATE_UTIL_H_ diff --git a/be/src/gutil/threading/thread_collision_warner.h b/be/src/gutil/threading/thread_collision_warner.h index 1007b7538d..7682a7f096 100644 --- a/be/src/gutil/threading/thread_collision_warner.h +++ b/be/src/gutil/threading/thread_collision_warner.h @@ -2,8 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BASE_THREADING_THREAD_COLLISION_WARNER_H_ -#define BASE_THREADING_THREAD_COLLISION_WARNER_H_ +#pragma once #include @@ -224,5 +223,3 @@ private: }; } // namespace base - -#endif // BASE_THREADING_THREAD_COLLISION_WARNER_H_ diff --git a/be/src/gutil/walltime.h b/be/src/gutil/walltime.h index 5358af0333..e54401883f 100644 --- a/be/src/gutil/walltime.h +++ b/be/src/gutil/walltime.h @@ -16,8 +16,8 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -#ifndef GUTIL_WALLTIME_H_ -#define GUTIL_WALLTIME_H_ + +#pragma once #include @@ -204,4 +204,3 @@ private: // inline method bodies #include "gutil/cycleclock-inl.h" // IWYU pragma: export -#endif // GUTIL_WALLTIME_H_ diff --git a/be/src/http/action/checksum_action.h b/be/src/http/action/checksum_action.h index 386b74d58f..441c302cb1 100644 --- a/be/src/http/action/checksum_action.h +++ b/be/src/http/action/checksum_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_CHECKSUM_ACTION_H -#define DORIS_BE_SRC_HTTP_CHECKSUM_ACTION_H +#pragma once #include @@ -39,4 +38,3 @@ private: }; // end class ChecksumAction } // end namespace doris -#endif // DORIS_BE_SRC_COMMON_UTIL_DOWNLOAD_ACTION_H diff --git a/be/src/http/action/download_action.h b/be/src/http/action/download_action.h index ae988ffdb2..944c422fc6 100644 --- a/be/src/http/action/download_action.h +++ b/be/src/http/action/download_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_DOWNLOAD_ACTION_H -#define DORIS_BE_SRC_HTTP_DOWNLOAD_ACTION_H +#pragma once #include "exec/scan_node.h" #include "http/http_handler.h" @@ -63,4 +62,3 @@ private: }; // end class DownloadAction } // end namespace doris -#endif // DORIS_BE_SRC_HTTP_DOWNLOAD_ACTION_H diff --git a/be/src/http/action/health_action.h b/be/src/http/action/health_action.h index 658e950627..c105cb2e77 100644 --- a/be/src/http/action/health_action.h +++ b/be/src/http/action/health_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H -#define DORIS_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H +#pragma once #include "http/http_handler.h" @@ -35,5 +34,3 @@ public: }; } // end namespace doris - -#endif // DORIS_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H diff --git a/be/src/http/action/meta_action.h b/be/src/http/action/meta_action.h index 720b3b82ca..1ed9e11229 100644 --- a/be/src/http/action/meta_action.h +++ b/be/src/http/action/meta_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_ACTION_META_ACTION_H -#define DORIS_BE_SRC_HTTP_ACTION_META_ACTION_H +#pragma once #include "common/status.h" #include "http/http_handler.h" @@ -46,5 +45,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_HTTP_ACTION_META_ACTION_H diff --git a/be/src/http/action/mini_load.h b/be/src/http/action/mini_load.h index ac3f292060..a21a450f19 100644 --- a/be/src/http/action/mini_load.h +++ b/be/src/http/action/mini_load.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_MINI_LOAD_H -#define DORIS_BE_SRC_COMMON_UTIL_MINI_LOAD_H +#pragma once #include #include @@ -108,4 +107,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/http/action/monitor_action.h b/be/src/http/action/monitor_action.h index f51f51c99c..8d3f1c87d7 100644 --- a/be/src/http/action/monitor_action.h +++ b/be/src/http/action/monitor_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_MONITOR_ACTION_H -#define DORIS_BE_SRC_COMMON_UTIL_MONITOR_ACTION_H +#pragma once #include #include @@ -44,5 +43,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/http/action/pprof_actions.h b/be/src/http/action/pprof_actions.h index cbe89fe566..7e45f3cf77 100644 --- a/be/src/http/action/pprof_actions.h +++ b/be/src/http/action/pprof_actions.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_ACTION_PPROF_ACTIONS_H -#define DORIS_BE_SRC_HTTP_ACTION_PPROF_ACTIONS_H +#pragma once #include "common/status.h" @@ -32,5 +31,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/http/action/reload_tablet_action.h b/be/src/http/action/reload_tablet_action.h index cf518d3059..5338131224 100644 --- a/be/src/http/action/reload_tablet_action.h +++ b/be/src/http/action/reload_tablet_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_RELOAD_TABLET_ACTION_H -#define DORIS_BE_SRC_HTTP_RELOAD_TABLET_ACTION_H +#pragma once #include "gen_cpp/AgentService_types.h" #include "http/http_handler.h" @@ -41,4 +40,3 @@ private: }; // end class ReloadTabletAction } // end namespace doris -#endif // DORIS_BE_SRC_COMMON_UTIL_DOWNLOAD_ACTION_H diff --git a/be/src/http/action/restore_tablet_action.h b/be/src/http/action/restore_tablet_action.h index 182531f3ad..7cae5ff70a 100644 --- a/be/src/http/action/restore_tablet_action.h +++ b/be/src/http/action/restore_tablet_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H -#define DORIS_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H +#pragma once #include #include @@ -65,4 +64,3 @@ private: }; // end class RestoreTabletAction } // end namespace doris -#endif // DORIS_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H diff --git a/be/src/http/action/snapshot_action.h b/be/src/http/action/snapshot_action.h index 673d761182..93b41de193 100644 --- a/be/src/http/action/snapshot_action.h +++ b/be/src/http/action/snapshot_action.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_HTTP_SNAPSHOT_ACTION_H -#define DORIS_BE_SRC_HTTP_SNAPSHOT_ACTION_H +#pragma once #include #include @@ -42,4 +41,3 @@ private: }; // end class SnapshotAction } // end namespace doris -#endif // DORIS_BE_SRC_HTTP_SNAPSHOT_ACTION_H diff --git a/be/src/http/default_path_handlers.h b/be/src/http/default_path_handlers.h index 0fbf3f75ff..b1a233b5cd 100644 --- a/be/src/http/default_path_handlers.h +++ b/be/src/http/default_path_handlers.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_DEFAULT_PATH_HANDLERS_H -#define DORIS_BE_SRC_COMMON_UTIL_DEFAULT_PATH_HANDLERS_H +#pragma once #include @@ -32,5 +31,3 @@ class WebPageHandler; void add_default_path_handlers(WebPageHandler* web_page_handler, const std::shared_ptr& process_mem_tracker); } // namespace doris - -#endif // IMPALA_UTIL_DEFAULT_PATH_HANDLERS_H diff --git a/be/src/http/http_channel.h b/be/src/http/http_channel.h index 0964ec51a2..83b696a409 100644 --- a/be/src/http/http_channel.h +++ b/be/src/http/http_channel.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_CHANNEL_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_CHANNEL_H +#pragma once #include #include @@ -52,5 +51,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/http/http_client.h b/be/src/http/http_client.h index c03275aa3e..824230bfc3 100644 --- a/be/src/http/http_client.h +++ b/be/src/http/http_client.h @@ -27,6 +27,7 @@ #include "http/http_method.h" #include "http/http_response.h" #include "http/utils.h" + namespace doris { // Helper class to access HTTP resource diff --git a/be/src/http/http_handler.h b/be/src/http/http_handler.h index 75a2b1a6b8..c2c108f1a0 100644 --- a/be/src/http/http_handler.h +++ b/be/src/http/http_handler.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_HANDLER_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_HANDLER_H +#pragma once namespace doris { @@ -42,5 +41,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/http/http_headers.h b/be/src/http/http_headers.h index 3257c9a604..e2f9547ac9 100644 --- a/be/src/http/http_headers.h +++ b/be/src/http/http_headers.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_HEADERS_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_HEADERS_H +#pragma once #include @@ -102,5 +101,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/http/http_method.h b/be/src/http/http_method.h index 9539796700..492aa1cde6 100644 --- a/be/src/http/http_method.h +++ b/be/src/http/http_method.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_METHOD_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_METHOD_H +#pragma once #include @@ -53,4 +52,3 @@ inline HttpMethod to_http_method(evhttp_cmd_type type) { std::string to_method_desc(const HttpMethod& method); } // namespace doris -#endif diff --git a/be/src/http/http_parser.h b/be/src/http/http_parser.h index 6d4b1d445c..304a6a9ac9 100644 --- a/be/src/http/http_parser.h +++ b/be/src/http/http_parser.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_PARSER_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_PARSER_H +#pragma once #include #include @@ -63,5 +62,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/http/http_request.h b/be/src/http/http_request.h index b7cafe2932..81085f7cce 100644 --- a/be/src/http/http_request.h +++ b/be/src/http/http_request.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_REQUEST_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_REQUEST_H +#pragma once #include @@ -102,5 +101,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/http/http_response.h b/be/src/http/http_response.h index d54041c53f..b97c8c7c11 100644 --- a/be/src/http/http_response.h +++ b/be/src/http/http_response.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_RESPONSE_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_RESPONSE_H +#pragma once #include #include @@ -58,5 +57,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/http/http_status.h b/be/src/http/http_status.h index 4aab75b0f2..c6d8e21712 100644 --- a/be/src/http/http_status.h +++ b/be/src/http/http_status.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_STATUS_H -#define DORIS_BE_SRC_COMMON_UTIL_HTTP_STATUS_H +#pragma once #include @@ -70,5 +69,3 @@ std::string to_code(const HttpStatus& status); std::string default_reason(const HttpStatus& status); } // namespace doris - -#endif diff --git a/be/src/http/rest_monitor_iface.h b/be/src/http/rest_monitor_iface.h index 18e63a55d1..a421d52e2a 100644 --- a/be/src/http/rest_monitor_iface.h +++ b/be/src/http/rest_monitor_iface.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_UTIL_REST_MONITOR_IFACE_H -#define DORIS_BE_UTIL_REST_MONITOR_IFACE_H +#pragma once #include @@ -32,5 +31,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/http/web_page_handler.h b/be/src/http/web_page_handler.h index c1863d9c1b..e55197a716 100644 --- a/be/src/http/web_page_handler.h +++ b/be/src/http/web_page_handler.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_WEB_PAGE_HANDLER_H -#define DORIS_BE_SRC_COMMON_UTIL_WEB_PAGE_HANDLER_H +#pragma once #include #include @@ -121,5 +120,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/buffer_control_block.h b/be/src/runtime/buffer_control_block.h index 921c54f2fd..c5c898259a 100644 --- a/be/src/runtime/buffer_control_block.h +++ b/be/src/runtime/buffer_control_block.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_BUFFER_CONTROL_BLOCK_H -#define DORIS_BE_RUNTIME_BUFFER_CONTROL_BLOCK_H +#pragma once #include #include @@ -129,5 +128,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/buffered_block_mgr2.h b/be/src/runtime/buffered_block_mgr2.h index d3f840020d..c4b08c181b 100644 --- a/be/src/runtime/buffered_block_mgr2.h +++ b/be/src/runtime/buffered_block_mgr2.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/buffered-block-mgr2.h // and modified by Doris -#ifndef DORIS_BE_SRC_RUNTIME_BUFFERED_BLOCK_MGR2_H -#define DORIS_BE_SRC_RUNTIME_BUFFERED_BLOCK_MGR2_H +#pragma once #include @@ -628,5 +627,3 @@ private: }; // class BufferedBlockMgr2 } // end namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_BUFFERED_BLOCK_MGR2_H diff --git a/be/src/runtime/buffered_tuple_stream2.h b/be/src/runtime/buffered_tuple_stream2.h index 25ae4c85af..7d16ad3441 100644 --- a/be/src/runtime/buffered_tuple_stream2.h +++ b/be/src/runtime/buffered_tuple_stream2.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.10.0/be/src/runtime/buffered-tuple-stream.h // and modified by Doris -#ifndef DORIS_BE_SRC_RUNTIME_BUFFERED_TUPLE_STREAM2_H -#define DORIS_BE_SRC_RUNTIME_BUFFERED_TUPLE_STREAM2_H +#pragma once #include @@ -411,5 +410,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_BUFFERED_TUPLE_STREAM2_H diff --git a/be/src/runtime/buffered_tuple_stream2.inline.h b/be/src/runtime/buffered_tuple_stream2.inline.h index 3b3a76105a..99add39b83 100644 --- a/be/src/runtime/buffered_tuple_stream2.inline.h +++ b/be/src/runtime/buffered_tuple_stream2.inline.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.10.0/be/src/runtime/buffered-tuple-stream.inline.h // and modified by Doris -#ifndef DORIS_BE_SRC_RUNTIME_BUFFERED_TUPLE_STREAM2_INLINE_H -#define DORIS_BE_SRC_RUNTIME_BUFFERED_TUPLE_STREAM2_INLINE_H +#pragma once #include "runtime/buffered_tuple_stream2.h" #include "runtime/descriptors.h" @@ -89,5 +88,3 @@ inline void BufferedTupleStream2::get_tuple_row(const RowIdx& idx, TupleRow* row } } // namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_BUFFERED_TUPLE_STREAM2_INLINE_H diff --git a/be/src/runtime/buffered_tuple_stream3.h b/be/src/runtime/buffered_tuple_stream3.h index 73dc9959c0..9af6d21034 100644 --- a/be/src/runtime/buffered_tuple_stream3.h +++ b/be/src/runtime/buffered_tuple_stream3.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-3.0.0/be/src/runtime/buffered-tuple-stream.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_BUFFERED_TUPLE_STREAM_H -#define DORIS_BE_RUNTIME_BUFFERED_TUPLE_STREAM_H +#pragma once #include #include @@ -690,5 +689,3 @@ private: void CheckPageConsistency(const Page* page) const; }; } // namespace doris - -#endif diff --git a/be/src/runtime/buffered_tuple_stream3.inline.h b/be/src/runtime/buffered_tuple_stream3.inline.h index d4b57ea4be..7670e764a0 100644 --- a/be/src/runtime/buffered_tuple_stream3.inline.h +++ b/be/src/runtime/buffered_tuple_stream3.inline.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-3.0.0/be/src/runtime/buffered-tuple-stream.inline.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_BUFFERED_TUPLE_STREAM_INLINE_H -#define DORIS_BE_RUNTIME_BUFFERED_TUPLE_STREAM_INLINE_H +#pragma once #include "runtime/buffered_tuple_stream3.h" #include "runtime/descriptors.h" @@ -54,5 +53,3 @@ inline void BufferedTupleStream3::AddRowCustomEnd(int64_t size) { if (UNLIKELY(size > default_page_len_)) AddLargeRowCustomEnd(size); } } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/buffer_allocator.h b/be/src/runtime/bufferpool/buffer_allocator.h index d5059c4505..122e00e57b 100644 --- a/be/src/runtime/bufferpool/buffer_allocator.h +++ b/be/src/runtime/bufferpool/buffer_allocator.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_BUFFER_ALLOCATOR_H -#define DORIS_BE_RUNTIME_BUFFER_ALLOCATOR_H +#pragma once #include "runtime/bufferpool/buffer_pool_internal.h" #include "runtime/bufferpool/free_list.h" @@ -240,5 +239,3 @@ private: std::shared_ptr _mem_tracker; }; } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/buffer_pool.h b/be/src/runtime/bufferpool/buffer_pool.h index 83aef1fdcb..dd13fde8ae 100644 --- a/be/src/runtime/bufferpool/buffer_pool.h +++ b/be/src/runtime/bufferpool/buffer_pool.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_BUFFER_POOL_H -#define DORIS_BE_RUNTIME_BUFFER_POOL_H +#pragma once #include @@ -28,7 +27,6 @@ #include "common/status.h" #include "gutil/dynamic_annotations.h" #include "gutil/macros.h" -//#include "runtime/tmp_file_mgr.h" #include "util/aligned_new.h" #include "util/internal_queue.h" #include "util/mem_range.h" @@ -542,5 +540,3 @@ inline void BufferPool::BufferHandle::Reset() { home_core_ = -1; } } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/buffer_pool_internal.h b/be/src/runtime/bufferpool/buffer_pool_internal.h index d7231b1157..705c7f2f1d 100644 --- a/be/src/runtime/bufferpool/buffer_pool_internal.h +++ b/be/src/runtime/bufferpool/buffer_pool_internal.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_BUFFER_POOL_INTERNAL_H -#define DORIS_BE_RUNTIME_BUFFER_POOL_INTERNAL_H +#pragma once #include #include @@ -315,5 +314,3 @@ private: PageList in_flight_write_pages_; }; } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/free_list.h b/be/src/runtime/bufferpool/free_list.h index d373b03678..7121033de8 100644 --- a/be/src/runtime/bufferpool/free_list.h +++ b/be/src/runtime/bufferpool/free_list.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_BUFFERPOOL_FREE_LIST_H -#define DORIS_BE_RUNTIME_BUFFERPOOL_FREE_LIST_H +#pragma once #include #include @@ -114,5 +113,3 @@ private: std::vector free_list_; }; } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/reservation_tracker.h b/be/src/runtime/bufferpool/reservation_tracker.h index 997c16e51e..0f01d55d02 100644 --- a/be/src/runtime/bufferpool/reservation_tracker.h +++ b/be/src/runtime/bufferpool/reservation_tracker.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_RESERVATION_TRACKER_H -#define DORIS_BE_RUNTIME_RESERVATION_TRACKER_H +#pragma once #include @@ -289,5 +288,3 @@ private: int64_t used_reservation_; }; } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/reservation_tracker_counters.h b/be/src/runtime/bufferpool/reservation_tracker_counters.h index 01489c442b..4383c6819c 100644 --- a/be/src/runtime/bufferpool/reservation_tracker_counters.h +++ b/be/src/runtime/bufferpool/reservation_tracker_counters.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_RESERVATION_TRACKER_COUNTERS_H -#define DORIS_BE_RUNTIME_RESERVATION_TRACKER_COUNTERS_H +#pragma once #include "util/runtime_profile.h" @@ -37,5 +36,3 @@ struct ReservationTrackerCounters { RuntimeProfile::Counter* reservation_limit; }; } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/reservation_util.h b/be/src/runtime/bufferpool/reservation_util.h index 96e6808f26..606e2f6475 100644 --- a/be/src/runtime/bufferpool/reservation_util.h +++ b/be/src/runtime/bufferpool/reservation_util.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_BUFFERPOOL_RESERVATION_UTIL_H_ -#define DORIS_BE_RUNTIME_BUFFERPOOL_RESERVATION_UTIL_H_ +#pragma once #include @@ -70,5 +69,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/suballocator.h b/be/src/runtime/bufferpool/suballocator.h index 681ddc3345..eb5fd0d1fb 100644 --- a/be/src/runtime/bufferpool/suballocator.h +++ b/be/src/runtime/bufferpool/suballocator.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef IMPALA_RUNTIME_BUFFERPOOL_SUBALLOCATOR_H -#define IMPALA_RUNTIME_BUFFERPOOL_SUBALLOCATOR_H +#pragma once #include #include @@ -220,5 +219,3 @@ private: bool in_use_; }; } // namespace doris - -#endif diff --git a/be/src/runtime/bufferpool/system_allocator.h b/be/src/runtime/bufferpool/system_allocator.h index f76f8622a9..83c3a4507b 100644 --- a/be/src/runtime/bufferpool/system_allocator.h +++ b/be/src/runtime/bufferpool/system_allocator.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef IMPALA_RUNTIME_SYSTEM_ALLOCATOR_H -#define IMPALA_RUNTIME_SYSTEM_ALLOCATOR_H +#pragma once #include "common/status.h" #include "runtime/bufferpool/buffer_pool.h" @@ -48,5 +47,3 @@ private: const int64_t min_buffer_len_; }; } // namespace doris - -#endif diff --git a/be/src/runtime/cache/cache_utils.h b/be/src/runtime/cache/cache_utils.h index c2d33db9c8..7b2b387e8c 100644 --- a/be/src/runtime/cache/cache_utils.h +++ b/be/src/runtime/cache/cache_utils.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_CACHE_UTILS_H -#define DORIS_BE_SRC_RUNTIME_CACHE_UTILS_H +#pragma once #include #include @@ -84,4 +83,3 @@ struct CacheStat { }; } // namespace doris -#endif diff --git a/be/src/runtime/cache/result_cache.h b/be/src/runtime/cache/result_cache.h index 7e4352ac79..405b0a9275 100644 --- a/be/src/runtime/cache/result_cache.h +++ b/be/src/runtime/cache/result_cache.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_RESULT_CACHE_H -#define DORIS_BE_SRC_RUNTIME_RESULT_CACHE_H +#pragma once #include #include @@ -117,4 +116,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/runtime/cache/result_node.h b/be/src/runtime/cache/result_node.h index 7add78f1d8..9b7b8a17a3 100644 --- a/be/src/runtime/cache/result_node.h +++ b/be/src/runtime/cache/result_node.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_RESULT_NODE_H -#define DORIS_BE_SRC_RUNTIME_RESULT_NODE_H +#pragma once #include @@ -190,4 +189,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/runtime/client_cache.h b/be/src/runtime/client_cache.h index a7b6e6d1b8..e29ecc632e 100644 --- a/be/src/runtime/client_cache.h +++ b/be/src/runtime/client_cache.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_CLIENT_CACHE_H -#define DORIS_BE_RUNTIME_CLIENT_CACHE_H +#pragma once #include #include @@ -295,5 +294,3 @@ using ExtDataSourceServiceClientCache = ClientCache using ExtDataSourceServiceConnection = ClientConnection; } // namespace doris - -#endif diff --git a/be/src/runtime/data_stream_mgr.h b/be/src/runtime/data_stream_mgr.h index 96f88ed07f..43411beb85 100644 --- a/be/src/runtime/data_stream_mgr.h +++ b/be/src/runtime/data_stream_mgr.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/data-stream-mgr.h // and modified by Doris -#ifndef DORIS_BE_SRC_RUNTIME_DATA_STREAM_MGR_H -#define DORIS_BE_SRC_RUNTIME_DATA_STREAM_MGR_H +#pragma once #include #include @@ -136,5 +135,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/data_stream_recvr.h b/be/src/runtime/data_stream_recvr.h index ee436f3478..70a769dae0 100644 --- a/be/src/runtime/data_stream_recvr.h +++ b/be/src/runtime/data_stream_recvr.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/data-stream-recvr.h // and modified by Doris -#ifndef DORIS_BE_SRC_RUNTIME_DATA_STREAM_RECVR_H -#define DORIS_BE_SRC_RUNTIME_DATA_STREAM_RECVR_H +#pragma once #include @@ -202,5 +201,3 @@ private: }; } // end namespace doris - -#endif // end DORIS_BE_SRC_RUNTIME_DATA_STREAM_RECVR_H diff --git a/be/src/runtime/data_stream_sender.h b/be/src/runtime/data_stream_sender.h index 843cf2cf79..54ba6aa823 100644 --- a/be/src/runtime/data_stream_sender.h +++ b/be/src/runtime/data_stream_sender.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/data-stream-sender.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_DATA_STREAM_SENDER_H -#define DORIS_BE_RUNTIME_DATA_STREAM_SENDER_H +#pragma once #include #include @@ -286,5 +285,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/datetime_value.h b/be/src/runtime/datetime_value.h index 47a46ac377..e0d7f7b8cc 100644 --- a/be/src/runtime/datetime_value.h +++ b/be/src/runtime/datetime_value.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_DATETIME_VALUE_H -#define DORIS_BE_RUNTIME_DATETIME_VALUE_H +#pragma once #include #include @@ -31,6 +30,7 @@ #include "util/hash_util.hpp" #include "util/timezone_utils.h" #include "vec/runtime/vdatetime_value.h" + namespace doris { enum TimeUnit { @@ -677,5 +677,3 @@ struct hash { size_t operator()(const doris::DateTimeValue& v) const { return doris::hash_value(v); } }; } // namespace std - -#endif diff --git a/be/src/runtime/decimalv2_value.h b/be/src/runtime/decimalv2_value.h index 45032e48da..8254054326 100644 --- a/be/src/runtime/decimalv2_value.h +++ b/be/src/runtime/decimalv2_value.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_DECIMALV2_VALUE_H -#define DORIS_BE_SRC_RUNTIME_DECIMALV2_VALUE_H +#pragma once #include #include @@ -324,5 +323,3 @@ struct hash { size_t operator()(const doris::DecimalV2Value& v) const { return doris::hash_value(v); } }; } // namespace std - -#endif // DORIS_BE_SRC_RUNTIME_DECIMALV2_VALUE_H diff --git a/be/src/runtime/descriptors.h b/be/src/runtime/descriptors.h index 884a2a5379..555340e794 100644 --- a/be/src/runtime/descriptors.h +++ b/be/src/runtime/descriptors.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/descriptors.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_DESCRIPTORS_H -#define DORIS_BE_RUNTIME_DESCRIPTORS_H +#pragma once #include #include @@ -476,5 +475,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/disk_io_mgr.h b/be/src/runtime/disk_io_mgr.h index b96b532a58..0706b234a3 100644 --- a/be/src/runtime/disk_io_mgr.h +++ b/be/src/runtime/disk_io_mgr.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/disk-io-mgr.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_RUNTIME_DISK_IO_MGR_H -#define DORIS_BE_SRC_QUERY_RUNTIME_DISK_IO_MGR_H +#pragma once #include #include @@ -850,5 +849,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_QUERY_RUNTIME_DISK_IO_MGR_H diff --git a/be/src/runtime/disk_io_mgr_internal.h b/be/src/runtime/disk_io_mgr_internal.h index 82c40bbcfa..ef6f6868e0 100644 --- a/be/src/runtime/disk_io_mgr_internal.h +++ b/be/src/runtime/disk_io_mgr_internal.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/disk-io-mgr-internal.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_RUNTIME_DISK_IO_MGR_INTERNAL_H -#define DORIS_BE_SRC_QUERY_RUNTIME_DISK_IO_MGR_INTERNAL_H +#pragma once #include @@ -457,5 +456,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_QUERY_RUNTIME_DISK_IO_MGR_INTERNAL_H diff --git a/be/src/runtime/dpp_sink_internal.h b/be/src/runtime/dpp_sink_internal.h index f64f3dd750..9ba4d428e3 100644 --- a/be/src/runtime/dpp_sink_internal.h +++ b/be/src/runtime/dpp_sink_internal.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_DPP_SINK_INTERNAL_H -#define DORIS_BE_RUNTIME_DPP_SINK_INTERNAL_H +#pragma once #include #include @@ -220,5 +219,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/dpp_writer.h b/be/src/runtime/dpp_writer.h index 7e93124d2c..cdd0feb64d 100644 --- a/be/src/runtime/dpp_writer.h +++ b/be/src/runtime/dpp_writer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_DPP_WRITER_H -#define DORIS_BE_RUNTIME_DPP_WRITER_H +#pragma once #include "common/status.h" #include "gen_cpp/olap_file.pb.h" @@ -72,5 +71,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/etl_job_mgr.h b/be/src/runtime/etl_job_mgr.h index d930c73251..306cf0397f 100644 --- a/be/src/runtime/etl_job_mgr.h +++ b/be/src/runtime/etl_job_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_ETL_JOB_MGR_H -#define DORIS_BE_RUNTIME_ETL_JOB_MGR_H +#pragma once #include @@ -98,5 +97,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/exec_env.h b/be/src/runtime/exec_env.h index 87206099e5..4a279d8142 100644 --- a/be/src/runtime/exec_env.h +++ b/be/src/runtime/exec_env.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_EXEC_ENV_H -#define DORIS_BE_RUNTIME_EXEC_ENV_H +#pragma once #include "common/status.h" #include "olap/options.h" @@ -256,5 +255,3 @@ ExecEnv::get_client_cache() { } } // namespace doris - -#endif diff --git a/be/src/runtime/export_sink.h b/be/src/runtime/export_sink.h index f223e444e3..107b6f4203 100644 --- a/be/src/runtime/export_sink.h +++ b/be/src/runtime/export_sink.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_EXPORT_SINK_H -#define DORIS_BE_SRC_RUNTIME_EXPORT_SINK_H +#pragma once #include @@ -82,5 +81,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_EXPORT_SINK_H diff --git a/be/src/runtime/export_task_mgr.h b/be/src/runtime/export_task_mgr.h index 8237057e8c..40bbe406bf 100644 --- a/be/src/runtime/export_task_mgr.h +++ b/be/src/runtime/export_task_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_EXPORT_TASK_MGR_H -#define DORIS_BE_SRC_RUNTIME_EXPORT_TASK_MGR_H +#pragma once #include #include @@ -79,5 +78,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_EXPORT_TASK_MGR_H diff --git a/be/src/runtime/fold_constant_executor.h b/be/src/runtime/fold_constant_executor.h index 1351687c03..4e1e629064 100644 --- a/be/src/runtime/fold_constant_executor.h +++ b/be/src/runtime/fold_constant_executor.h @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +#pragma once + #include "common/object_pool.h" #include "common/status.h" #include "exprs/expr.h" diff --git a/be/src/runtime/fragment_mgr.h b/be/src/runtime/fragment_mgr.h index c208a03fdd..3e5185c94a 100644 --- a/be/src/runtime/fragment_mgr.h +++ b/be/src/runtime/fragment_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_FRAGMENT_MGR_H -#define DORIS_BE_RUNTIME_FRAGMENT_MGR_H +#pragma once #include #include @@ -119,5 +118,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/free_pool.hpp b/be/src/runtime/free_pool.hpp index 9096f8d0cd..49b58d0ea2 100644 --- a/be/src/runtime/free_pool.hpp +++ b/be/src/runtime/free_pool.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/free-pool.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_BE_RUNTIME_FREE_POOL_H -#define DORIS_BE_SRC_QUERY_BE_RUNTIME_FREE_POOL_H +#pragma once #include #include @@ -162,5 +161,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/initial_reservations.h b/be/src/runtime/initial_reservations.h index b2fe35d39d..c1661d5b53 100644 --- a/be/src/runtime/initial_reservations.h +++ b/be/src/runtime/initial_reservations.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.10.0/be/src/runtime/initial-reservations.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_INITIAL_RESERVATIONS_H -#define DORIS_BE_RUNTIME_INITIAL_RESERVATIONS_H +#pragma once #include "common/status.h" #include "gen_cpp/Types_types.h" // for TUniqueId @@ -80,5 +79,3 @@ private: int64_t remaining_initial_reservation_claims_; }; } // namespace doris - -#endif diff --git a/be/src/runtime/large_int_value.h b/be/src/runtime/large_int_value.h index 090331bd02..68c1d47836 100644 --- a/be/src/runtime/large_int_value.h +++ b/be/src/runtime/large_int_value.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_LARGE_INT_VALUE_H -#define DORIS_BE_RUNTIME_LARGE_INT_VALUE_H +#pragma once #include #include @@ -59,5 +58,3 @@ inline std::ostream& operator<<(std::ostream& os, __int128 const& value) { inline std::istream& operator>>(std::istream& is, __int128& value) { return doris::operator>>(is, value); } - -#endif diff --git a/be/src/runtime/load_path_mgr.h b/be/src/runtime/load_path_mgr.h index 8166b5d66a..49a9457bb1 100644 --- a/be/src/runtime/load_path_mgr.h +++ b/be/src/runtime/load_path_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_LOAD_PATH_MGR_H -#define DORIS_BE_SRC_RUNTIME_LOAD_PATH_MGR_H +#pragma once #include @@ -72,5 +71,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/mem_pool.h b/be/src/runtime/mem_pool.h index fc17854f48..6a211fcbcf 100644 --- a/be/src/runtime/mem_pool.h +++ b/be/src/runtime/mem_pool.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/mem-pool.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_MEM_POOL_H -#define DORIS_BE_RUNTIME_MEM_POOL_H +#pragma once #include @@ -317,5 +316,3 @@ private: template uint8_t* MemPool::allocate(int64_t size, int alignment, Status* rst); template uint8_t* MemPool::allocate(int64_t size, int alignment, Status* rst); } // namespace doris - -#endif diff --git a/be/src/runtime/multi_precision.h b/be/src/runtime/multi_precision.h index 5ddf00ceb0..8d3a3ebd92 100644 --- a/be/src/runtime/multi_precision.h +++ b/be/src/runtime/multi_precision.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/multi-precision.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_MULTI_PRECISION_H -#define DORIS_BE_RUNTIME_MULTI_PRECISION_H +#pragma once namespace doris { @@ -33,4 +32,3 @@ inline uint64_t low_bits(__int128 x) { } } // namespace doris -#endif diff --git a/be/src/runtime/mysql_table_sink.h b/be/src/runtime/mysql_table_sink.h index 71875fe3f6..593ce96c15 100644 --- a/be/src/runtime/mysql_table_sink.h +++ b/be/src/runtime/mysql_table_sink.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_MYSQL_TABLE_SINK_H -#define DORIS_BE_RUNTIME_MYSQL_TABLE_SINK_H +#pragma once #include @@ -74,5 +73,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/mysql_table_writer.h b/be/src/runtime/mysql_table_writer.h index 8639bb8b9a..bba5c8c5ee 100644 --- a/be/src/runtime/mysql_table_writer.h +++ b/be/src/runtime/mysql_table_writer.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_MYSQL_TABLE_WRITER_H -#define DORIS_BE_RUNTIME_MYSQL_TABLE_WRITER_H +#pragma once + #include #include @@ -65,5 +65,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/odbc_table_sink.h b/be/src/runtime/odbc_table_sink.h index 26c3b948bd..ecffd3ef27 100644 --- a/be/src/runtime/odbc_table_sink.h +++ b/be/src/runtime/odbc_table_sink.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_ODBC_TABLE_SINK_H -#define DORIS_BE_RUNTIME_ODBC_TABLE_SINK_H +#pragma once #include @@ -73,5 +72,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/plan_fragment_executor.h b/be/src/runtime/plan_fragment_executor.h index 59b97506d5..d2558deedb 100644 --- a/be/src/runtime/plan_fragment_executor.h +++ b/be/src/runtime/plan_fragment_executor.h @@ -18,8 +18,7 @@ // https://github.com/cloudera/Impala/blob/v0.7refresh/be/src/runtime/plan-fragment-executor.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_PLAN_FRAGMENT_EXECUTOR_H -#define DORIS_BE_RUNTIME_PLAN_FRAGMENT_EXECUTOR_H +#pragma once #include #include @@ -260,5 +259,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/primitive_type.h b/be/src/runtime/primitive_type.h index cf406455cb..1c3fd47de8 100644 --- a/be/src/runtime/primitive_type.h +++ b/be/src/runtime/primitive_type.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_PRIMITIVE_TYPE_H -#define DORIS_BE_RUNTIME_PRIMITIVE_TYPE_H +#pragma once #include @@ -382,5 +381,3 @@ struct PredicatePrimitiveTypeTraits { }; } // namespace doris - -#endif diff --git a/be/src/runtime/qsorter.h b/be/src/runtime/qsorter.h index 24e3ac93e0..b590cdf369 100644 --- a/be/src/runtime/qsorter.h +++ b/be/src/runtime/qsorter.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_QSORTER_H -#define DORIS_BE_RUNTIME_QSORTER_H +#pragma once #include @@ -74,5 +73,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/query_statistics.h b/be/src/runtime/query_statistics.h index 032023456d..4990d29032 100644 --- a/be/src/runtime/query_statistics.h +++ b/be/src/runtime/query_statistics.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_EXEC_QUERY_STATISTICS_H -#define DORIS_BE_EXEC_QUERY_STATISTICS_H +#pragma once #include @@ -137,5 +136,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/raw_value.h b/be/src/runtime/raw_value.h index 6c0e43cb69..6804eecaad 100644 --- a/be/src/runtime/raw_value.h +++ b/be/src/runtime/raw_value.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/raw-value.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_RAW_VALUE_H -#define DORIS_BE_RUNTIME_RAW_VALUE_H +#pragma once #include @@ -462,5 +461,3 @@ inline uint32_t RawValue::zlib_crc32(const void* v, size_t len, const TypeDescri } } // namespace doris - -#endif diff --git a/be/src/runtime/record_batch_queue.h b/be/src/runtime/record_batch_queue.h index 21ce0b29f9..008b8f10d3 100644 --- a/be/src/runtime/record_batch_queue.h +++ b/be/src/runtime/record_batch_queue.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_RECORD_BATCH_QUEUE_H -#define DORIS_RECORD_BATCH_QUEUE_H +#pragma once #include @@ -63,5 +62,3 @@ private: }; } // namespace doris - -#endif //DORIS_RECORD_BATCH_QUEUE_H diff --git a/be/src/runtime/result_buffer_mgr.h b/be/src/runtime/result_buffer_mgr.h index d6f8e60693..919fdfb031 100644 --- a/be/src/runtime/result_buffer_mgr.h +++ b/be/src/runtime/result_buffer_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_RESULT_BUFFER_MGR_H -#define DORIS_BE_RUNTIME_RESULT_BUFFER_MGR_H +#pragma once #include #include @@ -89,5 +88,3 @@ private: // TUniqueId hash function used for std::unordered_map std::size_t hash_value(const TUniqueId& fragment_id); } // namespace doris - -#endif diff --git a/be/src/runtime/result_file_sink.h b/be/src/runtime/result_file_sink.h index 495930c7bb..042e80d867 100644 --- a/be/src/runtime/result_file_sink.h +++ b/be/src/runtime/result_file_sink.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_RESULT_FILE_SINK_H -#define DORIS_BE_RUNTIME_RESULT_FILE_SINK_H +#pragma once #include "common/status.h" #include "gen_cpp/PaloInternalService_types.h" @@ -79,4 +78,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/runtime/result_sink.h b/be/src/runtime/result_sink.h index a39ceb4643..1846deff11 100644 --- a/be/src/runtime/result_sink.h +++ b/be/src/runtime/result_sink.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_RESULT_SINK_H -#define DORIS_BE_RUNTIME_RESULT_SINK_H +#pragma once #include "common/status.h" #include "exec/data_sink.h" @@ -74,4 +73,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/runtime/row_batch.h b/be/src/runtime/row_batch.h index c7abca2a75..0fd79df7f0 100644 --- a/be/src/runtime/row_batch.h +++ b/be/src/runtime/row_batch.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/row-batch.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_ROW_BATCH_H -#define DORIS_BE_RUNTIME_ROW_BATCH_H +#pragma once #include #include @@ -506,5 +505,3 @@ private: _iter.next()) } // namespace doris - -#endif diff --git a/be/src/runtime/row_batch_interface.hpp b/be/src/runtime/row_batch_interface.hpp index 3aa002a79b..323ead524e 100644 --- a/be/src/runtime/row_batch_interface.hpp +++ b/be/src/runtime/row_batch_interface.hpp @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_BE_RUNTIME_ROW_BATCH_INTERFACE_H -#define DORIS_BE_SRC_QUERY_BE_RUNTIME_ROW_BATCH_INTERFACE_H +#pragma once namespace doris { @@ -26,5 +25,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/runtime/runtime_filter_mgr.h b/be/src/runtime/runtime_filter_mgr.h index db336c76cc..8ccbb357d5 100644 --- a/be/src/runtime/runtime_filter_mgr.h +++ b/be/src/runtime/runtime_filter_mgr.h @@ -28,7 +28,6 @@ #include "exprs/runtime_filter.h" #include "util/time.h" #include "util/uid_util.h" -// defination for TRuntimeFilterDesc #include "gen_cpp/PaloInternalService_types.h" #include "gen_cpp/PlanNodes_types.h" diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h index a5bc35ee36..8f5c0b86a1 100644 --- a/be/src/runtime/runtime_state.h +++ b/be/src/runtime/runtime_state.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/runtime-state.h // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_RUNTIME_RUNTIME_STATE_H -#define DORIS_BE_SRC_QUERY_RUNTIME_RUNTIME_STATE_H +#pragma once #include #include @@ -521,5 +520,3 @@ private: } while (false) } // namespace doris - -#endif // end of DORIS_BE_SRC_QUERY_RUNTIME_RUNTIME_STATE_H diff --git a/be/src/runtime/small_file_mgr.h b/be/src/runtime/small_file_mgr.h index 2c829d9d59..89e0a85d89 100644 --- a/be/src/runtime/small_file_mgr.h +++ b/be/src/runtime/small_file_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_SMALL_FILE_MGR_H -#define DORIS_BE_SRC_RUNTIME_SMALL_FILE_MGR_H +#pragma once #include @@ -75,5 +74,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_SMALL_FILE_MGR_H diff --git a/be/src/runtime/snapshot_loader.h b/be/src/runtime/snapshot_loader.h index 9b1ebd2f50..c8400ac723 100644 --- a/be/src/runtime/snapshot_loader.h +++ b/be/src/runtime/snapshot_loader.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_SNAPSHOT_LOADER_H -#define DORIS_BE_SRC_RUNTIME_SNAPSHOT_LOADER_H +#pragma once #include @@ -104,5 +103,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_SNAPSHOT_LOADER_H diff --git a/be/src/runtime/sorted_run_merger.h b/be/src/runtime/sorted_run_merger.h index abba31c835..4326692522 100644 --- a/be/src/runtime/sorted_run_merger.h +++ b/be/src/runtime/sorted_run_merger.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/sorted-run-merger.h // and modified by Doris -#ifndef DORIS_BE_SRC_RUNTIME_SORTED_RUN_MERGER_H -#define DORIS_BE_SRC_RUNTIME_SORTED_RUN_MERGER_H +#pragma once #include @@ -127,5 +126,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_SORTED_RUN_MERGER_H diff --git a/be/src/runtime/sorter.h b/be/src/runtime/sorter.h index 55a9135e37..2b1a4d4fe4 100644 --- a/be/src/runtime/sorter.h +++ b/be/src/runtime/sorter.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/sorter.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_SORTER_H -#define DORIS_BE_RUNTIME_SORTER_H +#pragma once #include "common/status.h" @@ -52,5 +51,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/runtime/spill_sorter.h b/be/src/runtime/spill_sorter.h index 2e67d10d90..71ee4c9b6d 100644 --- a/be/src/runtime/spill_sorter.h +++ b/be/src/runtime/spill_sorter.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_SPILL_SORTER_H -#define DORIS_BE_SRC_RUNTIME_SPILL_SORTER_H +#pragma once #include @@ -218,5 +217,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_RUNTIME_SPILL_SORTER_H diff --git a/be/src/runtime/string_buffer.hpp b/be/src/runtime/string_buffer.hpp index d2dafeba68..e3893138c2 100644 --- a/be/src/runtime/string_buffer.hpp +++ b/be/src/runtime/string_buffer.hpp @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_BE_RUNTIME_STRING_BUFFER_H -#define DORIS_BE_SRC_QUERY_BE_RUNTIME_STRING_BUFFER_H +#pragma once #include "runtime/mem_pool.h" #include "runtime/string_value.h" @@ -107,5 +106,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/string_value.h b/be/src/runtime/string_value.h index 43e652fb28..3c879383f8 100644 --- a/be/src/runtime/string_value.h +++ b/be/src/runtime/string_value.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/string-value.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_STRING_VALUE_H -#define DORIS_BE_RUNTIME_STRING_VALUE_H +#pragma once #include @@ -206,5 +205,3 @@ std::ostream& operator<<(std::ostream& os, const StringValue& string_value); std::size_t operator-(const StringValue& v1, const StringValue& v2); } // namespace doris - -#endif diff --git a/be/src/runtime/string_value.hpp b/be/src/runtime/string_value.hpp index d140a1110f..961e8b86c5 100644 --- a/be/src/runtime/string_value.hpp +++ b/be/src/runtime/string_value.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/string-value.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_QUERY_BE_RUNTIME_STRING_VALUE_INLINE_H -#define DORIS_BE_SRC_QUERY_BE_RUNTIME_STRING_VALUE_INLINE_H +#pragma once #include @@ -53,5 +52,3 @@ inline StringValue StringValue::trim() const { } } // namespace doris - -#endif diff --git a/be/src/runtime/thread_resource_mgr.h b/be/src/runtime/thread_resource_mgr.h index ef5442d2ac..b48a49ecaf 100644 --- a/be/src/runtime/thread_resource_mgr.h +++ b/be/src/runtime/thread_resource_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_THREAD_RESOURCE_MGR_H -#define DORIS_BE_RUNTIME_THREAD_RESOURCE_MGR_H +#pragma once #include @@ -246,5 +245,3 @@ inline void ThreadResourceMgr::ResourcePool::release_thread_token(bool required) } } // namespace doris - -#endif diff --git a/be/src/runtime/tmp_file_mgr.h b/be/src/runtime/tmp_file_mgr.h index 4db957294f..355f5e19ca 100644 --- a/be/src/runtime/tmp_file_mgr.h +++ b/be/src/runtime/tmp_file_mgr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_RUNTIME_TMP_FILE_MGR_H -#define DORIS_BE_SRC_QUERY_RUNTIME_TMP_FILE_MGR_H +#pragma once #include "common/status.h" #include "gen_cpp/Types_types.h" // for TUniqueId @@ -182,5 +181,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_QUERY_RUNTIME_TMP_FILE_MGR_H diff --git a/be/src/runtime/tuple.h b/be/src/runtime/tuple.h index 26e9a3785f..15c4c31963 100644 --- a/be/src/runtime/tuple.h +++ b/be/src/runtime/tuple.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/tuple.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_TUPLE_H -#define DORIS_BE_RUNTIME_TUPLE_H +#pragma once #include @@ -188,5 +187,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/tuple_row.h b/be/src/runtime/tuple_row.h index 77a0b6710e..cafd066404 100644 --- a/be/src/runtime/tuple_row.h +++ b/be/src/runtime/tuple_row.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/tuple-row.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_TUPLE_ROW_H -#define DORIS_BE_RUNTIME_TUPLE_ROW_H +#pragma once #include "runtime/descriptors.h" #include "runtime/mem_pool.h" @@ -116,5 +115,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/runtime/type_limit.h b/be/src/runtime/type_limit.h index 3e6a38715f..7cc567549d 100644 --- a/be/src/runtime/type_limit.h +++ b/be/src/runtime/type_limit.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_RUNTIME_TYPE_LIMIT_H -#define DORIS_BE_RUNTIME_TYPE_LIMIT_H +#pragma once #include "runtime/datetime_value.h" #include "runtime/decimalv2_value.h" @@ -49,5 +48,3 @@ struct type_limit { }; } // namespace doris - -#endif diff --git a/be/src/runtime/types.h b/be/src/runtime/types.h index 56c7e1c674..3382417b9c 100644 --- a/be/src/runtime/types.h +++ b/be/src/runtime/types.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/runtime/types.h // and modified by Doris -#ifndef DORIS_BE_RUNTIME_TYPES_H -#define DORIS_BE_RUNTIME_TYPES_H +#pragma once #include #include @@ -308,5 +307,3 @@ private: std::ostream& operator<<(std::ostream& os, const TypeDescriptor& type); } // namespace doris - -#endif diff --git a/be/src/runtime/vectorized_row_batch.h b/be/src/runtime/vectorized_row_batch.h index aff39c71c3..85c5c8e7ce 100644 --- a/be/src/runtime/vectorized_row_batch.h +++ b/be/src/runtime/vectorized_row_batch.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_RUNTIME_VECTORIZED_ROW_BATCH_H -#define DORIS_BE_SRC_RUNTIME_VECTORIZED_ROW_BATCH_H +#pragma once #include #include @@ -124,7 +123,3 @@ private: }; } // namespace doris - -#endif // _DORIS_BE_SRC_RUNTIME_VECTORIZED_ROW_BATCH_H - -/* vim: set expandtab ts=4 sw=4 sts=4 tw=100: */ diff --git a/be/src/service/backend_options.h b/be/src/service/backend_options.h index 5a95f42c1e..966670d247 100644 --- a/be/src/service/backend_options.h +++ b/be/src/service/backend_options.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SERVICE_BACKEND_OPTIONS_H -#define DORIS_BE_SERVICE_BACKEND_OPTIONS_H +#pragma once #include @@ -43,5 +42,3 @@ private: }; } // namespace doris - -#endif //DORIS_BE_SERVICE_BACKEND_OPTIONS_H diff --git a/be/src/service/backend_service.h b/be/src/service/backend_service.h index 7991f59c9f..bb47fe9e4e 100644 --- a/be/src/service/backend_service.h +++ b/be/src/service/backend_service.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SERVICE_BACKEND_SERVICE_H -#define DORIS_BE_SERVICE_BACKEND_SERVICE_H +#pragma once #include #include @@ -165,5 +164,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SERVICE_BACKEND_SERVICE_H diff --git a/be/src/udf/uda_test_harness.h b/be/src/udf/uda_test_harness.h index 4d9f2dccc2..26b3ec6f89 100644 --- a/be/src/udf/uda_test_harness.h +++ b/be/src/udf/uda_test_harness.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/udf/uda-test-harness.h // and modified by Doris -#ifndef DORIS_BE_UDF_UDA_TEST_HARNESS_H -#define DORIS_BE_UDF_UDA_TEST_HARNESS_H +#pragma once #include #include @@ -269,5 +268,3 @@ private: } // namespace doris_udf #include "udf/uda_test_harness_impl.hpp" - -#endif diff --git a/be/src/udf/udf.h b/be/src/udf/udf.h index f5f134b633..eead93f59e 100644 --- a/be/src/udf/udf.h +++ b/be/src/udf/udf.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/udf/udf.h // and modified by Doris -#ifndef DORIS_BE_UDF_UDF_H -#define DORIS_BE_UDF_UDF_H +#pragma once #include @@ -778,5 +777,3 @@ using doris_udf::DateTimeVal; using doris_udf::HllVal; using doris_udf::FunctionContext; using doris_udf::CollectionVal; - -#endif diff --git a/be/src/udf/udf_debug.h b/be/src/udf/udf_debug.h index ed0991b015..3cdbd3aecc 100644 --- a/be/src/udf/udf_debug.h +++ b/be/src/udf/udf_debug.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/udf/udf-debug.h // and modified by Doris -#ifndef DORIS_BE_UDF_UDF_DEBUG_H -#define DORIS_BE_UDF_UDF_DEBUG_H +#pragma once #include #include @@ -49,5 +48,3 @@ std::string debug_string(const StringVal& val) { } } // namespace doris_udf - -#endif diff --git a/be/src/udf/udf_internal.h b/be/src/udf/udf_internal.h index 708e45dda6..1bc4fefd0b 100644 --- a/be/src/udf/udf_internal.h +++ b/be/src/udf/udf_internal.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/udf/udf-internal.h // and modified by Doris -#ifndef DORIS_BE_UDF_UDF_INTERNAL_H -#define DORIS_BE_UDF_UDF_INTERNAL_H +#pragma once #include @@ -189,5 +188,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/aligned_new.h b/be/src/util/aligned_new.h index 54a52e20f7..f56a56eb51 100644 --- a/be/src/util/aligned_new.h +++ b/be/src/util/aligned_new.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/aligned-new.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_ALIGNED_NEW_H_ -#define DORIS_BE_SRC_UTIL_ALIGNED_NEW_H_ +#pragma once #include @@ -56,5 +55,3 @@ private: using CacheLineAligned = AlignedNew; } // namespace doris - -#endif diff --git a/be/src/util/barrier.h b/be/src/util/barrier.h index 40e42ea81c..f3d6184930 100644 --- a/be/src/util/barrier.h +++ b/be/src/util/barrier.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_BARRIER_H -#define DORIS_BE_SRC_UTIL_BARRIER_H +#pragma once #include #include @@ -60,6 +59,4 @@ private: std::condition_variable _cond; }; -#endif //DORIS_BE_SRC_UTIL_BARRIER_H - } // namespace doris diff --git a/be/src/util/batch_process_thread_pool.hpp b/be/src/util/batch_process_thread_pool.hpp index 2f7cfd8df2..3436b6fc0c 100644 --- a/be/src/util/batch_process_thread_pool.hpp +++ b/be/src/util/batch_process_thread_pool.hpp @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_BATCH_PROCESS_THREAD_POOL_HPP -#define DORIS_BE_SRC_COMMON_UTIL_BATCH_PROCESS_THREAD_POOL_HPP +#pragma once #include @@ -174,5 +173,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/bfd_parser.h b/be/src/util/bfd_parser.h index 73484e2d67..6029c043d1 100644 --- a/be/src/util/bfd_parser.h +++ b/be/src/util/bfd_parser.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_BFD_PARSER_H -#define DORIS_BE_SRC_UTIL_BFD_PARSER_H +#pragma once #ifndef PACKAGE #define PACKAGE @@ -74,5 +73,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/binary_cast.hpp b/be/src/util/binary_cast.hpp index 1ff2b5aa4e..e8f883f37c 100644 --- a/be/src/util/binary_cast.hpp +++ b/be/src/util/binary_cast.hpp @@ -16,6 +16,7 @@ // under the License. #pragma once + #include #include #include diff --git a/be/src/util/bit_stream_utils.h b/be/src/util/bit_stream_utils.h index c6d39c6abd..86922539b4 100644 --- a/be/src/util/bit_stream_utils.h +++ b/be/src/util/bit_stream_utils.h @@ -17,6 +17,7 @@ // This file is copied from // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/bit-stream-utils.h // and modified by Doris + #pragma once #include "gutil/port.h" diff --git a/be/src/util/bit_stream_utils.inline.h b/be/src/util/bit_stream_utils.inline.h index 544685daa6..05a5b8e2f3 100644 --- a/be/src/util/bit_stream_utils.inline.h +++ b/be/src/util/bit_stream_utils.inline.h @@ -17,8 +17,8 @@ // This file is copied from // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/bit-stream-utils.inline.h // and modified by Doris -#ifndef IMPALA_UTIL_BIT_STREAM_UTILS_INLINE_H -#define IMPALA_UTIL_BIT_STREAM_UTILS_INLINE_H + +#pragma once #include @@ -209,5 +209,3 @@ inline bool BitReader::GetVlqInt(int32_t* v) { } } // namespace doris - -#endif diff --git a/be/src/util/bit_util.h b/be/src/util/bit_util.h index ae10149ac9..d81a1ffb68 100644 --- a/be/src/util/bit_util.h +++ b/be/src/util/bit_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/bit-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_BIT_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_BIT_UTIL_H +#pragma once #include @@ -449,5 +448,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/util/bitmap.h b/be/src/util/bitmap.h index cc68aa3a59..931b3becc3 100644 --- a/be/src/util/bitmap.h +++ b/be/src/util/bitmap.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/bitmap.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_BITMAP_H -#define DORIS_BE_SRC_COMMON_UTIL_BITMAP_H +#pragma once #include "gutil/strings/fastmem.h" #include "util/bit_util.h" @@ -250,5 +249,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/bitmap_value.h b/be/src/util/bitmap_value.h index d6791c1867..4b1445ba59 100644 --- a/be/src/util/bitmap_value.h +++ b/be/src/util/bitmap_value.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_BITMAP_VALUE_H -#define DORIS_BE_SRC_UTIL_BITMAP_VALUE_H +#pragma once #include @@ -1838,5 +1837,3 @@ inline BitmapValueIterator BitmapValue::end() const { } } // namespace doris - -#endif //DORIS_BE_SRC_UTIL_BITMAP_VALUE_H diff --git a/be/src/util/blocking_priority_queue.hpp b/be/src/util/blocking_priority_queue.hpp index 5a97cee4f6..8c264e57dd 100644 --- a/be/src/util/blocking_priority_queue.hpp +++ b/be/src/util/blocking_priority_queue.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/blocking-priority-queue.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_BLOCKING_PRIORITY_QUEUE_HPP -#define DORIS_BE_SRC_COMMON_UTIL_BLOCKING_PRIORITY_QUEUE_HPP +#pragma once #include @@ -190,5 +189,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/blocking_queue.hpp b/be/src/util/blocking_queue.hpp index cf5d53fb67..934c240f54 100644 --- a/be/src/util/blocking_queue.hpp +++ b/be/src/util/blocking_queue.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/blocking-queue.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_BLOCKING_QUEUE_HPP -#define DORIS_BE_SRC_COMMON_UTIL_BLOCKING_QUEUE_HPP +#pragma once #include #include @@ -172,5 +171,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/broker_load_error_hub.h b/be/src/util/broker_load_error_hub.h index 5c197aa315..0878a5a441 100644 --- a/be/src/util/broker_load_error_hub.h +++ b/be/src/util/broker_load_error_hub.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_BROKER_LOAD_ERROR_HUB_H -#define DORIS_BE_SRC_UTIL_BROKER_LOAD_ERROR_HUB_H +#pragma once #include #include @@ -81,5 +80,3 @@ private: }; // end class BrokerLoadErrorHub } // end namespace doris - -#endif // DORIS_BE_SRC_UTIL_BROKER_LOAD_ERROR_HUB_H diff --git a/be/src/util/buffer_builder.hpp b/be/src/util/buffer_builder.hpp index 7e3bc399b9..d0de26f9f0 100644 --- a/be/src/util/buffer_builder.hpp +++ b/be/src/util/buffer_builder.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/buffer-builder.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_BUFFER_BUILDER_HPP -#define DORIS_BE_SRC_COMMON_UTIL_BUFFER_BUILDER_HPP +#pragma once #include #include @@ -58,5 +57,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/cidr.h b/be/src/util/cidr.h index 100a4ee8d6..332a68131a 100644 --- a/be/src/util/cidr.h +++ b/be/src/util/cidr.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_CIDR_H -#define DORIS_BE_SRC_COMMON_UTIL_CIDR_H +#pragma once #include @@ -39,5 +38,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_COMMON_UTIL_CIDR_H diff --git a/be/src/util/container_util.hpp b/be/src/util/container_util.hpp index bbaee52284..25b6104ef7 100644 --- a/be/src/util/container_util.hpp +++ b/be/src/util/container_util.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/container-util.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON__UTIL_CONTAINER_UTIL_HPP -#define DORIS_BE_SRC_COMMON__UTIL_CONTAINER_UTIL_HPP +#pragma once #include #include @@ -97,5 +96,3 @@ const V& find_with_default(const std::unordered_map& m, const K& key, cons } } // namespace doris - -#endif diff --git a/be/src/util/countdown_latch.h b/be/src/util/countdown_latch.h index f8388b2676..4647f920fc 100644 --- a/be/src/util/countdown_latch.h +++ b/be/src/util/countdown_latch.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_COUNTDOWN_LATCH_H -#define DORIS_BE_SRC_UTIL_COUNTDOWN_LATCH_H +#pragma once #include #include @@ -120,5 +119,3 @@ private: }; } // namespace doris - -#endif //DORIS_BE_SRC_UTIL_COUNTDOWN_LATCH_H diff --git a/be/src/util/counts.h b/be/src/util/counts.h index 56ca3f0525..5f4e9fe30e 100644 --- a/be/src/util/counts.h +++ b/be/src/util/counts.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_COUNTS_H_ -#define DORIS_BE_SRC_UTIL_COUNTS_H_ +#pragma once #include #include @@ -135,5 +134,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_UTIL_COUNTS_H_ diff --git a/be/src/util/cpu_info.h b/be/src/util/cpu_info.h index 38cfbbbb11..80d719e4fa 100644 --- a/be/src/util/cpu_info.h +++ b/be/src/util/cpu_info.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/cpu-info.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_CPU_INFO_H -#define DORIS_BE_SRC_UTIL_CPU_INFO_H +#pragma once #include #include @@ -223,4 +222,3 @@ private: static std::vector numa_node_core_idx_; }; } // namespace doris -#endif diff --git a/be/src/util/crc32c.h b/be/src/util/crc32c.h index 06cc7d6d5d..0e12fe3961 100644 --- a/be/src/util/crc32c.h +++ b/be/src/util/crc32c.h @@ -18,8 +18,7 @@ // the following code are modified from RocksDB: // https://github.com/facebook/rocksdb/blob/master/util/crc32c.h -#ifndef DORIS_BE_SRC_UTIL_CRC32C_H -#define DORIS_BE_SRC_UTIL_CRC32C_H +#pragma once #include #include @@ -52,5 +51,3 @@ inline uint32_t Value(const std::vector& slices) { } // namespace crc32c } // namespace doris - -#endif //DORIS_BE_SRC_UTIL_CRC32C_H diff --git a/be/src/util/debug/leak_annotations.h b/be/src/util/debug/leak_annotations.h index b7e9ae7b13..ccfbd452d6 100644 --- a/be/src/util/debug/leak_annotations.h +++ b/be/src/util/debug/leak_annotations.h @@ -14,8 +14,8 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -#ifndef DORIS_UTIL_DEBUG_LEAK_ANNOTATIONS_H_ -#define DORIS_UTIL_DEBUG_LEAK_ANNOTATIONS_H_ + +#pragma once // Ignore a single leaked object, given its pointer. // Does nothing if LeakSanitizer is not enabled. @@ -80,5 +80,3 @@ public: } // namespace debug } // namespace doris - -#endif // DORIS_UTIL_DEBUG_LEAK_ANNOTATIONS_H_ diff --git a/be/src/util/debug/leakcheck_disabler.h b/be/src/util/debug/leakcheck_disabler.h index 345451b869..b9d79b5b7f 100644 --- a/be/src/util/debug/leakcheck_disabler.h +++ b/be/src/util/debug/leakcheck_disabler.h @@ -14,8 +14,8 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -#ifndef DORIS_UTIL_DEBUG_LEAKCHECK_DISABLER_H_ -#define DORIS_UTIL_DEBUG_LEAKCHECK_DISABLER_H_ + +#pragma once #include "gutil/macros.h" #include "util/debug/leak_annotations.h" @@ -39,5 +39,3 @@ private: } // namespace debug } // namespace doris - -#endif // DORIS_UTIL_DEBUG_LEAKCHECK_DISABLER_H_ diff --git a/be/src/util/debug_counters.h b/be/src/util/debug_counters.h index 2000dc4d4e..a2a846b198 100644 --- a/be/src/util/debug_counters.h +++ b/be/src/util/debug_counters.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_DEBUG_COUNTERS_H -#define DORIS_BE_SRC_COMMON_UTIL_DEBUG_COUNTERS_H +#pragma once #include "util/runtime_profile.h" @@ -64,5 +63,3 @@ public: #endif // ENABLE_DEBUG_COUNTERS } // namespace doris - -#endif // DORIS_BE_SRC_COMMON_UTIL_DEBUG_COUNTERS_H diff --git a/be/src/util/debug_util.h b/be/src/util/debug_util.h index ead439d926..956a38a403 100644 --- a/be/src/util/debug_util.h +++ b/be/src/util/debug_util.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_DEBUG_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_DEBUG_UTIL_H +#pragma once #include #include @@ -53,5 +52,3 @@ std::string get_version_string(bool compact); std::string hexdump(const char* buf, int len); } // namespace doris - -#endif diff --git a/be/src/util/defer_op.h b/be/src/util/defer_op.h index 544e151ef6..bb0732c227 100644 --- a/be/src/util/defer_op.h +++ b/be/src/util/defer_op.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_UTIL_DEFER_OP_H -#define DORIS_BE_UTIL_DEFER_OP_H +#pragma once #include @@ -42,5 +41,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/disk_info.h b/be/src/util/disk_info.h index 8826a73299..f284f55433 100644 --- a/be/src/util/disk_info.h +++ b/be/src/util/disk_info.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_DISK_INFO_H -#define DORIS_BE_SRC_COMMON_UTIL_DISK_INFO_H +#pragma once #include #include @@ -101,4 +100,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/util/doris_metrics.h b/be/src/util/doris_metrics.h index 602eb78a7e..726431635e 100644 --- a/be/src/util/doris_metrics.h +++ b/be/src/util/doris_metrics.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_DORIS_METRICS_H -#define DORIS_BE_SRC_COMMON_UTIL_DORIS_METRICS_H +#pragma once #include #include @@ -246,5 +245,3 @@ private: }; }; // namespace doris - -#endif diff --git a/be/src/util/dummy_runtime_profile.h b/be/src/util/dummy_runtime_profile.h index 9e7778ee22..0f79d9f1fd 100644 --- a/be/src/util/dummy_runtime_profile.h +++ b/be/src/util/dummy_runtime_profile.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/dummy-runtime-profile.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_DEBUG_RUNTIME_PROFILE_H -#define DORIS_BE_SRC_UTIL_DEBUG_RUNTIME_PROFILE_H +#pragma once #include "common/object_pool.h" #include "util/runtime_profile.h" @@ -36,4 +35,3 @@ private: RuntimeProfile* const _profile; }; } // namespace doris -#endif diff --git a/be/src/util/dynamic_util.h b/be/src/util/dynamic_util.h index 97cf718e9c..c361ffb950 100644 --- a/be/src/util/dynamic_util.h +++ b/be/src/util/dynamic_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/dynamic-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_DYNAMIC_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_DYNAMIC_UTIL_H +#pragma once #include "common/status.h" @@ -41,5 +40,3 @@ Status dynamic_open(const char* library, void** handle); void dynamic_close(void* handle); } // namespace doris - -#endif diff --git a/be/src/util/errno.h b/be/src/util/errno.h index 893b1eeaca..837fc8ceb9 100644 --- a/be/src/util/errno.h +++ b/be/src/util/errno.h @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +#pragma once + #include #include diff --git a/be/src/util/error_util.h b/be/src/util/error_util.h index c1b5c6b40f..e8184d64d6 100644 --- a/be/src/util/error_util.h +++ b/be/src/util/error_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/error-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_ERROR_UTIL_H -#define DORIS_BE_SRC_UTIL_ERROR_UTIL_H +#pragma once #include @@ -30,5 +29,3 @@ namespace doris { // Returns empty string if errno is 0. std::string get_str_err_msg(); } // end namespace doris - -#endif // DORIS_BE_SRC_UTIL_ERROR_UTIL_H diff --git a/be/src/util/fake_lock.h b/be/src/util/fake_lock.h index fcf5ce1495..a706371298 100644 --- a/be/src/util/fake_lock.h +++ b/be/src/util/fake_lock.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/fake-lock.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_FAKE_LOCK_H -#define DORIS_BE_SRC_UTIL_FAKE_LOCK_H +#pragma once #include "gutil/macros.h" @@ -39,5 +38,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_UTIL_FAKE_LOCK_H diff --git a/be/src/util/file_utils.h b/be/src/util/file_utils.h index 14d1742ae6..0bef9ce4a9 100644 --- a/be/src/util/file_utils.h +++ b/be/src/util/file_utils.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_UTIL_FILE_UTILS_H -#define DORIS_BE_UTIL_FILE_UTILS_H +#pragma once #include #include @@ -110,5 +109,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/util/filesystem_util.h b/be/src/util/filesystem_util.h index ff55e8776e..ee5adbcf99 100644 --- a/be/src/util/filesystem_util.h +++ b/be/src/util/filesystem_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/filesystem-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_FILESYSTEM_UTIL_H -#define DORIS_BE_SRC_UTIL_FILESYSTEM_UTIL_H +#pragma once #include "common/status.h" @@ -61,5 +60,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/util/frame_of_reference_coding.h b/be/src/util/frame_of_reference_coding.h index d9fdaaec8b..bab0dca0ef 100644 --- a/be/src/util/frame_of_reference_coding.h +++ b/be/src/util/frame_of_reference_coding.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_FRAME_OF_REFERENCE_CODING_H -#define DORIS_FRAME_OF_REFERENCE_CODING_H +#pragma once #include #include @@ -188,5 +187,3 @@ private: std::vector _out_buffer; // store values of decoded frame }; } // namespace doris - -#endif //DORIS_FRAME_OF_REFERENCE_CODING_H diff --git a/be/src/util/hash_util.hpp b/be/src/util/hash_util.hpp index b89350eda2..04e398f5ef 100644 --- a/be/src/util/hash_util.hpp +++ b/be/src/util/hash_util.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/hash-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_HASH_UTIL_HPP -#define DORIS_BE_SRC_COMMON_UTIL_HASH_UTIL_HPP +#pragma once #include "common/compiler_util.h" #include "common/logging.h" @@ -401,5 +400,3 @@ struct hash> { }; } // namespace std - -#endif diff --git a/be/src/util/internal_queue.h b/be/src/util/internal_queue.h index de012cedba..55faf006bf 100644 --- a/be/src/util/internal_queue.h +++ b/be/src/util/internal_queue.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/internal-queue.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_INTERNAL_QUEUE_H -#define DORIS_BE_SRC_UTIL_INTERNAL_QUEUE_H +#pragma once #include #include @@ -281,4 +280,3 @@ class InternalQueue : public InternalQueueBase {}; template class InternalList : public InternalQueueBase {}; } // namespace doris -#endif diff --git a/be/src/util/json_util.h b/be/src/util/json_util.h index a0db82ae8d..dd9233d043 100644 --- a/be/src/util/json_util.h +++ b/be/src/util/json_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/json-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_JSON_UTIL_H -#define DORIS_BE_SRC_UTIL_JSON_UTIL_H +#pragma once #include #include @@ -65,5 +64,3 @@ typename boost::enable_if_c::value, void>::type ToJsonVa std::string to_json(const Status& status); } // namespace doris - -#endif diff --git a/be/src/util/load_error_hub.h b/be/src/util/load_error_hub.h index 0c361d1c7c..256a6f9877 100644 --- a/be/src/util/load_error_hub.h +++ b/be/src/util/load_error_hub.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_LOAD_ERROR_HUB_H -#define DORIS_BE_SRC_UTIL_LOAD_ERROR_HUB_H +#pragma once #include @@ -62,5 +61,3 @@ protected: }; // end class LoadErrorHub } // end namespace doris - -#endif // DORIS_BE_SRC_UTIL_LOAD_ERROR_HUB_H diff --git a/be/src/util/logging.h b/be/src/util/logging.h index ddf388d31c..605ddf14d6 100644 --- a/be/src/util/logging.h +++ b/be/src/util/logging.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_LOGGING_H -#define DORIS_BE_SRC_COMMON_UTIL_LOGGING_H +#pragma once #include #include @@ -177,5 +176,3 @@ public: }; } // namespace doris - -#endif // DORIS_BE_SRC_COMMON_UTIL_LOGGING_H diff --git a/be/src/util/lru_cache.hpp b/be/src/util/lru_cache.hpp index 638420b2a8..459acf0a14 100644 --- a/be/src/util/lru_cache.hpp +++ b/be/src/util/lru_cache.hpp @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_UTIL_LRU_CACHE_HPP -#define DORIS_BE_UTIL_LRU_CACHE_HPP +#pragma once #include #include @@ -107,5 +106,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/mem_info.h b/be/src/util/mem_info.h index d887158763..7827271604 100644 --- a/be/src/util/mem_info.h +++ b/be/src/util/mem_info.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/mem-info.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_MEM_INFO_H -#define DORIS_BE_SRC_COMMON_UTIL_MEM_INFO_H +#pragma once #include @@ -67,4 +66,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/util/mem_range.h b/be/src/util/mem_range.h index 4a3a77715d..544595e0f2 100644 --- a/be/src/util/mem_range.h +++ b/be/src/util/mem_range.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/mem-range.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_MEM_RANGE_H -#define DORIS_BE_SRC_UTIL_MEM_RANGE_H +#pragma once #include @@ -46,5 +45,3 @@ private: int64_t len_; }; } // namespace doris - -#endif diff --git a/be/src/util/mem_util.hpp b/be/src/util/mem_util.hpp index 937ebc8352..9b3c0aa8d4 100644 --- a/be/src/util/mem_util.hpp +++ b/be/src/util/mem_util.hpp @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_MEM_UTIL_HPP -#define DORIS_BE_SRC_COMMON_UTIL_MEM_UTIL_HPP +#pragma once #include @@ -607,7 +606,3 @@ inline void memory_copy(void* dst, const void* src, size_t size) { } } // namespace doris - -#endif // DORIS_BE_SRC_COMMON_SRC_UTIL_MEM_UTIL_H - -/* vim: set expandtab ts=4 sw=4 sts=4 tw=100: */ diff --git a/be/src/util/murmur_hash3.h b/be/src/util/murmur_hash3.h index 2d59df19b6..c8e8964bf6 100644 --- a/be/src/util/murmur_hash3.h +++ b/be/src/util/murmur_hash3.h @@ -2,8 +2,7 @@ // MurmurHash3 was written by Austin Appleby, and is placed in the public // domain. The author hereby disclaims copyright to this source code. -#ifndef DORIS_BE_SRC_UTIL_MURMUR_HASH3_H -#define DORIS_BE_SRC_UTIL_MURMUR_HASH3_H +#pragma once //----------------------------------------------------------------------------- // Platform-specific functions and macros @@ -35,5 +34,3 @@ void murmur_hash3_x64_128(const void* key, int len, uint32_t seed, void* out); void murmur_hash3_x64_64(const void* key, int len, uint64_t seed, void* out); //----------------------------------------------------------------------------- - -#endif // DORIS_BE_SRC_UTIL_MURMUR_HASH3_H diff --git a/be/src/util/mustache/mustache.h b/be/src/util/mustache/mustache.h index f4ee638814..e4b861f32f 100644 --- a/be/src/util/mustache/mustache.h +++ b/be/src/util/mustache/mustache.h @@ -10,6 +10,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#pragma once + #include #include "rapidjson/document.h" diff --git a/be/src/util/mysql_load_error_hub.h b/be/src/util/mysql_load_error_hub.h index 0b51ebb15d..61a54ab05c 100644 --- a/be/src/util/mysql_load_error_hub.h +++ b/be/src/util/mysql_load_error_hub.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_MYSQL_LOAD_ERROR_HUB_H -#define DORIS_BE_SRC_UTIL_MYSQL_LOAD_ERROR_HUB_H +#pragma once #include #include @@ -101,5 +100,3 @@ private: }; // end class MysqlLoadErrorHub } // end namespace doris - -#endif // DORIS_BE_SRC_UTIL_MYSQL_LOAD_ERROR_HUB_H diff --git a/be/src/util/mysql_row_buffer.h b/be/src/util/mysql_row_buffer.h index 929fb9b0a6..5d00ae9f68 100644 --- a/be/src/util/mysql_row_buffer.h +++ b/be/src/util/mysql_row_buffer.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_QUERY_MYSQL_MYSQL_ROW_BUFFER_H -#define DORIS_BE_SRC_QUERY_MYSQL_MYSQL_ROW_BUFFER_H +#pragma once #include @@ -129,5 +128,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_QUERY_MYSQL_MYSQL_ROW_BUFFER_H diff --git a/be/src/util/network_util.h b/be/src/util/network_util.h index af858beee2..c506bac7c8 100644 --- a/be/src/util/network_util.h +++ b/be/src/util/network_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/network-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_NETWORK_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_NETWORK_UTIL_H +#pragma once #include @@ -61,5 +60,3 @@ TNetworkAddress make_network_address(const std::string& hostname, int port); Status get_inet_interfaces(std::vector* interfaces, bool include_ipv6 = false); } // namespace doris - -#endif diff --git a/be/src/util/null_load_error_hub.h b/be/src/util/null_load_error_hub.h index f110ea49f3..734e9b9f61 100644 --- a/be/src/util/null_load_error_hub.h +++ b/be/src/util/null_load_error_hub.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_NULL_LOAD_ERROR_HUB_H -#define DORIS_BE_SRC_UTIL_NULL_LOAD_ERROR_HUB_H +#pragma once #include #include @@ -51,5 +50,3 @@ private: }; // end class NullLoadErrorHub } // end namespace doris - -#endif // DORIS_BE_SRC_UTIL_NULL_LOAD_ERROR_HUB_H diff --git a/be/src/util/once.h b/be/src/util/once.h index ff8fa89839..886a0b6fc6 100644 --- a/be/src/util/once.h +++ b/be/src/util/once.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/once.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_ONCE_H -#define DORIS_BE_SRC_UTIL_ONCE_H +#pragma once #include @@ -80,5 +79,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_UTIL_ONCE_H diff --git a/be/src/util/os_info.h b/be/src/util/os_info.h index 7b4da8438b..07bcd8905a 100644 --- a/be/src/util/os_info.h +++ b/be/src/util/os_info.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/os-info.h // and modified by Doris -#ifndef DORIS_BE_UTIL_OS_INFO_H -#define DORIS_BE_UTIL_OS_INFO_H +#pragma once #include @@ -57,4 +56,3 @@ private: }; } // namespace doris -#endif diff --git a/be/src/util/os_util.h b/be/src/util/os_util.h index 220ee0dd55..850fb292ec 100644 --- a/be/src/util/os_util.h +++ b/be/src/util/os_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/os-util.h // and modified by Doris -#ifndef DORIS_BE_UTIL_OS_UTIL_H -#define DORIS_BE_UTIL_OS_UTIL_H +#pragma once #include #include @@ -66,5 +65,3 @@ void disable_core_dumps(); // This may return false on unsupported (non-Linux) platforms. bool is_being_debugged(); } // namespace doris - -#endif diff --git a/be/src/util/parse_util.h b/be/src/util/parse_util.h index 839a380bed..14c8cb85ba 100644 --- a/be/src/util/parse_util.h +++ b/be/src/util/parse_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/parse-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_PARSE_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_PARSE_UTIL_H +#pragma once #include @@ -45,5 +44,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/util/path_builder.h b/be/src/util/path_builder.h index b52dd6a063..c35ca15d9d 100644 --- a/be/src/util/path_builder.h +++ b/be/src/util/path_builder.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/path-builder.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_PATH_BUILDER_H -#define DORIS_BE_SRC_COMMON_UTIL_PATH_BUILDER_H +#pragma once #include @@ -43,5 +42,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/perf_counters.h b/be/src/util/perf_counters.h index 667cf3e0ef..adad06c354 100644 --- a/be/src/util/perf_counters.h +++ b/be/src/util/perf_counters.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/perf-counters.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_PERF_COUNTERS_H -#define DORIS_BE_SRC_COMMON_UTIL_PERF_COUNTERS_H +#pragma once #include #include @@ -141,5 +140,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/pretty_printer.h b/be/src/util/pretty_printer.h index 66a4852c90..501d15d42a 100644 --- a/be/src/util/pretty_printer.h +++ b/be/src/util/pretty_printer.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/pretty-printer.h // and modified by Doris -#ifndef IMPALA_UTIL_PRETTY_PRINTER_H -#define IMPALA_UTIL_PRETTY_PRINTER_H +#pragma once #include #include @@ -284,5 +283,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/priority_thread_pool.hpp b/be/src/util/priority_thread_pool.hpp index ba0712973b..20d90b3f41 100644 --- a/be/src/util/priority_thread_pool.hpp +++ b/be/src/util/priority_thread_pool.hpp @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_PRIORITY_THREAD_POOL_HPP -#define DORIS_BE_SRC_COMMON_UTIL_PRIORITY_THREAD_POOL_HPP +#pragma once #include #include @@ -152,5 +151,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/progress_updater.h b/be/src/util/progress_updater.h index 3285df8cdd..5f241673af 100644 --- a/be/src/util/progress_updater.h +++ b/be/src/util/progress_updater.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/progress-updater.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_PROGRESS_UPDATER_H -#define DORIS_BE_SRC_COMMON_UTIL_PROGRESS_UPDATER_H +#pragma once #include @@ -61,5 +60,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/quantile_state.h b/be/src/util/quantile_state.h index ef1b13d49e..30cc7f48fa 100644 --- a/be/src/util/quantile_state.h +++ b/be/src/util/quantile_state.h @@ -14,8 +14,8 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_QUANTILE_STATE_H -#define DORIS_BE_SRC_OLAP_QUANTILE_STATE_H + +#pragma once #include #include @@ -67,5 +67,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_OLAP_QUANTILE_STATE_H diff --git a/be/src/util/radix_sort.h b/be/src/util/radix_sort.h index e90345fdb7..35cc458795 100644 --- a/be/src/util/radix_sort.h +++ b/be/src/util/radix_sort.h @@ -23,8 +23,7 @@ * */ -#ifndef RADIXSORT_H_ -#define RADIXSORT_H_ +#pragma once #include #include @@ -303,5 +302,3 @@ void radixSortLSD(T* arr, size_t size) { } } // namespace doris - -#endif // RADIXSORT_H_ diff --git a/be/src/util/random.h b/be/src/util/random.h index 08310882c8..9a05b5d26a 100644 --- a/be/src/util/random.h +++ b/be/src/util/random.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_RANDOM_H -#define DORIS_BE_SRC_COMMON_UTIL_RANDOM_H +#pragma once #include @@ -72,5 +71,3 @@ public: }; } // namespace doris - -#endif //DORIS_BE_SRC_COMMON_UTIL_RANDOM_H diff --git a/be/src/util/runtime_profile.h b/be/src/util/runtime_profile.h index 5cbd27492b..5c90960196 100644 --- a/be/src/util/runtime_profile.h +++ b/be/src/util/runtime_profile.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/runtime-profile.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_RUNTIME_PROFILE_H -#define DORIS_BE_SRC_COMMON_UTIL_RUNTIME_PROFILE_H +#pragma once #include #include @@ -572,5 +571,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/scoped_cleanup.h b/be/src/util/scoped_cleanup.h index 196989159d..395c3c464d 100644 --- a/be/src/util/scoped_cleanup.h +++ b/be/src/util/scoped_cleanup.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_SCOPED_CLEANUP_H -#define DORIS_BE_SRC_UTIL_SCOPED_CLEANUP_H +#pragma once #include @@ -63,5 +62,3 @@ ScopedCleanup MakeScopedCleanup(F f) { } } // namespace doris - -#endif //DORIS_BE_SRC_UTIL_SCOPED_CLEANUP_H diff --git a/be/src/util/simd/bits.h b/be/src/util/simd/bits.h index 9bdedf99c3..b907ebb5ef 100644 --- a/be/src/util/simd/bits.h +++ b/be/src/util/simd/bits.h @@ -15,6 +15,8 @@ // specific language governing permissions and limitations // under the License. +#pragma once + #include #ifdef __AVX2__ diff --git a/be/src/util/simd/lower_upper_impl.h b/be/src/util/simd/lower_upper_impl.h index f3fd442931..5f475de95f 100644 --- a/be/src/util/simd/lower_upper_impl.h +++ b/be/src/util/simd/lower_upper_impl.h @@ -16,6 +16,7 @@ // under the License. #pragma once + #ifdef __SSE2__ #include #endif diff --git a/be/src/util/simdutf8check.h b/be/src/util/simdutf8check.h index 9b0105b679..87e5b1aaa4 100644 --- a/be/src/util/simdutf8check.h +++ b/be/src/util/simdutf8check.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef SIMDUTF8CHECK_H -#define SIMDUTF8CHECK_H +#pragma once + #include #include #include @@ -311,4 +311,3 @@ static inline void avx_count_nibbles(__m256i bytes, struct avx_processed_utf_byt } #endif // __AVX2__ -#endif diff --git a/be/src/util/slice.h b/be/src/util/slice.h index cc1c511bd9..90f48224ea 100644 --- a/be/src/util/slice.h +++ b/be/src/util/slice.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_OLAP_STRING_SLICE_H -#define DORIS_BE_SRC_OLAP_STRING_SLICE_H +#pragma once #include #include @@ -286,5 +285,3 @@ private: }; } // namespace doris - -#endif // DORIS_BE_SRC_OLAP_STRING_SLICE_H diff --git a/be/src/util/sort_heap.h b/be/src/util/sort_heap.h index c7b95ae3c2..108017834b 100644 --- a/be/src/util/sort_heap.h +++ b/be/src/util/sort_heap.h @@ -16,6 +16,7 @@ // under the License. #pragma once + #include #include #include diff --git a/be/src/util/spinlock.h b/be/src/util/spinlock.h index 8be9663c2a..3c63b50bc1 100644 --- a/be/src/util/spinlock.h +++ b/be/src/util/spinlock.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/spinlock.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_SPINLOCK_H -#define DORIS_BE_SRC_UTIL_SPINLOCK_H +#pragma once #include @@ -61,5 +60,3 @@ private: }; } // end namespace doris - -#endif // DORIS_BE_SRC_UTIL_SPINLOCK_H diff --git a/be/src/util/sse2neon.h b/be/src/util/sse2neon.h index 9d53b59edb..c31bb1e105 100644 --- a/be/src/util/sse2neon.h +++ b/be/src/util/sse2neon.h @@ -1,6 +1,3 @@ -#ifndef SSE2NEON_H -#define SSE2NEON_H - // This header file provides a simple API translation layer // between SSE intrinsics to their corresponding Arm/Aarch64 NEON versions // @@ -40,6 +37,8 @@ * SOFTWARE. */ +#pragma once + #if defined(__GNUC__) || defined(__clang__) #pragma push_macro("FORCE_INLINE") @@ -3121,6 +3120,4 @@ FORCE_INLINE void _mm_clflush(void const* p) { #if defined(__GNUC__) || defined(__clang__) #pragma pop_macro("ALIGN_STRUCT") #pragma pop_macro("FORCE_INLINE") -#endif - #endif \ No newline at end of file diff --git a/be/src/util/sse_util.hpp b/be/src/util/sse_util.hpp index 3cabc27e1a..a18b63ba6a 100644 --- a/be/src/util/sse_util.hpp +++ b/be/src/util/sse_util.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/sse-util.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_SSE_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_SSE_UTIL_H +#pragma once #include #include @@ -59,5 +58,3 @@ static const int SSE_BITMASK[CHARS_PER_128_BIT_REGISTER] = { } // namespace sse_util } // namespace doris - -#endif diff --git a/be/src/util/stat_util.hpp b/be/src/util/stat_util.hpp index 6a6c3f50bd..7cfcb3cf53 100644 --- a/be/src/util/stat_util.hpp +++ b/be/src/util/stat_util.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/stat-util.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_STAT_UTIL_HPP -#define DORIS_BE_SRC_COMMON_UTIL_STAT_UTIL_HPP +#pragma once #include @@ -50,5 +49,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/util/stopwatch.hpp b/be/src/util/stopwatch.hpp index f94bd06c81..1c9857313b 100644 --- a/be/src/util/stopwatch.hpp +++ b/be/src/util/stopwatch.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/stopwatch.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_STOPWATCH_HPP -#define DORIS_BE_SRC_COMMON_UTIL_STOPWATCH_HPP +#pragma once #include @@ -94,5 +93,3 @@ using MonotonicStopWatch = CustomStopWatch; using ThreadCpuStopWatch = CustomStopWatch; } // namespace doris - -#endif diff --git a/be/src/util/streaming_sampler.h b/be/src/util/streaming_sampler.h index a9578bcd7d..f5b727ac43 100644 --- a/be/src/util/streaming_sampler.h +++ b/be/src/util/streaming_sampler.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_STREAMING_SAMPLER_H -#define DORIS_BE_SRC_UTIL_STREAMING_SAMPLER_H +#pragma once #include @@ -149,5 +148,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/string_parser.hpp b/be/src/util/string_parser.hpp index bb321c081b..b8b465c2c6 100644 --- a/be/src/util/string_parser.hpp +++ b/be/src/util/string_parser.hpp @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/string-parser.hpp // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_STRING_PARSER_H -#define DORIS_BE_SRC_COMMON_UTIL_STRING_PARSER_H +#pragma once #include #include @@ -812,5 +811,3 @@ inline __int128 StringParser::string_to_decimal(const char* s, int len, int type } } // end namespace doris - -#endif // end of DORIS_BE_SRC_COMMON_UTIL_STRING_PARSER_HPP diff --git a/be/src/util/symbols_util.h b/be/src/util/symbols_util.h index 716b3356a2..1c4dc7b8b5 100644 --- a/be/src/util/symbols_util.h +++ b/be/src/util/symbols_util.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/symbols-util.h // and modified by Doris -#ifndef DORIS_BE_SRC_COMMON_UTIL_SYMBOLS_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_SYMBOLS_UTIL_H +#pragma once #include #include @@ -71,5 +70,3 @@ public: }; } // namespace doris - -#endif diff --git a/be/src/util/system_metrics.h b/be/src/util/system_metrics.h index 87dc2a368f..67225657f8 100644 --- a/be/src/util/system_metrics.h +++ b/be/src/util/system_metrics.h @@ -16,6 +16,7 @@ // under the License. #pragma once + #include #include diff --git a/be/src/util/tdigest.h b/be/src/util/tdigest.h index 85cfe7c477..079c0996ba 100644 --- a/be/src/util/tdigest.h +++ b/be/src/util/tdigest.h @@ -40,8 +40,7 @@ // https://github.com/tdunning/t-digest/blob/07b8f2ca2be8d0a9f04df2feadad5ddc1bb73c88/docs/t-digest-paper/histo.pdf. // https://github.com/derrickburns/tdigest -#ifndef TDIGEST2_TDIGEST_H_ -#define TDIGEST2_TDIGEST_H_ +#pragma once #include #include @@ -783,5 +782,3 @@ private: }; } // namespace doris - -#endif // TDIGEST2_TDIGEST_H_ diff --git a/be/src/util/thread.h b/be/src/util/thread.h index 0c4327a65d..93ecf7faa0 100644 --- a/be/src/util/thread.h +++ b/be/src/util/thread.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/thread.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_THREAD_H -#define DORIS_BE_SRC_UTIL_THREAD_H +#pragma once #include #include @@ -285,5 +284,3 @@ private: void register_thread_display_page(WebPageHandler* web_page_handler); } //namespace doris - -#endif //DORIS_BE_SRC_UTIL_THREAD_H diff --git a/be/src/util/threadpool.h b/be/src/util/threadpool.h index 215b968c14..bf07e16846 100644 --- a/be/src/util/threadpool.h +++ b/be/src/util/threadpool.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/threadpool.h // and modified by Doris -#ifndef DORIS_BE_SRC_UTIL_THREAD_POOL_H -#define DORIS_BE_SRC_UTIL_THREAD_POOL_H +#pragma once #include #include @@ -490,5 +489,3 @@ private: }; } // namespace doris - -#endif //DORIS_BE_SRC_UTIL_THREAD_POOL_H diff --git a/be/src/util/thrift_client.h b/be/src/util/thrift_client.h index 920dfd869f..b248bb7132 100644 --- a/be/src/util/thrift_client.h +++ b/be/src/util/thrift_client.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_THRIFT_CLIENT_H -#define DORIS_BE_SRC_COMMON_UTIL_THRIFT_CLIENT_H +#pragma once #include #include @@ -129,4 +128,3 @@ ThriftClient::ThriftClient(const std::string& ipaddress, int port } } // namespace doris -#endif diff --git a/be/src/util/thrift_server.h b/be/src/util/thrift_server.h index 6b05bcc83a..dacde385e6 100644 --- a/be/src/util/thrift_server.h +++ b/be/src/util/thrift_server.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_THRIFT_SERVER_H -#define DORIS_BE_SRC_COMMON_UTIL_THRIFT_SERVER_H +#pragma once #include #include @@ -148,5 +147,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/thrift_util.h b/be/src/util/thrift_util.h index 51268ac6fe..6594bfa6c9 100644 --- a/be/src/util/thrift_util.h +++ b/be/src/util/thrift_util.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_THRIFT_UTIL_H -#define DORIS_BE_SRC_COMMON_UTIL_THRIFT_UTIL_H +#pragma once #include #include @@ -170,5 +169,3 @@ void t_network_address_to_string(const TNetworkAddress& address, std::string* ou bool t_network_address_comparator(const TNetworkAddress& a, const TNetworkAddress& b); } // namespace doris - -#endif diff --git a/be/src/util/time.h b/be/src/util/time.h index f542b349d8..7c0c8c0afd 100644 --- a/be/src/util/time.h +++ b/be/src/util/time.h @@ -18,8 +18,7 @@ // https://github.com/apache/impala/blob/branch-2.9.0/be/src/util/time.h // and modified by Doris -#ifndef DORIS_BE_UTIL_TIME_H -#define DORIS_BE_UTIL_TIME_H +#pragma once #include #include @@ -129,4 +128,3 @@ std::string ToStringFromUnixMicros(int64_t us, TimePrecision p = TimePrecision:: std::string ToUtcStringFromUnixMicros(int64_t us, TimePrecision p = TimePrecision::Microsecond); } // namespace doris -#endif diff --git a/be/src/util/topn_counter.h b/be/src/util/topn_counter.h index 3be5325d97..51fabceed4 100644 --- a/be/src/util/topn_counter.h +++ b/be/src/util/topn_counter.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTI_TOPN_COUNTER_H -#define DORIS_BE_SRC_UTI_TOPN_COUNTER_H +#pragma once #include #include @@ -171,5 +170,3 @@ public: } }; } // namespace doris - -#endif //DORIS_BE_SRC_UTI_TOPN_COUNTER_H diff --git a/be/src/util/tuple_row_compare.h b/be/src/util/tuple_row_compare.h index 4575cfeb3a..7cd3073986 100644 --- a/be/src/util/tuple_row_compare.h +++ b/be/src/util/tuple_row_compare.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef INF_DORIS_BE_SRC_UTIL_TUPLE_ROW_COMPARE_H -#define INF_DORIS_BE_SRC_UTIL_TUPLE_ROW_COMPARE_H +#pragma once #include "exec/sort_exec_exprs.h" #include "exprs/expr.h" @@ -143,5 +142,3 @@ private: typedef int (*CompareFn)(ExprContext* const*, ExprContext* const*, TupleRow*, TupleRow*); }; } // namespace doris - -#endif diff --git a/be/src/util/tuple_row_zorder_compare.h b/be/src/util/tuple_row_zorder_compare.h index 2c7c3420dc..b27ad14999 100644 --- a/be/src/util/tuple_row_zorder_compare.h +++ b/be/src/util/tuple_row_zorder_compare.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_TUPLE_ROW_ZORDER_COMPARE_H -#define DORIS_TUPLE_ROW_ZORDER_COMPARE_H +#pragma once #include "exec/sort_exec_exprs.h" #include "exprs/expr.h" @@ -67,5 +66,3 @@ public: int get_type_byte_size(FieldType type) const; }; } // namespace doris - -#endif //DORIS_TUPLE_ROW_ZORDER_COMPARE_H \ No newline at end of file diff --git a/be/src/util/uid_util.h b/be/src/util/uid_util.h index 8a5a89aaeb..c5d2e6222c 100644 --- a/be/src/util/uid_util.h +++ b/be/src/util/uid_util.h @@ -15,15 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_UID_UTIL_H -#define DORIS_BE_SRC_UTIL_UID_UTIL_H +#pragma once #include #include #include "gen_cpp/Types_types.h" // for TUniqueId #include "gen_cpp/types.pb.h" // for PUniqueId -// #include "util/debug_util.h" #include "util/hash_util.hpp" #include "util/uuid_generator.h" @@ -183,5 +181,3 @@ struct hash { }; } // namespace std - -#endif // DORIS_BE_SRC_UTIL_UID_UTIL_H diff --git a/be/src/util/url_coding.h b/be/src/util/url_coding.h index 695228240e..e1fd26e432 100644 --- a/be/src/util/url_coding.h +++ b/be/src/util/url_coding.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_URL_CODING_H -#define DORIS_BE_SRC_COMMON_UTIL_URL_CODING_H +#pragma once #include #include @@ -59,5 +58,3 @@ void escape_for_html(const std::string& in, std::stringstream* out); // Same as above, but returns a string. std::string escape_for_html_to_string(const std::string& in); } // namespace doris - -#endif diff --git a/be/src/util/url_parser.h b/be/src/util/url_parser.h index fdaf645489..3363f65e6b 100644 --- a/be/src/util/url_parser.h +++ b/be/src/util/url_parser.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_COMMON_UTIL_URL_PARSER_H -#define DORIS_BE_SRC_COMMON_UTIL_URL_PARSER_H +#pragma once #include "runtime/string_search.hpp" #include "runtime/string_value.h" @@ -88,5 +87,3 @@ private: }; } // namespace doris - -#endif diff --git a/be/src/util/utf8_check.h b/be/src/util/utf8_check.h index d0ef0df9f5..4214e186b7 100644 --- a/be/src/util/utf8_check.h +++ b/be/src/util/utf8_check.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_UTF8_CHECK_H -#define DORIS_BE_SRC_UTIL_UTF8_CHECK_H +#pragma once #include @@ -27,5 +26,3 @@ bool validate_utf8(const char* src, size_t len); // check utf8 use naive c++ bool validate_utf8_naive(const char* data, size_t len); } // namespace doris - -#endif // DORIS_BE_SRC_UTIL_UTF8_CHECK_H diff --git a/be/src/util/zip_util.h b/be/src/util/zip_util.h index 84f267d2d5..bbffaad8fd 100644 --- a/be/src/util/zip_util.h +++ b/be/src/util/zip_util.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef DORIS_BE_SRC_UTIL_ZIP_UTIL_H -#define DORIS_BE_SRC_UTIL_ZIP_UTIL_H +#pragma once #include @@ -70,5 +69,3 @@ private: std::vector _clean_paths; }; } // namespace doris - -#endif //CORE_ZIP_UTIL_H