From ff0c9a47d38c82f8ea7ece6560e42b303e492a07 Mon Sep 17 00:00:00 2001 From: Mryange Date: Wed, 18 Dec 2024 10:11:09 +0800 Subject: [PATCH] [env](compile) open compile_check in pipeline operator (#45386) --- .../pipeline/exec/assert_num_rows_operator.h | 2 ++ be/src/pipeline/exec/cache_sink_operator.h | 2 ++ be/src/pipeline/exec/cache_source_operator.h | 2 ++ be/src/pipeline/exec/data_queue.h | 2 ++ be/src/pipeline/exec/datagen_operator.h | 2 ++ be/src/pipeline/exec/empty_set_operator.cpp | 2 ++ be/src/pipeline/exec/empty_set_operator.h | 2 ++ be/src/pipeline/exec/es_scan_operator.h | 2 ++ be/src/pipeline/exec/exchange_sink_buffer.cpp | 2 ++ be/src/pipeline/exec/exchange_sink_buffer.h | 2 ++ be/src/pipeline/exec/exchange_sink_operator.h | 2 ++ .../pipeline/exec/exchange_source_operator.h | 2 ++ be/src/pipeline/exec/file_scan_operator.h | 2 ++ .../exec/group_commit_block_sink_operator.h | 4 ++- .../exec/group_commit_scan_operator.h | 2 ++ .../pipeline/exec/hive_table_sink_operator.h | 2 ++ .../exec/iceberg_table_sink_operator.h | 2 ++ be/src/pipeline/exec/jdbc_scan_operator.h | 2 ++ .../pipeline/exec/jdbc_table_sink_operator.h | 2 ++ .../pipeline/exec/join_build_sink_operator.h | 2 ++ be/src/pipeline/exec/join_probe_operator.h | 2 ++ .../exec/memory_scratch_sink_operator.h | 2 ++ be/src/pipeline/exec/meta_scan_operator.h | 2 ++ .../exec/multi_cast_data_stream_sink.h | 2 ++ .../pipeline/exec/multi_cast_data_streamer.h | 2 ++ .../exec/nested_loop_join_build_operator.h | 2 ++ be/src/pipeline/exec/olap_scan_operator.cpp | 10 +++--- be/src/pipeline/exec/olap_scan_operator.h | 2 ++ .../pipeline/exec/olap_table_sink_operator.h | 2 ++ .../exec/olap_table_sink_v2_operator.h | 2 ++ be/src/pipeline/exec/operator.cpp | 2 ++ be/src/pipeline/exec/operator.h | 2 ++ .../exec/partition_sort_sink_operator.cpp | 6 ++-- .../exec/partition_sort_sink_operator.h | 2 ++ .../exec/partition_sort_source_operator.cpp | 2 ++ .../exec/partition_sort_source_operator.h | 2 ++ .../partitioned_aggregation_sink_operator.cpp | 2 ++ .../partitioned_aggregation_sink_operator.h | 2 ++ ...artitioned_aggregation_source_operator.cpp | 2 ++ .../partitioned_aggregation_source_operator.h | 2 ++ .../partitioned_hash_join_probe_operator.cpp | 2 ++ .../partitioned_hash_join_probe_operator.h | 2 ++ .../partitioned_hash_join_sink_operator.cpp | 6 ++-- .../partitioned_hash_join_sink_operator.h | 2 ++ be/src/pipeline/exec/repeat_operator.cpp | 5 +-- be/src/pipeline/exec/repeat_operator.h | 2 ++ .../exec/result_file_sink_operator.cpp | 2 ++ .../pipeline/exec/result_file_sink_operator.h | 2 ++ be/src/pipeline/exec/result_sink_operator.cpp | 2 ++ be/src/pipeline/exec/result_sink_operator.h | 2 ++ be/src/pipeline/exec/scan_operator.h | 4 ++- be/src/pipeline/exec/schema_scan_operator.cpp | 4 ++- be/src/pipeline/exec/schema_scan_operator.h | 2 ++ be/src/pipeline/exec/select_operator.h | 2 ++ .../pipeline/exec/set_probe_sink_operator.cpp | 8 +++-- .../pipeline/exec/set_probe_sink_operator.h | 2 ++ be/src/pipeline/exec/sort_sink_operator.cpp | 2 ++ be/src/pipeline/exec/sort_sink_operator.h | 2 ++ be/src/pipeline/exec/sort_source_operator.cpp | 2 ++ be/src/pipeline/exec/sort_source_operator.h | 2 ++ be/src/pipeline/exec/spill_utils.h | 2 ++ .../exec/streaming_aggregation_operator.cpp | 32 ++++++++++--------- .../exec/streaming_aggregation_operator.h | 2 ++ .../pipeline/exec/table_function_operator.cpp | 11 +++++-- .../pipeline/exec/table_function_operator.h | 2 ++ be/src/pipeline/exec/union_sink_operator.cpp | 6 +++- be/src/pipeline/exec/union_sink_operator.h | 2 ++ .../pipeline/exec/union_source_operator.cpp | 4 ++- be/src/pipeline/exec/union_source_operator.h | 2 ++ 69 files changed, 178 insertions(+), 36 deletions(-) diff --git a/be/src/pipeline/exec/assert_num_rows_operator.h b/be/src/pipeline/exec/assert_num_rows_operator.h index dcc64f57878d38..a7408d695928c5 100644 --- a/be/src/pipeline/exec/assert_num_rows_operator.h +++ b/be/src/pipeline/exec/assert_num_rows_operator.h @@ -20,6 +20,7 @@ #include "operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class AssertNumRowsLocalState final : public PipelineXLocalState { public: @@ -55,4 +56,5 @@ class AssertNumRowsOperatorX final : public StreamingOperatorX { }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris \ No newline at end of file diff --git a/be/src/pipeline/exec/cache_source_operator.h b/be/src/pipeline/exec/cache_source_operator.h index e764323846b153..146c984d04aa3f 100644 --- a/be/src/pipeline/exec/cache_source_operator.h +++ b/be/src/pipeline/exec/cache_source_operator.h @@ -25,6 +25,7 @@ #include "pipeline/query_cache/query_cache.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace vectorized { @@ -101,4 +102,5 @@ class CacheSourceOperatorX final : public OperatorX { }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/data_queue.h b/be/src/pipeline/exec/data_queue.h index f5bd84cc278d0a..d97f58c0debdb6 100644 --- a/be/src/pipeline/exec/data_queue.h +++ b/be/src/pipeline/exec/data_queue.h @@ -29,6 +29,7 @@ #include "vec/core/block.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class Dependency; @@ -108,4 +109,5 @@ class DataQueue { SpinLock _source_lock; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/datagen_operator.h b/be/src/pipeline/exec/datagen_operator.h index bada5ec4080d08..ffc2c6f946fb3a 100644 --- a/be/src/pipeline/exec/datagen_operator.h +++ b/be/src/pipeline/exec/datagen_operator.h @@ -24,6 +24,7 @@ #include "pipeline/exec/operator.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; } // namespace doris @@ -70,4 +71,5 @@ class DataGenSourceOperatorX final : public OperatorX { std::vector _runtime_filter_descs; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline \ No newline at end of file diff --git a/be/src/pipeline/exec/empty_set_operator.cpp b/be/src/pipeline/exec/empty_set_operator.cpp index 7233e46dfd1e52..2dfe9701558da0 100644 --- a/be/src/pipeline/exec/empty_set_operator.cpp +++ b/be/src/pipeline/exec/empty_set_operator.cpp @@ -22,6 +22,7 @@ #include "pipeline/exec/operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" Status EmptySetSourceOperatorX::get_block(RuntimeState* state, vectorized::Block* block, bool* eos) { @@ -29,4 +30,5 @@ Status EmptySetSourceOperatorX::get_block(RuntimeState* state, vectorized::Block return Status::OK(); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/empty_set_operator.h b/be/src/pipeline/exec/empty_set_operator.h index 6b200bfdbde249..d8e920b256494d 100644 --- a/be/src/pipeline/exec/empty_set_operator.h +++ b/be/src/pipeline/exec/empty_set_operator.h @@ -22,6 +22,7 @@ #include "operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class EmptySetLocalState final : public PipelineXLocalState { public: @@ -43,4 +44,5 @@ class EmptySetSourceOperatorX final : public OperatorX { [[nodiscard]] bool is_source() const override { return true; } }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/es_scan_operator.h b/be/src/pipeline/exec/es_scan_operator.h index 2ae562e4fc7f32..6e64110997e3af 100644 --- a/be/src/pipeline/exec/es_scan_operator.h +++ b/be/src/pipeline/exec/es_scan_operator.h @@ -26,6 +26,7 @@ #include "pipeline/exec/scan_operator.h" namespace doris { +#include "common/compile_check_begin.h" namespace vectorized { class NewEsScanner; @@ -86,4 +87,5 @@ class EsScanOperatorX final : public ScanOperatorX { std::vector _column_names; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/exchange_sink_buffer.cpp b/be/src/pipeline/exec/exchange_sink_buffer.cpp index 65e7698737076e..e3f895444d4168 100644 --- a/be/src/pipeline/exec/exchange_sink_buffer.cpp +++ b/be/src/pipeline/exec/exchange_sink_buffer.cpp @@ -47,6 +47,7 @@ #include "vec/sink/vdata_stream_sender.h" namespace doris { +#include "common/compile_check_begin.h" namespace vectorized { BroadcastPBlockHolder::~BroadcastPBlockHolder() { @@ -576,4 +577,5 @@ void ExchangeSinkBuffer::update_profile(RuntimeProfile* profile) { } } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/exchange_sink_buffer.h b/be/src/pipeline/exec/exchange_sink_buffer.h index b2eb32414feca2..458c7c3f66e3ee 100644 --- a/be/src/pipeline/exec/exchange_sink_buffer.h +++ b/be/src/pipeline/exec/exchange_sink_buffer.h @@ -40,6 +40,7 @@ #include "util/ref_count_closure.h" namespace doris { +#include "common/compile_check_begin.h" class PTransmitDataParams; class TUniqueId; @@ -318,4 +319,5 @@ class ExchangeSinkBuffer : public HasTaskExecutionCtx { }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/exchange_sink_operator.h b/be/src/pipeline/exec/exchange_sink_operator.h index e88389b1d7bb5a..85575beb9f7e47 100644 --- a/be/src/pipeline/exec/exchange_sink_operator.h +++ b/be/src/pipeline/exec/exchange_sink_operator.h @@ -31,6 +31,7 @@ #include "vec/sink/vdata_stream_sender.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; class TDataSink; @@ -263,4 +264,5 @@ class ExchangeSinkOperatorX final : public DataSinkOperatorX { std::vector _nulls_first; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/file_scan_operator.h b/be/src/pipeline/exec/file_scan_operator.h index 2777a013d62f61..87c5bcd2e54de5 100644 --- a/be/src/pipeline/exec/file_scan_operator.h +++ b/be/src/pipeline/exec/file_scan_operator.h @@ -29,6 +29,7 @@ #include "vec/exec/scan/split_source_connector.h" namespace doris { +#include "common/compile_check_begin.h" namespace vectorized { class VFileScanner; } // namespace vectorized @@ -86,4 +87,5 @@ class FileScanOperatorX final : public ScanOperatorX { const std::string _table_name; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/group_commit_block_sink_operator.h b/be/src/pipeline/exec/group_commit_block_sink_operator.h index e469aee8df595c..5eabb280c4315d 100644 --- a/be/src/pipeline/exec/group_commit_block_sink_operator.h +++ b/be/src/pipeline/exec/group_commit_block_sink_operator.h @@ -22,8 +22,9 @@ #include "runtime/group_commit_mgr.h" namespace doris::vectorized { +#include "common/compile_check_begin.h" class OlapTableBlockConvertor; -} +} // namespace doris::vectorized namespace doris::pipeline { @@ -125,4 +126,5 @@ class GroupCommitBlockSinkOperatorX final TGroupCommitMode::type _group_commit_mode; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/group_commit_scan_operator.h b/be/src/pipeline/exec/group_commit_scan_operator.h index 46f50f3772440a..d1428899ede6b9 100644 --- a/be/src/pipeline/exec/group_commit_scan_operator.h +++ b/be/src/pipeline/exec/group_commit_scan_operator.h @@ -27,6 +27,7 @@ #include "runtime/group_commit_mgr.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class GroupCommitOperatorX; class GroupCommitLocalState final : public ScanLocalState { @@ -60,4 +61,5 @@ class GroupCommitOperatorX final : public ScanOperatorX { const int64_t _table_id; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/hive_table_sink_operator.h b/be/src/pipeline/exec/hive_table_sink_operator.h index 58e705fd8e46c7..8af3e5bd5e9764 100644 --- a/be/src/pipeline/exec/hive_table_sink_operator.h +++ b/be/src/pipeline/exec/hive_table_sink_operator.h @@ -21,6 +21,7 @@ #include "vec/sink/writer/vhive_table_writer.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class HiveTableSinkOperatorX; @@ -83,4 +84,5 @@ class HiveTableSinkOperatorX final : public DataSinkOperatorX { TOdbcTableType::type _table_type; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/jdbc_table_sink_operator.h b/be/src/pipeline/exec/jdbc_table_sink_operator.h index 3ea702fd0baf0a..a0dae301a5fcad 100644 --- a/be/src/pipeline/exec/jdbc_table_sink_operator.h +++ b/be/src/pipeline/exec/jdbc_table_sink_operator.h @@ -23,6 +23,7 @@ #include "vec/sink/writer/vjdbc_table_writer.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class JdbcTableSinkOperatorX; class JdbcTableSinkLocalState final @@ -59,4 +60,5 @@ class JdbcTableSinkOperatorX final : public DataSinkOperatorX class JoinBuildSinkOperatorX; @@ -78,4 +79,5 @@ class JoinBuildSinkOperatorX : public DataSinkOperatorX { const std::vector _runtime_filter_descs; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/join_probe_operator.h b/be/src/pipeline/exec/join_probe_operator.h index 078806cea4fc5a..161fd18fa1dab8 100644 --- a/be/src/pipeline/exec/join_probe_operator.h +++ b/be/src/pipeline/exec/join_probe_operator.h @@ -20,6 +20,7 @@ #include "operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" template class JoinProbeOperatorX; template @@ -123,4 +124,5 @@ class JoinProbeOperatorX : public StatefulOperatorX { const bool _use_specific_projections; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/memory_scratch_sink_operator.h b/be/src/pipeline/exec/memory_scratch_sink_operator.h index c74659d15b96f2..352826955fca99 100644 --- a/be/src/pipeline/exec/memory_scratch_sink_operator.h +++ b/be/src/pipeline/exec/memory_scratch_sink_operator.h @@ -23,6 +23,7 @@ #include "runtime/result_queue_mgr.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class MemoryScratchSinkOperatorX; class MemoryScratchSinkLocalState final : public PipelineXSinkLocalState { @@ -67,4 +68,5 @@ class MemoryScratchSinkOperatorX final : public DataSinkOperatorX { TUserIdentity _user_identity; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/multi_cast_data_stream_sink.h b/be/src/pipeline/exec/multi_cast_data_stream_sink.h index 57b5974064b6a2..9d69b3fb5bdc9e 100644 --- a/be/src/pipeline/exec/multi_cast_data_stream_sink.h +++ b/be/src/pipeline/exec/multi_cast_data_stream_sink.h @@ -20,6 +20,7 @@ #include "operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class MultiCastDataStreamSinkOperatorX; class MultiCastDataStreamSinkLocalState final @@ -75,4 +76,5 @@ class MultiCastDataStreamSinkOperatorX final std::atomic _num_dests; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/multi_cast_data_streamer.h b/be/src/pipeline/exec/multi_cast_data_streamer.h index 51a73cf0c2b053..380538d0ac0805 100644 --- a/be/src/pipeline/exec/multi_cast_data_streamer.h +++ b/be/src/pipeline/exec/multi_cast_data_streamer.h @@ -20,6 +20,7 @@ #include "vec/sink/vdata_stream_sender.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class Dependency; struct MultiCastBlock { @@ -84,4 +85,5 @@ class MultiCastDataStreamer { std::vector _dependencies; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline \ No newline at end of file diff --git a/be/src/pipeline/exec/nested_loop_join_build_operator.h b/be/src/pipeline/exec/nested_loop_join_build_operator.h index 5c41088a7059d4..11bcba2bd8fc3a 100644 --- a/be/src/pipeline/exec/nested_loop_join_build_operator.h +++ b/be/src/pipeline/exec/nested_loop_join_build_operator.h @@ -23,6 +23,7 @@ #include "pipeline/exec/join_build_sink_operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class NestedLoopJoinBuildSinkOperatorX; @@ -89,4 +90,5 @@ class NestedLoopJoinBuildSinkOperatorX final RowDescriptor _row_descriptor; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/olap_scan_operator.cpp b/be/src/pipeline/exec/olap_scan_operator.cpp index 7b06e216b81bf7..34fa741ff1ec00 100644 --- a/be/src/pipeline/exec/olap_scan_operator.cpp +++ b/be/src/pipeline/exec/olap_scan_operator.cpp @@ -40,6 +40,7 @@ #include "vec/functions/in.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" Status OlapScanLocalState::_init_profile() { RETURN_IF_ERROR(ScanLocalState::_init_profile()); @@ -347,13 +348,13 @@ Status OlapScanLocalState::_init_scanners(std::list* s int ranges_per_scanner = std::max(1, (int)ranges->size() / std::min(scanners_per_tablet, size_based_scanners_per_tablet)); - int num_ranges = ranges->size(); - for (int i = 0; i < num_ranges;) { + int64_t num_ranges = ranges->size(); + for (int64_t i = 0; i < num_ranges;) { std::vector scanner_ranges; scanner_ranges.push_back((*ranges)[i].get()); ++i; - for (int j = 1; i < num_ranges && j < ranges_per_scanner && - (*ranges)[i]->end_include == (*ranges)[i - 1]->end_include; + for (int64_t j = 1; i < num_ranges && j < ranges_per_scanner && + (*ranges)[i]->end_include == (*ranges)[i - 1]->end_include; ++j, ++i) { scanner_ranges.push_back((*ranges)[i].get()); } @@ -587,4 +588,5 @@ OlapScanOperatorX::OlapScanOperatorX(ObjectPool* pool, const TPlanNode& tnode, i } } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/olap_scan_operator.h b/be/src/pipeline/exec/olap_scan_operator.h index 9e8624b3a0b255..91980d6a3f172b 100644 --- a/be/src/pipeline/exec/olap_scan_operator.h +++ b/be/src/pipeline/exec/olap_scan_operator.h @@ -26,6 +26,7 @@ #include "pipeline/exec/scan_operator.h" namespace doris { +#include "common/compile_check_begin.h" namespace vectorized { class NewOlapScanner; @@ -198,4 +199,5 @@ class OlapScanOperatorX final : public ScanOperatorX { TQueryCacheParam _cache_param; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/olap_table_sink_operator.h b/be/src/pipeline/exec/olap_table_sink_operator.h index 8a9ffaaf769c31..3453a57a67b9bc 100644 --- a/be/src/pipeline/exec/olap_table_sink_operator.h +++ b/be/src/pipeline/exec/olap_table_sink_operator.h @@ -21,6 +21,7 @@ #include "vec/sink/writer/vtablet_writer.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class OlapTableSinkOperatorX; @@ -75,4 +76,5 @@ class OlapTableSinkOperatorX final : public DataSinkOperatorX; template class AsyncWriterSink; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/operator.h b/be/src/pipeline/exec/operator.h index c84c4e7b43f981..a2c8e110cedac3 100644 --- a/be/src/pipeline/exec/operator.h +++ b/be/src/pipeline/exec/operator.h @@ -39,6 +39,7 @@ #include "vec/runtime/vdata_stream_recvr.h" namespace doris { +#include "common/compile_check_begin.h" class RowDescriptor; class RuntimeState; class TDataSink; @@ -859,4 +860,5 @@ class AsyncWriterSink : public PipelineXSinkLocalState { std::shared_ptr _finish_dependency; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/partition_sort_sink_operator.cpp b/be/src/pipeline/exec/partition_sort_sink_operator.cpp index 48b8fe9cb765a1..d0c28afe9de5ba 100644 --- a/be/src/pipeline/exec/partition_sort_sink_operator.cpp +++ b/be/src/pipeline/exec/partition_sort_sink_operator.cpp @@ -24,6 +24,7 @@ #include "vec/common/hash_table/hash.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" Status PartitionSortSinkLocalState::init(RuntimeState* state, LocalSinkStateInfo& info) { RETURN_IF_ERROR(PipelineXSinkLocalState::init(state, info)); @@ -66,7 +67,7 @@ PartitionSortSinkOperatorX::PartitionSortSinkOperatorX(ObjectPool* pool, int ope _pool(pool), _row_descriptor(descs, tnode.row_tuples, tnode.nullable_tuples), _limit(tnode.limit), - _partition_exprs_num(tnode.partition_sort_node.partition_exprs.size()), + _partition_exprs_num(cast_set(tnode.partition_sort_node.partition_exprs.size())), _topn_phase(tnode.partition_sort_node.ptopn_phase), _has_global_limit(tnode.partition_sort_node.has_global_limit), _top_n_algorithm(tnode.partition_sort_node.top_n_algorithm), @@ -212,7 +213,7 @@ Status PartitionSortSinkOperatorX::_emplace_into_hash_table( }; SCOPED_TIMER(local_state._emplace_key_timer); - int row = num_rows; + int64_t row = num_rows; for (row = row - 1; row >= 0 && !local_state._is_need_passthrough; --row) { auto& mapped = *agg_method.lazy_emplace(state, row, creator, creator_for_null_key); @@ -274,4 +275,5 @@ bool PartitionSortSinkLocalState::check_whether_need_passthrough() { } // NOLINTEND(readability-simplify-boolean-expr) +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/partition_sort_sink_operator.h b/be/src/pipeline/exec/partition_sort_sink_operator.h index 6926445f18f2f4..32bbf38202713f 100644 --- a/be/src/pipeline/exec/partition_sort_sink_operator.h +++ b/be/src/pipeline/exec/partition_sort_sink_operator.h @@ -24,6 +24,7 @@ #include "vec/common/sort/partition_sorter.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class PartitionSortSinkOperatorX; class PartitionSortSinkLocalState : public PipelineXSinkLocalState { @@ -110,4 +111,5 @@ class PartitionSortSinkOperatorX final : public DataSinkOperatorX { @@ -324,4 +325,5 @@ class PartitionedAggSinkOperatorX : public DataSinkOperatorX(state, _shared_state->shared_from_this(), exception_catch_func)); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/partitioned_aggregation_source_operator.h b/be/src/pipeline/exec/partitioned_aggregation_source_operator.h index 7e73241745e029..6fb0ecaba01e20 100644 --- a/be/src/pipeline/exec/partitioned_aggregation_source_operator.h +++ b/be/src/pipeline/exec/partitioned_aggregation_source_operator.h @@ -22,6 +22,7 @@ #include "operator.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -99,4 +100,5 @@ class PartitionedAggSourceOperatorX : public OperatorX std::unique_ptr _agg_source_operator; }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp b/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp index 20b25d54ff9f16..3e7f95374f53d2 100644 --- a/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp +++ b/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp @@ -23,6 +23,7 @@ #include "vec/spill/spill_stream_manager.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" PartitionedHashJoinProbeLocalState::PartitionedHashJoinProbeLocalState(RuntimeState* state, OperatorXBase* parent) @@ -866,4 +867,5 @@ Status PartitionedHashJoinProbeOperatorX::get_block(RuntimeState* state, vectori return Status::OK(); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/partitioned_hash_join_probe_operator.h b/be/src/pipeline/exec/partitioned_hash_join_probe_operator.h index f8fc0780b6fc3f..a19e88d7203e62 100644 --- a/be/src/pipeline/exec/partitioned_hash_join_probe_operator.h +++ b/be/src/pipeline/exec/partitioned_hash_join_probe_operator.h @@ -27,6 +27,7 @@ #include "pipeline/exec/spill_utils.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -213,4 +214,5 @@ class PartitionedHashJoinProbeOperatorX final }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris \ No newline at end of file diff --git a/be/src/pipeline/exec/partitioned_hash_join_sink_operator.cpp b/be/src/pipeline/exec/partitioned_hash_join_sink_operator.cpp index 878c3870946f1c..852dccae71ca3b 100644 --- a/be/src/pipeline/exec/partitioned_hash_join_sink_operator.cpp +++ b/be/src/pipeline/exec/partitioned_hash_join_sink_operator.cpp @@ -23,6 +23,7 @@ #include "vec/spill/spill_stream_manager.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" Status PartitionedHashJoinSinkLocalState::init(doris::RuntimeState* state, doris::pipeline::LocalSinkStateInfo& info) { @@ -246,11 +247,11 @@ Status PartitionedHashJoinSinkLocalState::revoke_memory(RuntimeState* state) { return _revoke_unpartitioned_block(state); } - _spilling_streams_count = _shared_state->partitioned_build_blocks.size(); + _spilling_streams_count = cast_set(_shared_state->partitioned_build_blocks.size()); auto query_id = state->query_id(); - for (size_t i = 0; i != _shared_state->partitioned_build_blocks.size(); ++i) { + for (int i = 0; i != _shared_state->partitioned_build_blocks.size(); ++i) { vectorized::SpillStreamSPtr& spilling_stream = _shared_state->spilled_streams[i]; auto& mutable_block = _shared_state->partitioned_build_blocks[i]; @@ -555,4 +556,5 @@ Status PartitionedHashJoinSinkOperatorX::revoke_memory(RuntimeState* state) { return local_state.revoke_memory(state); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/partitioned_hash_join_sink_operator.h b/be/src/pipeline/exec/partitioned_hash_join_sink_operator.h index d1fe30e06f2dd2..e16e52dcaf9453 100644 --- a/be/src/pipeline/exec/partitioned_hash_join_sink_operator.h +++ b/be/src/pipeline/exec/partitioned_hash_join_sink_operator.h @@ -28,6 +28,7 @@ #include "vec/runtime/partitioner.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -148,4 +149,5 @@ class PartitionedHashJoinSinkOperatorX }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/repeat_operator.cpp b/be/src/pipeline/exec/repeat_operator.cpp index 5c94d43f0d1e05..48131e0d96e4c6 100644 --- a/be/src/pipeline/exec/repeat_operator.cpp +++ b/be/src/pipeline/exec/repeat_operator.cpp @@ -24,6 +24,7 @@ #include "vec/core/block.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; } // namespace doris @@ -221,8 +222,7 @@ Status RepeatOperatorX::pull(doris::RuntimeState* state, vectorized::Block* outp _repeat_id_idx++; - int size = _repeat_id_list.size(); - if (_repeat_id_idx >= size) { + if (_repeat_id_idx >= _repeat_id_list.size()) { _intermediate_block->clear(); _child_block.clear_column_data(_child->row_desc().num_materialized_slots()); _repeat_id_idx = 0; @@ -251,4 +251,5 @@ Status RepeatOperatorX::pull(doris::RuntimeState* state, vectorized::Block* outp return Status::OK(); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/repeat_operator.h b/be/src/pipeline/exec/repeat_operator.h index 31f88f37231aaa..2c2af32de0b0fb 100644 --- a/be/src/pipeline/exec/repeat_operator.h +++ b/be/src/pipeline/exec/repeat_operator.h @@ -23,6 +23,7 @@ #include "pipeline/exec/operator.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -92,4 +93,5 @@ class RepeatOperatorX final : public StatefulOperatorX { }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/result_file_sink_operator.cpp b/be/src/pipeline/exec/result_file_sink_operator.cpp index c65b9dda89d0ec..f806d9533d9e4c 100644 --- a/be/src/pipeline/exec/result_file_sink_operator.cpp +++ b/be/src/pipeline/exec/result_file_sink_operator.cpp @@ -28,6 +28,7 @@ #include "vec/sink/vdata_stream_sender.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" ResultFileSinkLocalState::ResultFileSinkLocalState(DataSinkOperatorXBase* parent, RuntimeState* state) @@ -143,4 +144,5 @@ Status ResultFileSinkOperatorX::sink(RuntimeState* state, vectorized::Block* in_ return local_state.sink(state, in_block, eos); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/result_file_sink_operator.h b/be/src/pipeline/exec/result_file_sink_operator.h index e9f2b8eeb9c670..c3c5e345f77e1a 100644 --- a/be/src/pipeline/exec/result_file_sink_operator.h +++ b/be/src/pipeline/exec/result_file_sink_operator.h @@ -21,6 +21,7 @@ #include "vec/sink/writer/vfile_result_writer.h" namespace doris::vectorized { +#include "common/compile_check_begin.h" class BroadcastPBlockHolder; } // namespace doris::vectorized @@ -88,4 +89,5 @@ class ResultFileSinkOperatorX final : public DataSinkOperatorX _sender = nullptr; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/result_sink_operator.cpp b/be/src/pipeline/exec/result_sink_operator.cpp index f8196910021b2c..8aeecbbddc12dc 100644 --- a/be/src/pipeline/exec/result_sink_operator.cpp +++ b/be/src/pipeline/exec/result_sink_operator.cpp @@ -35,6 +35,7 @@ #include "vec/sink/vmysql_result_writer.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" Status ResultSinkLocalState::init(RuntimeState* state, LocalSinkStateInfo& info) { RETURN_IF_ERROR(Base::init(state, info)); @@ -208,4 +209,5 @@ Status ResultSinkLocalState::close(RuntimeState* state, Status exec_status) { return final_status; } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/result_sink_operator.h b/be/src/pipeline/exec/result_sink_operator.h index 339c167825643b..479343ed6d5ea5 100644 --- a/be/src/pipeline/exec/result_sink_operator.h +++ b/be/src/pipeline/exec/result_sink_operator.h @@ -25,6 +25,7 @@ #include "runtime/result_writer.h" namespace doris { +#include "common/compile_check_begin.h" class BufferControlBlock; namespace pipeline { @@ -172,4 +173,5 @@ class ResultSinkOperatorX final : public DataSinkOperatorX }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/scan_operator.h b/be/src/pipeline/exec/scan_operator.h index 4519a3ca283f6f..c6c9cdf405d5a4 100644 --- a/be/src/pipeline/exec/scan_operator.h +++ b/be/src/pipeline/exec/scan_operator.h @@ -35,8 +35,9 @@ #include "vec/utils/util.hpp" namespace doris::vectorized { +#include "common/compile_check_begin.h" class ScannerDelegate; -} +} // namespace doris::vectorized namespace doris::pipeline { @@ -436,4 +437,5 @@ class ScanOperatorX : public OperatorX { std::vector topn_filter_source_node_ids; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/schema_scan_operator.cpp b/be/src/pipeline/exec/schema_scan_operator.cpp index ddc2821cac14a1..2e2f80f5e24838 100644 --- a/be/src/pipeline/exec/schema_scan_operator.cpp +++ b/be/src/pipeline/exec/schema_scan_operator.cpp @@ -26,6 +26,7 @@ #include "vec/data_types/data_type_factory.hpp" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; } // namespace doris @@ -144,7 +145,7 @@ Status SchemaScanOperatorX::open(RuntimeState* state) { return Status::InternalError("Failed to get tuple descriptor."); } - _slot_num = _dest_tuple_desc->slots().size(); + _slot_num = cast_set(_dest_tuple_desc->slots().size()); // get src tuple desc const auto* schema_table = static_cast(_dest_tuple_desc->table_desc()); @@ -269,4 +270,5 @@ Status SchemaScanOperatorX::get_block(RuntimeState* state, vectorized::Block* bl return Status::OK(); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/schema_scan_operator.h b/be/src/pipeline/exec/schema_scan_operator.h index c8ddf885e98a0f..2d861002748163 100644 --- a/be/src/pipeline/exec/schema_scan_operator.h +++ b/be/src/pipeline/exec/schema_scan_operator.h @@ -24,6 +24,7 @@ #include "operator.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; } // namespace doris @@ -88,4 +89,5 @@ class SchemaScanOperatorX final : public OperatorX { std::unique_ptr _schema_scanner; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline \ No newline at end of file diff --git a/be/src/pipeline/exec/select_operator.h b/be/src/pipeline/exec/select_operator.h index 5370cd9e293c34..584a6f74308903 100644 --- a/be/src/pipeline/exec/select_operator.h +++ b/be/src/pipeline/exec/select_operator.h @@ -22,6 +22,7 @@ #include "operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class SelectOperatorX; class SelectLocalState final : public PipelineXLocalState { @@ -55,4 +56,5 @@ class SelectOperatorX final : public StreamingOperatorX { [[nodiscard]] bool is_source() const override { return false; } }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/set_probe_sink_operator.cpp b/be/src/pipeline/exec/set_probe_sink_operator.cpp index 9ca87db925a44a..db487b0f9e7252 100644 --- a/be/src/pipeline/exec/set_probe_sink_operator.cpp +++ b/be/src/pipeline/exec/set_probe_sink_operator.cpp @@ -25,6 +25,7 @@ #include "vec/common/hash_table/hash_table_set_probe.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace vectorized { @@ -69,7 +70,7 @@ Status SetProbeSinkOperatorX::sink(RuntimeState* state, vectorized SCOPED_TIMER(local_state.exec_time_counter()); COUNTER_UPDATE(local_state.rows_input_counter(), (int64_t)in_block->rows()); - auto probe_rows = in_block->rows(); + uint32_t probe_rows = cast_set(in_block->rows()); if (probe_rows > 0) { { SCOPED_TIMER(local_state._extract_probe_data_timer); @@ -220,8 +221,8 @@ void SetProbeSinkOperatorX::_refresh_hash_table( ? (valid_element_in_hash_tbl < arg.hash_table ->size()) // When intersect, shrink as long as the element decreases - : (valid_element_in_hash_tbl < - arg.hash_table->size() * + : ((double)valid_element_in_hash_tbl < + (double)arg.hash_table->size() * need_shrink_ratio); // When except, element decreases need to within the 'need_shrink_ratio' before shrinking if (is_need_shrink) { @@ -269,4 +270,5 @@ template class SetProbeSinkLocalState; template class SetProbeSinkOperatorX; template class SetProbeSinkOperatorX; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/set_probe_sink_operator.h b/be/src/pipeline/exec/set_probe_sink_operator.h index 368ea812cdfe01..6b764c1e509951 100644 --- a/be/src/pipeline/exec/set_probe_sink_operator.h +++ b/be/src/pipeline/exec/set_probe_sink_operator.h @@ -23,6 +23,7 @@ #include "operator.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace vectorized { @@ -116,4 +117,5 @@ class SetProbeSinkOperatorX final : public DataSinkOperatorXsorter->reset(); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/sort_sink_operator.h b/be/src/pipeline/exec/sort_sink_operator.h index 6bf87164e71026..766c6c0ffc9a59 100644 --- a/be/src/pipeline/exec/sort_sink_operator.h +++ b/be/src/pipeline/exec/sort_sink_operator.h @@ -23,6 +23,7 @@ #include "vec/core/field.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" class SortSinkOperatorX; @@ -109,4 +110,5 @@ class SortSinkOperatorX final : public DataSinkOperatorX { const bool _reuse_mem; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/sort_source_operator.cpp b/be/src/pipeline/exec/sort_source_operator.cpp index 7f801b79c0b12b..2fb09d7278fda8 100644 --- a/be/src/pipeline/exec/sort_source_operator.cpp +++ b/be/src/pipeline/exec/sort_source_operator.cpp @@ -22,6 +22,7 @@ #include "pipeline/exec/operator.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" SortLocalState::SortLocalState(RuntimeState* state, OperatorXBase* parent) : PipelineXLocalState(state, parent) {} @@ -79,4 +80,5 @@ Status SortSourceOperatorX::build_merger(RuntimeState* state, return Status::OK(); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/sort_source_operator.h b/be/src/pipeline/exec/sort_source_operator.h index 20714eb44e5e60..a638b04b368eaa 100644 --- a/be/src/pipeline/exec/sort_source_operator.h +++ b/be/src/pipeline/exec/sort_source_operator.h @@ -23,6 +23,7 @@ #include "operator.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -69,4 +70,5 @@ class SortSourceOperatorX final : public OperatorX { }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/spill_utils.h b/be/src/pipeline/exec/spill_utils.h index 925e7df44e607e..2ba6f22a60b10c 100644 --- a/be/src/pipeline/exec/spill_utils.h +++ b/be/src/pipeline/exec/spill_utils.h @@ -26,6 +26,7 @@ #include "vec/runtime/partitioner.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" using SpillPartitionerType = vectorized::Crc32HashPartitioner; class SpillRunnable : public Runnable { @@ -70,4 +71,5 @@ class SpillRunnable : public Runnable { std::function _func; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline \ No newline at end of file diff --git a/be/src/pipeline/exec/streaming_aggregation_operator.cpp b/be/src/pipeline/exec/streaming_aggregation_operator.cpp index 1c8d2c47bc698a..b6e5788a07c626 100644 --- a/be/src/pipeline/exec/streaming_aggregation_operator.cpp +++ b/be/src/pipeline/exec/streaming_aggregation_operator.cpp @@ -29,6 +29,7 @@ #include "vec/exprs/vslot_ref.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; } // namespace doris @@ -228,7 +229,7 @@ Status StreamingAggLocalState::_merge_with_serialized_key_helper(vectorized::Blo } } - int rows = block->rows(); + size_t rows = block->rows(); if (_places.size() < rows) { _places.resize(rows); } @@ -270,7 +271,7 @@ Status StreamingAggLocalState::_merge_with_serialized_key_helper(vectorized::Blo for (int i = 0; i < _aggregate_evaluators.size(); ++i) { if (_aggregate_evaluators[i]->is_merge() || for_spill) { - int col_id = 0; + size_t col_id = 0; if constexpr (for_spill) { col_id = _probe_expr_ctxs.size() + i; } else { @@ -403,7 +404,7 @@ Status StreamingAggLocalState::_execute_with_serialized_key_helper(vectorized::B } } - int rows = block->rows(); + size_t rows = block->rows(); if (_places.size() < rows) { _places.resize(rows); } @@ -542,8 +543,8 @@ bool StreamingAggLocalState::_should_expand_preagg_hash_tables() { const int64_t aggregated_input_rows = input_rows - _cur_num_rows_returned; // TODO chenhao // const int64_t expected_input_rows = estimated_input_cardinality_ - num_rows_returned_; - double current_reduction = - static_cast(aggregated_input_rows) / ht_rows; + double current_reduction = static_cast(aggregated_input_rows) / + static_cast(ht_rows); // TODO: workaround for IMPALA-2490: subplan node rows_returned counter may be // inaccurate, which could lead to a divide by zero below. @@ -615,7 +616,7 @@ Status StreamingAggLocalState::_pre_agg_with_serialized_key(doris::vectorized::B } } - int rows = in_block->rows(); + size_t rows = in_block->rows(); _places.resize(rows); // Stop expanding hash tables if we're not reducing the input sufficiently. As our @@ -739,7 +740,7 @@ Status StreamingAggLocalState::_get_with_serialized_key_result(RuntimeState* sta auto columns_with_schema = vectorized::VectorizedUtils::create_columns_with_type_and_name(p._row_descriptor); - int key_size = _probe_expr_ctxs.size(); + size_t key_size = _probe_expr_ctxs.size(); vectorized::MutableColumns key_columns; for (int i = 0; i < key_size; ++i) { @@ -750,7 +751,7 @@ Status StreamingAggLocalState::_get_with_serialized_key_result(RuntimeState* sta } } vectorized::MutableColumns value_columns; - for (int i = key_size; i < columns_with_schema.size(); ++i) { + for (size_t i = key_size; i < columns_with_schema.size(); ++i) { if (!mem_reuse) { value_columns.emplace_back(columns_with_schema[i].type->create_column()); } else { @@ -852,7 +853,7 @@ Status StreamingAggLocalState::_get_results_without_key(RuntimeState* state, block->clear(); DCHECK(_agg_data->without_key != nullptr); - int agg_size = _aggregate_evaluators.size(); + const auto agg_size = _aggregate_evaluators.size(); vectorized::MutableColumns value_columns(agg_size); std::vector data_types(agg_size); @@ -888,8 +889,8 @@ Status StreamingAggLocalState::_get_results_with_serialized_key(RuntimeState* st bool* eos) { SCOPED_TIMER(_get_results_timer); auto& p = _parent->cast(); - int key_size = _probe_expr_ctxs.size(); - int agg_size = _aggregate_evaluators.size(); + const auto key_size = _probe_expr_ctxs.size(); + const auto agg_size = _aggregate_evaluators.size(); vectorized::MutableColumns value_columns(agg_size); vectorized::DataTypes value_data_types(agg_size); @@ -1013,7 +1014,7 @@ Status StreamingAggLocalState::_get_without_key_result(RuntimeState* state, auto& p = _parent->cast(); *block = vectorized::VectorizedUtils::create_empty_columnswithtypename(p._row_descriptor); - int agg_size = _aggregate_evaluators.size(); + const auto agg_size = _aggregate_evaluators.size(); vectorized::MutableColumns columns(agg_size); std::vector data_types(agg_size); @@ -1170,8 +1171,8 @@ Status StreamingAggOperatorX::open(RuntimeState* state) { DCHECK_EQ(_intermediate_tuple_desc->slots().size(), _output_tuple_desc->slots().size()); RETURN_IF_ERROR(vectorized::VExpr::prepare(_probe_expr_ctxs, state, _child->row_desc())); - int j = _probe_expr_ctxs.size(); - for (int i = 0; i < j; ++i) { + size_t j = _probe_expr_ctxs.size(); + for (size_t i = 0; i < j; ++i) { auto nullable_output = _output_tuple_desc->slots()[i]->is_nullable(); auto nullable_input = _probe_expr_ctxs[i]->root()->is_nullable(); if (nullable_output != nullable_input) { @@ -1179,7 +1180,7 @@ Status StreamingAggOperatorX::open(RuntimeState* state) { _make_nullable_keys.emplace_back(i); } } - for (int i = 0; i < _aggregate_evaluators.size(); ++i, ++j) { + for (size_t i = 0; i < _aggregate_evaluators.size(); ++i, ++j) { SlotDescriptor* intermediate_slot_desc = _intermediate_tuple_desc->slots()[j]; SlotDescriptor* output_slot_desc = _output_tuple_desc->slots()[j]; RETURN_IF_ERROR(_aggregate_evaluators[i]->prepare( @@ -1290,4 +1291,5 @@ bool StreamingAggOperatorX::need_more_input_data(RuntimeState* state) const { return local_state._pre_aggregated_block->empty() && !local_state._child_eos; } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/streaming_aggregation_operator.h b/be/src/pipeline/exec/streaming_aggregation_operator.h index b695880ac2857b..bd35cd940f2974 100644 --- a/be/src/pipeline/exec/streaming_aggregation_operator.h +++ b/be/src/pipeline/exec/streaming_aggregation_operator.h @@ -27,6 +27,7 @@ #include "vec/core/block.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -237,4 +238,5 @@ class StreamingAggOperatorX final : public StatefulOperatorXget_value( columns[p._child_slots.size() + p._fn_num - 1], - state->batch_size() - columns[p._child_slots.size()]->size()); + //// It has already been checked that + // columns[p._child_slots.size()]->size() < state->batch_size(), + // so columns[p._child_slots.size()]->size() will not exceed the range of int. + state->batch_size() - (int)columns[p._child_slots.size()]->size()); _current_row_insert_times += repeat_times; for (int i = 0; i < p._fn_num - 1; i++) { _fns[i]->get_same_many_values(columns[i + p._child_slots.size()], repeat_times); @@ -276,7 +280,7 @@ Status TableFunctionOperatorX::init(const TPlanNode& tnode, RuntimeState* state) fn->set_expr_context(ctx); _fns.push_back(fn); } - _fn_num = _fns.size(); + _fn_num = cast_set(_fns.size()); // Prepare output slot ids RETURN_IF_ERROR(_prepare_output_slot_ids(tnode)); @@ -304,7 +308,7 @@ Status TableFunctionOperatorX::open(doris::RuntimeState* state) { } } - for (size_t i = 0; i < _child_slots.size(); i++) { + for (int i = 0; i < _child_slots.size(); i++) { if (_slot_need_copy(i)) { _output_slot_indexs.push_back(i); } else { @@ -315,4 +319,5 @@ Status TableFunctionOperatorX::open(doris::RuntimeState* state) { return vectorized::VExpr::open(_vfn_ctxs, state); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/table_function_operator.h b/be/src/pipeline/exec/table_function_operator.h index 81160acb7f7611..9aa26e9ae22b10 100644 --- a/be/src/pipeline/exec/table_function_operator.h +++ b/be/src/pipeline/exec/table_function_operator.h @@ -24,6 +24,7 @@ #include "vec/exprs/table_function/table_function.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; } // namespace doris @@ -154,4 +155,5 @@ class TableFunctionOperatorX final : public StatefulOperatorX _child_slot_sizes; }; +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/union_sink_operator.cpp b/be/src/pipeline/exec/union_sink_operator.cpp index 8467eeb1d5467a..56491b5258bc55 100644 --- a/be/src/pipeline/exec/union_sink_operator.cpp +++ b/be/src/pipeline/exec/union_sink_operator.cpp @@ -19,6 +19,7 @@ #include +#include "common/cast_set.h" #include "common/compiler_util.h" // IWYU pragma: keep #include "common/status.h" #include "pipeline/exec/data_queue.h" @@ -27,6 +28,7 @@ #include "util/runtime_profile.h" namespace doris::pipeline { +#include "common/compile_check_begin.h" Status UnionSinkLocalState::init(RuntimeState* state, LocalSinkStateInfo& info) { RETURN_IF_ERROR(Base::init(state, info)); @@ -54,7 +56,8 @@ Status UnionSinkLocalState::open(RuntimeState* state) { UnionSinkOperatorX::UnionSinkOperatorX(int child_id, int sink_id, ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) : Base(sink_id, tnode.node_id, tnode.node_id), - _first_materialized_child_idx(tnode.union_node.first_materialized_child_idx), + _first_materialized_child_idx( + cast_set(tnode.union_node.first_materialized_child_idx)), _row_descriptor(descs, tnode.row_tuples, tnode.nullable_tuples), _cur_child_id(child_id), _child_size(tnode.num_children) {} @@ -130,4 +133,5 @@ Status UnionSinkOperatorX::sink(RuntimeState* state, vectorized::Block* in_block return Status::OK(); } +#include "common/compile_check_end.h" } // namespace doris::pipeline diff --git a/be/src/pipeline/exec/union_sink_operator.h b/be/src/pipeline/exec/union_sink_operator.h index aa94ed9a73038f..3a8880622cb108 100644 --- a/be/src/pipeline/exec/union_sink_operator.h +++ b/be/src/pipeline/exec/union_sink_operator.h @@ -26,6 +26,7 @@ #include "vec/core/block.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -152,4 +153,5 @@ class UnionSinkOperatorX final : public DataSinkOperatorX { }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris \ No newline at end of file diff --git a/be/src/pipeline/exec/union_source_operator.cpp b/be/src/pipeline/exec/union_source_operator.cpp index ecaaf22922b657..d13658488e2c9b 100644 --- a/be/src/pipeline/exec/union_source_operator.cpp +++ b/be/src/pipeline/exec/union_source_operator.cpp @@ -30,6 +30,7 @@ #include "vec/core/block.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace pipeline { @@ -148,7 +149,7 @@ Status UnionSourceOperatorX::get_next_const(RuntimeState* state, vectorized::Blo vectorized::Block tmp_block; tmp_block.insert({vectorized::ColumnUInt8::create(1), std::make_shared(), ""}); - int const_expr_lists_size = _const_expr_lists[_const_expr_list_idx].size(); + int const_expr_lists_size = cast_set(_const_expr_lists[_const_expr_list_idx].size()); if (_const_expr_list_idx && const_expr_lists_size != _const_expr_lists[0].size()) { return Status::InternalError( "[UnionNode]const expr at {}'s count({}) not matched({} expected)", @@ -183,4 +184,5 @@ Status UnionSourceOperatorX::get_next_const(RuntimeState* state, vectorized::Blo } } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris diff --git a/be/src/pipeline/exec/union_source_operator.h b/be/src/pipeline/exec/union_source_operator.h index 200e7de8597b91..0ee66c3da7447b 100644 --- a/be/src/pipeline/exec/union_source_operator.h +++ b/be/src/pipeline/exec/union_source_operator.h @@ -24,6 +24,7 @@ #include "operator.h" namespace doris { +#include "common/compile_check_begin.h" class RuntimeState; namespace vectorized { @@ -123,4 +124,5 @@ class UnionSourceOperatorX final : public OperatorX { }; } // namespace pipeline +#include "common/compile_check_end.h" } // namespace doris \ No newline at end of file