Merge pull request #18549 from taosdata/fix/3.0_bugfix_wxy
fix: stream plan error
This commit is contained in:
commit
1d7a404450
|
@ -106,7 +106,7 @@ typedef struct SValueNode {
|
|||
char* p;
|
||||
} datum;
|
||||
int64_t typeData;
|
||||
char unit;
|
||||
int8_t unit;
|
||||
} SValueNode;
|
||||
|
||||
typedef struct SLeftValueNode {
|
||||
|
|
|
@ -2952,6 +2952,7 @@ static const char* jkValueDuration = "Duration";
|
|||
static const char* jkValueTranslate = "Translate";
|
||||
static const char* jkValueNotReserved = "NotReserved";
|
||||
static const char* jkValueIsNull = "IsNull";
|
||||
static const char* jkValueUnit = "Unit";
|
||||
static const char* jkValueDatum = "Datum";
|
||||
|
||||
static int32_t datumToJson(const void* pObj, SJson* pJson) {
|
||||
|
@ -3041,6 +3042,9 @@ static int32_t valueNodeToJson(const void* pObj, SJson* pJson) {
|
|||
if (TSDB_CODE_SUCCESS == code) {
|
||||
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) {
|
||||
code = datumToJson(pNode, pJson);
|
||||
}
|
||||
|
@ -3191,6 +3195,9 @@ static int32_t jsonToValueNode(const SJson* pJson, void* pObj) {
|
|||
if (TSDB_CODE_SUCCESS == code) {
|
||||
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) {
|
||||
code = jsonToDatum(pJson, pNode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue