Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/libs/function/src/builtinsimpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ int32_t gconcatFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultI
}

SGconcatRes* pRes = GET_ROWCELL_INTERBUF(pResultInfo);
(void)memset(pRes, 0, sizeof(SStdRes));
(void)memset(pRes, 0, sizeof(SGconcatRes));

// pRes->separator = varDataVal(pCtx->param[0].param.pz);

Expand Down
4 changes: 4 additions & 0 deletions test/cases/11-Functions/02-Aggregate/test_agg_gconcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def smoking(self):
tdSql.prepare(db, drop=True)
tdSql.execute(f"use {db}")
tdSql.execute(f"create table {tb} (ts timestamp, tbcol varchar(10))")
tdSql.execute(f"CREATE STABLE s_ptr_data (ts TIMESTAMP, test_value DOUBLE, test_flag INT, hi_limit DOUBLE, lo_limit DOUBLE) TAGS (factory VARCHAR(32), fileid VARCHAR(64), testnum INT, testtxt VARCHAR(256), headnum INT, sitenum INT, productid VARCHAR(64), lotid VARCHAR(64), sublotid VARCHAR(64), jobname VARCHAR(128), flowid VARCHAR(32), datatype VARCHAR(10), nodename VARCHAR(32))")

x = 0
while x < rowNum:
Expand All @@ -49,3 +50,6 @@ def smoking(self):
tdLog.info(f"===> {tdSql.getData(0,0)}")
tdSql.checkRows(1)
tdSql.checkData(0, 0, '0?1?2?3?4?5?6?7?8?9')

tdSql.query(f"SELECT _wstart as ws, AVG(test_value) as avg_test_value, GROUP_CONCAT(CAST(test_value AS VARCHAR) , ',') FROM s_ptr_data PARTITION BY lotId, subLotId, headNum, siteNum, jobName, testTxt, testNum count_window(100) ;")
tdSql.checkRows(0)
Loading