fix(decimal): fix decimal build and tests

This commit is contained in:
wangjiaming0909 2025-03-10 20:12:14 +08:00
parent d73e411b11
commit 2526fb8448
3 changed files with 3 additions and 2 deletions

View File

@ -702,7 +702,7 @@ TEST(decimal, toStr) {
SDataType getDecimalType(uint8_t prec, uint8_t scale) { SDataType getDecimalType(uint8_t prec, uint8_t scale) {
if (prec > TSDB_DECIMAL_MAX_PRECISION) throw std::string("invalid prec: ") + std::to_string(prec); if (prec > TSDB_DECIMAL_MAX_PRECISION) throw std::string("invalid prec: ") + std::to_string(prec);
uint8_t type = decimalTypeFromPrecision(prec); uint8_t type = decimalTypeFromPrecision(prec);
return {.type = type, .precision = prec, .scale = scale, .bytes = tDataTypes[type].bytes}; return {type, prec, scale, tDataTypes[type].bytes};
} }
bool operator==(const SDataType& lt, const SDataType& rt) { bool operator==(const SDataType& lt, const SDataType& rt) {

View File

@ -172,7 +172,7 @@ void clearColValArraySml(SArray* pCols) {
taosMemoryFreeClear(pCol->value.pData); taosMemoryFreeClear(pCol->value.pData);
} }
pCol->flag = CV_FLAG_NONE; pCol->flag = CV_FLAG_NONE;
valueClearDatum(&pCol->value, pCol->value.type); pCol->value.val = 0;
} }
} }

View File

@ -317,6 +317,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 2
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 3
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/tsma2.py -Q 4
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py -Q 4
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py -Q 3
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py -Q 2