Merge pull request #16697 from taosdata/fix/TD-18923
fix: fix now in alter tag value issue
This commit is contained in:
commit
cada689bff
|
@ -475,7 +475,6 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, uint64_t suid, SArray
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
terrno = code;
|
terrno = code;
|
||||||
qError("failed to create result, reason:%s", tstrerror(code));
|
qError("failed to create result, reason:%s", tstrerror(code));
|
||||||
terrno = code;
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6604,7 +6604,17 @@ static int32_t buildUpdateTagValReq(STranslateContext* pCxt, SAlterTableStmt* pS
|
||||||
pReq->colId = pSchema->colId;
|
pReq->colId = pSchema->colId;
|
||||||
|
|
||||||
SDataType targetDt = schemaToDataType(pTableMeta->tableInfo.precision, pSchema);
|
SDataType targetDt = schemaToDataType(pTableMeta->tableInfo.precision, pSchema);
|
||||||
if (DEAL_RES_ERROR == translateValueImpl(pCxt, pStmt->pVal, targetDt, true)) {
|
|
||||||
|
if (QUERY_NODE_VALUE != pStmt->pVal->node.type) {
|
||||||
|
SValueNode *pVal = NULL;
|
||||||
|
pCxt->errCode = createTagValFromExpr(pCxt, targetDt, (SNode*)pStmt->pVal, &pVal);
|
||||||
|
if (pCxt->errCode) {
|
||||||
|
return pCxt->errCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
nodesDestroyNode((SNode*)pStmt->pVal);
|
||||||
|
pStmt->pVal = pVal;
|
||||||
|
} else if (DEAL_RES_ERROR == translateValueImpl(pCxt, pStmt->pVal, targetDt, true)) {
|
||||||
return pCxt->errCode;
|
return pCxt->errCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,9 @@ void simpleTest() {
|
||||||
|
|
||||||
ASSERT_EQ(getTotalBufSize(pBuf), 1024);
|
ASSERT_EQ(getTotalBufSize(pBuf), 1024);
|
||||||
|
|
||||||
SIDList list = getDataBufPagesIdList(pBuf, groupId);
|
SIDList list = getDataBufPagesIdList(pBuf);
|
||||||
ASSERT_EQ(taosArrayGetSize(list), 1);
|
ASSERT_EQ(taosArrayGetSize(list), 1);
|
||||||
ASSERT_EQ(getNumOfBufGroupId(pBuf), 1);
|
//ASSERT_EQ(getNumOfBufGroupId(pBuf), 1);
|
||||||
|
|
||||||
releaseBufPage(pBuf, pBufPage);
|
releaseBufPage(pBuf, pBufPage);
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ void writeDownTest() {
|
||||||
SFilePage* pBufPagex = static_cast<SFilePage*>(getBufPage(pBuf, writePageId));
|
SFilePage* pBufPagex = static_cast<SFilePage*>(getBufPage(pBuf, writePageId));
|
||||||
ASSERT_EQ(*(int32_t*)pBufPagex->data, nx);
|
ASSERT_EQ(*(int32_t*)pBufPagex->data, nx);
|
||||||
|
|
||||||
SArray* pa = getDataBufPagesIdList(pBuf, groupId);
|
SArray* pa = getDataBufPagesIdList(pBuf);
|
||||||
ASSERT_EQ(taosArrayGetSize(pa), 5);
|
ASSERT_EQ(taosArrayGetSize(pa), 5);
|
||||||
|
|
||||||
destroyDiskbasedBuf(pBuf);
|
destroyDiskbasedBuf(pBuf);
|
||||||
|
@ -152,7 +152,7 @@ void recyclePageTest() {
|
||||||
|
|
||||||
SFilePage* pBufPagex1 = static_cast<SFilePage*>(getBufPage(pBuf, 1));
|
SFilePage* pBufPagex1 = static_cast<SFilePage*>(getBufPage(pBuf, 1));
|
||||||
|
|
||||||
SArray* pa = getDataBufPagesIdList(pBuf, groupId);
|
SArray* pa = getDataBufPagesIdList(pBuf);
|
||||||
ASSERT_EQ(taosArrayGetSize(pa), 6);
|
ASSERT_EQ(taosArrayGetSize(pa), 6);
|
||||||
|
|
||||||
destroyDiskbasedBuf(pBuf);
|
destroyDiskbasedBuf(pBuf);
|
||||||
|
|
Loading…
Reference in New Issue