From 8321a6d39a277d7dcb178af55d67e8fe7051a2a5 Mon Sep 17 00:00:00 2001 From: chenhao7253886 Date: Fri, 2 Nov 2018 09:58:21 +0800 Subject: [PATCH] Change variable and namespace name in BE --- be/CMakeLists.txt | 2 +- be/src/aes/my_aes.cpp | 2 +- be/src/aes/my_aes.h | 2 +- be/src/aes/my_aes_impl.h | 6 +- be/src/aes/my_aes_openssl.cpp | 2 +- be/src/agent/agent_server.cpp | 6 +- be/src/agent/agent_server.h | 10 +- be/src/agent/cgroups_mgr.cpp | 68 ++-- be/src/agent/cgroups_mgr.h | 8 +- be/src/agent/file_downloader.cpp | 108 +++--- be/src/agent/file_downloader.h | 10 +- be/src/agent/heartbeat_server.cpp | 8 +- be/src/agent/heartbeat_server.h | 10 +- be/src/agent/pusher.cpp | 44 +-- be/src/agent/pusher.h | 10 +- be/src/agent/status.h | 50 +-- be/src/agent/task_worker_pool.cpp | 168 ++++---- be/src/agent/task_worker_pool.h | 10 +- be/src/agent/topic_listener.h | 6 +- be/src/agent/topic_subscriber.cpp | 4 +- be/src/agent/topic_subscriber.h | 8 +- be/src/agent/user_resource_listener.cpp | 2 +- be/src/agent/user_resource_listener.h | 8 +- be/src/agent/utils.cpp | 116 +++--- be/src/agent/utils.h | 10 +- be/src/codegen/CMakeLists.txt | 22 +- be/src/codegen/codegen_anyval.cpp | 32 +- be/src/codegen/codegen_anyval.h | 2 +- be/src/codegen/codegen_anyval_ir.cpp | 2 +- be/src/codegen/{palo_ir.cpp => doris_ir.cpp} | 0 be/src/codegen/{palo_ir.h => doris_ir.h} | 4 +- .../{palo_ir_data.h => doris_ir_data.h} | 12 +- be/src/codegen/gen_ir_descriptions.py | 46 +-- be/src/codegen/llvm_codegen.cpp | 22 +- be/src/codegen/llvm_codegen.h | 26 +- be/src/codegen/llvm_codegen_test.cpp | 16 +- be/src/codegen/subexpr_elimination.cpp | 4 +- be/src/codegen/subexpr_elimination.h | 6 +- be/src/common/atomic.h | 10 +- be/src/common/compiler_util.h | 4 +- be/src/common/config.h | 34 +- be/src/common/configbase.cpp | 4 +- be/src/common/configbase.h | 10 +- be/src/common/daemon.cpp | 16 +- be/src/common/daemon.h | 6 +- be/src/common/global_types.h | 6 +- be/src/common/hdfs.h | 4 +- be/src/common/logconfig.cpp | 4 +- be/src/common/object_pool.h | 6 +- be/src/common/resource_tls.cpp | 2 +- be/src/common/resource_tls.h | 6 +- be/src/common/status.cpp | 2 +- be/src/common/status.h | 6 +- be/src/exec/aggregation_node.cpp | 76 ++-- be/src/exec/aggregation_node.h | 8 +- be/src/exec/aggregation_node_ir.cpp | 2 +- be/src/exec/analytic_eval_node.cpp | 8 +- be/src/exec/analytic_eval_node.h | 8 +- be/src/exec/blocking_join_node.cpp | 4 +- be/src/exec/blocking_join_node.h | 6 +- be/src/exec/broker_reader.cpp | 4 +- be/src/exec/broker_reader.h | 2 +- be/src/exec/broker_scan_node.cpp | 2 +- be/src/exec/broker_scan_node.h | 2 +- be/src/exec/broker_scanner.cpp | 2 +- be/src/exec/broker_scanner.h | 4 +- be/src/exec/broker_writer.cpp | 6 +- be/src/exec/broker_writer.h | 10 +- be/src/exec/cross_join_node.cpp | 2 +- be/src/exec/cross_join_node.h | 6 +- be/src/exec/csv_scan_node.cpp | 4 +- be/src/exec/csv_scan_node.h | 10 +- be/src/exec/csv_scanner.cpp | 4 +- be/src/exec/csv_scanner.h | 10 +- be/src/exec/data_sink.cpp | 4 +- be/src/exec/data_sink.h | 8 +- be/src/exec/decompressor.cpp | 8 +- be/src/exec/decompressor.h | 4 +- be/src/exec/empty_set_node.cpp | 2 +- be/src/exec/empty_set_node.h | 2 +- be/src/exec/exchange_node.cpp | 2 +- be/src/exec/exchange_node.h | 6 +- be/src/exec/exec_node.cpp | 2 +- be/src/exec/exec_node.h | 6 +- be/src/exec/file_reader.h | 2 +- be/src/exec/file_writer.h | 10 +- be/src/exec/hash_join_node.cpp | 4 +- be/src/exec/hash_join_node.h | 6 +- be/src/exec/hash_join_node_ir.cpp | 2 +- be/src/exec/hash_table.cpp | 20 +- be/src/exec/hash_table.h | 8 +- be/src/exec/hash_table.hpp | 6 +- be/src/exec/kudu_scan_node.cpp | 2 +- be/src/exec/kudu_scan_node.h | 2 +- be/src/exec/kudu_scanner.cpp | 2 +- be/src/exec/kudu_scanner.h | 6 +- be/src/exec/kudu_util.cpp | 2 +- be/src/exec/kudu_util.h | 2 +- be/src/exec/line_reader.h | 2 +- be/src/exec/local_file_reader.cpp | 2 +- be/src/exec/local_file_reader.h | 2 +- be/src/exec/local_file_writer.cpp | 4 +- be/src/exec/local_file_writer.h | 10 +- be/src/exec/merge_join_node.cpp | 2 +- be/src/exec/merge_join_node.h | 6 +- be/src/exec/merge_node.cpp | 2 +- be/src/exec/merge_node.h | 6 +- be/src/exec/mysql_scan_node.cpp | 2 +- be/src/exec/mysql_scan_node.h | 6 +- be/src/exec/mysql_scanner.cpp | 2 +- be/src/exec/mysql_scanner.h | 8 +- .../exec/new_partitioned_aggregation_node.cc | 4 +- .../exec/new_partitioned_aggregation_node.h | 6 +- .../new_partitioned_aggregation_node_ir.cc | 2 +- be/src/exec/new_partitioned_hash_table.cc | 12 +- be/src/exec/new_partitioned_hash_table.h | 8 +- .../exec/new_partitioned_hash_table.inline.h | 6 +- be/src/exec/new_partitioned_hash_table_ir.cc | 2 +- be/src/exec/olap_common.cpp | 8 +- be/src/exec/olap_common.h | 22 +- be/src/exec/olap_meta_reader.cpp | 6 +- be/src/exec/olap_meta_reader.h | 10 +- be/src/exec/olap_rewrite_node.cpp | 2 +- be/src/exec/olap_rewrite_node.h | 6 +- be/src/exec/olap_scan_node.cpp | 46 +-- be/src/exec/olap_scan_node.h | 18 +- be/src/exec/olap_scanner.cpp | 20 +- be/src/exec/olap_scanner.h | 12 +- be/src/exec/olap_table_info.cpp | 2 +- be/src/exec/olap_table_info.h | 6 +- be/src/exec/olap_table_sink.cpp | 4 +- be/src/exec/olap_table_sink.h | 4 +- be/src/exec/olap_utils.h | 8 +- be/src/exec/partitioned_aggregation_node.cc | 74 ++-- be/src/exec/partitioned_aggregation_node.h | 22 +- .../exec/partitioned_aggregation_node_ir.cc | 4 +- be/src/exec/partitioned_hash_table.cc | 16 +- be/src/exec/partitioned_hash_table.h | 12 +- be/src/exec/partitioned_hash_table.inline.h | 10 +- be/src/exec/partitioned_hash_table_ir.cc | 4 +- be/src/exec/pl_task_root.cpp | 2 +- be/src/exec/pl_task_root.h | 2 +- be/src/exec/plain_text_line_reader.cpp | 2 +- be/src/exec/plain_text_line_reader.h | 2 +- be/src/exec/pre_aggregation_node.cpp | 2 +- be/src/exec/pre_aggregation_node.h | 6 +- be/src/exec/read_write_util.cpp | 2 +- be/src/exec/read_write_util.h | 6 +- be/src/exec/row_batch_list.h | 6 +- be/src/exec/scan_node.cpp | 2 +- be/src/exec/scan_node.h | 6 +- be/src/exec/schema_scan_node.cpp | 2 +- be/src/exec/schema_scan_node.h | 6 +- be/src/exec/schema_scanner.cpp | 4 +- be/src/exec/schema_scanner.h | 16 +- .../exec/schema_scanner/frontend_helper.cpp | 2 +- be/src/exec/schema_scanner/frontend_helper.h | 6 +- .../schema_charsets_scanner.cpp | 2 +- .../schema_scanner/schema_charsets_scanner.h | 6 +- .../schema_collations_scanner.cpp | 2 +- .../schema_collations_scanner.h | 6 +- .../schema_scanner/schema_columns_scanner.cpp | 2 +- .../schema_scanner/schema_columns_scanner.h | 6 +- .../schema_scanner/schema_dummy_scanner.cpp | 2 +- .../schema_scanner/schema_dummy_scanner.h | 6 +- .../schema_schemata_scanner.cpp | 2 +- .../schema_scanner/schema_schemata_scanner.h | 6 +- .../schema_scanner/schema_tables_scanner.cpp | 2 +- .../schema_scanner/schema_tables_scanner.h | 6 +- .../schema_variables_scanner.cpp | 2 +- .../schema_scanner/schema_variables_scanner.h | 6 +- be/src/exec/select_node.cpp | 2 +- be/src/exec/select_node.h | 6 +- be/src/exec/sort_exec_exprs.cpp | 4 +- be/src/exec/sort_exec_exprs.h | 6 +- be/src/exec/sort_node.cpp | 2 +- be/src/exec/sort_node.h | 6 +- be/src/exec/spill_sort_node.cc | 4 +- be/src/exec/spill_sort_node.h | 10 +- be/src/exec/text_converter.cpp | 2 +- be/src/exec/text_converter.h | 6 +- be/src/exec/text_converter.hpp | 6 +- be/src/exec/topn_node.cpp | 2 +- be/src/exec/topn_node.h | 6 +- be/src/exec/union_node.cpp | 2 +- be/src/exec/union_node.h | 4 +- be/src/exec/union_node_ir.cpp | 2 +- be/src/exprs/agg_fn.cc | 4 +- be/src/exprs/agg_fn.h | 8 +- be/src/exprs/agg_fn_evaluator.cpp | 28 +- be/src/exprs/agg_fn_evaluator.h | 58 +-- be/src/exprs/aggregate_functions.cpp | 104 ++--- be/src/exprs/aggregate_functions.h | 238 ++++++------ be/src/exprs/anyval_util.cpp | 26 +- be/src/exprs/anyval_util.h | 152 ++++---- be/src/exprs/arithmetic_expr.cpp | 22 +- be/src/exprs/arithmetic_expr.h | 6 +- be/src/exprs/base64.cpp | 2 +- be/src/exprs/base64.h | 6 +- be/src/exprs/binary_predicate.cpp | 34 +- be/src/exprs/binary_predicate.h | 6 +- be/src/exprs/case_expr.cpp | 52 +-- be/src/exprs/case_expr.h | 6 +- be/src/exprs/cast_expr.cpp | 10 +- be/src/exprs/cast_expr.h | 6 +- be/src/exprs/cast_functions.cpp | 2 +- be/src/exprs/cast_functions.h | 6 +- be/src/exprs/compound_predicate.cpp | 2 +- be/src/exprs/compound_predicate.h | 12 +- be/src/exprs/conditional_functions.cpp | 2 +- be/src/exprs/conditional_functions.h | 6 +- be/src/exprs/conditional_functions_ir.cpp | 2 +- be/src/exprs/decimal_operators.cpp | 2 +- be/src/exprs/decimal_operators.h | 6 +- be/src/exprs/encryption_functions.cpp | 2 +- be/src/exprs/encryption_functions.h | 30 +- be/src/exprs/es_functions.cpp | 4 +- be/src/exprs/es_functions.h | 12 +- be/src/exprs/expr.cpp | 8 +- be/src/exprs/expr.h | 12 +- be/src/exprs/expr_context.cpp | 32 +- be/src/exprs/expr_context.h | 12 +- be/src/exprs/expr_ir.cpp | 10 +- be/src/exprs/expr_value.h | 6 +- be/src/exprs/hll_hash_function.cpp | 12 +- be/src/exprs/hll_hash_function.h | 16 +- be/src/exprs/hybird_map.h | 8 +- be/src/exprs/hybird_set.cpp | 2 +- be/src/exprs/hybird_set.h | 8 +- be/src/exprs/in_predicate.cpp | 2 +- be/src/exprs/in_predicate.h | 6 +- be/src/exprs/info_func.cpp | 2 +- be/src/exprs/info_func.h | 6 +- be/src/exprs/is_null_predicate.cpp | 2 +- be/src/exprs/is_null_predicate.h | 6 +- be/src/exprs/json_functions.cpp | 2 +- be/src/exprs/json_functions.h | 24 +- be/src/exprs/like_predicate.cpp | 2 +- be/src/exprs/like_predicate.h | 128 +++---- be/src/exprs/literal.cpp | 4 +- be/src/exprs/literal.h | 6 +- be/src/exprs/math_functions.cpp | 14 +- be/src/exprs/math_functions.h | 270 ++++++------- be/src/exprs/new_agg_fn_evaluator.cc | 4 +- be/src/exprs/new_agg_fn_evaluator.h | 14 +- be/src/exprs/new_agg_fn_evaluator_ir.cc | 2 +- be/src/exprs/new_in_predicate.cpp | 2 +- be/src/exprs/new_in_predicate.h | 358 +++++++++--------- be/src/exprs/null_literal.cpp | 2 +- be/src/exprs/null_literal.h | 26 +- be/src/exprs/operators.cpp | 10 +- be/src/exprs/operators.h | 8 +- be/src/exprs/predicate.h | 6 +- be/src/exprs/scalar_fn_call.cpp | 8 +- be/src/exprs/scalar_fn_call.h | 32 +- be/src/exprs/slot_ref.cpp | 6 +- be/src/exprs/slot_ref.h | 30 +- be/src/exprs/string_functions.cpp | 2 +- be/src/exprs/string_functions.h | 156 ++++---- be/src/exprs/timestamp_functions.cpp | 4 +- be/src/exprs/timestamp_functions.h | 224 +++++------ be/src/exprs/timezone_db.cpp | 2 +- be/src/exprs/tuple_is_null_predicate.cpp | 2 +- be/src/exprs/tuple_is_null_predicate.h | 6 +- be/src/exprs/udf_builtins.cpp | 26 +- be/src/exprs/udf_builtins.h | 38 +- be/src/exprs/utility_functions.cpp | 2 +- be/src/exprs/utility_functions.h | 14 +- be/src/gen_cpp/CMakeLists.txt | 4 +- be/src/http/action/checksum_action.cpp | 4 +- be/src/http/action/checksum_action.h | 10 +- be/src/http/action/health_action.cpp | 4 +- be/src/http/action/health_action.h | 10 +- be/src/http/action/meta_action.cpp | 4 +- be/src/http/action/meta_action.h | 10 +- be/src/http/action/metrics_action.cpp | 2 +- be/src/http/action/metrics_action.h | 2 +- be/src/http/action/mini_load.cpp | 2 +- be/src/http/action/mini_load.h | 6 +- be/src/http/action/pprof_actions.cpp | 4 +- be/src/http/action/pprof_actions.h | 6 +- be/src/http/action/reload_tablet_action.cpp | 4 +- be/src/http/action/reload_tablet_action.h | 10 +- be/src/http/action/restore_tablet_action.cpp | 6 +- be/src/http/action/restore_tablet_action.h | 10 +- be/src/http/action/snapshot_action.cpp | 4 +- be/src/http/action/snapshot_action.h | 10 +- be/src/http/action/stream_load.cpp | 12 +- be/src/http/action/stream_load.h | 2 +- be/src/http/default_path_handlers.cpp | 2 +- be/src/http/default_path_handlers.h | 6 +- be/src/http/download_action.cpp | 4 +- be/src/http/download_action.h | 10 +- be/src/http/ev_http_server.cpp | 2 +- be/src/http/ev_http_server.h | 2 +- be/src/http/http_channel.cpp | 2 +- be/src/http/http_channel.h | 6 +- be/src/http/http_common.h | 2 +- be/src/http/http_handler.h | 6 +- be/src/http/http_headers.cpp | 2 +- be/src/http/http_headers.h | 6 +- be/src/http/http_method.cpp | 2 +- be/src/http/http_method.h | 6 +- be/src/http/http_parser.cpp | 2 +- be/src/http/http_parser.h | 6 +- be/src/http/http_request.cpp | 2 +- be/src/http/http_request.h | 6 +- be/src/http/http_response.cpp | 2 +- be/src/http/http_response.h | 6 +- be/src/http/http_status.cpp | 2 +- be/src/http/http_status.h | 6 +- be/src/http/message_body_sink.cpp | 2 +- be/src/http/message_body_sink.h | 2 +- be/src/http/monitor_action.cpp | 2 +- be/src/http/monitor_action.h | 6 +- be/src/http/rest_monitor_iface.h | 6 +- be/src/http/utils.cpp | 2 +- be/src/http/utils.h | 2 +- be/src/http/web_page_handler.cpp | 4 +- be/src/http/web_page_handler.h | 6 +- be/src/olap/aggregate_func.cpp | 4 +- be/src/olap/aggregate_func.h | 10 +- be/src/olap/atomic.h | 10 +- be/src/olap/base_compaction.cpp | 10 +- be/src/olap/base_compaction.h | 10 +- be/src/olap/bhp_lib.h | 10 +- be/src/olap/column_file/bit_field_reader.cpp | 4 +- be/src/olap/column_file/bit_field_reader.h | 10 +- be/src/olap/column_file/bit_field_writer.cpp | 4 +- be/src/olap/column_file/bit_field_writer.h | 10 +- be/src/olap/column_file/bloom_filter.hpp | 10 +- .../olap/column_file/bloom_filter_reader.cpp | 4 +- be/src/olap/column_file/bloom_filter_reader.h | 10 +- .../olap/column_file/bloom_filter_writer.cpp | 4 +- be/src/olap/column_file/bloom_filter_writer.h | 10 +- be/src/olap/column_file/byte_buffer.cpp | 4 +- be/src/olap/column_file/byte_buffer.h | 10 +- be/src/olap/column_file/column_data.cpp | 4 +- be/src/olap/column_file/column_data.h | 10 +- be/src/olap/column_file/column_reader.cpp | 4 +- be/src/olap/column_file/column_reader.h | 10 +- be/src/olap/column_file/column_writer.cpp | 4 +- be/src/olap/column_file/column_writer.h | 10 +- be/src/olap/column_file/compress.cpp | 4 +- be/src/olap/column_file/compress.h | 10 +- be/src/olap/column_file/data_writer.cpp | 4 +- be/src/olap/column_file/data_writer.h | 10 +- be/src/olap/column_file/file_stream.cpp | 4 +- be/src/olap/column_file/file_stream.h | 10 +- be/src/olap/column_file/in_stream.cpp | 4 +- be/src/olap/column_file/in_stream.h | 10 +- be/src/olap/column_file/out_stream.cpp | 4 +- be/src/olap/column_file/out_stream.h | 10 +- .../column_file/run_length_byte_reader.cpp | 4 +- .../olap/column_file/run_length_byte_reader.h | 10 +- .../column_file/run_length_byte_writer.cpp | 4 +- .../olap/column_file/run_length_byte_writer.h | 10 +- .../column_file/run_length_integer_reader.cpp | 4 +- .../column_file/run_length_integer_reader.h | 10 +- .../column_file/run_length_integer_writer.cpp | 4 +- .../column_file/run_length_integer_writer.h | 12 +- be/src/olap/column_file/segment_reader.cpp | 4 +- be/src/olap/column_file/segment_reader.h | 12 +- be/src/olap/column_file/segment_writer.cpp | 4 +- be/src/olap/column_file/segment_writer.h | 10 +- be/src/olap/column_file/serialize.cpp | 4 +- be/src/olap/column_file/serialize.h | 8 +- .../olap/column_file/stream_index_common.cpp | 4 +- be/src/olap/column_file/stream_index_common.h | 10 +- .../olap/column_file/stream_index_reader.cpp | 4 +- be/src/olap/column_file/stream_index_reader.h | 10 +- .../olap/column_file/stream_index_writer.cpp | 4 +- be/src/olap/column_file/stream_index_writer.h | 10 +- be/src/olap/column_file/stream_name.cpp | 4 +- be/src/olap/column_file/stream_name.h | 10 +- be/src/olap/column_predicate.h | 10 +- be/src/olap/comparison_predicate.cpp | 4 +- be/src/olap/comparison_predicate.h | 10 +- be/src/olap/cumulative_compaction.cpp | 10 +- be/src/olap/cumulative_compaction.h | 10 +- be/src/olap/delete_handler.cpp | 4 +- be/src/olap/delete_handler.h | 10 +- be/src/olap/delta_writer.cpp | 4 +- be/src/olap/delta_writer.h | 10 +- be/src/olap/field.cpp | 4 +- be/src/olap/field.h | 10 +- be/src/olap/field_info.cpp | 4 +- be/src/olap/field_info.h | 10 +- be/src/olap/file_helper.cpp | 4 +- be/src/olap/file_helper.h | 10 +- be/src/olap/hll.cpp | 4 +- be/src/olap/hll.h | 10 +- be/src/olap/i_data.cpp | 4 +- be/src/olap/i_data.h | 10 +- be/src/olap/in_list_predicate.cpp | 4 +- be/src/olap/in_list_predicate.h | 10 +- be/src/olap/lru_cache.cpp | 4 +- be/src/olap/lru_cache.h | 10 +- be/src/olap/memtable.cpp | 4 +- be/src/olap/memtable.h | 10 +- be/src/olap/merger.cpp | 4 +- be/src/olap/merger.h | 10 +- be/src/olap/new_status.cpp | 4 +- be/src/olap/new_status.h | 10 +- be/src/olap/null_predicate.cpp | 4 +- be/src/olap/null_predicate.h | 10 +- be/src/olap/olap_common.h | 10 +- be/src/olap/olap_cond.cpp | 6 +- be/src/olap/olap_cond.h | 10 +- be/src/olap/olap_data.cpp | 4 +- be/src/olap/olap_data.h | 10 +- be/src/olap/olap_define.h | 14 +- be/src/olap/olap_engine.cpp | 48 +-- be/src/olap/olap_engine.h | 10 +- be/src/olap/olap_header.cpp | 4 +- be/src/olap/olap_header.h | 10 +- be/src/olap/olap_header_manager.cpp | 2 +- be/src/olap/olap_header_manager.h | 8 +- be/src/olap/olap_index.cpp | 4 +- be/src/olap/olap_index.h | 10 +- be/src/olap/olap_meta.cpp | 2 +- be/src/olap/olap_meta.h | 8 +- be/src/olap/olap_server.cpp | 4 +- be/src/olap/olap_snapshot.cpp | 8 +- be/src/olap/olap_table.cpp | 4 +- be/src/olap/olap_table.h | 10 +- be/src/olap/options.cpp | 2 +- be/src/olap/options.h | 2 +- be/src/olap/push_handler.cpp | 4 +- be/src/olap/push_handler.h | 10 +- be/src/olap/reader.cpp | 8 +- be/src/olap/reader.h | 10 +- be/src/olap/row_block.cpp | 4 +- be/src/olap/row_block.h | 10 +- be/src/olap/row_cursor.cpp | 4 +- be/src/olap/row_cursor.h | 10 +- be/src/olap/rowset.cpp | 2 +- be/src/olap/rowset.h | 2 +- be/src/olap/rowset_builder.h | 2 +- be/src/olap/schema.h | 10 +- be/src/olap/schema_change.cpp | 4 +- be/src/olap/schema_change.h | 10 +- be/src/olap/skiplist.h | 10 +- be/src/olap/store.cpp | 2 +- be/src/olap/store.h | 2 +- be/src/olap/string_slice.h | 10 +- be/src/olap/tuple.h | 2 +- be/src/olap/types.cpp | 4 +- be/src/olap/types.h | 10 +- be/src/olap/utils.cpp | 4 +- be/src/olap/utils.h | 10 +- be/src/olap/wrapper_field.cpp | 2 +- be/src/olap/wrapper_field.h | 6 +- be/src/olap/writer.cpp | 4 +- be/src/olap/writer.h | 10 +- be/src/runtime/broker_mgr.cpp | 2 +- be/src/runtime/broker_mgr.h | 2 +- be/src/runtime/buffer_control_block.cpp | 2 +- be/src/runtime/buffer_control_block.h | 6 +- be/src/runtime/buffered_block_mgr.cpp | 4 +- be/src/runtime/buffered_block_mgr.h | 8 +- be/src/runtime/buffered_block_mgr2.cc | 10 +- be/src/runtime/buffered_block_mgr2.h | 10 +- be/src/runtime/buffered_tuple_stream.cpp | 2 +- be/src/runtime/buffered_tuple_stream.h | 6 +- be/src/runtime/buffered_tuple_stream2.cc | 4 +- be/src/runtime/buffered_tuple_stream2.h | 10 +- .../runtime/buffered_tuple_stream2.inline.h | 8 +- be/src/runtime/buffered_tuple_stream2_ir.cc | 4 +- be/src/runtime/buffered_tuple_stream3.cc | 2 +- be/src/runtime/buffered_tuple_stream3.h | 6 +- .../runtime/buffered_tuple_stream3.inline.h | 6 +- be/src/runtime/buffered_tuple_stream_ir.cpp | 2 +- be/src/runtime/bufferpool/buffer_allocator.cc | 2 +- be/src/runtime/bufferpool/buffer_allocator.h | 6 +- be/src/runtime/bufferpool/buffer_pool.cc | 2 +- be/src/runtime/bufferpool/buffer_pool.h | 6 +- .../runtime/bufferpool/buffer_pool_counters.h | 6 +- .../runtime/bufferpool/buffer_pool_internal.h | 6 +- be/src/runtime/bufferpool/free_list.h | 6 +- .../runtime/bufferpool/reservation_tracker.cc | 2 +- .../runtime/bufferpool/reservation_tracker.h | 6 +- .../bufferpool/reservation_tracker_counters.h | 6 +- be/src/runtime/bufferpool/reservation_util.cc | 2 +- be/src/runtime/bufferpool/reservation_util.h | 6 +- be/src/runtime/bufferpool/suballocator.cc | 2 +- be/src/runtime/bufferpool/suballocator.h | 2 +- be/src/runtime/bufferpool/system_allocator.cc | 2 +- be/src/runtime/bufferpool/system_allocator.h | 2 +- be/src/runtime/client_cache.cpp | 2 +- be/src/runtime/client_cache.h | 10 +- be/src/runtime/data_spliter.cpp | 2 +- be/src/runtime/data_spliter.h | 6 +- be/src/runtime/data_stream_mgr.cpp | 2 +- be/src/runtime/data_stream_mgr.h | 12 +- be/src/runtime/data_stream_recvr.cc | 2 +- be/src/runtime/data_stream_recvr.h | 10 +- be/src/runtime/data_stream_recvr.hpp | 6 +- be/src/runtime/data_stream_sender.cpp | 2 +- be/src/runtime/data_stream_sender.h | 6 +- be/src/runtime/datetime_value.cpp | 4 +- be/src/runtime/datetime_value.h | 16 +- be/src/runtime/decimal_value.cpp | 6 +- be/src/runtime/decimal_value.h | 20 +- be/src/runtime/descriptors.cpp | 2 +- be/src/runtime/descriptors.h | 6 +- be/src/runtime/disk_io_mgr.cc | 64 ++-- be/src/runtime/disk_io_mgr.h | 10 +- be/src/runtime/disk_io_mgr_internal.h | 10 +- be/src/runtime/disk_io_mgr_reader_context.cc | 4 +- be/src/runtime/disk_io_mgr_scan_range.cc | 12 +- be/src/runtime/dpp_sink.cpp | 2 +- be/src/runtime/dpp_sink.h | 6 +- be/src/runtime/dpp_sink_internal.cpp | 2 +- be/src/runtime/dpp_sink_internal.h | 14 +- be/src/runtime/dpp_writer.cpp | 2 +- be/src/runtime/dpp_writer.h | 6 +- be/src/runtime/etl_job_mgr.cpp | 2 +- be/src/runtime/etl_job_mgr.h | 6 +- be/src/runtime/exec_env.cpp | 22 +- be/src/runtime/exec_env.h | 6 +- be/src/runtime/export_sink.cpp | 2 +- be/src/runtime/export_sink.h | 10 +- be/src/runtime/export_task_mgr.cpp | 4 +- be/src/runtime/export_task_mgr.h | 10 +- be/src/runtime/fragment_mgr.cpp | 8 +- be/src/runtime/fragment_mgr.h | 6 +- be/src/runtime/free_list.hpp | 6 +- be/src/runtime/free_pool.hpp | 6 +- be/src/runtime/initial_reservations.cc | 2 +- be/src/runtime/initial_reservations.h | 6 +- be/src/runtime/kafka_consumer_pipe.cpp | 4 +- be/src/runtime/kafka_consumer_pipe.h | 10 +- be/src/runtime/large_int_value.cpp | 2 +- be/src/runtime/large_int_value.h | 6 +- be/src/runtime/lib_cache.cpp | 2 +- be/src/runtime/lib_cache.h | 6 +- be/src/runtime/load_path_mgr.cpp | 2 +- be/src/runtime/load_path_mgr.h | 6 +- be/src/runtime/load_stream_mgr.h | 2 +- be/src/runtime/mem_pool.cpp | 10 +- be/src/runtime/mem_pool.h | 6 +- be/src/runtime/mem_tracker.cpp | 6 +- be/src/runtime/mem_tracker.h | 6 +- be/src/runtime/merge_sorter.cpp | 4 +- be/src/runtime/merge_sorter.h | 8 +- be/src/runtime/multi_precision.h | 6 +- be/src/runtime/mysql_table_sink.cpp | 2 +- be/src/runtime/mysql_table_sink.h | 6 +- be/src/runtime/mysql_table_writer.cpp | 2 +- be/src/runtime/mysql_table_writer.h | 6 +- be/src/runtime/plan_fragment_executor.cpp | 2 +- be/src/runtime/plan_fragment_executor.h | 6 +- be/src/runtime/primitive_type.cpp | 2 +- be/src/runtime/primitive_type.h | 6 +- be/src/runtime/pull_load_task_mgr.cpp | 2 +- be/src/runtime/pull_load_task_mgr.h | 2 +- be/src/runtime/qsorter.cpp | 2 +- be/src/runtime/qsorter.h | 6 +- be/src/runtime/raw_value.cpp | 2 +- be/src/runtime/raw_value.h | 8 +- be/src/runtime/raw_value_ir.cpp | 2 +- be/src/runtime/result_buffer_mgr.cpp | 2 +- be/src/runtime/result_buffer_mgr.h | 6 +- be/src/runtime/result_sink.cpp | 2 +- be/src/runtime/result_sink.h | 6 +- be/src/runtime/result_writer.cpp | 2 +- be/src/runtime/result_writer.h | 6 +- be/src/runtime/row_batch.cpp | 4 +- be/src/runtime/row_batch.h | 8 +- be/src/runtime/row_batch_interface.hpp | 6 +- be/src/runtime/runtime_state.cpp | 6 +- be/src/runtime/runtime_state.h | 8 +- be/src/runtime/snapshot_loader.cpp | 6 +- be/src/runtime/snapshot_loader.h | 10 +- be/src/runtime/sorted_run_merger.cc | 4 +- be/src/runtime/sorted_run_merger.h | 10 +- be/src/runtime/sorter.h | 6 +- be/src/runtime/spill_sorter.cc | 2 +- be/src/runtime/spill_sorter.h | 10 +- be/src/runtime/stream_load_pipe.h | 2 +- be/src/runtime/string_buffer.hpp | 6 +- be/src/runtime/string_search.hpp | 6 +- be/src/runtime/string_value.cpp | 4 +- be/src/runtime/string_value.h | 12 +- be/src/runtime/string_value.hpp | 6 +- be/src/runtime/string_value_ir.cpp | 4 +- be/src/runtime/tablet_writer_mgr.cpp | 2 +- be/src/runtime/tablet_writer_mgr.h | 4 +- be/src/runtime/test_env.cc | 8 +- be/src/runtime/test_env.h | 10 +- be/src/runtime/thread_resource_mgr.cpp | 2 +- be/src/runtime/thread_resource_mgr.h | 6 +- be/src/runtime/tmp_file_mgr.cc | 6 +- be/src/runtime/tmp_file_mgr.h | 10 +- be/src/runtime/tuple.cpp | 4 +- be/src/runtime/tuple.h | 6 +- be/src/runtime/tuple_row.cpp | 4 +- be/src/runtime/tuple_row.h | 6 +- be/src/runtime/types.cpp | 8 +- be/src/runtime/types.h | 6 +- be/src/runtime/vectorized_row_batch.cpp | 4 +- be/src/runtime/vectorized_row_batch.h | 8 +- be/src/service/CMakeLists.txt | 10 +- be/src/service/backend_options.cpp | 2 +- be/src/service/backend_options.h | 8 +- be/src/service/backend_service.cpp | 8 +- be/src/service/backend_service.h | 12 +- be/src/service/brpc_service.cpp | 2 +- be/src/service/brpc_service.h | 2 +- .../service/{palo_main.cpp => doris_main.cpp} | 80 ++-- be/src/service/internal_service.cpp | 2 +- be/src/service/internal_service.h | 6 +- be/src/testutil/desc_tbl_builder.cc | 4 +- be/src/testutil/desc_tbl_builder.h | 10 +- be/src/tools/CMakeLists.txt | 2 +- be/src/tools/meta_tool.cpp | 16 +- be/src/udf/CMakeLists.txt | 12 +- be/src/udf/uda_test_harness.h | 6 +- be/src/udf/udf.cpp | 50 +-- be/src/udf/udf.h | 56 +-- be/src/udf/udf_debug.h | 6 +- be/src/udf/udf_internal.h | 44 +-- be/src/udf/udf_ir.cpp | 2 +- be/src/util/CMakeLists.txt | 2 +- be/src/util/aligned_new.h | 6 +- be/src/util/arena.cc | 4 +- be/src/util/arena.h | 10 +- be/src/util/bfd_parser.cpp | 2 +- be/src/util/bfd_parser.h | 6 +- be/src/util/bit_util.h | 6 +- be/src/util/bitmap.cpp | 2 +- be/src/util/bitmap.h | 6 +- be/src/util/blocking_priority_queue.hpp | 6 +- be/src/util/blocking_queue.hpp | 6 +- be/src/util/brpc_stub_cache.h | 2 +- be/src/util/buffer_builder.hpp | 6 +- be/src/util/byte_buffer.h | 2 +- be/src/util/cidr.cpp | 4 +- be/src/util/cidr.h | 10 +- be/src/util/codec.cpp | 2 +- be/src/util/codec.h | 6 +- be/src/util/compress.cpp | 2 +- be/src/util/compress.h | 6 +- be/src/util/condition_variable.h | 6 +- be/src/util/container_util.hpp | 6 +- be/src/util/core_local.cpp | 2 +- be/src/util/core_local.h | 2 +- be/src/util/count_down_latch.hpp | 6 +- be/src/util/cpu_info.cpp | 4 +- be/src/util/cpu_info.h | 6 +- be/src/util/date_func.h | 10 +- be/src/util/debug_counters.h | 8 +- be/src/util/debug_util.cpp | 2 +- be/src/util/debug_util.h | 6 +- be/src/util/decompress.cpp | 2 +- be/src/util/decompress.h | 6 +- be/src/util/defer_op.h | 6 +- be/src/util/disk_info.cpp | 2 +- be/src/util/disk_info.h | 6 +- .../{palo_metrics.cpp => doris_metrics.cpp} | 170 ++++----- .../util/{palo_metrics.h => doris_metrics.h} | 18 +- be/src/util/dummy_runtime_profile.h | 6 +- be/src/util/dynamic_util.cpp | 2 +- be/src/util/dynamic_util.h | 6 +- be/src/util/error_util.cc | 2 +- be/src/util/error_util.h | 10 +- be/src/util/fake_lock.h | 10 +- be/src/util/file_utils.cpp | 2 +- be/src/util/file_utils.h | 6 +- be/src/util/filesystem_util.cc | 4 +- be/src/util/filesystem_util.h | 6 +- be/src/util/hash_util.hpp | 34 +- be/src/util/hash_util_ir.cpp | 2 +- be/src/util/internal_queue.h | 6 +- be/src/util/json_util.cpp | 2 +- be/src/util/json_util.h | 6 +- be/src/util/load_error_hub.cpp | 4 +- be/src/util/load_error_hub.h | 10 +- be/src/util/logging.h | 8 +- be/src/util/lru_cache.hpp | 6 +- be/src/util/mem_info.cpp | 2 +- be/src/util/mem_info.h | 6 +- be/src/util/mem_range.h | 6 +- be/src/util/mem_util.hpp | 8 +- be/src/util/metrics.cpp | 2 +- be/src/util/metrics.h | 2 +- be/src/util/murmur_hash3.h | 6 +- be/src/util/mysql_global.h | 8 +- be/src/util/mysql_load_error_hub.cpp | 4 +- be/src/util/mysql_load_error_hub.h | 10 +- be/src/util/mysql_row_buffer.cpp | 2 +- be/src/util/mysql_row_buffer.h | 8 +- be/src/util/network_util.cpp | 2 +- be/src/util/network_util.h | 6 +- be/src/util/null_load_error_hub.cpp | 4 +- be/src/util/null_load_error_hub.h | 10 +- be/src/util/os_info.cpp | 2 +- be/src/util/os_info.h | 6 +- be/src/util/parse_util.cpp | 2 +- be/src/util/parse_util.h | 6 +- be/src/util/path_builder.cpp | 20 +- be/src/util/path_builder.h | 14 +- be/src/util/path_trie.hpp | 2 +- be/src/util/perf_counters.cpp | 2 +- be/src/util/perf_counters.h | 6 +- be/src/util/pretty_printer.h | 2 +- be/src/util/priority_thread_pool.hpp | 6 +- be/src/util/progress_updater.cpp | 2 +- be/src/util/progress_updater.h | 6 +- be/src/util/random.h | 10 +- be/src/util/ref_count_closure.h | 2 +- be/src/util/runtime_profile.cpp | 2 +- be/src/util/runtime_profile.h | 6 +- be/src/util/spinlock.cc | 4 +- be/src/util/spinlock.h | 10 +- be/src/util/sse_util.hpp | 6 +- be/src/util/stat_util.hpp | 6 +- be/src/util/static_asserts.cpp | 2 +- be/src/util/stopwatch.hpp | 6 +- be/src/util/streaming_sampler.h | 6 +- be/src/util/string_parser.cpp | 2 +- be/src/util/string_parser.hpp | 10 +- be/src/util/string_util.h | 2 +- be/src/util/symbols_util.cpp | 28 +- be/src/util/symbols_util.h | 12 +- be/src/util/system_metrics.cpp | 2 +- be/src/util/system_metrics.h | 2 +- be/src/util/thread_pool.hpp | 6 +- be/src/util/thrift_client.cpp | 2 +- be/src/util/thrift_client.h | 6 +- be/src/util/thrift_server.cpp | 2 +- be/src/util/thrift_server.h | 6 +- be/src/util/thrift_util.cpp | 2 +- be/src/util/thrift_util.h | 6 +- be/src/util/time.cpp | 16 +- be/src/util/time.h | 6 +- be/src/util/tuple_row_compare.cpp | 54 +-- be/src/util/tuple_row_compare.h | 6 +- be/src/util/types.h | 2 +- be/src/util/uid_util.cpp | 2 +- be/src/util/uid_util.h | 18 +- be/src/util/url_coding.cpp | 2 +- be/src/util/url_coding.h | 6 +- be/src/util/url_parser.cpp | 2 +- be/src/util/url_parser.h | 6 +- be/test/agent/agent_server_test.cpp | 8 +- be/test/agent/cgroups_mgr_test.cpp | 24 +- be/test/agent/file_downloader_test.cpp | 16 +- be/test/agent/heartbeat_server_test.cpp | 8 +- be/test/agent/mock_file_downloader.h | 10 +- be/test/agent/mock_pusher.h | 10 +- be/test/agent/mock_task_worker_pool.h | 10 +- be/test/agent/mock_utils.h | 10 +- be/test/agent/pusher_test.cpp | 54 +-- be/test/agent/task_worker_pool_test.cpp | 230 +++++------ be/test/agent/utils_test.cpp | 10 +- be/test/common/resource_tls_test.cpp | 6 +- be/test/exec/broker_reader_test.cpp | 10 +- be/test/exec/broker_scan_node_test.cpp | 6 +- be/test/exec/broker_scanner_test.cpp | 10 +- be/test/exec/csv_scan_bench_test.cpp | 8 +- be/test/exec/csv_scan_node_test.cpp | 16 +- be/test/exec/csv_scanner_test.cpp | 8 +- be/test/exec/hash_table_test.cpp | 6 +- be/test/exec/mysql_scan_node_test.cpp | 4 +- be/test/exec/mysql_scanner_test.cpp | 4 +- be/test/exec/new_olap_scan_node_test.cpp | 32 +- be/test/exec/olap_common_test.cpp | 46 +-- be/test/exec/olap_scan_node_test.cpp | 24 +- be/test/exec/olap_scanner_test.cpp | 28 +- be/test/exec/olap_table_info_test.cpp | 4 +- be/test/exec/olap_table_sink_test.cpp | 8 +- be/test/exec/partitioned_hash_table_test.cpp | 22 +- .../exec/plain_text_line_reader_bzip_test.cpp | 8 +- .../exec/plain_text_line_reader_gzip_test.cpp | 8 +- .../plain_text_line_reader_lz4frame_test.cpp | 8 +- .../exec/plain_text_line_reader_lzop_test.cpp | 8 +- ...ain_text_line_reader_uncompressed_test.cpp | 8 +- be/test/exec/schema_scan_node_test.cpp | 4 +- .../schema_authors_scanner_test.cpp | 4 +- .../schema_charsets_scanner_test.cpp | 4 +- .../schema_collations_scanner_test.cpp | 4 +- .../schema_columns_scanner_test.cpp | 4 +- .../schema_create_table_scanner_test.cpp | 4 +- .../schema_engines_scanner_test.cpp | 4 +- .../schema_open_tables_scanner_test.cpp | 4 +- .../schema_schemata_scanner_test.cpp | 4 +- .../schema_table_names_scanner_test.cpp | 4 +- .../schema_tables_scanner_test.cpp | 4 +- .../schema_variables_scanner_test.cpp | 6 +- be/test/exec/schema_scanner_test.cpp | 4 +- be/test/exec/set_executor_test.cpp | 16 +- be/test/exprs/binary_predicate_test.cpp | 2 +- be/test/exprs/hybird_set_test.cpp | 6 +- be/test/exprs/in_op_test.cpp | 2 +- be/test/exprs/in_predicate_test.cpp | 6 +- be/test/exprs/json_function_test.cpp | 6 +- be/test/http/http_utils_test.cpp | 12 +- be/test/http/message_body_sink_test.cpp | 2 +- be/test/http/metrics_action_test.cpp | 2 +- be/test/http/stream_load_test.cpp | 24 +- be/test/olap/bit_field_test.cpp | 8 +- be/test/olap/bloom_filter_index_test.cpp | 12 +- be/test/olap/bloom_filter_test.cpp | 12 +- be/test/olap/byte_buffer_test.cpp | 6 +- be/test/olap/column_reader_test.cpp | 8 +- be/test/olap/comparison_predicate_test.cpp | 12 +- be/test/olap/delete_handler_test.cpp | 20 +- be/test/olap/delta_writer_test.cpp | 20 +- be/test/olap/file_helper_test.cpp | 8 +- be/test/olap/file_utils_test.cpp | 8 +- be/test/olap/in_list_predicate_test.cpp | 12 +- be/test/olap/lru_cache_test.cpp | 10 +- be/test/olap/mock_command_executor.h | 10 +- be/test/olap/mock_olap_rootpath.h | 10 +- be/test/olap/null_predicate_test.cpp | 12 +- be/test/olap/olap_header_manager_test.cpp | 4 +- be/test/olap/olap_meta_test.cpp | 4 +- be/test/olap/olap_reader_test.cpp | 16 +- be/test/olap/row_block_test.cpp | 8 +- be/test/olap/row_cursor_test.cpp | 10 +- be/test/olap/run_length_byte_test.cpp | 8 +- be/test/olap/run_length_integer_test.cpp | 4 +- be/test/olap/serialize_test.cpp | 2 +- be/test/olap/skiplist_test.cpp | 6 +- be/test/olap/stream_index_test.cpp | 8 +- be/test/olap/vectorized_olap_reader_test.cpp | 16 +- be/test/runtime/buffer_control_block_test.cpp | 4 +- be/test/runtime/buffered_block_mgr2_test.cpp | 28 +- .../runtime/buffered_tuple_stream2_test.cpp | 20 +- .../runtime/buffered_tuple_stream_test.cpp | 2 +- be/test/runtime/data_spliter_test.cpp | 12 +- be/test/runtime/data_stream_test.cpp | 38 +- be/test/runtime/datetime_value_test.cpp | 10 +- be/test/runtime/decimal_value_test.cpp | 8 +- be/test/runtime/disk_io_mgr_test.cpp | 18 +- be/test/runtime/dpp_sink_internal_test.cpp | 2 +- be/test/runtime/dpp_sink_test.cpp | 6 +- be/test/runtime/dpp_writer_test.cpp | 4 +- be/test/runtime/etl_job_mgr_test.cpp | 6 +- be/test/runtime/export_task_mgr_test.cpp | 14 +- be/test/runtime/fragment_mgr_test.cpp | 4 +- be/test/runtime/free_list_test.cpp | 4 +- be/test/runtime/large_int_value_test.cpp | 6 +- be/test/runtime/mem_limit_test.cpp | 8 +- be/test/runtime/mem_pool_test.cpp | 6 +- be/test/runtime/mysql_table_writer_test.cpp | 6 +- be/test/runtime/pull_load_task_mgr_test.cpp | 4 +- be/test/runtime/qsorter_test.cpp | 4 +- be/test/runtime/raw_value_test.cpp | 4 +- be/test/runtime/result_buffer_mgr_test.cpp | 8 +- be/test/runtime/result_sink_test.cpp | 8 +- be/test/runtime/result_writer_test.cpp | 6 +- be/test/runtime/snapshot_loader_test.cpp | 6 +- be/test/runtime/sorter_test.cpp | 2 +- be/test/runtime/stream_load_pipe_test.cpp | 2 +- be/test/runtime/string_buffer_test.cpp | 4 +- be/test/runtime/string_value_test.cpp | 8 +- be/test/runtime/tablet_writer_mgr_test.cpp | 4 +- be/test/runtime/thread_resource_mgr_test.cpp | 6 +- be/test/runtime/tmp_file_mgr_test.cpp | 14 +- be/test/udf/uda_test.cpp | 4 +- be/test/udf/udf_test.cpp | 4 +- be/test/util/CMakeLists.txt | 2 +- be/test/util/arena_test.cpp | 4 +- be/test/util/bit_util_test.cpp | 8 +- be/test/util/blocking_queue_test.cpp | 2 +- be/test/util/brpc_stub_cache_test.cpp | 2 +- be/test/util/byte_buffer_test2.cpp | 2 +- be/test/util/cidr_test.cpp | 10 +- be/test/util/core_local_test.cpp | 2 +- be/test/util/count_down_latch_test.cpp | 6 +- be/test/util/decompress_test.cpp | 4 +- be/test/util/descriptor_helper.h | 2 +- ...etrics_test.cpp => doris_metrics_test.cpp} | 74 ++-- be/test/util/filesystem_util_test.cpp | 8 +- be/test/util/internal_queue_test.cpp | 8 +- be/test/util/json_util_test.cpp | 2 +- be/test/util/lru_cache_util_test.cpp | 6 +- be/test/util/new_metrics_test.cpp | 2 +- be/test/util/path_trie_test.cpp | 6 +- be/test/util/perf_counters_test.cpp | 2 +- be/test/util/runtime_profile_test.cpp | 2 +- be/test/util/string_parser_test.cpp | 8 +- be/test/util/string_util_test.cpp | 4 +- be/test/util/system_metrics_test.cpp | 6 +- be/test/util/thread_pool_test.cpp | 4 +- be/test/util/types_test.cpp | 2 +- be/test/util/uid_util_test.cpp | 4 +- be/test/util/url_coding_test.cpp | 8 +- gensrc/proto/column_data_file.proto | 2 +- gensrc/proto/data.proto | 2 +- gensrc/proto/descriptors.proto | 2 +- gensrc/proto/internal_service.proto | 2 +- gensrc/proto/olap_common.proto | 2 +- gensrc/proto/olap_file.proto | 2 +- gensrc/proto/status.proto | 2 +- gensrc/proto/types.proto | 2 +- gensrc/thrift/AgentService.thrift | 2 +- gensrc/thrift/BackendService.thrift | 2 +- gensrc/thrift/Data.thrift | 2 +- gensrc/thrift/DataSinks.thrift | 2 +- gensrc/thrift/Ddl.thrift | 2 +- gensrc/thrift/Descriptors.thrift | 2 +- gensrc/thrift/Exprs.thrift | 2 +- gensrc/thrift/FrontendService.thrift | 2 +- gensrc/thrift/HeartbeatService.thrift | 2 +- gensrc/thrift/MasterService.thrift | 2 +- gensrc/thrift/MetricDefs.thrift | 2 +- gensrc/thrift/Metrics.thrift | 2 +- gensrc/thrift/NetworkTest.thrift | 2 +- gensrc/thrift/PaloBrokerService.thrift | 2 +- .../PaloExternalDataSourceService.thrift | 2 +- gensrc/thrift/PaloInternalService.thrift | 2 +- gensrc/thrift/PaloService.thrift | 2 +- gensrc/thrift/Partitions.thrift | 2 +- gensrc/thrift/PlanNodes.thrift | 2 +- gensrc/thrift/Planner.thrift | 2 +- gensrc/thrift/RuntimeProfile.thrift | 2 +- gensrc/thrift/Status.thrift | 2 +- gensrc/thrift/Types.thrift | 2 +- run-ut.sh | 2 +- 923 files changed, 4662 insertions(+), 4662 deletions(-) rename be/src/codegen/{palo_ir.cpp => doris_ir.cpp} (100%) rename be/src/codegen/{palo_ir.h => doris_ir.h} (94%) rename be/src/codegen/{palo_ir_data.h => doris_ir_data.h} (75%) rename be/src/service/{palo_main.cpp => doris_main.cpp} (72%) rename be/src/util/{palo_metrics.cpp => doris_metrics.cpp} (62%) rename be/src/util/{palo_metrics.h => doris_metrics.h} (91%) rename be/test/util/{palo_metrics_test.cpp => doris_metrics_test.cpp} (82%) diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt index 9e8318ddcedded..fd025790c6ed81 100644 --- a/be/CMakeLists.txt +++ b/be/CMakeLists.txt @@ -455,7 +455,7 @@ set(DORIS_LINK_LIBS Service Udf Util - PaloGen + DorisGen Webserver TestUtil AES diff --git a/be/src/aes/my_aes.cpp b/be/src/aes/my_aes.cpp index a042eebad83ea8..186bd6ab039beb 100644 --- a/be/src/aes/my_aes.cpp +++ b/be/src/aes/my_aes.cpp @@ -33,7 +33,7 @@ @param rkey [out] Real key (used by OpenSSL/YaSSL) @param opmode [out] encryption mode */ -namespace palo { +namespace doris { void my_aes_create_key(const unsigned char *key, uint key_length, uint8 *rkey, enum my_aes_opmode opmode) { diff --git a/be/src/aes/my_aes.h b/be/src/aes/my_aes.h index a6784fc6d070a4..e3661052beefa0 100644 --- a/be/src/aes/my_aes.h +++ b/be/src/aes/my_aes.h @@ -69,7 +69,7 @@ enum my_aes_opmode /** String representations of the supported AES modes. Keep in sync with my_aes_opmode */ extern const char *my_aes_opmode_names[]; -namespace palo { +namespace doris { /** Encrypt a buffer using AES diff --git a/be/src/aes/my_aes_impl.h b/be/src/aes/my_aes_impl.h index ef8724e3b50775..1b63674d6ebf47 100644 --- a/be/src/aes/my_aes_impl.h +++ b/be/src/aes/my_aes_impl.h @@ -13,8 +13,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef BDG_PALO_BE_EXPRS_MY_AES_IMPL_H -#define BDG_PALO_BE_EXPRS_MY_AES_IMPL_H +#ifndef DORIS_BE_EXPRS_MY_AES_IMPL_H +#define DORIS_BE_EXPRS_MY_AES_IMPL_H /** Maximum supported key kength */ const int MAX_AES_KEY_LENGTH = 256; @@ -27,7 +27,7 @@ const int MAX_AES_KEY_LENGTH = 256; typedef uint32_t uint; typedef uint8_t uint8; -namespace palo { +namespace doris { extern uint *my_aes_opmode_key_sizes; void my_aes_create_key(const unsigned char *key, uint key_length, diff --git a/be/src/aes/my_aes_openssl.cpp b/be/src/aes/my_aes_openssl.cpp index 1a6443fb041e8f..a0f1fde9c5dd91 100644 --- a/be/src/aes/my_aes_openssl.cpp +++ b/be/src/aes/my_aes_openssl.cpp @@ -25,7 +25,7 @@ #define DBUG_ASSERT(A) assert(A) #define TRUE true #define FALSE false -namespace palo { +namespace doris { /* keep in sync with enum my_aes_opmode in my_aes.h */ const char *my_aes_opmode_names[]= { diff --git a/be/src/agent/agent_server.cpp b/be/src/agent/agent_server.cpp index c5e330705debfe..72aeeb080e5db0 100644 --- a/be/src/agent/agent_server.cpp +++ b/be/src/agent/agent_server.cpp @@ -49,7 +49,7 @@ using std::string; using std::to_string; using std::vector; -namespace palo { +namespace doris { AgentServer::AgentServer(ExecEnv* exec_env, const TMasterInfo& master_info) : @@ -187,7 +187,7 @@ AgentServer::AgentServer(ExecEnv* exec_env, // Add subscriber here and register listeners TopicListener* user_resource_listener = new UserResourceListener(exec_env, master_info); LOG(INFO) << "Register user resource listener"; - _topic_subscriber->register_listener(palo::TTopicType::type::RESOURCE, user_resource_listener); + _topic_subscriber->register_listener(doris::TTopicType::type::RESOURCE, user_resource_listener); #endif } @@ -522,4 +522,4 @@ void AgentServer::delete_etl_files(TAgentResult& result, status.to_thrift(&result.status); } -} // namesapce palo +} // namesapce doris diff --git a/be/src/agent/agent_server.h b/be/src/agent/agent_server.h index 30f94c9eda7d73..f1e584d88d952d 100644 --- a/be/src/agent/agent_server.h +++ b/be/src/agent/agent_server.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_AGENT_SERVER_H -#define BDG_PALO_BE_SRC_AGENT_AGENT_SERVER_H +#ifndef DORIS_BE_SRC_AGENT_AGENT_SERVER_H +#define DORIS_BE_SRC_AGENT_AGENT_SERVER_H #include "thrift/transport/TTransportUtils.h" #include "agent/status.h" @@ -29,7 +29,7 @@ #include "olap/utils.h" #include "runtime/exec_env.h" -namespace palo { +namespace doris { class AgentServer { public: @@ -119,5 +119,5 @@ class AgentServer { TopicSubscriber* _topic_subscriber; }; // class AgentServer -} // namespace palo -#endif // BDG_PALO_BE_SRC_AGENT_AGENT_SERVER_H +} // namespace doris +#endif // DORIS_BE_SRC_AGENT_AGENT_SERVER_H diff --git a/be/src/agent/cgroups_mgr.cpp b/be/src/agent/cgroups_mgr.cpp index f48d97fa2aa600..66d763472f9c8d 100644 --- a/be/src/agent/cgroups_mgr.cpp +++ b/be/src/agent/cgroups_mgr.cpp @@ -39,7 +39,7 @@ using std::stringstream; using apache::thrift::TException; using apache::thrift::transport::TTransportException; -namespace palo { +namespace doris { static CgroupsMgr *s_global_cg_mgr; @@ -67,12 +67,12 @@ AgentStatus CgroupsMgr::update_local_cgroups(const TFetchResourceResult& new_fe std::lock_guard lck(_update_cgroups_mtx); if (!_is_cgroups_init_success) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } if (_cur_version >= new_fetched_resource.resourceVersion) { - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } const std::map& new_user_resource @@ -114,7 +114,7 @@ AgentStatus CgroupsMgr::update_local_cgroups(const TFetchResourceResult& new_fe // Using resource version, not subscribe version _cur_version = new_fetched_resource.resourceVersion; - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } void CgroupsMgr::_config_user_disk_throttle(std::string user_name, @@ -183,7 +183,7 @@ AgentStatus CgroupsMgr::_config_disk_throttle(std::string user_name, if (!is_file_exist(cgroups_path.c_str())) { if (!boost::filesystem::create_directory(cgroups_path)) { LOG(ERROR) << "Create cgroups: " << cgroups_path << " failed"; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } @@ -246,7 +246,7 @@ AgentStatus CgroupsMgr::_config_disk_throttle(std::string user_name, ctrl_cmd.str(std::string()); } } - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } AgentStatus CgroupsMgr::modify_user_cgroups(const string& user_name, @@ -257,7 +257,7 @@ AgentStatus CgroupsMgr::modify_user_cgroups(const string& user_name, if (!is_file_exist(user_cgroups_path.c_str())) { if (!boost::filesystem::create_directory(user_cgroups_path)) { LOG(ERROR) << "Create cgroups for user " << user_name << " failed"; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } @@ -270,7 +270,7 @@ AgentStatus CgroupsMgr::modify_user_cgroups(const string& user_name, string user_resource_path = user_cgroups_path + "/" + resource_file_name; std::ofstream user_cgroups(user_resource_path.c_str(), std::ios::out | std::ios::app); if (!user_cgroups.is_open()) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } user_cgroups << user_share_weight << std::endl; user_cgroups.close(); @@ -284,7 +284,7 @@ AgentStatus CgroupsMgr::modify_user_cgroups(const string& user_name, string level_cgroups_path = user_cgroups_path + "/" + level_name; if (!is_file_exist(level_cgroups_path.c_str())) { if (!boost::filesystem::create_directory(level_cgroups_path)) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } @@ -293,7 +293,7 @@ AgentStatus CgroupsMgr::modify_user_cgroups(const string& user_name, std::ofstream level_cgroups(level_resource_path.c_str(), std::ios::out | std::ios::app); if (!level_cgroups.is_open()) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } level_cgroups << level_share_weight << std::endl; level_cgroups.close(); @@ -301,7 +301,7 @@ AgentStatus CgroupsMgr::modify_user_cgroups(const string& user_name, LOG(INFO) << "Append " << level_share_weight << " to " << level_resource_path; } } - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } AgentStatus CgroupsMgr::init_cgroups() { @@ -316,15 +316,15 @@ AgentStatus CgroupsMgr::init_cgroups() { if (fs_type.f_type != CGROUP_SUPER_MAGIC) { LOG(ERROR) << _root_cgroups_path << " is not a cgroups file system."; _is_cgroups_init_success = false; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } #endif // Check if current user have write permission to cgroup folder if (access(_root_cgroups_path.c_str(), W_OK) != 0) { - LOG(ERROR) << "Palo does not have write permission to " + LOG(ERROR) << "Doris does not have write permission to " << _root_cgroups_path; _is_cgroups_init_success = false; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } // If root folder exists, then delete all subfolders under it boost::filesystem::directory_iterator item_begin(this->_root_cgroups_path); @@ -333,23 +333,23 @@ AgentStatus CgroupsMgr::init_cgroups() { if (is_directory(item_begin->path().string().c_str())) { // Delete the sub folder if (delete_user_cgroups(item_begin->path().filename().string()) - != AgentStatus::PALO_SUCCESS) { + != AgentStatus::DORIS_SUCCESS) { LOG(ERROR) << "Could not clean subfolder " << item_begin->path().string(); _is_cgroups_init_success = false; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } } - LOG(INFO) << "Initialize palo cgroups successfully under folder " + LOG(INFO) << "Initialize doris cgroups successfully under folder " << _root_cgroups_path; _is_cgroups_init_success = true; - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } else { LOG(ERROR) << "Could not find a valid cgroups path for resource isolation," << "current value is " << _root_cgroups_path; _is_cgroups_init_success = false; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } @@ -364,7 +364,7 @@ void CgroupsMgr::apply_cgroup(const string& user_name, const string& level) { AgentStatus CgroupsMgr::assign_to_cgroups(const string& user_name, const string& level) { if (!_is_cgroups_init_success) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } int64_t tid = gettid(); return assign_thread_to_cgroups(tid, user_name, level); @@ -374,7 +374,7 @@ AgentStatus CgroupsMgr::assign_thread_to_cgroups(int64_t thread_id, const string& user_name, const string& level) { if (!_is_cgroups_init_success) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } string tasks_path = _root_cgroups_path + "/" + user_name + "/" + level + "/tasks"; if (!is_file_exist(_root_cgroups_path + "/" + user_name)) { @@ -386,19 +386,19 @@ AgentStatus CgroupsMgr::assign_thread_to_cgroups(int64_t thread_id, } if (!is_file_exist(tasks_path.c_str())) { LOG(ERROR) << "Cgroups path " << tasks_path << " not exist!"; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } std::ofstream tasks(tasks_path.c_str(), std::ios::out | std::ios::app); if (!tasks.is_open()) { - // This means palo could not open this file. May be it does not have access to it + // This means doris could not open this file. May be it does not have access to it LOG(ERROR) << "Echo thread: " << thread_id << " to " << tasks_path << " failed!"; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } // Append thread id to the tasks file directly tasks << thread_id << std::endl; tasks.close(); - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } AgentStatus CgroupsMgr::delete_user_cgroups(const string& user_name) { @@ -411,16 +411,16 @@ AgentStatus CgroupsMgr::delete_user_cgroups(const string& user_name) { if (is_directory(item_begin->path().string().c_str())) { string cur_cgroups_path = item_begin->path().string(); if (this->drop_cgroups(cur_cgroups_path) < 0) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } } // Delete user cgroups if (this->drop_cgroups(user_cgroups_path) < 0) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } AgentStatus CgroupsMgr::drop_cgroups(const string& deleted_cgroups_path) { @@ -439,10 +439,10 @@ AgentStatus CgroupsMgr::drop_cgroups(const string& deleted_cgroups_path) { if (i == this->_drop_retry_times){ LOG(ERROR) << "drop cgroups under path: " << deleted_cgroups_path << " failed."; - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } } - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } AgentStatus CgroupsMgr::relocate_tasks(const string& src_cgroups, const string& dest_cgroups) { @@ -450,11 +450,11 @@ AgentStatus CgroupsMgr::relocate_tasks(const string& src_cgroups, const string& string dest_tasks_path = dest_cgroups + "/tasks"; std::ifstream src_tasks(src_tasks_path.c_str()); if (!src_tasks) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } std::ofstream dest_tasks(dest_tasks_path.c_str(), std::ios::out | std::ios::app); if (!dest_tasks) { - return AgentStatus::PALO_ERROR; + return AgentStatus::DORIS_ERROR; } int64_t taskid; while (src_tasks >> taskid) { @@ -465,7 +465,7 @@ AgentStatus CgroupsMgr::relocate_tasks(const string& src_cgroups, const string& } src_tasks.close(); dest_tasks.close(); - return AgentStatus::PALO_SUCCESS; + return AgentStatus::DORIS_SUCCESS; } void CgroupsMgr::_echo_cmd_to_cgroup(stringstream& ctrl_cmd, string& cgroups_path) { @@ -501,4 +501,4 @@ bool CgroupsMgr::is_file_exist(const std::string& file_path) { return is_file_exist(file_path.c_str()); } -} // namespace palo +} // namespace doris diff --git a/be/src/agent/cgroups_mgr.h b/be/src/agent/cgroups_mgr.h index ae389498f58cd7..1f2afcc2dac799 100644 --- a/be/src/agent/cgroups_mgr.h +++ b/be/src/agent/cgroups_mgr.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_CGROUPS_MGR_H -#define BDG_PALO_BE_SRC_AGENT_CGROUPS_MGR_H +#ifndef DORIS_BE_SRC_AGENT_CGROUPS_MGR_H +#define DORIS_BE_SRC_AGENT_CGROUPS_MGR_H #include #include @@ -26,7 +26,7 @@ #include "agent/status.h" #include "gen_cpp/MasterService_types.h" -namespace palo { +namespace doris { class ExecEnv; @@ -34,7 +34,7 @@ class CgroupsMgr { public: // Input parameters: // exec_env: global variable to get global objects - // cgroups_root_path: root cgroup allocated to palo by admin + // cgroups_root_path: root cgroup allocated to doris by admin explicit CgroupsMgr(ExecEnv* exec_env, const std::string& root_cgroups_path); ~CgroupsMgr(); diff --git a/be/src/agent/file_downloader.cpp b/be/src/agent/file_downloader.cpp index 22c7c5166ea8bd..0d2f5353561c8c 100644 --- a/be/src/agent/file_downloader.cpp +++ b/be/src/agent/file_downloader.cpp @@ -30,7 +30,7 @@ using std::ostream; using std::string; using std::stringstream; -namespace palo { +namespace doris { FileDownloader::FileDownloader(const FileDownloaderParam& param) : _downloader_param(param) { @@ -59,16 +59,16 @@ size_t FileDownloader::_write_file_callback( size_t FileDownloader::_write_stream_callback( void* buffer, size_t size, size_t nmemb, void* param) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; size_t len = size * nmemb; if (param == NULL) { - status = PALO_FILE_DOWNLOAD_INVALID_PARAM; + status = DORIS_FILE_DOWNLOAD_INVALID_PARAM; OLAP_LOG_WARNING("File downloader output stream is NULL pointer."); return -1; } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { static_cast(param)->write(static_cast(buffer), len); } @@ -78,69 +78,69 @@ size_t FileDownloader::_write_stream_callback( AgentStatus FileDownloader::_install_opt( OutputType output_type, CURL* curl, char* errbuf, stringstream* output_stream, FileHandler* file_handler) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; CURLcode curl_ret = CURLE_OK; // Set request URL curl_ret = curl_easy_setopt(curl, CURLOPT_URL, _downloader_param.remote_file_path.c_str()); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt URL failed.[error=%s]", curl_easy_strerror(curl_ret)); } // Set username - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_USERNAME, _downloader_param.username.c_str()); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt USERNAME failed.[error=%s]", curl_easy_strerror(curl_ret)); } } // Set password - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_PASSWORD, _downloader_param.password.c_str()); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt USERNAME failed.[error=%s]", curl_easy_strerror(curl_ret)); } } // Set process timeout - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_TIMEOUT, _downloader_param.curl_opt_timeout); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt TIMEOUT failed.[error=%s]", curl_easy_strerror(curl_ret)); } } // Set low speed limit and low speed time - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt( curl, CURLOPT_LOW_SPEED_LIMIT, config::download_low_speed_limit_kbps * 1024); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING( "curl setopt CURLOPT_LOW_SPEED_LIMIT failed.[error=%s]", curl_easy_strerror(curl_ret)); } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt( curl, CURLOPT_LOW_SPEED_TIME, config::download_low_speed_time); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING( "curl setopt CURLOPT_LOW_SPEED_TIME failed.[error=%s]", curl_easy_strerror(curl_ret)); @@ -148,30 +148,30 @@ AgentStatus FileDownloader::_install_opt( } // Set max recv speed(bytes/s) - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt( curl, CURLOPT_MAX_RECV_SPEED_LARGE, config::max_download_speed_kbps * 1024); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING( "curl setopt MAX_RECV_SPEED failed.[error=%s]", curl_easy_strerror(curl_ret)); } } // Forbid signals - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt nosignal failed.[error=%s]", curl_easy_strerror(curl_ret)); } } if (strncmp(_downloader_param.remote_file_path.c_str(), "http", 4) == 0) { - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); if (curl_ret != CURLE_OK) { @@ -181,7 +181,7 @@ AgentStatus FileDownloader::_install_opt( } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 20); if (curl_ret != CURLE_OK) { @@ -193,7 +193,7 @@ AgentStatus FileDownloader::_install_opt( } // Set nobody - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { if (output_type == OutputType::NONE) { curl_ret = curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); if (curl_ret != CURLE_OK) { @@ -208,18 +208,18 @@ AgentStatus FileDownloader::_install_opt( &FileDownloader::_write_stream_callback); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt WRITEDATA failed.[error=%s]", curl_easy_strerror(curl_ret)); } // Set callback function args - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_WRITEDATA, static_cast(output_stream)); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt WRITEDATA failed.[error=%s]", curl_easy_strerror(curl_ret)); } @@ -232,18 +232,18 @@ AgentStatus FileDownloader::_install_opt( &FileDownloader::_write_file_callback); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt WRITEDATA failed.[error=%s]", curl_easy_strerror(curl_ret)); } // Set callback function args - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_setopt(curl, CURLOPT_WRITEDATA, static_cast(file_handler)); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt WRITEDATA failed.[error=%s]", curl_easy_strerror(curl_ret)); } @@ -253,10 +253,10 @@ AgentStatus FileDownloader::_install_opt( // set verbose mode /* - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_easy_setopt(curl, CURLOPT_VERBOSE, config::curl_verbose_mode); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt VERBOSE MODE failed.[error=%s]", curl_easy_strerror(curl_ret)); } @@ -264,10 +264,10 @@ AgentStatus FileDownloader::_install_opt( */ // set err buf - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errbuf); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED; + status = DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED; OLAP_LOG_WARNING("curl setopt ERR BUF failed.[error=%s]", curl_easy_strerror(curl_ret)); } @@ -289,33 +289,33 @@ void FileDownloader::_get_err_info(char * errbuf, CURLcode res) { } AgentStatus FileDownloader::get_length(uint64_t* length) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; CURL* curl = NULL; CURLcode curl_ret = CURLE_OK; curl = curl_easy_init(); // Init curl if (curl == NULL) { - status = PALO_FILE_DOWNLOAD_CURL_INIT_FAILED; + status = DORIS_FILE_DOWNLOAD_CURL_INIT_FAILED; OLAP_LOG_WARNING("internal error to get NULL curl"); } // Set curl opt char errbuf[CURL_ERROR_SIZE]; - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { status = _install_opt(OutputType::NONE, curl, errbuf, NULL, NULL); - if (PALO_SUCCESS != status) { + if (DORIS_SUCCESS != status) { OLAP_LOG_WARNING("install curl opt failed."); } } // Get result - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_perform(curl); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_GET_LENGTH_FAILED; + status = DORIS_FILE_DOWNLOAD_GET_LENGTH_FAILED; OLAP_LOG_WARNING("curl get length failed.[path=%s]", _downloader_param.remote_file_path.c_str()); _get_err_info(errbuf, curl_ret); @@ -334,45 +334,45 @@ AgentStatus FileDownloader::get_length(uint64_t* length) { } AgentStatus FileDownloader::download_file() { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; CURL* curl = NULL; CURLcode curl_ret = CURLE_OK; curl = curl_easy_init(); if (curl == NULL) { - status = PALO_FILE_DOWNLOAD_CURL_INIT_FAILED; + status = DORIS_FILE_DOWNLOAD_CURL_INIT_FAILED; OLAP_LOG_WARNING("internal error to get NULL curl"); } FileHandler* file_handler = new FileHandler(); OLAPStatus olap_status = OLAP_SUCCESS; // Prepare some infomation - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { olap_status = file_handler->open_with_mode( _downloader_param.local_file_path, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR); if (olap_status != OLAP_SUCCESS) { - status = PALO_FILE_DOWNLOAD_INVALID_PARAM; + status = DORIS_FILE_DOWNLOAD_INVALID_PARAM; OLAP_LOG_WARNING("open loacal file failed.[file_path=%s]", _downloader_param.local_file_path.c_str()); } } char errbuf[CURL_ERROR_SIZE]; - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { status = _install_opt(OutputType::FILE, curl, errbuf, NULL, file_handler); - if (PALO_SUCCESS != status) { + if (DORIS_SUCCESS != status) { OLAP_LOG_WARNING("install curl opt failed."); } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_perform(curl); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_FAILED; + status = DORIS_FILE_DOWNLOAD_FAILED; OLAP_LOG_WARNING( "curl easy perform failed.[path=%s]", _downloader_param.remote_file_path.c_str()); @@ -394,34 +394,34 @@ AgentStatus FileDownloader::download_file() { } AgentStatus FileDownloader::list_file_dir(string* file_list_string) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; CURL* curl = NULL; CURLcode curl_ret = CURLE_OK; curl = curl_easy_init(); // Init curl if (curl == NULL) { - status = PALO_FILE_DOWNLOAD_CURL_INIT_FAILED; + status = DORIS_FILE_DOWNLOAD_CURL_INIT_FAILED; OLAP_LOG_WARNING("internal error to get NULL curl"); } stringstream output_string_stream; // Set curl opt char errbuf[CURL_ERROR_SIZE]; - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { status = _install_opt(OutputType::STREAM, curl, errbuf, &output_string_stream, NULL); - if (PALO_SUCCESS != status) { + if (DORIS_SUCCESS != status) { OLAP_LOG_WARNING("install curl opt failed."); } } // Get result - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { curl_ret = curl_easy_perform(curl); if (curl_ret != CURLE_OK) { - status = PALO_FILE_DOWNLOAD_LIST_DIR_FAIL; + status = DORIS_FILE_DOWNLOAD_LIST_DIR_FAIL; OLAP_LOG_WARNING( "curl list file dir failed.[path=%s]", _downloader_param.remote_file_path.c_str()); @@ -436,4 +436,4 @@ AgentStatus FileDownloader::list_file_dir(string* file_list_string) { return status; } -} // namespace palo +} // namespace doris diff --git a/be/src/agent/file_downloader.h b/be/src/agent/file_downloader.h index abe3106955f5ca..aaaae6ac2f5b40 100644 --- a/be/src/agent/file_downloader.h +++ b/be/src/agent/file_downloader.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_FILE_DOWNLOADER_H -#define BDG_PALO_BE_SRC_AGENT_FILE_DOWNLOADER_H +#ifndef DORIS_BE_SRC_AGENT_FILE_DOWNLOADER_H +#define DORIS_BE_SRC_AGENT_FILE_DOWNLOADER_H #include #include @@ -28,7 +28,7 @@ #include "olap/olap_define.h" #include "olap/file_helper.h" -namespace palo { +namespace doris { const uint32_t GET_LENGTH_TIMEOUT = 10; const uint32_t CURL_OPT_CONNECTTIMEOUT = 120; @@ -79,5 +79,5 @@ class FileDownloader { DISALLOW_COPY_AND_ASSIGN(FileDownloader); }; // class FileDownloader -} // namespace palo -#endif // BDG_PALO_BE_SRC_AGENT_FILE_DOWNLOADER_H +} // namespace doris +#endif // DORIS_BE_SRC_AGENT_FILE_DOWNLOADER_H diff --git a/be/src/agent/heartbeat_server.cpp b/be/src/agent/heartbeat_server.cpp index 602d21702d0a25..c8d41103cdbd81 100644 --- a/be/src/agent/heartbeat_server.cpp +++ b/be/src/agent/heartbeat_server.cpp @@ -34,7 +34,7 @@ using std::string; using std::vector; using apache::thrift::transport::TProcessor; -namespace palo { +namespace doris { HeartbeatServer::HeartbeatServer(TMasterInfo* master_info) : _master_info(master_info), @@ -141,7 +141,7 @@ AgentStatus create_heartbeat_server( TMasterInfo* local_master_info) { HeartbeatServer* heartbeat_server = new (nothrow) HeartbeatServer(local_master_info); if (heartbeat_server == NULL) { - return PALO_ERROR; + return DORIS_ERROR; } heartbeat_server->init_cluster_id(); @@ -155,6 +155,6 @@ AgentStatus create_heartbeat_server( server_port, exec_env->metrics(), worker_thread_num); - return PALO_SUCCESS; + return DORIS_SUCCESS; } -} // namesapce palo +} // namesapce doris diff --git a/be/src/agent/heartbeat_server.h b/be/src/agent/heartbeat_server.h index a70b4395c08d2e..dc78db392dee12 100644 --- a/be/src/agent/heartbeat_server.h +++ b/be/src/agent/heartbeat_server.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_HEARTBEAT_SERVER_H -#define BDG_PALO_BE_SRC_AGENT_HEARTBEAT_SERVER_H +#ifndef DORIS_BE_SRC_AGENT_HEARTBEAT_SERVER_H +#define DORIS_BE_SRC_AGENT_HEARTBEAT_SERVER_H #include "thrift/transport/TTransportUtils.h" @@ -26,7 +26,7 @@ #include "olap/olap_define.h" #include "runtime/exec_env.h" -namespace palo { +namespace doris { const uint32_t HEARTBEAT_INTERVAL = 10; class OLAPEngine; @@ -64,5 +64,5 @@ AgentStatus create_heartbeat_server( ThriftServer** heart_beat_server, uint32_t worker_thread_num, TMasterInfo* local_master_info); -} // namespace palo -#endif // BDG_PALO_BE_SRC_AGENT_HEARTBEAT_SERVER_H +} // namespace doris +#endif // DORIS_BE_SRC_AGENT_HEARTBEAT_SERVER_H diff --git a/be/src/agent/pusher.cpp b/be/src/agent/pusher.cpp index 8aed97573d59ee..c1c68649f041c3 100644 --- a/be/src/agent/pusher.cpp +++ b/be/src/agent/pusher.cpp @@ -37,19 +37,19 @@ using std::list; using std::string; using std::vector; -namespace palo { +namespace doris { Pusher::Pusher(OLAPEngine* engine, const TPushReq& push_req) : _push_req(push_req), _engine(engine) { - _download_status = PALO_SUCCESS; + _download_status = DORIS_SUCCESS; } Pusher::~Pusher() { } AgentStatus Pusher::init() { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; if (_is_init) { OLAP_LOG_DEBUG("has been inited"); @@ -64,11 +64,11 @@ AgentStatus Pusher::init() { if (olap_table.get() == NULL) { OLAP_LOG_WARNING("get tables failed. tablet_id: %ld, schema_hash: %ld", _push_req.tablet_id, _push_req.schema_hash); - status = PALO_PUSH_INVALID_TABLE; + status = DORIS_PUSH_INVALID_TABLE; } // Empty remote_path - if (status == PALO_SUCCESS && !_push_req.__isset.http_file_path) { + if (status == DORIS_SUCCESS && !_push_req.__isset.http_file_path) { _is_init = true; return status; } @@ -77,7 +77,7 @@ AgentStatus Pusher::init() { string remote_full_path; string tmp_file_dir; - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { remote_full_path = _push_req.http_file_path; // Get local download path @@ -85,13 +85,13 @@ AgentStatus Pusher::init() { string root_path = olap_table->storage_root_path_name(); status = _get_tmp_file_dir(root_path, &tmp_file_dir); - if (PALO_SUCCESS != status) { + if (DORIS_SUCCESS != status) { LOG(WARNING) << "get local path failed. tmp file dir: " << tmp_file_dir; } } // Set download param - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { string tmp_file_name; _get_file_name_from_path(_push_req.http_file_path, &tmp_file_name); @@ -108,7 +108,7 @@ AgentStatus Pusher::init() { // Get replica root path AgentStatus Pusher::_get_tmp_file_dir(const string& root_path, string* download_path) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; *download_path = root_path + DPP_PREFIX; // Check path exist @@ -120,7 +120,7 @@ AgentStatus Pusher::_get_tmp_file_dir(const string& root_path, string* download_ boost::filesystem::create_directories(*download_path, error_code); if (0 != error_code) { - status = PALO_ERROR; + status = DORIS_ERROR; LOG(WARNING) << "create download dir failed.path: " << *download_path << ", error code: " << error_code; } @@ -132,7 +132,7 @@ AgentStatus Pusher::_get_tmp_file_dir(const string& root_path, string* download_ AgentStatus Pusher::_download_file() { OLAP_LOG_INFO("begin download file. tablet=%d", _push_req.tablet_id); time_t start = time(NULL); - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; status = _file_downloader->download_file(); @@ -145,7 +145,7 @@ AgentStatus Pusher::_download_file() { if (_push_req.__isset.http_file_size) { rate = (double) _push_req.http_file_size / cost / 1024; } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { OLAP_LOG_INFO("down load file success. local_file=%s, remote_file=%s, " "tablet=%d, cost=%ld, file size: %ld B, download rate: %f KB/s", _downloader_param.local_file_path.c_str(), @@ -168,11 +168,11 @@ void Pusher::_get_file_name_from_path(const string& file_path, string* file_name } AgentStatus Pusher::process(vector* tablet_infos) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; if (!_is_init) { OLAP_LOG_WARNING("has not init yet. tablet_id: %d", _push_req.tablet_id); - return PALO_ERROR; + return DORIS_ERROR; } // Remote file not empty, need to download @@ -201,7 +201,7 @@ AgentStatus Pusher::process(vector* tablet_infos) { if (_push_req.timeout < now) { OLAP_LOG_WARNING("push time out"); - status = PALO_PUSH_TIME_OUT; + status = DORIS_PUSH_TIME_OUT; break; } } @@ -229,7 +229,7 @@ AgentStatus Pusher::process(vector* tablet_infos) { #endif status = _download_status; - if (_push_req.__isset.http_file_size && status == PALO_SUCCESS) { + if (_push_req.__isset.http_file_size && status == DORIS_SUCCESS) { // Check file size boost::filesystem::path local_file_path(_downloader_param.local_file_path); uint64_t local_file_size = boost::filesystem::file_size(local_file_path); @@ -241,11 +241,11 @@ AgentStatus Pusher::process(vector* tablet_infos) { OLAP_LOG_WARNING( "download_file size error. file_size: %d, local_file_size: %d", file_size, local_file_size); - status = PALO_FILE_DOWNLOAD_FAILED; + status = DORIS_FILE_DOWNLOAD_FAILED; } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { _push_req.http_file_path = _downloader_param.local_file_path; break; } @@ -255,16 +255,16 @@ AgentStatus Pusher::process(vector* tablet_infos) { } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { // Load delta file time_t push_begin = time(NULL); OLAPStatus push_status = _engine->push(_push_req, tablet_infos); time_t push_finish = time(NULL); OLAP_LOG_INFO("Push finish, cost time: %ld", push_finish - push_begin); if (push_status == OLAPStatus::OLAP_ERR_PUSH_TRANSACTION_ALREADY_EXIST) { - status = PALO_PUSH_HAD_LOADED; + status = DORIS_PUSH_HAD_LOADED; } else if (push_status != OLAPStatus::OLAP_SUCCESS) { - status = PALO_ERROR; + status = DORIS_ERROR; } } @@ -279,4 +279,4 @@ AgentStatus Pusher::process(vector* tablet_infos) { return status; } -} // namespace palo +} // namespace doris diff --git a/be/src/agent/pusher.h b/be/src/agent/pusher.h index 4d80e78bcf3492..9e2979e72c24d6 100644 --- a/be/src/agent/pusher.h +++ b/be/src/agent/pusher.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_PUSHER_H -#define BDG_PALO_BE_SRC_AGENT_PUSHER_H +#ifndef DORIS_BE_SRC_AGENT_PUSHER_H +#define DORIS_BE_SRC_AGENT_PUSHER_H #include #include @@ -27,7 +27,7 @@ #include "olap/olap_common.h" #include "olap/olap_define.h" -namespace palo { +namespace doris { const uint32_t MAX_RETRY = 3; const uint32_t DEFAULT_DOWNLOAD_TIMEOUT = 3600; @@ -61,5 +61,5 @@ class Pusher { DISALLOW_COPY_AND_ASSIGN(Pusher); }; // class Pusher -} // namespace palo -#endif // BDG_PALO_BE_SRC_AGENT_SERVICE_PUSHER_H +} // namespace doris +#endif // DORIS_BE_SRC_AGENT_SERVICE_PUSHER_H diff --git a/be/src/agent/status.h b/be/src/agent/status.h index da8baa9ebc816d..14fe4c91aeb986 100644 --- a/be/src/agent/status.h +++ b/be/src/agent/status.h @@ -15,32 +15,32 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_STATUS_H -#define BDG_PALO_BE_SRC_AGENT_STATUS_H +#ifndef DORIS_BE_SRC_AGENT_STATUS_H +#define DORIS_BE_SRC_AGENT_STATUS_H -namespace palo { +namespace doris { enum AgentStatus { - PALO_SUCCESS = 0, - PALO_ERROR = -1, - PALO_TASK_REQUEST_ERROR = -101, - PALO_FILE_DOWNLOAD_INVALID_PARAM = -201, - PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED = -202, - PALO_FILE_DOWNLOAD_CURL_INIT_FAILED = -203, - PALO_FILE_DOWNLOAD_FAILED = -204, - PALO_FILE_DOWNLOAD_GET_LENGTH_FAILED = -205, - PALO_FILE_DOWNLOAD_NOT_EXIST = -206, - PALO_FILE_DOWNLOAD_LIST_DIR_FAIL = -207, - PALO_CREATE_TABLE_EXIST = -301, - PALO_CREATE_TABLE_DIFF_SCHEMA_EXIST = -302, - PALO_CREATE_TABLE_NOT_EXIST = -303, - PALO_DROP_TABLE_NOT_EXIST = -401, - PALO_PUSH_INVALID_TABLE = -501, - PALO_PUSH_INVALID_VERSION = -502, - PALO_PUSH_TIME_OUT = -503, - PALO_PUSH_HAD_LOADED = -504, - PALO_TIMEOUT = -901, - PALO_INTERNAL_ERROR = -902, + DORIS_SUCCESS = 0, + DORIS_ERROR = -1, + DORIS_TASK_REQUEST_ERROR = -101, + DORIS_FILE_DOWNLOAD_INVALID_PARAM = -201, + DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED = -202, + DORIS_FILE_DOWNLOAD_CURL_INIT_FAILED = -203, + DORIS_FILE_DOWNLOAD_FAILED = -204, + DORIS_FILE_DOWNLOAD_GET_LENGTH_FAILED = -205, + DORIS_FILE_DOWNLOAD_NOT_EXIST = -206, + DORIS_FILE_DOWNLOAD_LIST_DIR_FAIL = -207, + DORIS_CREATE_TABLE_EXIST = -301, + DORIS_CREATE_TABLE_DIFF_SCHEMA_EXIST = -302, + DORIS_CREATE_TABLE_NOT_EXIST = -303, + DORIS_DROP_TABLE_NOT_EXIST = -401, + DORIS_PUSH_INVALID_TABLE = -501, + DORIS_PUSH_INVALID_VERSION = -502, + DORIS_PUSH_TIME_OUT = -503, + DORIS_PUSH_HAD_LOADED = -504, + DORIS_TIMEOUT = -901, + DORIS_INTERNAL_ERROR = -902, }; -} // namespace palo -#endif // BDG_PALO_BE_SRC_AGENT_STATUS_H +} // namespace doris +#endif // DORIS_BE_SRC_AGENT_STATUS_H diff --git a/be/src/agent/task_worker_pool.cpp b/be/src/agent/task_worker_pool.cpp index e505d0884c0048..08626d8d15765d 100644 --- a/be/src/agent/task_worker_pool.cpp +++ b/be/src/agent/task_worker_pool.cpp @@ -46,7 +46,7 @@ #include "service/backend_options.h" #include "runtime/exec_env.h" #include "runtime/snapshot_loader.h" -#include "util/palo_metrics.h" +#include "util/doris_metrics.h" using std::deque; using std::list; @@ -58,7 +58,7 @@ using std::stringstream; using std::to_string; using std::vector; -namespace palo { +namespace doris { const uint32_t DOWNLOAD_FILE_MAX_RETRY = 3; const uint32_t TASK_FINISH_MAX_RETRY = 3; @@ -318,14 +318,14 @@ void TaskWorkerPool::_finish_task(const TFinishTaskRequest& finish_task_request) int32_t try_time = 0; while (try_time < TASK_FINISH_MAX_RETRY) { - PaloMetrics::finish_task_requests_total.increment(1); + DorisMetrics::finish_task_requests_total.increment(1); AgentStatus client_status = _master_client->finish_task(finish_task_request, &result); - if (client_status == PALO_SUCCESS) { + if (client_status == DORIS_SUCCESS) { OLAP_LOG_INFO("finish task success.result: %d", result.status.status_code); break; } else { - PaloMetrics::finish_task_requests_failed.increment(1); + DorisMetrics::finish_task_requests_failed.increment(1); OLAP_LOG_WARNING("finish task failed.result: %d", result.status.status_code); try_time += 1; } @@ -487,7 +487,7 @@ void* TaskWorkerPool::_drop_table_worker_thread_callback(void* arg_this) { TStatus task_status; AgentStatus status = worker_pool_this->_drop_table(drop_tablet_req); - if (status != PALO_SUCCESS) { + if (status != DORIS_SUCCESS) { OLAP_LOG_WARNING( "drop table failed! signature: %ld", agent_task_req.signature); error_msgs.push_back("drop table failed!"); @@ -561,7 +561,7 @@ void TaskWorkerPool::_alter_table( int64_t signature, const TTaskType::type task_type, TFinishTaskRequest* finish_task_request) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; TStatus task_status; vector error_msgs; @@ -578,7 +578,7 @@ void TaskWorkerPool::_alter_table( EnumToString(TTaskType, task_type, task_name); LOG(WARNING) << "schema change type invalid. type: " << task_name << ", " << "signature: " << signature; - status = PALO_TASK_REQUEST_ERROR; + status = DORIS_TASK_REQUEST_ERROR; break; } @@ -588,7 +588,7 @@ void TaskWorkerPool::_alter_table( // Check last schema change status, if failed delete tablet file // Do not need to adjust delete success or not // Because if delete failed create rollup will failed - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { // Check lastest schema change status AlterTableStatus alter_table_status = _show_alter_table_status( base_tablet_id, @@ -603,7 +603,7 @@ void TaskWorkerPool::_alter_table( drop_tablet_req.__set_schema_hash(alter_tablet_request.new_tablet_req.tablet_schema.schema_hash); status = _drop_table(drop_tablet_req); - if (status != PALO_SUCCESS) { + if (status != DORIS_SUCCESS) { OLAP_LOG_WARNING("delete failed rollup file failed, status: %d, " "signature: %ld.", status, signature); @@ -612,7 +612,7 @@ void TaskWorkerPool::_alter_table( } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { if (alter_table_status == ALTER_TABLE_FINISHED || alter_table_status == ALTER_TABLE_FAILED || alter_table_status == ALTER_TABLE_WAITING) { @@ -630,14 +630,14 @@ void TaskWorkerPool::_alter_table( break; } if (ret != OLAPStatus::OLAP_SUCCESS) { - status = PALO_ERROR; + status = DORIS_ERROR; LOG(WARNING) << process_name << " failed. signature: " << signature << " status: " << status; } } } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { ++_s_report_version; LOG(INFO) << process_name << " finished. signature: " << signature; } @@ -649,7 +649,7 @@ void TaskWorkerPool::_alter_table( finish_task_request->__set_signature(signature); vector finish_tablet_infos; - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { TTabletInfo tablet_info; status = _get_tablet_info( alter_tablet_request.new_tablet_req.tablet_id, @@ -657,7 +657,7 @@ void TaskWorkerPool::_alter_table( signature, &tablet_info); - if (status != PALO_SUCCESS) { + if (status != DORIS_SUCCESS) { OLAP_LOG_WARNING("%s success, but get new tablet info failed." "tablet_id: %ld, schema_hash: %ld, signature: %ld.", process_name.c_str(), @@ -669,12 +669,12 @@ void TaskWorkerPool::_alter_table( } } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { finish_task_request->__set_finish_tablet_infos(finish_tablet_infos); LOG(INFO) << process_name << " success. signature: " << signature; error_msgs.push_back(process_name + " success"); task_status.__set_status_code(TStatusCode::OK); - } else if (status == PALO_TASK_REQUEST_ERROR) { + } else if (status == DORIS_TASK_REQUEST_ERROR) { OLAP_LOG_WARNING("alter table request task type invalid. " "signature: %ld", signature); error_msgs.push_back("alter table request new tablet id or schema count invalid."); @@ -710,7 +710,7 @@ void* TaskWorkerPool::_push_worker_thread_callback(void* arg_this) { #ifndef BE_TEST while (true) { #endif - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; TAgentTaskRequest agent_task_req; TPushReq push_req; string user; @@ -759,7 +759,7 @@ void* TaskWorkerPool::_push_worker_thread_callback(void* arg_this) { status = worker_pool_this->_pusher->init(); #endif - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { uint32_t retry_time = 0; while (retry_time < PUSH_MAX_RETRY) { #ifndef BE_TEST @@ -767,14 +767,14 @@ void* TaskWorkerPool::_push_worker_thread_callback(void* arg_this) { #else status = worker_pool_this->_pusher->process(&tablet_infos); #endif - if (status == PALO_PUSH_HAD_LOADED) { + if (status == DORIS_PUSH_HAD_LOADED) { OLAP_LOG_WARNING("transaction exists when realtime push, " "but unfinished, do not report to fe, signature: %ld", agent_task_req.signature); break; // not retry any more } // Internal error, need retry - if (status == PALO_ERROR) { + if (status == DORIS_ERROR) { OLAP_LOG_WARNING("push internal error, need retry.signature: %ld", agent_task_req.signature); retry_time += 1; @@ -789,14 +789,14 @@ void* TaskWorkerPool::_push_worker_thread_callback(void* arg_this) { if (delete_data_status != OLAPStatus::OLAP_SUCCESS) { OLAP_LOG_WARNING("delete data failed. status: %d, signature: %ld", delete_data_status, agent_task_req.signature); - status = PALO_ERROR; + status = DORIS_ERROR; } } else { - status = PALO_TASK_REQUEST_ERROR; + status = DORIS_TASK_REQUEST_ERROR; } #ifndef BE_TEST - if (status == PALO_PUSH_HAD_LOADED) { + if (status == DORIS_PUSH_HAD_LOADED) { // remove the task and not return to fe worker_pool_this->_remove_task_info( agent_task_req.task_type, agent_task_req.signature, user); @@ -816,7 +816,7 @@ void* TaskWorkerPool::_push_worker_thread_callback(void* arg_this) { finish_task_request.__set_request_version_hash(push_req.version_hash); } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { OLAP_LOG_DEBUG("push ok.signature: %ld", agent_task_req.signature); error_msgs.push_back("push success"); @@ -824,7 +824,7 @@ void* TaskWorkerPool::_push_worker_thread_callback(void* arg_this) { task_status.__set_status_code(TStatusCode::OK); finish_task_request.__set_finish_tablet_infos(tablet_infos); - } else if (status == PALO_TASK_REQUEST_ERROR) { + } else if (status == DORIS_TASK_REQUEST_ERROR) { OLAP_LOG_WARNING("push request push_type invalid. type: %d, signature: %ld", push_req.push_type, agent_task_req.signature); error_msgs.push_back("push request push_type invalid."); @@ -1022,7 +1022,7 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { #ifndef BE_TEST while (true) { #endif - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; TAgentTaskRequest agent_task_req; TCloneReq clone_req; @@ -1037,7 +1037,7 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { worker_pool_this->_tasks.pop_front(); } - PaloMetrics::clone_requests_total.increment(1); + DorisMetrics::clone_requests_total.increment(1); // Try to register to cgroups_mgr CgroupsMgr::apply_system_cgroup(); OLAP_LOG_INFO("get clone task. signature: %ld", agent_task_req.signature); @@ -1069,14 +1069,14 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { &error_msgs, &missing_versions, &allow_incremental_clone); - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { OLAPStatus olap_status = worker_pool_this->_env->olap_engine()-> finish_clone(tablet, local_data_path, clone_req.committed_version, allow_incremental_clone); if (olap_status != OLAP_SUCCESS) { LOG(WARNING) << "failed to finish incremental clone. [table=" << tablet->full_name() << " res=" << olap_status << "]"; error_msgs.push_back("incremental clone error."); - status = PALO_ERROR; + status = DORIS_ERROR; } } else { // begin to full clone if incremental failed @@ -1088,7 +1088,7 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { &src_file_path, &error_msgs, NULL, NULL); - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { LOG(INFO) << "download successfully when full clone. [table=" << tablet->full_name() << " src_host=" << src_host.host << " src_file_path=" << src_file_path << " local_data_path=" << local_data_path << "]"; @@ -1100,7 +1100,7 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { LOG(WARNING) << "fail to finish full clone. [table=" << tablet->full_name() << " res=" << olap_status << "]"; error_msgs.push_back("full clone error."); - status = PALO_ERROR; + status = DORIS_ERROR; } } } @@ -1115,10 +1115,10 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { OLAP_LOG_WARNING("clone get local root path failed. signature: %ld", agent_task_req.signature); error_msgs.push_back("clone get local root path failed."); - status = PALO_ERROR; + status = DORIS_ERROR; } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { stringstream tablet_dir_stream; tablet_dir_stream << local_shard_root_path << "/" << clone_req.tablet_id @@ -1132,7 +1132,7 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { NULL, NULL); } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { LOG(INFO) << "clone copy done. src_host: " << src_host.host << " src_file_path: " << src_file_path; // Load header @@ -1147,13 +1147,13 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { << "' schema_hash: " << clone_req.schema_hash << ". status: " << load_header_status << ". signature: " << agent_task_req.signature; error_msgs.push_back("load header failed."); - status = PALO_ERROR; + status = DORIS_ERROR; } } #ifndef BE_TEST // Clean useless dir, if failed, ignore it. - if (status != PALO_SUCCESS && status != PALO_CREATE_TABLE_EXIST) { + if (status != DORIS_SUCCESS && status != DORIS_CREATE_TABLE_EXIST) { stringstream local_data_path_stream; local_data_path_stream << local_shard_root_path << "/" << clone_req.tablet_id; @@ -1178,20 +1178,20 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { // Get clone tablet info vector tablet_infos; - if (status == PALO_SUCCESS || status == PALO_CREATE_TABLE_EXIST) { + if (status == DORIS_SUCCESS || status == DORIS_CREATE_TABLE_EXIST) { TTabletInfo tablet_info; AgentStatus get_tablet_info_status = worker_pool_this->_get_tablet_info( clone_req.tablet_id, clone_req.schema_hash, agent_task_req.signature, &tablet_info); - if (get_tablet_info_status != PALO_SUCCESS) { + if (get_tablet_info_status != DORIS_SUCCESS) { OLAP_LOG_WARNING("clone success, but get tablet info failed." "tablet id: %ld, schema hash: %ld, signature: %ld", clone_req.tablet_id, clone_req.schema_hash, agent_task_req.signature); error_msgs.push_back("clone success, but get tablet info failed."); - status = PALO_ERROR; + status = DORIS_ERROR; } else if ( (clone_req.__isset.committed_version && clone_req.__isset.committed_version_hash) @@ -1215,13 +1215,13 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { drop_req.tablet_id = clone_req.tablet_id; drop_req.schema_hash = clone_req.schema_hash; AgentStatus drop_status = worker_pool_this->_drop_table(drop_req); - if (drop_status != PALO_SUCCESS) { + if (drop_status != DORIS_SUCCESS) { // just log OLAP_LOG_WARNING( "drop stale cloned table failed! tabelt id: %ld", clone_req.tablet_id); } - status = PALO_ERROR; + status = DORIS_ERROR; } else { OLAP_LOG_INFO("clone get tablet info success. " "tablet id: %ld, schema hash: %ld, signature: %ld " @@ -1241,8 +1241,8 @@ void* TaskWorkerPool::_clone_worker_thread_callback(void* arg_this) { finish_task_request.__set_signature(agent_task_req.signature); TStatusCode::type status_code = TStatusCode::OK; - if (status != PALO_SUCCESS && status != PALO_CREATE_TABLE_EXIST) { - PaloMetrics::clone_requests_failed.increment(1); + if (status != DORIS_SUCCESS && status != DORIS_CREATE_TABLE_EXIST) { + DorisMetrics::clone_requests_failed.increment(1); status_code = TStatusCode::RUNTIME_ERROR; OLAP_LOG_WARNING("clone failed. signature: %ld", agent_task_req.signature); @@ -1274,7 +1274,7 @@ AgentStatus TaskWorkerPool::_clone_copy( vector* error_msgs, const vector* missing_versions, bool* allow_incremental_clone) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; std::string token = _master_info.token; for (auto src_backend : clone_req.src_backends) { @@ -1287,7 +1287,7 @@ AgentStatus TaskWorkerPool::_clone_copy( AgentServerClient agent_client(*src_host); #endif TAgentResult make_snapshot_result; - status = PALO_SUCCESS; + status = DORIS_SUCCESS; LOG(INFO) << "pre make snapshot. backend_ip: " << src_host->host; TSnapshotRequest snapshot_request; @@ -1330,7 +1330,7 @@ AgentStatus TaskWorkerPool::_clone_copy( OLAP_LOG_WARNING("clone make snapshot success, " "but get src file path failed. signature: %ld", signature); - status = PALO_ERROR; + status = DORIS_ERROR; continue; } } else { @@ -1338,7 +1338,7 @@ AgentStatus TaskWorkerPool::_clone_copy( << ". schema_hash: " << clone_req.schema_hash << ". backend_ip: " << src_host->host << ". backend_port: " << src_host->be_port << ". signature: " << signature; error_msgs->push_back("make snapshot failed. backend_ip: " + src_host->host); - status = PALO_ERROR; + status = DORIS_ERROR; continue; } @@ -1346,7 +1346,7 @@ AgentStatus TaskWorkerPool::_clone_copy( stringstream src_file_full_path_stream; stringstream local_file_full_path_stream; - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { src_file_full_path_stream << *src_file_path << "/" << clone_req.tablet_id << "/" << clone_req.schema_hash << "/"; @@ -1357,7 +1357,7 @@ AgentStatus TaskWorkerPool::_clone_copy( #ifndef BE_TEST // Check local path exist, if exist, remove it, then create the dir - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { boost::filesystem::path local_file_full_dir(local_file_full_path); if (boost::filesystem::exists(local_file_full_dir)) { boost::filesystem::remove_all(local_file_full_dir); @@ -1377,20 +1377,20 @@ AgentStatus TaskWorkerPool::_clone_copy( FileDownloader* file_downloader_ptr = new FileDownloader(downloader_param); if (file_downloader_ptr == NULL) { OLAP_LOG_WARNING("clone copy create file downloader failed. try next backend"); - status = PALO_ERROR; + status = DORIS_ERROR; } #endif string file_list_str; - AgentStatus download_status = PALO_SUCCESS; + AgentStatus download_status = DORIS_SUCCESS; uint32_t download_retry_time = 0; - while (status == PALO_SUCCESS && download_retry_time < DOWNLOAD_FILE_MAX_RETRY) { + while (status == DORIS_SUCCESS && download_retry_time < DOWNLOAD_FILE_MAX_RETRY) { #ifndef BE_TEST download_status = file_downloader_ptr->list_file_dir(&file_list_str); #else download_status = _file_downloader_ptr->list_file_dir(&file_list_str); #endif - if (download_status != PALO_SUCCESS) { + if (download_status != DORIS_SUCCESS) { OLAP_LOG_WARNING("clone get remote file list failed. backend_ip: %s, " "src_file_path: %s, signature: %ld", src_host->host.c_str(), @@ -1413,13 +1413,13 @@ AgentStatus TaskWorkerPool::_clone_copy( #endif vector file_name_list; - if (download_status != PALO_SUCCESS) { + if (download_status != DORIS_SUCCESS) { OLAP_LOG_WARNING("clone get remote file list failed over max time. backend_ip: %s, " "src_file_path: %s, signature: %ld", src_host->host.c_str(), downloader_param.remote_file_path.c_str(), signature); - status = PALO_ERROR; + status = DORIS_ERROR; } else { size_t start_position = 0; size_t end_position = file_list_str.find("\n"); @@ -1468,7 +1468,7 @@ AgentStatus TaskWorkerPool::_clone_copy( file_downloader_ptr = new FileDownloader(downloader_param); if (file_downloader_ptr == NULL) { OLAP_LOG_WARNING("clone copy create file downloader failed. try next backend"); - status = PALO_ERROR; + status = DORIS_ERROR; break; } #endif @@ -1478,7 +1478,7 @@ AgentStatus TaskWorkerPool::_clone_copy( #else download_status = _file_downloader_ptr->get_length(&file_size); #endif - if (download_status != PALO_SUCCESS) { + if (download_status != DORIS_SUCCESS) { OLAP_LOG_WARNING("clone copy get file length failed. backend_ip: %s, " "src_file_path: %s, signature: %ld", src_host->host.c_str(), @@ -1499,13 +1499,13 @@ AgentStatus TaskWorkerPool::_clone_copy( file_downloader_ptr = NULL; } #endif - if (download_status != PALO_SUCCESS) { + if (download_status != DORIS_SUCCESS) { OLAP_LOG_WARNING("clone copy get file length failed over max time. " "backend_ip: %s, src_file_path: %s, signature: %ld", src_host->host.c_str(), downloader_param.remote_file_path.c_str(), signature); - status = PALO_ERROR; + status = DORIS_ERROR; break; } @@ -1521,7 +1521,7 @@ AgentStatus TaskWorkerPool::_clone_copy( file_downloader_ptr = new FileDownloader(downloader_param); if (file_downloader_ptr == NULL) { OLAP_LOG_WARNING("clone copy create file downloader failed. try next backend"); - status = PALO_ERROR; + status = DORIS_ERROR; break; } #endif @@ -1531,7 +1531,7 @@ AgentStatus TaskWorkerPool::_clone_copy( #else download_status = _file_downloader_ptr->download_file(); #endif - if (download_status != PALO_SUCCESS) { + if (download_status != DORIS_SUCCESS) { OLAP_LOG_WARNING("download file failed. backend_ip: %s, " "src_file_path: %s, signature: %ld", src_host->host.c_str(), @@ -1548,7 +1548,7 @@ AgentStatus TaskWorkerPool::_clone_copy( src_host->host.c_str(), downloader_param.remote_file_path.c_str(), signature, file_size, local_file_size); - download_status = PALO_FILE_DOWNLOAD_FAILED; + download_status = DORIS_FILE_DOWNLOAD_FAILED; } else { chmod(downloader_param.local_file_path.c_str(), S_IRUSR | S_IWUSR); break; @@ -1567,13 +1567,13 @@ AgentStatus TaskWorkerPool::_clone_copy( } #endif - if (download_status != PALO_SUCCESS) { + if (download_status != DORIS_SUCCESS) { OLAP_LOG_WARNING("download file failed over max retry. backend_ip: %s, " "src_file_path: %s, signature: %ld", src_host->host.c_str(), downloader_param.remote_file_path.c_str(), signature); - status = PALO_ERROR; + status = DORIS_ERROR; break; } } // Clone files from remote backend @@ -1594,7 +1594,7 @@ AgentStatus TaskWorkerPool::_clone_copy( << ". signature: " << signature; } - if (status == PALO_SUCCESS) { + if (status == DORIS_SUCCESS) { break; } } // clone copy from one backend @@ -1789,12 +1789,12 @@ void* TaskWorkerPool::_report_task_worker_thread_callback(void* arg_this) { request.__set_tasks(_s_task_signatures); } - PaloMetrics::report_task_requests_total.increment(1); + DorisMetrics::report_task_requests_total.increment(1); TMasterResult result; AgentStatus status = worker_pool_this->_master_client->report(request, &result); - if (status != PALO_SUCCESS) { - PaloMetrics::report_task_requests_failed.increment(1); + if (status != DORIS_SUCCESS) { + DorisMetrics::report_task_requests_failed.increment(1); LOG(WARNING) << "finish report task failed. status:" << status << ", " << "master host:" << worker_pool_this->_master_info.network_address.hostname << ", " << "port:" << worker_pool_this->_master_info.network_address.port; @@ -1842,12 +1842,12 @@ void* TaskWorkerPool::_report_disk_state_worker_thread_callback(void* arg_this) } request.__set_disks(disks); - PaloMetrics::report_disk_requests_total.increment(1); + DorisMetrics::report_disk_requests_total.increment(1); TMasterResult result; AgentStatus status = worker_pool_this->_master_client->report(request, &result); - if (status != PALO_SUCCESS) { - PaloMetrics::report_disk_requests_failed.increment(1); + if (status != DORIS_SUCCESS) { + DorisMetrics::report_disk_requests_failed.increment(1); LOG(WARNING) << "finish report disk state failed. status:" << status << ", " << "master host:" << worker_pool_this->_master_info.network_address.hostname << ", " << "port:" << worker_pool_this->_master_info.network_address.port; @@ -1877,7 +1877,7 @@ void* TaskWorkerPool::_report_olap_table_worker_thread_callback(void* arg_this) request.__set_force_recovery(config::force_recovery); request.__set_backend(worker_pool_this->_backend); request.__isset.tablets = true; - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; #ifndef BE_TEST while (true) { @@ -1916,8 +1916,8 @@ void* TaskWorkerPool::_report_olap_table_worker_thread_callback(void* arg_this) TMasterResult result; status = worker_pool_this->_master_client->report(request, &result); - if (status != PALO_SUCCESS) { - PaloMetrics::report_all_tablets_requests_failed.increment(1); + if (status != DORIS_SUCCESS) { + DorisMetrics::report_all_tablets_requests_failed.increment(1); LOG(WARNING) << "finish report olap table state failed. status:" << status << ", " << "master host:" << worker_pool_this->_master_info.network_address.hostname << ", " << "port:" << worker_pool_this->_master_info.network_address.port; @@ -2219,10 +2219,10 @@ AlterTableStatus TaskWorkerPool::_show_alter_table_status( } AgentStatus TaskWorkerPool::_drop_table(const TDropTabletReq& req) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; OLAPStatus drop_status = _env->olap_engine()->drop_table(req.tablet_id, req.schema_hash); if (drop_status != OLAP_SUCCESS && drop_status != OLAP_ERR_TABLE_NOT_FOUND) { - status = PALO_ERROR; + status = DORIS_ERROR; } return status; } @@ -2232,7 +2232,7 @@ AgentStatus TaskWorkerPool::_get_tablet_info( const TSchemaHash schema_hash, int64_t signature, TTabletInfo* tablet_info) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; tablet_info->__set_tablet_id(tablet_id); tablet_info->__set_schema_hash(schema_hash); @@ -2240,7 +2240,7 @@ AgentStatus TaskWorkerPool::_get_tablet_info( if (olap_status != OLAP_SUCCESS) { OLAP_LOG_WARNING("get tablet info failed. status: %d, signature: %ld", olap_status, signature); - status = PALO_ERROR; + status = DORIS_ERROR; } return status; } @@ -2281,7 +2281,7 @@ void* TaskWorkerPool::_move_dir_thread_callback(void* arg_this) { true /* TODO */, &error_msgs); - if (status != PALO_SUCCESS) { + if (status != DORIS_SUCCESS) { status_code = TStatusCode::RUNTIME_ERROR; OLAP_LOG_WARNING("failed to move dir: %s, tablet id: %ld, signature: %ld, job id: %ld", move_dir_req.src.c_str(), move_dir_req.tablet_id, agent_task_req.signature, @@ -2324,7 +2324,7 @@ AgentStatus TaskWorkerPool::_move_dir( OLAP_LOG_INFO("failed to get tablet: %ld, schema hash: %d", tablet_id, schema_hash); error_msgs->push_back("failed to get tablet"); - return PALO_TASK_REQUEST_ERROR; + return DORIS_TASK_REQUEST_ERROR; } std::string dest_tablet_dir = tablet->construct_dir_path(); @@ -2337,10 +2337,10 @@ AgentStatus TaskWorkerPool::_move_dir( OLAP_LOG_WARNING("move failed. job id: %ld, msg: %s", job_id, status.get_error_msg().c_str()); error_msgs->push_back(status.get_error_msg()); - return PALO_INTERNAL_ERROR; + return DORIS_INTERNAL_ERROR; } - return PALO_SUCCESS; + return DORIS_SUCCESS; } void* TaskWorkerPool::_recover_tablet_thread_callback(void* arg_this) { @@ -2399,4 +2399,4 @@ void* TaskWorkerPool::_recover_tablet_thread_callback(void* arg_this) { return (void*)0; } -} // namespace palo +} // namespace doris diff --git a/be/src/agent/task_worker_pool.h b/be/src/agent/task_worker_pool.h index ae1841aa170a07..fd6a6c174dc4f2 100644 --- a/be/src/agent/task_worker_pool.h +++ b/be/src/agent/task_worker_pool.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_TASK_WORKER_POOL_H -#define BDG_PALO_BE_SRC_TASK_WORKER_POOL_H +#ifndef DORIS_BE_SRC_TASK_WORKER_POOL_H +#define DORIS_BE_SRC_TASK_WORKER_POOL_H #include #include @@ -35,7 +35,7 @@ #include "olap/olap_engine.h" #include "olap/utils.h" -namespace palo { +namespace doris { class ExecEnv; @@ -182,5 +182,5 @@ class TaskWorkerPool { DISALLOW_COPY_AND_ASSIGN(TaskWorkerPool); }; // class TaskWorkerPool -} // namespace palo -#endif // BDG_PALO_BE_SRC_TASK_WORKER_POOL_H +} // 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 c2f1e2e3e311c9..677be784fcdfb2 100644 --- a/be/src/agent/topic_listener.h +++ b/be/src/agent/topic_listener.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_TOPIC_LISTENER_H -#define BDG_PALO_BE_SRC_AGENT_TOPIC_LISTENER_H +#ifndef DORIS_BE_SRC_AGENT_TOPIC_LISTENER_H +#define DORIS_BE_SRC_AGENT_TOPIC_LISTENER_H #include "gen_cpp/AgentService_types.h" -namespace palo { +namespace doris { class TopicListener { diff --git a/be/src/agent/topic_subscriber.cpp b/be/src/agent/topic_subscriber.cpp index 1c05a873dec0f9..28b58d18536488 100644 --- a/be/src/agent/topic_subscriber.cpp +++ b/be/src/agent/topic_subscriber.cpp @@ -18,7 +18,7 @@ #include "agent/topic_subscriber.h" #include "common/logging.h" -namespace palo { +namespace doris { TopicSubscriber::TopicSubscriber() { } @@ -58,4 +58,4 @@ void TopicSubscriber::handle_updates(const TAgentPublishRequest& agent_publish_r } } } -} // namespace palo +} // namespace doris diff --git a/be/src/agent/topic_subscriber.h b/be/src/agent/topic_subscriber.h index 81587068bf20bc..b2bc59c743f6c3 100644 --- a/be/src/agent/topic_subscriber.h +++ b/be/src/agent/topic_subscriber.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_TOPIC_SUBSCRIBER_H -#define BDG_PALO_BE_SRC_AGENT_TOPIC_SUBSCRIBER_H +#ifndef DORIS_BE_SRC_AGENT_TOPIC_SUBSCRIBER_H +#define DORIS_BE_SRC_AGENT_TOPIC_SUBSCRIBER_H #include #include #include "agent/topic_listener.h" #include "gen_cpp/AgentService_types.h" -namespace palo { +namespace doris { class TopicSubscriber { @@ -40,5 +40,5 @@ class TopicSubscriber { std::map> _registed_listeners; boost::shared_mutex _listener_mtx; }; -} // namespace palo +} // namespace doris #endif diff --git a/be/src/agent/user_resource_listener.cpp b/be/src/agent/user_resource_listener.cpp index e4a94e4ff6891e..631cd7c795e940 100644 --- a/be/src/agent/user_resource_listener.cpp +++ b/be/src/agent/user_resource_listener.cpp @@ -26,7 +26,7 @@ #include "common/logging.h" #include "gen_cpp/FrontendService.h" -namespace palo { +namespace doris { using std::string; using apache::thrift::TException; diff --git a/be/src/agent/user_resource_listener.h b/be/src/agent/user_resource_listener.h index 404dcb84af06ff..16736d973a38f9 100644 --- a/be/src/agent/user_resource_listener.h +++ b/be/src/agent/user_resource_listener.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_USER_RESOURCE_LISTENER_H -#define BDG_PALO_BE_SRC_AGENT_USER_RESOURCE_LISTENER_H +#ifndef DORIS_BE_SRC_AGENT_USER_RESOURCE_LISTENER_H +#define DORIS_BE_SRC_AGENT_USER_RESOURCE_LISTENER_H #include #include "agent/topic_listener.h" @@ -26,14 +26,14 @@ #include "gen_cpp/HeartbeatService_types.h" #include "runtime/exec_env.h" -namespace palo { +namespace doris { class UserResourceListener : public TopicListener { public: ~UserResourceListener(); // Input parameters: - // root_cgroups_path: root cgroups allocated by admin to palo + // root_cgroups_path: root cgroups allocated by admin to doris UserResourceListener(ExecEnv* exec_env, const TMasterInfo& master_info); // This method should be async virtual void handle_update(const TAgentServiceVersion::type& protocol_version, diff --git a/be/src/agent/utils.cpp b/be/src/agent/utils.cpp index 05fd3c8c2a67b3..99d0f5d0942ac8 100644 --- a/be/src/agent/utils.cpp +++ b/be/src/agent/utils.cpp @@ -57,7 +57,7 @@ using apache::thrift::transport::TSocket; using apache::thrift::transport::TBufferedTransport; using apache::thrift::transport::TTransportException; -namespace palo { +namespace doris { AgentServerClient::AgentServerClient(const TBackend backend) : @@ -76,7 +76,7 @@ AgentServerClient::~AgentServerClient() { AgentStatus AgentServerClient::make_snapshot( const TSnapshotRequest& snapshot_request, TAgentResult* result) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; TAgentResult thrift_result; try { @@ -88,7 +88,7 @@ AgentStatus AgentServerClient::make_snapshot( OLAP_LOG_WARNING("agent clinet make snapshot, " "get exception, error: %s", e.what()); _transport->close(); - status = PALO_ERROR; + status = DORIS_ERROR; } return status; @@ -97,7 +97,7 @@ AgentStatus AgentServerClient::make_snapshot( AgentStatus AgentServerClient::release_snapshot( const string& snapshot_path, TAgentResult* result) { - AgentStatus status = PALO_SUCCESS; + AgentStatus status = DORIS_SUCCESS; try { _transport->open(); @@ -107,7 +107,7 @@ AgentStatus AgentServerClient::release_snapshot( OLAP_LOG_WARNING("agent clinet make snapshot, " "get exception, error: %s", e.what()); _transport->close(); - status = PALO_ERROR; + status = DORIS_ERROR; } return status; @@ -134,7 +134,7 @@ AgentStatus MasterServerClient::finish_task( LOG(WARNING) << "master client. get client from cache failed. host: " << _master_info.network_address.hostname << ". port: " << _master_info.network_address.port << ". code: " << client_status.code(); - return PALO_ERROR; + return DORIS_ERROR; } try { @@ -150,7 +150,7 @@ AgentStatus MasterServerClient::finish_task( _master_info.network_address.hostname.c_str(), _master_info.network_address.port, client_status.code()); - return PALO_ERROR; + return DORIS_ERROR; } client->finishTask(*result, request); @@ -161,10 +161,10 @@ AgentStatus MasterServerClient::finish_task( _master_info.network_address.hostname.c_str(), _master_info.network_address.port, e.what()); - return PALO_ERROR; + return DORIS_ERROR; } - return PALO_SUCCESS; + return DORIS_SUCCESS; } AgentStatus MasterServerClient::report(const TReportRequest request, TMasterResult* result) { @@ -181,7 +181,7 @@ AgentStatus MasterServerClient::report(const TReportRequest request, TMasterResu _master_info.network_address.hostname.c_str(), _master_info.network_address.port, client_status.code()); - return PALO_ERROR; + return DORIS_ERROR; } try { @@ -200,7 +200,7 @@ AgentStatus MasterServerClient::report(const TReportRequest request, TMasterResu _master_info.network_address.hostname.c_str(), _master_info.network_address.port, client_status.code()); - return PALO_ERROR; + return DORIS_ERROR; } client->report(*result, request); @@ -208,16 +208,16 @@ AgentStatus MasterServerClient::report(const TReportRequest request, TMasterResu // TIMED_OUT exception. do not retry // actually we don't care what FE returns. OLAP_LOG_WARNING("master client, report failed: %s", e.what()); - return PALO_ERROR; + return DORIS_ERROR; } } } catch (TException& e) { LOG(WARNING) << "master client. finish report failed. host: " << _master_info.network_address.hostname << ". port: " << _master_info.network_address.port << ". code: " << client_status.code(); - return PALO_ERROR; + return DORIS_ERROR; } - return PALO_SUCCESS; + return DORIS_SUCCESS; } AgentStatus AgentUtils::rsync_from_remote( @@ -246,59 +246,59 @@ AgentStatus AgentUtils::rsync_from_remote( fp = popen(cmd_stream.str().c_str(), "r"); if (fp == NULL) { - return PALO_ERROR; + return DORIS_ERROR; } ret_code = pclose(fp); if (ret_code != 0) { - return PALO_ERROR; + return DORIS_ERROR; } - return PALO_SUCCESS; + return DORIS_SUCCESS; } std::string AgentUtils::print_agent_status(AgentStatus status) { switch (status) { - case PALO_SUCCESS: - return "PALO_SUCCESS"; - case PALO_ERROR: - return "PALO_ERROR"; - case PALO_TASK_REQUEST_ERROR: - return "PALO_TASK_REQUEST_ERROR"; - case PALO_FILE_DOWNLOAD_INVALID_PARAM: - return "PALO_FILE_DOWNLOAD_INVALID_PARAM"; - case PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED: - return "PALO_FILE_DOWNLOAD_INSTALL_OPT_FAILED"; - case PALO_FILE_DOWNLOAD_CURL_INIT_FAILED: - return "PALO_FILE_DOWNLOAD_CURL_INIT_FAILED"; - case PALO_FILE_DOWNLOAD_FAILED: - return "PALO_FILE_DOWNLOAD_FAILED"; - case PALO_FILE_DOWNLOAD_GET_LENGTH_FAILED: - return "PALO_FILE_DOWNLOAD_GET_LENGTH_FAILED"; - case PALO_FILE_DOWNLOAD_NOT_EXIST: - return "PALO_FILE_DOWNLOAD_NOT_EXIST"; - case PALO_FILE_DOWNLOAD_LIST_DIR_FAIL: - return "PALO_FILE_DOWNLOAD_LIST_DIR_FAIL"; - case PALO_CREATE_TABLE_EXIST: - return "PALO_CREATE_TABLE_EXIST"; - case PALO_CREATE_TABLE_DIFF_SCHEMA_EXIST: - return "PALO_CREATE_TABLE_DIFF_SCHEMA_EXIST"; - case PALO_CREATE_TABLE_NOT_EXIST: - return "PALO_CREATE_TABLE_NOT_EXIST"; - case PALO_DROP_TABLE_NOT_EXIST: - return "PALO_DROP_TABLE_NOT_EXIST"; - case PALO_PUSH_INVALID_TABLE: - return "PALO_PUSH_INVALID_TABLE"; - case PALO_PUSH_INVALID_VERSION: - return "PALO_PUSH_INVALID_VERSION"; - case PALO_PUSH_TIME_OUT: - return "PALO_PUSH_TIME_OUT"; - case PALO_PUSH_HAD_LOADED: - return "PALO_PUSH_HAD_LOADED"; - case PALO_TIMEOUT: - return "PALO_TIMEOUT"; - case PALO_INTERNAL_ERROR: - return "PALO_INTERNAL_ERROR"; + case DORIS_SUCCESS: + return "DORIS_SUCCESS"; + case DORIS_ERROR: + return "DORIS_ERROR"; + case DORIS_TASK_REQUEST_ERROR: + return "DORIS_TASK_REQUEST_ERROR"; + case DORIS_FILE_DOWNLOAD_INVALID_PARAM: + return "DORIS_FILE_DOWNLOAD_INVALID_PARAM"; + case DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED: + return "DORIS_FILE_DOWNLOAD_INSTALL_OPT_FAILED"; + case DORIS_FILE_DOWNLOAD_CURL_INIT_FAILED: + return "DORIS_FILE_DOWNLOAD_CURL_INIT_FAILED"; + case DORIS_FILE_DOWNLOAD_FAILED: + return "DORIS_FILE_DOWNLOAD_FAILED"; + case DORIS_FILE_DOWNLOAD_GET_LENGTH_FAILED: + return "DORIS_FILE_DOWNLOAD_GET_LENGTH_FAILED"; + case DORIS_FILE_DOWNLOAD_NOT_EXIST: + return "DORIS_FILE_DOWNLOAD_NOT_EXIST"; + case DORIS_FILE_DOWNLOAD_LIST_DIR_FAIL: + return "DORIS_FILE_DOWNLOAD_LIST_DIR_FAIL"; + case DORIS_CREATE_TABLE_EXIST: + return "DORIS_CREATE_TABLE_EXIST"; + case DORIS_CREATE_TABLE_DIFF_SCHEMA_EXIST: + return "DORIS_CREATE_TABLE_DIFF_SCHEMA_EXIST"; + case DORIS_CREATE_TABLE_NOT_EXIST: + return "DORIS_CREATE_TABLE_NOT_EXIST"; + case DORIS_DROP_TABLE_NOT_EXIST: + return "DORIS_DROP_TABLE_NOT_EXIST"; + case DORIS_PUSH_INVALID_TABLE: + return "DORIS_PUSH_INVALID_TABLE"; + case DORIS_PUSH_INVALID_VERSION: + return "DORIS_PUSH_INVALID_VERSION"; + case DORIS_PUSH_TIME_OUT: + return "DORIS_PUSH_TIME_OUT"; + case DORIS_PUSH_HAD_LOADED: + return "DORIS_PUSH_HAD_LOADED"; + case DORIS_TIMEOUT: + return "DORIS_TIMEOUT"; + case DORIS_INTERNAL_ERROR: + return "DORIS_INTERNAL_ERROR"; default: return "UNKNOWM"; } @@ -370,4 +370,4 @@ bool AgentUtils::write_json_to_file(const map& info, const strin return true; } -} // namespace palo +} // namespace doris diff --git a/be/src/agent/utils.h b/be/src/agent/utils.h index 18bc966de44a11..db3d0a340738db 100644 --- a/be/src/agent/utils.h +++ b/be/src/agent/utils.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_AGENT_UTILS_H -#define BDG_PALO_BE_SRC_AGENT_UTILS_H +#ifndef DORIS_BE_SRC_AGENT_UTILS_H +#define DORIS_BE_SRC_AGENT_UTILS_H #include #include @@ -32,7 +32,7 @@ #include "olap/olap_define.h" #include "runtime/client_cache.h" -namespace palo { +namespace doris { const uint32_t MASTER_CLIENT_TIMEOUT = 3000; @@ -143,5 +143,5 @@ class AgentUtils { DISALLOW_COPY_AND_ASSIGN(AgentUtils); }; // class AgentUtils -} // namespace palo -#endif // BDG_PALO_BE_SRC_AGENT_UTILS_H +} // namespace doris +#endif // DORIS_BE_SRC_AGENT_UTILS_H diff --git a/be/src/codegen/CMakeLists.txt b/be/src/codegen/CMakeLists.txt index 5e69e4c76cbf3d..881ab8fb0a074c 100644 --- a/be/src/codegen/CMakeLists.txt +++ b/be/src/codegen/CMakeLists.txt @@ -22,8 +22,8 @@ set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/codegen") set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/codegen") # Generated C files for IR -set(IR_SSE_C_FILE ${GENSRC_DIR}/palo_ir/palo_sse_ir.cpp) -set(IR_NO_SSE_C_FILE ${GENSRC_DIR}/palo_ir/palo_no_sse_ir.cpp) +set(IR_SSE_C_FILE ${GENSRC_DIR}/doris_ir/doris_sse_ir.cpp) +set(IR_NO_SSE_C_FILE ${GENSRC_DIR}/doris_ir/doris_no_sse_ir.cpp) add_library(CodeGen STATIC codegen_anyval.cpp @@ -37,8 +37,8 @@ add_dependencies(CodeGen gen_ir_descriptions compile_to_ir_sse compile_to_ir_no_ # output cross compile to ir metadata set(IR_DESC_GEN_OUTPUT - ${GENSRC_DIR}/palo_ir/palo_ir_names.h - ${GENSRC_DIR}/palo_ir/palo_ir_functions.h + ${GENSRC_DIR}/doris_ir/doris_ir_names.h + ${GENSRC_DIR}/doris_ir/doris_ir_functions.h ) add_custom_command( @@ -50,11 +50,11 @@ add_custom_command( ) add_custom_target(gen_ir_descriptions ALL DEPENDS ${IR_DESC_GEN_OUTPUT}) -set(IR_INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/palo_ir.cpp) -set(IR_SSE_TMP_OUTPUT_FILE "${GENSRC_DIR}/palo_ir/palo_sse_tmp.bc") -set(IR_NO_SSE_TMP_OUTPUT_FILE "${GENSRC_DIR}/palo_ir/palo_no_sse_tmp.bc") -set(IR_SSE_OUTPUT_FILE "${GENSRC_DIR}/palo_ir/palo_sse.bc") -set(IR_NO_SSE_OUTPUT_FILE "${GENSRC_DIR}/palo_ir/palo_no_sse.bc") +set(IR_INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/doris_ir.cpp) +set(IR_SSE_TMP_OUTPUT_FILE "${GENSRC_DIR}/doris_ir/doris_sse_tmp.bc") +set(IR_NO_SSE_TMP_OUTPUT_FILE "${GENSRC_DIR}/doris_ir/doris_no_sse_tmp.bc") +set(IR_SSE_OUTPUT_FILE "${GENSRC_DIR}/doris_ir/doris_sse.bc") +set(IR_NO_SSE_OUTPUT_FILE "${GENSRC_DIR}/doris_ir/doris_no_sse.bc") set(IR_SSE_TMP_C_FILE ${IR_SSE_C_FILE}.tmp) set(IR_NO_SSE_TMP_C_FILE ${IR_NO_SSE_C_FILE}.tmp) @@ -85,7 +85,7 @@ add_custom_target(compile_to_ir_no_sse DEPENDS ${IR_NO_SSE_OUTPUT_FILE}) # Convert LLVM bytecode to C array. add_custom_command( OUTPUT ${IR_SSE_C_FILE} - COMMAND $ENV{DORIS_HOME}/gensrc/script/file2array.sh -n -v palo_sse_llvm_ir ${IR_SSE_OUTPUT_FILE} > ${IR_SSE_TMP_C_FILE} + COMMAND $ENV{DORIS_HOME}/gensrc/script/file2array.sh -n -v doris_sse_llvm_ir ${IR_SSE_OUTPUT_FILE} > ${IR_SSE_TMP_C_FILE} COMMAND mv ${IR_SSE_TMP_C_FILE} ${IR_SSE_C_FILE} DEPENDS $ENV{DORIS_HOME}/gensrc/script/file2array.sh DEPENDS ${IR_SSE_OUTPUT_FILE} @@ -94,7 +94,7 @@ add_custom_command( # Convert LLVM bytecode to C array. add_custom_command( OUTPUT ${IR_NO_SSE_C_FILE} - COMMAND $ENV{DORIS_HOME}/gensrc/script/file2array.sh -n -v palo_no_sse_llvm_ir ${IR_NO_SSE_OUTPUT_FILE} > ${IR_NO_SSE_TMP_C_FILE} + COMMAND $ENV{DORIS_HOME}/gensrc/script/file2array.sh -n -v doris_no_sse_llvm_ir ${IR_NO_SSE_OUTPUT_FILE} > ${IR_NO_SSE_TMP_C_FILE} COMMAND mv ${IR_NO_SSE_TMP_C_FILE} ${IR_NO_SSE_C_FILE} DEPENDS $ENV{DORIS_HOME}/gensrc/script/file2array.sh DEPENDS ${IR_NO_SSE_OUTPUT_FILE} diff --git a/be/src/codegen/codegen_anyval.cpp b/be/src/codegen/codegen_anyval.cpp index 2ee53275a63dde..3c226ec42de6c3 100644 --- a/be/src/codegen/codegen_anyval.cpp +++ b/be/src/codegen/codegen_anyval.cpp @@ -25,19 +25,19 @@ using llvm::Value; using llvm::ConstantInt; using llvm::Constant; -namespace palo { - -const char* CodegenAnyVal::_s_llvm_booleanval_name = "struct.palo_udf::BooleanVal"; -const char* CodegenAnyVal::_s_llvm_tinyintval_name = "struct.palo_udf::TinyIntVal"; -const char* CodegenAnyVal::_s_llvm_smallintval_name = "struct.palo_udf::SmallIntVal"; -const char* CodegenAnyVal::_s_llvm_intval_name = "struct.palo_udf::IntVal"; -const char* CodegenAnyVal::_s_llvm_bigintval_name = "struct.palo_udf::BigIntVal"; -const char* CodegenAnyVal::_s_llvm_largeintval_name = "struct.palo_udf::LargeIntVal"; -const char* CodegenAnyVal::_s_llvm_floatval_name = "struct.palo_udf::FloatVal"; -const char* CodegenAnyVal::_s_llvm_doubleval_name = "struct.palo_udf::DoubleVal"; -const char* CodegenAnyVal::_s_llvm_stringval_name = "struct.palo_udf::StringVal"; -const char* CodegenAnyVal::_s_llvm_datetimeval_name = "struct.palo_udf::DateTimeVal"; -const char* CodegenAnyVal::_s_llvm_decimalval_name = "struct.palo_udf::DecimalVal"; +namespace doris { + +const char* CodegenAnyVal::_s_llvm_booleanval_name = "struct.doris_udf::BooleanVal"; +const char* CodegenAnyVal::_s_llvm_tinyintval_name = "struct.doris_udf::TinyIntVal"; +const char* CodegenAnyVal::_s_llvm_smallintval_name = "struct.doris_udf::SmallIntVal"; +const char* CodegenAnyVal::_s_llvm_intval_name = "struct.doris_udf::IntVal"; +const char* CodegenAnyVal::_s_llvm_bigintval_name = "struct.doris_udf::BigIntVal"; +const char* CodegenAnyVal::_s_llvm_largeintval_name = "struct.doris_udf::LargeIntVal"; +const char* CodegenAnyVal::_s_llvm_floatval_name = "struct.doris_udf::FloatVal"; +const char* CodegenAnyVal::_s_llvm_doubleval_name = "struct.doris_udf::DoubleVal"; +const char* CodegenAnyVal::_s_llvm_stringval_name = "struct.doris_udf::StringVal"; +const char* CodegenAnyVal::_s_llvm_datetimeval_name = "struct.doris_udf::DateTimeVal"; +const char* CodegenAnyVal::_s_llvm_decimalval_name = "struct.doris_udf::DecimalVal"; Type* CodegenAnyVal::get_lowered_type(LlvmCodeGen* cg, const TypeDescriptor& type) { switch (type.type) { @@ -51,7 +51,7 @@ Type* CodegenAnyVal::get_lowered_type(LlvmCodeGen* cg, const TypeDescriptor& typ return cg->bigint_type(); case TYPE_BIGINT: // { i8, i64 } return llvm::StructType::get(cg->tinyint_type(), cg->bigint_type(), NULL); - case TYPE_LARGEINT: // %"struct.palo_udf::LargeIntVal" (isn't lowered) + case TYPE_LARGEINT: // %"struct.doris_udf::LargeIntVal" (isn't lowered) // = { {i8}, [15 x i8], i128 } return cg->get_type(_s_llvm_largeintval_name); case TYPE_FLOAT: // i64 @@ -63,10 +63,10 @@ Type* CodegenAnyVal::get_lowered_type(LlvmCodeGen* cg, const TypeDescriptor& typ case TYPE_HLL: return llvm::StructType::get(cg->bigint_type(), cg->ptr_type(), NULL); case TYPE_DATE: - case TYPE_DATETIME: // %"struct.palo_udf::DateTimeVal" (isn't lowered) + case TYPE_DATETIME: // %"struct.doris_udf::DateTimeVal" (isn't lowered) // = { {i8}, i64, i32 } return cg->get_type(_s_llvm_datetimeval_name); - case TYPE_DECIMAL: // %"struct.palo_udf::DecimalVal" (isn't lowered) + case TYPE_DECIMAL: // %"struct.doris_udf::DecimalVal" (isn't lowered) // = { {i8}, i8, i8, i8, [9 x i32] } return cg->get_type(_s_llvm_decimalval_name); default: diff --git a/be/src/codegen/codegen_anyval.h b/be/src/codegen/codegen_anyval.h index 2546d57166b7d1..5dd5d78b6db377 100644 --- a/be/src/codegen/codegen_anyval.h +++ b/be/src/codegen/codegen_anyval.h @@ -25,7 +25,7 @@ class Type; class Value; } -namespace palo { +namespace doris { /// Class for handling AnyVal subclasses during codegen. Codegen functions should use this /// wrapper instead of creating or manipulating *Val values directly in most cases. This is diff --git a/be/src/codegen/codegen_anyval_ir.cpp b/be/src/codegen/codegen_anyval_ir.cpp index 7bf4208932ca8b..fc14fd193fdefa 100644 --- a/be/src/codegen/codegen_anyval_ir.cpp +++ b/be/src/codegen/codegen_anyval_ir.cpp @@ -22,7 +22,7 @@ #include "runtime/decimal_value.h" #include "udf/udf.h" -namespace palo { +namespace doris { // Note: we explicitly pass by reference because passing by value has special ABI rules // Used by CodegenAnyVal::Eq() diff --git a/be/src/codegen/palo_ir.cpp b/be/src/codegen/doris_ir.cpp similarity index 100% rename from be/src/codegen/palo_ir.cpp rename to be/src/codegen/doris_ir.cpp diff --git a/be/src/codegen/palo_ir.h b/be/src/codegen/doris_ir.h similarity index 94% rename from be/src/codegen/palo_ir.h rename to be/src/codegen/doris_ir.h index d14b1c28283874..620beb92a1ac3e 100644 --- a/be/src/codegen/palo_ir.h +++ b/be/src/codegen/doris_ir.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_CODGEN_PALO_IR_H -#define BDG_PALO_BE_SRC_QUERY_CODGEN_PALO_IR_H +#ifndef DORIS_BE_SRC_QUERY_CODGEN_DORIS_IR_H +#define DORIS_BE_SRC_QUERY_CODGEN_DORIS_IR_H #ifdef IR_COMPILE // For cross compiling to IR, we need functions decorated in specific ways. For // functions that we will replace with codegen, we need them not inlined (otherwise diff --git a/be/src/codegen/palo_ir_data.h b/be/src/codegen/doris_ir_data.h similarity index 75% rename from be/src/codegen/palo_ir_data.h rename to be/src/codegen/doris_ir_data.h index 3b19f3c111c963..2d6292f3fcd60f 100644 --- a/be/src/codegen/palo_ir_data.h +++ b/be/src/codegen/doris_ir_data.h @@ -15,16 +15,16 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_CODEGEN_PALO_IR_DATA_H -#define BDG_PALO_BE_SRC_QUERY_CODEGEN_PALO_IR_DATA_H +#ifndef DORIS_BE_SRC_QUERY_CODEGEN_DORIS_IR_DATA_H +#define DORIS_BE_SRC_QUERY_CODEGEN_DORIS_IR_DATA_H /// Header with declarations of Impala IR data. Definitions of the arrays are generated /// separately. -extern const unsigned char palo_sse_llvm_ir[]; -extern const size_t palo_sse_llvm_ir_len; +extern const unsigned char doris_sse_llvm_ir[]; +extern const size_t doris_sse_llvm_ir_len; -extern const unsigned char palo_no_sse_llvm_ir[]; -extern const size_t palo_no_sse_llvm_ir_len; +extern const unsigned char doris_no_sse_llvm_ir[]; +extern const size_t doris_no_sse_llvm_ir_len; #endif diff --git a/be/src/codegen/gen_ir_descriptions.py b/be/src/codegen/gen_ir_descriptions.py index 8dac9baa665a30..dbabc7aa8b9ad0 100755 --- a/be/src/codegen/gen_ir_descriptions.py +++ b/be/src/codegen/gen_ir_descriptions.py @@ -18,10 +18,10 @@ """ This script will generate two headers that describe all of the clang cross compiled functions. -The script outputs (run: 'palo/common/function-registry/gen_functions.py') - - be/src/generated-sources/palo-ir/palo-ir-functions.h +The script outputs (run: 'doris/common/function-registry/gen_functions.py') + - be/src/generated-sources/doris-ir/doris-ir-functions.h This file contains enums for all of the cross compiled functions - - be/src/generated-sources/palo-ir/palo-ir-function-names.h + - be/src/generated-sources/doris-ir/doris-ir-function-names.h This file contains a mapping of Mapping of enum to compiled function name. The compiled function name only has to @@ -73,16 +73,16 @@ # ["STRING_TO_FLOAT", "IrStringToFloat"], # ["STRING_TO_DOUBLE", "IrStringToDouble"], # ["STRING_IS_NULL", "IrIsNullString"], - ["HLL_UPDATE_BOOLEAN", "hll_updateIN8palo_udf10BooleanVal"], - ["HLL_UPDATE_TINYINT", "hll_updateIN8palo_udf10TinyIntVal"], - ["HLL_UPDATE_SMALLINT", "hll_updateIN8palo_udf11SmallIntVal"], - ["HLL_UPDATE_INT", "hll_updateIN8palo_udf6IntVal"], - ["HLL_UPDATE_BIGINT", "hll_updateIN8palo_udf9BigIntVal"], - ["HLL_UPDATE_FLOAT", "hll_updateIN8palo_udf8FloatVal"], - ["HLL_UPDATE_DOUBLE", "hll_updateIN8palo_udf9DoubleVal"], - ["HLL_UPDATE_STRING", "hll_updateIN8palo_udf9StringVal"], - ["HLL_UPDATE_TIMESTAMP", "hll_updateIN8palo_udf11DateTimeVal"], - ["HLL_UPDATE_DECIMAL", "hll_updateIN8palo_udf10DecimalVal"], + ["HLL_UPDATE_BOOLEAN", "hll_updateIN8doris_udf10BooleanVal"], + ["HLL_UPDATE_TINYINT", "hll_updateIN8doris_udf10TinyIntVal"], + ["HLL_UPDATE_SMALLINT", "hll_updateIN8doris_udf11SmallIntVal"], + ["HLL_UPDATE_INT", "hll_updateIN8doris_udf6IntVal"], + ["HLL_UPDATE_BIGINT", "hll_updateIN8doris_udf9BigIntVal"], + ["HLL_UPDATE_FLOAT", "hll_updateIN8doris_udf8FloatVal"], + ["HLL_UPDATE_DOUBLE", "hll_updateIN8doris_udf9DoubleVal"], + ["HLL_UPDATE_STRING", "hll_updateIN8doris_udf9StringVal"], + ["HLL_UPDATE_TIMESTAMP", "hll_updateIN8doris_udf11DateTimeVal"], + ["HLL_UPDATE_DECIMAL", "hll_updateIN8doris_udf10DecimalVal"], ["HLL_MERGE", "hll_merge"], ["CODEGEN_ANYVAL_DATETIME_VAL_EQ", "datetime_val_eq"], ["CODEGEN_ANYVAL_STRING_VAL_EQ", "string_val_eq"], @@ -114,10 +114,10 @@ // This is a generated file, DO NOT EDIT IT.\n\ // To add new functions, see be/src/codegen/gen_ir_descriptions.py.\n\ \n\ -#ifndef PALO_IR_FUNCTIONS_H\n\ -#define PALO_IR_FUNCTIONS_H\n\ +#ifndef DORIS_IR_FUNCTIONS_H\n\ +#define DORIS_IR_FUNCTIONS_H\n\ \n\ -namespace palo {\n\ +namespace doris {\n\ \n\ class IRFunction {\n\ public:\n\ @@ -152,12 +152,12 @@ class IRFunction {\n\ // This is a generated file, DO NOT EDIT IT.\n\ // To add new functions, see be/src/codegen/gen_ir_descriptions.py.\n\ \n\ -#ifndef PALO_IR_FUNCTION_NAMES_H\n\ -#define PALO_IR_FUNCTION_NAMES_H\n\ +#ifndef DORIS_IR_FUNCTION_NAMES_H\n\ +#define DORIS_IR_FUNCTION_NAMES_H\n\ \n\ -#include "palo_ir/palo_ir_functions.h"\n\ +#include "doris_ir/doris_ir_functions.h"\n\ \n\ -namespace palo {\n\ +namespace doris {\n\ \n\ static struct {\n\ std::string fn_name; \n\ @@ -171,16 +171,16 @@ class IRFunction {\n\ \n\ #endif\n' -BE_PATH = os.environ['DORIS_HOME'] + "/gensrc/build/palo_ir/" +BE_PATH = os.environ['DORIS_HOME'] + "/gensrc/build/doris_ir/" if not os.path.exists(BE_PATH): os.makedirs(BE_PATH) if __name__ == "__main__": print "Generating IR description files" - enums_file = open(BE_PATH + 'palo_ir_functions.h', 'w') + enums_file = open(BE_PATH + 'doris_ir_functions.h', 'w') enums_file.write(enums_preamble) - names_file = open(BE_PATH + 'palo_ir_names.h', 'w') + names_file = open(BE_PATH + 'doris_ir_names.h', 'w') names_file.write(names_preamble) idx = 0 diff --git a/be/src/codegen/llvm_codegen.cpp b/be/src/codegen/llvm_codegen.cpp index ea60e608201803..d20637304a3a8c 100644 --- a/be/src/codegen/llvm_codegen.cpp +++ b/be/src/codegen/llvm_codegen.cpp @@ -45,8 +45,8 @@ #include "common/logging.h" #include "codegen/subexpr_elimination.h" -#include "codegen/palo_ir_data.h" -#include "palo_ir/palo_ir_names.h" +#include "codegen/doris_ir_data.h" +#include "doris_ir/doris_ir_names.h" #include "util/cpu_info.h" #include "util/path_builder.h" @@ -58,7 +58,7 @@ using llvm::PassManagerBuilder; using llvm::DataLayout; using llvm::FunctionPassManager; -namespace palo { +namespace doris { static std::mutex s_llvm_initialization_lock; static bool s_llvm_initialized = false; @@ -172,7 +172,7 @@ Status LlvmCodeGen::load_module_from_memory( return Status::OK; } -Status LlvmCodeGen::load_palo_ir( +Status LlvmCodeGen::load_doris_ir( ObjectPool* pool, const std::string& id, boost::scoped_ptr* codegen_ret) { @@ -182,13 +182,13 @@ Status LlvmCodeGen::load_palo_ir( llvm::StringRef module_ir; std::string module_name; if (CpuInfo::is_supported(CpuInfo::SSE4_2)) { - module_ir = llvm::StringRef(reinterpret_cast(palo_sse_llvm_ir), - palo_sse_llvm_ir_len); - module_name = "Palo IR with SSE support"; + module_ir = llvm::StringRef(reinterpret_cast(doris_sse_llvm_ir), + doris_sse_llvm_ir_len); + module_name = "Doris IR with SSE support"; } else { - module_ir = llvm::StringRef(reinterpret_cast(palo_no_sse_llvm_ir), - palo_no_sse_llvm_ir_len); - module_name = "Palo IR with no SSE support"; + module_ir = llvm::StringRef(reinterpret_cast(doris_no_sse_llvm_ir), + doris_no_sse_llvm_ir_len); + module_name = "Doris IR with no SSE support"; } boost::scoped_ptr module_ir_buf( llvm::MemoryBuffer::getMemBuffer(module_ir, "", false)); @@ -449,7 +449,7 @@ llvm::Function* LlvmCodeGen::get_function(IRFunction::Type function) { // There is an llvm bug (#10957) that causes the first step of the verifier to always // abort the process if it runs into an issue and ignores ReturnStatusAction. This -// would cause Palo to go down if one query has a problem. +// would cause Doris to go down if one query has a problem. // To work around this, we will copy that step here and not abort on error. // TODO: doesn't seem there is much traction in getting this fixed but we'll see bool LlvmCodeGen::verify_function(llvm::Function* fn) { diff --git a/be/src/codegen/llvm_codegen.h b/be/src/codegen/llvm_codegen.h index 18e255b262ce4d..ba0b8b6ce74836 100644 --- a/be/src/codegen/llvm_codegen.h +++ b/be/src/codegen/llvm_codegen.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_CODEGEN_LLVM_CODEGEN_H -#define BDG_PALO_BE_SRC_QUERY_CODEGEN_LLVM_CODEGEN_H +#ifndef DORIS_BE_SRC_QUERY_CODEGEN_LLVM_CODEGEN_H +#define DORIS_BE_SRC_QUERY_CODEGEN_LLVM_CODEGEN_H #include #include @@ -37,7 +37,7 @@ #include "runtime/primitive_type.h" #include "exprs/expr.h" #include "util/runtime_profile.h" -#include "palo_ir/palo_ir_functions.h" +#include "doris_ir/doris_ir_functions.h" // Forward declare all llvm classes to avoid namespace pollution. namespace llvm { @@ -64,7 +64,7 @@ template class IRBuilderDefaultInserter; } -namespace palo { +namespace doris { class SubExprElimination; @@ -113,13 +113,13 @@ class LlvmCodeGen { // if 'load_backend', load the backend static object for llvm. This is needed // when libbackend.so is loaded from java. llvm will be default only look in // the current object and not be able to find the backend symbols - // TODO: this can probably be removed after Palo refactor where the java + // TODO: this can probably be removed after Doris refactor where the java // side is not loading the be explicitly anymore. static void initialize_llvm(bool load_backend = false); - // Loads and parses the precompiled palo IR module + // Loads and parses the precompiled doris IR module // codegen will contain the created object on success. - static Status load_palo_ir( + static Status load_doris_ir( ObjectPool*, const std::string& id, boost::scoped_ptr* codegen); // Removes all jit compiled dynamically linked functions from the process. @@ -217,7 +217,7 @@ class LlvmCodeGen { // compiled IR. The types we generate at runtime are unnamed. // The name is generated by the clang compiler in this form: // .::. For example: - // "class.palo::AggregationNode" + // "class.doris::AggregationNode" llvm::Type* get_type(const std::string& name); /// Returns the pointer type of the type returned by GetType(name) @@ -373,7 +373,7 @@ class LlvmCodeGen { llvm::Function* get_lib_c_function(FnPrototype* prototype); // Returns the cross compiled function. IRFunction::Type is an enum which is - // defined in 'palo-ir/palo-ir-functions.h' + // defined in 'doris-ir/doris-ir-functions.h' llvm::Function* get_function(IRFunction::Type); // Returns the hash function with signature: @@ -524,7 +524,7 @@ class LlvmCodeGen { static Status load_module_from_memory(LlvmCodeGen* codegen, llvm::MemoryBuffer* module_ir, const std::string& module_name, llvm::Module** module); - // Load the intrinsics palo needs. This is a one time initialization. + // Load the intrinsics doris needs. This is a one time initialization. // Values are stored in '_llvm_intrinsics' Status load_intrinsics(); @@ -582,14 +582,14 @@ class LlvmCodeGen { boost::mutex _jitted_functions_lock; // Keeps track of the external functions that have been included in this module - // e.g libc functions or non-jitted palo functions. + // e.g libc functions or non-jitted doris functions. // TODO: this should probably be FnPrototype->Functions mapping std::map _external_functions; - // Functions parsed from pre-compiled module. Indexed by PaloIR::Function enum + // Functions parsed from pre-compiled module. Indexed by DorisIR::Function enum std::vector _loaded_functions; - // Stores functions codegen'd by palo. This does not contain cross compiled + // Stores functions codegen'd by doris. This does not contain cross compiled // functions, only function that were generated at runtime. Does not overlap // with _loaded_functions. std::vector _codegend_functions; diff --git a/be/src/codegen/llvm_codegen_test.cpp b/be/src/codegen/llvm_codegen_test.cpp index a2944a863844ce..540f14fb6f195b 100644 --- a/be/src/codegen/llvm_codegen_test.cpp +++ b/be/src/codegen/llvm_codegen_test.cpp @@ -31,7 +31,7 @@ using namespace std; using namespace boost; using namespace llvm; -namespace palo { +namespace doris { class LlvmCodeGenTest : public testing::Test { private: @@ -288,7 +288,7 @@ TEST_F(LlvmCodeGenTest, StringValue) { ObjectPool pool; scoped_ptr codegen; - Status status = LlvmCodeGen::load_palo_ir(&pool, &codegen); + Status status = LlvmCodeGen::load_doris_ir(&pool, &codegen); EXPECT_TRUE(status.ok()); EXPECT_TRUE(codegen.get() != NULL); @@ -330,7 +330,7 @@ TEST_F(LlvmCodeGenTest, MemcpyTest) { ObjectPool pool; scoped_ptr codegen; - Status status = LlvmCodeGen::load_palo_ir(&pool, &codegen); + Status status = LlvmCodeGen::load_doris_ir(&pool, &codegen); ASSERT_TRUE(status.ok()); ASSERT_TRUE(codegen.get() != NULL); @@ -372,7 +372,7 @@ TEST_F(LlvmCodeGenTest, HashTest) { const char* data2 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; scoped_ptr codegen; - Status status = LlvmCodeGen::load_palo_ir(&pool, &codegen); + Status status = LlvmCodeGen::load_doris_ir(&pool, &codegen); ASSERT_TRUE(status.ok()); ASSERT_TRUE(codegen.get() != NULL); @@ -445,11 +445,11 @@ TEST_F(LlvmCodeGenTest, HashTest) { } int main(int argc, char** argv) { - palo::CpuInfo::Init(); - palo::DiskInfo::Init(); - palo::MemInfo::Init(); + doris::CpuInfo::Init(); + doris::DiskInfo::Init(); + doris::MemInfo::Init(); ::testing::InitGoogleTest(&argc, argv); - palo::LlvmCodeGen::initialize_llvm(); + doris::LlvmCodeGen::initialize_llvm(); return RUN_ALL_TESTS(); } diff --git a/be/src/codegen/subexpr_elimination.cpp b/be/src/codegen/subexpr_elimination.cpp index df24a270cc806c..c8f4c32427ff71 100644 --- a/be/src/codegen/subexpr_elimination.cpp +++ b/be/src/codegen/subexpr_elimination.cpp @@ -39,7 +39,7 @@ #include "common/logging.h" #include "codegen/subexpr_elimination.h" -#include "palo_ir/palo_ir_names.h" +#include "doris_ir/doris_ir_names.h" #include "util/cpu_info.h" #include "util/path_builder.h" @@ -51,7 +51,7 @@ using llvm::StoreInst; using llvm::Function; using llvm::Value; using llvm::DominatorTree; -namespace palo { +namespace doris { SubExprElimination::SubExprElimination(LlvmCodeGen* codegen) : _codegen(codegen) { } diff --git a/be/src/codegen/subexpr_elimination.h b/be/src/codegen/subexpr_elimination.h index 49b5cfc81400b1..965aae9351831e 100644 --- a/be/src/codegen/subexpr_elimination.h +++ b/be/src/codegen/subexpr_elimination.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_CODEGEN_SUBEXPR_ELIMINATION_H -#define BDG_PALO_BE_SRC_QUERY_CODEGEN_SUBEXPR_ELIMINATION_H +#ifndef DORIS_BE_SRC_QUERY_CODEGEN_SUBEXPR_ELIMINATION_H +#define DORIS_BE_SRC_QUERY_CODEGEN_SUBEXPR_ELIMINATION_H #include "common/status.h" #include "codegen/llvm_codegen.h" -namespace palo { +namespace doris { // Optimization pass to remove redundant exprs. // TODO: make this into a llvm function pass (i.e. implement FunctionPass interface). diff --git a/be/src/common/atomic.h b/be/src/common/atomic.h index 66230fbbb46256..d1bb581568d01a 100644 --- a/be/src/common/atomic.h +++ b/be/src/common/atomic.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_ATOMIC_H -#define BDG_PALO_BE_SRC_COMMON_ATOMIC_H +#ifndef DORIS_BE_SRC_COMMON_ATOMIC_H +#define DORIS_BE_SRC_COMMON_ATOMIC_H #include @@ -24,7 +24,7 @@ #include "gutil/atomicops.h" #include "gutil/macros.h" -namespace palo { +namespace doris { class AtomicUtil { public: @@ -201,6 +201,6 @@ class AtomicPtr { AtomicInt _ptr; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_COMMON_ATOMIC_H +#endif // DORIS_BE_SRC_COMMON_ATOMIC_H diff --git a/be/src/common/compiler_util.h b/be/src/common/compiler_util.h index b0b217be0a99c6..e9e9e90486f509 100644 --- a/be/src/common/compiler_util.h +++ b/be/src/common/compiler_util.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_COMMON_COMPILER_UTIL_H -#define BDG_PALO_BE_SRC_COMMON_COMMON_COMPILER_UTIL_H +#ifndef DORIS_BE_SRC_COMMON_COMMON_COMPILER_UTIL_H +#define DORIS_BE_SRC_COMMON_COMMON_COMPILER_UTIL_H // Compiler hint that this branch is likely or unlikely to // be taken. Take from the "What all programmers should know diff --git a/be/src/common/config.h b/be/src/common/config.h index 4df76c11ffcb5f..9288635f10b74a 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_CONFIG_H -#define BDG_PALO_BE_SRC_COMMON_CONFIG_H +#ifndef DORIS_BE_SRC_COMMON_CONFIG_H +#define DORIS_BE_SRC_COMMON_CONFIG_H #include "configbase.h" -namespace palo { +namespace doris { namespace config { // cluster id CONF_Int32(cluster_id, "-1"); @@ -139,16 +139,16 @@ namespace config { CONF_Int64(web_log_bytes, "1048576"); // number of threads available to serve backend execution requests CONF_Int32(be_service_threads, "64"); - // key=value pair of default query options for Palo, separated by ',' + // key=value pair of default query options for Doris, separated by ',' CONF_String(default_query_options, ""); - // If non-zero, Palo will output memory usage every log_mem_usage_interval'th fragment completion. + // If non-zero, Doris will output memory usage every log_mem_usage_interval'th fragment completion. CONF_Int32(log_mem_usage_interval, "0"); // if non-empty, enable heap profiling and output to specified directory. CONF_String(heap_profile_dir, ""); - // cgroups allocated for palo - CONF_String(palo_cgroups, ""); + // cgroups allocated for doris + CONF_String(doris_cgroups, ""); // Controls the number of threads to run work per core. It's common to pick 2x // or 3x the number of cores. This keeps the cores busy without causing excessive @@ -163,27 +163,27 @@ namespace config { // Local directory to copy UDF libraries from HDFS into CONF_String(local_library_dir, "${UDF_RUNTIME_DIR}"); // number of olap scanner thread pool size - CONF_Int32(palo_scanner_thread_pool_thread_num, "48"); + CONF_Int32(doris_scanner_thread_pool_thread_num, "48"); // number of olap scanner thread pool size - CONF_Int32(palo_scanner_thread_pool_queue_size, "102400"); + CONF_Int32(doris_scanner_thread_pool_queue_size, "102400"); // number of etl thread pool size CONF_Int32(etl_thread_pool_size, "8"); // number of etl thread pool size CONF_Int32(etl_thread_pool_queue_size, "256"); - // port on which to run Palo test backend + // port on which to run Doris test backend CONF_Int32(port, "20001"); // default thrift client connect timeout(in seconds) CONF_Int32(thrift_connect_timeout_seconds, "3"); // max row count number for single scan range - CONF_Int32(palo_scan_range_row_count, "524288"); + CONF_Int32(doris_scan_range_row_count, "524288"); // size of scanner queue between scanner thread and compute thread - CONF_Int32(palo_scanner_queue_size, "1024"); + CONF_Int32(doris_scanner_queue_size, "1024"); // single read execute fragment row size - CONF_Int32(palo_scanner_row_num, "16384"); + CONF_Int32(doris_scanner_row_num, "16384"); // number of max scan keys - CONF_Int32(palo_max_scan_key_num, "1024"); + CONF_Int32(doris_max_scan_key_num, "1024"); // return_row / total_row - CONF_Int32(palo_max_pushdown_conjuncts_return_rate, "90"); + CONF_Int32(doris_max_pushdown_conjuncts_return_rate, "90"); // (Advanced) Maximum size of per-query receive-side buffer CONF_Int32(exchg_node_buffer_size_bytes, "10485760"); // insert sort threadhold for sorter @@ -387,6 +387,6 @@ namespace config { CONF_Bool(force_recovery, "false"); } // namespace config -} // namespace palo +} // namespace doris -#endif // BDG_PALO_BE_SRC_COMMON_CONFIG_H +#endif // DORIS_BE_SRC_COMMON_CONFIG_H diff --git a/be/src/common/configbase.cpp b/be/src/common/configbase.cpp index 8807d2f4be0602..3637e808b9bbd7 100644 --- a/be/src/common/configbase.cpp +++ b/be/src/common/configbase.cpp @@ -26,7 +26,7 @@ #include "common/config.h" #undef __IN_CONFIGBASE_CPP__ -namespace palo { +namespace doris { namespace config { std::list* Register::_s_fieldlist = NULL; @@ -272,4 +272,4 @@ bool init(const char* filename, bool fillconfmap) { } } // namespace config -} // namespace palo +} // namespace doris diff --git a/be/src/common/configbase.h b/be/src/common/configbase.h index 1b6b885e78bbaf..4d40461c153e35 100644 --- a/be/src/common/configbase.h +++ b/be/src/common/configbase.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_CONFIGBASE_H -#define BDG_PALO_BE_SRC_COMMON_CONFIGBASE_H +#ifndef DORIS_BE_SRC_COMMON_CONFIGBASE_H +#define DORIS_BE_SRC_COMMON_CONFIGBASE_H #include #include #include #include -namespace palo { +namespace doris { namespace config { class Register { @@ -120,6 +120,6 @@ extern std::map* confmap; bool init(const char* filename, bool fillconfmap = false); } // namespace config -} // namespace palo +} // namespace doris -#endif // BDG_PALO_BE_SRC_COMMON_CONFIGBASE_H +#endif // DORIS_BE_SRC_COMMON_CONFIGBASE_H diff --git a/be/src/common/daemon.cpp b/be/src/common/daemon.cpp index 41b3fe8fff07d3..fa5aaa6b4b0f28 100644 --- a/be/src/common/daemon.cpp +++ b/be/src/common/daemon.cpp @@ -28,7 +28,7 @@ #include "util/mem_info.h" #include "util/network_util.h" #include "util/thrift_util.h" -#include "util/palo_metrics.h" +#include "util/doris_metrics.h" #include "runtime/bufferpool/buffer_pool.h" #include "runtime/exec_env.h" #include "runtime/mem_tracker.h" @@ -50,9 +50,9 @@ #include "exprs/hll_hash_function.h" #include "olap/options.h" -namespace palo { +namespace doris { -bool k_palo_exit = false; +bool k_doris_exit = false; void* tcmalloc_gc_thread(void* dummy) { while (1) { @@ -105,7 +105,7 @@ void* memory_maintenance_thread(void* dummy) { return NULL; } -static void init_palo_metrics(const std::vector& store_paths) { +static void init_doris_metrics(const std::vector& store_paths) { bool init_system_metrics = config::enable_system_metrics; std::set disk_devices; std::vector network_interfaces; @@ -125,12 +125,12 @@ static void init_palo_metrics(const std::vector& store_paths) { return; } } - PaloMetrics::instance()->initialize( - "palo_be", init_system_metrics, disk_devices, network_interfaces); + DorisMetrics::instance()->initialize( + "doris_be", init_system_metrics, disk_devices, network_interfaces); } void sigterm_handler(int signo) { - k_palo_exit = true; + k_doris_exit = true; } int install_signal(int signo, void(*handler)(int)) { @@ -197,7 +197,7 @@ void init_daemon(int argc, char** argv, const std::vector& paths) { LOG(INFO) << CpuInfo::debug_string(); LOG(INFO) << DiskInfo::debug_string(); LOG(INFO) << MemInfo::debug_string(); - init_palo_metrics(paths); + init_doris_metrics(paths); init_signals(); } diff --git a/be/src/common/daemon.h b/be/src/common/daemon.h index da5520f27ed682..4215541db57dbd 100644 --- a/be/src/common/daemon.h +++ b/be/src/common/daemon.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_COMMON_DAEMON_H -#define BDG_PALO_BE_SRC_COMMON_COMMON_DAEMON_H +#ifndef DORIS_BE_SRC_COMMON_COMMON_DAEMON_H +#define DORIS_BE_SRC_COMMON_COMMON_DAEMON_H #include -namespace palo { +namespace doris { class StorePath; diff --git a/be/src/common/global_types.h b/be/src/common/global_types.h index 14919ebf6753a8..ebe2815d3d3048 100644 --- a/be/src/common/global_types.h +++ b/be/src/common/global_types.h @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_COMMON_GLOBAL_TYPES_H -#define BDG_PALO_BE_SRC_COMMON_COMMON_GLOBAL_TYPES_H +#ifndef DORIS_BE_SRC_COMMON_COMMON_GLOBAL_TYPES_H +#define DORIS_BE_SRC_COMMON_COMMON_GLOBAL_TYPES_H -namespace palo { +namespace doris { // for now, these are simply ints; if we find we need to generate ids in the // backend, we can also introduce separate classes for these to make them diff --git a/be/src/common/hdfs.h b/be/src/common/hdfs.h index 7f390a7e7026e0..f87d0be62dc760 100644 --- a/be/src/common/hdfs.h +++ b/be/src/common/hdfs.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_COMMON_HDFS_H -#define BDG_PALO_BE_SRC_COMMON_COMMON_HDFS_H +#ifndef DORIS_BE_SRC_COMMON_COMMON_HDFS_H +#define DORIS_BE_SRC_COMMON_COMMON_HDFS_H // This is a wrapper around the hdfs header. When we are compiling to IR, // we don't want to pull in the hdfs headers. We only need the headers diff --git a/be/src/common/logconfig.cpp b/be/src/common/logconfig.cpp index c62b45a6d2754c..c2c6e0bbef7784 100644 --- a/be/src/common/logconfig.cpp +++ b/be/src/common/logconfig.cpp @@ -24,7 +24,7 @@ #include #include "common/config.h" -namespace palo { +namespace doris { static bool logging_initialized = false; @@ -147,4 +147,4 @@ void shutdown_logging() { google::ShutdownGoogleLogging(); } -} // namespace palo +} // namespace doris diff --git a/be/src/common/object_pool.h b/be/src/common/object_pool.h index 9bb387b174e141..98fff35d6caaa4 100644 --- a/be/src/common/object_pool.h +++ b/be/src/common/object_pool.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_COMMON_OBJECT_POOL_H -#define BDG_PALO_BE_SRC_COMMON_COMMON_OBJECT_POOL_H +#ifndef DORIS_BE_SRC_COMMON_COMMON_OBJECT_POOL_H +#define DORIS_BE_SRC_COMMON_COMMON_OBJECT_POOL_H #include #include @@ -24,7 +24,7 @@ #include "util/spinlock.h" -namespace palo { +namespace doris { // An ObjectPool maintains a list of C++ objects which are deallocated // by destroying the pool. diff --git a/be/src/common/resource_tls.cpp b/be/src/common/resource_tls.cpp index 1afb29fcbdb9ab..ddf916df324b46 100644 --- a/be/src/common/resource_tls.cpp +++ b/be/src/common/resource_tls.cpp @@ -22,7 +22,7 @@ #include "common/logging.h" #include "gen_cpp/Types_types.h" -namespace palo { +namespace doris { static pthread_key_t s_resource_key; static bool s_is_init = false; diff --git a/be/src/common/resource_tls.h b/be/src/common/resource_tls.h index 36042a781212db..0a51f4afd0ac32 100644 --- a/be/src/common/resource_tls.h +++ b/be/src/common/resource_tls.h @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_COMMON_RESOURCE_TLS_H -#define BDG_PALO_BE_SRC_COMMON_COMMON_RESOURCE_TLS_H +#ifndef DORIS_BE_SRC_COMMON_COMMON_RESOURCE_TLS_H +#define DORIS_BE_SRC_COMMON_COMMON_RESOURCE_TLS_H -namespace palo { +namespace doris { class TResourceInfo; class ResourceTls { diff --git a/be/src/common/status.cpp b/be/src/common/status.cpp index 13fd82e5e0b87e..33bf2a5ff70798 100644 --- a/be/src/common/status.cpp +++ b/be/src/common/status.cpp @@ -22,7 +22,7 @@ #include "common/logging.h" #include "util/debug_util.h" -namespace palo { +namespace doris { // NOTE: this is statically initialized and we must be very careful what // functions these constructors call. In particular, we cannot call diff --git a/be/src/common/status.h b/be/src/common/status.h index bb312061944efa..ff8c1628e03962 100644 --- a/be/src/common/status.h +++ b/be/src/common/status.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_COMMON_STATUS_H -#define BDG_PALO_BE_SRC_COMMON_COMMON_STATUS_H +#ifndef DORIS_BE_SRC_COMMON_COMMON_STATUS_H +#define DORIS_BE_SRC_COMMON_COMMON_STATUS_H #include #include @@ -26,7 +26,7 @@ #include "gen_cpp/Status_types.h" // for TStatus #include "gen_cpp/status.pb.h" // for PStatus -namespace palo { +namespace doris { // Status is used as a function return type to indicate success, failure or cancellation // of the function. In case of successful completion, it only occupies sizeof(void*) diff --git a/be/src/exec/aggregation_node.cpp b/be/src/exec/aggregation_node.cpp index 016136c9c7d0ba..214a41712ebdc7 100644 --- a/be/src/exec/aggregation_node.cpp +++ b/be/src/exec/aggregation_node.cpp @@ -50,9 +50,9 @@ using llvm::Type; using llvm::Value; using llvm::StructType; -namespace palo { +namespace doris { -const char* AggregationNode::_s_llvm_class_name = "class.palo::AggregationNode"; +const char* AggregationNode::_s_llvm_class_name = "class.doris::AggregationNode"; // TODO: pass in maximum size; enforce by setting limit in mempool // TODO: have a Status ExecNode::init(const TPlanNode&) member function @@ -513,12 +513,12 @@ static IRFunction::Type get_hll_update_function2(const TypeDescriptor& type) { // void update_slot(FunctionContext* fn_ctx, AggTuple* agg_tuple, char** row) // // The IR for sum(double_col) is: -// define void @update_slot(%"class.palo_udf::FunctionContext"* %fn_ctx, +// define void @update_slot(%"class.doris_udf::FunctionContext"* %fn_ctx, // { i8, double }* %agg_tuple, -// %"class.palo::TupleRow"* %row) #20 { +// %"class.doris::TupleRow"* %row) #20 { // entry: -// %src = call { i8, double } @GetSlotRef(%"class.palo::ExprContext"* inttoptr -// (i64 128241264 to %"class.palo::ExprContext"*), %"class.palo::TupleRow"* %row) +// %src = call { i8, double } @GetSlotRef(%"class.doris::ExprContext"* inttoptr +// (i64 128241264 to %"class.doris::ExprContext"*), %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, double } %src, 0 // %is_null = trunc i8 %0 to i1 // br i1 %is_null, label %ret, label %src_not_null @@ -537,12 +537,12 @@ static IRFunction::Type get_hll_update_function2(const TypeDescriptor& type) { // } // // The IR for min(double_col) is: -// define void @update_slot(%"class.palo_udf::FunctionContext"* %fn_ctx, +// define void @update_slot(%"class.doris_udf::FunctionContext"* %fn_ctx, // { i8, double }* %agg_tuple, -// %"class.palo::TupleRow"* %row) #20 { +// %"class.doris::TupleRow"* %row) #20 { // entry: -// %src = call { i8, double } @GetSlotRef(%"class.palo::ExprContext"* inttoptr -// (i64 128241264 to %"class.palo::ExprContext"*), %"class.palo::TupleRow"* %row) +// %src = call { i8, double } @GetSlotRef(%"class.doris::ExprContext"* inttoptr +// (i64 128241264 to %"class.doris::ExprContext"*), %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, double } %src, 0 // %is_null = trunc i8 %0 to i1 // br i1 %is_null, label %ret, label %src_not_null @@ -571,29 +571,29 @@ static IRFunction::Type get_hll_update_function2(const TypeDescriptor& type) { // ret void // } // The IR for ndv(double_col) is: -// define void @update_slot(%"class.palo_udf::FunctionContext"* %fn_ctx, -// { i8, %"struct.palo::StringValue" }* %agg_tuple, -// %"class.palo::TupleRow"* %row) #20 { +// define void @update_slot(%"class.doris_udf::FunctionContext"* %fn_ctx, +// { i8, %"struct.doris::StringValue" }* %agg_tuple, +// %"class.doris::TupleRow"* %row) #20 { // entry: // %dst_lowered_ptr = alloca { i64, i8* } // %src_lowered_ptr = alloca { i8, double } -// %src = call { i8, double } @GetSlotRef(%"class.palo::ExprContext"* inttoptr -// (i64 120530832 to %"class.palo::ExprContext"*), %"class.palo::TupleRow"* %row) +// %src = call { i8, double } @GetSlotRef(%"class.doris::ExprContext"* inttoptr +// (i64 120530832 to %"class.doris::ExprContext"*), %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, double } %src, 0 // %is_null = trunc i8 %0 to i1 // br i1 %is_null, label %ret, label %src_not_null // // src_not_null: ; preds = %entry // %dst_slot_ptr = getelementptr inbounds -// { i8, %"struct.palo::StringValue" }* %agg_tuple, i32 0, i32 1 -// call void @SetNotNull({ i8, %"struct.palo::StringValue" }* %agg_tuple) -// %dst_val = load %"struct.palo::StringValue"* %dst_slot_ptr +// { i8, %"struct.doris::StringValue" }* %agg_tuple, i32 0, i32 1 +// call void @SetNotNull({ i8, %"struct.doris::StringValue" }* %agg_tuple) +// %dst_val = load %"struct.doris::StringValue"* %dst_slot_ptr // store { i8, double } %src, { i8, double }* %src_lowered_ptr // %src_unlowered_ptr = bitcast { i8, double }* %src_lowered_ptr -// to %"struct.palo_udf::DoubleVal"* -// %ptr = extractvalue %"struct.palo::StringValue" %dst_val, 0 +// to %"struct.doris_udf::DoubleVal"* +// %ptr = extractvalue %"struct.doris::StringValue" %dst_val, 0 // %dst_stringval = insertvalue { i64, i8* } zeroinitializer, i8* %ptr, 1 -// %len = extractvalue %"struct.palo::StringValue" %dst_val, 1 +// %len = extractvalue %"struct.doris::StringValue" %dst_val, 1 // %1 = extractvalue { i64, i8* } %dst_stringval, 0 // %2 = zext i32 %len to i64 // %3 = shl i64 %2, 32 @@ -602,18 +602,18 @@ static IRFunction::Type get_hll_update_function2(const TypeDescriptor& type) { // %dst_stringval1 = insertvalue { i64, i8* } %dst_stringval, i64 %5, 0 // store { i64, i8* } %dst_stringval1, { i64, i8* }* %dst_lowered_ptr // %dst_unlowered_ptr = bitcast { i64, i8* }* %dst_lowered_ptr -// to %"struct.palo_udf::StringVal"* -// call void @HllUpdate(%"class.palo_udf::FunctionContext"* %fn_ctx, -// %"struct.palo_udf::DoubleVal"* %src_unlowered_ptr, -// %"struct.palo_udf::StringVal"* %dst_unlowered_ptr) +// to %"struct.doris_udf::StringVal"* +// call void @HllUpdate(%"class.doris_udf::FunctionContext"* %fn_ctx, +// %"struct.doris_udf::DoubleVal"* %src_unlowered_ptr, +// %"struct.doris_udf::StringVal"* %dst_unlowered_ptr) // %anyval_result = load { i64, i8* }* %dst_lowered_ptr // %6 = extractvalue { i64, i8* } %anyval_result, 1 -// %7 = insertvalue %"struct.palo::StringValue" zeroinitializer, i8* %6, 0 +// %7 = insertvalue %"struct.doris::StringValue" zeroinitializer, i8* %6, 0 // %8 = extractvalue { i64, i8* } %anyval_result, 0 // %9 = ashr i64 %8, 32 // %10 = trunc i64 %9 to i32 -// %11 = insertvalue %"struct.palo::StringValue" %7, i32 %10, 1 -// store %"struct.palo::StringValue" %11, %"struct.palo::StringValue"* %dst_slot_ptr +// %11 = insertvalue %"struct.doris::StringValue" %7, i32 %10, 1 +// store %"struct.doris::StringValue" %11, %"struct.doris::StringValue"* %dst_slot_ptr // br label %ret // // ret: ; preds = %src_not_null, %entry @@ -811,23 +811,23 @@ llvm::Function* AggregationNode::codegen_update_slot( // For the query: // select count(*), count(int_col), sum(double_col) the IR looks like: // -// define void @update_tuple(%"class.palo::AggregationNode"* %this_ptr, -// %"class.palo::Tuple"* %agg_tuple, -// %"class.palo::TupleRow"* %tuple_row) #20 { +// define void @update_tuple(%"class.doris::AggregationNode"* %this_ptr, +// %"class.doris::Tuple"* %agg_tuple, +// %"class.doris::TupleRow"* %tuple_row) #20 { // entry: -// %tuple = bitcast %"class.palo::Tuple"* %agg_tuple to { i8, i64, i64, double }* +// %tuple = bitcast %"class.doris::Tuple"* %agg_tuple to { i8, i64, i64, double }* // %src_slot = getelementptr inbounds { i8, i64, i64, double }* %tuple, i32 0, i32 1 // %count_star_val = load i64* %src_slot // %count_star_inc = add i64 %count_star_val, 1 // store i64 %count_star_inc, i64* %src_slot -// call void @update_slot(%"class.palo_udf::FunctionContext"* inttoptr -// (i64 44521296 to %"class.palo_udf::FunctionContext"*), +// call void @update_slot(%"class.doris_udf::FunctionContext"* inttoptr +// (i64 44521296 to %"class.doris_udf::FunctionContext"*), // { i8, i64, i64, double }* %tuple, -// %"class.palo::TupleRow"* %tuple_row) -// call void @UpdateSlot5(%"class.palo_udf::FunctionContext"* inttoptr -// (i64 44521328 to %"class.palo_udf::FunctionContext"*), +// %"class.doris::TupleRow"* %tuple_row) +// call void @UpdateSlot5(%"class.doris_udf::FunctionContext"* inttoptr +// (i64 44521328 to %"class.doris_udf::FunctionContext"*), // { i8, i64, i64, double }* %tuple, -// %"class.palo::TupleRow"* %tuple_row) +// %"class.doris::TupleRow"* %tuple_row) // ret void // } Function* AggregationNode::codegen_update_tuple(RuntimeState* state) { diff --git a/be/src/exec/aggregation_node.h b/be/src/exec/aggregation_node.h index 470221be935144..9100739221075c 100644 --- a/be/src/exec/aggregation_node.h +++ b/be/src/exec/aggregation_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_AGGREGATION_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_AGGREGATION_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_AGGREGATION_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_AGGREGATION_NODE_H #include #include @@ -32,7 +32,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class AggFnEvaluator; class LlvmCodeGen; @@ -77,7 +77,7 @@ class AggregationNode : public ExecNode { std::vector _aggregate_evaluators; /// FunctionContext for each agg fn and backing pool. - std::vector _agg_fn_ctxs; + std::vector _agg_fn_ctxs; boost::scoped_ptr _agg_fn_pool; // Exprs used to evaluate input rows diff --git a/be/src/exec/aggregation_node_ir.cpp b/be/src/exec/aggregation_node_ir.cpp index ecc21dd0b58c71..4ce5cf37e40b85 100644 --- a/be/src/exec/aggregation_node_ir.cpp +++ b/be/src/exec/aggregation_node_ir.cpp @@ -23,7 +23,7 @@ #include "runtime/tuple.h" #include "runtime/tuple_row.h" -namespace palo { +namespace doris { void AggregationNode::process_row_batch_no_grouping(RowBatch* batch, MemPool* pool) { for (int i = 0; i < batch->num_rows(); ++i) { diff --git a/be/src/exec/analytic_eval_node.cpp b/be/src/exec/analytic_eval_node.cpp index f2d73747f0c7c1..b807152fcdca66 100644 --- a/be/src/exec/analytic_eval_node.cpp +++ b/be/src/exec/analytic_eval_node.cpp @@ -28,9 +28,9 @@ static const int MAX_TUPLE_POOL_SIZE = 8 * 1024 * 1024; // 8MB -namespace palo { +namespace doris { -using palo_udf::BigIntVal; +using doris_udf::BigIntVal; AnalyticEvalNode::AnalyticEvalNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : @@ -157,7 +157,7 @@ Status AnalyticEvalNode::prepare(RuntimeState* state) { DCHECK_EQ(_result_tuple_desc->slots().size(), _evaluators.size()); for (int i = 0; i < _evaluators.size(); ++i) { - palo_udf::FunctionContext* ctx; + doris_udf::FunctionContext* ctx; RETURN_IF_ERROR(_evaluators[i]->prepare(state, child(0)->row_desc(), _mem_pool.get(), _intermediate_tuple_desc->slots()[i], _result_tuple_desc->slots()[i], mem_tracker(), &ctx)); @@ -583,7 +583,7 @@ inline void AnalyticEvalNode::init_next_partition(int64_t stream_idx) { inline bool AnalyticEvalNode::prev_row_compare(ExprContext* pred_ctx) { DCHECK(pred_ctx != NULL); - palo_udf::BooleanVal result = pred_ctx->get_boolean_val(_child_tuple_cmp_row); + doris_udf::BooleanVal result = pred_ctx->get_boolean_val(_child_tuple_cmp_row); DCHECK(!result.is_null); return result.val; diff --git a/be/src/exec/analytic_eval_node.h b/be/src/exec/analytic_eval_node.h index f4b2fd3866dc06..882b3d391cc97e 100644 --- a/be/src/exec/analytic_eval_node.h +++ b/be/src/exec/analytic_eval_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef INF_PALO_BE_SRC_EXEC_ANALYTIC_EVAL_NODE_H -#define INF_PALO_BE_SRC_EXEC_ANALYTIC_EVAL_NODE_H +#ifndef INF_DORIS_BE_SRC_EXEC_ANALYTIC_EVAL_NODE_H +#define INF_DORIS_BE_SRC_EXEC_ANALYTIC_EVAL_NODE_H #include "exec/exec_node.h" #include "exprs/expr.h" @@ -26,7 +26,7 @@ #include "runtime/tuple.h" #include "thrift/protocol/TDebugProtocol.h" -namespace palo { +namespace doris { class AggFnEvaluator; @@ -234,7 +234,7 @@ class AnalyticEvalNode : public ExecNode { // FunctionContext for each analytic function. String data returned by the analytic // functions is allocated via these contexts. - std::vector _fn_ctxs; + std::vector _fn_ctxs; // Queue of tuples which are ready to be set in output rows, with the index into // the _input_stream stream of the last TupleRow that gets the Tuple. Pairs are diff --git a/be/src/exec/blocking_join_node.cpp b/be/src/exec/blocking_join_node.cpp index 94bf40c48bf56e..1b406b05f28bd4 100644 --- a/be/src/exec/blocking_join_node.cpp +++ b/be/src/exec/blocking_join_node.cpp @@ -26,9 +26,9 @@ #include "util/runtime_profile.h" #include "gen_cpp/PlanNodes_types.h" -namespace palo { +namespace doris { -const char* BlockingJoinNode::LLVM_CLASS_NAME = "class.palo::BlockingJoinNode"; +const char* BlockingJoinNode::LLVM_CLASS_NAME = "class.doris::BlockingJoinNode"; BlockingJoinNode::BlockingJoinNode(const std::string& node_name, const TJoinOp::type join_op, diff --git a/be/src/exec/blocking_join_node.h b/be/src/exec/blocking_join_node.h index 336c5a6c437cf6..e1595c505d1c54 100644 --- a/be/src/exec/blocking_join_node.h +++ b/be/src/exec/blocking_join_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_BLOCKING_JOIN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_BLOCKING_JOIN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_BLOCKING_JOIN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_BLOCKING_JOIN_NODE_H #include #include @@ -25,7 +25,7 @@ #include "exec/exec_node.h" #include "gen_cpp/PlanNodes_types.h" -namespace palo { +namespace doris { class MemPool; class RowBatch; diff --git a/be/src/exec/broker_reader.cpp b/be/src/exec/broker_reader.cpp index 5b61987b706f5b..8b389d5a95f7a3 100644 --- a/be/src/exec/broker_reader.cpp +++ b/be/src/exec/broker_reader.cpp @@ -27,7 +27,7 @@ #include "runtime/exec_env.h" #include "util/thrift_util.h" -namespace palo { +namespace doris { // Broker @@ -58,7 +58,7 @@ inline BrokerServiceClientCache* client_cache(ExecEnv* env) { } inline const std::string& client_id(ExecEnv* env, const TNetworkAddress& addr) { - static std::string s_client_id = "palo_unit_test"; + static std::string s_client_id = "doris_unit_test"; return s_client_id; } #else diff --git a/be/src/exec/broker_reader.h b/be/src/exec/broker_reader.h index ae176a02446429..0300026d3bca7e 100644 --- a/be/src/exec/broker_reader.h +++ b/be/src/exec/broker_reader.h @@ -27,7 +27,7 @@ #include "gen_cpp/Types_types.h" #include "gen_cpp/PaloBrokerService_types.h" -namespace palo { +namespace doris { class ExecEnv; class TBrokerRangeDesc; diff --git a/be/src/exec/broker_scan_node.cpp b/be/src/exec/broker_scan_node.cpp index d37f8f2a619ab8..d6373c4609e82b 100644 --- a/be/src/exec/broker_scan_node.cpp +++ b/be/src/exec/broker_scan_node.cpp @@ -29,7 +29,7 @@ #include "util/debug_util.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { BrokerScanNode::BrokerScanNode( ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : diff --git a/be/src/exec/broker_scan_node.h b/be/src/exec/broker_scan_node.h index 8c113c09f5185a..181a53fab7f0df 100644 --- a/be/src/exec/broker_scan_node.h +++ b/be/src/exec/broker_scan_node.h @@ -29,7 +29,7 @@ #include "exec/scan_node.h" #include "gen_cpp/PaloInternalService_types.h" -namespace palo { +namespace doris { class RuntimeState; class PartRangeKey; diff --git a/be/src/exec/broker_scanner.cpp b/be/src/exec/broker_scanner.cpp index e09c7ac8681ae6..49f335e2f7ad9b 100644 --- a/be/src/exec/broker_scanner.cpp +++ b/be/src/exec/broker_scanner.cpp @@ -35,7 +35,7 @@ #include "exec/broker_reader.h" #include "exec/decompressor.h" -namespace palo { +namespace doris { class Slice { public: diff --git a/be/src/exec/broker_scanner.h b/be/src/exec/broker_scanner.h index 93bb51fcef7e55..0f14c58ec52616 100644 --- a/be/src/exec/broker_scanner.h +++ b/be/src/exec/broker_scanner.h @@ -29,7 +29,7 @@ #include "runtime/mem_pool.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { class Tuple; class SlotDescriptor; @@ -55,7 +55,7 @@ struct BrokerScanCounter { int64_t num_rows_filtered; }; -// Broker scanner convert the data read from broker to palo's tuple. +// Broker scanner convert the data read from broker to doris's tuple. class BrokerScanner { public: BrokerScanner( diff --git a/be/src/exec/broker_writer.cpp b/be/src/exec/broker_writer.cpp index 1c71ad809db652..bc44655dcc45f8 100644 --- a/be/src/exec/broker_writer.cpp +++ b/be/src/exec/broker_writer.cpp @@ -27,7 +27,7 @@ #include "runtime/exec_env.h" #include "util/thrift_util.h" -namespace palo { +namespace doris { BrokerWriter::BrokerWriter( ExecEnv* env, @@ -55,7 +55,7 @@ inline BrokerServiceClientCache* client_cache(ExecEnv* env) { } inline const std::string& client_id(ExecEnv* env, const TNetworkAddress& addr) { - static std::string s_client_id = "palo_unit_test"; + static std::string s_client_id = "doris_unit_test"; return s_client_id; } #else @@ -234,4 +234,4 @@ void BrokerWriter::close() { _is_closed = true; } -} // end namespace palo +} // end namespace doris diff --git a/be/src/exec/broker_writer.h b/be/src/exec/broker_writer.h index 8ae8e378096324..53f029782a9608 100644 --- a/be/src/exec/broker_writer.h +++ b/be/src/exec/broker_writer.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_BROKER_WRITER_H -#define BDG_PALO_BE_SRC_EXEC_BROKER_WRITER_H +#ifndef DORIS_BE_SRC_EXEC_BROKER_WRITER_H +#define DORIS_BE_SRC_EXEC_BROKER_WRITER_H #include @@ -28,7 +28,7 @@ #include "gen_cpp/Types_types.h" #include "gen_cpp/PaloBrokerService_types.h" -namespace palo { +namespace doris { class ExecEnv; class TBrokerRangeDesc; @@ -64,6 +64,6 @@ class BrokerWriter : public FileWriter { int _addr_idx; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_EXEC_BROKER_WRITER_H +#endif // DORIS_BE_SRC_EXEC_BROKER_WRITER_H diff --git a/be/src/exec/cross_join_node.cpp b/be/src/exec/cross_join_node.cpp index 5c3a1dcdeb441f..1fc72688e5cbea 100644 --- a/be/src/exec/cross_join_node.cpp +++ b/be/src/exec/cross_join_node.cpp @@ -26,7 +26,7 @@ #include "util/debug_util.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { CrossJoinNode::CrossJoinNode( ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) diff --git a/be/src/exec/cross_join_node.h b/be/src/exec/cross_join_node.h index 2f2e5fa243b38a..797a86c63fd483 100644 --- a/be/src/exec/cross_join_node.h +++ b/be/src/exec/cross_join_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_CROSS_JOIN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_CROSS_JOIN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_CROSS_JOIN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_CROSS_JOIN_NODE_H #include #include @@ -30,7 +30,7 @@ #include "runtime/mem_pool.h" #include "gen_cpp/PlanNodes_types.h" -namespace palo { +namespace doris { class RowBatch; class TupleRow; diff --git a/be/src/exec/csv_scan_node.cpp b/be/src/exec/csv_scan_node.cpp index 54f3b1b8b17eb2..fa52b44f088caf 100644 --- a/be/src/exec/csv_scan_node.cpp +++ b/be/src/exec/csv_scan_node.cpp @@ -40,7 +40,7 @@ #include "olap/olap_common.h" #include "olap/utils.h" -namespace palo { +namespace doris { class StringRef { public: @@ -669,5 +669,5 @@ void CsvScanNode::hll_hash(const char* src, int len, std::string* result) { } } -} // end namespace palo +} // end namespace doris diff --git a/be/src/exec/csv_scan_node.h b/be/src/exec/csv_scan_node.h index 989d9bb496c42c..55b983baff16db 100644 --- a/be/src/exec/csv_scan_node.h +++ b/be/src/exec/csv_scan_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H #include #include @@ -28,7 +28,7 @@ #include "exec/scan_node.h" #include "runtime/descriptors.h" -namespace palo { +namespace doris { class TextConverter; class Tuple; @@ -136,7 +136,7 @@ class CsvScanNode : public ScanNode { std::map _column_slot_map; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H +#endif // DORIS_BE_SRC_QUERY_EXEC_CSV_SCAN_NODE_H diff --git a/be/src/exec/csv_scanner.cpp b/be/src/exec/csv_scanner.cpp index 735932098fa7de..c9de571d664043 100644 --- a/be/src/exec/csv_scanner.cpp +++ b/be/src/exec/csv_scanner.cpp @@ -19,7 +19,7 @@ #include -namespace palo { +namespace doris { CsvScanner::CsvScanner(const std::vector& csv_file_paths) : _is_open(false), _file_paths(csv_file_paths), @@ -88,5 +88,5 @@ namespace palo { *eos = false; return Status::OK; } -} // end namespace palo +} // end namespace doris diff --git a/be/src/exec/csv_scanner.h b/be/src/exec/csv_scanner.h index 674cb9ee740d5c..aaf5b4b4716de2 100644 --- a/be/src/exec/csv_scanner.h +++ b/be/src/exec/csv_scanner.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_CSV_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_CSV_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_CSV_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_CSV_SCANNER_H #include #include @@ -24,7 +24,7 @@ #include "common/status.h" -namespace palo { +namespace doris { class CsvScanner { public: @@ -41,6 +41,6 @@ class CsvScanner { int32_t _current_file_idx; }; -} // end namespace palo -#endif // BDG_PALO_BE_SRC_QUERY_EXEC_CSV_SCANNER_H +} // end namespace doris +#endif // DORIS_BE_SRC_QUERY_EXEC_CSV_SCANNER_H diff --git a/be/src/exec/data_sink.cpp b/be/src/exec/data_sink.cpp index 15737445cc9849..8f480df1e091b0 100644 --- a/be/src/exec/data_sink.cpp +++ b/be/src/exec/data_sink.cpp @@ -33,7 +33,7 @@ #include "runtime/runtime_state.h" #include "util/logging.h" -namespace palo { +namespace doris { Status DataSink::create_data_sink( ObjectPool* pool, @@ -141,4 +141,4 @@ Status DataSink::prepare(RuntimeState* state) { return Status::OK; } -} // namespace palo +} // namespace doris diff --git a/be/src/exec/data_sink.h b/be/src/exec/data_sink.h index 2846badb351b6c..2064bf62e374c2 100644 --- a/be/src/exec/data_sink.h +++ b/be/src/exec/data_sink.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_DATA_SINK_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_DATA_SINK_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_DATA_SINK_H +#define DORIS_BE_SRC_QUERY_EXEC_DATA_SINK_H #include #include @@ -26,7 +26,7 @@ #include "gen_cpp/Exprs_types.h" #include "runtime/mem_tracker.h" -namespace palo { +namespace doris { class ObjectPool; class RowBatch; @@ -85,5 +85,5 @@ class DataSink { std::unique_ptr _expr_mem_tracker; }; -} // namespace palo +} // namespace doris #endif diff --git a/be/src/exec/decompressor.cpp b/be/src/exec/decompressor.cpp index 04a147ee4d854f..7f8eb4283aa813 100644 --- a/be/src/exec/decompressor.cpp +++ b/be/src/exec/decompressor.cpp @@ -17,7 +17,7 @@ #include "exec/decompressor.h" -namespace palo { +namespace doris { Status Decompressor::create_decompressor(CompressType type, Decompressor** decompressor) { @@ -230,14 +230,14 @@ std::string Bzip2Decompressor::debug_info() { // Lz4Frame // Lz4 version: 1.7.5 // define LZ4F_VERSION = 100 -const unsigned Lz4FrameDecompressor::PALO_LZ4F_VERSION = 100; +const unsigned Lz4FrameDecompressor::DORIS_LZ4F_VERSION = 100; Lz4FrameDecompressor::~Lz4FrameDecompressor() { LZ4F_freeDecompressionContext(_dctx); } Status Lz4FrameDecompressor::init() { - size_t ret = LZ4F_createDecompressionContext(&_dctx, PALO_LZ4F_VERSION); + size_t ret = LZ4F_createDecompressionContext(&_dctx, DORIS_LZ4F_VERSION); if (LZ4F_isError(ret)) { std::stringstream ss; ss << "LZ4F_dctx creation error: " << std::string(LZ4F_getErrorName(ret)); @@ -324,7 +324,7 @@ std::string Lz4FrameDecompressor::debug_info() { std::stringstream ss; ss << "Lz4FrameDecompressor." << " expect dec buf size: " << _expect_dec_buf_size - << " Lz4 Frame Version: " << PALO_LZ4F_VERSION; + << " Lz4 Frame Version: " << DORIS_LZ4F_VERSION; return ss.str(); } diff --git a/be/src/exec/decompressor.h b/be/src/exec/decompressor.h index 0df709b727b925..88ee50e1b2e8f5 100644 --- a/be/src/exec/decompressor.h +++ b/be/src/exec/decompressor.h @@ -25,7 +25,7 @@ #include "common/status.h" -namespace palo { +namespace doris { enum CompressType { UNCOMPRESSED, @@ -145,7 +145,7 @@ class Lz4FrameDecompressor : public Decompressor { private: LZ4F_dctx* _dctx; size_t _expect_dec_buf_size; - const static unsigned PALO_LZ4F_VERSION; + const static unsigned DORIS_LZ4F_VERSION; }; class LzopDecompressor : public Decompressor { diff --git a/be/src/exec/empty_set_node.cpp b/be/src/exec/empty_set_node.cpp index a19827e49aef3f..c751a00c37ecc8 100644 --- a/be/src/exec/empty_set_node.cpp +++ b/be/src/exec/empty_set_node.cpp @@ -17,7 +17,7 @@ #include "exec/empty_set_node.h" -namespace palo { +namespace doris { EmptySetNode::EmptySetNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) diff --git a/be/src/exec/empty_set_node.h b/be/src/exec/empty_set_node.h index b79f945c56c17b..93e52433ab1703 100644 --- a/be/src/exec/empty_set_node.h +++ b/be/src/exec/empty_set_node.h @@ -19,7 +19,7 @@ #include "exec/exec_node.h" -namespace palo { +namespace doris { /// Node that returns an empty result set, i.e., just sets eos_ in GetNext(). /// Corresponds to EmptySetNode.java in the FE. diff --git a/be/src/exec/exchange_node.cpp b/be/src/exec/exchange_node.cpp index e55c09092b4d02..e68e3e2ed7cce2 100644 --- a/be/src/exec/exchange_node.cpp +++ b/be/src/exec/exchange_node.cpp @@ -28,7 +28,7 @@ #include "util/runtime_profile.h" #include "gen_cpp/PlanNodes_types.h" -namespace palo { +namespace doris { ExchangeNode::ExchangeNode( ObjectPool* pool, diff --git a/be/src/exec/exchange_node.h b/be/src/exec/exchange_node.h index 25454da881e6e1..8b84789581a1e3 100644 --- a/be/src/exec/exchange_node.h +++ b/be/src/exec/exchange_node.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_EXCHANGE_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_EXCHANGE_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_EXCHANGE_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_EXCHANGE_NODE_H #include #include "exec/exec_node.h" #include "exec/sort_exec_exprs.h" -namespace palo { +namespace doris { class RowBatch; class DataStreamRecvr; diff --git a/be/src/exec/exec_node.cpp b/be/src/exec/exec_node.cpp index c91cbc383c6518..8b4f8d15d46861 100644 --- a/be/src/exec/exec_node.cpp +++ b/be/src/exec/exec_node.cpp @@ -65,7 +65,7 @@ using llvm::Value; using llvm::LLVMContext; using llvm::BasicBlock; -namespace palo { +namespace doris { const std::string ExecNode::ROW_THROUGHPUT_COUNTER = "RowsReturnedRate"; diff --git a/be/src/exec/exec_node.h b/be/src/exec/exec_node.h index c6d138549c1269..bf2df357d66b29 100644 --- a/be/src/exec/exec_node.h +++ b/be/src/exec/exec_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_EXEC_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_EXEC_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_EXEC_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_EXEC_NODE_H #include #include @@ -34,7 +34,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class Expr; class ExprContext; diff --git a/be/src/exec/file_reader.h b/be/src/exec/file_reader.h index 4c8da2ad7c29d5..17766b012eea50 100644 --- a/be/src/exec/file_reader.h +++ b/be/src/exec/file_reader.h @@ -21,7 +21,7 @@ #include "common/status.h" -namespace palo { +namespace doris { class FileReader { public: diff --git a/be/src/exec/file_writer.h b/be/src/exec/file_writer.h index 23ed230d386e7d..3a056d0d1640f5 100644 --- a/be/src/exec/file_writer.h +++ b/be/src/exec/file_writer.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_FILE_WRITER_H -#define BDG_PALO_BE_SRC_EXEC_FILE_WRITER_H +#ifndef DORIS_BE_SRC_EXEC_FILE_WRITER_H +#define DORIS_BE_SRC_EXEC_FILE_WRITER_H #include #include "common/status.h" -namespace palo { +namespace doris { class FileWriter { public: @@ -38,6 +38,6 @@ class FileWriter { virtual void close() = 0; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_EXEC_FILE_WRITER_H +#endif // DORIS_BE_SRC_EXEC_FILE_WRITER_H diff --git a/be/src/exec/hash_join_node.cpp b/be/src/exec/hash_join_node.cpp index a93d4a6c4adc13..8f3e682b43b7f0 100644 --- a/be/src/exec/hash_join_node.cpp +++ b/be/src/exec/hash_join_node.cpp @@ -36,8 +36,8 @@ using llvm::Type; using llvm::Value; using llvm::BasicBlock; using llvm::LLVMContext; -namespace palo { -const char* HashJoinNode::_s_llvm_class_name = "class.palo::HashJoinNode"; +namespace doris { +const char* HashJoinNode::_s_llvm_class_name = "class.doris::HashJoinNode"; HashJoinNode::HashJoinNode( ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : diff --git a/be/src/exec/hash_join_node.h b/be/src/exec/hash_join_node.h index 78850f814ce43f..8a64fb3ab142b8 100644 --- a/be/src/exec/hash_join_node.h +++ b/be/src/exec/hash_join_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_HASH_JOIN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_HASH_JOIN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_HASH_JOIN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_HASH_JOIN_NODE_H #include #include @@ -27,7 +27,7 @@ #include "exec/hash_table.h" #include "gen_cpp/PlanNodes_types.h" -namespace palo { +namespace doris { class MemPool; class RowBatch; diff --git a/be/src/exec/hash_join_node_ir.cpp b/be/src/exec/hash_join_node_ir.cpp index b35d7371826bba..e7fec779622510 100644 --- a/be/src/exec/hash_join_node_ir.cpp +++ b/be/src/exec/hash_join_node_ir.cpp @@ -19,7 +19,7 @@ #include "exec/hash_table.hpp" #include "runtime/row_batch.h" -namespace palo { +namespace doris { // Functions in this file are cross compiled to IR with clang. diff --git a/be/src/exec/hash_table.cpp b/be/src/exec/hash_table.cpp index 5fba0e05e648e7..692ef848bfb88c 100644 --- a/be/src/exec/hash_table.cpp +++ b/be/src/exec/hash_table.cpp @@ -26,7 +26,7 @@ #include "runtime/mem_tracker.h" #include "runtime/runtime_state.h" #include "util/debug_util.h" -#include "util/palo_metrics.h" +#include "util/doris_metrics.h" using llvm::BasicBlock; using llvm::Value; @@ -36,10 +36,10 @@ using llvm::PointerType; using llvm::LLVMContext; using llvm::PHINode; -namespace palo { +namespace doris { const float HashTable::MAX_BUCKET_OCCUPANCY_FRACTION = 0.75f; -const char* HashTable::_s_llvm_class_name = "class.palo::HashTable"; +const char* HashTable::_s_llvm_class_name = "class.doris::HashTable"; HashTable::HashTable(const vector& build_expr_ctxs, const vector& probe_expr_ctxs, @@ -78,8 +78,8 @@ HashTable::HashTable(const vector& build_expr_ctxs, memset(_nodes, 0, _nodes_capacity * _node_byte_size); #if 0 - if (PaloMetrics::hash_table_total_bytes() != NULL) { - PaloMetrics::hash_table_total_bytes()->increment(_nodes_capacity * _node_byte_size); + if (DorisMetrics::hash_table_total_bytes() != NULL) { + DorisMetrics::hash_table_total_bytes()->increment(_nodes_capacity * _node_byte_size); } #endif @@ -98,8 +98,8 @@ void HashTable::close() { delete[] _expr_value_null_bits; free(_nodes); #if 0 - if (PaloMetrics::hash_table_total_bytes() != NULL) { - PaloMetrics::hash_table_total_bytes()->increment(-_nodes_capacity * _node_byte_size); + if (DorisMetrics::hash_table_total_bytes() != NULL) { + DorisMetrics::hash_table_total_bytes()->increment(-_nodes_capacity * _node_byte_size); } #endif _mem_tracker->release(_nodes_capacity * _node_byte_size); @@ -270,8 +270,8 @@ void HashTable::grow_node_array() { _nodes = new_nodes; #if 0 - if (PaloMetrics::hash_table_total_bytes() != NULL) { - PaloMetrics::hash_table_total_bytes()->increment(new_size - old_size); + if (DorisMetrics::hash_table_total_bytes() != NULL) { + DorisMetrics::hash_table_total_bytes()->increment(new_size - old_size); } #endif @@ -384,7 +384,7 @@ static void codegen_assign_null_value( // %"class.impala::TupleRow"* %row) { // entry: // %null_ptr = alloca i1 -// %0 = bitcast %"class.palo::TupleRow"* %row to i8** +// %0 = bitcast %"class.doris::TupleRow"* %row to i8** // %eval = call i32 @SlotRef(i8** %0, i8* null, i1* %null_ptr) // %1 = load i1* %null_ptr // br i1 %1, label %null, label %not_null diff --git a/be/src/exec/hash_table.h b/be/src/exec/hash_table.h index 1b598749e4c104..fe22fc23bf4ed8 100644 --- a/be/src/exec/hash_table.h +++ b/be/src/exec/hash_table.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_HASH_TABLE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_HASH_TABLE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_HASH_TABLE_H +#define DORIS_BE_SRC_QUERY_EXEC_HASH_TABLE_H #include #include -#include "codegen/palo_ir.h" +#include "codegen/doris_ir.h" #include "common/logging.h" #include "util/hash_util.hpp" @@ -31,7 +31,7 @@ class Function; } -namespace palo { +namespace doris { class Expr; class ExprContext; diff --git a/be/src/exec/hash_table.hpp b/be/src/exec/hash_table.hpp index b728fe373e648d..e613ac397115bd 100644 --- a/be/src/exec/hash_table.hpp +++ b/be/src/exec/hash_table.hpp @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_HASH_TABLE_HPP -#define BDG_PALO_BE_SRC_QUERY_EXEC_HASH_TABLE_HPP +#ifndef DORIS_BE_SRC_QUERY_EXEC_HASH_TABLE_HPP +#define DORIS_BE_SRC_QUERY_EXEC_HASH_TABLE_HPP #include "exec/hash_table.h" -namespace palo { +namespace doris { inline HashTable::Iterator HashTable::find(TupleRow* probe_row) { bool has_nulls = eval_probe_row(probe_row); diff --git a/be/src/exec/kudu_scan_node.cpp b/be/src/exec/kudu_scan_node.cpp index d785db38b39d63..9ea2e7ee7aaaad 100644 --- a/be/src/exec/kudu_scan_node.cpp +++ b/be/src/exec/kudu_scan_node.cpp @@ -52,7 +52,7 @@ using kudu::client::KuduTable; using kudu::client::KuduValue; using kudu::Slice; -namespace palo { +namespace doris { const string KuduScanNode::KUDU_ROUND_TRIPS = "TotalKuduScanRoundTrips"; const string KuduScanNode::KUDU_REMOTE_TOKENS = "KuduRemoteScanTokens"; diff --git a/be/src/exec/kudu_scan_node.h b/be/src/exec/kudu_scan_node.h index 2308885d6056f7..6c11c1e3c12a7a 100644 --- a/be/src/exec/kudu_scan_node.h +++ b/be/src/exec/kudu_scan_node.h @@ -32,7 +32,7 @@ // #include "gutil/gscoped_ptr.h" // #include "util/thread.h" -namespace palo { +namespace doris { class KuduScanner; diff --git a/be/src/exec/kudu_scanner.cpp b/be/src/exec/kudu_scanner.cpp index b7f0ba331977a8..57accc4ff478e7 100644 --- a/be/src/exec/kudu_scanner.cpp +++ b/be/src/exec/kudu_scanner.cpp @@ -45,7 +45,7 @@ using kudu::client::KuduScanBatch; using kudu::client::KuduSchema; using kudu::client::KuduTable; -namespace palo { +namespace doris { const string MODE_READ_AT_SNAPSHOT = "READ_AT_SNAPSHOT"; diff --git a/be/src/exec/kudu_scanner.h b/be/src/exec/kudu_scanner.h index fe32bcae3d2eea..a383ac32c574c9 100644 --- a/be/src/exec/kudu_scanner.h +++ b/be/src/exec/kudu_scanner.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef PALO_EXEC_KUDU_SCANNER_H -#define PALO_EXEC_KUDU_SCANNER_H +#ifndef DORIS_EXEC_KUDU_SCANNER_H +#define DORIS_EXEC_KUDU_SCANNER_H #include #include @@ -24,7 +24,7 @@ #include "exec/kudu_scan_node.h" #include "runtime/descriptors.h" -namespace palo { +namespace doris { class MemPool; class RowBatch; diff --git a/be/src/exec/kudu_util.cpp b/be/src/exec/kudu_util.cpp index b26bb2f16287c8..0f4bcb6ad1c930 100644 --- a/be/src/exec/kudu_util.cpp +++ b/be/src/exec/kudu_util.cpp @@ -32,7 +32,7 @@ using kudu::client::KuduClient; using kudu::client::KuduClientBuilder; using kudu::client::KuduColumnSchema; -namespace palo { +namespace doris { bool KuduClientIsSupported() { // The value below means the client is actually a stubbed client. This should mean diff --git a/be/src/exec/kudu_util.h b/be/src/exec/kudu_util.h index 0ee6727ebb95f2..3118c25d385169 100644 --- a/be/src/exec/kudu_util.h +++ b/be/src/exec/kudu_util.h @@ -21,7 +21,7 @@ #include #include -namespace palo { +namespace doris { class Status; diff --git a/be/src/exec/line_reader.h b/be/src/exec/line_reader.h index fbc69b8653ab7a..d2fe9c1e8b269d 100644 --- a/be/src/exec/line_reader.h +++ b/be/src/exec/line_reader.h @@ -19,7 +19,7 @@ #include "common/status.h" -namespace palo { +namespace doris { // This class is used for CSV scanner, to read content line by line class LineReader { diff --git a/be/src/exec/local_file_reader.cpp b/be/src/exec/local_file_reader.cpp index 68df991dd3a5e5..d4b379af08a25e 100644 --- a/be/src/exec/local_file_reader.cpp +++ b/be/src/exec/local_file_reader.cpp @@ -17,7 +17,7 @@ #include "exec/local_file_reader.h" -namespace palo { +namespace doris { LocalFileReader::LocalFileReader(const std::string& path, int64_t start_offset) : _path(path), _start_offset(start_offset), _eof(false), _fp(nullptr) { diff --git a/be/src/exec/local_file_reader.h b/be/src/exec/local_file_reader.h index 2a15e65816e5a0..15adca4ca38358 100644 --- a/be/src/exec/local_file_reader.h +++ b/be/src/exec/local_file_reader.h @@ -22,7 +22,7 @@ #include "exec/file_reader.h" -namespace palo { +namespace doris { class LocalFileReader : public FileReader { public: diff --git a/be/src/exec/local_file_writer.cpp b/be/src/exec/local_file_writer.cpp index 9ddd87a29be7ea..dfef24d38a04f1 100644 --- a/be/src/exec/local_file_writer.cpp +++ b/be/src/exec/local_file_writer.cpp @@ -18,7 +18,7 @@ #include "exec/local_file_writer.h" #include "util/error_util.h" -namespace palo { +namespace doris { LocalFileWriter::LocalFileWriter(const std::string& path, int64_t start_offset) : _path(path), _start_offset(start_offset), _fp(nullptr) { @@ -75,4 +75,4 @@ void LocalFileWriter::close() { } } -} // end namespace palo +} // end namespace doris diff --git a/be/src/exec/local_file_writer.h b/be/src/exec/local_file_writer.h index c8bd30b9d27664..76845e4792a672 100644 --- a/be/src/exec/local_file_writer.h +++ b/be/src/exec/local_file_writer.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_LOCAL_FILE_WRITER_H -#define BDG_PALO_BE_SRC_EXEC_LOCAL_FILE_WRITER_H +#ifndef DORIS_BE_SRC_EXEC_LOCAL_FILE_WRITER_H +#define DORIS_BE_SRC_EXEC_LOCAL_FILE_WRITER_H #include #include "exec/file_writer.h" -namespace palo { +namespace doris { class LocalFileWriter : public FileWriter { public: @@ -41,6 +41,6 @@ class LocalFileWriter : public FileWriter { FILE* _fp; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_EXEC_LOCAL_FILE_WRITER_H +#endif // DORIS_BE_SRC_EXEC_LOCAL_FILE_WRITER_H diff --git a/be/src/exec/merge_join_node.cpp b/be/src/exec/merge_join_node.cpp index ba394052667689..bc90e1f7e15ede 100644 --- a/be/src/exec/merge_join_node.cpp +++ b/be/src/exec/merge_join_node.cpp @@ -27,7 +27,7 @@ #include "util/debug_util.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { template int compare_value(const void* left_value, const void* right_value) { diff --git a/be/src/exec/merge_join_node.h b/be/src/exec/merge_join_node.h index f6ce06f90df0fb..82a7214211631c 100644 --- a/be/src/exec/merge_join_node.h +++ b/be/src/exec/merge_join_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_MERGE_JOIN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_MERGE_JOIN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_MERGE_JOIN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_MERGE_JOIN_NODE_H #include #include @@ -27,7 +27,7 @@ #include "runtime/row_batch.h" #include "gen_cpp/PlanNodes_types.h" // for TJoinOp -namespace palo { +namespace doris { class MemPool; class TupleRow; diff --git a/be/src/exec/merge_node.cpp b/be/src/exec/merge_node.cpp index c94aef8fdeafa2..82c29a6678f598 100644 --- a/be/src/exec/merge_node.cpp +++ b/be/src/exec/merge_node.cpp @@ -25,7 +25,7 @@ using std::vector; -namespace palo { +namespace doris { MergeNode::MergeNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : diff --git a/be/src/exec/merge_node.h b/be/src/exec/merge_node.h index aef8d96fed3041..f5bc559f673e1b 100644 --- a/be/src/exec/merge_node.h +++ b/be/src/exec/merge_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_MERGE_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_MERGE_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_MERGE_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_MERGE_NODE_H #include @@ -24,7 +24,7 @@ #include "runtime/mem_pool.h" #include -namespace palo { +namespace doris { class Tuple; class TupleRow; diff --git a/be/src/exec/mysql_scan_node.cpp b/be/src/exec/mysql_scan_node.cpp index fad4f9441ad5c2..3262e91ed8eeb6 100644 --- a/be/src/exec/mysql_scan_node.cpp +++ b/be/src/exec/mysql_scan_node.cpp @@ -27,7 +27,7 @@ #include "runtime/tuple_row.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { MysqlScanNode::MysqlScanNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) diff --git a/be/src/exec/mysql_scan_node.h b/be/src/exec/mysql_scan_node.h index 0c9d78582bbf73..381a008c5df8de 100644 --- a/be/src/exec/mysql_scan_node.h +++ b/be/src/exec/mysql_scan_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_MYSQL_SCAN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_MYSQL_SCAN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCAN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCAN_NODE_H #include @@ -24,7 +24,7 @@ #include "exec/mysql_scanner.h" #include "exec/scan_node.h" -namespace palo { +namespace doris { class TextConverter; class Tuple; diff --git a/be/src/exec/mysql_scanner.cpp b/be/src/exec/mysql_scanner.cpp index 9a79bde640530d..8903b119ccdf7c 100644 --- a/be/src/exec/mysql_scanner.cpp +++ b/be/src/exec/mysql_scanner.cpp @@ -20,7 +20,7 @@ #include "common/logging.h" -namespace palo { +namespace doris { MysqlScanner::MysqlScanner(const MysqlScannerParam& param) : _my_param(param), diff --git a/be/src/exec/mysql_scanner.h b/be/src/exec/mysql_scanner.h index 45699016474d99..662301638dae48 100644 --- a/be/src/exec/mysql_scanner.h +++ b/be/src/exec/mysql_scanner.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_MYSQL_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_MYSQL_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_MYSQL_SCANNER_H #include #include @@ -25,7 +25,7 @@ #include "common/status.h" -namespace palo { +namespace doris { struct MysqlScannerParam { std::string host; @@ -46,7 +46,7 @@ class MysqlScanner { Status open(); Status query(const std::string& query); - // query for PALO + // query for DORIS Status query(const std::string& table, const std::vector& fields, const std::vector& filters); Status get_next_row(char** *buf, unsigned long** lengths, bool* eos); diff --git a/be/src/exec/new_partitioned_aggregation_node.cc b/be/src/exec/new_partitioned_aggregation_node.cc index 1dc7033317e7f5..8f4736e82d41ba 100644 --- a/be/src/exec/new_partitioned_aggregation_node.cc +++ b/be/src/exec/new_partitioned_aggregation_node.cc @@ -55,10 +55,10 @@ // using namespace llvm; using namespace strings; -namespace palo { +namespace doris { const char* NewPartitionedAggregationNode::LLVM_CLASS_NAME = - "class.palo::NewPartitionedAggregationNode"; + "class.doris::NewPartitionedAggregationNode"; /// The minimum reduction factor (input rows divided by output rows) to grow hash tables /// in a streaming preaggregation, given that the hash tables are currently the given diff --git a/be/src/exec/new_partitioned_aggregation_node.h b/be/src/exec/new_partitioned_aggregation_node.h index 4d83408a2c8ccf..ac30c298d97732 100644 --- a/be/src/exec/new_partitioned_aggregation_node.h +++ b/be/src/exec/new_partitioned_aggregation_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_NEW_PARTITIONED_AGGREGATION_NODE_H -#define BDG_PALO_BE_SRC_EXEC_NEW_PARTITIONED_AGGREGATION_NODE_H +#ifndef DORIS_BE_SRC_EXEC_NEW_PARTITIONED_AGGREGATION_NODE_H +#define DORIS_BE_SRC_EXEC_NEW_PARTITIONED_AGGREGATION_NODE_H #include @@ -36,7 +36,7 @@ class Function; // class Value; } -namespace palo { +namespace doris { class AggFn; class NewAggFnEvaluator; diff --git a/be/src/exec/new_partitioned_aggregation_node_ir.cc b/be/src/exec/new_partitioned_aggregation_node_ir.cc index 3158c554ef26d3..4a5c00cd330aff 100644 --- a/be/src/exec/new_partitioned_aggregation_node_ir.cc +++ b/be/src/exec/new_partitioned_aggregation_node_ir.cc @@ -24,7 +24,7 @@ #include "runtime/row_batch.h" #include "runtime/tuple_row.h" -using namespace palo; +using namespace doris; Status NewPartitionedAggregationNode::ProcessBatchNoGrouping(RowBatch* batch) { Tuple* output_tuple = singleton_output_tuple_; diff --git a/be/src/exec/new_partitioned_hash_table.cc b/be/src/exec/new_partitioned_hash_table.cc index 5196eb19bdbd66..56b06c34b7970d 100644 --- a/be/src/exec/new_partitioned_hash_table.cc +++ b/be/src/exec/new_partitioned_hash_table.cc @@ -32,17 +32,17 @@ #include "runtime/runtime_state.h" #include "runtime/string_value.h" #include "util/debug_util.h" -#include "util/palo_metrics.h" +#include "util/doris_metrics.h" #include "common/names.h" -using namespace palo; +using namespace doris; // using namespace llvm; using namespace strings; // DEFINE_bool(enable_quadratic_probing, true, "Enable quadratic probing hash table"); -const char* NewPartitionedHashTableCtx::LLVM_CLASS_NAME = "class.palo::NewPartitionedHashTableCtx"; +const char* NewPartitionedHashTableCtx::LLVM_CLASS_NAME = "class.doris::NewPartitionedHashTableCtx"; // Random primes to multiply the seed with. static uint32_t SEED_PRIMES[] = { @@ -471,8 +471,8 @@ void NewPartitionedHashTable::Close() { if ((num_buckets_ > LARGE_HT) || (num_probes_ > HEAVILY_USED)) VLOG(2) << PrintStats(); for (auto& data_page : data_pages_) allocator_->Free(move(data_page)); data_pages_.clear(); - //if (PaloMetrics::hash_table_total_bytes() != NULL) { - // PaloMetrics::hash_table_total_bytes()->increment(-total_data_page_size_); + //if (DorisMetrics::hash_table_total_bytes() != NULL) { + // DorisMetrics::hash_table_total_bytes()->increment(-total_data_page_size_); //} if (bucket_allocation_ != nullptr) allocator_->Free(move(bucket_allocation_)); } @@ -551,7 +551,7 @@ bool NewPartitionedHashTable::GrowNodeArray(Status* status) { if (!status->ok() || allocation == nullptr) return false; next_node_ = reinterpret_cast(allocation->data()); data_pages_.push_back(std::move(allocation)); - //PaloMetrics::hash_table_total_bytes()->increment(DATA_PAGE_SIZE); + //DorisMetrics::hash_table_total_bytes()->increment(DATA_PAGE_SIZE); node_remaining_current_page_ = DATA_PAGE_SIZE / sizeof(DuplicateNode); total_data_page_size_ += DATA_PAGE_SIZE; return true; diff --git a/be/src/exec/new_partitioned_hash_table.h b/be/src/exec/new_partitioned_hash_table.h index 03863bcaa8325b..69c000cbdf6c40 100644 --- a/be/src/exec/new_partitioned_hash_table.h +++ b/be/src/exec/new_partitioned_hash_table.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_H -#define BDG_PALO_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_H +#ifndef DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_H +#define DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_H #include #include #include #include -#include "codegen/palo_ir.h" +#include "codegen/doris_ir.h" #include "common/logging.h" #include "common/compiler_util.h" #include "runtime/buffered_tuple_stream3.h" @@ -37,7 +37,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class Expr; class ExprContext; diff --git a/be/src/exec/new_partitioned_hash_table.inline.h b/be/src/exec/new_partitioned_hash_table.inline.h index e36db66e49a633..43be7760f2e175 100644 --- a/be/src/exec/new_partitioned_hash_table.inline.h +++ b/be/src/exec/new_partitioned_hash_table.inline.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_INLINE_H -#define BDG_PALO_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_INLINE_H +#ifndef DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_INLINE_H +#define DORIS_BE_SRC_EXEC_NEW_PARTITIONED_HASH_TABLE_INLINE_H #include "exec/new_partitioned_hash_table.h" #include "exprs/expr.h" #include "exprs/expr_context.h" -namespace palo { +namespace doris { inline bool NewPartitionedHashTableCtx::EvalAndHashBuild(TupleRow* row) { uint8_t* expr_values = expr_values_cache_.cur_expr_values(); diff --git a/be/src/exec/new_partitioned_hash_table_ir.cc b/be/src/exec/new_partitioned_hash_table_ir.cc index bf732b7eec8a80..0ea33e2cd53381 100644 --- a/be/src/exec/new_partitioned_hash_table_ir.cc +++ b/be/src/exec/new_partitioned_hash_table_ir.cc @@ -18,7 +18,7 @@ #ifdef IR_COMPILE #include "exec/new_partitioned_hash_table.h" -using namespace palo; +using namespace doris; uint32_t NewPartitionedHashTableCtx::GetHashSeed() const { return seeds_[level_]; } diff --git a/be/src/exec/olap_common.cpp b/be/src/exec/olap_common.cpp index caf22811800e73..35f28c714f579d 100644 --- a/be/src/exec/olap_common.cpp +++ b/be/src/exec/olap_common.cpp @@ -26,7 +26,7 @@ #include "exec/olap_utils.h" -namespace palo { +namespace doris { template<> std::string cast_to_string(__int128 value) { @@ -65,7 +65,7 @@ Status OlapScanKeys::get_key_range(std::vector* key_range) { return Status::OK; } -Status PaloScanRange::init() { +Status DorisScanRange::init() { if (!_scan_range.__isset.partition_column_ranges) { return Status::OK; } @@ -163,7 +163,7 @@ Status PaloScanRange::init() { return Status::OK; } -int PaloScanRange::has_intersection(const std::string column_name, +int DorisScanRange::has_intersection(const std::string column_name, ColumnValueRangeType& value_range) { IsEmptyValueRangeVisitor empty_visitor; @@ -184,6 +184,6 @@ int PaloScanRange::has_intersection(const std::string column_name, } } -} // namespace palo +} // namespace doris /* vim: set expandtab ts=4 sw=4 sts=4 tw=100: */ diff --git a/be/src/exec/olap_common.h b/be/src/exec/olap_common.h index 398af05edfdbfb..3fc3d4759cba1d 100644 --- a/be/src/exec/olap_common.h +++ b/be/src/exec/olap_common.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_COMMON_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_COMMON_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_COMMON_H +#define DORIS_BE_SRC_QUERY_EXEC_OLAP_COMMON_H #include #include @@ -34,7 +34,7 @@ #include "olap/tuple.h" -namespace palo { +namespace doris { template std::string cast_to_string(T value) { @@ -251,10 +251,10 @@ typedef boost::variant < ColumnValueRange, ColumnValueRange > ColumnValueRangeType; -class PaloScanRange { +class DorisScanRange { public: - PaloScanRange(const TPaloScanRange& palo_scan_range) - : _scan_range(palo_scan_range) { + DorisScanRange(const TPaloScanRange& doris_scan_range) + : _scan_range(doris_scan_range) { } Status init(); @@ -663,8 +663,8 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange& range) { } if (range.is_fixed_value_range()) { - if ((_begin_scan_keys.empty() && range.get_fixed_value_size() > config::palo_max_scan_key_num) - || range.get_fixed_value_size() * _begin_scan_keys.size() > config::palo_max_scan_key_num) { + if ((_begin_scan_keys.empty() && range.get_fixed_value_size() > config::doris_max_scan_key_num) + || range.get_fixed_value_size() * _begin_scan_keys.size() > config::doris_max_scan_key_num) { if (range.is_range_value_convertible()) { range.convert_to_range_value(); } else { @@ -674,12 +674,12 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange& range) { } else { if (range.is_fixed_value_convertible() && _is_convertible) { if (_begin_scan_keys.empty()) { - if (range.get_convertible_fixed_value_size() < config::palo_max_scan_key_num) { + if (range.get_convertible_fixed_value_size() < config::doris_max_scan_key_num) { range.convert_to_fixed_value(); } } else { if (range.get_convertible_fixed_value_size() * _begin_scan_keys.size() - < config::palo_max_scan_key_num) { + < config::doris_max_scan_key_num) { range.convert_to_fixed_value(); } } @@ -760,7 +760,7 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange& range) { return Status::OK; } -} // namespace palo +} // namespace doris #endif diff --git a/be/src/exec/olap_meta_reader.cpp b/be/src/exec/olap_meta_reader.cpp index c9adb9d7a5cdfd..ceeda76dc76a34 100644 --- a/be/src/exec/olap_meta_reader.cpp +++ b/be/src/exec/olap_meta_reader.cpp @@ -31,10 +31,10 @@ #include "runtime/runtime_state.h" #include "runtime/mem_pool.h" -namespace palo { +namespace doris { Status EngineMetaReader::get_hints( - boost::shared_ptr scan_range, + boost::shared_ptr scan_range, int block_row_count, bool is_begin_include, bool is_end_include, @@ -113,4 +113,4 @@ Status EngineMetaReader::get_hints( return Status::OK; } -} // namespace palo +} // namespace doris diff --git a/be/src/exec/olap_meta_reader.h b/be/src/exec/olap_meta_reader.h index c2f4d764ec328a..0c599813687c4e 100644 --- a/be/src/exec/olap_meta_reader.h +++ b/be/src/exec/olap_meta_reader.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_META_READER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_META_READER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_META_READER_H +#define DORIS_BE_SRC_QUERY_EXEC_OLAP_META_READER_H #include #include @@ -30,7 +30,7 @@ #include "runtime/descriptors.h" #include "runtime/tuple.h" -namespace palo { +namespace doris { class StorageShowHints; class RuntimeProfile; @@ -41,7 +41,7 @@ class RuntimeProfile; class EngineMetaReader { public: static Status get_hints( - boost::shared_ptr scan_range, + boost::shared_ptr scan_range, int block_row_count, bool is_begin_include, bool is_end_include, @@ -50,6 +50,6 @@ class EngineMetaReader { RuntimeProfile* profile); }; -} // namespace palo +} // namespace doris #endif diff --git a/be/src/exec/olap_rewrite_node.cpp b/be/src/exec/olap_rewrite_node.cpp index ac270666a2104d..44317ec4e758a2 100644 --- a/be/src/exec/olap_rewrite_node.cpp +++ b/be/src/exec/olap_rewrite_node.cpp @@ -27,7 +27,7 @@ #include "runtime/tuple.h" #include "util/debug_util.h" -namespace palo { +namespace doris { OlapRewriteNode::OlapRewriteNode(ObjectPool* pool, const TPlanNode& tnode, diff --git a/be/src/exec/olap_rewrite_node.h b/be/src/exec/olap_rewrite_node.h index ead030c79b27c0..cd9a7722d3f158 100644 --- a/be/src/exec/olap_rewrite_node.h +++ b/be/src/exec/olap_rewrite_node.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_REWRITE_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_REWRITE_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_REWRITE_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_OLAP_REWRITE_NODE_H #include #include "exec/exec_node.h" #include "runtime/mem_pool.h" -namespace palo { +namespace doris { class Tuple; class TupleRow; diff --git a/be/src/exec/olap_scan_node.cpp b/be/src/exec/olap_scan_node.cpp index 9348b15d5464da..80cb4e8dbffdf5 100644 --- a/be/src/exec/olap_scan_node.cpp +++ b/be/src/exec/olap_scan_node.cpp @@ -44,7 +44,7 @@ using llvm::Function; -namespace palo { +namespace doris { #define DS_SUCCESS(x) ((x) >= 0) @@ -56,7 +56,7 @@ OlapScanNode::OlapScanNode(ObjectPool* pool, const TPlanNode& tnode, const Descr _tuple_idx(0), _eos(false), _scanner_pool(new ObjectPool()), - _max_materialized_row_batches(config::palo_scanner_queue_size), + _max_materialized_row_batches(config::doris_scanner_queue_size), _start(false), _scanner_done(false), _transfer_done(false), @@ -350,12 +350,12 @@ Status OlapScanNode::close(RuntimeState* state) { Status OlapScanNode::set_scan_ranges(const std::vector& scan_ranges) { for (auto& scan_range : scan_ranges) { DCHECK(scan_range.scan_range.__isset.palo_scan_range); - boost::shared_ptr palo_scan_range( - new PaloScanRange(scan_range.scan_range.palo_scan_range)); - RETURN_IF_ERROR(palo_scan_range->init()); - VLOG(1) << "palo_scan_range table=" << scan_range.scan_range.palo_scan_range.table_name << + boost::shared_ptr doris_scan_range( + new DorisScanRange(scan_range.scan_range.palo_scan_range)); + RETURN_IF_ERROR(doris_scan_range->init()); + VLOG(1) << "doris_scan_range table=" << scan_range.scan_range.palo_scan_range.table_name << " version" << scan_range.scan_range.palo_scan_range.version; - _palo_scan_ranges.push_back(palo_scan_range); + _doris_scan_ranges.push_back(doris_scan_range); COUNTER_UPDATE(_tablet_counter, 1); } @@ -516,10 +516,10 @@ Status OlapScanNode::build_olap_filters() { Status OlapScanNode::select_scan_ranges() { - std::list >::iterator scan_range_iter - = _palo_scan_ranges.begin(); + std::list >::iterator scan_range_iter + = _doris_scan_ranges.begin(); - while (scan_range_iter != _palo_scan_ranges.end()) { + while (scan_range_iter != _doris_scan_ranges.end()) { if (!select_scan_range(*scan_range_iter)) { if ((*scan_range_iter)->scan_range().partition_column_ranges.size() != 0) { VLOG(1) << "Remove ScanRange: [" @@ -529,7 +529,7 @@ Status OlapScanNode::select_scan_ranges() { VLOG(1) << "Remove ScanRange"; } - _palo_scan_ranges.erase(scan_range_iter++); + _doris_scan_ranges.erase(scan_range_iter++); } else { scan_range_iter++; } @@ -566,9 +566,9 @@ Status OlapScanNode::build_scan_key() { Status OlapScanNode::split_scan_range() { std::vector sub_ranges; - VLOG(1) << "_palo_scan_ranges.size()=" << _palo_scan_ranges.size(); + VLOG(1) << "_doris_scan_ranges.size()=" << _doris_scan_ranges.size(); - for (auto scan_range : _palo_scan_ranges) { + for (auto scan_range : _doris_scan_ranges) { sub_ranges.clear(); RETURN_IF_ERROR(get_sub_scan_range(scan_range, &sub_ranges)); @@ -605,7 +605,7 @@ Status OlapScanNode::start_scan_thread(RuntimeState* state) { // scan range per therad for (int i = 0; i < key_range_size;) { - boost::shared_ptr scan_range = _query_scan_ranges[i]; + boost::shared_ptr scan_range = _query_scan_ranges[i]; std::vector key_ranges; key_ranges.push_back(_query_key_ranges[i]); ++i; @@ -700,9 +700,9 @@ Status OlapScanNode::normalize_in_predicate(SlotDescriptor* slot, ColumnValueRan << pred->hybird_set()->size(); // 1.2 Skip if InPredicate value size larger then max_scan_key_num - if (pred->hybird_set()->size() > config::palo_max_scan_key_num) { + if (pred->hybird_set()->size() > config::doris_max_scan_key_num) { LOG(WARNING) << "Predicate value num " << pred->hybird_set()->size() - << " excede limit " << config::palo_max_scan_key_num; + << " excede limit " << config::doris_max_scan_key_num; continue; } @@ -940,7 +940,7 @@ Status OlapScanNode::normalize_binary_predicate(SlotDescriptor* slot, ColumnValu return Status::OK; } -bool OlapScanNode::select_scan_range(boost::shared_ptr scan_range) { +bool OlapScanNode::select_scan_range(boost::shared_ptr scan_range) { std::map::iterator iter = _column_value_ranges.begin(); @@ -958,7 +958,7 @@ bool OlapScanNode::select_scan_range(boost::shared_ptr scan_range } Status OlapScanNode::get_sub_scan_range( - boost::shared_ptr scan_range, + boost::shared_ptr scan_range, std::vector* sub_range) { std::vector scan_key_range; RETURN_IF_ERROR(_scan_keys.get_key_range(&scan_key_range)); @@ -973,7 +973,7 @@ Status OlapScanNode::get_sub_scan_range( } else { if (!EngineMetaReader::get_hints( scan_range, - config::palo_scan_range_row_count, + config::doris_scan_range_row_count, _scan_keys.begin_include(), _scan_keys.end_include(), scan_key_range, @@ -1025,8 +1025,8 @@ void OlapScanNode::transfer_thread(RuntimeState* state) { mem_consume = state->fragment_mem_tracker()->consumption(); } int max_thread = _max_materialized_row_batches; - if (config::palo_scanner_row_num > state->batch_size()) { - max_thread /= config::palo_scanner_row_num / state->batch_size(); + if (config::doris_scanner_row_num > state->batch_size()) { + max_thread /= config::doris_scanner_row_num / state->batch_size(); } // read from scanner while (LIKELY(status.ok())) { @@ -1160,7 +1160,7 @@ void OlapScanNode::scanner_thread(OlapScanner* scanner) { // judge if we need to yield. So we record all raw data read in this round // scan, if this exceed threshold, we yield this thread. int64_t raw_rows_read = scanner->raw_rows_read(); - int64_t raw_rows_threshold = raw_rows_read + config::palo_scanner_row_num; + int64_t raw_rows_threshold = raw_rows_read + config::doris_scanner_row_num; while (!eos && raw_rows_read < raw_rows_threshold) { if (UNLIKELY(_transfer_done)) { eos = true; @@ -1253,4 +1253,4 @@ void OlapScanNode::debug_string( std::stringstream* /* out */) const { } -} // namespace palo +} // namespace doris diff --git a/be/src/exec/olap_scan_node.h b/be/src/exec/olap_scan_node.h index 67f7a0c3a3bb9a..ef5f2668125700 100644 --- a/be/src/exec/olap_scan_node.h +++ b/be/src/exec/olap_scan_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_SCAN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_SCAN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_SCAN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_OLAP_SCAN_NODE_H #include #include @@ -37,7 +37,7 @@ #include "util/progress_updater.h" #include "util/debug_util.h" -namespace palo { +namespace doris { enum TransferStatus { READ_ROWBATCH = 1, @@ -149,9 +149,9 @@ class OlapScanNode : public ScanNode { template Status normalize_binary_predicate(SlotDescriptor* slot, ColumnValueRange* range); - bool select_scan_range(boost::shared_ptr scan_range); + bool select_scan_range(boost::shared_ptr scan_range); Status get_sub_scan_range( - boost::shared_ptr scan_range, + boost::shared_ptr scan_range, std::vector* sub_range); void transfer_thread(RuntimeState* state); //void vectorized_scanner_thread(OlapScanner* scanner); @@ -172,7 +172,7 @@ class OlapScanNode : public ScanNode { std::vector _is_null_vector; // Tuple id resolved in prepare() to set _tuple_desc; TupleId _tuple_id; - // palo scan node used to scan palo + // doris scan node used to scan doris TOlapScanNode _olap_scan_node; // tuple descriptors const TupleDescriptor* _tuple_desc; @@ -188,9 +188,9 @@ class OlapScanNode : public ScanNode { OlapScanKeys _scan_keys; - std::list > _palo_scan_ranges; + std::list > _doris_scan_ranges; - std::vector > _query_scan_ranges; + std::vector > _query_scan_ranges; std::vector _query_key_ranges; std::vector _olap_filter; @@ -273,6 +273,6 @@ class OlapScanNode : public ScanNode { RuntimeProfile::Counter* _index_load_timer = nullptr; }; -} // namespace palo +} // namespace doris #endif diff --git a/be/src/exec/olap_scanner.cpp b/be/src/exec/olap_scanner.cpp index 3f121b2d220d1d..dda2fefdca5279 100644 --- a/be/src/exec/olap_scanner.cpp +++ b/be/src/exec/olap_scanner.cpp @@ -30,9 +30,9 @@ #include "runtime/mem_tracker.h" #include "util/mem_util.hpp" #include "util/network_util.h" -#include "util/palo_metrics.h" +#include "util/doris_metrics.h" -namespace palo { +namespace doris { static const std::string SCANNER_THREAD_TOTAL_WALLCLOCK_TIME = "ScannerThreadsTotalWallClockTime"; @@ -43,7 +43,7 @@ OlapScanner::OlapScanner( RuntimeState* runtime_state, OlapScanNode* parent, bool aggregation, - PaloScanRange* scan_range, + DorisScanRange* scan_range, const std::vector& key_ranges) : _runtime_state(runtime_state), _parent(parent), @@ -68,7 +68,7 @@ OlapScanner::~OlapScanner() { } Status OlapScanner::_prepare( - PaloScanRange* scan_range, const std::vector& key_ranges, + DorisScanRange* scan_range, const std::vector& key_ranges, const std::vector& filters, const std::vector& is_nulls) { // Get olap table TTabletId tablet_id = scan_range->scan_range().tablet_id; @@ -238,7 +238,7 @@ Status OlapScanner::get_batch( bzero(tuple_buf, state->batch_size() * _tuple_desc->byte_size()); Tuple *tuple = reinterpret_cast(tuple_buf); - int64_t raw_rows_threshold = raw_rows_read() + config::palo_scanner_row_num; + int64_t raw_rows_threshold = raw_rows_read() + config::doris_scanner_row_num; { SCOPED_TIMER(_parent->_scan_timer); while (true) { @@ -327,12 +327,12 @@ Status OlapScanner::get_batch( if (_num_rows_read > 32768) { int32_t pushdown_return_rate = _num_rows_read * 100 / (_num_rows_read + _num_rows_pushed_cond_filtered); - if (pushdown_return_rate > config::palo_max_pushdown_conjuncts_return_rate) { + if (pushdown_return_rate > config::doris_max_pushdown_conjuncts_return_rate) { _use_pushdown_conjuncts = false; VLOG(2) << "Stop Using PushDown Conjuncts. " << "PushDownReturnRate: " << pushdown_return_rate << "%" << " MaxPushDownReturnRate: " - << config::palo_max_pushdown_conjuncts_return_rate << "%"; + << config::doris_max_pushdown_conjuncts_return_rate << "%"; } } } @@ -442,8 +442,8 @@ void OlapScanner::update_counter() { COUNTER_UPDATE(_parent->_index_load_timer, _reader->stats().index_load_ns); - PaloMetrics::query_scan_bytes.increment(_reader->stats().compressed_bytes_read); - PaloMetrics::query_scan_rows.increment(_reader->stats().raw_rows_read); + DorisMetrics::query_scan_bytes.increment(_reader->stats().compressed_bytes_read); + DorisMetrics::query_scan_rows.increment(_reader->stats().raw_rows_read); _has_update_counter = true; } @@ -459,4 +459,4 @@ Status OlapScanner::close(RuntimeState* state) { return Status::OK; } -} // namespace palo +} // namespace doris diff --git a/be/src/exec/olap_scanner.h b/be/src/exec/olap_scanner.h index f138800e2ff575..53e1153abbb363 100644 --- a/be/src/exec/olap_scanner.h +++ b/be/src/exec/olap_scanner.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_OLAP_SCANNER_H #include #include @@ -40,7 +40,7 @@ #include "olap/olap_engine.h" #include "olap/reader.h" -namespace palo { +namespace doris { class OlapScanNode; class OLAPReader; @@ -53,7 +53,7 @@ class OlapScanner { RuntimeState* runtime_state, OlapScanNode* parent, bool aggregation, - PaloScanRange* scan_range, + DorisScanRange* scan_range, const std::vector& key_ranges); ~OlapScanner(); @@ -82,7 +82,7 @@ class OlapScanner { void update_counter(); private: Status _prepare( - PaloScanRange* scan_range, + DorisScanRange* scan_range, const std::vector& key_ranges, const std::vector& filters, const std::vector& is_nulls); @@ -140,6 +140,6 @@ class OlapScanner { bool _is_closed = false; }; -} // namespace palo +} // namespace doris #endif diff --git a/be/src/exec/olap_table_info.cpp b/be/src/exec/olap_table_info.cpp index 6ec3be08e688f0..cc94b54fb3ff52 100644 --- a/be/src/exec/olap_table_info.cpp +++ b/be/src/exec/olap_table_info.cpp @@ -24,7 +24,7 @@ #include "util/debug_util.h" #include "util/string_parser.hpp" -namespace palo { +namespace doris { void OlapTableIndexSchema::to_protobuf(POlapTableIndexSchema* pindex) const { pindex->set_id(index_id); diff --git a/be/src/exec/olap_table_info.h b/be/src/exec/olap_table_info.h index 8791cc5cfaa204..2a14d832f690a5 100644 --- a/be/src/exec/olap_table_info.h +++ b/be/src/exec/olap_table_info.h @@ -31,7 +31,7 @@ #include "runtime/tuple.h" #include "runtime/raw_value.h" -namespace palo { +namespace doris { class MemPool; class MemTracker; @@ -216,9 +216,9 @@ struct NodeInfo { } }; -class PaloNodesInfo { +class DorisNodesInfo { public: - PaloNodesInfo(const TPaloNodesInfo& t_nodes) { + DorisNodesInfo(const TPaloNodesInfo& t_nodes) { for (auto& node : t_nodes.nodes) { _nodes.emplace(node.id, node); } diff --git a/be/src/exec/olap_table_sink.cpp b/be/src/exec/olap_table_sink.cpp index 86d3bc69b61704..da6c94cb6a2fe2 100644 --- a/be/src/exec/olap_table_sink.cpp +++ b/be/src/exec/olap_table_sink.cpp @@ -30,7 +30,7 @@ #include "util/uid_util.h" #include "service/brpc.h" -namespace palo { +namespace doris { namespace stream_load { NodeChannel::NodeChannel(OlapTableSink* parent, int64_t index_id, @@ -410,7 +410,7 @@ Status OlapTableSink::init(const TDataSink& t_sink) { _partition = _pool->add(new OlapTablePartitionParam(_schema, table_sink.partition)); RETURN_IF_ERROR(_partition->init()); _location = _pool->add(new OlapTableLocationParam(table_sink.location)); - _nodes_info = _pool->add(new PaloNodesInfo(table_sink.nodes_info)); + _nodes_info = _pool->add(new DorisNodesInfo(table_sink.nodes_info)); return Status::OK; } diff --git a/be/src/exec/olap_table_sink.h b/be/src/exec/olap_table_sink.h index d3d154d6924735..804ef9ca1e6429 100644 --- a/be/src/exec/olap_table_sink.h +++ b/be/src/exec/olap_table_sink.h @@ -34,7 +34,7 @@ #include "util/thrift_util.h" #include "util/ref_count_closure.h" -namespace palo { +namespace doris { class Bitmap; class MemTracker; @@ -213,7 +213,7 @@ class OlapTableSink : public DataSink { std::shared_ptr _schema; OlapTablePartitionParam* _partition = nullptr; OlapTableLocationParam* _location = nullptr; - PaloNodesInfo* _nodes_info = nullptr; + DorisNodesInfo* _nodes_info = nullptr; RuntimeProfile* _profile = nullptr; MemTracker* _mem_tracker = nullptr; diff --git a/be/src/exec/olap_utils.h b/be/src/exec/olap_utils.h index 45703f539e0c74..596abc0c08a463 100644 --- a/be/src/exec/olap_utils.h +++ b/be/src/exec/olap_utils.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_UTILS_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_OLAP_UTILS_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_OLAP_UTILS_H +#define DORIS_BE_SRC_QUERY_EXEC_OLAP_UTILS_H #include @@ -26,7 +26,7 @@ #include "runtime/datetime_value.h" #include "olap/tuple.h" -namespace palo { +namespace doris { typedef bool (*CompareLargeFunc)(const void*, const void*); @@ -222,7 +222,7 @@ inline SQLFilterOp to_olap_filter_type(TExprOpcode::type type, bool opposite) { return FILTER_IN; } -} // namespace palo +} // namespace doris #endif diff --git a/be/src/exec/partitioned_aggregation_node.cc b/be/src/exec/partitioned_aggregation_node.cc index 8e523f7c856014..506179aeecf76e 100644 --- a/be/src/exec/partitioned_aggregation_node.cc +++ b/be/src/exec/partitioned_aggregation_node.cc @@ -46,10 +46,10 @@ // using namespace llvm; using std::list; -namespace palo { +namespace doris { const char* PartitionedAggregationNode::_s_llvm_class_name = - "class.palo::PartitionedAggregationNode"; + "class.doris::PartitionedAggregationNode"; PartitionedAggregationNode::PartitionedAggregationNode( ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : @@ -1122,12 +1122,12 @@ void PartitionedAggregationNode::close_partitions() { // void UpdateSlot(FunctionContext* fn_ctx, AggTuple* agg_tuple, char** row) // // The IR for sum(double_col) is: -// define void @UpdateSlot(%"class.palo_udf::FunctionContext"* %fn_ctx, +// define void @UpdateSlot(%"class.doris_udf::FunctionContext"* %fn_ctx, // { i8, double }* %agg_tuple, -// %"class.palo::TupleRow"* %row) #20 { +// %"class.doris::TupleRow"* %row) #20 { // entry: -// %src = call { i8, double } @GetSlotRef(%"class.palo::ExprContext"* inttoptr -// (i64 128241264 to %"class.palo::ExprContext"*), %"class.palo::TupleRow"* %row) +// %src = call { i8, double } @GetSlotRef(%"class.doris::ExprContext"* inttoptr +// (i64 128241264 to %"class.doris::ExprContext"*), %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, double } %src, 0 // %is_null = trunc i8 %0 to i1 // br i1 %is_null, label %ret, label %src_not_null @@ -1146,29 +1146,29 @@ void PartitionedAggregationNode::close_partitions() { // } // // The IR for ndv(double_col) is: -// define void @UpdateSlot(%"class.palo_udf::FunctionContext"* %fn_ctx, -// { i8, %"struct.palo::StringValue" }* %agg_tuple, -// %"class.palo::TupleRow"* %row) #20 { +// define void @UpdateSlot(%"class.doris_udf::FunctionContext"* %fn_ctx, +// { i8, %"struct.doris::StringValue" }* %agg_tuple, +// %"class.doris::TupleRow"* %row) #20 { // entry: // %dst_lowered_ptr = alloca { i64, i8* } // %src_lowered_ptr = alloca { i8, double } -// %src = call { i8, double } @GetSlotRef(%"class.palo::ExprContext"* inttoptr -// (i64 120530832 to %"class.palo::ExprContext"*), %"class.palo::TupleRow"* %row) +// %src = call { i8, double } @GetSlotRef(%"class.doris::ExprContext"* inttoptr +// (i64 120530832 to %"class.doris::ExprContext"*), %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, double } %src, 0 // %is_null = trunc i8 %0 to i1 // br i1 %is_null, label %ret, label %src_not_null // // src_not_null: ; preds = %entry // %dst_slot_ptr = getelementptr inbounds -// { i8, %"struct.palo::StringValue" }* %agg_tuple, i32 0, i32 1 -// call void @SetNotNull({ i8, %"struct.palo::StringValue" }* %agg_tuple) -// %dst_val = load %"struct.palo::StringValue"* %dst_slot_ptr +// { i8, %"struct.doris::StringValue" }* %agg_tuple, i32 0, i32 1 +// call void @SetNotNull({ i8, %"struct.doris::StringValue" }* %agg_tuple) +// %dst_val = load %"struct.doris::StringValue"* %dst_slot_ptr // store { i8, double } %src, { i8, double }* %src_lowered_ptr // %src_unlowered_ptr = bitcast { i8, double }* %src_lowered_ptr -// to %"struct.palo_udf::DoubleVal"* -// %ptr = extractvalue %"struct.palo::StringValue" %dst_val, 0 +// to %"struct.doris_udf::DoubleVal"* +// %ptr = extractvalue %"struct.doris::StringValue" %dst_val, 0 // %dst_stringval = insertvalue { i64, i8* } zeroinitializer, i8* %ptr, 1 -// %len = extractvalue %"struct.palo::StringValue" %dst_val, 1 +// %len = extractvalue %"struct.doris::StringValue" %dst_val, 1 // %1 = extractvalue { i64, i8* } %dst_stringval, 0 // %2 = zext i32 %len to i64 // %3 = shl i64 %2, 32 @@ -1177,18 +1177,18 @@ void PartitionedAggregationNode::close_partitions() { // %dst_stringval1 = insertvalue { i64, i8* } %dst_stringval, i64 %5, 0 // store { i64, i8* } %dst_stringval1, { i64, i8* }* %dst_lowered_ptr // %dst_unlowered_ptr = bitcast { i64, i8* }* %dst_lowered_ptr -// to %"struct.palo_udf::StringVal"* -// call void @HllUpdate(%"class.palo_udf::FunctionContext"* %fn_ctx, -// %"struct.palo_udf::DoubleVal"* %src_unlowered_ptr, -// %"struct.palo_udf::StringVal"* %dst_unlowered_ptr) +// to %"struct.doris_udf::StringVal"* +// call void @HllUpdate(%"class.doris_udf::FunctionContext"* %fn_ctx, +// %"struct.doris_udf::DoubleVal"* %src_unlowered_ptr, +// %"struct.doris_udf::StringVal"* %dst_unlowered_ptr) // %anyval_result = load { i64, i8* }* %dst_lowered_ptr // %6 = extractvalue { i64, i8* } %anyval_result, 1 -// %7 = insertvalue %"struct.palo::StringValue" zeroinitializer, i8* %6, 0 +// %7 = insertvalue %"struct.doris::StringValue" zeroinitializer, i8* %6, 0 // %8 = extractvalue { i64, i8* } %anyval_result, 0 // %9 = ashr i64 %8, 32 // %10 = trunc i64 %9 to i32 -// %11 = insertvalue %"struct.palo::StringValue" %7, i32 %10, 1 -// store %"struct.palo::StringValue" %11, %"struct.palo::StringValue"* %dst_slot_ptr +// %11 = insertvalue %"struct.doris::StringValue" %7, i32 %10, 1 +// store %"struct.doris::StringValue" %11, %"struct.doris::StringValue"* %dst_slot_ptr // br label %ret // // ret: ; preds = %src_not_null, %entry @@ -1360,27 +1360,27 @@ llvm::Function* PartitionedAggregationNode::codegen_update_slot( // // ; Function Attrs: alwaysinline -// define void @update_tuple(%"class.palo::PartitionedAggregationNode"* %this_ptr, -// %"class.palo_udf::FunctionContext"** %agg_fn_ctxs, -// %"class.palo::Tuple"* %tuple, -// %"class.palo::TupleRow"* %row, +// define void @update_tuple(%"class.doris::PartitionedAggregationNode"* %this_ptr, +// %"class.doris_udf::FunctionContext"** %agg_fn_ctxs, +// %"class.doris::Tuple"* %tuple, +// %"class.doris::TupleRow"* %row, // i1 %is_merge) #20 { // entry: -// %tuple1 = bitcast %"class.palo::Tuple"* %tuple to { i8, i64, i64, double }* +// %tuple1 = bitcast %"class.doris::Tuple"* %tuple to { i8, i64, i64, double }* // %src_slot = getelementptr inbounds { i8, i64, i64, double }* %tuple1, i32 0, i32 1 // %count_star_val = load i64* %src_slot // %count_star_inc = add i64 %count_star_val, 1 // store i64 %count_star_inc, i64* %src_slot -// %0 = getelementptr %"class.palo_udf::FunctionContext"** %agg_fn_ctxs, i32 1 -// %fn_ctx = load %"class.palo_udf::FunctionContext"** %0 -// call void @UpdateSlot(%"class.palo_udf::FunctionContext"* %fn_ctx, +// %0 = getelementptr %"class.doris_udf::FunctionContext"** %agg_fn_ctxs, i32 1 +// %fn_ctx = load %"class.doris_udf::FunctionContext"** %0 +// call void @UpdateSlot(%"class.doris_udf::FunctionContext"* %fn_ctx, // { i8, i64, i64, double }* %tuple1, -// %"class.palo::TupleRow"* %row) -// %1 = getelementptr %"class.palo_udf::FunctionContext"** %agg_fn_ctxs, i32 2 -// %fn_ctx2 = load %"class.palo_udf::FunctionContext"** %1 -// call void @UpdateSlot5(%"class.palo_udf::FunctionContext"* %fn_ctx2, +// %"class.doris::TupleRow"* %row) +// %1 = getelementptr %"class.doris_udf::FunctionContext"** %agg_fn_ctxs, i32 2 +// %fn_ctx2 = load %"class.doris_udf::FunctionContext"** %1 +// call void @UpdateSlot5(%"class.doris_udf::FunctionContext"* %fn_ctx2, // { i8, i64, i64, double }* %tuple1, -// %"class.palo::TupleRow"* %row) +// %"class.doris::TupleRow"* %row) // ret void // } Function* PartitionedAggregationNode::codegen_update_tuple() { diff --git a/be/src/exec/partitioned_aggregation_node.h b/be/src/exec/partitioned_aggregation_node.h index da622c61119333..d963b8a74dea3e 100644 --- a/be/src/exec/partitioned_aggregation_node.h +++ b/be/src/exec/partitioned_aggregation_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_PARTITIONED_AGGREGATION_NODE_H -#define BDG_PALO_BE_SRC_EXEC_PARTITIONED_AGGREGATION_NODE_H +#ifndef DORIS_BE_SRC_EXEC_PARTITIONED_AGGREGATION_NODE_H +#define DORIS_BE_SRC_EXEC_PARTITIONED_AGGREGATION_NODE_H #include #include @@ -33,7 +33,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class AggFnEvaluator; class LlvmCodeGen; @@ -174,7 +174,7 @@ class PartitionedAggregationNode : public ExecNode { // (non-grouping) case. Otherwise they are only used to clone FunctionContexts for the // partitions. // TODO: we really need to plumb through CHAR(N) for intermediate types. - std::vector _agg_fn_ctxs; + std::vector _agg_fn_ctxs; boost::scoped_ptr _agg_fn_pool; // Exprs used to evaluate input rows @@ -318,7 +318,7 @@ class PartitionedAggregationNode : public ExecNode { boost::scoped_ptr hash_tbl; // Clone of parent's _agg_fn_ctxs and backing MemPool. - std::vector agg_fn_ctxs; + std::vector agg_fn_ctxs; boost::scoped_ptr agg_fn_pool; // Tuple stream used to store aggregated rows. When the partition is not spilled, @@ -345,7 +345,7 @@ class PartitionedAggregationNode : public ExecNode { // occurred. When returning NULL, sets *status. If 'stream' is set and its small // buffers get full, it will attempt to switch to IO-buffers. Tuple* construct_intermediate_tuple( - const std::vector& agg_fn_ctxs, + const std::vector& agg_fn_ctxs, MemPool* pool, BufferedTupleStream2* stream, Status* status); // Updates the given aggregation intermediate tuple with aggregation values computed @@ -356,7 +356,7 @@ class PartitionedAggregationNode : public ExecNode { // is_merge() == true. // This function is replaced by codegen (which is why we don't use a vector argument // for agg_fn_ctxs). - void update_tuple(palo_udf::FunctionContext** agg_fn_ctxs, Tuple* tuple, TupleRow* row, + void update_tuple(doris_udf::FunctionContext** agg_fn_ctxs, Tuple* tuple, TupleRow* row, bool is_merge = false); // Called on the intermediate tuple of each group after all input rows have been @@ -368,7 +368,7 @@ class PartitionedAggregationNode : public ExecNode { // the finalized/serialized aggregate values is returned. // TODO: Coordinate the allocation of new tuples with the release of memory // so as not to make memory consumption blow up. - Tuple* get_output_tuple(const std::vector& agg_fn_ctxs, + Tuple* get_output_tuple(const std::vector& agg_fn_ctxs, Tuple* tuple, MemPool* pool); // Do the aggregation for all tuple rows in the batch when there is no grouping. @@ -450,7 +450,7 @@ class PartitionedAggregationNode : public ExecNode { void close_partitions(); // Calls finalizes on all tuples starting at 'it'. - void cleanup_hash_tbl(const std::vector& agg_fn_ctxs, + void cleanup_hash_tbl(const std::vector& agg_fn_ctxs, PartitionedHashTable::Iterator it); // Codegen UpdateSlot(). Returns NULL if codegen is unsuccessful. @@ -477,6 +477,6 @@ class PartitionedAggregationNode : public ExecNode { } }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_EXEC_PARTITIONED_AGGREGATION_NODE_H +#endif // DORIS_BE_SRC_EXEC_PARTITIONED_AGGREGATION_NODE_H diff --git a/be/src/exec/partitioned_aggregation_node_ir.cc b/be/src/exec/partitioned_aggregation_node_ir.cc index 0938f41871853b..10683b43b80ce5 100644 --- a/be/src/exec/partitioned_aggregation_node_ir.cc +++ b/be/src/exec/partitioned_aggregation_node_ir.cc @@ -22,7 +22,7 @@ #include "runtime/row_batch.h" #include "runtime/tuple_row.h" -namespace palo { +namespace doris { Status PartitionedAggregationNode::process_batch_no_grouping( RowBatch* batch, PartitionedHashTableCtx* ht_ctx) { @@ -140,4 +140,4 @@ template Status PartitionedAggregationNode::process_batch( template Status PartitionedAggregationNode::process_batch( RowBatch*, PartitionedHashTableCtx*); -} // end namespace palo +} // end namespace doris diff --git a/be/src/exec/partitioned_hash_table.cc b/be/src/exec/partitioned_hash_table.cc index a88a27ff092983..8798bc9738d22d 100644 --- a/be/src/exec/partitioned_hash_table.cc +++ b/be/src/exec/partitioned_hash_table.cc @@ -28,7 +28,7 @@ #include "runtime/runtime_state.h" #include "runtime/string_value.hpp" #include "util/debug_util.h" -#include "util/palo_metrics.h" +#include "util/doris_metrics.h" // using namespace llvm; @@ -49,9 +49,9 @@ using llvm::PHINode; using llvm::ConstantFP; using llvm::APFloat; -namespace palo { +namespace doris { -const char* PartitionedHashTableCtx::_s_llvm_class_name = "class.palo::PartitionedHashTableCtx"; +const char* PartitionedHashTableCtx::_s_llvm_class_name = "class.doris::PartitionedHashTableCtx"; // Random primes to multiply the seed with. static uint32_t SEED_PRIMES[] = { @@ -279,8 +279,8 @@ void PartitionedHashTable::close() { _data_pages[i]->del(); } #if 0 - if (PaloMetrics::hash_table_total_bytes() != NULL) { - PaloMetrics::hash_table_total_bytes()->increment(-_total_data_page_size); + if (DorisMetrics::hash_table_total_bytes() != NULL) { + DorisMetrics::hash_table_total_bytes()->increment(-_total_data_page_size); } #endif _data_pages.clear(); @@ -372,8 +372,8 @@ bool PartitionedHashTable::grow_node_array() { _data_pages.push_back(block); _next_node = block->allocate(page_size); #if 0 - if (PaloMetrics::hash_table_total_bytes() != NULL) { - PaloMetrics::hash_table_total_bytes()->increment(page_size); + if (DorisMetrics::hash_table_total_bytes() != NULL) { + DorisMetrics::hash_table_total_bytes()->increment(page_size); } #endif _node_remaining_current_page = page_size / sizeof(DuplicateNode); @@ -942,5 +942,5 @@ Function* PartitionedHashTableCtx::codegen_equals(RuntimeState* state) { } #endif -} // namespace palo +} // namespace doris diff --git a/be/src/exec/partitioned_hash_table.h b/be/src/exec/partitioned_hash_table.h index 3ff29ce8fdfd59..3c5b1424184382 100644 --- a/be/src/exec/partitioned_hash_table.h +++ b/be/src/exec/partitioned_hash_table.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_H -#define BDG_PALO_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_H +#ifndef DORIS_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_H +#define DORIS_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_H #include #include #include -#include "codegen/palo_ir.h" +#include "codegen/doris_ir.h" #include "util/logging.h" #include "runtime/buffered_block_mgr2.h" #include "runtime/buffered_tuple_stream2.h" @@ -37,7 +37,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class Expr; class ExprContext; @@ -691,6 +691,6 @@ class PartitionedHashTable { int64_t _num_resizes; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_H +#endif // DORIS_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_H diff --git a/be/src/exec/partitioned_hash_table.inline.h b/be/src/exec/partitioned_hash_table.inline.h index 5372e17e03b593..09abc3de1341e9 100644 --- a/be/src/exec/partitioned_hash_table.inline.h +++ b/be/src/exec/partitioned_hash_table.inline.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_INLINE_H -#define BDG_PALO_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_INLINE_H +#ifndef DORIS_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_INLINE_H +#define DORIS_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_INLINE_H #include "exec/partitioned_hash_table.h" -namespace palo { +namespace doris { inline bool PartitionedHashTableCtx::eval_and_hash_build(TupleRow* row, uint32_t* hash) { bool has_null = EvalBuildRow(row); @@ -374,6 +374,6 @@ inline void PartitionedHashTableCtx::set_level(int level) { _level = level; } -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_INLINE_H +#endif // DORIS_BE_SRC_EXEC_PARTITIONED_HASH_TABLE_INLINE_H diff --git a/be/src/exec/partitioned_hash_table_ir.cc b/be/src/exec/partitioned_hash_table_ir.cc index f71b2deac5dbc0..69d98b53325578 100644 --- a/be/src/exec/partitioned_hash_table_ir.cc +++ b/be/src/exec/partitioned_hash_table_ir.cc @@ -18,12 +18,12 @@ #ifdef IR_COMPILE #include "exec/partitioned_hash_table.h" -namespace palo { +namespace doris { uint32_t PartitionedHashTableCtx::get_hash_seed() const { return _seeds[_level]; } -} // end namespace palo +} // end namespace doris #endif diff --git a/be/src/exec/pl_task_root.cpp b/be/src/exec/pl_task_root.cpp index eea04de5a59f7b..a60f9054600873 100644 --- a/be/src/exec/pl_task_root.cpp +++ b/be/src/exec/pl_task_root.cpp @@ -17,7 +17,7 @@ #include "exec/pl_task_root.h" -namespace palo { +namespace doris { ExchangeNode::ExchangeNode( ObjectPool* pool, diff --git a/be/src/exec/pl_task_root.h b/be/src/exec/pl_task_root.h index 7dbc789415e9b4..d7361f023f5d09 100644 --- a/be/src/exec/pl_task_root.h +++ b/be/src/exec/pl_task_root.h @@ -19,7 +19,7 @@ #include "exec/exec_node.h" -namespace palo { +namespace doris { // Pull load task root class PlTaskRoot : public ExecNode { diff --git a/be/src/exec/plain_text_line_reader.cpp b/be/src/exec/plain_text_line_reader.cpp index ca0b8fe8054761..7ad004706bdd2b 100644 --- a/be/src/exec/plain_text_line_reader.cpp +++ b/be/src/exec/plain_text_line_reader.cpp @@ -30,7 +30,7 @@ // #define OUTPUT_CHUNK (32) // leave these 2 size small for debuging -namespace palo { +namespace doris { PlainTextLineReader::PlainTextLineReader( RuntimeProfile* profile, diff --git a/be/src/exec/plain_text_line_reader.h b/be/src/exec/plain_text_line_reader.h index c52b4c4bd22f7a..a3c1be2ba42e1e 100644 --- a/be/src/exec/plain_text_line_reader.h +++ b/be/src/exec/plain_text_line_reader.h @@ -20,7 +20,7 @@ #include "exec/line_reader.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { class FileReader; class Decompressor; diff --git a/be/src/exec/pre_aggregation_node.cpp b/be/src/exec/pre_aggregation_node.cpp index fcd8f8cd5f0884..32eeb10cab49d9 100644 --- a/be/src/exec/pre_aggregation_node.cpp +++ b/be/src/exec/pre_aggregation_node.cpp @@ -40,7 +40,7 @@ // This object appends n-int32s to the end of a normal tuple object to maintain the // lengths of the string buffers in the tuple. -namespace palo { +namespace doris { // TODO: pass in maximum size; enforce by setting limit in mempool // TODO: have a Status ExecNode::init(const TPlanNode&) member function // that does initialization outside of c'tor, so we can indicate errors diff --git a/be/src/exec/pre_aggregation_node.h b/be/src/exec/pre_aggregation_node.h index 9f07c4c23a9c5c..2404cda48132ad 100644 --- a/be/src/exec/pre_aggregation_node.h +++ b/be/src/exec/pre_aggregation_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_PRE_AGGREGATION_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_PRE_AGGREGATION_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_PRE_AGGREGATION_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_PRE_AGGREGATION_NODE_H #include #include @@ -27,7 +27,7 @@ #include "runtime/free_list.hpp" #include "runtime/mem_pool.h" -namespace palo { +namespace doris { class AggregateExpr; class AggregationTuple; diff --git a/be/src/exec/read_write_util.cpp b/be/src/exec/read_write_util.cpp index 56bc91e020ef14..0bc10f037cc4a3 100644 --- a/be/src/exec/read_write_util.cpp +++ b/be/src/exec/read_write_util.cpp @@ -17,7 +17,7 @@ #include "exec/read_write_util.h" -namespace palo { +namespace doris { int ReadWriteUtil::put_zint(int32_t integer, uint8_t* buf) { // Move the sign bit to the first bit. diff --git a/be/src/exec/read_write_util.h b/be/src/exec/read_write_util.h index 35d11d93c2fc3f..72681771f2e085 100644 --- a/be/src/exec/read_write_util.h +++ b/be/src/exec/read_write_util.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_READ_WRITE_UTIL_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_READ_WRITE_UTIL_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_READ_WRITE_UTIL_H +#define DORIS_BE_SRC_QUERY_EXEC_READ_WRITE_UTIL_H #include #include #include "common/logging.h" #include "common/status.h" -namespace palo { +namespace doris { #define RETURN_IF_FALSE(x) if (UNLIKELY(!(x))) return false diff --git a/be/src/exec/row_batch_list.h b/be/src/exec/row_batch_list.h index 3b76c64e48eb3d..50f5815b0eef1c 100644 --- a/be/src/exec/row_batch_list.h +++ b/be/src/exec/row_batch_list.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_ROW_BATCH_LIST_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_ROW_BATCH_LIST_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_ROW_BATCH_LIST_H +#define DORIS_BE_SRC_QUERY_EXEC_ROW_BATCH_LIST_H #include #include @@ -25,7 +25,7 @@ #include "runtime/row_batch.h" #include "util/debug_util.h" -namespace palo { +namespace doris { class TupleRow; class RowDescriptor; diff --git a/be/src/exec/scan_node.cpp b/be/src/exec/scan_node.cpp index 8f3706734fb1fc..1782550cbf6c12 100644 --- a/be/src/exec/scan_node.cpp +++ b/be/src/exec/scan_node.cpp @@ -19,7 +19,7 @@ #include -namespace palo { +namespace doris { const string ScanNode::_s_bytes_read_counter = "BytesRead"; const string ScanNode::_s_rows_read_counter = "RowsRead"; diff --git a/be/src/exec/scan_node.h b/be/src/exec/scan_node.h index 25aed8f274297e..8fb016e6990b95 100644 --- a/be/src/exec/scan_node.h +++ b/be/src/exec/scan_node.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCAN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCAN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCAN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_SCAN_NODE_H #include #include "exec/exec_node.h" #include "util/runtime_profile.h" #include "gen_cpp/PaloInternalService_types.h" -namespace palo { +namespace doris { class TScanRange; diff --git a/be/src/exec/schema_scan_node.cpp b/be/src/exec/schema_scan_node.cpp index 2dae3081efb3eb..9977ba3a2d48ad 100644 --- a/be/src/exec/schema_scan_node.cpp +++ b/be/src/exec/schema_scan_node.cpp @@ -29,7 +29,7 @@ #include "runtime/tuple_row.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { SchemaScanNode::SchemaScanNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) diff --git a/be/src/exec/schema_scan_node.h b/be/src/exec/schema_scan_node.h index d737e58e39093c..add50492568aa3 100644 --- a/be/src/exec/schema_scan_node.h +++ b/be/src/exec/schema_scan_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCAN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCAN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCAN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCAN_NODE_H #include @@ -25,7 +25,7 @@ #include "gen_cpp/Descriptors_types.h" #include "runtime/descriptors.h" -namespace palo { +namespace doris { class TextConverter; class Tuple; diff --git a/be/src/exec/schema_scanner.cpp b/be/src/exec/schema_scanner.cpp index 31557eb244d631..574a3c55231c9b 100644 --- a/be/src/exec/schema_scanner.cpp +++ b/be/src/exec/schema_scanner.cpp @@ -24,9 +24,9 @@ #include "exec/schema_scanner/schema_charsets_scanner.h" #include "exec/schema_scanner/schema_collations_scanner.h" -namespace palo { +namespace doris { -PaloServer* SchemaScanner::_s_palo_server; +DorisServer* SchemaScanner::_s_doris_server; SchemaScanner::SchemaScanner(ColumnDesc* columns, int column_num) : _is_init(false), diff --git a/be/src/exec/schema_scanner.h b/be/src/exec/schema_scanner.h index 56fa1c58acd28d..e279c8071207dd 100644 --- a/be/src/exec/schema_scanner.h +++ b/be/src/exec/schema_scanner.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_H #include @@ -26,10 +26,10 @@ #include "runtime/tuple.h" #include "runtime/mem_pool.h" -namespace palo { +namespace doris { -// forehead declar class, because jni function init in PaloServer. -class PaloServer; +// forehead declar class, because jni function init in DorisServer. +class DorisServer; class RuntimeState; // scanner parameter from frontend @@ -71,8 +71,8 @@ class SchemaScanner { return _tuple_desc; } - static void set_palo_server(PaloServer* palo_server) { - _s_palo_server = palo_server; + static void set_doris_server(DorisServer* doris_server) { + _s_doris_server = doris_server; } protected: @@ -87,7 +87,7 @@ class SchemaScanner { int _column_num; TupleDescriptor* _tuple_desc; - static PaloServer* _s_palo_server; + static DorisServer* _s_doris_server; }; diff --git a/be/src/exec/schema_scanner/frontend_helper.cpp b/be/src/exec/schema_scanner/frontend_helper.cpp index a8ddf74decf3da..5826b9f309fd5b 100644 --- a/be/src/exec/schema_scanner/frontend_helper.cpp +++ b/be/src/exec/schema_scanner/frontend_helper.cpp @@ -38,7 +38,7 @@ #include "util/thrift_util.h" #include "util/runtime_profile.h" -namespace palo { +namespace doris { ExecEnv* FrontendHelper::_s_exec_env; diff --git a/be/src/exec/schema_scanner/frontend_helper.h b/be/src/exec/schema_scanner/frontend_helper.h index f7d63e513dcdbb..5a4a4bcacf87f6 100644 --- a/be/src/exec/schema_scanner/frontend_helper.h +++ b/be/src/exec/schema_scanner/frontend_helper.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_FRONTEND_HELPER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_FRONTEND_HELPER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_FRONTEND_HELPER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_FRONTEND_HELPER_H #include "common/status.h" #include "runtime/exec_env.h" #include "gen_cpp/FrontendService_types.h" -namespace palo { +namespace doris { // this class is a helper for jni call. easy for unit test class FrontendHelper { diff --git a/be/src/exec/schema_scanner/schema_charsets_scanner.cpp b/be/src/exec/schema_scanner/schema_charsets_scanner.cpp index abb32dadae0692..1930f5a69f7ac9 100644 --- a/be/src/exec/schema_scanner/schema_charsets_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_charsets_scanner.cpp @@ -19,7 +19,7 @@ #include "runtime/primitive_type.h" #include "runtime/string_value.h" -namespace palo { +namespace doris { SchemaScanner::ColumnDesc SchemaCharsetsScanner::_s_css_columns[] = { // name, type, size diff --git a/be/src/exec/schema_scanner/schema_charsets_scanner.h b/be/src/exec/schema_scanner/schema_charsets_scanner.h index a2121a621d1339..c8cf07a35d4c3c 100644 --- a/be/src/exec/schema_scanner/schema_charsets_scanner.h +++ b/be/src/exec/schema_scanner/schema_charsets_scanner.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_CHARSETS_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_CHARSETS_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_CHARSETS_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_CHARSETS_SCANNER_H #include #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" -namespace palo { +namespace doris { class SchemaCharsetsScanner : public SchemaScanner { public: diff --git a/be/src/exec/schema_scanner/schema_collations_scanner.cpp b/be/src/exec/schema_scanner/schema_collations_scanner.cpp index eff2e5574c6131..deb4ce02ed50c3 100644 --- a/be/src/exec/schema_scanner/schema_collations_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_collations_scanner.cpp @@ -19,7 +19,7 @@ #include "runtime/primitive_type.h" #include "runtime/string_value.h" -namespace palo { +namespace doris { SchemaScanner::ColumnDesc SchemaCollationsScanner::_s_cols_columns[] = { // name, type, size diff --git a/be/src/exec/schema_scanner/schema_collations_scanner.h b/be/src/exec/schema_scanner/schema_collations_scanner.h index a625eba8ae8789..a4a2f99672c999 100644 --- a/be/src/exec/schema_scanner/schema_collations_scanner.h +++ b/be/src/exec/schema_scanner/schema_collations_scanner.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLLATIONS_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLLATIONS_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLLATIONS_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLLATIONS_SCANNER_H #include #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" -namespace palo { +namespace doris { class SchemaCollationsScanner : public SchemaScanner { public: diff --git a/be/src/exec/schema_scanner/schema_columns_scanner.cpp b/be/src/exec/schema_scanner/schema_columns_scanner.cpp index 2ac14b3d46b1db..c0ffcfa9b0abc7 100644 --- a/be/src/exec/schema_scanner/schema_columns_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_columns_scanner.cpp @@ -23,7 +23,7 @@ #include "runtime/datetime_value.h" #include "exec/schema_scanner/frontend_helper.h" -namespace palo { +namespace doris { SchemaScanner::ColumnDesc SchemaColumnsScanner::_s_col_columns[] = { // name, type, size, is_null diff --git a/be/src/exec/schema_scanner/schema_columns_scanner.h b/be/src/exec/schema_scanner/schema_columns_scanner.h index 785ea06ee0a7c9..c7c539670e0974 100644 --- a/be/src/exec/schema_scanner/schema_columns_scanner.h +++ b/be/src/exec/schema_scanner/schema_columns_scanner.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLUMNS_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLUMNS_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLUMNS_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_COLUMNS_SCANNER_H #include #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" -namespace palo { +namespace doris { class SchemaColumnsScanner : public SchemaScanner { public: diff --git a/be/src/exec/schema_scanner/schema_dummy_scanner.cpp b/be/src/exec/schema_scanner/schema_dummy_scanner.cpp index 16cb5f1eeddcc4..6733757b750409 100644 --- a/be/src/exec/schema_scanner/schema_dummy_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_dummy_scanner.cpp @@ -20,7 +20,7 @@ #include "runtime/primitive_type.h" #include "runtime/string_value.h" -namespace palo +namespace doris { SchemaScanner::ColumnDesc SchemaDummyScanner::_s_dummy_columns[] = { diff --git a/be/src/exec/schema_scanner/schema_dummy_scanner.h b/be/src/exec/schema_scanner/schema_dummy_scanner.h index 200b464abbf335..de6de5665193da 100644 --- a/be/src/exec/schema_scanner/schema_dummy_scanner.h +++ b/be/src/exec/schema_scanner/schema_dummy_scanner.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_DUMMY_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_DUMMY_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_DUMMY_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_DUMMY_SCANNER_H #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" -namespace palo +namespace doris { class SchemaDummyScanner : public SchemaScanner { diff --git a/be/src/exec/schema_scanner/schema_schemata_scanner.cpp b/be/src/exec/schema_scanner/schema_schemata_scanner.cpp index 4d23c912d9f927..ec30fe0120cbce 100644 --- a/be/src/exec/schema_scanner/schema_schemata_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_schemata_scanner.cpp @@ -20,7 +20,7 @@ #include "runtime/string_value.h" #include "exec/schema_scanner/frontend_helper.h" -namespace palo { +namespace doris { SchemaScanner::ColumnDesc SchemaSchemataScanner::_s_columns[] = { // name, type, size diff --git a/be/src/exec/schema_scanner/schema_schemata_scanner.h b/be/src/exec/schema_scanner/schema_schemata_scanner.h index 6a3cfa7718c018..90625eddf690e0 100644 --- a/be/src/exec/schema_scanner/schema_schemata_scanner.h +++ b/be/src/exec/schema_scanner/schema_schemata_scanner.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMATA_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMATA_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMATA_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_SCHEMATA_SCANNER_H #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" -namespace palo { +namespace doris { class SchemaSchemataScanner : public SchemaScanner { public: diff --git a/be/src/exec/schema_scanner/schema_tables_scanner.cpp b/be/src/exec/schema_scanner/schema_tables_scanner.cpp index 81c6f12d95aca4..0f773817e6ba58 100644 --- a/be/src/exec/schema_scanner/schema_tables_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_tables_scanner.cpp @@ -21,7 +21,7 @@ #include "runtime/string_value.h" #include "runtime/datetime_value.h" -namespace palo +namespace doris { SchemaScanner::ColumnDesc SchemaTablesScanner::_s_tbls_columns[] = { diff --git a/be/src/exec/schema_scanner/schema_tables_scanner.h b/be/src/exec/schema_scanner/schema_tables_scanner.h index e7af74caf2c47e..2fa8160bc51c2f 100644 --- a/be/src/exec/schema_scanner/schema_tables_scanner.h +++ b/be/src/exec/schema_scanner/schema_tables_scanner.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLES_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLES_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLES_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_TABLES_SCANNER_H #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" -namespace palo { +namespace doris { class SchemaTablesScanner : public SchemaScanner { public: diff --git a/be/src/exec/schema_scanner/schema_variables_scanner.cpp b/be/src/exec/schema_scanner/schema_variables_scanner.cpp index 16eb4b114ec97d..53b0170c09eb6a 100644 --- a/be/src/exec/schema_scanner/schema_variables_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_variables_scanner.cpp @@ -21,7 +21,7 @@ #include "runtime/runtime_state.h" #include "exec/schema_scanner/frontend_helper.h" -namespace palo { +namespace doris { SchemaScanner::ColumnDesc SchemaVariablesScanner::_s_vars_columns[] = { // name, type, size diff --git a/be/src/exec/schema_scanner/schema_variables_scanner.h b/be/src/exec/schema_scanner/schema_variables_scanner.h index 3cf6bbe248da1c..09fb423e7d16ed 100644 --- a/be/src/exec/schema_scanner/schema_variables_scanner.h +++ b/be/src/exec/schema_scanner/schema_variables_scanner.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VARIABLES_SCANNER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VARIABLES_SCANNER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VARIABLES_SCANNER_H +#define DORIS_BE_SRC_QUERY_EXEC_SCHEMA_SCANNER_SCHEMA_VARIABLES_SCANNER_H #include #include #include "exec/schema_scanner.h" #include "gen_cpp/FrontendService_types.h" -namespace palo { +namespace doris { class SchemaVariablesScanner : public SchemaScanner { public: diff --git a/be/src/exec/select_node.cpp b/be/src/exec/select_node.cpp index 59533a2767f459..ef634db00f37d6 100644 --- a/be/src/exec/select_node.cpp +++ b/be/src/exec/select_node.cpp @@ -23,7 +23,7 @@ #include "runtime/raw_value.h" #include "util/debug_util.h" -namespace palo { +namespace doris { SelectNode::SelectNode( ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) diff --git a/be/src/exec/select_node.h b/be/src/exec/select_node.h index 3af90ad9501886..b707bbb7c63c01 100644 --- a/be/src/exec/select_node.h +++ b/be/src/exec/select_node.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_SELECT_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_SELECT_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_SELECT_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_SELECT_NODE_H #include #include "exec/exec_node.h" #include "runtime/mem_pool.h" -namespace palo { +namespace doris { class Tuple; class TupleRow; diff --git a/be/src/exec/sort_exec_exprs.cpp b/be/src/exec/sort_exec_exprs.cpp index c70cb9ec9c0b54..3e57824e335574 100644 --- a/be/src/exec/sort_exec_exprs.cpp +++ b/be/src/exec/sort_exec_exprs.cpp @@ -17,7 +17,7 @@ #include "exec/sort_exec_exprs.h" -namespace palo { +namespace doris { Status SortExecExprs::init(const TSortInfo& sort_info, ObjectPool* pool) { return init(sort_info.ordering_exprs, @@ -78,4 +78,4 @@ void SortExecExprs::close(RuntimeState* state) { Expr::close(_rhs_ordering_expr_ctxs, state); } -} //namespace palo +} //namespace doris diff --git a/be/src/exec/sort_exec_exprs.h b/be/src/exec/sort_exec_exprs.h index 8730ca7b0c381b..d78f7f7f955c97 100644 --- a/be/src/exec/sort_exec_exprs.h +++ b/be/src/exec/sort_exec_exprs.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef INF_PALO_QE_SRC_BE_EXEC_SORT_EXEC_EXPRS_H -#define INF_PALO_QE_SRC_BE_EXEC_SORT_EXEC_EXPRS_H +#ifndef INF_DORIS_QE_SRC_BE_EXEC_SORT_EXEC_EXPRS_H +#define INF_DORIS_QE_SRC_BE_EXEC_SORT_EXEC_EXPRS_H #include "exprs/expr.h" #include "runtime/runtime_state.h" -namespace palo { +namespace doris { class MemTracker; diff --git a/be/src/exec/sort_node.cpp b/be/src/exec/sort_node.cpp index 1314498094d2cf..71a42c85f7ebf0 100644 --- a/be/src/exec/sort_node.cpp +++ b/be/src/exec/sort_node.cpp @@ -21,7 +21,7 @@ #include "runtime/runtime_state.h" // #include "runtime/sorted_run_merger.h" -namespace palo { +namespace doris { SortNode::SortNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : ExecNode(pool, tnode, descs), diff --git a/be/src/exec/sort_node.h b/be/src/exec/sort_node.h index 1ec43e839817ce..e1de714a0d40a1 100644 --- a/be/src/exec/sort_node.h +++ b/be/src/exec/sort_node.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef INF_PALO_QE_SRC_BE_EXEC_SORT_NODE_H -#define INF_PALO_QE_SRC_BE_EXEC_SORT_NODE_H +#ifndef INF_DORIS_QE_SRC_BE_EXEC_SORT_NODE_H +#define INF_DORIS_QE_SRC_BE_EXEC_SORT_NODE_H #include "exec/exec_node.h" #include "exec/sort_exec_exprs.h" #include "runtime/merge_sorter.h" #include "runtime/buffered_block_mgr.h" -namespace palo { +namespace doris { // Node that implements a full sort of its input with a fixed memory budget, spilling // to disk if the input is larger than available memory. diff --git a/be/src/exec/spill_sort_node.cc b/be/src/exec/spill_sort_node.cc index 17e2642940f5fd..00df4cd764ba94 100644 --- a/be/src/exec/spill_sort_node.cc +++ b/be/src/exec/spill_sort_node.cc @@ -22,7 +22,7 @@ #include "runtime/sorted_run_merger.h" #include "util/debug_util.h" -namespace palo { +namespace doris { SpillSortNode::SpillSortNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : ExecNode(pool, tnode, descs), @@ -174,4 +174,4 @@ Status SpillSortNode::sort_input(RuntimeState* state) { return Status::OK; } -} // end namespace palo +} // end namespace doris diff --git a/be/src/exec/spill_sort_node.h b/be/src/exec/spill_sort_node.h index f039b17fb908c0..b3b9157c6d3e02 100644 --- a/be/src/exec/spill_sort_node.h +++ b/be/src/exec/spill_sort_node.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXEC_SPILL_SORT_NODE_H -#define BDG_PALO_BE_SRC_EXEC_SPILL_SORT_NODE_H +#ifndef DORIS_BE_SRC_EXEC_SPILL_SORT_NODE_H +#define DORIS_BE_SRC_EXEC_SPILL_SORT_NODE_H #include "exec/exec_node.h" #include "exec/sort_exec_exprs.h" #include "runtime/spill_sorter.h" #include "runtime/buffered_block_mgr2.h" -namespace palo { +namespace doris { // Node that implements a full sort of its input with a fixed memory budget, spilling // to disk if the input is larger than available memory. @@ -74,6 +74,6 @@ class SpillSortNode : public ExecNode { ///////////////////////////////////////// }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_EXEC_SPILL_SORT_NODE_H +#endif // DORIS_BE_SRC_EXEC_SPILL_SORT_NODE_H diff --git a/be/src/exec/text_converter.cpp b/be/src/exec/text_converter.cpp index 66f0806f60d3aa..b4f46dfc72595a 100644 --- a/be/src/exec/text_converter.cpp +++ b/be/src/exec/text_converter.cpp @@ -25,7 +25,7 @@ #include "text_converter.h" #include "util/string_parser.hpp" -namespace palo { +namespace doris { TextConverter::TextConverter(char escape_char) : _escape_char(escape_char) { diff --git a/be/src/exec/text_converter.h b/be/src/exec/text_converter.h index 140b8fde38830c..0832a01a4d8a9d 100644 --- a/be/src/exec/text_converter.h +++ b/be/src/exec/text_converter.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_H +#define DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_H #include "runtime/runtime_state.h" -namespace palo { +namespace doris { class MemPool; class SlotDescriptor; diff --git a/be/src/exec/text_converter.hpp b/be/src/exec/text_converter.hpp index f8c6928c5dab5d..3ddbc0a081205c 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 BDG_PALO_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_HPP -#define BDG_PALO_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_HPP +#ifndef DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_HPP +#define DORIS_BE_SRC_QUERY_EXEC_TEXT_CONVERTER_HPP #include "text_converter.h" @@ -32,7 +32,7 @@ #include "util/string_parser.hpp" #include "olap/utils.h" -namespace palo { +namespace doris { // Note: this function has a codegen'd version. Changing this function requires // corresponding changes to CodegenWriteSlot. diff --git a/be/src/exec/topn_node.cpp b/be/src/exec/topn_node.cpp index f17c25efb1206a..1fbb96a48ebe2c 100644 --- a/be/src/exec/topn_node.cpp +++ b/be/src/exec/topn_node.cpp @@ -34,7 +34,7 @@ #include "util/tuple_row_compare.h" #include -namespace palo { +namespace doris { TopNNode::TopNNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : ExecNode(pool, tnode, descs), diff --git a/be/src/exec/topn_node.h b/be/src/exec/topn_node.h index 3694eac417800a..1d5ad3002e7706 100644 --- a/be/src/exec/topn_node.h +++ b/be/src/exec/topn_node.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXEC_TOPN_NODE_H -#define BDG_PALO_BE_SRC_QUERY_EXEC_TOPN_NODE_H +#ifndef DORIS_BE_SRC_QUERY_EXEC_TOPN_NODE_H +#define DORIS_BE_SRC_QUERY_EXEC_TOPN_NODE_H #include #include @@ -25,7 +25,7 @@ #include "runtime/descriptors.h" #include "util/tuple_row_compare.h" -namespace palo { +namespace doris { class MemPool; class RuntimeState; diff --git a/be/src/exec/union_node.cpp b/be/src/exec/union_node.cpp index 26b004ed883e33..5e07c3a36a0ac8 100644 --- a/be/src/exec/union_node.cpp +++ b/be/src/exec/union_node.cpp @@ -32,7 +32,7 @@ using namespace llvm; -namespace palo { +namespace doris { UnionNode::UnionNode(ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) diff --git a/be/src/exec/union_node.h b/be/src/exec/union_node.h index 509b1dcc07813a..b12fb597a15995 100644 --- a/be/src/exec/union_node.h +++ b/be/src/exec/union_node.h @@ -19,12 +19,12 @@ #include -#include "codegen/palo_ir.h" +#include "codegen/doris_ir.h" #include "exec/exec_node.h" #include "runtime/row_batch.h" #include "runtime/runtime_state.h" -namespace palo { +namespace doris { class DescriptorTbl; class ExprContext; diff --git a/be/src/exec/union_node_ir.cpp b/be/src/exec/union_node_ir.cpp index d56fe023ae1a52..1f656ac064dee0 100644 --- a/be/src/exec/union_node_ir.cpp +++ b/be/src/exec/union_node_ir.cpp @@ -18,7 +18,7 @@ #include "exec/union_node.h" #include "runtime/tuple_row.h" -namespace palo { +namespace doris { void IR_ALWAYS_INLINE UnionNode::materialize_exprs(const std::vector& exprs, TupleRow* row, uint8_t* tuple_buf, RowBatch* dst_batch) { diff --git a/be/src/exprs/agg_fn.cc b/be/src/exprs/agg_fn.cc index 5c46be71f18f23..fd81204e1e8672 100644 --- a/be/src/exprs/agg_fn.cc +++ b/be/src/exprs/agg_fn.cc @@ -25,10 +25,10 @@ #include "common/names.h" -using namespace palo_udf; +using namespace doris_udf; using namespace llvm; -namespace palo { +namespace doris { AggFn::AggFn(const TExprNode& tnode, const SlotDescriptor& intermediate_slot_desc, const SlotDescriptor& output_slot_desc) diff --git a/be/src/exprs/agg_fn.h b/be/src/exprs/agg_fn.h index 046f74ce7c32ae..92705117cb4166 100644 --- a/be/src/exprs/agg_fn.h +++ b/be/src/exprs/agg_fn.h @@ -15,16 +15,16 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_NEW_EXPRS_AGG_FN_H -#define BDG_PALO_BE_SRC_QUERY_NEW_EXPRS_AGG_FN_H +#ifndef DORIS_BE_SRC_QUERY_NEW_EXPRS_AGG_FN_H +#define DORIS_BE_SRC_QUERY_NEW_EXPRS_AGG_FN_H #include "exprs/expr.h" #include "runtime/descriptors.h" #include "udf/udf.h" -namespace palo { +namespace doris { -using palo_udf::FunctionContext; +using doris_udf::FunctionContext; class LlvmCodeGen; class MemPool; diff --git a/be/src/exprs/agg_fn_evaluator.cpp b/be/src/exprs/agg_fn_evaluator.cpp index 5ae340a2f2bba9..6653bc0abbad83 100755 --- a/be/src/exprs/agg_fn_evaluator.cpp +++ b/be/src/exprs/agg_fn_evaluator.cpp @@ -32,20 +32,20 @@ #include "thrift/protocol/TDebugProtocol.h" #include "runtime/raw_value.h" -namespace palo { -using palo_udf::FunctionContext; -using palo_udf::BooleanVal; -using palo_udf::TinyIntVal; -using palo_udf::SmallIntVal; -using palo_udf::IntVal; -using palo_udf::BigIntVal; -using palo_udf::LargeIntVal; -using palo_udf::FloatVal; -using palo_udf::DoubleVal; -using palo_udf::DecimalVal; -using palo_udf::DateTimeVal; -using palo_udf::StringVal; -using palo_udf::AnyVal; +namespace doris { +using doris_udf::FunctionContext; +using doris_udf::BooleanVal; +using doris_udf::TinyIntVal; +using doris_udf::SmallIntVal; +using doris_udf::IntVal; +using doris_udf::BigIntVal; +using doris_udf::LargeIntVal; +using doris_udf::FloatVal; +using doris_udf::DoubleVal; +using doris_udf::DecimalVal; +using doris_udf::DateTimeVal; +using doris_udf::StringVal; +using doris_udf::AnyVal; // typedef for builtin aggregate functions. Unfortunately, these type defs don't // really work since the actual builtin is implemented not in terms of the base diff --git a/be/src/exprs/agg_fn_evaluator.h b/be/src/exprs/agg_fn_evaluator.h index 5c32cea9e492d1..3c459409e313cd 100755 --- a/be/src/exprs/agg_fn_evaluator.h +++ b/be/src/exprs/agg_fn_evaluator.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_AGG_FN_EVALUATOR_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_AGG_FN_EVALUATOR_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_AGG_FN_EVALUATOR_H +#define DORIS_BE_SRC_QUERY_EXPRS_AGG_FN_EVALUATOR_H #include #include @@ -32,7 +32,7 @@ #include "exprs/expr_context.h" #include "runtime/tuple.h" -namespace palo { +namespace doris { class AggregationNode; class TExprNode; @@ -122,16 +122,16 @@ class AggFnEvaluator { // Updates the intermediate state dst based on adding the input src row. This can be // called either to drive the UDA's update() or merge() function depending on // is_merge_. That is, from the caller, it doesn't mater. - void add(palo_udf::FunctionContext* agg_fn_ctx, TupleRow* src, Tuple* dst); + void add(doris_udf::FunctionContext* agg_fn_ctx, TupleRow* src, Tuple* dst); // Updates the intermediate state dst to remove the input src row, i.e. undoes // add(src, dst). Only used internally for analytic fn builtins. - void remove(palo_udf::FunctionContext* agg_fn_ctx, TupleRow* src, Tuple* dst); + void remove(doris_udf::FunctionContext* agg_fn_ctx, TupleRow* src, Tuple* dst); // Puts the finalized value from Tuple* src in Tuple* dst just as finalize() does. // However, unlike finalize(), get_value() does not clean up state in src. get_value() // can be called repeatedly with the same src. Only used internally for analytic fn // builtins. - void get_value(palo_udf::FunctionContext* agg_fn_ctx, Tuple* src, Tuple* dst); + void get_value(doris_udf::FunctionContext* agg_fn_ctx, Tuple* src, Tuple* dst); // Functions for different phases of the aggregation. @@ -179,18 +179,18 @@ class AggFnEvaluator { void choose_update_or_merge(FunctionContext* agg_fn_ctx, TupleRow* row, Tuple* dst); static void add(const std::vector& evaluators, - const std::vector& fn_ctxs, TupleRow* src, Tuple* dst); + const std::vector& fn_ctxs, TupleRow* src, Tuple* dst); static void remove(const std::vector& evaluators, - const std::vector& fn_ctxs, TupleRow* src, Tuple* dst); + const std::vector& fn_ctxs, TupleRow* src, Tuple* dst); static void get_value(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* src, Tuple* dst); + const std::vector& fn_ctxs, Tuple* src, Tuple* dst); static void finalize(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* + const std::vector& fn_ctxs, Tuple* src, Tuple* dst); static void init(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* dst); + const std::vector& fn_ctxs, Tuple* dst); static void serialize(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* dst); + const std::vector& fn_ctxs, Tuple* dst); const std::string& fn_name() const { return _fn.name.function_name; @@ -242,16 +242,16 @@ class AggFnEvaluator { // Context to run the aggregate functions. // TODO: this and _pool make this not thread safe but they are easy to duplicate // per thread. - // boost::scoped_ptr _ctx; + // boost::scoped_ptr _ctx; // Created to a subclass of AnyVal for type(). We use this to convert values // from the UDA interface to the Expr interface. // These objects are allocated in the runtime state's object pool. // TODO: this is awful, remove this when exprs are updated. - std::vector _staging_input_vals; - palo_udf::AnyVal* _staging_intermediate_val; - palo_udf::AnyVal* _staging_merge_input_val; - // palo_udf::AnyVal* _staging_output_val; + std::vector _staging_input_vals; + doris_udf::AnyVal* _staging_intermediate_val; + doris_udf::AnyVal* _staging_merge_input_val; + // doris_udf::AnyVal* _staging_output_val; // Function ptrs to the aggregate function. This is either populated from the // opcode registry for builtins or from the external binary for native UDAs. @@ -296,34 +296,34 @@ class AggFnEvaluator { const SlotDescriptor* dst_slot_desc, Tuple* dst, void* fn); // Writes the result in src into dst pointed to by _output_slot_desc - void set_output_slot(const palo_udf::AnyVal* src, const SlotDescriptor* dst_slot_desc, + void set_output_slot(const doris_udf::AnyVal* src, const SlotDescriptor* dst_slot_desc, Tuple* dst); // Sets 'dst' to the value from 'slot'. - void set_any_val(const void* slot, const TypeDescriptor& type, palo_udf::AnyVal* dst); + void set_any_val(const void* slot, const TypeDescriptor& type, doris_udf::AnyVal* dst); }; inline void AggFnEvaluator::add( - palo_udf::FunctionContext* agg_fn_ctx, TupleRow* row, Tuple* dst) { + doris_udf::FunctionContext* agg_fn_ctx, TupleRow* row, Tuple* dst) { agg_fn_ctx->impl()->increment_num_updates(); update(agg_fn_ctx, row, dst, _is_merge ? _merge_fn : _update_fn, NULL); } inline void AggFnEvaluator::remove( - palo_udf::FunctionContext* agg_fn_ctx, TupleRow* row, Tuple* dst) { + doris_udf::FunctionContext* agg_fn_ctx, TupleRow* row, Tuple* dst) { agg_fn_ctx->impl()->increment_num_removes(); update(agg_fn_ctx, row, dst, _remove_fn, NULL); } inline void AggFnEvaluator::finalize( - palo_udf::FunctionContext* agg_fn_ctx, Tuple* src, Tuple* dst) { + doris_udf::FunctionContext* agg_fn_ctx, Tuple* src, Tuple* dst) { serialize_or_finalize(agg_fn_ctx, src, _output_slot_desc, dst, _finalize_fn); } inline void AggFnEvaluator::get_value( - palo_udf::FunctionContext* agg_fn_ctx, Tuple* src, Tuple* dst) { + doris_udf::FunctionContext* agg_fn_ctx, Tuple* src, Tuple* dst) { serialize_or_finalize(agg_fn_ctx, src, _output_slot_desc, dst, _get_value_fn); } inline void AggFnEvaluator::init(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* dst) { + const std::vector& fn_ctxs, Tuple* dst) { DCHECK_EQ(evaluators.size(), fn_ctxs.size()); for (int i = 0; i < evaluators.size(); ++i) { @@ -331,7 +331,7 @@ inline void AggFnEvaluator::init(const std::vector& evaluators, } } inline void AggFnEvaluator::add(const std::vector& evaluators, - const std::vector& fn_ctxs, TupleRow* src, Tuple* dst) { + const std::vector& fn_ctxs, TupleRow* src, Tuple* dst) { DCHECK_EQ(evaluators.size(), fn_ctxs.size()); for (int i = 0; i < evaluators.size(); ++i) { @@ -339,7 +339,7 @@ inline void AggFnEvaluator::add(const std::vector& evaluators, } } inline void AggFnEvaluator::remove(const std::vector& evaluators, - const std::vector& fn_ctxs, TupleRow* src, Tuple* dst) { + const std::vector& fn_ctxs, TupleRow* src, Tuple* dst) { DCHECK_EQ(evaluators.size(), fn_ctxs.size()); for (int i = 0; i < evaluators.size(); ++i) { @@ -347,7 +347,7 @@ inline void AggFnEvaluator::remove(const std::vector& evaluator } } inline void AggFnEvaluator::serialize(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* dst) { + const std::vector& fn_ctxs, Tuple* dst) { DCHECK_EQ(evaluators.size(), fn_ctxs.size()); for (int i = 0; i < evaluators.size(); ++i) { @@ -355,7 +355,7 @@ inline void AggFnEvaluator::serialize(const std::vector& evalua } } inline void AggFnEvaluator::get_value(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* src, Tuple* dst) { + const std::vector& fn_ctxs, Tuple* src, Tuple* dst) { DCHECK_EQ(evaluators.size(), fn_ctxs.size()); for (int i = 0; i < evaluators.size(); ++i) { @@ -363,7 +363,7 @@ inline void AggFnEvaluator::get_value(const std::vector& evalua } } inline void AggFnEvaluator::finalize(const std::vector& evaluators, - const std::vector& fn_ctxs, Tuple* src, Tuple* dst) { + const std::vector& fn_ctxs, Tuple* src, Tuple* dst) { DCHECK_EQ(evaluators.size(), fn_ctxs.size()); for (int i = 0; i < evaluators.size(); ++i) { diff --git a/be/src/exprs/aggregate_functions.cpp b/be/src/exprs/aggregate_functions.cpp index 4e07fcf02596ed..0a7821cf4e1c7c 100644 --- a/be/src/exprs/aggregate_functions.cpp +++ b/be/src/exprs/aggregate_functions.cpp @@ -31,20 +31,20 @@ // TODO: this file should be cross compiled and then all of the builtin // aggregate functions will have a codegen enabled path. Then we can remove // the custom code in aggregation node. -namespace palo { -using palo_udf::FunctionContext; -using palo_udf::BooleanVal; -using palo_udf::TinyIntVal; -using palo_udf::SmallIntVal; -using palo_udf::IntVal; -using palo_udf::BigIntVal; -using palo_udf::LargeIntVal; -using palo_udf::FloatVal; -using palo_udf::DoubleVal; -using palo_udf::DecimalVal; -using palo_udf::DateTimeVal; -using palo_udf::StringVal; -using palo_udf::AnyVal; +namespace doris { +using doris_udf::FunctionContext; +using doris_udf::BooleanVal; +using doris_udf::TinyIntVal; +using doris_udf::SmallIntVal; +using doris_udf::IntVal; +using doris_udf::BigIntVal; +using doris_udf::LargeIntVal; +using doris_udf::FloatVal; +using doris_udf::DoubleVal; +using doris_udf::DecimalVal; +using doris_udf::DateTimeVal; +using doris_udf::StringVal; +using doris_udf::AnyVal; // Delimiter to use if the separator is NULL. static const StringVal DEFAULT_STRING_CONCAT_DELIM((uint8_t*)", ", 2); @@ -225,7 +225,7 @@ void AggregateFunctions::avg_remove(FunctionContext* ctx, const T& src, StringVa DCHECK_GE(avg->count, 0); } -void AggregateFunctions::decimal_avg_remove(palo_udf::FunctionContext* ctx, +void AggregateFunctions::decimal_avg_remove(doris_udf::FunctionContext* ctx, const DecimalVal& src, StringVal* dst) { // Remove doesn't need to explicitly check the number of calls to Update() or Remove() @@ -1005,7 +1005,7 @@ void AggregateFunctions::hll_union_agg_merge(FunctionContext* ctx, const StringV } } -palo_udf::StringVal AggregateFunctions::hll_union_agg_finalize(palo_udf::FunctionContext* ctx, +doris_udf::StringVal AggregateFunctions::hll_union_agg_finalize(doris_udf::FunctionContext* ctx, const StringVal& src) { double estimate = hll_algorithm(src); std::stringstream out; @@ -1016,7 +1016,7 @@ palo_udf::StringVal AggregateFunctions::hll_union_agg_finalize(palo_udf::Functio return result_str; } -int64_t AggregateFunctions::hll_algorithm(const palo_udf::StringVal& src) { +int64_t AggregateFunctions::hll_algorithm(const doris_udf::StringVal& src) { DCHECK(!src.is_null); DCHECK_EQ(src.len, HLL_SETS_BYTES_NUM); @@ -2019,28 +2019,28 @@ template void AggregateFunctions::sum_remove( template void AggregateFunctions::sum_remove( FunctionContext*, const LargeIntVal& src, LargeIntVal* dst); -template void AggregateFunctions::avg_update( - palo_udf::FunctionContext*, palo_udf::BooleanVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_update( - palo_udf::FunctionContext*, palo_udf::IntVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_remove( - palo_udf::FunctionContext*, palo_udf::IntVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_update( - palo_udf::FunctionContext*, palo_udf::BigIntVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_remove( - palo_udf::FunctionContext*, palo_udf::BigIntVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_update( - palo_udf::FunctionContext*, palo_udf::FloatVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_remove( - palo_udf::FunctionContext*, palo_udf::FloatVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_update( - palo_udf::FunctionContext*, palo_udf::DoubleVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_remove( - palo_udf::FunctionContext*, palo_udf::DoubleVal const&, palo_udf::StringVal*); -//template void AggregateFunctions::AvgUpdate( -//palo_udf::FunctionContext*, palo_udf::LargeIntVal const&, palo_udf::StringVal*); -//template void AggregateFunctions::AvgRemove( -//palo_udf::FunctionContext*, palo_udf::LargeIntVal const&, palo_udf::StringVal*); +template void AggregateFunctions::avg_update( + doris_udf::FunctionContext*, doris_udf::BooleanVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_update( + doris_udf::FunctionContext*, doris_udf::IntVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_remove( + doris_udf::FunctionContext*, doris_udf::IntVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_update( + doris_udf::FunctionContext*, doris_udf::BigIntVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_remove( + doris_udf::FunctionContext*, doris_udf::BigIntVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_update( + doris_udf::FunctionContext*, doris_udf::FloatVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_remove( + doris_udf::FunctionContext*, doris_udf::FloatVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_update( + doris_udf::FunctionContext*, doris_udf::DoubleVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_remove( + doris_udf::FunctionContext*, doris_udf::DoubleVal const&, doris_udf::StringVal*); +//template void AggregateFunctions::AvgUpdate( +//doris_udf::FunctionContext*, doris_udf::LargeIntVal const&, doris_udf::StringVal*); +//template void AggregateFunctions::AvgRemove( +//doris_udf::FunctionContext*, doris_udf::LargeIntVal const&, doris_udf::StringVal*); template void AggregateFunctions::sum( FunctionContext*, const BooleanVal& src, BigIntVal* dst); @@ -2074,16 +2074,16 @@ template void AggregateFunctions::min( template void AggregateFunctions::min( FunctionContext*, const StringVal& src, StringVal* dst); -template void AggregateFunctions::avg_remove( - palo_udf::FunctionContext*, palo_udf::BooleanVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_update( - palo_udf::FunctionContext*, palo_udf::TinyIntVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_remove( - palo_udf::FunctionContext*, palo_udf::TinyIntVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_update( - palo_udf::FunctionContext*, palo_udf::SmallIntVal const&, palo_udf::StringVal*); -template void AggregateFunctions::avg_remove( - palo_udf::FunctionContext*, palo_udf::SmallIntVal const&, palo_udf::StringVal*); +template void AggregateFunctions::avg_remove( + doris_udf::FunctionContext*, doris_udf::BooleanVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_update( + doris_udf::FunctionContext*, doris_udf::TinyIntVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_remove( + doris_udf::FunctionContext*, doris_udf::TinyIntVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_update( + doris_udf::FunctionContext*, doris_udf::SmallIntVal const&, doris_udf::StringVal*); +template void AggregateFunctions::avg_remove( + doris_udf::FunctionContext*, doris_udf::SmallIntVal const&, doris_udf::StringVal*); template void AggregateFunctions::max( FunctionContext*, const BooleanVal& src, BooleanVal* dst); @@ -2309,9 +2309,9 @@ template void AggregateFunctions::first_val_rewrite_update( //template void AggregateFunctions::FirstValUpdate( -// palo_udf::FunctionContext*, impala::StringValue const&, impala::StringValue*); -template void AggregateFunctions::first_val_update( - palo_udf::FunctionContext*, palo_udf::DecimalVal const&, palo_udf::DecimalVal*); +// doris_udf::FunctionContext*, impala::StringValue const&, impala::StringValue*); +template void AggregateFunctions::first_val_update( + doris_udf::FunctionContext*, doris_udf::DecimalVal const&, doris_udf::DecimalVal*); template void AggregateFunctions::last_val_update( FunctionContext*, const BooleanVal& src, BooleanVal* dst); diff --git a/be/src/exprs/aggregate_functions.h b/be/src/exprs/aggregate_functions.h index 216eef440dcda8..44c5057bb05b6e 100644 --- a/be/src/exprs/aggregate_functions.h +++ b/be/src/exprs/aggregate_functions.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_AGGREGATE_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_AGGREGATE_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_AGGREGATE_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_AGGREGATE_FUNCTIONS_H //#include "exprs/opcode_registry.h" #include "udf/udf.h" #include "udf/udf_internal.h" #include "olap/hll.h" -namespace palo { +namespace doris { class HllSetResolver; class HybirdSetBase; @@ -37,104 +37,104 @@ class HybirdSetBase; class AggregateFunctions { public: // Initializes dst to NULL. - static void init_null(palo_udf::FunctionContext*, palo_udf::AnyVal* dst); + static void init_null(doris_udf::FunctionContext*, doris_udf::AnyVal* dst); // Initializes dst to NULL and sets dst->ptr to NULL. - static void init_null_string(palo_udf::FunctionContext* c, palo_udf::StringVal* dst); + static void init_null_string(doris_udf::FunctionContext* c, doris_udf::StringVal* dst); // Initializes dst to 0. template - static void init_zero(palo_udf::FunctionContext*, T* dst); + static void init_zero(doris_udf::FunctionContext*, T* dst); template - static void sum_remove(palo_udf::FunctionContext* ctx, const SRC_VAL& src, DST_VAL* dst); + static void sum_remove(doris_udf::FunctionContext* ctx, const SRC_VAL& src, DST_VAL* dst); - // palo_udf::StringVal GetValue() function that returns a copy of src - static palo_udf::StringVal string_val_get_value(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& src); - static palo_udf::StringVal string_val_serialize_or_finalize(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& src); + // doris_udf::StringVal GetValue() function that returns a copy of src + static doris_udf::StringVal string_val_get_value(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& src); + static doris_udf::StringVal string_val_serialize_or_finalize(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& src); // Implementation of Count and Count(*) - static void count_update(palo_udf::FunctionContext*, const palo_udf::AnyVal& src, - palo_udf::BigIntVal* dst); - static void count_merge(palo_udf::FunctionContext*, - const palo_udf::BigIntVal& src, palo_udf::BigIntVal* dst); - static void count_remove(palo_udf::FunctionContext*, - const palo_udf::AnyVal& src, palo_udf::BigIntVal* dst); - static void count_star_update(palo_udf::FunctionContext*, palo_udf::BigIntVal* dst); + static void count_update(doris_udf::FunctionContext*, const doris_udf::AnyVal& src, + doris_udf::BigIntVal* dst); + static void count_merge(doris_udf::FunctionContext*, + const doris_udf::BigIntVal& src, doris_udf::BigIntVal* dst); + static void count_remove(doris_udf::FunctionContext*, + const doris_udf::AnyVal& src, doris_udf::BigIntVal* dst); + static void count_star_update(doris_udf::FunctionContext*, doris_udf::BigIntVal* dst); static void count_star_remove(FunctionContext*, BigIntVal* dst); // Implementation of Avg. // TODO: Change this to use a fixed-sized BufferVal as intermediate type. - static void avg_init(palo_udf::FunctionContext* ctx, palo_udf::StringVal* dst); + static void avg_init(doris_udf::FunctionContext* ctx, doris_udf::StringVal* dst); template - static void avg_update(palo_udf::FunctionContext* ctx, const T& src, - palo_udf::StringVal* dst); + static void avg_update(doris_udf::FunctionContext* ctx, const T& src, + doris_udf::StringVal* dst); template - static void avg_remove(palo_udf::FunctionContext* ctx, const T& src, - palo_udf::StringVal* dst); + static void avg_remove(doris_udf::FunctionContext* ctx, const T& src, + doris_udf::StringVal* dst); static void avg_merge(FunctionContext* ctx, const StringVal& src, StringVal* dst); - static palo_udf::DoubleVal avg_get_value(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& val); - static palo_udf::DoubleVal avg_finalize(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& val); + static doris_udf::DoubleVal avg_get_value(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& val); + static doris_udf::DoubleVal avg_finalize(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& val); // Avg for timestamp. Uses avg_init() and AvgMerge(). - static void timestamp_avg_update(palo_udf::FunctionContext* ctx, - const palo_udf::DateTimeVal& src, - palo_udf::StringVal* dst); - static void timestamp_avg_remove(palo_udf::FunctionContext* ctx, - const palo_udf::DateTimeVal& src, - palo_udf::StringVal* dst); - static palo_udf::DateTimeVal timestamp_avg_get_value(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& val); - static palo_udf::DateTimeVal timestamp_avg_finalize(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& val); + static void timestamp_avg_update(doris_udf::FunctionContext* ctx, + const doris_udf::DateTimeVal& src, + doris_udf::StringVal* dst); + static void timestamp_avg_remove(doris_udf::FunctionContext* ctx, + const doris_udf::DateTimeVal& src, + doris_udf::StringVal* dst); + static doris_udf::DateTimeVal timestamp_avg_get_value(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& val); + static doris_udf::DateTimeVal timestamp_avg_finalize(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& val); // Avg for decimals. - static void decimal_avg_init(palo_udf::FunctionContext* ctx, palo_udf::StringVal* dst); - static void decimal_avg_update(palo_udf::FunctionContext* ctx, - const palo_udf::DecimalVal& src, - palo_udf::StringVal* dst); - static void decimal_avg_merge(FunctionContext* ctx, const palo_udf::StringVal& src, - palo_udf::StringVal* dst); - static void decimal_avg_remove(palo_udf::FunctionContext* ctx, - const palo_udf::DecimalVal& src, - palo_udf::StringVal* dst); - - // static void decimal_avg_add_or_remove(palo_udf::FunctionContext* ctx, - // const palo_udf::DecimalVal& src, - // palo_udf::StringVal* dst, bool remove); - // static void decimal_avg_add_or_remove(palo_udf::FunctionContext* ctx, - // const palo_udf::DecimalVal& src, - // palo_udf::StringVal* dst) { + static void decimal_avg_init(doris_udf::FunctionContext* ctx, doris_udf::StringVal* dst); + static void decimal_avg_update(doris_udf::FunctionContext* ctx, + const doris_udf::DecimalVal& src, + doris_udf::StringVal* dst); + static void decimal_avg_merge(FunctionContext* ctx, const doris_udf::StringVal& src, + doris_udf::StringVal* dst); + static void decimal_avg_remove(doris_udf::FunctionContext* ctx, + const doris_udf::DecimalVal& src, + doris_udf::StringVal* dst); + + // static void decimal_avg_add_or_remove(doris_udf::FunctionContext* ctx, + // const doris_udf::DecimalVal& src, + // doris_udf::StringVal* dst, bool remove); + // static void decimal_avg_add_or_remove(doris_udf::FunctionContext* ctx, + // const doris_udf::DecimalVal& src, + // doris_udf::StringVal* dst) { // return decimal_avg_add_or_remove(ctx, src, dst, false); // } - static palo_udf::DecimalVal decimal_avg_get_value(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& val); - static palo_udf::DecimalVal decimal_avg_finalize(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& val); + static doris_udf::DecimalVal decimal_avg_get_value(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& val); + static doris_udf::DecimalVal decimal_avg_finalize(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& val); // SumUpdate, SumMerge template - static void sum(palo_udf::FunctionContext*, const SRC_VAL& src, DST_VAL* dst); + static void sum(doris_udf::FunctionContext*, const SRC_VAL& src, DST_VAL* dst); // MinUpdate/MinMerge template - static void min(palo_udf::FunctionContext*, const T& src, T* dst); + static void min(doris_udf::FunctionContext*, const T& src, T* dst); // MaxUpdate/MaxMerge template - static void max(palo_udf::FunctionContext*, const T& src, T* dst); + static void max(doris_udf::FunctionContext*, const T& src, T* dst); // String concat static void string_concat( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src, - const palo_udf::StringVal& separator, - palo_udf::StringVal* result); + doris_udf::FunctionContext*, + const doris_udf::StringVal& src, + const doris_udf::StringVal& separator, + doris_udf::StringVal* result); /// String concat static void string_concat_update(FunctionContext*, @@ -149,45 +149,45 @@ dst); // Probabilistic Counting (PC), a distinct estimate algorithms. // Probabilistic Counting with Stochastic Averaging (PCSA) is a variant // of PC that runs faster and usually gets equally accurate results. - static void pc_init(palo_udf::FunctionContext*, palo_udf::StringVal* slot); + static void pc_init(doris_udf::FunctionContext*, doris_udf::StringVal* slot); template - static void pc_update(palo_udf::FunctionContext*, const T& src, palo_udf::StringVal* dst); + static void pc_update(doris_udf::FunctionContext*, const T& src, doris_udf::StringVal* dst); template - static void pcsa_update(palo_udf::FunctionContext*, const T& src, palo_udf::StringVal* dst); + static void pcsa_update(doris_udf::FunctionContext*, const T& src, doris_udf::StringVal* dst); static void pc_merge( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src, - palo_udf::StringVal* dst); + doris_udf::FunctionContext*, + const doris_udf::StringVal& src, + doris_udf::StringVal* dst); - static palo_udf::StringVal pc_finalize( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src); + static doris_udf::StringVal pc_finalize( + doris_udf::FunctionContext*, + const doris_udf::StringVal& src); - static palo_udf::StringVal pcsa_finalize( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src); + static doris_udf::StringVal pcsa_finalize( + doris_udf::FunctionContext*, + const doris_udf::StringVal& src); // Hyperloglog distinct estimate algorithm. // See these papers for more details. // 1) Hyperloglog: The analysis of a near-optimal cardinality estimation // algorithm (2007) // 2) HyperLogLog in Practice (paper from google with some improvements) - static void hll_init(palo_udf::FunctionContext*, palo_udf::StringVal* slot); + static void hll_init(doris_udf::FunctionContext*, doris_udf::StringVal* slot); template - static void hll_update(palo_udf::FunctionContext*, const T& src, palo_udf::StringVal* dst); + static void hll_update(doris_udf::FunctionContext*, const T& src, doris_udf::StringVal* dst); static void hll_merge( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src, - palo_udf::StringVal* dst); - static palo_udf::StringVal hll_finalize( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src); + doris_udf::FunctionContext*, + const doris_udf::StringVal& src, + doris_udf::StringVal* dst); + static doris_udf::StringVal hll_finalize( + doris_udf::FunctionContext*, + const doris_udf::StringVal& src); // count and sum distinct algorithm in multi distinct template - static void count_or_sum_distinct_numeric_init(palo_udf::FunctionContext* ctx, palo_udf::StringVal* dst); + static void count_or_sum_distinct_numeric_init(doris_udf::FunctionContext* ctx, doris_udf::StringVal* dst); template static void count_or_sum_distinct_numeric_update(FunctionContext* ctx, T& src, StringVal* dst); template @@ -198,14 +198,14 @@ dst); static BigIntVal count_or_sum_distinct_numeric_finalize(FunctionContext* ctx, const StringVal& state_sv); // count distinct in multi distinct for string - static void count_distinct_string_init(palo_udf::FunctionContext* ctx, palo_udf::StringVal* dst); + static void count_distinct_string_init(doris_udf::FunctionContext* ctx, doris_udf::StringVal* dst); static void count_distinct_string_update(FunctionContext* ctx, StringVal& src, StringVal* dst); static void count_distinct_string_merge(FunctionContext* ctx, StringVal& src, StringVal* dst); static StringVal count_distinct_string_serialize(FunctionContext* ctx, const StringVal& state_sv); static BigIntVal count_distinct_string_finalize(FunctionContext* ctx, const StringVal& state_sv); // count distinct in multi distinct for decimal - static void count_or_sum_distinct_decimal_init(palo_udf::FunctionContext* ctx, palo_udf::StringVal* dst); + static void count_or_sum_distinct_decimal_init(doris_udf::FunctionContext* ctx, doris_udf::StringVal* dst); static void count_or_sum_distinct_decimal_update(FunctionContext* ctx, DecimalVal& src, StringVal* dst); static void count_or_sum_distinct_decimal_merge(FunctionContext* ctx, StringVal& src, StringVal* dst); static StringVal count_or_sum_distinct_decimal_serialize(FunctionContext* ctx, const StringVal& state_sv); @@ -213,7 +213,7 @@ dst); static DecimalVal sum_distinct_decimal_finalize(FunctionContext* ctx, const StringVal& state_sv); // count distinct in multi disticnt for Date - static void count_distinct_date_init(palo_udf::FunctionContext* ctx, palo_udf::StringVal* dst); + static void count_distinct_date_init(doris_udf::FunctionContext* ctx, doris_udf::StringVal* dst); static void count_distinct_date_update(FunctionContext* ctx, DateTimeVal& src, StringVal* dst); static void count_distinct_date_merge(FunctionContext* ctx, StringVal& src, StringVal* dst); static StringVal count_distinct_date_serialize(FunctionContext* ctx, const StringVal& state_sv); @@ -253,74 +253,74 @@ dst); /// case, Finalize() is only called at the end to clean up. // Initializes the state for RANK and DENSE_RANK - static void rank_init(palo_udf::FunctionContext*, palo_udf::StringVal* slot); + static void rank_init(doris_udf::FunctionContext*, doris_udf::StringVal* slot); // Update state for RANK - static void rank_update(palo_udf::FunctionContext*, palo_udf::StringVal* dst); + static void rank_update(doris_udf::FunctionContext*, doris_udf::StringVal* dst); // Update state for DENSE_RANK - static void dense_rank_update(palo_udf::FunctionContext*, palo_udf::StringVal* dst); + static void dense_rank_update(doris_udf::FunctionContext*, doris_udf::StringVal* dst); // Returns the result for RANK and prepares the state for the next Update(). - static palo_udf::BigIntVal rank_get_value(palo_udf::FunctionContext*, - palo_udf::StringVal& src); + static doris_udf::BigIntVal rank_get_value(doris_udf::FunctionContext*, + doris_udf::StringVal& src); // Returns the result for DENSE_RANK and prepares the state for the next Update(). - // TODO: Implement DENSE_RANK with a single palo_udf::BigIntVal. Requires src can be modified, - // AggFnEvaluator would need to handle copying the src palo_udf::AnyVal back into the src slot. - static palo_udf::BigIntVal dense_rank_get_value(palo_udf::FunctionContext*, - palo_udf::StringVal& src); + // TODO: Implement DENSE_RANK with a single doris_udf::BigIntVal. Requires src can be modified, + // AggFnEvaluator would need to handle copying the src doris_udf::AnyVal back into the src slot. + static doris_udf::BigIntVal dense_rank_get_value(doris_udf::FunctionContext*, + doris_udf::StringVal& src); // Returns the result for RANK and DENSE_RANK and cleans up intermediate state in src. - static palo_udf::BigIntVal rank_finalize(palo_udf::FunctionContext*, - palo_udf::StringVal& src); + static doris_udf::BigIntVal rank_finalize(doris_udf::FunctionContext*, + doris_udf::StringVal& src); // Implements LAST_VALUE. template - static void last_val_update(palo_udf::FunctionContext*, const T& src, T* dst); + static void last_val_update(doris_udf::FunctionContext*, const T& src, T* dst); template - static void last_val_remove(palo_udf::FunctionContext*, const T& src, T* dst); + static void last_val_remove(doris_udf::FunctionContext*, const T& src, T* dst); // Implements FIRST_VALUE. template - static void first_val_update(palo_udf::FunctionContext*, const T& src, T* dst); + static void first_val_update(doris_udf::FunctionContext*, const T& src, T* dst); // Implements FIRST_VALUE for some windows that require rewrites during planning. - // The palo_udf::BigIntVal is unused by first_val_rewrite_update() (it is used by the + // The doris_udf::BigIntVal is unused by first_val_rewrite_update() (it is used by the // AnalyticEvalNode). template - static void first_val_rewrite_update(palo_udf::FunctionContext*, const T& src, - const palo_udf::BigIntVal&, T* dst); + static void first_val_rewrite_update(doris_udf::FunctionContext*, const T& src, + const doris_udf::BigIntVal&, T* dst); // OffsetFn*() implement LAG and LEAD. Init() sets the default value (the last // constant parameter) as dst. template - static void offset_fn_init(palo_udf::FunctionContext*, T* dst); + static void offset_fn_init(doris_udf::FunctionContext*, T* dst); // Update() takes all the parameters to LEAD/LAG, including the integer offset and // the default value, neither which are needed by Update(). (The offset is already // used in the window for the analytic fn evaluation and the default value is set // in Init(). template - static void offset_fn_update(palo_udf::FunctionContext*, const T& src, - const palo_udf::BigIntVal&, const T&, T* dst); + static void offset_fn_update(doris_udf::FunctionContext*, const T& src, + const doris_udf::BigIntVal&, const T&, T* dst); // HLL value type calculate // init sets buffer - static void hll_union_agg_init(palo_udf::FunctionContext*, palo_udf::StringVal* slot); + static void hll_union_agg_init(doris_udf::FunctionContext*, doris_udf::StringVal* slot); // fill all register accroading to hll set type - static void hll_union_agg_update(palo_udf::FunctionContext*, const palo_udf::StringVal& src, - palo_udf::StringVal* dst); + static void hll_union_agg_update(doris_udf::FunctionContext*, const doris_udf::StringVal& src, + doris_udf::StringVal* dst); // merge the register value static void hll_union_agg_merge( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src, - palo_udf::StringVal* dst); + doris_udf::FunctionContext*, + const doris_udf::StringVal& src, + doris_udf::StringVal* dst); // return result - static palo_udf::StringVal hll_union_agg_finalize( - palo_udf::FunctionContext*, - const palo_udf::StringVal& src); + static doris_udf::StringVal hll_union_agg_finalize( + doris_udf::FunctionContext*, + const doris_udf::StringVal& src); // calculate result - static int64_t hll_algorithm(const palo_udf::StringVal& src); + static int64_t hll_algorithm(const doris_udf::StringVal& src); static void hll_union_parse_and_cal(HllSetResolver& resolver, StringVal* dst); }; diff --git a/be/src/exprs/anyval_util.cpp b/be/src/exprs/anyval_util.cpp index 6d4da37198cc84..4915fa631fd3c1 100755 --- a/be/src/exprs/anyval_util.cpp +++ b/be/src/exprs/anyval_util.cpp @@ -21,19 +21,19 @@ #include "runtime/mem_pool.h" #include "runtime/mem_tracker.h" -namespace palo { -using palo_udf::BooleanVal; -using palo_udf::TinyIntVal; -using palo_udf::SmallIntVal; -using palo_udf::IntVal; -using palo_udf::BigIntVal; -using palo_udf::LargeIntVal; -using palo_udf::FloatVal; -using palo_udf::DoubleVal; -using palo_udf::DecimalVal; -using palo_udf::DateTimeVal; -using palo_udf::StringVal; -using palo_udf::AnyVal; +namespace doris { +using doris_udf::BooleanVal; +using doris_udf::TinyIntVal; +using doris_udf::SmallIntVal; +using doris_udf::IntVal; +using doris_udf::BigIntVal; +using doris_udf::LargeIntVal; +using doris_udf::FloatVal; +using doris_udf::DoubleVal; +using doris_udf::DecimalVal; +using doris_udf::DateTimeVal; +using doris_udf::StringVal; +using doris_udf::AnyVal; Status allocate_any_val(RuntimeState* state, MemPool* pool, const TypeDescriptor& type, const std::string& mem_limit_exceeded_msg, AnyVal** result) { diff --git a/be/src/exprs/anyval_util.h b/be/src/exprs/anyval_util.h index 4d2e13dde7d799..0b2a81a433e4c5 100755 --- a/be/src/exprs/anyval_util.h +++ b/be/src/exprs/anyval_util.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_ANYVAL_UTIL_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_ANYVAL_UTIL_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_ANYVAL_UTIL_H +#define DORIS_BE_SRC_QUERY_EXPRS_ANYVAL_UTIL_H #include "codegen/llvm_codegen.h" #include "runtime/primitive_type.h" @@ -24,227 +24,227 @@ #include "util/hash_util.hpp" #include "common/status.h" -namespace palo { +namespace doris { class MemPool; // Utilities for AnyVals class AnyValUtil { public: - static uint32_t hash(const palo_udf::BooleanVal& v, int seed) { + static uint32_t hash(const doris_udf::BooleanVal& v, int seed) { return HashUtil::hash(&v.val, 1, seed); } - static uint32_t hash(const palo_udf::TinyIntVal& v, int seed) { + static uint32_t hash(const doris_udf::TinyIntVal& v, int seed) { return HashUtil::hash(&v.val, 1, seed); } - static uint32_t hash(const palo_udf::SmallIntVal& v, int seed) { + static uint32_t hash(const doris_udf::SmallIntVal& v, int seed) { return HashUtil::hash(&v.val, 2, seed); } - static uint32_t hash(const palo_udf::IntVal& v, int seed) { + static uint32_t hash(const doris_udf::IntVal& v, int seed) { return HashUtil::hash(&v.val, 4, seed); } - static uint32_t hash(const palo_udf::BigIntVal& v, int seed) { + static uint32_t hash(const doris_udf::BigIntVal& v, int seed) { return HashUtil::hash(&v.val, 8, seed); } - static uint32_t hash(const palo_udf::FloatVal& v, int seed) { + static uint32_t hash(const doris_udf::FloatVal& v, int seed) { return HashUtil::hash(&v.val, 4, seed); } - static uint32_t hash(const palo_udf::DoubleVal& v, int seed) { + static uint32_t hash(const doris_udf::DoubleVal& v, int seed) { return HashUtil::hash(&v.val, 8, seed); } - static uint32_t hash(const palo_udf::StringVal& v, int seed) { + static uint32_t hash(const doris_udf::StringVal& v, int seed) { return HashUtil::hash(v.ptr, v.len, seed); } - static uint32_t hash(const palo_udf::DateTimeVal& v, int seed) { + static uint32_t hash(const doris_udf::DateTimeVal& v, int seed) { DateTimeValue tv = DateTimeValue::from_datetime_val(v); return tv.hash(seed); } - static uint32_t hash(const palo_udf::DecimalVal& v, int seed) { + static uint32_t hash(const doris_udf::DecimalVal& v, int seed) { DecimalValue tv = DecimalValue::from_decimal_val(v); return tv.hash(seed); } - static uint32_t hash(const palo_udf::LargeIntVal& v, int seed) { + static uint32_t hash(const doris_udf::LargeIntVal& v, int seed) { return HashUtil::hash(&v.val, 8, seed); } - static uint64_t hash64(const palo_udf::BooleanVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::BooleanVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 1, seed); } - static uint64_t hash64(const palo_udf::TinyIntVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::TinyIntVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 1, seed); } - static uint64_t hash64(const palo_udf::SmallIntVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::SmallIntVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 2, seed); } - static uint64_t hash64(const palo_udf::IntVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::IntVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 4, seed); } - static uint64_t hash64(const palo_udf::BigIntVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::BigIntVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 8, seed); } - static uint64_t hash64(const palo_udf::FloatVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::FloatVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 4, seed); } - static uint64_t hash64(const palo_udf::DoubleVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::DoubleVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 8, seed); } - static uint64_t hash64(const palo_udf::StringVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::StringVal& v, int64_t seed) { return HashUtil::fnv_hash64(v.ptr, v.len, seed); } - static uint64_t hash64(const palo_udf::DateTimeVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::DateTimeVal& v, int64_t seed) { DateTimeValue tv = DateTimeValue::from_datetime_val(v); return HashUtil::fnv_hash64(&tv, 12, seed); } // TODO(lingbin): fix this method. can not use sizeof directly, because there are a lot of // storage way for one value. - static uint64_t hash64(const palo_udf::DecimalVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::DecimalVal& v, int64_t seed) { DecimalValue tv = DecimalValue::from_decimal_val(v); return HashUtil::fnv_hash64(&tv, sizeof(DecimalValue), seed); } - static uint64_t hash64(const palo_udf::LargeIntVal& v, int64_t seed) { + static uint64_t hash64(const doris_udf::LargeIntVal& v, int64_t seed) { return HashUtil::fnv_hash64(&v.val, 8, seed); } - static uint64_t hash64_murmur(const palo_udf::BooleanVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::BooleanVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 1, seed); } - static uint64_t hash64_murmur(const palo_udf::TinyIntVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::TinyIntVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 1, seed); } - static uint64_t hash64_murmur(const palo_udf::SmallIntVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::SmallIntVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 2, seed); } - static uint64_t hash64_murmur(const palo_udf::IntVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::IntVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 4, seed); } - static uint64_t hash64_murmur(const palo_udf::BigIntVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::BigIntVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 8, seed); } - static uint64_t hash64_murmur(const palo_udf::FloatVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::FloatVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 4, seed); } - static uint64_t hash64_murmur(const palo_udf::DoubleVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::DoubleVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 8, seed); } - static uint64_t hash64_murmur(const palo_udf::StringVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::StringVal& v, int64_t seed) { return HashUtil::murmur_hash64A(v.ptr, v.len, seed); } - static uint64_t hash64_murmur(const palo_udf::DateTimeVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::DateTimeVal& v, int64_t seed) { DateTimeValue tv = DateTimeValue::from_datetime_val(v); return HashUtil::murmur_hash64A(&tv, 12, seed); } - static uint64_t hash64_murmur(const palo_udf::DecimalVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::DecimalVal& v, int64_t seed) { DecimalValue tv = DecimalValue::from_decimal_val(v); return HashUtil::murmur_hash64A(&tv, sizeof(DecimalValue), seed); } - static uint64_t hash64_murmur(const palo_udf::LargeIntVal& v, int64_t seed) { + static uint64_t hash64_murmur(const doris_udf::LargeIntVal& v, int64_t seed) { return HashUtil::murmur_hash64A(&v.val, 8, seed); } - static palo_udf::FunctionContext::Type primitive_type_to_type(const PrimitiveType& type) { + static doris_udf::FunctionContext::Type primitive_type_to_type(const PrimitiveType& type) { switch (type) { case TYPE_NULL: - return palo_udf::FunctionContext::TYPE_NULL; + return doris_udf::FunctionContext::TYPE_NULL; case TYPE_BOOLEAN: - return palo_udf::FunctionContext::TYPE_BOOLEAN; + return doris_udf::FunctionContext::TYPE_BOOLEAN; case TYPE_TINYINT: - return palo_udf::FunctionContext::TYPE_TINYINT; + return doris_udf::FunctionContext::TYPE_TINYINT; case TYPE_SMALLINT: - return palo_udf::FunctionContext::TYPE_SMALLINT; + return doris_udf::FunctionContext::TYPE_SMALLINT; case TYPE_INT: - return palo_udf::FunctionContext::TYPE_INT; + return doris_udf::FunctionContext::TYPE_INT; case TYPE_BIGINT: - return palo_udf::FunctionContext::TYPE_BIGINT; + return doris_udf::FunctionContext::TYPE_BIGINT; case TYPE_LARGEINT: - return palo_udf::FunctionContext::TYPE_LARGEINT; + return doris_udf::FunctionContext::TYPE_LARGEINT; case TYPE_FLOAT: - return palo_udf::FunctionContext::TYPE_FLOAT; + return doris_udf::FunctionContext::TYPE_FLOAT; case TYPE_DOUBLE: - return palo_udf::FunctionContext::TYPE_DOUBLE; + return doris_udf::FunctionContext::TYPE_DOUBLE; case TYPE_DATE: - return palo_udf::FunctionContext::TYPE_DATE; + return doris_udf::FunctionContext::TYPE_DATE; case TYPE_DATETIME: - return palo_udf::FunctionContext::TYPE_DATETIME; + return doris_udf::FunctionContext::TYPE_DATETIME; case TYPE_HLL: case TYPE_CHAR: case TYPE_VARCHAR: - return palo_udf::FunctionContext::TYPE_STRING; + return doris_udf::FunctionContext::TYPE_STRING; case TYPE_DECIMAL: - return palo_udf::FunctionContext::TYPE_DECIMAL; + return doris_udf::FunctionContext::TYPE_DECIMAL; break; default: DCHECK(false) << "Unknown type: " << type; } - return palo_udf::FunctionContext::TYPE_NULL; + return doris_udf::FunctionContext::TYPE_NULL; } // Returns the byte size of *Val for type t. static int any_val_size(const TypeDescriptor& t) { switch (t.type) { case TYPE_BOOLEAN: - return sizeof(palo_udf::BooleanVal); + return sizeof(doris_udf::BooleanVal); case TYPE_TINYINT: - return sizeof(palo_udf::TinyIntVal); + return sizeof(doris_udf::TinyIntVal); case TYPE_SMALLINT: - return sizeof(palo_udf::SmallIntVal); + return sizeof(doris_udf::SmallIntVal); case TYPE_INT: - return sizeof(palo_udf::IntVal); + return sizeof(doris_udf::IntVal); case TYPE_BIGINT: - return sizeof(palo_udf::BigIntVal); + return sizeof(doris_udf::BigIntVal); case TYPE_LARGEINT: - return sizeof(palo_udf::LargeIntVal); + return sizeof(doris_udf::LargeIntVal); case TYPE_FLOAT: - return sizeof(palo_udf::FloatVal); + return sizeof(doris_udf::FloatVal); case TYPE_DOUBLE: - return sizeof(palo_udf::DoubleVal); + return sizeof(doris_udf::DoubleVal); case TYPE_HLL: case TYPE_CHAR: case TYPE_VARCHAR: - return sizeof(palo_udf::StringVal); + return sizeof(doris_udf::StringVal); case TYPE_DATE: case TYPE_DATETIME: - return sizeof(palo_udf::DateTimeVal); + return sizeof(doris_udf::DateTimeVal); case TYPE_DECIMAL: - return sizeof(palo_udf::DecimalVal); + return sizeof(doris_udf::DecimalVal); default: DCHECK(false) << t; @@ -313,7 +313,7 @@ class AnyValUtil { static FunctionContext::TypeDesc column_type_to_type_desc(const TypeDescriptor& type); // Utility to put val into an AnyVal struct - static void set_any_val(const void* slot, const TypeDescriptor& type, palo_udf::AnyVal* dst) { + static void set_any_val(const void* slot, const TypeDescriptor& type, doris_udf::AnyVal* dst) { if (slot == NULL) { dst->is_null = true; return; @@ -323,53 +323,53 @@ class AnyValUtil { switch (type.type) { case TYPE_NULL: return; case TYPE_BOOLEAN: - reinterpret_cast(dst)->val = + reinterpret_cast(dst)->val = *reinterpret_cast(slot); return; case TYPE_TINYINT: - reinterpret_cast(dst)->val = + reinterpret_cast(dst)->val = *reinterpret_cast(slot); return; case TYPE_SMALLINT: - reinterpret_cast(dst)->val = + reinterpret_cast(dst)->val = *reinterpret_cast(slot); return; case TYPE_INT: - reinterpret_cast(dst)->val = + reinterpret_cast(dst)->val = *reinterpret_cast(slot); return; case TYPE_BIGINT: - reinterpret_cast(dst)->val = + reinterpret_cast(dst)->val = *reinterpret_cast(slot); return; case TYPE_LARGEINT: - memcpy(&reinterpret_cast(dst)->val, slot, sizeof(__int128)); + memcpy(&reinterpret_cast(dst)->val, slot, sizeof(__int128)); return; case TYPE_FLOAT: - reinterpret_cast(dst)->val = + reinterpret_cast(dst)->val = *reinterpret_cast(slot); return; case TYPE_DOUBLE: - reinterpret_cast(dst)->val = + reinterpret_cast(dst)->val = *reinterpret_cast(slot); return; case TYPE_CHAR: case TYPE_VARCHAR: case TYPE_HLL: reinterpret_cast(slot)->to_string_val( - reinterpret_cast(dst)); + reinterpret_cast(dst)); return; case TYPE_DECIMAL: reinterpret_cast(slot)->to_decimal_val( - reinterpret_cast(dst)); + reinterpret_cast(dst)); return; case TYPE_DATE: reinterpret_cast(slot)->to_datetime_val( - reinterpret_cast(dst)); + reinterpret_cast(dst)); return; case TYPE_DATETIME: reinterpret_cast(slot)->to_datetime_val( - reinterpret_cast(dst)); + reinterpret_cast(dst)); return; default: DCHECK(false) << "NYI"; @@ -437,7 +437,7 @@ inline bool AnyValUtil::equals_intenal(const DecimalVal& x, const DecimalVal& y) } // Creates the corresponding AnyVal subclass for type. The object is added to the pool. -palo_udf::AnyVal* create_any_val(ObjectPool* pool, const TypeDescriptor& type); +doris_udf::AnyVal* create_any_val(ObjectPool* pool, const TypeDescriptor& type); /// Allocates an AnyVal subclass of 'type' from 'pool'. The AnyVal's memory is /// initialized to all 0's. Returns a MemLimitExceeded() error with message diff --git a/be/src/exprs/arithmetic_expr.cpp b/be/src/exprs/arithmetic_expr.cpp index 217fe3b06c6083..7fef93cb64e3d9 100644 --- a/be/src/exprs/arithmetic_expr.cpp +++ b/be/src/exprs/arithmetic_expr.cpp @@ -30,7 +30,7 @@ using llvm::LLVMContext; using llvm::PHINode; using llvm::Value; -namespace palo { +namespace doris { Expr* ArithmeticExpr::from_thrift(const TExprNode& node) { switch (node.opcode) { @@ -175,18 +175,18 @@ BITNOT_FNS() // null handling as well as many branches so this is pretty complicated. The IR // for x && y is: // -// define i16 @Add(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) #20 { +// define i16 @Add(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) #20 { // entry: -// %lhs_val = call { i8, i64 } @get_slot_ref(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %lhs_val = call { i8, i64 } @get_slot_ref(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, i64 } %lhs_val, 0 // %lhs_is_null = trunc i8 %0 to i1 // br i1 %lhs_is_null, label %null, label %lhs_not_null // // lhs_not_null: ; preds = %entry -// %rhs_val = call { i8, i64 } @get_slot_ref(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %rhs_val = call { i8, i64 } @get_slot_ref(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %1 = extractvalue { i8, i64 } %lhs_val, 0 // %rhs_is_null = trunc i8 %1 to i1 // br i1 %rhs_is_null, label %null, label %rhs_not_null @@ -519,11 +519,11 @@ Status BitXorExpr::get_codegend_compute_fn(RuntimeState* state, llvm::Function** // null handling as well as many branches so this is pretty complicated. The IR // for x && y is: // -// define i16 @Add(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) #20 { +// define i16 @Add(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) #20 { // entry: -// %lhs_val = call { i8, i64 } @get_slot_ref(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %lhs_val = call { i8, i64 } @get_slot_ref(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, i64 } %lhs_val, 0 // %lhs_is_null = trunc i8 %0 to i1 // br i1 %lhs_is_null, label %null, label %lhs_not_null diff --git a/be/src/exprs/arithmetic_expr.h b/be/src/exprs/arithmetic_expr.h index be1822892257df..7d06d635b7db8f 100644 --- a/be/src/exprs/arithmetic_expr.h +++ b/be/src/exprs/arithmetic_expr.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXPRS_ARITHMETIC_EXPR_H -#define BDG_PALO_BE_SRC_EXPRS_ARITHMETIC_EXPR_H +#ifndef DORIS_BE_SRC_EXPRS_ARITHMETIC_EXPR_H +#define DORIS_BE_SRC_EXPRS_ARITHMETIC_EXPR_H #include "exprs/expr.h" -namespace palo { +namespace doris { class ArithmeticExpr : public Expr { public: diff --git a/be/src/exprs/base64.cpp b/be/src/exprs/base64.cpp index 02413ca1721349..ca902b1e035041 100644 --- a/be/src/exprs/base64.cpp +++ b/be/src/exprs/base64.cpp @@ -54,7 +54,7 @@ static short s_decoding_table[256] = { static int s_mod_table[] = {0, 2, 1}; -namespace palo { +namespace doris { size_t base64_encode2(const unsigned char *data, size_t length, diff --git a/be/src/exprs/base64.h b/be/src/exprs/base64.h index 69cfb21d2a54f4..736724e214e413 100644 --- a/be/src/exprs/base64.h +++ b/be/src/exprs/base64.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_EXPRS_BASE64_H -#define BDG_PALO_BE_EXPRS_BASE64_H +#ifndef DORIS_BE_EXPRS_BASE64_H +#define DORIS_BE_EXPRS_BASE64_H #include #include -namespace palo { +namespace doris { int64_t base64_decode2( const char *data, diff --git a/be/src/exprs/binary_predicate.cpp b/be/src/exprs/binary_predicate.cpp index 4fc23b193dc1d7..d371126c301c52 100644 --- a/be/src/exprs/binary_predicate.cpp +++ b/be/src/exprs/binary_predicate.cpp @@ -37,7 +37,7 @@ using llvm::LLVMContext; using llvm::PHINode; using llvm::Value; -namespace palo { +namespace doris { Expr* BinaryPredicate::from_thrift(const TExprNode& node) { switch (node.opcode) { @@ -237,18 +237,18 @@ std::string BinaryPredicate::debug_string() const { // null handling as well as many branches so this is pretty complicated. The IR // for x && y is: // -// define i16 @Add(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) #20 { +// define i16 @Add(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) #20 { // entry: -// %lhs_val = call { i8, i64 } @get_slot_ref(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %lhs_val = call { i8, i64 } @get_slot_ref(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, i64 } %lhs_val, 0 // %lhs_is_null = trunc i8 %0 to i1 // br i1 %lhs_is_null, label %null, label %lhs_not_null // // lhs_not_null: ; preds = %entry -// %rhs_val = call { i8, i64 } @get_slot_ref(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %rhs_val = call { i8, i64 } @get_slot_ref(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %1 = extractvalue { i8, i64 } %lhs_val, 0 // %rhs_is_null = trunc i8 %1 to i1 // br i1 %rhs_is_null, label %null, label %rhs_not_null @@ -390,7 +390,7 @@ BINARY_PRED_INT_FNS(LargeIntVal, get_large_int_val); BINARY_PRED_FLOAT_FNS(FloatVal, get_float_val); BINARY_PRED_FLOAT_FNS(DoubleVal, get_double_val); -#define COMPLICATE_BINARY_PRED_FN(CLASS, TYPE, FN, PALO_TYPE, FROM_FUNC, OP) \ +#define COMPLICATE_BINARY_PRED_FN(CLASS, TYPE, FN, DORIS_TYPE, FROM_FUNC, OP) \ BooleanVal CLASS::get_boolean_val(ExprContext* ctx, TupleRow* row) { \ TYPE v1 = _children[0]->FN(ctx, row); \ if (v1.is_null) { \ @@ -400,8 +400,8 @@ BINARY_PRED_FLOAT_FNS(DoubleVal, get_double_val); if (v2.is_null) { \ return BooleanVal::null(); \ } \ - PALO_TYPE pv1 = PALO_TYPE::FROM_FUNC(v1); \ - PALO_TYPE pv2 = PALO_TYPE::FROM_FUNC(v2); \ + DORIS_TYPE pv1 = DORIS_TYPE::FROM_FUNC(v1); \ + DORIS_TYPE pv2 = DORIS_TYPE::FROM_FUNC(v2); \ return BooleanVal(pv1 OP pv2); \ } \ Status CLASS::get_codegend_compute_fn(RuntimeState* state, llvm::Function** fn) { \ @@ -409,13 +409,13 @@ BINARY_PRED_FLOAT_FNS(DoubleVal, get_double_val); } \ -#define COMPLICATE_BINARY_PRED_FNS(TYPE, FN, PALO_TYPE, FROM_FUNC) \ - COMPLICATE_BINARY_PRED_FN(Eq##TYPE##Pred, TYPE, FN, PALO_TYPE, FROM_FUNC, ==) \ - COMPLICATE_BINARY_PRED_FN(Ne##TYPE##Pred, TYPE, FN, PALO_TYPE, FROM_FUNC, !=) \ - COMPLICATE_BINARY_PRED_FN(Lt##TYPE##Pred, TYPE, FN, PALO_TYPE, FROM_FUNC, <) \ - COMPLICATE_BINARY_PRED_FN(Le##TYPE##Pred, TYPE, FN, PALO_TYPE, FROM_FUNC, <=) \ - COMPLICATE_BINARY_PRED_FN(Gt##TYPE##Pred, TYPE, FN, PALO_TYPE, FROM_FUNC, >) \ - COMPLICATE_BINARY_PRED_FN(Ge##TYPE##Pred, TYPE, FN, PALO_TYPE, FROM_FUNC, >=) +#define COMPLICATE_BINARY_PRED_FNS(TYPE, FN, DORIS_TYPE, FROM_FUNC) \ + COMPLICATE_BINARY_PRED_FN(Eq##TYPE##Pred, TYPE, FN, DORIS_TYPE, FROM_FUNC, ==) \ + COMPLICATE_BINARY_PRED_FN(Ne##TYPE##Pred, TYPE, FN, DORIS_TYPE, FROM_FUNC, !=) \ + COMPLICATE_BINARY_PRED_FN(Lt##TYPE##Pred, TYPE, FN, DORIS_TYPE, FROM_FUNC, <) \ + COMPLICATE_BINARY_PRED_FN(Le##TYPE##Pred, TYPE, FN, DORIS_TYPE, FROM_FUNC, <=) \ + COMPLICATE_BINARY_PRED_FN(Gt##TYPE##Pred, TYPE, FN, DORIS_TYPE, FROM_FUNC, >) \ + COMPLICATE_BINARY_PRED_FN(Ge##TYPE##Pred, TYPE, FN, DORIS_TYPE, FROM_FUNC, >=) COMPLICATE_BINARY_PRED_FNS(DecimalVal, get_decimal_val, DecimalValue, from_decimal_val) diff --git a/be/src/exprs/binary_predicate.h b/be/src/exprs/binary_predicate.h index 4b714a2d27615a..783e2dbde08cbb 100644 --- a/be/src/exprs/binary_predicate.h +++ b/be/src/exprs/binary_predicate.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_BINARY_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_BINARY_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_BINARY_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_BINARY_PREDICATE_H #include #include @@ -24,7 +24,7 @@ #include "exprs/predicate.h" #include "gen_cpp/Exprs_types.h" -namespace palo { +namespace doris { class BinaryPredicate : public Predicate { public: diff --git a/be/src/exprs/case_expr.cpp b/be/src/exprs/case_expr.cpp index 508070f5ef4ff3..dd3d9438069e21 100644 --- a/be/src/exprs/case_expr.cpp +++ b/be/src/exprs/case_expr.cpp @@ -32,7 +32,7 @@ using llvm::PHINode; using llvm::PointerType; using llvm::Value; -namespace palo { +namespace doris { struct CaseExprState { // Space to store the values being compared in the interpreted path. This makes it @@ -96,17 +96,17 @@ std::string CaseExpr::debug_string() const { } // Sample IR output when there is a case expression and else expression -// define i16 @CaseExpr(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) #20 { +// define i16 @CaseExpr(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) #20 { // eval_case_expr: -// %case_val = call i64 @GetSlotRef(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %case_val = call i64 @GetSlotRef(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %is_null = trunc i64 %case_val to i1 // br i1 %is_null, label %return_else_expr, label %eval_first_when_expr // // eval_first_when_expr: ; preds = %eval_case_expr -// %when_val = call i64 @Literal(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %when_val = call i64 @Literal(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %is_null1 = trunc i64 %when_val to i1 // br i1 %is_null1, label %return_else_expr, label %check_when_expr_block // @@ -119,28 +119,28 @@ std::string CaseExpr::debug_string() const { // br i1 %eq, label %return_then_expr, label %return_else_expr // // return_then_expr: ; preds = %check_when_expr_block -// %then_val = call i16 @Literal12(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %then_val = call i16 @Literal12(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // ret i16 %then_val // // return_else_expr: ; preds = %check_when_expr_block, %eval_first_when_expr, %eval_case_expr -// %else_val = call i16 @Literal13(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %else_val = call i16 @Literal13(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // ret i16 %else_val // } // // Sample IR output when there is case expression and no else expression -// define i16 @CaseExpr(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) #20 { +// define i16 @CaseExpr(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) #20 { // eval_case_expr: -// %case_val = call i64 @GetSlotRef(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %case_val = call i64 @GetSlotRef(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %is_null = trunc i64 %case_val to i1 // br i1 %is_null, label %return_null, label %eval_first_when_expr // // eval_first_when_expr: ; preds = %eval_case_expr -// %when_val = call i64 @Literal(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %when_val = call i64 @Literal(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %is_null1 = trunc i64 %when_val to i1 // br i1 %is_null1, label %return_null, label %check_when_expr_block // @@ -153,8 +153,8 @@ std::string CaseExpr::debug_string() const { // br i1 %eq, label %return_then_expr, label %return_null // // return_then_expr: ; preds = %check_when_expr_block -// %then_val = call i16 @Literal12(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %then_val = call i16 @Literal12(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // ret i16 %then_val // // return_null: ; preds = %check_when_expr_block, %eval_first_when_expr, %eval_case_expr @@ -162,11 +162,11 @@ std::string CaseExpr::debug_string() const { // } // // Sample IR output when there is no case expr and else expression -// define i16 @CaseExpr(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) #20 { +// define i16 @CaseExpr(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) #20 { // eval_first_when_expr: // %when_val = call i16 @Eq_IntVal_IntValWrapper1( -// %"class.palo::ExprContext"* %context, %"class.palo::TupleRow"* %row) +// %"class.doris::ExprContext"* %context, %"class.doris::TupleRow"* %row) // %is_null = trunc i16 %when_val to i1 // br i1 %is_null, label %return_else_expr, label %check_when_expr_block // @@ -177,13 +177,13 @@ std::string CaseExpr::debug_string() const { // br i1 %val, label %return_then_expr, label %return_else_expr // // return_then_expr: ; preds = %check_when_expr_block -// %then_val = call i16 @Literal14(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %then_val = call i16 @Literal14(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // ret i16 %then_val // // return_else_expr: ; preds = %check_when_expr_block, %eval_first_when_expr -// %else_val = call i16 @Literal15(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %else_val = call i16 @Literal15(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // ret i16 %else_val // } Status CaseExpr::get_codegend_compute_fn(RuntimeState* state, Function** fn) { diff --git a/be/src/exprs/case_expr.h b/be/src/exprs/case_expr.h index 38314dfaf7ba36..02795af0b65663 100644 --- a/be/src/exprs/case_expr.h +++ b/be/src/exprs/case_expr.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_CASE_EXPR_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_CASE_EXPR_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_CASE_EXPR_H +#define DORIS_BE_SRC_QUERY_EXPRS_CASE_EXPR_H #include #include "expr.h" @@ -25,7 +25,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class TExprNode; diff --git a/be/src/exprs/cast_expr.cpp b/be/src/exprs/cast_expr.cpp index 3a1cb5bd53e7ef..7e55612ddb1dfe 100644 --- a/be/src/exprs/cast_expr.cpp +++ b/be/src/exprs/cast_expr.cpp @@ -30,7 +30,7 @@ using llvm::LLVMContext; using llvm::PHINode; using llvm::Value; -namespace palo { +namespace doris { Expr* CastExpr::from_thrift(const TExprNode& node) { switch (node.child_type) { @@ -168,11 +168,11 @@ CAST_FROM_DOUBLE(FloatVal, get_float_val) // IR codegen for cast expression // -// define i16 @cast(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) #20 { +// define i16 @cast(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) #20 { // entry: -// %child_val = call { i8, i64 } @get_slot_ref(%"class.palo::ExprContext"* %context, -// %"class.palo::TupleRow"* %row) +// %child_val = call { i8, i64 } @get_slot_ref(%"class.doris::ExprContext"* %context, +// %"class.doris::TupleRow"* %row) // %0 = extractvalue { i8, i64 } %child_val, 0 // %child_is_null = trunc i8 %0 to i1 // br i1 %child_is_null, label %ret, label %child_not_null diff --git a/be/src/exprs/cast_expr.h b/be/src/exprs/cast_expr.h index 32473dabd4792b..75de1c81777e39 100644 --- a/be/src/exprs/cast_expr.h +++ b/be/src/exprs/cast_expr.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_EXPRS_CAST_EXPR_H -#define BDG_PALO_BE_SRC_EXPRS_CAST_EXPR_H +#ifndef DORIS_BE_SRC_EXPRS_CAST_EXPR_H +#define DORIS_BE_SRC_EXPRS_CAST_EXPR_H #include "exprs/expr.h" -namespace palo { +namespace doris { class CastExpr : public Expr { public: diff --git a/be/src/exprs/cast_functions.cpp b/be/src/exprs/cast_functions.cpp index cc7f57b70b8d14..554fab1a7dcd37 100644 --- a/be/src/exprs/cast_functions.cpp +++ b/be/src/exprs/cast_functions.cpp @@ -26,7 +26,7 @@ #include "util/string_parser.hpp" #include "string_functions.h" -namespace palo { +namespace doris { void CastFunctions::init() { } diff --git a/be/src/exprs/cast_functions.h b/be/src/exprs/cast_functions.h index e328266cab08de..e5f68ca859a24b 100644 --- a/be/src/exprs/cast_functions.h +++ b/be/src/exprs/cast_functions.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_CAST_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_CAST_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_CAST_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_CAST_FUNCTIONS_H #include "udf/udf.h" -namespace palo { +namespace doris { class CastFunctions { public: diff --git a/be/src/exprs/compound_predicate.cpp b/be/src/exprs/compound_predicate.cpp index 3f47e1b90b0c93..de42469fe49bec 100644 --- a/be/src/exprs/compound_predicate.cpp +++ b/be/src/exprs/compound_predicate.cpp @@ -30,7 +30,7 @@ using llvm::PHINode; using llvm::Value; using llvm::LLVMContext; -namespace palo { +namespace doris { CompoundPredicate::CompoundPredicate(const TExprNode& node) : Predicate(node) { diff --git a/be/src/exprs/compound_predicate.h b/be/src/exprs/compound_predicate.h index 2529386ddfa02e..b5bf2bc525e7e5 100644 --- a/be/src/exprs/compound_predicate.h +++ b/be/src/exprs/compound_predicate.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_COMPOUND_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_COMPOUND_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_COMPOUND_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_COMPOUND_PREDICATE_H #include #include "exprs/predicate.h" @@ -26,7 +26,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class CompoundPredicate: public Predicate { public: @@ -56,7 +56,7 @@ class AndPredicate: public CompoundPredicate { virtual Expr* clone(ObjectPool* pool) const override { return pool->add(new AndPredicate(*this)); } - virtual palo_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); + virtual doris_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); virtual Status get_codegend_compute_fn(RuntimeState* state, llvm::Function** fn) { return CompoundPredicate::codegen_compute_fn(true, state, fn); @@ -82,7 +82,7 @@ class OrPredicate: public CompoundPredicate { virtual Expr* clone(ObjectPool* pool) const override { return pool->add(new OrPredicate(*this)); } - virtual palo_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); + virtual doris_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); virtual Status get_codegend_compute_fn(RuntimeState* state, llvm::Function** fn) { return CompoundPredicate::codegen_compute_fn(false, state, fn); @@ -108,7 +108,7 @@ class NotPredicate: public CompoundPredicate { virtual Expr* clone(ObjectPool* pool) const override { return pool->add(new NotPredicate(*this)); } - virtual palo_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); + virtual doris_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); virtual Status get_codegend_compute_fn(RuntimeState* state, llvm::Function** fn) { return get_codegend_compute_fn_wrapper(state, fn); diff --git a/be/src/exprs/conditional_functions.cpp b/be/src/exprs/conditional_functions.cpp index 3c5b1ee848cc81..c81ce2f47f3a03 100644 --- a/be/src/exprs/conditional_functions.cpp +++ b/be/src/exprs/conditional_functions.cpp @@ -25,7 +25,7 @@ using llvm::Function; -namespace palo { +namespace doris { #define CONDITIONAL_CODEGEN_FN(expr_class) \ Status expr_class::get_codegend_compute_fn(RuntimeState* state, llvm::Function** fn) { \ diff --git a/be/src/exprs/conditional_functions.h b/be/src/exprs/conditional_functions.h index 111f6e824c25f3..53502a37732bdc 100644 --- a/be/src/exprs/conditional_functions.h +++ b/be/src/exprs/conditional_functions.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_CONDITIONAL_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_CONDITIONAL_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_CONDITIONAL_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_CONDITIONAL_FUNCTIONS_H #include #include "exprs/expr.h" @@ -26,7 +26,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class TupleRow; diff --git a/be/src/exprs/conditional_functions_ir.cpp b/be/src/exprs/conditional_functions_ir.cpp index 59b997c3508984..912d8248208c63 100644 --- a/be/src/exprs/conditional_functions_ir.cpp +++ b/be/src/exprs/conditional_functions_ir.cpp @@ -19,7 +19,7 @@ #include "exprs/conditional_functions.h" #include "udf/udf.h" -namespace palo { +namespace doris { #define IF_NULL_COMPUTE_FUNCTION(type, type_name) \ type IfNullExpr::get_##type_name(ExprContext* context, TupleRow* row) { \ diff --git a/be/src/exprs/decimal_operators.cpp b/be/src/exprs/decimal_operators.cpp index 5a124f0ed51689..88b6e0829bb30a 100644 --- a/be/src/exprs/decimal_operators.cpp +++ b/be/src/exprs/decimal_operators.cpp @@ -28,7 +28,7 @@ // #include "util/decimal_util.h" #include "util/string_parser.hpp" -namespace palo { +namespace doris { void DecimalOperators::init() { } diff --git a/be/src/exprs/decimal_operators.h b/be/src/exprs/decimal_operators.h index a9a68be1d81ab2..766c734f712222 100644 --- a/be/src/exprs/decimal_operators.h +++ b/be/src/exprs/decimal_operators.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_DECIMAL_OPERATORS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_DECIMAL_OPERATORS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_DECIMAL_OPERATORS_H +#define DORIS_BE_SRC_QUERY_EXPRS_DECIMAL_OPERATORS_H #include #include "runtime/decimal_value.h" #include "udf/udf.h" -namespace palo { +namespace doris { class Expr; struct ExprValue; diff --git a/be/src/exprs/encryption_functions.cpp b/be/src/exprs/encryption_functions.cpp index ab0f1725ebb985..bad97ac576ff67 100644 --- a/be/src/exprs/encryption_functions.cpp +++ b/be/src/exprs/encryption_functions.cpp @@ -27,7 +27,7 @@ #include #include "runtime/string_value.h" -namespace palo { +namespace doris { void EncryptionFunctions::init() { } diff --git a/be/src/exprs/encryption_functions.h b/be/src/exprs/encryption_functions.h index 53e720f0551655..67d83c859d2660 100644 --- a/be/src/exprs/encryption_functions.h +++ b/be/src/exprs/encryption_functions.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_ENCRYPTION_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_ENCRYPTION_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_ENCRYPTION_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_ENCRYPTION_FUNCTIONS_H #include #include "udf/udf.h" #include "udf/udf_internal.h" -namespace palo { +namespace doris { class Expr; struct ExprValue; @@ -31,18 +31,18 @@ class TupleRow; class EncryptionFunctions { public: static void init(); - static palo_udf::StringVal aes_encrypt(palo_udf::FunctionContext* context, - const palo_udf::StringVal& val1, const palo_udf::StringVal& val2); - static palo_udf::StringVal aes_decrypt(palo_udf::FunctionContext* context, - const palo_udf::StringVal& val1, const palo_udf::StringVal& val2); - static palo_udf::StringVal from_base64(palo_udf::FunctionContext* context, - const palo_udf::StringVal& val1); - static palo_udf::StringVal to_base64(palo_udf::FunctionContext* context, - const palo_udf::StringVal& val1); - static palo_udf::StringVal md5sum(palo_udf::FunctionContext* ctx, - int num_args, const palo_udf::StringVal* args); - static palo_udf::StringVal md5(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& src); + static doris_udf::StringVal aes_encrypt(doris_udf::FunctionContext* context, + const doris_udf::StringVal& val1, const doris_udf::StringVal& val2); + static doris_udf::StringVal aes_decrypt(doris_udf::FunctionContext* context, + const doris_udf::StringVal& val1, const doris_udf::StringVal& val2); + static doris_udf::StringVal from_base64(doris_udf::FunctionContext* context, + const doris_udf::StringVal& val1); + static doris_udf::StringVal to_base64(doris_udf::FunctionContext* context, + const doris_udf::StringVal& val1); + static doris_udf::StringVal md5sum(doris_udf::FunctionContext* ctx, + int num_args, const doris_udf::StringVal* args); + static doris_udf::StringVal md5(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& src); }; } diff --git a/be/src/exprs/es_functions.cpp b/be/src/exprs/es_functions.cpp index 03e68453d801c9..deda38ebb494d3 100644 --- a/be/src/exprs/es_functions.cpp +++ b/be/src/exprs/es_functions.cpp @@ -22,7 +22,7 @@ #include "util/debug_util.h" #include "runtime/tuple_row.h" -namespace palo { +namespace doris { void ESFunctions::init() { } @@ -32,4 +32,4 @@ BooleanVal ESFunctions::match(FunctionContext* ctx, const StringVal& col, return BooleanVal(true); } -} // palo +} // doris diff --git a/be/src/exprs/es_functions.h b/be/src/exprs/es_functions.h index 03e20545f3afd2..a5e96ba9b94616 100644 --- a/be/src/exprs/es_functions.h +++ b/be/src/exprs/es_functions.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_ES_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_ES_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_ES_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_ES_FUNCTIONS_H #include "udf/udf.h" -namespace palo { +namespace doris { class Expr; class OpcodeRegistry; @@ -31,9 +31,9 @@ class ESFunctions { static void init(); // used to push down query conditions to es. - static palo_udf::BooleanVal match( - palo_udf::FunctionContext* ctx, const palo_udf::StringVal& col, - const palo_udf::StringVal& condition); + static doris_udf::BooleanVal match( + doris_udf::FunctionContext* ctx, const doris_udf::StringVal& col, + const doris_udf::StringVal& condition); }; diff --git a/be/src/exprs/expr.cpp b/be/src/exprs/expr.cpp index ba6c54f040b103..a65147c57801f1 100644 --- a/be/src/exprs/expr.cpp +++ b/be/src/exprs/expr.cpp @@ -59,10 +59,10 @@ using llvm::CallInst; using llvm::ConstantInt; using llvm::Value; using std::vector; -namespace palo { +namespace doris { -const char* Expr::_s_llvm_class_name = "class.palo::Expr"; -const char* Expr::_s_get_constant_symbol_prefix = "_ZN4palo4Expr12get_constant"; +const char* Expr::_s_llvm_class_name = "class.doris::Expr"; +const char* Expr::_s_get_constant_symbol_prefix = "_ZN4doris4Expr12get_constant"; template bool parse_string(const std::string& str, T* val) { @@ -692,7 +692,7 @@ TExprNodeType::type Expr::type_without_cast(const Expr* expr) { return expr->_node_type; } -palo_udf::AnyVal* Expr::get_const_val(ExprContext* context) { +doris_udf::AnyVal* Expr::get_const_val(ExprContext* context) { if (!is_constant()) { return NULL; } diff --git a/be/src/exprs/expr.h b/be/src/exprs/expr.h index dd40631db4b638..1690992cebe52c 100644 --- a/be/src/exprs/expr.h +++ b/be/src/exprs/expr.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_EXPR_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_EXPR_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_EXPR_H +#define DORIS_BE_SRC_QUERY_EXPRS_EXPR_H #include #include @@ -38,10 +38,10 @@ #include "runtime/types.h" //#include // -#undef USING_PALO_UDF -#define USING_PALO_UDF using namespace palo_udf +#undef USING_DORIS_UDF +#define USING_DORIS_UDF using namespace doris_udf -USING_PALO_UDF; +USING_DORIS_UDF; namespace llvm { class BasicBlock; @@ -50,7 +50,7 @@ class Type; class Value; }; -namespace palo { +namespace doris { class Expr; class LlvmCodeGen; diff --git a/be/src/exprs/expr_context.cpp b/be/src/exprs/expr_context.cpp index adf27f405df770..c8235fbf732da8 100644 --- a/be/src/exprs/expr_context.cpp +++ b/be/src/exprs/expr_context.cpp @@ -30,9 +30,9 @@ #include "util/debug_util.h" #include "exprs/anyval_util.h" -namespace palo { +namespace doris { -const char* ExprContext::_s_llvm_class_name = "class.palo::ExprContext"; +const char* ExprContext::_s_llvm_class_name = "class.doris::ExprContext"; ExprContext::ExprContext(Expr* root) : _fn_contexts_ptr(NULL), @@ -101,8 +101,8 @@ void ExprContext::close(RuntimeState* state) { int ExprContext::register_func( RuntimeState* state, - const palo_udf::FunctionContext::TypeDesc& return_type, - const std::vector& arg_types, + const doris_udf::FunctionContext::TypeDesc& return_type, + const std::vector& arg_types, int varargs_buffer_size) { _fn_contexts.push_back(FunctionContextImpl::create_context( state, _pool.get(), return_type, arg_types, varargs_buffer_size, false)); @@ -268,7 +268,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return NULL; } case TYPE_BOOLEAN: { - palo_udf::BooleanVal v = e->get_boolean_val(this, row); + doris_udf::BooleanVal v = e->get_boolean_val(this, row); if (v.is_null) { return NULL; } @@ -276,7 +276,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return &_result.bool_val; } case TYPE_TINYINT: { - palo_udf::TinyIntVal v = e->get_tiny_int_val(this, row); + doris_udf::TinyIntVal v = e->get_tiny_int_val(this, row); if (v.is_null) { return NULL; } @@ -284,7 +284,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return &_result.tinyint_val; } case TYPE_SMALLINT: { - palo_udf::SmallIntVal v = e->get_small_int_val(this, row); + doris_udf::SmallIntVal v = e->get_small_int_val(this, row); if (v.is_null) { return NULL; } @@ -292,7 +292,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return &_result.smallint_val; } case TYPE_INT: { - palo_udf::IntVal v = e->get_int_val(this, row); + doris_udf::IntVal v = e->get_int_val(this, row); if (v.is_null) { return NULL; } @@ -300,7 +300,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return &_result.int_val; } case TYPE_BIGINT: { - palo_udf::BigIntVal v = e->get_big_int_val(this, row); + doris_udf::BigIntVal v = e->get_big_int_val(this, row); if (v.is_null) { return NULL; } @@ -308,7 +308,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return &_result.bigint_val; } case TYPE_LARGEINT: { - palo_udf::LargeIntVal v = e->get_large_int_val(this, row); + doris_udf::LargeIntVal v = e->get_large_int_val(this, row); if (v.is_null) { return NULL; } @@ -316,7 +316,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return &_result.large_int_val; } case TYPE_FLOAT: { - palo_udf::FloatVal v = e->get_float_val(this, row); + doris_udf::FloatVal v = e->get_float_val(this, row); if (v.is_null) { return NULL; } @@ -324,7 +324,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { return &_result.float_val; } case TYPE_DOUBLE: { - palo_udf::DoubleVal v = e->get_double_val(this, row); + doris_udf::DoubleVal v = e->get_double_val(this, row); if (v.is_null) { return NULL; } @@ -334,7 +334,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { case TYPE_CHAR: case TYPE_VARCHAR: case TYPE_HLL: { - palo_udf::StringVal v = e->get_string_val(this, row); + doris_udf::StringVal v = e->get_string_val(this, row); if (v.is_null) { return NULL; } @@ -344,7 +344,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { } #if 0 case TYPE_CHAR: { - palo_udf::StringVal v = e->get_string_val(this, row); + doris_udf::StringVal v = e->get_string_val(this, row); if (v.is_null) { return NULL; } @@ -359,7 +359,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { #endif case TYPE_DATE: case TYPE_DATETIME: { - palo_udf::DateTimeVal v = e->get_datetime_val(this, row); + doris_udf::DateTimeVal v = e->get_datetime_val(this, row); if (v.is_null) { return NULL; } @@ -377,7 +377,7 @@ void* ExprContext::get_value(Expr* e, TupleRow* row) { #if 0 case TYPE_ARRAY: case TYPE_MAP: { - palo_udf::ArrayVal v = e->GetArrayVal(this, row); + doris_udf::ArrayVal v = e->GetArrayVal(this, row); if (v.is_null) return NULL; _result.array_val.ptr = v.ptr; _result.array_val.num_tuples = v.num_tuples; diff --git a/be/src/exprs/expr_context.h b/be/src/exprs/expr_context.h index a1568377545a15..158911aa0276fa 100644 --- a/be/src/exprs/expr_context.h +++ b/be/src/exprs/expr_context.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_EXPR_CONTEXT_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_EXPR_CONTEXT_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_EXPR_CONTEXT_H +#define DORIS_BE_SRC_QUERY_EXPRS_EXPR_CONTEXT_H #include @@ -25,12 +25,12 @@ #include "udf/udf.h" #include "udf/udf_internal.h" // for ArrayVal -#undef USING_PALO_UDF -#define USING_PALO_UDF using namespace palo_udf +#undef USING_DORIS_UDF +#define USING_DORIS_UDF using namespace doris_udf -USING_PALO_UDF; +USING_DORIS_UDF; -namespace palo { +namespace doris { class Expr; class MemPool; diff --git a/be/src/exprs/expr_ir.cpp b/be/src/exprs/expr_ir.cpp index 8db7b8e06f474c..f216fb2d29f761 100644 --- a/be/src/exprs/expr_ir.cpp +++ b/be/src/exprs/expr_ir.cpp @@ -26,10 +26,10 @@ // Dummy function to force compilation of UDF types. // The arguments are pointers to prevent Clang from lowering the struct types // (e.g. IntVal={bool, i32} can be coerced to i64). -void dummy(palo_udf::FunctionContext*, palo_udf::BooleanVal*, palo_udf::TinyIntVal*, - palo_udf::SmallIntVal*, palo_udf::IntVal*, palo_udf::BigIntVal*, - palo_udf::FloatVal*, palo_udf::DoubleVal*, palo_udf::StringVal*, - palo_udf::DateTimeVal*, palo_udf::DecimalVal*, palo::ExprContext*) { } +void dummy(doris_udf::FunctionContext*, doris_udf::BooleanVal*, doris_udf::TinyIntVal*, + doris_udf::SmallIntVal*, doris_udf::IntVal*, doris_udf::BigIntVal*, + doris_udf::FloatVal*, doris_udf::DoubleVal*, doris_udf::StringVal*, + doris_udf::DateTimeVal*, doris_udf::DecimalVal*, doris::ExprContext*) { } #endif // The following are compute functions that are cross-compiled to both native and IR @@ -37,7 +37,7 @@ void dummy(palo_udf::FunctionContext*, palo_udf::BooleanVal*, palo_udf::TinyIntV // code. In the codegen'd path, we load the IR functions and replace the Get*Val() calls // with the appropriate child's codegen'd compute function. -namespace palo { +namespace doris { // Static wrappers around Get*Val() functions. We'd like to be able to call these from // directly from native code as well as from generated IR functions. diff --git a/be/src/exprs/expr_value.h b/be/src/exprs/expr_value.h index 032f83478b9c65..e8d9d8cb4277e9 100644 --- a/be/src/exprs/expr_value.h +++ b/be/src/exprs/expr_value.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_EXPR_VALUE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_EXPR_VALUE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_EXPR_VALUE_H +#define DORIS_BE_SRC_QUERY_EXPRS_EXPR_VALUE_H #include "runtime/string_value.h" #include "runtime/string_value.hpp" @@ -24,7 +24,7 @@ #include "runtime/decimal_value.h" #include "runtime/types.h" -namespace palo { +namespace doris { // The materialized value returned by Expr::get_value(). // Some exprs may set multiple fields of this value at once diff --git a/be/src/exprs/hll_hash_function.cpp b/be/src/exprs/hll_hash_function.cpp index c2420e2ca62a27..d96680ece95823 100644 --- a/be/src/exprs/hll_hash_function.cpp +++ b/be/src/exprs/hll_hash_function.cpp @@ -27,10 +27,10 @@ #include "olap/olap_common.h" #include "olap/utils.h" -namespace palo { +namespace doris { -using palo_udf::BigIntVal; -using palo_udf::StringVal; +using doris_udf::BigIntVal; +using doris_udf::StringVal; const int HllHashFunctions::HLL_INIT_EXPLICT_SET_SIZE = 10; const int HllHashFunctions::HLL_EMPTY_SET_SIZE = 1; @@ -38,7 +38,7 @@ const int HllHashFunctions::HLL_EMPTY_SET_SIZE = 1; void HllHashFunctions::init() { } -StringVal HllHashFunctions::create_string_result(palo_udf::FunctionContext* ctx, +StringVal HllHashFunctions::create_string_result(doris_udf::FunctionContext* ctx, const StringVal& val, const bool is_null) { StringVal result; if (is_null) { @@ -58,12 +58,12 @@ StringVal HllHashFunctions::create_string_result(palo_udf::FunctionContext* ctx, return result; } -StringVal HllHashFunctions::hll_hash(palo_udf::FunctionContext* ctx, +StringVal HllHashFunctions::hll_hash(doris_udf::FunctionContext* ctx, const StringVal& input) { return create_string_result(ctx, input, input.is_null); } -StringVal HllHashFunctions::hll_cardinality(palo_udf::FunctionContext* ctx, +StringVal HllHashFunctions::hll_cardinality(doris_udf::FunctionContext* ctx, const StringVal& input) { if (input.is_null) { return StringVal::null(); diff --git a/be/src/exprs/hll_hash_function.h b/be/src/exprs/hll_hash_function.h index 925dd439602d8f..7e4d11192f5d75 100644 --- a/be/src/exprs/hll_hash_function.h +++ b/be/src/exprs/hll_hash_function.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_HLL_HASH_FUNCTION_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_HLL_HASH_FUNCTION_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_HLL_HASH_FUNCTION_H +#define DORIS_BE_SRC_QUERY_EXPRS_HLL_HASH_FUNCTION_H #include "runtime/primitive_type.h" #include "udf/udf.h" @@ -24,7 +24,7 @@ #include "exprs/anyval_util.h" #include "runtime/datetime_value.h" -namespace palo { +namespace doris { class Expr; class OpcodeRegistry; @@ -33,11 +33,11 @@ class TupleRow; class HllHashFunctions { public: static void init(); - static StringVal hll_hash(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& dest_base); - static StringVal hll_cardinality(palo_udf::FunctionContext* ctx, - const palo_udf::StringVal& dest_base); - static StringVal create_string_result(palo_udf::FunctionContext* ctx, + static StringVal hll_hash(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& dest_base); + static StringVal hll_cardinality(doris_udf::FunctionContext* ctx, + const doris_udf::StringVal& dest_base); + static StringVal create_string_result(doris_udf::FunctionContext* ctx, const StringVal& str, const bool is_null); static const int HLL_INIT_EXPLICT_SET_SIZE; diff --git a/be/src/exprs/hybird_map.h b/be/src/exprs/hybird_map.h index c8830af8233e33..c49aef1dadebb3 100644 --- a/be/src/exprs/hybird_map.h +++ b/be/src/exprs/hybird_map.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_HYBIRD_MAP_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_HYBIRD_MAP_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_HYBIRD_MAP_H +#define DORIS_BE_SRC_QUERY_EXPRS_HYBIRD_MAP_H #include #include "common/status.h" @@ -26,7 +26,7 @@ #include "common/object_pool.h" #include "exprs/hybird_set.h" -namespace palo { +namespace doris { class HybirdMap { public: @@ -60,4 +60,4 @@ class HybirdMap { }; } -#endif // BDG_PALO_BE_SRC_QUERY_EXPRS_HYBIRD_MAP_H +#endif // DORIS_BE_SRC_QUERY_EXPRS_HYBIRD_MAP_H diff --git a/be/src/exprs/hybird_set.cpp b/be/src/exprs/hybird_set.cpp index 48d6031b505608..57254ae76a794b 100644 --- a/be/src/exprs/hybird_set.cpp +++ b/be/src/exprs/hybird_set.cpp @@ -17,7 +17,7 @@ #include "exprs/hybird_set.h" -namespace palo { +namespace doris { HybirdSetBase* HybirdSetBase::create_set(PrimitiveType type) { switch (type) { diff --git a/be/src/exprs/hybird_set.h b/be/src/exprs/hybird_set.h index fe02a1c63e925a..3812ba228f6e2f 100644 --- a/be/src/exprs/hybird_set.h +++ b/be/src/exprs/hybird_set.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_HYBIRD_SET_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_HYBIRD_SET_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_HYBIRD_SET_H +#define DORIS_BE_SRC_QUERY_EXPRS_HYBIRD_SET_H #include #include @@ -27,7 +27,7 @@ #include "runtime/datetime_value.h" #include "runtime/decimal_value.h" -namespace palo { +namespace doris { class HybirdSetBase { public: @@ -206,4 +206,4 @@ class StringValueSet : public HybirdSetBase { } -#endif // BDG_PALO_BE_SRC_QUERY_EXPRS_HYBIRD_SET_H +#endif // DORIS_BE_SRC_QUERY_EXPRS_HYBIRD_SET_H diff --git a/be/src/exprs/in_predicate.cpp b/be/src/exprs/in_predicate.cpp index db6e8945dbfa8a..4a9ede32b27898 100644 --- a/be/src/exprs/in_predicate.cpp +++ b/be/src/exprs/in_predicate.cpp @@ -26,7 +26,7 @@ #include "runtime/string_value.hpp" #include "runtime/runtime_state.h" -namespace palo { +namespace doris { InPredicate::InPredicate(const TExprNode& node) : Predicate(node), diff --git a/be/src/exprs/in_predicate.h b/be/src/exprs/in_predicate.h index 4926ef8ebd08eb..aec176730f764b 100644 --- a/be/src/exprs/in_predicate.h +++ b/be/src/exprs/in_predicate.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_IN_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_IN_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_IN_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_IN_PREDICATE_H #include #include @@ -25,7 +25,7 @@ #include "runtime/raw_value.h" #include "exprs/hybird_set.h" -namespace palo { +namespace doris { // has two method: // 1. construct from TExprNode diff --git a/be/src/exprs/info_func.cpp b/be/src/exprs/info_func.cpp index bf89cf1dafc920..a69cd3858469f1 100644 --- a/be/src/exprs/info_func.cpp +++ b/be/src/exprs/info_func.cpp @@ -21,7 +21,7 @@ #include "util/debug_util.h" -namespace palo { +namespace doris { InfoFunc::InfoFunc(const TExprNode& node) : Expr(node), diff --git a/be/src/exprs/info_func.h b/be/src/exprs/info_func.h index 20ac2a19c4a3a8..fd1279d6144b87 100644 --- a/be/src/exprs/info_func.h +++ b/be/src/exprs/info_func.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_INFO_FUNC_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_INFO_FUNC_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_INFO_FUNC_H +#define DORIS_BE_SRC_QUERY_EXPRS_INFO_FUNC_H #include #include #include "exprs/expr.h" #include "gen_cpp/Exprs_types.h" -namespace palo { +namespace doris { class InfoFunc : public Expr { public: diff --git a/be/src/exprs/is_null_predicate.cpp b/be/src/exprs/is_null_predicate.cpp index 11e25e5b2bff3c..aca5761cb9120d 100644 --- a/be/src/exprs/is_null_predicate.cpp +++ b/be/src/exprs/is_null_predicate.cpp @@ -18,7 +18,7 @@ #include "exprs/is_null_predicate.h" #include "udf/udf.h" -namespace palo { +namespace doris { void IsNullPredicate::init() { } diff --git a/be/src/exprs/is_null_predicate.h b/be/src/exprs/is_null_predicate.h index bf6f1a1fb97f47..0fe75a8d9189d9 100644 --- a/be/src/exprs/is_null_predicate.h +++ b/be/src/exprs/is_null_predicate.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_IS_NULL_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_IS_NULL_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_IS_NULL_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_IS_NULL_PREDICATE_H #include #include "exprs/predicate.h" -namespace palo { +namespace doris { class IsNullPredicate { public: diff --git a/be/src/exprs/json_functions.cpp b/be/src/exprs/json_functions.cpp index 145053b18e3a37..1b3bd70e600bd3 100644 --- a/be/src/exprs/json_functions.cpp +++ b/be/src/exprs/json_functions.cpp @@ -38,7 +38,7 @@ #include "runtime/tuple_row.h" #include "rapidjson/error/en.h" -namespace palo { +namespace doris { static const re2::RE2 JSON_PATTERN("^([a-zA-Z0-9_\\-\\:\\s]*)(?:\\[([0-9]+)\\])?"); diff --git a/be/src/exprs/json_functions.h b/be/src/exprs/json_functions.h index 0dea3b39a31122..6ee72624da643f 100644 --- a/be/src/exprs/json_functions.h +++ b/be/src/exprs/json_functions.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_JSON_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_JSON_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_JSON_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_JSON_FUNCTIONS_H #include #include "runtime/string_value.h" -namespace palo { +namespace doris { enum JsonFunctionType { JSON_FUN_INT = 0, JSON_FUN_DOUBLE, JSON_FUN_STRING @@ -34,15 +34,15 @@ class TupleRow; class JsonFunctions { public: static void init(); - static palo_udf::IntVal get_json_int( - palo_udf::FunctionContext* context, const palo_udf::StringVal& json_str, - const palo_udf::StringVal& path); - static palo_udf::StringVal get_json_string( - palo_udf::FunctionContext* context, const palo_udf::StringVal& json_str, - const palo_udf::StringVal& path); - static palo_udf::DoubleVal get_json_double( - palo_udf::FunctionContext* context, const palo_udf::StringVal& json_str, - const palo_udf::StringVal& path); + static doris_udf::IntVal get_json_int( + doris_udf::FunctionContext* context, const doris_udf::StringVal& json_str, + const doris_udf::StringVal& path); + static doris_udf::StringVal get_json_string( + doris_udf::FunctionContext* context, const doris_udf::StringVal& json_str, + const doris_udf::StringVal& path); + static doris_udf::DoubleVal get_json_double( + doris_udf::FunctionContext* context, const doris_udf::StringVal& json_str, + const doris_udf::StringVal& path); static rapidjson::Value* get_json_object( const std::string& json_string, const std::string& path_string, diff --git a/be/src/exprs/like_predicate.cpp b/be/src/exprs/like_predicate.cpp index cb9138f4cfd816..ccdae6a8b1d9dc 100644 --- a/be/src/exprs/like_predicate.cpp +++ b/be/src/exprs/like_predicate.cpp @@ -23,7 +23,7 @@ #include "exprs/string_functions.h" #include "runtime/string_value.hpp" -namespace palo { +namespace doris { // A regex to match any regex pattern is equivalent to a substring search. static const RE2 SUBSTRING_RE( diff --git a/be/src/exprs/like_predicate.h b/be/src/exprs/like_predicate.h index 983c3d298b3a31..e4542a7fe15020 100644 --- a/be/src/exprs/like_predicate.h +++ b/be/src/exprs/like_predicate.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_LIKE_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_LIKE_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_LIKE_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_LIKE_PREDICATE_H #include #include @@ -26,15 +26,15 @@ #include "gen_cpp/Exprs_types.h" #include "runtime/string_search.hpp" -namespace palo { +namespace doris { class LikePredicate { public: static void init(); private: - typedef palo_udf::BooleanVal (*LikePredicateFunction) ( - palo_udf::FunctionContext*, const palo_udf::StringVal&, const palo_udf::StringVal&); + typedef doris_udf::BooleanVal (*LikePredicateFunction) ( + doris_udf::FunctionContext*, const doris_udf::StringVal&, const doris_udf::StringVal&); struct LikePredicateState { char escape_char; @@ -79,95 +79,95 @@ class LikePredicate { friend class OpcodeRegistry; static void like_prepare( - palo_udf::FunctionContext* context, - palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext* context, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal like( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal like( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); static void like_close( - palo_udf::FunctionContext* context, - palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext* context, + doris_udf::FunctionContext::FunctionStateScope scope); static void regex_prepare( - palo_udf::FunctionContext* context, - palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext* context, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal regex( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal regex( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); /// Prepare function for regexp_like() when a third optional parameter is used static void regexp_like_prepare( - palo_udf::FunctionContext* context, - palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext* context, + doris_udf::FunctionContext::FunctionStateScope scope); /// Handles regexp_like() when 3 parameters are passed to it - static palo_udf::BooleanVal regexp_like( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern, - const palo_udf::StringVal& match_parameter); + static doris_udf::BooleanVal regexp_like( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern, + const doris_udf::StringVal& match_parameter); static void regex_close( - palo_udf::FunctionContext*, - palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext*, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal regex_fn( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal regex_fn( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); - static palo_udf::BooleanVal like_fn( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal like_fn( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); /// Handling of like predicates that map to strstr - static palo_udf::BooleanVal constant_substring_fn( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal constant_substring_fn( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); /// Handling of like predicates that can be implemented using strncmp - static palo_udf::BooleanVal constant_starts_with_fn( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal constant_starts_with_fn( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); /// Handling of like predicates that can be implemented using strncmp - static palo_udf::BooleanVal constant_ends_with_fn( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal constant_ends_with_fn( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); /// Handling of like predicates that can be implemented using strcmp - static palo_udf::BooleanVal constant_equals_fn( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal constant_equals_fn( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); - static palo_udf::BooleanVal constant_regex_fn_partial( - palo_udf::FunctionContext* context, const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal constant_regex_fn_partial( + doris_udf::FunctionContext* context, const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); - static palo_udf::BooleanVal constant_regex_fn( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern); + static doris_udf::BooleanVal constant_regex_fn( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern); - static palo_udf::BooleanVal regex_match( - palo_udf::FunctionContext* context, const palo_udf::StringVal& val, - const palo_udf::StringVal& pattern, bool is_like_pattern); + static doris_udf::BooleanVal regex_match( + doris_udf::FunctionContext* context, const doris_udf::StringVal& val, + const doris_udf::StringVal& pattern, bool is_like_pattern); /// Convert a LIKE pattern (with embedded % and _) into the corresponding /// regular expression pattern. Escaped chars are copied verbatim. static void convert_like_pattern( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& pattern, + doris_udf::FunctionContext* context, + const doris_udf::StringVal& pattern, std::string* re_pattern); static void remove_escape_character(std::string* search_string); diff --git a/be/src/exprs/literal.cpp b/be/src/exprs/literal.cpp index ab41f0c5a7ac1d..bb8a91d0e4090a 100644 --- a/be/src/exprs/literal.cpp +++ b/be/src/exprs/literal.cpp @@ -30,7 +30,7 @@ using llvm::Function; using llvm::Type; using llvm::Value; -namespace palo { +namespace doris { Literal::Literal(const TExprNode& node) : Expr(node) { @@ -170,7 +170,7 @@ StringVal Literal::get_string_val(ExprContext* context, TupleRow* row) { // IR produced for bigint literal 10: // -// define { i8, i64 } @Literal(i8* %context, %"class.palo::TupleRow"* %row) { +// define { i8, i64 } @Literal(i8* %context, %"class.doris::TupleRow"* %row) { // entry: // ret { i8, i64 } { i8 0, i64 10 } // } diff --git a/be/src/exprs/literal.h b/be/src/exprs/literal.h index b6f83aa253e242..49b3d5181c777e 100644 --- a/be/src/exprs/literal.h +++ b/be/src/exprs/literal.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_LITERAL_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_LITERAL_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_LITERAL_H +#define DORIS_BE_SRC_QUERY_EXPRS_LITERAL_H #include "exprs/expr.h" -namespace palo { +namespace doris { class TExprNode; diff --git a/be/src/exprs/math_functions.cpp b/be/src/exprs/math_functions.cpp index 4f400a19c39f1f..bfef98fb477841 100644 --- a/be/src/exprs/math_functions.cpp +++ b/be/src/exprs/math_functions.cpp @@ -28,7 +28,7 @@ #include "runtime/decimal_value.h" #include "util/string_parser.hpp" -namespace palo { +namespace doris { const char* MathFunctions::_s_alphanumeric_chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -582,14 +582,14 @@ DecimalVal MathFunctions::negative_decimal( LEAST_FNS(); -#define LEAST_NONNUMERIC_FN(TYPE_NAME, TYPE, PALO_TYPE) \ +#define LEAST_NONNUMERIC_FN(TYPE_NAME, TYPE, DORIS_TYPE) \ TYPE MathFunctions::least(\ FunctionContext* ctx, int num_args, const TYPE* args) { \ if (args[0].is_null) return TYPE::null(); \ - PALO_TYPE result_val = PALO_TYPE::from_##TYPE_NAME(args[0]); \ + DORIS_TYPE result_val = DORIS_TYPE::from_##TYPE_NAME(args[0]); \ for (int i = 1; i < num_args; ++i) { \ if (args[i].is_null) return TYPE::null(); \ - PALO_TYPE val = PALO_TYPE::from_##TYPE_NAME(args[i]); \ + DORIS_TYPE val = DORIS_TYPE::from_##TYPE_NAME(args[i]); \ if (val < result_val) result_val = val; \ } \ TYPE result; \ @@ -627,14 +627,14 @@ LEAST_NONNUMERIC_FNS(); GREATEST_FNS(); -#define GREATEST_NONNUMERIC_FN(TYPE_NAME, TYPE, PALO_TYPE) \ +#define GREATEST_NONNUMERIC_FN(TYPE_NAME, TYPE, DORIS_TYPE) \ TYPE MathFunctions::greatest(\ FunctionContext* ctx, int num_args, const TYPE* args) { \ if (args[0].is_null) return TYPE::null(); \ - PALO_TYPE result_val = PALO_TYPE::from_##TYPE_NAME(args[0]); \ + DORIS_TYPE result_val = DORIS_TYPE::from_##TYPE_NAME(args[0]); \ for (int i = 1; i < num_args; ++i) { \ if (args[i].is_null) return TYPE::null(); \ - PALO_TYPE val = PALO_TYPE::from_##TYPE_NAME(args[i]); \ + DORIS_TYPE val = DORIS_TYPE::from_##TYPE_NAME(args[i]); \ if (val > result_val) result_val = val; \ } \ TYPE result; \ diff --git a/be/src/exprs/math_functions.h b/be/src/exprs/math_functions.h index d5c700a12a98a9..2d1fb64d3656e2 100644 --- a/be/src/exprs/math_functions.h +++ b/be/src/exprs/math_functions.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_MATH_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_MATH_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_MATH_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_MATH_FUNCTIONS_H #include #include "util/string_parser.hpp" -namespace palo { +namespace doris { class Expr; struct ExprValue; @@ -31,139 +31,139 @@ class MathFunctions { public: static void init(); - static palo_udf::DoubleVal pi(palo_udf::FunctionContext* ctx); - static palo_udf::DoubleVal e(palo_udf::FunctionContext* ctx); - - static palo_udf::DoubleVal abs(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::FloatVal sign( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& v); - - static palo_udf::DoubleVal sin(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal asin(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal cos(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal acos(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal tan(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal atan(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - - static palo_udf::BigIntVal ceil(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::BigIntVal floor(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::BigIntVal round( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& v); - static palo_udf::DoubleVal round_up_to( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& v, - const palo_udf::IntVal& scale); - static palo_udf::DoubleVal truncate( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& v, - const palo_udf::IntVal& scale); - - static palo_udf::DoubleVal ln(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal log( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& base, - const palo_udf::DoubleVal& v); - static palo_udf::DoubleVal log2( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& v); - static palo_udf::DoubleVal log10(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal exp(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - - static palo_udf::DoubleVal radians( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& v); - static palo_udf::DoubleVal degrees( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& v); - - static palo_udf::DoubleVal sqrt(palo_udf::FunctionContext*, const palo_udf::DoubleVal&); - static palo_udf::DoubleVal pow( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& base, - const palo_udf::DoubleVal& exp); + static doris_udf::DoubleVal pi(doris_udf::FunctionContext* ctx); + static doris_udf::DoubleVal e(doris_udf::FunctionContext* ctx); + + static doris_udf::DoubleVal abs(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::FloatVal sign( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& v); + + static doris_udf::DoubleVal sin(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal asin(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal cos(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal acos(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal tan(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal atan(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + + static doris_udf::BigIntVal ceil(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::BigIntVal floor(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::BigIntVal round( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& v); + static doris_udf::DoubleVal round_up_to( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& v, + const doris_udf::IntVal& scale); + static doris_udf::DoubleVal truncate( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& v, + const doris_udf::IntVal& scale); + + static doris_udf::DoubleVal ln(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal log( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& base, + const doris_udf::DoubleVal& v); + static doris_udf::DoubleVal log2( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& v); + static doris_udf::DoubleVal log10(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal exp(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + + static doris_udf::DoubleVal radians( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& v); + static doris_udf::DoubleVal degrees( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& v); + + static doris_udf::DoubleVal sqrt(doris_udf::FunctionContext*, const doris_udf::DoubleVal&); + static doris_udf::DoubleVal pow( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& base, + const doris_udf::DoubleVal& exp); /// Used for both Rand() and RandSeed() static void rand_prepare( - palo_udf::FunctionContext*, palo_udf::FunctionContext::FunctionStateScope); - static palo_udf::DoubleVal rand(palo_udf::FunctionContext*); - static palo_udf::DoubleVal rand_seed( - palo_udf::FunctionContext*, const palo_udf::BigIntVal& seed); - - static palo_udf::StringVal bin( - palo_udf::FunctionContext* ctx, const palo_udf::BigIntVal& v); - static palo_udf::StringVal hex_int( - palo_udf::FunctionContext* ctx, const palo_udf::BigIntVal& v); - static palo_udf::StringVal hex_string( - palo_udf::FunctionContext* ctx, const palo_udf::StringVal& s); - static palo_udf::StringVal unhex( - palo_udf::FunctionContext* ctx, const palo_udf::StringVal& s); - - static palo_udf::StringVal conv_int( - palo_udf::FunctionContext* ctx, const palo_udf::BigIntVal& num, - const palo_udf::TinyIntVal& src_base, const palo_udf::TinyIntVal& dest_base); - static palo_udf::StringVal conv_string( - palo_udf::FunctionContext* ctx, const palo_udf::StringVal& num_str, - const palo_udf::TinyIntVal& src_base, const palo_udf::TinyIntVal& dest_base); - - static palo_udf::BigIntVal pmod_bigint( - palo_udf::FunctionContext* ctx, const palo_udf::BigIntVal& a, - const palo_udf::BigIntVal& b); - static palo_udf::DoubleVal pmod_double( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& a, - const palo_udf::DoubleVal& b); - static palo_udf::FloatVal fmod_float( - palo_udf::FunctionContext*, const palo_udf::FloatVal&, - const palo_udf::FloatVal&); - static palo_udf::DoubleVal fmod_double( - palo_udf::FunctionContext*, const palo_udf::DoubleVal&, - const palo_udf::DoubleVal&); - - static palo_udf::BigIntVal positive_bigint( - palo_udf::FunctionContext* ctx, const palo_udf::BigIntVal& val); - static palo_udf::DoubleVal positive_double( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& val); - static palo_udf::DecimalVal positive_decimal( - palo_udf::FunctionContext* ctx, const palo_udf::DecimalVal& val); - static palo_udf::BigIntVal negative_bigint( - palo_udf::FunctionContext* ctx, const palo_udf::BigIntVal& val); - static palo_udf::DoubleVal negative_double( - palo_udf::FunctionContext* ctx, const palo_udf::DoubleVal& val); - static palo_udf::DecimalVal negative_decimal( - palo_udf::FunctionContext* ctx, const palo_udf::DecimalVal& val); - - static palo_udf::TinyIntVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::TinyIntVal* args); - static palo_udf::TinyIntVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::TinyIntVal* args); - static palo_udf::SmallIntVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::SmallIntVal* val); - static palo_udf::SmallIntVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::SmallIntVal* val); - static palo_udf::IntVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::IntVal* val); - static palo_udf::IntVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::IntVal* val); - static palo_udf::BigIntVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::BigIntVal* val); - static palo_udf::BigIntVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::BigIntVal* val); - static palo_udf::LargeIntVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::LargeIntVal* val); - static palo_udf::LargeIntVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::LargeIntVal* val); - static palo_udf::FloatVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::FloatVal* val); - static palo_udf::FloatVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::FloatVal* val); - static palo_udf::DoubleVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::DoubleVal* val); - static palo_udf::DoubleVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::DoubleVal* val); - static palo_udf::StringVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::StringVal* val); - static palo_udf::StringVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::StringVal* val); - static palo_udf::DateTimeVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::DateTimeVal* val); - static palo_udf::DateTimeVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::DateTimeVal* val); - static palo_udf::DecimalVal least( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::DecimalVal* val); - static palo_udf::DecimalVal greatest( - palo_udf::FunctionContext* ctx, int num_args, const palo_udf::DecimalVal* val); + doris_udf::FunctionContext*, doris_udf::FunctionContext::FunctionStateScope); + static doris_udf::DoubleVal rand(doris_udf::FunctionContext*); + static doris_udf::DoubleVal rand_seed( + doris_udf::FunctionContext*, const doris_udf::BigIntVal& seed); + + static doris_udf::StringVal bin( + doris_udf::FunctionContext* ctx, const doris_udf::BigIntVal& v); + static doris_udf::StringVal hex_int( + doris_udf::FunctionContext* ctx, const doris_udf::BigIntVal& v); + static doris_udf::StringVal hex_string( + doris_udf::FunctionContext* ctx, const doris_udf::StringVal& s); + static doris_udf::StringVal unhex( + doris_udf::FunctionContext* ctx, const doris_udf::StringVal& s); + + static doris_udf::StringVal conv_int( + doris_udf::FunctionContext* ctx, const doris_udf::BigIntVal& num, + const doris_udf::TinyIntVal& src_base, const doris_udf::TinyIntVal& dest_base); + static doris_udf::StringVal conv_string( + doris_udf::FunctionContext* ctx, const doris_udf::StringVal& num_str, + const doris_udf::TinyIntVal& src_base, const doris_udf::TinyIntVal& dest_base); + + static doris_udf::BigIntVal pmod_bigint( + doris_udf::FunctionContext* ctx, const doris_udf::BigIntVal& a, + const doris_udf::BigIntVal& b); + static doris_udf::DoubleVal pmod_double( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& a, + const doris_udf::DoubleVal& b); + static doris_udf::FloatVal fmod_float( + doris_udf::FunctionContext*, const doris_udf::FloatVal&, + const doris_udf::FloatVal&); + static doris_udf::DoubleVal fmod_double( + doris_udf::FunctionContext*, const doris_udf::DoubleVal&, + const doris_udf::DoubleVal&); + + static doris_udf::BigIntVal positive_bigint( + doris_udf::FunctionContext* ctx, const doris_udf::BigIntVal& val); + static doris_udf::DoubleVal positive_double( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& val); + static doris_udf::DecimalVal positive_decimal( + doris_udf::FunctionContext* ctx, const doris_udf::DecimalVal& val); + static doris_udf::BigIntVal negative_bigint( + doris_udf::FunctionContext* ctx, const doris_udf::BigIntVal& val); + static doris_udf::DoubleVal negative_double( + doris_udf::FunctionContext* ctx, const doris_udf::DoubleVal& val); + static doris_udf::DecimalVal negative_decimal( + doris_udf::FunctionContext* ctx, const doris_udf::DecimalVal& val); + + static doris_udf::TinyIntVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::TinyIntVal* args); + static doris_udf::TinyIntVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::TinyIntVal* args); + static doris_udf::SmallIntVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::SmallIntVal* val); + static doris_udf::SmallIntVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::SmallIntVal* val); + static doris_udf::IntVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::IntVal* val); + static doris_udf::IntVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::IntVal* val); + static doris_udf::BigIntVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::BigIntVal* val); + static doris_udf::BigIntVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::BigIntVal* val); + static doris_udf::LargeIntVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::LargeIntVal* val); + static doris_udf::LargeIntVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::LargeIntVal* val); + static doris_udf::FloatVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::FloatVal* val); + static doris_udf::FloatVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::FloatVal* val); + static doris_udf::DoubleVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::DoubleVal* val); + static doris_udf::DoubleVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::DoubleVal* val); + static doris_udf::StringVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::StringVal* val); + static doris_udf::StringVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::StringVal* val); + static doris_udf::DateTimeVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::DateTimeVal* val); + static doris_udf::DateTimeVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::DateTimeVal* val); + static doris_udf::DecimalVal least( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::DecimalVal* val); + static doris_udf::DecimalVal greatest( + doris_udf::FunctionContext* ctx, int num_args, const doris_udf::DecimalVal* val); private: static const int32_t MIN_BASE = 2; @@ -172,8 +172,8 @@ class MathFunctions { // Converts src_num in decimal to dest_base, // and fills expr_val.string_val with the result. - static palo_udf::StringVal decimal_to_base( - palo_udf::FunctionContext* ctx, int64_t src_num, int8_t dest_base); + static doris_udf::StringVal decimal_to_base( + doris_udf::FunctionContext* ctx, int64_t src_num, int8_t dest_base); // Converts src_num representing a number in src_base but encoded in decimal // into its actual decimal number. diff --git a/be/src/exprs/new_agg_fn_evaluator.cc b/be/src/exprs/new_agg_fn_evaluator.cc index 83409456908e7a..f61a6afb5e155f 100644 --- a/be/src/exprs/new_agg_fn_evaluator.cc +++ b/be/src/exprs/new_agg_fn_evaluator.cc @@ -40,8 +40,8 @@ #include "common/names.h" -using namespace palo; -using namespace palo_udf; +using namespace doris; +using namespace doris_udf; using namespace llvm; using std::move; diff --git a/be/src/exprs/new_agg_fn_evaluator.h b/be/src/exprs/new_agg_fn_evaluator.h index 7aa4fdcd92f8fd..bfbaae73deeca9 100644 --- a/be/src/exprs/new_agg_fn_evaluator.h +++ b/be/src/exprs/new_agg_fn_evaluator.h @@ -22,7 +22,7 @@ #include #include -#include "codegen/palo_ir.h" +#include "codegen/doris_ir.h" #include "common/compiler_util.h" #include "common/status.h" #include "exprs/agg_fn.h" @@ -38,7 +38,7 @@ #include "gen_cpp/PlanNodes_types.h" #include "gen_cpp/Types_types.h" -namespace palo { +namespace doris { class MemPool; class MemTracker; @@ -239,12 +239,12 @@ class NewAggFnEvaluator { /// Staging input values used by the interpreted Update() / Merge() paths. /// It stores the evaluation results of input expressions to be passed to the /// Update() / Merge() function. - std::vector staging_input_vals_; + std::vector staging_input_vals_; /// Staging intermediate and merged values used in the interpreted /// Update() / Merge() paths. - palo_udf::AnyVal* staging_intermediate_val_ = nullptr; - palo_udf::AnyVal* staging_merge_input_val_ = nullptr; + doris_udf::AnyVal* staging_intermediate_val_ = nullptr; + doris_udf::AnyVal* staging_merge_input_val_ = nullptr; /// Use Create() instead. NewAggFnEvaluator(const AggFn& agg_fn, MemPool* mem_pool, MemTracker* tracker, bool is_clone); @@ -275,10 +275,10 @@ class NewAggFnEvaluator { /// Writes the result in src into dst pointed to by dst_slot_desc inline void SetDstSlot( - const palo_udf::AnyVal* src, const SlotDescriptor& dst_slot_desc, Tuple* dst); + const doris_udf::AnyVal* src, const SlotDescriptor& dst_slot_desc, Tuple* dst); // Sets 'dst' to the value from 'slot'. - void set_any_val(const void* slot, const TypeDescriptor& type, palo_udf::AnyVal* dst); + void set_any_val(const void* slot, const TypeDescriptor& type, doris_udf::AnyVal* dst); }; inline void NewAggFnEvaluator::Add(const TupleRow* row, Tuple* dst) { diff --git a/be/src/exprs/new_agg_fn_evaluator_ir.cc b/be/src/exprs/new_agg_fn_evaluator_ir.cc index 3fc8ae1086ff09..84bb092819d3d5 100644 --- a/be/src/exprs/new_agg_fn_evaluator_ir.cc +++ b/be/src/exprs/new_agg_fn_evaluator_ir.cc @@ -17,7 +17,7 @@ #include "exprs/new_agg_fn_evaluator.h" -using namespace palo; +using namespace doris; FunctionContext* NewAggFnEvaluator::agg_fn_ctx() const { return agg_fn_ctx_.get(); diff --git a/be/src/exprs/new_in_predicate.cpp b/be/src/exprs/new_in_predicate.cpp index 67d20b074fffff..8bc20f25824dcc 100644 --- a/be/src/exprs/new_in_predicate.cpp +++ b/be/src/exprs/new_in_predicate.cpp @@ -22,7 +22,7 @@ #include "exprs/anyval_util.h" #include "runtime/string_value.hpp" -namespace palo { +namespace doris { void InPredicate::init() { } diff --git a/be/src/exprs/new_in_predicate.h b/be/src/exprs/new_in_predicate.h index 5a2f99ed861530..b57400c2d0a170 100644 --- a/be/src/exprs/new_in_predicate.h +++ b/be/src/exprs/new_in_predicate.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_NEW_IN_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_NEW_IN_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_NEW_IN_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_NEW_IN_PREDICATE_H #include #include "exprs/predicate.h" @@ -24,29 +24,29 @@ /* added by lide */ #define IN_FUNCTIONS_STMT(AnyValType, SetType, type_name) \ - static palo_udf::BooleanVal in_set_lookup( \ - palo_udf::FunctionContext* context, const palo_udf::AnyValType& val, int num_args, \ - const palo_udf::AnyValType* args); \ + static doris_udf::BooleanVal in_set_lookup( \ + doris_udf::FunctionContext* context, const doris_udf::AnyValType& val, int num_args, \ + const doris_udf::AnyValType* args); \ \ - static palo_udf::BooleanVal not_in_set_lookup( \ - palo_udf::FunctionContext* context, const palo_udf::AnyValType& val, int num_args, \ - const palo_udf::AnyValType* args); \ + static doris_udf::BooleanVal not_in_set_lookup( \ + doris_udf::FunctionContext* context, const doris_udf::AnyValType& val, int num_args, \ + const doris_udf::AnyValType* args); \ \ - static palo_udf::BooleanVal in_iterate( \ - palo_udf::FunctionContext* context, const palo_udf::AnyValType& val, int num_args, \ - const palo_udf::AnyValType* args); \ + static doris_udf::BooleanVal in_iterate( \ + doris_udf::FunctionContext* context, const doris_udf::AnyValType& val, int num_args, \ + const doris_udf::AnyValType* args); \ \ - static palo_udf::BooleanVal not_in_iterate( \ - palo_udf::FunctionContext* context, const palo_udf::AnyValType& val, int num_args, \ - const palo_udf::AnyValType* args); \ + static doris_udf::BooleanVal not_in_iterate( \ + doris_udf::FunctionContext* context, const doris_udf::AnyValType& val, int num_args, \ + const doris_udf::AnyValType* args); \ \ static void set_lookup_prepare_##type_name( \ - palo_udf::FunctionContext* ctx, palo_udf::FunctionContext::FunctionStateScope scope); \ + doris_udf::FunctionContext* ctx, doris_udf::FunctionContext::FunctionStateScope scope); \ \ static void set_lookup_close_##type_name( \ - palo_udf::FunctionContext* ctx, palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext* ctx, doris_udf::FunctionContext::FunctionStateScope scope); -namespace palo { +namespace doris { /// Predicate for evaluating expressions of the form "val [NOT] IN (x1, x2, x3...)". // @@ -70,227 +70,227 @@ class InPredicate { static void init(); /// Functions for every type - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::BooleanVal& val, - int num_args, const palo_udf::BooleanVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::BooleanVal& val, + int num_args, const doris_udf::BooleanVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::BooleanVal& val, - int num_args, const palo_udf::BooleanVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::BooleanVal& val, + int num_args, const doris_udf::BooleanVal* args); static void set_lookup_prepare_boolean_val( - palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); static void set_lookup_close_boolean_val( - palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::BooleanVal& val, - int num_args, const palo_udf::BooleanVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::BooleanVal& val, + int num_args, const doris_udf::BooleanVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::BooleanVal& val, - int num_args, const palo_udf::BooleanVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::BooleanVal& val, + int num_args, const doris_udf::BooleanVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::TinyIntVal& val, - int num_args, const palo_udf::TinyIntVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::TinyIntVal& val, + int num_args, const doris_udf::TinyIntVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::TinyIntVal& val, - int num_args, const palo_udf::TinyIntVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::TinyIntVal& val, + int num_args, const doris_udf::TinyIntVal* args); - static void set_lookup_prepare_tiny_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_tiny_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_tiny_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_tiny_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::TinyIntVal& val, - int num_args, const palo_udf::TinyIntVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::TinyIntVal& val, + int num_args, const doris_udf::TinyIntVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::TinyIntVal& val, - int num_args, const palo_udf::TinyIntVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::TinyIntVal& val, + int num_args, const doris_udf::TinyIntVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::SmallIntVal& val, - int num_args, const palo_udf::SmallIntVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::SmallIntVal& val, + int num_args, const doris_udf::SmallIntVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::SmallIntVal& val, - int num_args, const palo_udf::SmallIntVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::SmallIntVal& val, + int num_args, const doris_udf::SmallIntVal* args); - static void set_lookup_prepare_small_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_small_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_small_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_small_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::SmallIntVal& val, - int num_args, const palo_udf::SmallIntVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::SmallIntVal& val, + int num_args, const doris_udf::SmallIntVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::SmallIntVal& val, - int num_args, const palo_udf::SmallIntVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::SmallIntVal& val, + int num_args, const doris_udf::SmallIntVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::IntVal& val, - int num_args, const palo_udf::IntVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::IntVal& val, + int num_args, const doris_udf::IntVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::IntVal& val, - int num_args, const palo_udf::IntVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::IntVal& val, + int num_args, const doris_udf::IntVal* args); - static void set_lookup_prepare_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::IntVal& val, - int num_args, const palo_udf::IntVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::IntVal& val, + int num_args, const doris_udf::IntVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::IntVal& val, - int num_args, const palo_udf::IntVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::IntVal& val, + int num_args, const doris_udf::IntVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::BigIntVal& val, - int num_args, const palo_udf::BigIntVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::BigIntVal& val, + int num_args, const doris_udf::BigIntVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::BigIntVal& val, - int num_args, const palo_udf::BigIntVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::BigIntVal& val, + int num_args, const doris_udf::BigIntVal* args); - static void set_lookup_prepare_big_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_big_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_big_int_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_big_int_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::BigIntVal& val, - int num_args, const palo_udf::BigIntVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::BigIntVal& val, + int num_args, const doris_udf::BigIntVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::BigIntVal& val, - int num_args, const palo_udf::BigIntVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::BigIntVal& val, + int num_args, const doris_udf::BigIntVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::FloatVal& val, - int num_args, const palo_udf::FloatVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::FloatVal& val, + int num_args, const doris_udf::FloatVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::FloatVal& val, - int num_args, const palo_udf::FloatVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::FloatVal& val, + int num_args, const doris_udf::FloatVal* args); - static void set_lookup_prepare_float_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_float_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_float_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_float_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::FloatVal& val, - int num_args, const palo_udf::FloatVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::FloatVal& val, + int num_args, const doris_udf::FloatVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::FloatVal& val, - int num_args, const palo_udf::FloatVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::FloatVal& val, + int num_args, const doris_udf::FloatVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::DoubleVal& val, - int num_args, const palo_udf::DoubleVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::DoubleVal& val, + int num_args, const doris_udf::DoubleVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::DoubleVal& val, - int num_args, const palo_udf::DoubleVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::DoubleVal& val, + int num_args, const doris_udf::DoubleVal* args); - static void set_lookup_prepare_double_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_double_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_double_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_double_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::DoubleVal& val, - int num_args, const palo_udf::DoubleVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::DoubleVal& val, + int num_args, const doris_udf::DoubleVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::DoubleVal& val, - int num_args, const palo_udf::DoubleVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::DoubleVal& val, + int num_args, const doris_udf::DoubleVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::StringVal& val, - int num_args, const palo_udf::StringVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::StringVal& val, + int num_args, const doris_udf::StringVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::StringVal& val, - int num_args, const palo_udf::StringVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::StringVal& val, + int num_args, const doris_udf::StringVal* args); - static void set_lookup_prepare_string_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_string_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_string_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_string_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::StringVal& val, - int num_args, const palo_udf::StringVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::StringVal& val, + int num_args, const doris_udf::StringVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::StringVal& val, - int num_args, const palo_udf::StringVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::StringVal& val, + int num_args, const doris_udf::StringVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& val, - int num_args, const palo_udf::DateTimeVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& val, + int num_args, const doris_udf::DateTimeVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& val, - int num_args, const palo_udf::DateTimeVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& val, + int num_args, const doris_udf::DateTimeVal* args); - static void set_lookup_prepare_datetime_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_datetime_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_datetime_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_datetime_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& val, - int num_args, const palo_udf::DateTimeVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& val, + int num_args, const doris_udf::DateTimeVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& val, - int num_args, const palo_udf::DateTimeVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& val, + int num_args, const doris_udf::DateTimeVal* args); - static palo_udf::BooleanVal in_iterate( - palo_udf::FunctionContext* context, const palo_udf::DecimalVal& val, - int num_args, const palo_udf::DecimalVal* args); + static doris_udf::BooleanVal in_iterate( + doris_udf::FunctionContext* context, const doris_udf::DecimalVal& val, + int num_args, const doris_udf::DecimalVal* args); - static palo_udf::BooleanVal not_in_iterate( - palo_udf::FunctionContext* context, const palo_udf::DecimalVal& val, - int num_args, const palo_udf::DecimalVal* args); + static doris_udf::BooleanVal not_in_iterate( + doris_udf::FunctionContext* context, const doris_udf::DecimalVal& val, + int num_args, const doris_udf::DecimalVal* args); - static void set_lookup_prepare_decimal_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_prepare_decimal_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static void set_lookup_close_decimal_val(palo_udf::FunctionContext* ctx, - palo_udf::FunctionContext::FunctionStateScope scope); + static void set_lookup_close_decimal_val(doris_udf::FunctionContext* ctx, + doris_udf::FunctionContext::FunctionStateScope scope); - static palo_udf::BooleanVal in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::DecimalVal& val, - int num_args, const palo_udf::DecimalVal* args); + static doris_udf::BooleanVal in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::DecimalVal& val, + int num_args, const doris_udf::DecimalVal* args); - static palo_udf::BooleanVal not_in_set_lookup( - palo_udf::FunctionContext* context, const palo_udf::DecimalVal& val, - int num_args, const palo_udf::DecimalVal* args); + static doris_udf::BooleanVal not_in_set_lookup( + doris_udf::FunctionContext* context, const doris_udf::DecimalVal& val, + int num_args, const doris_udf::DecimalVal* args); /* added by lide */ IN_FUNCTIONS_STMT(LargeIntVal, __int128, large_int_val) @@ -322,8 +322,8 @@ class InPredicate { /// The templated function that provides the implementation for all the In() and NotIn() /// functions. template - static inline palo_udf::BooleanVal templated_in( - palo_udf::FunctionContext* context, const T& val, int num_args, const T* args); + static inline doris_udf::BooleanVal templated_in( + doris_udf::FunctionContext* context, const T& val, int num_args, const T* args); /// Initializes an SetLookupState in ctx. template diff --git a/be/src/exprs/null_literal.cpp b/be/src/exprs/null_literal.cpp index 5fb2e7a08380c6..7f5ca92ef98e91 100644 --- a/be/src/exprs/null_literal.cpp +++ b/be/src/exprs/null_literal.cpp @@ -26,7 +26,7 @@ using llvm::BasicBlock; using llvm::Function; using llvm::Value; -namespace palo { +namespace doris { NullLiteral::NullLiteral(const TExprNode& node) : Expr(node) { diff --git a/be/src/exprs/null_literal.h b/be/src/exprs/null_literal.h index 09fa8410e57606..5edae780ef7925 100644 --- a/be/src/exprs/null_literal.h +++ b/be/src/exprs/null_literal.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_NULL_LITERAL_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_NULL_LITERAL_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_NULL_LITERAL_H +#define DORIS_BE_SRC_QUERY_EXPRS_NULL_LITERAL_H #include "exprs/expr.h" @@ -24,7 +24,7 @@ namespace llvm { class Function; } -namespace palo { +namespace doris { class TExprNode; @@ -36,16 +36,16 @@ class NullLiteral : public Expr { } // NullLiteral(PrimitiveType type); virtual Status get_codegend_compute_fn(RuntimeState* state, llvm::Function** fn); - virtual palo_udf::BooleanVal get_boolean_val(ExprContext*, TupleRow*); - virtual palo_udf::TinyIntVal get_tiny_int_val(ExprContext*, TupleRow*); - virtual palo_udf::SmallIntVal get_small_int_val(ExprContext*, TupleRow*); - virtual palo_udf::IntVal get_int_val(ExprContext*, TupleRow*); - virtual palo_udf::BigIntVal get_big_int_val(ExprContext*, TupleRow*); - virtual palo_udf::FloatVal get_float_val(ExprContext*, TupleRow*); - virtual palo_udf::DoubleVal get_double_val(ExprContext*, TupleRow*); - virtual palo_udf::StringVal get_string_val(ExprContext*, TupleRow*); - virtual palo_udf::DateTimeVal get_datetime_val(ExprContext*, TupleRow*); - virtual palo_udf::DecimalVal get_decimal_val(ExprContext*, TupleRow*); + virtual doris_udf::BooleanVal get_boolean_val(ExprContext*, TupleRow*); + virtual doris_udf::TinyIntVal get_tiny_int_val(ExprContext*, TupleRow*); + virtual doris_udf::SmallIntVal get_small_int_val(ExprContext*, TupleRow*); + virtual doris_udf::IntVal get_int_val(ExprContext*, TupleRow*); + virtual doris_udf::BigIntVal get_big_int_val(ExprContext*, TupleRow*); + virtual doris_udf::FloatVal get_float_val(ExprContext*, TupleRow*); + virtual doris_udf::DoubleVal get_double_val(ExprContext*, TupleRow*); + virtual doris_udf::StringVal get_string_val(ExprContext*, TupleRow*); + virtual doris_udf::DateTimeVal get_datetime_val(ExprContext*, TupleRow*); + virtual doris_udf::DecimalVal get_decimal_val(ExprContext*, TupleRow*); protected: friend class Expr; diff --git a/be/src/exprs/operators.cpp b/be/src/exprs/operators.cpp index 6fb749b242ee5b..699b900c5284e9 100644 --- a/be/src/exprs/operators.cpp +++ b/be/src/exprs/operators.cpp @@ -23,7 +23,7 @@ #include -namespace palo { +namespace doris { void Operators::init() { } @@ -66,12 +66,12 @@ void Operators::init() { return BooleanVal(v1.val OP v2.val);\ } -#define BINARY_PREDICATE_NONNUMERIC_FN(NAME, TYPE_NAME, FUNC_NAME, TYPE, PALO_TYPE, OP) \ +#define BINARY_PREDICATE_NONNUMERIC_FN(NAME, TYPE_NAME, FUNC_NAME, TYPE, DORIS_TYPE, OP) \ BooleanVal Operators::NAME##_##TYPE_NAME##_##TYPE_NAME(\ FunctionContext* c, const TYPE& v1, const TYPE& v2) {\ if (v1.is_null || v2.is_null) return BooleanVal::null();\ - PALO_TYPE iv1 = PALO_TYPE::from_##FUNC_NAME(v1);\ - PALO_TYPE iv2 = PALO_TYPE::from_##FUNC_NAME(v2);\ + DORIS_TYPE iv1 = DORIS_TYPE::from_##FUNC_NAME(v1);\ + DORIS_TYPE iv2 = DORIS_TYPE::from_##FUNC_NAME(v2);\ return BooleanVal(iv1 OP iv2);\ } @@ -181,5 +181,5 @@ BINARY_PREDICATE_ALL_TYPES(gt, >); BINARY_PREDICATE_ALL_TYPES(lt, <); BINARY_PREDICATE_ALL_TYPES(ge, >=); BINARY_PREDICATE_ALL_TYPES(le, <=); -} // namespace palo +} // namespace doris diff --git a/be/src/exprs/operators.h b/be/src/exprs/operators.h index c3ee4f3b98fce8..1fad930bc0ab2b 100644 --- a/be/src/exprs/operators.h +++ b/be/src/exprs/operators.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_OPERATORS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_OPERATORS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_OPERATORS_H +#define DORIS_BE_SRC_QUERY_EXPRS_OPERATORS_H #include "udf/udf.h" -namespace palo { +namespace doris { /// Operators written against the UDF interface. class Operators { @@ -274,7 +274,7 @@ class Operators { FunctionContext*, const DateTimeVal&, const DateTimeVal&); }; -} // namespace palo +} // namespace doris #endif diff --git a/be/src/exprs/predicate.h b/be/src/exprs/predicate.h index 9a8fdcec683f04..8e9a54d08b3248 100644 --- a/be/src/exprs/predicate.h +++ b/be/src/exprs/predicate.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_PREDICATE_H #include "exprs/expr.h" -namespace palo { +namespace doris { class TExprNode; diff --git a/be/src/exprs/scalar_fn_call.cpp b/be/src/exprs/scalar_fn_call.cpp index 26933009e08053..10a2d80f3c3ace 100644 --- a/be/src/exprs/scalar_fn_call.cpp +++ b/be/src/exprs/scalar_fn_call.cpp @@ -36,7 +36,7 @@ using llvm::Function; using llvm::FunctionType; using llvm::BasicBlock; using llvm::Type; -namespace palo { +namespace doris { ScalarFnCall::ScalarFnCall(const TExprNode& node) : Expr(node), @@ -265,8 +265,8 @@ bool ScalarFnCall::is_constant() const { // store i64 %arg_val4, i64* inttoptr (i64 89111096 to i64*) // %result = call { i8, double } // @_Z14VarSumMultiplyPN10impala_udf15FunctionContextERKNS_9DoubleValEiPKNS_6IntValE( -// %"class.palo_udf::FunctionContext"* inttoptr -// (i64 37522464 to %"class.palo_udf::FunctionContext"*), +// %"class.doris_udf::FunctionContext"* inttoptr +// (i64 37522464 to %"class.doris_udf::FunctionContext"*), // {i8, double }* %arg_ptr, // i32 4, // i64* inttoptr (i64 89111072 to i64*)) @@ -448,7 +448,7 @@ Status ScalarFnCall::get_udf(RuntimeState* state, Function** udf) { codegen->get_ptr_type(CodegenAnyVal::get_unlowered_type(codegen, type()))); } - arg_types.push_back(codegen->get_ptr_type("class.palo_udf::FunctionContext")); + arg_types.push_back(codegen->get_ptr_type("class.doris_udf::FunctionContext")); for (int i = 0; i < num_fixed_args(); ++i) { Type* arg_type = codegen->get_ptr_type( CodegenAnyVal::get_unlowered_type(codegen, _children[i]->type())); diff --git a/be/src/exprs/scalar_fn_call.h b/be/src/exprs/scalar_fn_call.h index d30f7e0bc50a6c..240faac6ce4d36 100644 --- a/be/src/exprs/scalar_fn_call.h +++ b/be/src/exprs/scalar_fn_call.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_SCALAR_FN_CALL_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_SCALAR_FN_CALL_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_SCALAR_FN_CALL_H +#define DORIS_BE_SRC_QUERY_EXPRS_SCALAR_FN_CALL_H #include #include "exprs/expr.h" #include "udf/udf.h" -namespace palo { +namespace doris { class TExprNode; @@ -67,18 +67,18 @@ class ScalarFnCall : public Expr { virtual bool is_constant() const; - virtual palo_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); - virtual palo_udf::TinyIntVal get_tiny_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::SmallIntVal get_small_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::IntVal get_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::BigIntVal get_big_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::LargeIntVal get_large_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::FloatVal get_float_val(ExprContext* context, TupleRow*); - virtual palo_udf::DoubleVal get_double_val(ExprContext* context, TupleRow*); - virtual palo_udf::StringVal get_string_val(ExprContext* context, TupleRow*); - virtual palo_udf::DateTimeVal get_datetime_val(ExprContext* context, TupleRow*); - virtual palo_udf::DecimalVal get_decimal_val(ExprContext* context, TupleRow*); - // virtual palo_udf::ArrayVal GetArrayVal(ExprContext* context, TupleRow*); + virtual doris_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); + virtual doris_udf::TinyIntVal get_tiny_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::SmallIntVal get_small_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::IntVal get_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::BigIntVal get_big_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::LargeIntVal get_large_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::FloatVal get_float_val(ExprContext* context, TupleRow*); + virtual doris_udf::DoubleVal get_double_val(ExprContext* context, TupleRow*); + virtual doris_udf::StringVal get_string_val(ExprContext* context, TupleRow*); + virtual doris_udf::DateTimeVal get_datetime_val(ExprContext* context, TupleRow*); + virtual doris_udf::DecimalVal get_decimal_val(ExprContext* context, TupleRow*); + // virtual doris_udf::ArrayVal GetArrayVal(ExprContext* context, TupleRow*); private: /// If this function has var args, children()[_vararg_start_idx] is the first vararg @@ -120,7 +120,7 @@ class ScalarFnCall : public Expr { /// Evaluates the children exprs and stores the results in input_vals. Used in the /// interpreted path. void evaluate_children(ExprContext* context, TupleRow* row, - std::vector* input_vals); + std::vector* input_vals); /// Function to call _scalar_fn. Used in the interpreted path. template diff --git a/be/src/exprs/slot_ref.cpp b/be/src/exprs/slot_ref.cpp index ee120493845833..d8cb4b799c67a5 100644 --- a/be/src/exprs/slot_ref.cpp +++ b/be/src/exprs/slot_ref.cpp @@ -34,7 +34,7 @@ using llvm::PHINode; using llvm::PointerType; using llvm::Value; -namespace palo { +namespace doris { SlotRef::SlotRef(const TExprNode& node) : Expr(node, true), @@ -138,9 +138,9 @@ std::string SlotRef::debug_string() const { // (Note: some of the GEPs that look like no-ops are because certain offsets are 0 // in this slot descriptor.) // -// define { i8, i64 } @get_slot_ref(i8** %context, %"class.palo::TupleRow"* %row) { +// define { i8, i64 } @get_slot_ref(i8** %context, %"class.doris::TupleRow"* %row) { // entry: -// %cast_row_ptr = bitcast %"class.palo::TupleRow"* %row to i8** +// %cast_row_ptr = bitcast %"class.doris::TupleRow"* %row to i8** // %tuple_addr = getelementptr i8** %cast_row_ptr, i32 0 // %tuple_ptr = load i8** %tuple_addr // br label %check_slot_null diff --git a/be/src/exprs/slot_ref.h b/be/src/exprs/slot_ref.h index 97e85aeb84500f..01202629fc4b0f 100644 --- a/be/src/exprs/slot_ref.h +++ b/be/src/exprs/slot_ref.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_SLOT_REF_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_SLOT_REF_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_SLOT_REF_H +#define DORIS_BE_SRC_QUERY_EXPRS_SLOT_REF_H #include "exprs/expr.h" -namespace palo { +namespace doris { // Reference to a single slot of a tuple. // We inline this here in order for Expr::get_value() to be able @@ -66,18 +66,18 @@ class SlotRef : public Expr { } virtual Status get_codegend_compute_fn(RuntimeState* state, llvm::Function** fn) override; - virtual palo_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); - virtual palo_udf::TinyIntVal get_tiny_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::SmallIntVal get_small_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::IntVal get_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::BigIntVal get_big_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::LargeIntVal get_large_int_val(ExprContext* context, TupleRow*); - virtual palo_udf::FloatVal get_float_val(ExprContext* context, TupleRow*); - virtual palo_udf::DoubleVal get_double_val(ExprContext* context, TupleRow*); - virtual palo_udf::StringVal get_string_val(ExprContext* context, TupleRow*); - virtual palo_udf::DateTimeVal get_datetime_val(ExprContext* context, TupleRow*); - virtual palo_udf::DecimalVal get_decimal_val(ExprContext* context, TupleRow*); - // virtual palo_udf::ArrayVal GetArrayVal(ExprContext* context, TupleRow*); + virtual doris_udf::BooleanVal get_boolean_val(ExprContext* context, TupleRow*); + virtual doris_udf::TinyIntVal get_tiny_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::SmallIntVal get_small_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::IntVal get_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::BigIntVal get_big_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::LargeIntVal get_large_int_val(ExprContext* context, TupleRow*); + virtual doris_udf::FloatVal get_float_val(ExprContext* context, TupleRow*); + virtual doris_udf::DoubleVal get_double_val(ExprContext* context, TupleRow*); + virtual doris_udf::StringVal get_string_val(ExprContext* context, TupleRow*); + virtual doris_udf::DateTimeVal get_datetime_val(ExprContext* context, TupleRow*); + virtual doris_udf::DecimalVal get_decimal_val(ExprContext* context, TupleRow*); + // virtual doris_udf::ArrayVal GetArrayVal(ExprContext* context, TupleRow*); private: int _tuple_idx; // within row diff --git a/be/src/exprs/string_functions.cpp b/be/src/exprs/string_functions.cpp index ee7af737865eb5..7fcd5dc3a212b4 100644 --- a/be/src/exprs/string_functions.cpp +++ b/be/src/exprs/string_functions.cpp @@ -26,7 +26,7 @@ #include "util/url_parser.h" // NOTE: be careful not to use string::append. It is not performant. -namespace palo { +namespace doris { void StringFunctions::init() { } diff --git a/be/src/exprs/string_functions.h b/be/src/exprs/string_functions.h index 032a563de8782a..22bdcf7b4557b0 100644 --- a/be/src/exprs/string_functions.h +++ b/be/src/exprs/string_functions.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_STRING_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_STRING_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_STRING_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_STRING_FUNCTIONS_H #include #include "runtime/string_value.h" #include "runtime/string_search.hpp" -namespace palo { +namespace doris { class Expr; class OpcodeRegistry; @@ -33,72 +33,72 @@ class StringFunctions { public: static void init(); - static palo_udf::StringVal substring( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::IntVal& pos, const palo_udf::IntVal& len); - static palo_udf::StringVal substring( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::IntVal& pos); - static palo_udf::StringVal left( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::IntVal& len); - static palo_udf::StringVal right( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::IntVal& len); - static palo_udf::StringVal space( - palo_udf::FunctionContext* context, const palo_udf::IntVal& len); - static palo_udf::StringVal repeat( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::IntVal& n); - static palo_udf::StringVal lpad( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::IntVal& len, const palo_udf::StringVal& pad); - static palo_udf::StringVal rpad( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::IntVal& len, const palo_udf::StringVal& pad); - static palo_udf::IntVal length( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::StringVal lower( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::StringVal upper( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::StringVal reverse( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::StringVal trim( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::StringVal ltrim( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::StringVal rtrim( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::IntVal ascii( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str); - static palo_udf::IntVal instr( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::StringVal&); - static palo_udf::IntVal locate( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::StringVal&); - static palo_udf::IntVal locate_pos( - palo_udf::FunctionContext* context, const palo_udf::StringVal& str, - const palo_udf::StringVal&, const palo_udf::IntVal&); + static doris_udf::StringVal substring( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::IntVal& pos, const doris_udf::IntVal& len); + static doris_udf::StringVal substring( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::IntVal& pos); + static doris_udf::StringVal left( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::IntVal& len); + static doris_udf::StringVal right( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::IntVal& len); + static doris_udf::StringVal space( + doris_udf::FunctionContext* context, const doris_udf::IntVal& len); + static doris_udf::StringVal repeat( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::IntVal& n); + static doris_udf::StringVal lpad( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::IntVal& len, const doris_udf::StringVal& pad); + static doris_udf::StringVal rpad( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::IntVal& len, const doris_udf::StringVal& pad); + static doris_udf::IntVal length( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::StringVal lower( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::StringVal upper( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::StringVal reverse( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::StringVal trim( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::StringVal ltrim( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::StringVal rtrim( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::IntVal ascii( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str); + static doris_udf::IntVal instr( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::StringVal&); + static doris_udf::IntVal locate( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::StringVal&); + static doris_udf::IntVal locate_pos( + doris_udf::FunctionContext* context, const doris_udf::StringVal& str, + const doris_udf::StringVal&, const doris_udf::IntVal&); static bool set_re2_options( - const palo_udf::StringVal& match_parameter, + const doris_udf::StringVal& match_parameter, std::string* error_str, re2::RE2::Options* opts); static void regexp_prepare( - palo_udf::FunctionContext*, - palo_udf::FunctionContext::FunctionStateScope); + doris_udf::FunctionContext*, + doris_udf::FunctionContext::FunctionStateScope); static StringVal regexp_extract( - palo_udf::FunctionContext*, const palo_udf::StringVal& str, - const palo_udf::StringVal& pattern, const palo_udf::BigIntVal& index); + doris_udf::FunctionContext*, const doris_udf::StringVal& str, + const doris_udf::StringVal& pattern, const doris_udf::BigIntVal& index); static StringVal regexp_replace( - palo_udf::FunctionContext*, const palo_udf::StringVal& str, - const palo_udf::StringVal& pattern, const palo_udf::StringVal& replace); + doris_udf::FunctionContext*, const doris_udf::StringVal& str, + const doris_udf::StringVal& pattern, const doris_udf::StringVal& replace); static void regexp_close( - palo_udf::FunctionContext*, - palo_udf::FunctionContext::FunctionStateScope); + doris_udf::FunctionContext*, + doris_udf::FunctionContext::FunctionStateScope); #if 0 static void RegexpMatchCountPrepare(FunctionContext* context, FunctionContext::FunctionStateScope scope); @@ -109,34 +109,34 @@ class StringFunctions { const StringVal& match_parameter); #endif static StringVal concat( - palo_udf::FunctionContext*, + doris_udf::FunctionContext*, int num_children, const StringVal* strs); static StringVal concat_ws( - palo_udf::FunctionContext*, - const palo_udf::StringVal& sep, + doris_udf::FunctionContext*, + const doris_udf::StringVal& sep, int num_children, - const palo_udf::StringVal* strs); + const doris_udf::StringVal* strs); static IntVal find_in_set( - palo_udf::FunctionContext*, - const palo_udf::StringVal& str, - const palo_udf::StringVal& str_set); + doris_udf::FunctionContext*, + const doris_udf::StringVal& str, + const doris_udf::StringVal& str_set); static void parse_url_prepare( - palo_udf::FunctionContext*, - palo_udf::FunctionContext::FunctionStateScope); + doris_udf::FunctionContext*, + doris_udf::FunctionContext::FunctionStateScope); static StringVal parse_url( - palo_udf::FunctionContext*, - const palo_udf::StringVal& url, - const palo_udf::StringVal& part); + doris_udf::FunctionContext*, + const doris_udf::StringVal& url, + const doris_udf::StringVal& part); static StringVal parse_url_key( - palo_udf::FunctionContext*, - const palo_udf::StringVal& url, - const palo_udf::StringVal& key, - const palo_udf::StringVal& part); + doris_udf::FunctionContext*, + const doris_udf::StringVal& url, + const doris_udf::StringVal& key, + const doris_udf::StringVal& part); static void parse_url_close( - palo_udf::FunctionContext*, - palo_udf::FunctionContext::FunctionStateScope); + doris_udf::FunctionContext*, + doris_udf::FunctionContext::FunctionStateScope); }; } diff --git a/be/src/exprs/timestamp_functions.cpp b/be/src/exprs/timestamp_functions.cpp index 3a3606fd560367..7c0ddfb316e8e6 100644 --- a/be/src/exprs/timestamp_functions.cpp +++ b/be/src/exprs/timestamp_functions.cpp @@ -33,7 +33,7 @@ #define TIMEZONE_DATABASE "be/files/date_time_zonespec.csv" -namespace palo { +namespace doris { boost::local_time::tz_database TimezoneDatabase::_s_tz_database; std::vector TimezoneDatabase::_s_tz_region_list; @@ -540,7 +540,7 @@ TimezoneDatabase::TimezoneDatabase() { // interface only loads this format from a file. We don't want to raise // an error here since this is done when the backend is created and this // information might not actually get used by any queries. - char filestr[] = "/tmp/palo.tzdb.XXXXXXX"; + char filestr[] = "/tmp/doris.tzdb.XXXXXXX"; FILE* file = NULL; int fd = -1; diff --git a/be/src/exprs/timestamp_functions.h b/be/src/exprs/timestamp_functions.h index 254fba157a132a..6f34f2afb4b3d9 100644 --- a/be/src/exprs/timestamp_functions.h +++ b/be/src/exprs/timestamp_functions.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_TIMESTAMP_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_TIMESTAMP_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_TIMESTAMP_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_TIMESTAMP_FUNCTIONS_H #include #include @@ -26,7 +26,7 @@ #include "runtime/string_value.h" #include "runtime/datetime_value.h" -namespace palo { +namespace doris { class Expr; class OpcodeRegistry; @@ -36,127 +36,127 @@ class TimestampFunctions { public: static void init(); /// Returns the current time. - static palo_udf::IntVal to_unix(palo_udf::FunctionContext* context); + static doris_udf::IntVal to_unix(doris_udf::FunctionContext* context); /// Converts 'tv_val' to a unix time_t - static palo_udf::IntVal to_unix( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& tv_val); + static doris_udf::IntVal to_unix( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& tv_val); /// Parses 'string_val' based on the format 'fmt'. - static palo_udf::IntVal to_unix( - palo_udf::FunctionContext* context, const palo_udf::StringVal& string_val, - const palo_udf::StringVal& fmt); + static doris_udf::IntVal to_unix( + doris_udf::FunctionContext* context, const doris_udf::StringVal& string_val, + const doris_udf::StringVal& fmt); /// Return a timestamp string from a unix time_t /// Optional second argument is the format of the string. /// TIME is the integer type of the unix time argument. - static palo_udf::StringVal from_unix( - palo_udf::FunctionContext* context, const palo_udf::IntVal& unix_time); - static palo_udf::StringVal from_unix( - palo_udf::FunctionContext* context, const palo_udf::IntVal& unix_time, - const palo_udf::StringVal& fmt); + static doris_udf::StringVal from_unix( + doris_udf::FunctionContext* context, const doris_udf::IntVal& unix_time); + static doris_udf::StringVal from_unix( + doris_udf::FunctionContext* context, const doris_udf::IntVal& unix_time, + const doris_udf::StringVal& fmt); // Functions to extract parts of the timestamp, return integers. - static palo_udf::IntVal year( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal quarter( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal month( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal day_of_month( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal day_of_year( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal week_of_year( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal hour( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal minute( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal second( - palo_udf::FunctionContext* context, const palo_udf::DateTimeVal& ts_val); + static doris_udf::IntVal year( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal quarter( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal month( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal day_of_month( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal day_of_year( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal week_of_year( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal hour( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal minute( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal second( + doris_udf::FunctionContext* context, const doris_udf::DateTimeVal& ts_val); // Date/time functions. - static palo_udf::DateTimeVal now(palo_udf::FunctionContext* context); - static palo_udf::DateTimeVal curtime(palo_udf::FunctionContext* context); - static palo_udf::DateTimeVal to_date( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val); - static palo_udf::IntVal date_diff( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val1, - const palo_udf::DateTimeVal& ts_val2); - static palo_udf::DateTimeVal time_diff( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val1, - const palo_udf::DateTimeVal& ts_val2); - - static palo_udf::DateTimeVal years_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal years_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal months_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal months_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal weeks_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal weeks_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal days_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal days_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal hours_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal hours_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal minutes_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal minutes_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal seconds_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal seconds_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal micros_add( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - static palo_udf::DateTimeVal micros_sub( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count); - - static palo_udf::StringVal date_format( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::StringVal& format); - static palo_udf::DateTimeVal from_days( - palo_udf::FunctionContext* ctx, const palo_udf::IntVal& days); - static palo_udf::IntVal to_days( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val); - static palo_udf::DateTimeVal str_to_date( - palo_udf::FunctionContext* ctx, const palo_udf::StringVal& str, - const palo_udf::StringVal& format); - static palo_udf::StringVal month_name( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val); - static palo_udf::StringVal day_name( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val); - - static palo_udf::DateTimeVal timestamp( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& val); + static doris_udf::DateTimeVal now(doris_udf::FunctionContext* context); + static doris_udf::DateTimeVal curtime(doris_udf::FunctionContext* context); + static doris_udf::DateTimeVal to_date( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val); + static doris_udf::IntVal date_diff( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val1, + const doris_udf::DateTimeVal& ts_val2); + static doris_udf::DateTimeVal time_diff( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val1, + const doris_udf::DateTimeVal& ts_val2); + + static doris_udf::DateTimeVal years_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal years_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal months_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal months_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal weeks_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal weeks_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal days_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal days_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal hours_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal hours_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal minutes_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal minutes_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal seconds_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal seconds_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal micros_add( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + static doris_udf::DateTimeVal micros_sub( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count); + + static doris_udf::StringVal date_format( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::StringVal& format); + static doris_udf::DateTimeVal from_days( + doris_udf::FunctionContext* ctx, const doris_udf::IntVal& days); + static doris_udf::IntVal to_days( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val); + static doris_udf::DateTimeVal str_to_date( + doris_udf::FunctionContext* ctx, const doris_udf::StringVal& str, + const doris_udf::StringVal& format); + static doris_udf::StringVal month_name( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val); + static doris_udf::StringVal day_name( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val); + + static doris_udf::DateTimeVal timestamp( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& val); // Helper for add/sub functions on the time portion. template - static palo_udf::DateTimeVal timestamp_time_op( - palo_udf::FunctionContext* ctx, const palo_udf::DateTimeVal& ts_val, - const palo_udf::IntVal& count, bool is_add); + static doris_udf::DateTimeVal timestamp_time_op( + doris_udf::FunctionContext* ctx, const doris_udf::DateTimeVal& ts_val, + const doris_udf::IntVal& count, bool is_add); // Convert a timestamp to or from a particular timezone based time. static void* from_utc(Expr* e, TupleRow* row); diff --git a/be/src/exprs/timezone_db.cpp b/be/src/exprs/timezone_db.cpp index 9a361a7024b1eb..3ba36736b901c8 100644 --- a/be/src/exprs/timezone_db.cpp +++ b/be/src/exprs/timezone_db.cpp @@ -17,7 +17,7 @@ #include "timestamp_functions.h" -namespace palo { +namespace doris { const char* TimezoneDatabase::_s_timezone_database_str = "\"ID\",\"STD ABBR\",\"STD NAME\",\"DST ABBR\",\"DST NAME\",\"GMT offset\",\"DST adjustment\",\ \"DST Start Date rule\",\"Start time\",\"DST End date rule\",\"End time\"\n\ diff --git a/be/src/exprs/tuple_is_null_predicate.cpp b/be/src/exprs/tuple_is_null_predicate.cpp index 2203119df784fe..4c1f1370a7b68d 100644 --- a/be/src/exprs/tuple_is_null_predicate.cpp +++ b/be/src/exprs/tuple_is_null_predicate.cpp @@ -23,7 +23,7 @@ using llvm::Function; -namespace palo { +namespace doris { TupleIsNullPredicate::TupleIsNullPredicate(const TExprNode& node) : Predicate(node), diff --git a/be/src/exprs/tuple_is_null_predicate.h b/be/src/exprs/tuple_is_null_predicate.h index 3ba69f370e85a7..08c7a82317c478 100644 --- a/be/src/exprs/tuple_is_null_predicate.h +++ b/be/src/exprs/tuple_is_null_predicate.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_TUPLE_IS_NULL_PREDICATE_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_TUPLE_IS_NULL_PREDICATE_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_TUPLE_IS_NULL_PREDICATE_H +#define DORIS_BE_SRC_QUERY_EXPRS_TUPLE_IS_NULL_PREDICATE_H #include "exprs/predicate.h" -namespace palo { +namespace doris { class TExprNode; diff --git a/be/src/exprs/udf_builtins.cpp b/be/src/exprs/udf_builtins.cpp index 554f32757a612f..ad0116b2b6f17f 100755 --- a/be/src/exprs/udf_builtins.cpp +++ b/be/src/exprs/udf_builtins.cpp @@ -21,19 +21,19 @@ #include #include "common/logging.h" -namespace palo { -using palo_udf::FunctionContext; -using palo_udf::BooleanVal; -using palo_udf::TinyIntVal; -using palo_udf::SmallIntVal; -using palo_udf::IntVal; -using palo_udf::BigIntVal; -using palo_udf::LargeIntVal; -using palo_udf::FloatVal; -using palo_udf::DoubleVal; -using palo_udf::DecimalVal; -using palo_udf::StringVal; -using palo_udf::AnyVal; +namespace doris { +using doris_udf::FunctionContext; +using doris_udf::BooleanVal; +using doris_udf::TinyIntVal; +using doris_udf::SmallIntVal; +using doris_udf::IntVal; +using doris_udf::BigIntVal; +using doris_udf::LargeIntVal; +using doris_udf::FloatVal; +using doris_udf::DoubleVal; +using doris_udf::DecimalVal; +using doris_udf::StringVal; +using doris_udf::AnyVal; DoubleVal UdfBuiltins::abs(FunctionContext* context, const DoubleVal& v) { if (v.is_null) { diff --git a/be/src/exprs/udf_builtins.h b/be/src/exprs/udf_builtins.h index c3fcffa99c7dd7..cb00acf6f74200 100755 --- a/be/src/exprs/udf_builtins.h +++ b/be/src/exprs/udf_builtins.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_UDF_BUILTINS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_UDF_BUILTINS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_UDF_BUILTINS_H +#define DORIS_BE_SRC_QUERY_EXPRS_UDF_BUILTINS_H #include "udf/udf.h" -namespace palo { +namespace doris { // Builtins written against the UDF interface. The builtins in the other files // should be replaced to the UDF interface as well. @@ -28,23 +28,23 @@ namespace palo { // implemented. class UdfBuiltins { public: - static palo_udf::DoubleVal abs(palo_udf::FunctionContext* context, - const palo_udf::DoubleVal& v); - static palo_udf::DecimalVal decimal_abs(palo_udf::FunctionContext* context, - const palo_udf::DecimalVal& v); - static palo_udf::BigIntVal add_two_number( - palo_udf::FunctionContext* context, - const palo_udf::BigIntVal& v1, - const palo_udf::BigIntVal& v2); - static palo_udf::StringVal sub_string( - palo_udf::FunctionContext* context, - const palo_udf::StringVal& v1, - const palo_udf::IntVal& begin, - const palo_udf::IntVal& len); - static palo_udf::DoubleVal pi(palo_udf::FunctionContext* context); + static doris_udf::DoubleVal abs(doris_udf::FunctionContext* context, + const doris_udf::DoubleVal& v); + static doris_udf::DecimalVal decimal_abs(doris_udf::FunctionContext* context, + const doris_udf::DecimalVal& v); + static doris_udf::BigIntVal add_two_number( + doris_udf::FunctionContext* context, + const doris_udf::BigIntVal& v1, + const doris_udf::BigIntVal& v2); + static doris_udf::StringVal sub_string( + doris_udf::FunctionContext* context, + const doris_udf::StringVal& v1, + const doris_udf::IntVal& begin, + const doris_udf::IntVal& len); + static doris_udf::DoubleVal pi(doris_udf::FunctionContext* context); - static palo_udf::StringVal lower(palo_udf::FunctionContext* context, - const palo_udf::StringVal&); + static doris_udf::StringVal lower(doris_udf::FunctionContext* context, + const doris_udf::StringVal&); }; } diff --git a/be/src/exprs/utility_functions.cpp b/be/src/exprs/utility_functions.cpp index 19926544b58471..1c62da527458dc 100644 --- a/be/src/exprs/utility_functions.cpp +++ b/be/src/exprs/utility_functions.cpp @@ -22,7 +22,7 @@ #include "util/debug_util.h" #include "runtime/tuple_row.h" -namespace palo { +namespace doris { void UtilityFunctions::init() { } diff --git a/be/src/exprs/utility_functions.h b/be/src/exprs/utility_functions.h index 2e07846d803a03..c50965147efc1d 100644 --- a/be/src/exprs/utility_functions.h +++ b/be/src/exprs/utility_functions.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_QUERY_EXPRS_UTILITY_FUNCTIONS_H -#define BDG_PALO_BE_SRC_QUERY_EXPRS_UTILITY_FUNCTIONS_H +#ifndef DORIS_BE_SRC_QUERY_EXPRS_UTILITY_FUNCTIONS_H +#define DORIS_BE_SRC_QUERY_EXPRS_UTILITY_FUNCTIONS_H #include "udf/udf.h" -namespace palo { +namespace doris { class Expr; class OpcodeRegistry; @@ -30,12 +30,12 @@ class UtilityFunctions { public: static void init(); // Implementation of the version() function. Returns the version string. - static palo_udf::StringVal version( - palo_udf::FunctionContext* ctx); + static doris_udf::StringVal version( + doris_udf::FunctionContext* ctx); // Testing function that sleeps for the specified number of milliseconds. Returns true. - static palo_udf::BooleanVal sleep( - palo_udf::FunctionContext* ctx, const palo_udf::IntVal& milliseconds); + static doris_udf::BooleanVal sleep( + doris_udf::FunctionContext* ctx, const doris_udf::IntVal& milliseconds); }; diff --git a/be/src/gen_cpp/CMakeLists.txt b/be/src/gen_cpp/CMakeLists.txt index 9eedc8ab7461da..bbbeae72c758a1 100644 --- a/be/src/gen_cpp/CMakeLists.txt +++ b/be/src/gen_cpp/CMakeLists.txt @@ -85,12 +85,12 @@ set(SRC_FILES # keep everything in one library, the object files reference # each other -add_library(PaloGen STATIC ${SRC_FILES}) +add_library(DorisGen STATIC ${SRC_FILES}) # Setting these files as code-generated lets make clean and incremental builds work # correctly set_source_files_properties(${SRC_FILES} PROPERTIES GENERATED TRUE) -#add_dependencies(PaloGen thrift-cpp) +#add_dependencies(DorisGen thrift-cpp) #add_dependencies(Opcode function) diff --git a/be/src/http/action/checksum_action.cpp b/be/src/http/action/checksum_action.cpp index ca329bde276fd0..39721e74f29341 100644 --- a/be/src/http/action/checksum_action.cpp +++ b/be/src/http/action/checksum_action.cpp @@ -33,7 +33,7 @@ #include "olap/olap_engine.h" #include "runtime/exec_env.h" -namespace palo { +namespace doris { const std::string TABLET_ID = "tablet_id"; // do not use name "VERSION", @@ -141,4 +141,4 @@ int64_t ChecksumAction::do_checksum(int64_t tablet_id, int64_t version, int64_t return static_cast(checksum); } -} // end namespace palo +} // end namespace doris diff --git a/be/src/http/action/checksum_action.h b/be/src/http/action/checksum_action.h index 2ea5f6a3028228..ca7af1f0792ecf 100644 --- a/be/src/http/action/checksum_action.h +++ b/be/src/http/action/checksum_action.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_CHECKSUM_ACTION_H -#define BDG_PALO_BE_SRC_HTTP_CHECKSUM_ACTION_H +#ifndef DORIS_BE_SRC_HTTP_CHECKSUM_ACTION_H +#define DORIS_BE_SRC_HTTP_CHECKSUM_ACTION_H #include #include "http/http_handler.h" -namespace palo { +namespace doris { class ExecEnv; @@ -41,6 +41,6 @@ class ChecksumAction : public HttpHandler { }; // end class ChecksumAction -} // end namespace palo -#endif // BDG_PALO_BE_SRC_COMMON_UTIL_DOWNLOAD_ACTION_H +} // end namespace doris +#endif // DORIS_BE_SRC_COMMON_UTIL_DOWNLOAD_ACTION_H diff --git a/be/src/http/action/health_action.cpp b/be/src/http/action/health_action.cpp index 4ea62d85ed57e7..5eaedb932289a7 100644 --- a/be/src/http/action/health_action.cpp +++ b/be/src/http/action/health_action.cpp @@ -26,7 +26,7 @@ #include "http/http_headers.h" #include "http/http_status.h" -namespace palo { +namespace doris { const static std::string HEADER_JSON = "application/json"; @@ -50,5 +50,5 @@ void HealthAction::handle(HttpRequest *req) { #endif } -} // end namespace palo +} // end namespace doris diff --git a/be/src/http/action/health_action.h b/be/src/http/action/health_action.h index ad8f9c01d8bc92..4c2effbb373943 100644 --- a/be/src/http/action/health_action.h +++ b/be/src/http/action/health_action.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H -#define BDG_PALO_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H +#ifndef DORIS_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H +#define DORIS_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H #include "http/http_handler.h" -namespace palo { +namespace doris { class ExecEnv; @@ -37,7 +37,7 @@ class HealthAction : public HttpHandler { ExecEnv* _exec_env; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H +#endif // DORIS_BE_SRC_HTTP_ACTION_HEALTH_ACTION_H diff --git a/be/src/http/action/meta_action.cpp b/be/src/http/action/meta_action.cpp index 8f775aa7fc3d28..c4d7ad7b0a264a 100644 --- a/be/src/http/action/meta_action.cpp +++ b/be/src/http/action/meta_action.cpp @@ -34,7 +34,7 @@ #include "common/logging.h" #include "util/json_util.h" -namespace palo { +namespace doris { const static std::string HEADER_JSON = "application/json"; @@ -77,4 +77,4 @@ void MetaAction::handle(HttpRequest *req) { } } -} // end namespace palo +} // end namespace doris diff --git a/be/src/http/action/meta_action.h b/be/src/http/action/meta_action.h index 0b0ec4da14f1e7..446d585938307c 100644 --- a/be/src/http/action/meta_action.h +++ b/be/src/http/action/meta_action.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_ACTION_META_ACTION_H -#define BDG_PALO_BE_SRC_HTTP_ACTION_META_ACTION_H +#ifndef DORIS_BE_SRC_HTTP_ACTION_META_ACTION_H +#define DORIS_BE_SRC_HTTP_ACTION_META_ACTION_H #include "http/http_handler.h" #include "common/status.h" -namespace palo { +namespace doris { class ExecEnv; @@ -45,6 +45,6 @@ class MetaAction : public HttpHandler { META_TYPE _meta_type; }; -} // end namespace palo +} // end namespace doris -#endif // BDG_PALO_BE_SRC_HTTP_ACTION_META_ACTION_H +#endif // DORIS_BE_SRC_HTTP_ACTION_META_ACTION_H diff --git a/be/src/http/action/metrics_action.cpp b/be/src/http/action/metrics_action.cpp index 006f13353d1802..500f0284bd17be 100644 --- a/be/src/http/action/metrics_action.cpp +++ b/be/src/http/action/metrics_action.cpp @@ -26,7 +26,7 @@ #include "runtime/exec_env.h" #include "util/metrics.h" -namespace palo { +namespace doris { class PrometheusMetricsVisitor : public MetricsVisitor { public: diff --git a/be/src/http/action/metrics_action.h b/be/src/http/action/metrics_action.h index 021354ef591df2..1707d44cc92651 100644 --- a/be/src/http/action/metrics_action.h +++ b/be/src/http/action/metrics_action.h @@ -19,7 +19,7 @@ #include "http/http_handler.h" -namespace palo { +namespace doris { class Webserver; class ExecEnv; diff --git a/be/src/http/action/mini_load.cpp b/be/src/http/action/mini_load.cpp index 3ada414423cf9f..0ac1bec8cad4fa 100644 --- a/be/src/http/action/mini_load.cpp +++ b/be/src/http/action/mini_load.cpp @@ -55,7 +55,7 @@ #include "gen_cpp/HeartbeatService_types.h" #include "gen_cpp/FrontendService.h" -namespace palo { +namespace doris { // context used to handle mini-load in asynchronous mode struct MiniLoadCtx { diff --git a/be/src/http/action/mini_load.h b/be/src/http/action/mini_load.h index 760607fbefa9bb..a544b03ad9f228 100644 --- a/be/src/http/action/mini_load.h +++ b/be/src/http/action/mini_load.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_MINI_LOAD_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_MINI_LOAD_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_MINI_LOAD_H +#define DORIS_BE_SRC_COMMON_UTIL_MINI_LOAD_H #include #include @@ -28,7 +28,7 @@ #include "util/defer_op.h" #include "gen_cpp/FrontendService.h" -namespace palo { +namespace doris { // Used to identify one mini load job struct LoadHandle { diff --git a/be/src/http/action/pprof_actions.cpp b/be/src/http/action/pprof_actions.cpp index 74a9a86998870f..fb426991250237 100644 --- a/be/src/http/action/pprof_actions.cpp +++ b/be/src/http/action/pprof_actions.cpp @@ -36,7 +36,7 @@ #include "runtime/exec_env.h" #include "util/bfd_parser.h" -namespace palo { +namespace doris { // pprof default sample time in seconds. static const std::string SECOND_KEY = "seconds"; @@ -131,7 +131,7 @@ void ProfileAction::handle(HttpRequest *req) { std::ostringstream tmp_prof_file_name; // Build a temporary file name that is hopefully unique. - tmp_prof_file_name << config::pprof_profile_dir << "/palo_profile." + tmp_prof_file_name << config::pprof_profile_dir << "/doris_profile." << getpid() << "." << rand(); ProfilerStart(tmp_prof_file_name.str().c_str()); sleep(seconds); diff --git a/be/src/http/action/pprof_actions.h b/be/src/http/action/pprof_actions.h index a5e3cfa4ca1c49..1dd1f42c23a37b 100644 --- a/be/src/http/action/pprof_actions.h +++ b/be/src/http/action/pprof_actions.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_ACTION_PPROF_ACTIONS_H -#define BDG_PALO_BE_SRC_HTTP_ACTION_PPROF_ACTIONS_H +#ifndef DORIS_BE_SRC_HTTP_ACTION_PPROF_ACTIONS_H +#define DORIS_BE_SRC_HTTP_ACTION_PPROF_ACTIONS_H #include "common/status.h" -namespace palo { +namespace doris { class EvHttpServer; class ExecEnv; diff --git a/be/src/http/action/reload_tablet_action.cpp b/be/src/http/action/reload_tablet_action.cpp index a5be5b4596f50a..c66a5f5c283278 100644 --- a/be/src/http/action/reload_tablet_action.cpp +++ b/be/src/http/action/reload_tablet_action.cpp @@ -33,7 +33,7 @@ #include "olap/olap_engine.h" #include "runtime/exec_env.h" -namespace palo { +namespace doris { const std::string PATH = "path"; const std::string TABLET_ID = "tablet_id"; @@ -119,5 +119,5 @@ void ReloadTabletAction::reload( } } -} // end namespace palo +} // end namespace doris diff --git a/be/src/http/action/reload_tablet_action.h b/be/src/http/action/reload_tablet_action.h index b4a259768f841f..d3c8f9508b2879 100644 --- a/be/src/http/action/reload_tablet_action.h +++ b/be/src/http/action/reload_tablet_action.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_RELOAD_TABLET_ACTION_H -#define BDG_PALO_BE_SRC_HTTP_RELOAD_TABLET_ACTION_H +#ifndef DORIS_BE_SRC_HTTP_RELOAD_TABLET_ACTION_H +#define DORIS_BE_SRC_HTTP_RELOAD_TABLET_ACTION_H #include #include "http/http_handler.h" #include "gen_cpp/AgentService_types.h" -namespace palo { +namespace doris { class ExecEnv; @@ -42,6 +42,6 @@ class ReloadTabletAction : public HttpHandler { }; // end class ReloadTabletAction -} // end namespace palo -#endif // BDG_PALO_BE_SRC_COMMON_UTIL_DOWNLOAD_ACTION_H +} // end namespace doris +#endif // DORIS_BE_SRC_COMMON_UTIL_DOWNLOAD_ACTION_H diff --git a/be/src/http/action/restore_tablet_action.cpp b/be/src/http/action/restore_tablet_action.cpp index d4585bb78ce0c3..e2fbb3f0baca5d 100644 --- a/be/src/http/action/restore_tablet_action.cpp +++ b/be/src/http/action/restore_tablet_action.cpp @@ -40,7 +40,7 @@ using boost::filesystem::path; -namespace palo { +namespace doris { const std::string TABLET_ID = "tablet_id"; const std::string SCHEMA_HASH = "schema_hash"; @@ -278,7 +278,7 @@ bool RestoreTabletAction::_get_timestamp_and_count_from_schema_hash_path( path time_label_path = schema_hash_path.parent_path().parent_path(); std::string time_label = time_label_path.filename().string(); std::vector parts; - palo::split_string(time_label, '.', &parts); + doris::split_string(time_label, '.', &parts); if (parts.size() != 2) { LOG(WARNING) << "invalid time label:" << time_label; return false; @@ -293,4 +293,4 @@ void RestoreTabletAction::_clear_key(const std::string& key) { _tablet_path_map.erase(key); } -} // end namespace palo +} // end namespace doris diff --git a/be/src/http/action/restore_tablet_action.h b/be/src/http/action/restore_tablet_action.h index 963e6312c24341..d22686d4932dc6 100644 --- a/be/src/http/action/restore_tablet_action.h +++ b/be/src/http/action/restore_tablet_action.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H -#define BDG_PALO_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H +#ifndef DORIS_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H +#define DORIS_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H #include #include @@ -26,7 +26,7 @@ #include "gen_cpp/AgentService_types.h" #include "common/status.h" -namespace palo { +namespace doris { class ExecEnv; @@ -60,5 +60,5 @@ class RestoreTabletAction : public HttpHandler { std::map _tablet_path_map; }; // end class RestoreTabletAction -} // end namespace palo -#endif // BDG_PALO_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H +} // end namespace doris +#endif // DORIS_BE_SRC_HTTP_RESTORE_TABLET_ACTION_H diff --git a/be/src/http/action/snapshot_action.cpp b/be/src/http/action/snapshot_action.cpp index 5c93279cdc75d7..1b79ea5645970e 100644 --- a/be/src/http/action/snapshot_action.cpp +++ b/be/src/http/action/snapshot_action.cpp @@ -34,7 +34,7 @@ #include "olap/olap_define.h" #include "olap/olap_engine.h" -namespace palo { +namespace doris { const std::string TABLET_ID = "tablet_id"; const std::string SCHEMA_HASH = "schema_hash"; @@ -117,4 +117,4 @@ int64_t SnapshotAction::make_snapshot(int64_t tablet_id, int32_t schema_hash, return 0L; } -} // end namespace palo +} // end namespace doris diff --git a/be/src/http/action/snapshot_action.h b/be/src/http/action/snapshot_action.h index a4cc853a5d25fd..0d75db8540c946 100644 --- a/be/src/http/action/snapshot_action.h +++ b/be/src/http/action/snapshot_action.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_SNAPSHOT_ACTION_H -#define BDG_PALO_BE_SRC_HTTP_SNAPSHOT_ACTION_H +#ifndef DORIS_BE_SRC_HTTP_SNAPSHOT_ACTION_H +#define DORIS_BE_SRC_HTTP_SNAPSHOT_ACTION_H #include #include "http/http_handler.h" -namespace palo { +namespace doris { class ExecEnv; @@ -42,5 +42,5 @@ class SnapshotAction : public HttpHandler { }; // end class SnapshotAction -} // end namespace palo -#endif // BDG_PALO_BE_SRC_HTTP_SNAPSHOT_ACTION_H +} // end namespace doris +#endif // DORIS_BE_SRC_HTTP_SNAPSHOT_ACTION_H diff --git a/be/src/http/action/stream_load.cpp b/be/src/http/action/stream_load.cpp index b8a1a86fbfae90..c608de08bc1465 100644 --- a/be/src/http/action/stream_load.cpp +++ b/be/src/http/action/stream_load.cpp @@ -50,11 +50,11 @@ #include "util/debug_util.h" #include "util/json_util.h" #include "util/metrics.h" -#include "util/palo_metrics.h" +#include "util/doris_metrics.h" #include "util/time.h" #include "util/uid_util.h" -namespace palo { +namespace doris { IntCounter k_streaming_load_requests_total; IntCounter k_streaming_load_bytes; @@ -197,13 +197,13 @@ std::string StreamLoadContext::to_json() const { } StreamLoadAction::StreamLoadAction(ExecEnv* exec_env) : _exec_env(exec_env) { - PaloMetrics::metrics()->register_metric("streaming_load_requests_total", + DorisMetrics::metrics()->register_metric("streaming_load_requests_total", &k_streaming_load_requests_total); - PaloMetrics::metrics()->register_metric("streaming_load_bytes", + DorisMetrics::metrics()->register_metric("streaming_load_bytes", &k_streaming_load_bytes); - PaloMetrics::metrics()->register_metric("streaming_load_duration_ms", + DorisMetrics::metrics()->register_metric("streaming_load_duration_ms", &k_streaming_load_duration_ms); - PaloMetrics::metrics()->register_metric("streaming_load_current_processing", + DorisMetrics::metrics()->register_metric("streaming_load_current_processing", &k_streaming_load_current_processing); } diff --git a/be/src/http/action/stream_load.h b/be/src/http/action/stream_load.h index 361e44b18f9415..b82a4c2d16594b 100644 --- a/be/src/http/action/stream_load.h +++ b/be/src/http/action/stream_load.h @@ -25,7 +25,7 @@ #include "http/message_body_sink.h" #include "runtime/client_cache.h" -namespace palo { +namespace doris { class ExecEnv; class TStreamLoadPutRequest; diff --git a/be/src/http/default_path_handlers.cpp b/be/src/http/default_path_handlers.cpp index 0a98a5642054ec..52078481c29825 100644 --- a/be/src/http/default_path_handlers.cpp +++ b/be/src/http/default_path_handlers.cpp @@ -31,7 +31,7 @@ #include "util/pretty_printer.h" #include "http/web_page_handler.h" -namespace palo { +namespace doris { // Writes the last config::web_log_bytes of the INFO logfile to a webpage // Note to get best performance, set GLOG_logbuflevel=-1 to prevent log buffering diff --git a/be/src/http/default_path_handlers.h b/be/src/http/default_path_handlers.h index b542223c24a839..06f5c3f9bbfd03 100644 --- a/be/src/http/default_path_handlers.h +++ b/be/src/http/default_path_handlers.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_DEFAULT_PATH_HANDLERS_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_DEFAULT_PATH_HANDLERS_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_DEFAULT_PATH_HANDLERS_H +#define DORIS_BE_SRC_COMMON_UTIL_DEFAULT_PATH_HANDLERS_H #include -namespace palo { +namespace doris { class MemTracker; class WebPageHandler; diff --git a/be/src/http/download_action.cpp b/be/src/http/download_action.cpp index eaa949c3546fb9..039c97370eaf6a 100644 --- a/be/src/http/download_action.cpp +++ b/be/src/http/download_action.cpp @@ -38,7 +38,7 @@ #include "util/filesystem_util.h" #include "runtime/exec_env.h" -namespace palo { +namespace doris { const std::string FILE_PARAMETER = "file"; const std::string DB_PARAMETER = "db"; @@ -261,5 +261,5 @@ Status DownloadAction::check_log_path_is_allowed(const std::string& file_path) { return Status("file path Not Allowed."); } -} // end namespace palo +} // end namespace doris diff --git a/be/src/http/download_action.h b/be/src/http/download_action.h index df1bf1ea3675ff..737181d8acb3c8 100644 --- a/be/src/http/download_action.h +++ b/be/src/http/download_action.h @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_HTTP_DOWNLOAD_ACTION_H -#define BDG_PALO_BE_SRC_HTTP_DOWNLOAD_ACTION_H +#ifndef DORIS_BE_SRC_HTTP_DOWNLOAD_ACTION_H +#define DORIS_BE_SRC_HTTP_DOWNLOAD_ACTION_H #include "exec/csv_scanner.h" #include "exec/scan_node.h" #include "runtime/descriptors.h" #include "http/http_handler.h" -namespace palo { +namespace doris { class ExecEnv; @@ -80,6 +80,6 @@ class DownloadAction : public HttpHandler { }; // end class DownloadAction -} // end namespace palo -#endif // BDG_PALO_BE_SRC_HTTP_DOWNLOAD_ACTION_H +} // end namespace doris +#endif // DORIS_BE_SRC_HTTP_DOWNLOAD_ACTION_H diff --git a/be/src/http/ev_http_server.cpp b/be/src/http/ev_http_server.cpp index 975bbf58bb72e5..aa564c4cde28f3 100644 --- a/be/src/http/ev_http_server.cpp +++ b/be/src/http/ev_http_server.cpp @@ -35,7 +35,7 @@ #include "http/http_channel.h" #include "util/debug_util.h" -namespace palo { +namespace doris { static void on_chunked(struct evhttp_request* ev_req, void* param) { HttpRequest* request = (HttpRequest*)ev_req->on_free_cb_arg; diff --git a/be/src/http/ev_http_server.h b/be/src/http/ev_http_server.h index ac1a3b457313a8..acc6d71f9eef19 100644 --- a/be/src/http/ev_http_server.h +++ b/be/src/http/ev_http_server.h @@ -25,7 +25,7 @@ #include "util/path_trie.hpp" #include "http/http_method.h" -namespace palo { +namespace doris { class HttpHandler; class HttpRequest; diff --git a/be/src/http/http_channel.cpp b/be/src/http/http_channel.cpp index 7c8d9ab1702b45..82d7f6c7d88284 100644 --- a/be/src/http/http_channel.cpp +++ b/be/src/http/http_channel.cpp @@ -29,7 +29,7 @@ #include "http/http_status.h" #include "common/logging.h" -namespace palo { +namespace doris { // Send Unauthorized status with basic challenge void HttpChannel::send_basic_challenge(HttpRequest* req, const std::string& realm) { diff --git a/be/src/http/http_channel.h b/be/src/http/http_channel.h index fbfdcd791c5fd0..307dd8124d12b7 100644 --- a/be/src/http/http_channel.h +++ b/be/src/http/http_channel.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_CHANNEL_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_CHANNEL_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_CHANNEL_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_CHANNEL_H #include #include @@ -25,7 +25,7 @@ struct mg_connection; -namespace palo { +namespace doris { class HttpRequest; diff --git a/be/src/http/http_common.h b/be/src/http/http_common.h index d60fafcd93d386..05bc5d878d93d1 100644 --- a/be/src/http/http_common.h +++ b/be/src/http/http_common.h @@ -19,7 +19,7 @@ #include -namespace palo { +namespace doris { struct HttpAuthInfo { std::string user; diff --git a/be/src/http/http_handler.h b/be/src/http/http_handler.h index d7da26f3a41565..258140694c06c8 100644 --- a/be/src/http/http_handler.h +++ b/be/src/http/http_handler.h @@ -15,10 +15,10 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_HANDLER_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_HANDLER_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_HANDLER_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_HANDLER_H -namespace palo { +namespace doris { class HttpRequest; class HttpChannel; diff --git a/be/src/http/http_headers.cpp b/be/src/http/http_headers.cpp index a929ce7f48dc48..94c01213962aac 100644 --- a/be/src/http/http_headers.cpp +++ b/be/src/http/http_headers.cpp @@ -17,7 +17,7 @@ #include "http/http_headers.h" -namespace palo { +namespace doris { const char* HttpHeaders::ACCEPT = "Accept"; const char* HttpHeaders::ACCEPT_CHARSET = "Accept-Charset"; diff --git a/be/src/http/http_headers.h b/be/src/http/http_headers.h index 9d960e640914fe..678c8388d55ce7 100644 --- a/be/src/http/http_headers.h +++ b/be/src/http/http_headers.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_HEADERS_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_HEADERS_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_HEADERS_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_HEADERS_H #include -namespace palo { +namespace doris { class HttpHeaders { public: diff --git a/be/src/http/http_method.cpp b/be/src/http/http_method.cpp index 37f925e0bd033c..40e7d0b80fcecf 100644 --- a/be/src/http/http_method.cpp +++ b/be/src/http/http_method.cpp @@ -20,7 +20,7 @@ #include #include -namespace palo { +namespace doris { static std::map s_method_by_desc = { diff --git a/be/src/http/http_method.h b/be/src/http/http_method.h index 3c316a4c5f0b52..45072804171f4a 100644 --- a/be/src/http/http_method.h +++ b/be/src/http/http_method.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_METHOD_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_METHOD_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_METHOD_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_METHOD_H #include #include -namespace palo { +namespace doris { // Http method enumerate enum HttpMethod { diff --git a/be/src/http/http_parser.cpp b/be/src/http/http_parser.cpp index 58f589f7f6dec8..5ba8886627ddbc 100644 --- a/be/src/http/http_parser.cpp +++ b/be/src/http/http_parser.cpp @@ -17,7 +17,7 @@ #include "http/http_parser.h" -namespace palo { +namespace doris { std::ostream& operator<<(std::ostream& os, const HttpChunkParseCtx& ctx) { os << "HttpChunkParseCtx(" diff --git a/be/src/http/http_parser.h b/be/src/http/http_parser.h index fa8023304affa7..f953ee8d74335b 100644 --- a/be/src/http/http_parser.h +++ b/be/src/http/http_parser.h @@ -15,13 +15,13 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_PARSER_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_PARSER_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_PARSER_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_PARSER_H #include #include -namespace palo { +namespace doris { struct HttpChunkParseCtx { int state; // Parse state diff --git a/be/src/http/http_request.cpp b/be/src/http/http_request.cpp index 0609f0e34266df..95149a36f04a1c 100644 --- a/be/src/http/http_request.cpp +++ b/be/src/http/http_request.cpp @@ -34,7 +34,7 @@ #include "common/logging.h" #include "util/url_coding.h" -namespace palo { +namespace doris { static std::string s_empty = ""; diff --git a/be/src/http/http_request.h b/be/src/http/http_request.h index 8b62d23dab2426..547916e524b497 100644 --- a/be/src/http/http_request.h +++ b/be/src/http/http_request.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_REQUEST_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_REQUEST_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_REQUEST_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_REQUEST_H #include #include @@ -31,7 +31,7 @@ struct mg_connection; struct evhttp_request; -namespace palo { +namespace doris { class HttpHandler; diff --git a/be/src/http/http_response.cpp b/be/src/http/http_response.cpp index 52722fda739fd4..8dbcec2eecbc68 100644 --- a/be/src/http/http_response.cpp +++ b/be/src/http/http_response.cpp @@ -17,7 +17,7 @@ #include "http/http_response.h" -namespace palo { +namespace doris { static std::string s_text_content_type = "text/plain; charset=UTF-8"; diff --git a/be/src/http/http_response.h b/be/src/http/http_response.h index 54e6b0ffe94ae8..3aebd6a435dfc0 100644 --- a/be/src/http/http_response.h +++ b/be/src/http/http_response.h @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_RESPONSE_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_RESPONSE_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_RESPONSE_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_RESPONSE_H #include #include @@ -24,7 +24,7 @@ #include "http/http_status.h" -namespace palo { +namespace doris { class HttpResponse { public: diff --git a/be/src/http/http_status.cpp b/be/src/http/http_status.cpp index 0e430aae2103f3..08c53f50f92ebc 100644 --- a/be/src/http/http_status.cpp +++ b/be/src/http/http_status.cpp @@ -20,7 +20,7 @@ #include #include -namespace palo { +namespace doris { static std::map s_reason_map = { { HttpStatus::CONTINUE, "Continue" }, diff --git a/be/src/http/http_status.h b/be/src/http/http_status.h index 040f93860856f8..74a0a769e6125f 100644 --- a/be/src/http/http_status.h +++ b/be/src/http/http_status.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_STATUS_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_HTTP_STATUS_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_HTTP_STATUS_H +#define DORIS_BE_SRC_COMMON_UTIL_HTTP_STATUS_H #include -namespace palo { +namespace doris { enum HttpStatus { CONTINUE = 100, diff --git a/be/src/http/message_body_sink.cpp b/be/src/http/message_body_sink.cpp index 3599cf22fb1032..bb831b819b5e99 100644 --- a/be/src/http/message_body_sink.cpp +++ b/be/src/http/message_body_sink.cpp @@ -27,7 +27,7 @@ #include "util/runtime_profile.h" -namespace palo { +namespace doris { MessageBodyFileSink::~MessageBodyFileSink() { if (_fd >= 0) { diff --git a/be/src/http/message_body_sink.h b/be/src/http/message_body_sink.h index 2b1fda565fe6ad..25d082c1822d12 100644 --- a/be/src/http/message_body_sink.h +++ b/be/src/http/message_body_sink.h @@ -21,7 +21,7 @@ #include "util/byte_buffer.h" -namespace palo { +namespace doris { class HttpChannel; class BodySink; diff --git a/be/src/http/monitor_action.cpp b/be/src/http/monitor_action.cpp index 2adb03bd55a738..fff764addb2062 100644 --- a/be/src/http/monitor_action.cpp +++ b/be/src/http/monitor_action.cpp @@ -25,7 +25,7 @@ #include "http/rest_monitor_iface.h" #include "common/status.h" -namespace palo { +namespace doris { const std::string MODULE_KEY = "module"; diff --git a/be/src/http/monitor_action.h b/be/src/http/monitor_action.h index c984308be84c5e..fdf5fbeb8ed2a4 100644 --- a/be/src/http/monitor_action.h +++ b/be/src/http/monitor_action.h @@ -15,14 +15,14 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_SRC_COMMON_UTIL_MONITOR_ACTION_H -#define BDG_PALO_BE_SRC_COMMON_UTIL_MONITOR_ACTION_H +#ifndef DORIS_BE_SRC_COMMON_UTIL_MONITOR_ACTION_H +#define DORIS_BE_SRC_COMMON_UTIL_MONITOR_ACTION_H #include #include #include "http/http_handler.h" -namespace palo { +namespace doris { class HttpRequest; class HttpChannel; diff --git a/be/src/http/rest_monitor_iface.h b/be/src/http/rest_monitor_iface.h index 30a98e15aef6d8..7e0b814c77a7a9 100644 --- a/be/src/http/rest_monitor_iface.h +++ b/be/src/http/rest_monitor_iface.h @@ -15,12 +15,12 @@ // specific language governing permissions and limitations // under the License. -#ifndef BDG_PALO_BE_UTIL_REST_MONITOR_IFACE_H -#define BDG_PALO_BE_UTIL_REST_MONITOR_IFACE_H +#ifndef DORIS_BE_UTIL_REST_MONITOR_IFACE_H +#define DORIS_BE_UTIL_REST_MONITOR_IFACE_H #include -namespace palo { +namespace doris { // This is a interface used to monitor internal module running state. class RestMonitorIface { diff --git a/be/src/http/utils.cpp b/be/src/http/utils.cpp index f699c062143276..486173f1d16afd 100644 --- a/be/src/http/utils.cpp +++ b/be/src/http/utils.cpp @@ -23,7 +23,7 @@ #include "http/http_request.h" #include "util/url_coding.h" -namespace palo { +namespace doris { bool parse_basic_auth(const HttpRequest& req, std::string* user, std::string* passwd) { const char k_basic[] = "Basic "; diff --git a/be/src/http/utils.h b/be/src/http/utils.h index 026969c98894bf..8495ef24f735a6 100644 --- a/be/src/http/utils.h +++ b/be/src/http/utils.h @@ -21,7 +21,7 @@ #include "http/http_common.h" -namespace palo { +namespace doris { class HttpRequest; class HttpAuthInfo; diff --git a/be/src/http/web_page_handler.cpp b/be/src/http/web_page_handler.cpp index d53244784d44a9..80c6a54a09aeb9 100644 --- a/be/src/http/web_page_handler.cpp +++ b/be/src/http/web_page_handler.cpp @@ -31,7 +31,7 @@ #include "util/disk_info.h" #include "util/mem_info.h" -namespace palo { +namespace doris { static std::string s_html_content_type = "text/html"; @@ -102,7 +102,7 @@ void WebPageHandler::handle(HttpRequest *req) { static const std::string PAGE_HEADER = "" " " - " Palo" + " Doris" " " "