This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 829a0b1f14e [env](compile)import compile_check_avoid to prevent some code from compile-checked. (#47862) 829a0b1f14e is described below commit 829a0b1f14ead7e8e2858afebec0b6d2b9b2314a Author: Mryange <yanxuech...@selectdb.com> AuthorDate: Fri Feb 14 11:44:44 2025 +0800 [env](compile)import compile_check_avoid to prevent some code from compile-checked. (#47862) ### What problem does this PR solve? 1. This code uses templates, and errors like the following are likely to occur, mainly due to literal type mismatches: be/src/vec/common/cow.h:409:39: warning: implicit conversion loses integer precision: 'int' to 'value_type' (aka 'unsigned char') [-Wimplicit-int-conversion] 409 | return MutablePtr(new Derived(std::forward<Args>(args)...)); | ~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ ColumnPtr res_data_column = ColumnUInt8::create(1, 1); 2. Some third-party libraries or files generated in the gensrc directory may have some compile check failures. 3. Also, some compile check errors have been fixed. Problem Summary: ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [x] No need to test or manual test. Explain why: - [x] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [x] No. - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into --> --- be/src/common/compile_check_avoid_begin.h | 30 +++++++++++++++++++++++++++++ be/src/common/compile_check_avoid_end.h | 23 ++++++++++++++++++++++ be/src/vec/columns/predicate_column.h | 4 +++- be/src/vec/common/cow.h | 9 +++++++++ be/src/vec/common/format_ip.h | 6 ++++-- be/src/vec/common/hash_table/hash.h | 3 +++ be/src/vec/common/memcmp_small.h | 4 +++- be/src/vec/common/pod_array.h | 3 ++- be/src/vec/common/schema_util.cpp | 6 ++++-- be/src/vec/common/sort/heap_sorter.cpp | 8 +++++--- be/src/vec/common/sort/heap_sorter.h | 4 +++- be/src/vec/common/sort/partition_sorter.cpp | 4 ++-- be/src/vec/common/sort/partition_sorter.h | 17 +++++++++------- be/src/vec/common/sort/sorter.cpp | 2 +- be/src/vec/common/sort/sorter.h | 8 +++++--- be/src/vec/common/sort/topn_sorter.cpp | 2 +- be/src/vec/common/sort/topn_sorter.h | 4 +++- be/src/vec/core/sort_cursor.h | 2 +- 18 files changed, 112 insertions(+), 27 deletions(-) diff --git a/be/src/common/compile_check_avoid_begin.h b/be/src/common/compile_check_avoid_begin.h new file mode 100644 index 00000000000..9651c967648 --- /dev/null +++ b/be/src/common/compile_check_avoid_begin.h @@ -0,0 +1,30 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//compile_check_avoid_begin is the opposite version of compile_check_begin, +//and it is used within a block of code to avoid checks. +#ifdef COMPILE_AVOID_CHECK +#error The handling of compile_check_avoid_begin.h and compile_check_avoid_end.h is not done correctly. +#endif + +#define COMPILE_AVOID_CHECK +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wconversion" +#endif + +//#include "common/compile_check_avoid_begin.h" diff --git a/be/src/common/compile_check_avoid_end.h b/be/src/common/compile_check_avoid_end.h new file mode 100644 index 00000000000..25441dce866 --- /dev/null +++ b/be/src/common/compile_check_avoid_end.h @@ -0,0 +1,23 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif +#undef COMPILE_AVOID_CHECK + +// #include "common/compile_check_avoid_end.h" diff --git a/be/src/vec/columns/predicate_column.h b/be/src/vec/columns/predicate_column.h index 3cbcfdd6b21..2581c07f85b 100644 --- a/be/src/vec/columns/predicate_column.h +++ b/be/src/vec/columns/predicate_column.h @@ -32,6 +32,7 @@ #include "vec/core/types.h" namespace doris::vectorized { +#include "common/compile_check_begin.h" /** * used to keep predicate column in storage layer @@ -285,7 +286,7 @@ public: char* org_dst = destination; size_t org_elem_num = data.size(); data.resize(org_elem_num + num); - uint32_t fragment_start_offset = 0; + uint64_t fragment_start_offset = 0; size_t fragment_len = 0; for (size_t i = 0; i < num; i++) { data[org_elem_num + i].data = destination + fragment_len; @@ -445,4 +446,5 @@ private: std::vector<StringRef> _refs; }; +#include "common/compile_check_end.h" } // namespace doris::vectorized diff --git a/be/src/vec/common/cow.h b/be/src/vec/common/cow.h index 4970f649d32..48c9d106d70 100644 --- a/be/src/vec/common/cow.h +++ b/be/src/vec/common/cow.h @@ -26,6 +26,7 @@ #include <vector> namespace doris { +#include "common/compile_check_begin.h" /** Copy-on-write shared ptr. * Allows to work with shared immutable objects and sometimes unshare and mutate you own unique copy. @@ -404,10 +405,17 @@ public: using Ptr = typename Base::template immutable_ptr<Derived>; using MutablePtr = typename Base::template mutable_ptr<Derived>; +#include "common/compile_check_avoid_begin.h" + //This code uses templates, and errors like the following are likely to occur, mainly due to literal type mismatches: + // be/src/vec/common/cow.h:409:39: warning: implicit conversion loses integer precision: 'int' to 'value_type' (aka 'unsigned char') [-Wimplicit-int-conversion] + // 409 | return MutablePtr(new Derived(std::forward<Args>(args)...)); + // | ~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ + // ColumnPtr res_data_column = ColumnUInt8::create(1, 1); template <typename... Args> static MutablePtr create(Args&&... args) { return MutablePtr(new Derived(std::forward<Args>(args)...)); } +#include "common/compile_check_avoid_end.h" typename Base::MutablePtr clone() const override { return typename Base::MutablePtr(new Derived(static_cast<const Derived&>(*this))); @@ -433,4 +441,5 @@ protected: return MutablePtr(static_cast<Derived*>(Base::shallow_mutate().get())); } }; +#include "common/compile_check_end.h" } // namespace doris \ No newline at end of file diff --git a/be/src/vec/common/format_ip.h b/be/src/vec/common/format_ip.h index 45f90d3bdad..6b7a9221ae7 100644 --- a/be/src/vec/common/format_ip.h +++ b/be/src/vec/common/format_ip.h @@ -42,6 +42,7 @@ constexpr size_t DECIMAL_BASE = 10; constexpr size_t IPV6_BINARY_LENGTH = 16; namespace doris::vectorized { +#include "common/compile_check_begin.h" extern const std::array<std::pair<const char*, size_t>, 256> one_byte_to_string_lookup_table; @@ -80,7 +81,7 @@ inline void format_ipv4(const unsigned char* src, size_t src_size, char*& dst, value = static_cast<uint8_t>(src[IPV4_BINARY_LENGTH - octet - 1]); else value = static_cast<uint8_t>(src[octet]); - const uint8_t len = one_byte_to_string_lookup_table[value].second; + const uint8_t len = static_cast<uint8_t>(one_byte_to_string_lookup_table[value].second); const char* str = one_byte_to_string_lookup_table[value].first; memcpy(dst, str, len); @@ -251,7 +252,7 @@ inline void format_ipv6(unsigned char* src, char*& dst, uint8_t zeroed_tail_byte * Copy the input (bytewise) array into a wordwise array. * Find the longest run of 0x00's in src[] for :: shorthanding. */ for (size_t i = 0; i < (IPV6_BINARY_LENGTH - zeroed_tail_bytes_count); i += 2) { - words[i / 2] = (src[i] << 8) | src[i + 1]; + words[i / 2] = (uint16_t)(src[i] << 8) | src[i + 1]; } for (size_t i = 0; i < words.size(); i++) { @@ -485,4 +486,5 @@ inline bool parse_ipv6_whole(const char* src, unsigned char* dst) { return end != nullptr && *end == '\0'; } +#include "common/compile_check_end.h" } // namespace doris::vectorized diff --git a/be/src/vec/common/hash_table/hash.h b/be/src/vec/common/hash_table/hash.h index ddc8b2a7547..1208c1d482a 100644 --- a/be/src/vec/common/hash_table/hash.h +++ b/be/src/vec/common/hash_table/hash.h @@ -188,7 +188,10 @@ struct HashCRC32<doris::vectorized::UInt136> { size_t operator()(const doris::vectorized::UInt136& x) const { #if defined(__SSE4_2__) || defined(__aarch64__) doris::vectorized::UInt64 crc = -1ULL; +#include "common/compile_check_avoid_begin.h" + //_mm_crc32_u8 does not provide a u64 interface, so there is an unavoidable conversion from u64 to u32 here. crc = _mm_crc32_u8(crc, x.a); +#include "common/compile_check_avoid_end.h" crc = _mm_crc32_u64(crc, x.b); crc = _mm_crc32_u64(crc, x.c); return crc; diff --git a/be/src/vec/common/memcmp_small.h b/be/src/vec/common/memcmp_small.h index 194e8deedba..33bcb398cd5 100644 --- a/be/src/vec/common/memcmp_small.h +++ b/be/src/vec/common/memcmp_small.h @@ -24,7 +24,7 @@ #include <cstdint> namespace doris::vectorized::detail { - +#include "common/compile_check_avoid_begin.h" template <typename T> int cmp(T a, T b) { if (a < b) return -1; @@ -224,3 +224,5 @@ inline bool memory_is_zero_small_allow_overflow15(const void* data, size_t size) } #endif + +#include "common/compile_check_avoid_end.h" diff --git a/be/src/vec/common/pod_array.h b/be/src/vec/common/pod_array.h index c55dc0cc33e..df379b5f54f 100644 --- a/be/src/vec/common/pod_array.h +++ b/be/src/vec/common/pod_array.h @@ -43,7 +43,7 @@ #include "vec/common/pod_array_fwd.h" namespace doris::vectorized { - +#include "common/compile_check_avoid_begin.h" /** For zero argument, result is zero. * For arguments with most significand bit set, result is zero. * For other arguments, returns value, rounded up to power of two. @@ -685,3 +685,4 @@ void swap(PODArray<T, initial_bytes, TAllocator, pad_right_, pad_left_>& lhs, } } // namespace doris::vectorized +#include "common/compile_check_avoid_end.h" \ No newline at end of file diff --git a/be/src/vec/common/schema_util.cpp b/be/src/vec/common/schema_util.cpp index 6f6df3d77d9..2ed28f3ad75 100644 --- a/be/src/vec/common/schema_util.cpp +++ b/be/src/vec/common/schema_util.cpp @@ -74,6 +74,7 @@ #include "vec/json/path_in_data.h" namespace doris::vectorized::schema_util { +#include "common/compile_check_begin.h" size_t get_number_of_dimensions(const IDataType& type) { if (const auto* type_array = typeid_cast<const DataTypeArray*>(&type)) { @@ -177,7 +178,7 @@ Status cast_column(const ColumnWithTypeAndName& arg, const DataTypePtr& type, Co type->get_name()); } Block tmp_block {arguments}; - size_t result_column = tmp_block.columns(); + uint32_t result_column = cast_set<uint32_t>(tmp_block.columns()); auto ctx = FunctionContext::create_context(nullptr, {}, {}); if (WhichDataType(arg.type).is_nothing()) { @@ -593,7 +594,7 @@ Status extract(ColumnPtr source, const PathInData& path, MutableColumnPtr& dst) vectorized::ColumnNumbers argnum; argnum.emplace_back(0); argnum.emplace_back(1); - size_t result_column = tmp_block.columns(); + uint32_t result_column = cast_set<uint32_t>(tmp_block.columns()); tmp_block.insert({nullptr, json_type, ""}); RETURN_IF_ERROR(function->execute(nullptr, tmp_block, argnum, result_column, source->size())); dst = tmp_block.get_by_position(result_column) @@ -618,4 +619,5 @@ bool has_schema_index_diff(const TabletSchema* new_schema, const TabletSchema* o return new_schema_has_inverted_index != old_schema_has_inverted_index; } +#include "common/compile_check_end.h" } // namespace doris::vectorized::schema_util diff --git a/be/src/vec/common/sort/heap_sorter.cpp b/be/src/vec/common/sort/heap_sorter.cpp index f9e3f28cd93..d0b8c1043ca 100644 --- a/be/src/vec/common/sort/heap_sorter.cpp +++ b/be/src/vec/common/sort/heap_sorter.cpp @@ -32,13 +32,14 @@ #include "vec/exprs/vexpr_context.h" namespace doris { +#include "common/compile_check_begin.h" class ObjectPool; class RowDescriptor; class RuntimeState; } // namespace doris namespace doris::vectorized { -HeapSorter::HeapSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, +HeapSorter::HeapSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, const RowDescriptor& row_desc) : Sorter(vsort_exec_exprs, limit, offset, pool, is_asc_order, nulls_first), @@ -143,7 +144,7 @@ Status HeapSorter::prepare_for_read() { break; } } - for (int i = capacity - 1; i >= 0; i--) { + for (int64_t i = capacity - 1; i >= 0; i--) { auto rid = vector_to_reverse[i].row_id(); const auto cur_block = vector_to_reverse[i].block(); Columns columns = cur_block->get_columns(); @@ -176,7 +177,7 @@ Field HeapSorter::get_top_value() { // need exception safety void HeapSorter::_do_filter(HeapSortCursorBlockView& block_view, size_t num_rows) { const auto& top_cursor = _heap->top(); - const int cursor_rid = top_cursor.row_id(); + const auto cursor_rid = top_cursor.row_id(); IColumn::Filter filter(num_rows); for (size_t i = 0; i < num_rows; ++i) { @@ -212,4 +213,5 @@ size_t HeapSorter::data_size() const { return _data_size; } +#include "common/compile_check_end.h" } // namespace doris::vectorized diff --git a/be/src/vec/common/sort/heap_sorter.h b/be/src/vec/common/sort/heap_sorter.h index f036e9b360c..b36ef28af70 100644 --- a/be/src/vec/common/sort/heap_sorter.h +++ b/be/src/vec/common/sort/heap_sorter.h @@ -33,6 +33,7 @@ #include "vec/core/sort_cursor.h" namespace doris { +#include "common/compile_check_begin.h" class ObjectPool; class RowDescriptor; class RuntimeState; @@ -76,7 +77,7 @@ class HeapSorter final : public Sorter { ENABLE_FACTORY_CREATOR(HeapSorter); public: - HeapSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, ObjectPool* pool, + HeapSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, const RowDescriptor& row_desc); @@ -117,4 +118,5 @@ private: RuntimeProfile::Counter* _materialize_timer = nullptr; }; +#include "common/compile_check_end.h" } // namespace doris::vectorized diff --git a/be/src/vec/common/sort/partition_sorter.cpp b/be/src/vec/common/sort/partition_sorter.cpp index c034c8a72d1..4c7702bdcc9 100644 --- a/be/src/vec/common/sort/partition_sorter.cpp +++ b/be/src/vec/common/sort/partition_sorter.cpp @@ -40,11 +40,11 @@ class VSortExecExprs; namespace doris::vectorized { -PartitionSorter::PartitionSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, +PartitionSorter::PartitionSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, const RowDescriptor& row_desc, RuntimeState* state, RuntimeProfile* profile, - bool has_global_limit, int partition_inner_limit, + bool has_global_limit, int64_t partition_inner_limit, TopNAlgorithm::type top_n_algorithm, SortCursorCmp* previous_row) : Sorter(vsort_exec_exprs, limit, offset, pool, is_asc_order, nulls_first), _state(MergeSorterState::create_unique(row_desc, offset, limit, state, profile)), diff --git a/be/src/vec/common/sort/partition_sorter.h b/be/src/vec/common/sort/partition_sorter.h index 6cfc8d7be93..721f8e541c5 100644 --- a/be/src/vec/common/sort/partition_sorter.h +++ b/be/src/vec/common/sort/partition_sorter.h @@ -29,6 +29,7 @@ #include "vec/common/sort/sorter.h" namespace doris { +#include "common/compile_check_begin.h" class ObjectPool; class RowDescriptor; class RuntimeProfile; @@ -68,7 +69,7 @@ public: return true; } - int row = 0; + size_t row = 0; std::shared_ptr<MergeSortCursorImpl> impl = nullptr; }; @@ -76,11 +77,12 @@ class PartitionSorter final : public Sorter { ENABLE_FACTORY_CREATOR(PartitionSorter); public: - PartitionSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, ObjectPool* pool, - std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, - const RowDescriptor& row_desc, RuntimeState* state, RuntimeProfile* profile, - bool has_global_limit, int partition_inner_limit, - TopNAlgorithm::type top_n_algorithm, SortCursorCmp* previous_row); + PartitionSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, + ObjectPool* pool, std::vector<bool>& is_asc_order, + std::vector<bool>& nulls_first, const RowDescriptor& row_desc, + RuntimeState* state, RuntimeProfile* profile, bool has_global_limit, + int64_t partition_inner_limit, TopNAlgorithm::type top_n_algorithm, + SortCursorCmp* previous_row); ~PartitionSorter() override = default; @@ -116,10 +118,11 @@ private: const RowDescriptor& _row_desc; int64 _output_total_rows = 0; int64 _output_distinct_rows = 0; - int _partition_inner_limit = 0; + int64 _partition_inner_limit = 0; TopNAlgorithm::type _top_n_algorithm = TopNAlgorithm::type::ROW_NUMBER; SortCursorCmp* _previous_row = nullptr; std::atomic_bool _prepared_finish = false; }; +#include "common/compile_check_end.h" } // namespace doris::vectorized diff --git a/be/src/vec/common/sort/sorter.cpp b/be/src/vec/common/sort/sorter.cpp index 82b59cd6717..c73ddb62e03 100644 --- a/be/src/vec/common/sort/sorter.cpp +++ b/be/src/vec/common/sort/sorter.cpp @@ -204,7 +204,7 @@ Status Sorter::partial_sort(Block& src_block, Block& dest_block) { return Status::OK(); } -FullSorter::FullSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, +FullSorter::FullSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, const RowDescriptor& row_desc, RuntimeState* state, RuntimeProfile* profile) diff --git a/be/src/vec/common/sort/sorter.h b/be/src/vec/common/sort/sorter.h index f214e2a7700..38a018c6140 100644 --- a/be/src/vec/common/sort/sorter.h +++ b/be/src/vec/common/sort/sorter.h @@ -38,6 +38,7 @@ #include "vec/utils/util.hpp" namespace doris { +#include "common/compile_check_begin.h" class ObjectPool; class RowDescriptor; } // namespace doris @@ -100,7 +101,7 @@ private: class Sorter { public: - Sorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, ObjectPool* pool, + Sorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first) : _vsort_exec_exprs(vsort_exec_exprs), _limit(limit), @@ -145,7 +146,7 @@ protected: bool _enable_spill = false; SortDescription _sort_description; VSortExecExprs& _vsort_exec_exprs; - int _limit; + int64_t _limit; int64_t _offset; ObjectPool* _pool = nullptr; std::vector<bool>& _is_asc_order; @@ -163,7 +164,7 @@ class FullSorter final : public Sorter { ENABLE_FACTORY_CREATOR(FullSorter); public: - FullSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, ObjectPool* pool, + FullSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, const RowDescriptor& row_desc, RuntimeState* state, RuntimeProfile* profile); @@ -195,4 +196,5 @@ private: static constexpr size_t INITIAL_BUFFERED_BLOCK_BYTES = 64 * 1024 * 1024; }; +#include "common/compile_check_end.h" } // namespace doris::vectorized diff --git a/be/src/vec/common/sort/topn_sorter.cpp b/be/src/vec/common/sort/topn_sorter.cpp index 1f24fb14c95..3e0bc5ee688 100644 --- a/be/src/vec/common/sort/topn_sorter.cpp +++ b/be/src/vec/common/sort/topn_sorter.cpp @@ -39,7 +39,7 @@ class VSortExecExprs; namespace doris::vectorized { -TopNSorter::TopNSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, +TopNSorter::TopNSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, const RowDescriptor& row_desc, RuntimeState* state, RuntimeProfile* profile) diff --git a/be/src/vec/common/sort/topn_sorter.h b/be/src/vec/common/sort/topn_sorter.h index 39d6ef8a37b..54a2e838ffc 100644 --- a/be/src/vec/common/sort/topn_sorter.h +++ b/be/src/vec/common/sort/topn_sorter.h @@ -26,6 +26,7 @@ #include "vec/common/sort/sorter.h" namespace doris { +#include "common/compile_check_begin.h" class ObjectPool; class RowDescriptor; class RuntimeProfile; @@ -43,7 +44,7 @@ class TopNSorter final : public Sorter { ENABLE_FACTORY_CREATOR(TopNSorter); public: - TopNSorter(VSortExecExprs& vsort_exec_exprs, int limit, int64_t offset, ObjectPool* pool, + TopNSorter(VSortExecExprs& vsort_exec_exprs, int64_t limit, int64_t offset, ObjectPool* pool, std::vector<bool>& is_asc_order, std::vector<bool>& nulls_first, const RowDescriptor& row_desc, RuntimeState* state, RuntimeProfile* profile); @@ -66,4 +67,5 @@ private: const RowDescriptor& _row_desc; }; +#include "common/compile_check_end.h" } // namespace doris::vectorized diff --git a/be/src/vec/core/sort_cursor.h b/be/src/vec/core/sort_cursor.h index ee4ce22f42d..c7993e7fc95 100644 --- a/be/src/vec/core/sort_cursor.h +++ b/be/src/vec/core/sort_cursor.h @@ -63,7 +63,7 @@ using HeapSortCursorBlockSPtr = std::shared_ptr<HeapSortCursorBlockView>; struct HeapSortCursorImpl { public: - HeapSortCursorImpl(int row_id, HeapSortCursorBlockSPtr block_view) + HeapSortCursorImpl(size_t row_id, HeapSortCursorBlockSPtr block_view) : _row_id(row_id), _block_view(std::move(block_view)) {} HeapSortCursorImpl(const HeapSortCursorImpl& other) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org