From d5510a047d0deaad94ab40320fbffda03d191707 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 28 Feb 2025 09:20:53 +0800 Subject: [PATCH] feat:support decimal in raw block --- source/libs/parser/src/parTranslater.c | 2 +- utils/test/c/tmq_write_raw_test.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index c4804473b3..57fa0953b1 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -14152,7 +14152,7 @@ static int32_t extractQueryResultSchema(const SNodeList* pProjections, int32_t* return terrno; } if (ppExtSchemas) *ppExtSchemas = taosMemoryCalloc(*numOfCols, sizeof(SExtSchema)); - if (!ppExtSchemas) { + if (ppExtSchemas && *ppExtSchemas == NULL) { taosMemoryFreeClear(*pSchema); return terrno; } diff --git a/utils/test/c/tmq_write_raw_test.c b/utils/test/c/tmq_write_raw_test.c index ab2e3db796..cc297793e0 100644 --- a/utils/test/c/tmq_write_raw_test.c +++ b/utils/test/c/tmq_write_raw_test.c @@ -213,6 +213,13 @@ int32_t init_env() { buildDatabase(pConn, pRes); + pRes = taos_query(pConn, "drop topic if exists topic_query"); + if (taos_errno(pRes) != 0) { + printf("error in drop topic, reason:%s\n", taos_errstr(pRes)); + return -1; + } + taos_free_result(pRes); + pRes = taos_query(pConn, "drop database if exists db_query"); if (taos_errno(pRes) != 0) { printf("error in drop db_taosx, reason:%s\n", taos_errstr(pRes));