This is an automated email from the ASF dual-hosted git repository.
wangbo 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 cd42ec1db80 [Fix] Add compile check for SchemaScanner (#45797)
cd42ec1db80 is described below
commit cd42ec1db8010bf391f88a09a6f22cc3c35d5d24
Author: wangbo <[email protected]>
AuthorDate: Tue Dec 24 10:34:41 2024 +0800
[Fix] Add compile check for SchemaScanner (#45797)
---
.../schema_active_queries_scanner.cpp | 6 ++--
.../schema_scanner/schema_backend_active_tasks.cpp | 4 ++-
.../schema_catalog_meta_cache_stats_scanner.cpp | 6 ++--
.../exec/schema_scanner/schema_columns_scanner.cpp | 12 ++++----
.../schema_file_cache_statistics.cpp | 3 +-
.../schema_scanner/schema_partitions_scanner.cpp | 6 ++--
.../schema_scanner/schema_processlist_scanner.cpp | 3 +-
.../exec/schema_scanner/schema_routine_scanner.cpp | 6 ++--
.../exec/schema_scanner/schema_rowsets_scanner.cpp | 32 ++++++++++++----------
.../schema_table_options_scanner.cpp | 6 ++--
.../schema_table_properties_scanner.cpp | 6 ++--
.../schema_workload_group_privileges.cpp | 6 ++--
...chema_workload_group_resource_usage_scanner.cpp | 4 ++-
.../schema_workload_groups_scanner.cpp | 6 ++--
.../schema_workload_sched_policy_scanner.cpp | 6 ++--
15 files changed, 70 insertions(+), 42 deletions(-)
diff --git a/be/src/exec/schema_scanner/schema_active_queries_scanner.cpp
b/be/src/exec/schema_scanner/schema_active_queries_scanner.cpp
index 98051638026..0ccff6439b8 100644
--- a/be/src/exec/schema_scanner/schema_active_queries_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_active_queries_scanner.cpp
@@ -26,6 +26,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaActiveQueriesScanner::_s_tbls_columns = {
// name, type, size
{"QUERY_ID", TYPE_VARCHAR, sizeof(StringRef), true},
@@ -92,7 +94,7 @@ Status
SchemaActiveQueriesScanner::_get_active_queries_block_from_fe() {
_active_query_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>("active queries schema is not
match for FE and BE");
}
@@ -119,7 +121,7 @@ Status
SchemaActiveQueriesScanner::get_next_block_internal(vectorized::Block* bl
if (_active_query_block == nullptr) {
RETURN_IF_ERROR(_get_active_queries_block_from_fe());
- _total_rows = _active_query_block->rows();
+ _total_rows = (int)_active_query_block->rows();
}
if (_row_idx == _total_rows) {
diff --git a/be/src/exec/schema_scanner/schema_backend_active_tasks.cpp
b/be/src/exec/schema_scanner/schema_backend_active_tasks.cpp
index 74e95f42032..eb7b373c7dc 100644
--- a/be/src/exec/schema_scanner/schema_backend_active_tasks.cpp
+++ b/be/src/exec/schema_scanner/schema_backend_active_tasks.cpp
@@ -25,6 +25,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaBackendActiveTasksScanner::_s_tbls_columns = {
// name, type, size
{"BE_ID", TYPE_BIGINT, sizeof(int64_t), false},
@@ -76,7 +78,7 @@ Status
SchemaBackendActiveTasksScanner::get_next_block_internal(vectorized::Bloc
ExecEnv::GetInstance()->runtime_query_statistics_mgr()->get_active_be_tasks_block(
_task_stats_block.get());
- _total_rows = _task_stats_block->rows();
+ _total_rows = (int)_task_stats_block->rows();
}
if (_row_idx == _total_rows) {
diff --git
a/be/src/exec/schema_scanner/schema_catalog_meta_cache_stats_scanner.cpp
b/be/src/exec/schema_scanner/schema_catalog_meta_cache_stats_scanner.cpp
index 4c067057729..576ae3f9e91 100644
--- a/be/src/exec/schema_scanner/schema_catalog_meta_cache_stats_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_catalog_meta_cache_stats_scanner.cpp
@@ -27,6 +27,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaCatalogMetaCacheStatsScanner::_s_tbls_columns = {
{"CATALOG_NAME", TYPE_STRING, sizeof(StringRef), true},
{"CACHE_NAME", TYPE_STRING, sizeof(StringRef), true},
@@ -86,7 +88,7 @@ Status
SchemaCatalogMetaCacheStatsScanner::_get_meta_cache_from_fe() {
_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>(
"catalog meta cache stats schema is not match for FE and
BE");
@@ -115,7 +117,7 @@ Status
SchemaCatalogMetaCacheStatsScanner::get_next_block_internal(vectorized::B
if (_block == nullptr) {
RETURN_IF_ERROR(_get_meta_cache_from_fe());
- _total_rows = _block->rows();
+ _total_rows = (int)_block->rows();
}
if (_row_idx == _total_rows) {
diff --git a/be/src/exec/schema_scanner/schema_columns_scanner.cpp
b/be/src/exec/schema_scanner/schema_columns_scanner.cpp
index b60dfc3d203..2cc827a7b43 100644
--- a/be/src/exec/schema_scanner/schema_columns_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_columns_scanner.cpp
@@ -30,6 +30,8 @@
#include "vec/common/string_ref.h"
namespace doris {
+#include "common/compile_check_begin.h"
+
class RuntimeState;
namespace vectorized {
@@ -411,7 +413,7 @@ Status
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
{
std::vector<StringRef> strs(columns_num);
int offset_index = 0;
- int cur_table_index = _table_index - _desc_result.tables_offset.size();
+ int cur_table_index = int(_table_index -
_desc_result.tables_offset.size());
for (int i = 0; i < columns_num; ++i) {
while (_desc_result.tables_offset[offset_index] <= i) {
@@ -609,14 +611,14 @@ Status
SchemaColumnsScanner::_fill_block_impl(vectorized::Block* block) {
// EXTRA
{
StringRef str = StringRef("", 0);
- std::vector<void*> datas(columns_num, &str);
- RETURN_IF_ERROR(fill_dest_column_for_range(block, 17, datas));
+ std::vector<void*> filled_values(columns_num, &str);
+ RETURN_IF_ERROR(fill_dest_column_for_range(block, 17, filled_values));
}
// PRIVILEGES
{
StringRef str = StringRef("", 0);
- std::vector<void*> datas(columns_num, &str);
- RETURN_IF_ERROR(fill_dest_column_for_range(block, 18, datas));
+ std::vector<void*> filled_values(columns_num, &str);
+ RETURN_IF_ERROR(fill_dest_column_for_range(block, 18, filled_values));
}
// COLUMN_COMMENT
{
diff --git a/be/src/exec/schema_scanner/schema_file_cache_statistics.cpp
b/be/src/exec/schema_scanner/schema_file_cache_statistics.cpp
index ecad274d218..8a3efa0edc5 100644
--- a/be/src/exec/schema_scanner/schema_file_cache_statistics.cpp
+++ b/be/src/exec/schema_scanner/schema_file_cache_statistics.cpp
@@ -25,6 +25,7 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
std::vector<SchemaScanner::ColumnDesc>
SchemaFileCacheStatisticsScanner::_s_tbls_columns = {
// name, type, size
@@ -68,7 +69,7 @@ Status
SchemaFileCacheStatisticsScanner::get_next_block_internal(vectorized::Blo
_stats_block->reserve(_block_rows_limit);
ExecEnv::GetInstance()->file_cache_factory()->get_cache_stats_block(_stats_block.get());
- _total_rows = _stats_block->rows();
+ _total_rows = (int)_stats_block->rows();
}
if (_row_idx == _total_rows) {
diff --git a/be/src/exec/schema_scanner/schema_partitions_scanner.cpp
b/be/src/exec/schema_scanner/schema_partitions_scanner.cpp
index 459715fd628..dd7919a7fe2 100644
--- a/be/src/exec/schema_scanner/schema_partitions_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_partitions_scanner.cpp
@@ -31,6 +31,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
class RuntimeState;
namespace vectorized {
class Block;
@@ -138,7 +140,7 @@ Status
SchemaPartitionsScanner::get_onedb_info_from_fe(int64_t dbId) {
}
_partitions_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>("table options schema is not
match for FE and BE");
}
@@ -178,7 +180,7 @@ Status
SchemaPartitionsScanner::get_next_block_internal(vectorized::Block* block
if (_db_index < _db_result.db_ids.size()) {
RETURN_IF_ERROR(get_onedb_info_from_fe(_db_result.db_ids[_db_index]));
_row_idx = 0; // reset row index so that it start filling for next
block.
- _total_rows = _partitions_block->rows();
+ _total_rows = (int)_partitions_block->rows();
_db_index++;
}
}
diff --git a/be/src/exec/schema_scanner/schema_processlist_scanner.cpp
b/be/src/exec/schema_scanner/schema_processlist_scanner.cpp
index 185ef2ab442..92c80262963 100644
--- a/be/src/exec/schema_scanner/schema_processlist_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_processlist_scanner.cpp
@@ -30,6 +30,7 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
std::vector<SchemaScanner::ColumnDesc>
SchemaProcessListScanner::_s_processlist_columns = {
{"CURRENT_CONNECTED", TYPE_VARCHAR, sizeof(StringRef), false},
@@ -126,7 +127,7 @@ Status
SchemaProcessListScanner::_fill_block_impl(vectorized::Block* block) {
datas[row_idx] = &int_vals[row_idx];
} else if (_s_processlist_columns[col_idx].type ==
TYPE_DATETIMEV2) {
auto* dv =
reinterpret_cast<DateV2Value<DateTimeV2ValueType>*>(&int_vals[row_idx]);
- if (!dv->from_date_str(column_value.data(),
column_value.size(), -1,
+ if (!dv->from_date_str(column_value.data(),
(int)column_value.size(), -1,
config::allow_zero_date)) {
return Status::InternalError(
"process list meet invalid data, column={},
data={}, reason={}",
diff --git a/be/src/exec/schema_scanner/schema_routine_scanner.cpp
b/be/src/exec/schema_scanner/schema_routine_scanner.cpp
index 8660d75e8a1..7f16c0cddba 100644
--- a/be/src/exec/schema_scanner/schema_routine_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_routine_scanner.cpp
@@ -26,6 +26,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc> SchemaRoutinesScanner::_s_tbls_columns
= {
{"SPECIFIC_NAME", TYPE_VARCHAR, sizeof(StringRef), true},
{"ROUTINE_CATALOG", TYPE_VARCHAR, sizeof(StringRef), true},
@@ -94,7 +96,7 @@ Status SchemaRoutinesScanner::get_block_from_fe() {
}
_routines_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>("routine table schema is not
match for FE and BE");
}
@@ -121,7 +123,7 @@ Status
SchemaRoutinesScanner::get_next_block_internal(vectorized::Block* block,
if (_routines_block == nullptr) {
RETURN_IF_ERROR(get_block_from_fe());
- _total_rows = _routines_block->rows();
+ _total_rows = (int)_routines_block->rows();
}
if (_row_idx == _total_rows) {
diff --git a/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp
b/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp
index 3aa0e944a82..aea98bd61ac 100644
--- a/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_rowsets_scanner.cpp
@@ -48,6 +48,8 @@ namespace vectorized {
class Block;
} // namespace vectorized
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc> SchemaRowsetsScanner::_s_tbls_columns =
{
// name, type, size, is_null
{"BACKEND_ID", TYPE_BIGINT, sizeof(int64_t), true},
@@ -132,13 +134,13 @@ Status
SchemaRowsetsScanner::get_next_block_internal(vectorized::Block* block, b
Status SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
SCOPED_TIMER(_fill_block_timer);
size_t fill_rowsets_num = std::min(1000UL, rowsets_.size() - _rowsets_idx);
- auto fill_idx_begin = _rowsets_idx;
- auto fill_idx_end = _rowsets_idx + fill_rowsets_num;
+ size_t fill_idx_begin = _rowsets_idx;
+ size_t fill_idx_end = _rowsets_idx + fill_rowsets_num;
std::vector<void*> datas(fill_rowsets_num);
// BACKEND_ID
{
int64_t src = backend_id_;
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
datas[i - fill_idx_begin] = &src;
}
RETURN_IF_ERROR(fill_dest_column_for_range(block, 0, datas));
@@ -147,7 +149,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
{
std::vector<std::string> rowset_ids(fill_rowsets_num);
std::vector<StringRef> strs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
rowset_ids[i - fill_idx_begin] = rowset->rowset_id().to_string();
strs[i - fill_idx_begin] = StringRef(rowset_ids[i -
fill_idx_begin].c_str(),
@@ -159,7 +161,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// TABLET_ID
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->rowset_meta()->tablet_id();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -169,7 +171,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// ROWSET_NUM_ROWS
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->num_rows();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -179,7 +181,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// TXN_ID
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->txn_id();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -189,7 +191,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// NUM_SEGMENTS
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->num_segments();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -199,7 +201,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// START_VERSION
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->start_version();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -209,7 +211,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// END_VERSION
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->end_version();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -219,7 +221,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// INDEX_DISK_SIZE
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->index_disk_size();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -229,7 +231,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// DATA_DISK_SIZE
{
std::vector<int64_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] = rowset->data_disk_size();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
@@ -239,7 +241,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// CREATION_TIME
{
std::vector<VecDateTimeValue> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
int64_t creation_time = rowset->creation_time();
srcs[i - fill_idx_begin].from_unixtime(creation_time,
TimezoneUtils::default_time_zone);
@@ -250,7 +252,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// NEWEST_WRITE_TIMESTAMP
{
std::vector<VecDateTimeValue> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
int64_t newest_write_timestamp = rowset->newest_write_timestamp();
srcs[i - fill_idx_begin].from_unixtime(newest_write_timestamp,
@@ -262,7 +264,7 @@ Status
SchemaRowsetsScanner::_fill_block_impl(vectorized::Block* block) {
// SCHEMA_VERSION
{
std::vector<int32_t> srcs(fill_rowsets_num);
- for (int i = fill_idx_begin; i < fill_idx_end; ++i) {
+ for (size_t i = fill_idx_begin; i < fill_idx_end; ++i) {
RowsetSharedPtr rowset = rowsets_[i];
srcs[i - fill_idx_begin] =
rowset->tablet_schema()->schema_version();
datas[i - fill_idx_begin] = srcs.data() + i - fill_idx_begin;
diff --git a/be/src/exec/schema_scanner/schema_table_options_scanner.cpp
b/be/src/exec/schema_scanner/schema_table_options_scanner.cpp
index bb778996a83..fd9d17c8b93 100644
--- a/be/src/exec/schema_scanner/schema_table_options_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_table_options_scanner.cpp
@@ -27,6 +27,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaTableOptionsScanner::_s_tbls_columns = {
{"TABLE_CATALOG", TYPE_VARCHAR, sizeof(StringRef), true},
{"TABLE_SCHEMA", TYPE_VARCHAR, sizeof(StringRef), true},
@@ -110,7 +112,7 @@ Status
SchemaTableOptionsScanner::get_onedb_info_from_fe(int64_t dbId) {
}
_tableoptions_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>("table options schema is not
match for FE and BE");
}
@@ -150,7 +152,7 @@ Status
SchemaTableOptionsScanner::get_next_block_internal(vectorized::Block* blo
if (_db_index < _db_result.db_ids.size()) {
RETURN_IF_ERROR(get_onedb_info_from_fe(_db_result.db_ids[_db_index]));
_row_idx = 0; // reset row index so that it start filling for next
block.
- _total_rows = _tableoptions_block->rows();
+ _total_rows = (int)_tableoptions_block->rows();
_db_index++;
}
}
diff --git a/be/src/exec/schema_scanner/schema_table_properties_scanner.cpp
b/be/src/exec/schema_scanner/schema_table_properties_scanner.cpp
index 8d6a26a552f..682560372b9 100644
--- a/be/src/exec/schema_scanner/schema_table_properties_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_table_properties_scanner.cpp
@@ -27,6 +27,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaTablePropertiesScanner::_s_tbls_columns = {
{"TABLE_CATALOG", TYPE_VARCHAR, sizeof(StringRef), true},
{"TABLE_SCHEMA", TYPE_VARCHAR, sizeof(StringRef), true},
@@ -108,7 +110,7 @@ Status
SchemaTablePropertiesScanner::get_onedb_info_from_fe(int64_t dbId) {
}
_tableproperties_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>("table options schema is not
match for FE and BE");
}
@@ -148,7 +150,7 @@ Status
SchemaTablePropertiesScanner::get_next_block_internal(vectorized::Block*
if (_db_index < _db_result.db_ids.size()) {
RETURN_IF_ERROR(get_onedb_info_from_fe(_db_result.db_ids[_db_index]));
_row_idx = 0; // reset row index so that it start filling for next
block.
- _total_rows = _tableproperties_block->rows();
+ _total_rows = (int)_tableproperties_block->rows();
_db_index++;
}
}
diff --git a/be/src/exec/schema_scanner/schema_workload_group_privileges.cpp
b/be/src/exec/schema_scanner/schema_workload_group_privileges.cpp
index a91a28322ec..bdf306ef7d9 100644
--- a/be/src/exec/schema_scanner/schema_workload_group_privileges.cpp
+++ b/be/src/exec/schema_scanner/schema_workload_group_privileges.cpp
@@ -26,6 +26,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaWorkloadGroupPrivilegesScanner::_s_tbls_columns = {
{"GRANTEE", TYPE_VARCHAR, sizeof(StringRef), true},
{"WORKLOAD_GROUP_NAME", TYPE_VARCHAR, sizeof(StringRef), true},
@@ -83,7 +85,7 @@ Status
SchemaWorkloadGroupPrivilegesScanner::_get_workload_group_privs_block_fro
}
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>(
"workload group privileges schema is not match for FE and
BE");
@@ -116,7 +118,7 @@ Status
SchemaWorkloadGroupPrivilegesScanner::get_next_block_internal(vectorized:
if (_workload_groups_privs_block == nullptr) {
RETURN_IF_ERROR(_get_workload_group_privs_block_from_fe());
- _total_rows = _workload_groups_privs_block->rows();
+ _total_rows = (int)_workload_groups_privs_block->rows();
}
if (_row_idx == _total_rows) {
diff --git
a/be/src/exec/schema_scanner/schema_workload_group_resource_usage_scanner.cpp
b/be/src/exec/schema_scanner/schema_workload_group_resource_usage_scanner.cpp
index ca339044e98..805bf12cc38 100644
---
a/be/src/exec/schema_scanner/schema_workload_group_resource_usage_scanner.cpp
+++
b/be/src/exec/schema_scanner/schema_workload_group_resource_usage_scanner.cpp
@@ -28,6 +28,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaBackendWorkloadGroupResourceUsage::_s_tbls_columns = {
// name, type, size
{"BE_ID", TYPE_BIGINT, sizeof(int64_t), false},
@@ -70,7 +72,7 @@ Status
SchemaBackendWorkloadGroupResourceUsage::get_next_block_internal(vectoriz
}
ExecEnv::GetInstance()->workload_group_mgr()->get_wg_resource_usage(_block.get());
- _total_rows = _block->rows();
+ _total_rows = (int)_block->rows();
}
if (_row_idx == _total_rows) {
diff --git a/be/src/exec/schema_scanner/schema_workload_groups_scanner.cpp
b/be/src/exec/schema_scanner/schema_workload_groups_scanner.cpp
index 481360eee90..bc5fb61669c 100644
--- a/be/src/exec/schema_scanner/schema_workload_groups_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_workload_groups_scanner.cpp
@@ -26,6 +26,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaWorkloadGroupsScanner::_s_tbls_columns = {
{"ID", TYPE_BIGINT, sizeof(int64_t), true},
{"NAME", TYPE_VARCHAR, sizeof(StringRef), true},
@@ -98,7 +100,7 @@ Status
SchemaWorkloadGroupsScanner::_get_workload_groups_block_from_fe() {
_workload_groups_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>(
"workload groups schema is not match for FE and BE");
@@ -127,7 +129,7 @@ Status
SchemaWorkloadGroupsScanner::get_next_block_internal(vectorized::Block* b
if (_workload_groups_block == nullptr) {
RETURN_IF_ERROR(_get_workload_groups_block_from_fe());
- _total_rows = _workload_groups_block->rows();
+ _total_rows = (int)_workload_groups_block->rows();
}
if (_row_idx == _total_rows) {
diff --git
a/be/src/exec/schema_scanner/schema_workload_sched_policy_scanner.cpp
b/be/src/exec/schema_scanner/schema_workload_sched_policy_scanner.cpp
index 5c6a6f70a88..fa1c671f5ee 100644
--- a/be/src/exec/schema_scanner/schema_workload_sched_policy_scanner.cpp
+++ b/be/src/exec/schema_scanner/schema_workload_sched_policy_scanner.cpp
@@ -26,6 +26,8 @@
#include "vec/data_types/data_type_factory.hpp"
namespace doris {
+#include "common/compile_check_begin.h"
+
std::vector<SchemaScanner::ColumnDesc>
SchemaWorkloadSchedulePolicyScanner::_s_tbls_columns = {
{"ID", TYPE_BIGINT, sizeof(int64_t), true},
{"NAME", TYPE_VARCHAR, sizeof(StringRef), true},
@@ -89,7 +91,7 @@ Status
SchemaWorkloadSchedulePolicyScanner::_get_workload_schedule_policy_block_
_block->reserve(_block_rows_limit);
if (result_data.size() > 0) {
- int col_size = result_data[0].column_value.size();
+ auto col_size = result_data[0].column_value.size();
if (col_size != _s_tbls_columns.size()) {
return Status::InternalError<false>(
"workload policy schema is not match for FE and BE");
@@ -118,7 +120,7 @@ Status
SchemaWorkloadSchedulePolicyScanner::get_next_block_internal(vectorized::
if (_block == nullptr) {
RETURN_IF_ERROR(_get_workload_schedule_policy_block_from_fe());
- _total_rows = _block->rows();
+ _total_rows = (int)_block->rows();
}
if (_row_idx == _total_rows) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]