Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[env](compile) add compiler check and fix some clang-tidy suggestions for vec/exec/format #45881

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
enable check in column_type_convert.h
  • Loading branch information
suxiaogang223 committed Jan 3, 2025
commit e6debec718ca779d4e503a4cf976a76cae22a167
11 changes: 6 additions & 5 deletions be/src/vec/exec/format/column_type_convert.h
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
#include "vec/io/io_helper.h"

namespace doris::vectorized::converter {
// #include "common/compile_check_begin.h"
#include "common/compile_check_begin.h"

template <PrimitiveType type>
constexpr bool is_decimal_type_const() {
@@ -504,7 +504,8 @@ class NumericToDecimalConverter : public ColumnTypeConverter {
auto& v = reinterpret_cast<DstNativeType&>(data[start_idx + i]);
v = (DstNativeType)decimal_int128;
} else {
data[start_idx + i] = DstCppType::from_int_frac(src_data[i], 0, _scale);
data[start_idx + i] =
DstCppType::from_int_frac(cast_set<int>(src_data[i]), 0, _scale);
}
}

@@ -537,8 +538,8 @@ class DecimalToNumericConverter : public ColumnTypeConverter {
int64_t scale_factor = common::exp10_i64(_scale);
for (int i = 0; i < rows; ++i) {
if constexpr (DstPrimitiveType == TYPE_FLOAT || DstPrimitiveType == TYPE_DOUBLE) {
data[start_idx + i] =
static_cast<DstCppType>(src_data[i].value / (double)scale_factor);
data[start_idx + i] = static_cast<DstCppType>(
static_cast<double>(src_data[i].value) / (double)scale_factor);
} else {
data[start_idx + i] = static_cast<DstCppType>(src_data[i].value / scale_factor);
}
@@ -548,5 +549,5 @@ class DecimalToNumericConverter : public ColumnTypeConverter {
}
};

// #include "common/compile_check_end.h"
#include "common/compile_check_end.h"
} // namespace doris::vectorized::converter