fix: fix now in alter tag value
This commit is contained in:
parent
0c42158194
commit
4a563b6d50
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6603,11 +6603,32 @@ static int32_t buildUpdateTagValReq(STranslateContext* pCxt, SAlterTableStmt* pS
|
||||||
}
|
}
|
||||||
pReq->colId = pSchema->colId;
|
pReq->colId = pSchema->colId;
|
||||||
|
|
||||||
|
SValueNode *pVal = NULL;
|
||||||
|
|
||||||
SDataType targetDt = schemaToDataType(pTableMeta->tableInfo.precision, pSchema);
|
SDataType targetDt = schemaToDataType(pTableMeta->tableInfo.precision, pSchema);
|
||||||
if (DEAL_RES_ERROR == translateValueImpl(pCxt, pStmt->pVal, targetDt, true)) {
|
pCxt->errCode = createTagValFromExpr(pCxt, targetDt, (SNode*)pStmt->pVal, &pVal);
|
||||||
|
if (pCxt->errCode) {
|
||||||
return pCxt->errCode;
|
return pCxt->errCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (QUERY_NODE_FUNCTION == pStmt->pVal->node.type) {
|
||||||
|
pCxt->errCode = getFuncInfo(pCxt, (SFunctionNode*)pStmt->pVal);
|
||||||
|
if (pCxt->errCode) {
|
||||||
|
return pCxt->errCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DEAL_RES_ERROR == translateFunctionImpl(pCxt, (SFunctionNode**)&pStmt->pVal)) {
|
||||||
|
return pCxt->errCode;
|
||||||
|
}
|
||||||
|
} else if (DEAL_RES_ERROR == translateValueImpl(pCxt, pStmt->pVal, targetDt, true)) {
|
||||||
|
return pCxt->errCode;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
nodesDestroyNode((SNode*)pStmt->pVal);
|
||||||
|
|
||||||
|
pStmt->pVal = pVal;
|
||||||
pReq->tagType = targetDt.type;
|
pReq->tagType = targetDt.type;
|
||||||
if (targetDt.type == TSDB_DATA_TYPE_JSON) {
|
if (targetDt.type == TSDB_DATA_TYPE_JSON) {
|
||||||
if (pStmt->pVal->literal &&
|
if (pStmt->pVal->literal &&
|
||||||
|
|
Loading…
Reference in New Issue