This is an automated email from the ASF dual-hosted git repository.
eldenmoon 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 0c2db090e5c [chore](compile) enable compile check for some files
(#55564)
0c2db090e5c is described below
commit 0c2db090e5c34a2a44b3843c52c8707e7b976eff
Author: lihangyu <[email protected]>
AuthorDate: Tue Sep 2 19:58:34 2025 +0800
[chore](compile) enable compile check for some files (#55564)
---
be/src/olap/rowset/segment_v2/variant_stats_calculator.cpp | 8 ++++++--
be/src/olap/rowset/segment_v2/variant_stats_calculator.h | 2 +-
be/src/olap/schema.h | 6 +++++-
be/src/vec/olap/olap_data_convertor.h | 6 +++++-
4 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/be/src/olap/rowset/segment_v2/variant_stats_calculator.cpp
b/be/src/olap/rowset/segment_v2/variant_stats_calculator.cpp
index 6964fef452e..5a890299835 100644
--- a/be/src/olap/rowset/segment_v2/variant_stats_calculator.cpp
+++ b/be/src/olap/rowset/segment_v2/variant_stats_calculator.cpp
@@ -24,12 +24,14 @@
namespace doris::segment_v2 {
+#include "common/compile_check_begin.h"
+
VariantStatsCaculator::VariantStatsCaculator(SegmentFooterPB* footer,
TabletSchemaSPtr tablet_schema,
const std::vector<uint32_t>&
column_ids)
: _footer(footer), _tablet_schema(tablet_schema),
_column_ids(column_ids) {
// Build the path to footer index mapping during initialization
- for (size_t i = 0; i < _footer->columns_size(); ++i) {
+ for (int i = 0; i < _footer->columns_size(); ++i) {
const auto& column = _footer->columns(i);
// path that need to record stats
if (column.has_column_path_info() &&
@@ -54,7 +56,7 @@ Status VariantStatsCaculator::calculate_variant_stats(const
vectorized::Block* b
return Status::NotFound("Column path not found in footer: {}",
tablet_column.path_info_ptr()->get_path());
}
- size_t footer_index = it->second[column_path];
+ int footer_index = it->second[column_path];
ColumnMetaPB* column_meta = _footer->mutable_columns(footer_index);
// Get the column from the block
@@ -105,4 +107,6 @@ void
VariantStatsCaculator::_calculate_sub_column_stats(const vectorized::IColum
<< " (added " << current_non_null_count << " from current
block)";
}
+#include "common/compile_check_end.h"
+
} // namespace doris::segment_v2
\ No newline at end of file
diff --git a/be/src/olap/rowset/segment_v2/variant_stats_calculator.h
b/be/src/olap/rowset/segment_v2/variant_stats_calculator.h
index 6ffd74036cb..79f53737f06 100644
--- a/be/src/olap/rowset/segment_v2/variant_stats_calculator.h
+++ b/be/src/olap/rowset/segment_v2/variant_stats_calculator.h
@@ -36,7 +36,7 @@ public:
private:
// Map from column path to footer column index for fast lookup
- std::unordered_map<int32_t, std::unordered_map<std::string, size_t>>
_path_to_footer_index;
+ std::unordered_map<int32_t, std::unordered_map<std::string, int>>
_path_to_footer_index;
// Reference to the footer where we store the statistics
SegmentFooterPB* _footer;
diff --git a/be/src/olap/schema.h b/be/src/olap/schema.h
index bcec1b1cf48..6d5f3dff45b 100644
--- a/be/src/olap/schema.h
+++ b/be/src/olap/schema.h
@@ -38,6 +38,8 @@
namespace doris {
+#include "common/compile_check_begin.h"
+
// The class is used to represent row's format in memory. Each row contains
// multiple columns, some of which are key-columns (the rest are
value-columns).
// NOTE: If both key-columns and value-columns exist, then the key-columns
@@ -88,7 +90,7 @@ public:
Schema(const std::vector<TabletColumnPtr>& columns, const
std::vector<ColumnId>& col_ids) {
size_t num_key_columns = 0;
_unique_ids.resize(columns.size());
- for (size_t i = 0; i < columns.size(); ++i) {
+ for (int i = 0; i < columns.size(); ++i) {
if (columns[i]->is_key()) {
++num_key_columns;
}
@@ -212,4 +214,6 @@ private:
int64_t _mem_size = 0;
};
+#include "common/compile_check_end.h"
+
} // namespace doris
diff --git a/be/src/vec/olap/olap_data_convertor.h
b/be/src/vec/olap/olap_data_convertor.h
index 09967d970b8..5cdbff770c8 100644
--- a/be/src/vec/olap/olap_data_convertor.h
+++ b/be/src/vec/olap/olap_data_convertor.h
@@ -56,6 +56,8 @@ class TabletColumn;
namespace vectorized {
+#include "common/compile_check_begin.h"
+
class Block;
class ColumnArray;
class ColumnMap;
@@ -189,7 +191,7 @@ private:
memset(padded_column->chars.data(), 0, input->size() *
padding_length);
for (size_t i = 0; i < input->size(); i++) {
- column->offsets[i] = (i + 1) * padding_length;
+ column->offsets[i] = cast_set<uint32_t, size_t, false>((i + 1)
* padding_length);
auto str = input->get_data_at(i);
@@ -539,5 +541,7 @@ private:
std::vector<OlapColumnDataConvertorBaseUPtr> _convertors;
};
+#include "common/compile_check_end.h"
+
} // namespace vectorized
} // namespace doris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]