From 2526fb8448838e8215138513254956bed479a157 Mon Sep 17 00:00:00 2001 From: wangjiaming0909 Date: Mon, 10 Mar 2025 20:12:14 +0800 Subject: [PATCH] fix(decimal): fix decimal build and tests --- source/libs/decimal/test/decimalTest.cpp | 2 +- source/libs/parser/src/parInsertSml.c | 2 +- tests/parallel_test/cases.task | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/libs/decimal/test/decimalTest.cpp b/source/libs/decimal/test/decimalTest.cpp index bf82eec652..ca554da720 100644 --- a/source/libs/decimal/test/decimalTest.cpp +++ b/source/libs/decimal/test/decimalTest.cpp @@ -702,7 +702,7 @@ TEST(decimal, toStr) { SDataType getDecimalType(uint8_t prec, uint8_t scale) { if (prec > TSDB_DECIMAL_MAX_PRECISION) throw std::string("invalid prec: ") + std::to_string(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) { diff --git a/source/libs/parser/src/parInsertSml.c b/source/libs/parser/src/parInsertSml.c index c4b79e73ea..48637038c4 100644 --- a/source/libs/parser/src/parInsertSml.c +++ b/source/libs/parser/src/parInsertSml.c @@ -172,7 +172,7 @@ void clearColValArraySml(SArray* pCols) { taosMemoryFreeClear(pCol->value.pData); } pCol->flag = CV_FLAG_NONE; - valueClearDatum(&pCol->value, pCol->value.type); + pCol->value.val = 0; } } diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index d22795ed4d..e14f9f050c 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -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 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/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 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/decimal.py -Q 2