[refactor] Remove decimal v1 related code from code base (#6079)

remove ALL DECIMAL V1 type code , this is a part of #6073
This commit is contained in:
Zhengguo Yang
2021-07-07 10:26:32 +08:00
committed by GitHub
parent d6e6c7815b
commit 739c0268ff
151 changed files with 707 additions and 4369 deletions

View File

@ -890,18 +890,6 @@ StringVal StringFunctions::money_format(FunctionContext* context, const DoubleVa
return do_money_format(context, std::to_string(v_cent));
}
StringVal StringFunctions::money_format(FunctionContext* context, const DecimalVal& v) {
if (v.is_null) {
return StringVal::null();
}
DecimalValue rounded;
DecimalValue::from_decimal_val(v).round(&rounded, 2, HALF_UP);
DecimalValue tmp(std::string_view("100"));
DecimalValue result = rounded * tmp;
return do_money_format(context, result.to_string());
}
StringVal StringFunctions::money_format(FunctionContext* context, const DecimalV2Val& v) {
if (v.is_null) {
return StringVal::null();