mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Clang tidy gives one error at a time
This commit is contained in:
parent
17fdd2bd37
commit
f84083d174
@ -76,30 +76,6 @@ namespace ErrorCodes
|
||||
extern const int SIZES_OF_ARRAYS_DONT_MATCH;
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
template <bool is_multiply, bool is_division, typename T, typename U, template <typename> typename DecimalType>
|
||||
inline auto decimalResultType(const DecimalType<T> & tx, const DecimalType<U> & ty)
|
||||
{
|
||||
const auto result_trait = DecimalUtils::binaryOpResult<is_multiply, is_division>(tx, ty);
|
||||
return DecimalType<typename decltype(result_trait)::FieldType>(result_trait.precision, result_trait.scale);
|
||||
}
|
||||
|
||||
template <bool is_multiply, bool is_division, typename T, typename U, template <typename> typename DecimalType>
|
||||
inline DecimalType<T> decimalResultType(const DecimalType<T> & tx, const DataTypeNumber<U> & ty)
|
||||
{
|
||||
const auto result_trait = DecimalUtils::binaryOpResult<is_multiply, is_division>(tx, ty);
|
||||
return DecimalType<typename decltype(result_trait)::FieldType>(result_trait.precision, result_trait.scale);
|
||||
}
|
||||
|
||||
template <bool is_multiply, bool is_division, typename T, typename U, template <typename> typename DecimalType>
|
||||
inline DecimalType<U> decimalResultType(const DataTypeNumber<T> & tx, const DecimalType<U> & ty)
|
||||
{
|
||||
const auto result_trait = DecimalUtils::binaryOpResult<is_multiply, is_division>(tx, ty);
|
||||
return DecimalType<typename decltype(result_trait)::FieldType>(result_trait.precision, result_trait.scale);
|
||||
}
|
||||
}
|
||||
|
||||
namespace traits_
|
||||
{
|
||||
struct InvalidType; /// Used to indicate undefined operation
|
||||
@ -256,6 +232,27 @@ public:
|
||||
namespace impl_
|
||||
{
|
||||
|
||||
template <bool is_multiply, bool is_division, typename T, typename U, template <typename> typename DecimalType>
|
||||
inline auto decimalResultType(const DecimalType<T> & tx, const DecimalType<U> & ty)
|
||||
{
|
||||
const auto result_trait = DecimalUtils::binaryOpResult<is_multiply, is_division>(tx, ty);
|
||||
return DecimalType<typename decltype(result_trait)::FieldType>(result_trait.precision, result_trait.scale);
|
||||
}
|
||||
|
||||
template <bool is_multiply, bool is_division, typename T, typename U, template <typename> typename DecimalType>
|
||||
inline DecimalType<T> decimalResultType(const DecimalType<T> & tx, const DataTypeNumber<U> & ty)
|
||||
{
|
||||
const auto result_trait = DecimalUtils::binaryOpResult<is_multiply, is_division>(tx, ty);
|
||||
return DecimalType<typename decltype(result_trait)::FieldType>(result_trait.precision, result_trait.scale);
|
||||
}
|
||||
|
||||
template <bool is_multiply, bool is_division, typename T, typename U, template <typename> typename DecimalType>
|
||||
inline DecimalType<U> decimalResultType(const DataTypeNumber<T> & tx, const DecimalType<U> & ty)
|
||||
{
|
||||
const auto result_trait = DecimalUtils::binaryOpResult<is_multiply, is_division>(tx, ty);
|
||||
return DecimalType<typename decltype(result_trait)::FieldType>(result_trait.precision, result_trait.scale);
|
||||
}
|
||||
|
||||
/** Arithmetic operations: +, -, *, /, %,
|
||||
* intDiv (integer division)
|
||||
* Bitwise operations: |, &, ^, ~.
|
||||
|
Loading…
Reference in New Issue
Block a user