From d03a14506e140c498f4c5f8ef1cff3c39ba59770 Mon Sep 17 00:00:00 2001 From: wangjiaming0909 <604227650@qq.com> Date: Fri, 28 Jun 2024 17:31:49 +0800 Subject: [PATCH 1/2] fix fill wrong timestamp value --- source/libs/executor/src/tfill.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/tfill.c b/source/libs/executor/src/tfill.c index 7b63bc8720..f16e187789 100644 --- a/source/libs/executor/src/tfill.c +++ b/source/libs/executor/src/tfill.c @@ -84,7 +84,9 @@ static void doSetUserSpecifiedValue(SColumnInfoData* pDst, SVariant* pVar, int32 GET_TYPED_DATA(v, uint64_t, pVar->nType, &pVar->u); colDataSetVal(pDst, rowIndex, (char*)&v, isNull); } else if (pDst->info.type == TSDB_DATA_TYPE_TIMESTAMP) { - colDataSetVal(pDst, rowIndex, (const char*)¤tKey, isNull); + int64_t v = 0; + GET_TYPED_DATA(v, int64_t, pVar->nType, &pVar->u); + colDataSetVal(pDst, rowIndex, (const char*)&v, isNull); } else if (pDst->info.type == TSDB_DATA_TYPE_NCHAR || pDst->info.type == TSDB_DATA_TYPE_VARCHAR || pDst->info.type == TSDB_DATA_TYPE_VARBINARY) { colDataSetVal(pDst, rowIndex, pVar->pz, isNull); From 6df387bb12242d117947bc6d70da39cbda0f0681 Mon Sep 17 00:00:00 2001 From: wangjiaming0909 <604227650@qq.com> Date: Mon, 1 Jul 2024 08:59:01 +0800 Subject: [PATCH 2/2] fix fill ts test case --- tests/system-test/2-query/last_row.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system-test/2-query/last_row.py b/tests/system-test/2-query/last_row.py index 13d1e47f76..395c754aa6 100644 --- a/tests/system-test/2-query/last_row.py +++ b/tests/system-test/2-query/last_row.py @@ -649,8 +649,8 @@ class TDTestCase: tdSql.checkData(0,1,None) tdSql.query(f"select ts , last_row(c1) ,c1 from (select ts , max(c1) c1 ,t1 from {dbname}.stb1 where ts >now -1h and ts now -1h and ts