未验证 提交 1d7a4044 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #18549 from taosdata/fix/3.0_bugfix_wxy

fix: stream plan error
...@@ -106,7 +106,7 @@ typedef struct SValueNode { ...@@ -106,7 +106,7 @@ typedef struct SValueNode {
char* p; char* p;
} datum; } datum;
int64_t typeData; int64_t typeData;
char unit; int8_t unit;
} SValueNode; } SValueNode;
typedef struct SLeftValueNode { typedef struct SLeftValueNode {
......
...@@ -2952,6 +2952,7 @@ static const char* jkValueDuration = "Duration"; ...@@ -2952,6 +2952,7 @@ static const char* jkValueDuration = "Duration";
static const char* jkValueTranslate = "Translate"; static const char* jkValueTranslate = "Translate";
static const char* jkValueNotReserved = "NotReserved"; static const char* jkValueNotReserved = "NotReserved";
static const char* jkValueIsNull = "IsNull"; static const char* jkValueIsNull = "IsNull";
static const char* jkValueUnit = "Unit";
static const char* jkValueDatum = "Datum"; static const char* jkValueDatum = "Datum";
static int32_t datumToJson(const void* pObj, SJson* pJson) { static int32_t datumToJson(const void* pObj, SJson* pJson) {
...@@ -3041,6 +3042,9 @@ static int32_t valueNodeToJson(const void* pObj, SJson* pJson) { ...@@ -3041,6 +3042,9 @@ static int32_t valueNodeToJson(const void* pObj, SJson* pJson) {
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = tjsonAddBoolToObject(pJson, jkValueIsNull, pNode->isNull); code = tjsonAddBoolToObject(pJson, jkValueIsNull, pNode->isNull);
} }
if (TSDB_CODE_SUCCESS == code) {
code = tjsonAddIntegerToObject(pJson, jkValueUnit, pNode->unit);
}
if (TSDB_CODE_SUCCESS == code && pNode->translate && !pNode->isNull) { if (TSDB_CODE_SUCCESS == code && pNode->translate && !pNode->isNull) {
code = datumToJson(pNode, pJson); code = datumToJson(pNode, pJson);
} }
...@@ -3191,6 +3195,9 @@ static int32_t jsonToValueNode(const SJson* pJson, void* pObj) { ...@@ -3191,6 +3195,9 @@ static int32_t jsonToValueNode(const SJson* pJson, void* pObj) {
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = tjsonGetBoolValue(pJson, jkValueIsNull, &pNode->isNull); code = tjsonGetBoolValue(pJson, jkValueIsNull, &pNode->isNull);
} }
if (TSDB_CODE_SUCCESS == code) {
code = tjsonGetTinyIntValue(pJson, jkValueUnit, &pNode->unit);
}
if (TSDB_CODE_SUCCESS == code && pNode->translate && !pNode->isNull) { if (TSDB_CODE_SUCCESS == code && pNode->translate && !pNode->isNull) {
code = jsonToDatum(pJson, pNode); code = jsonToDatum(pJson, pNode);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册