提交 07c4496f 编写于 作者: G Ganlin Zhao

[TD-14418]<fix>: TO_UNIXTIMESTAMP(q_nchar), core

上级 98fe7c0f
......@@ -2230,14 +2230,12 @@ void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
void convertStringToTimestamp(int16_t type, char *inputData, int64_t timePrec, int64_t *timeVal) {
int32_t charLen = varDataLen(inputData);
char *newColData;
char *newColData = calloc(1, charLen + 1);
if (type == TSDB_DATA_TYPE_BINARY) {
newColData = calloc(1, charLen + 1);
memcpy(newColData, varDataVal(inputData), charLen);
taosParseTime(newColData, timeVal, charLen, (int32_t)timePrec, 0);
tfree(newColData);
} else if (type == TSDB_DATA_TYPE_NCHAR) {
newColData = calloc(1, charLen * TSDB_NCHAR_SIZE + 1);
int len = taosUcs4ToMbs(varDataVal(inputData), charLen, newColData);
if (len < 0){
uError("convertStringToTimestamp taosUcs4ToMbs error");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册