提交 c35c114f 编写于 作者: H Haojun Liao

[td-225]refactor.

上级 a6d0bf4f
...@@ -780,8 +780,8 @@ int32_t parseIntervalClause(SSqlObj* pSql, SQueryInfo* pQueryInfo, SQuerySqlNode ...@@ -780,8 +780,8 @@ int32_t parseIntervalClause(SSqlObj* pSql, SQueryInfo* pQueryInfo, SQuerySqlNode
STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0); STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0);
STableComInfo tinfo = tscGetTableInfo(pTableMetaInfo->pTableMeta); STableComInfo tinfo = tscGetTableInfo(pTableMetaInfo->pTableMeta);
if (pQuerySqlNode->interval == NULL) { if (!TPARSER_HAS_TOKEN(pQuerySqlNode->interval.interval)) {
if (pQuerySqlNode->sliding != NULL) { if (TPARSER_HAS_TOKEN(pQuerySqlNode->sliding)) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg3); return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg3);
} }
...@@ -794,7 +794,7 @@ int32_t parseIntervalClause(SSqlObj* pSql, SQueryInfo* pQueryInfo, SQuerySqlNode ...@@ -794,7 +794,7 @@ int32_t parseIntervalClause(SSqlObj* pSql, SQueryInfo* pQueryInfo, SQuerySqlNode
} }
// interval is not null // interval is not null
SStrToken *t = &pQuerySqlNode->interval->interval; SStrToken *t = &pQuerySqlNode->interval.interval;
if (parseNatualDuration(t->z, t->n, &pQueryInfo->interval.interval, &pQueryInfo->interval.intervalUnit) != TSDB_CODE_SUCCESS) { if (parseNatualDuration(t->z, t->n, &pQueryInfo->interval.interval, &pQueryInfo->interval.intervalUnit) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_SQL; return TSDB_CODE_TSC_INVALID_SQL;
} }
...@@ -811,11 +811,11 @@ int32_t parseIntervalClause(SSqlObj* pSql, SQueryInfo* pQueryInfo, SQuerySqlNode ...@@ -811,11 +811,11 @@ int32_t parseIntervalClause(SSqlObj* pSql, SQueryInfo* pQueryInfo, SQuerySqlNode
} }
} }
if (parseIntervalOffset(pCmd, pQueryInfo, &pQuerySqlNode->interval->offset) != TSDB_CODE_SUCCESS) { if (parseIntervalOffset(pCmd, pQueryInfo, &pQuerySqlNode->interval.offset) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_SQL; return TSDB_CODE_TSC_INVALID_SQL;
} }
if (parseSlidingClause(pCmd, pQueryInfo, pQuerySqlNode->sliding) != TSDB_CODE_SUCCESS) { if (parseSlidingClause(pCmd, pQueryInfo, &pQuerySqlNode->sliding) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_SQL; return TSDB_CODE_TSC_INVALID_SQL;
} }
...@@ -830,12 +830,12 @@ int32_t parseSessionClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SQuerySqlNode ...@@ -830,12 +830,12 @@ int32_t parseSessionClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SQuerySqlNode
const char* msg4 = "invalid time window"; const char* msg4 = "invalid time window";
// no session window // no session window
if (pQuerySqlNode->sessionVal == NULL) { if (!TPARSER_HAS_TOKEN(pQuerySqlNode->sessionVal.gap)) {
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
SStrToken* col = &pQuerySqlNode->sessionVal->col; SStrToken* col = &pQuerySqlNode->sessionVal.col;
SStrToken* gap = &pQuerySqlNode->sessionVal->gap; SStrToken* gap = &pQuerySqlNode->sessionVal.gap;
char timeUnit = 0; char timeUnit = 0;
if (parseNatualDuration(gap->z, gap->n, &pQueryInfo->sessionWindow.gap, &timeUnit) != TSDB_CODE_SUCCESS) { if (parseNatualDuration(gap->z, gap->n, &pQueryInfo->sessionWindow.gap, &timeUnit) != TSDB_CODE_SUCCESS) {
...@@ -5439,9 +5439,9 @@ int32_t parseLimitClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t clauseIn ...@@ -5439,9 +5439,9 @@ int32_t parseLimitClause(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t clauseIn
const char* msg2 = "slimit/soffset can not apply to projection query"; const char* msg2 = "slimit/soffset can not apply to projection query";
// handle the limit offset value, validate the limit // handle the limit offset value, validate the limit
pQueryInfo->limit = *pQuerySqlNode->limit; pQueryInfo->limit = pQuerySqlNode->limit;
pQueryInfo->clauseLimit = pQueryInfo->limit.limit; pQueryInfo->clauseLimit = pQueryInfo->limit.limit;
pQueryInfo->slimit = *pQuerySqlNode->slimit; pQueryInfo->slimit = pQuerySqlNode->slimit;
tscDebug("%p limit:%" PRId64 ", offset:%" PRId64 " slimit:%" PRId64 ", soffset:%" PRId64, pSql, pQueryInfo->limit.limit, tscDebug("%p limit:%" PRId64 ", offset:%" PRId64 " slimit:%" PRId64 ", soffset:%" PRId64, pSql, pQueryInfo->limit.limit,
pQueryInfo->limit.offset, pQueryInfo->slimit.limit, pQueryInfo->slimit.offset); pQueryInfo->limit.offset, pQueryInfo->slimit.limit, pQueryInfo->slimit.offset);
...@@ -6840,7 +6840,8 @@ int32_t doValidateSqlNode(SSqlObj* pSql, SQuerySqlNode* pQuerySqlNode, int32_t i ...@@ -6840,7 +6840,8 @@ int32_t doValidateSqlNode(SSqlObj* pSql, SQuerySqlNode* pQuerySqlNode, int32_t i
} }
int32_t joinQuery = (pQuerySqlNode->from != NULL && taosArrayGetSize(pQuerySqlNode->from) > 2); int32_t joinQuery = (pQuerySqlNode->from != NULL && taosArrayGetSize(pQuerySqlNode->from) > 2);
int32_t timeWindowQuery = !(pQuerySqlNode->interval == NULL || pQuerySqlNode->sessionVal == NULL); int32_t timeWindowQuery =
(TPARSER_HAS_TOKEN(pQuerySqlNode->interval.interval) || TPARSER_HAS_TOKEN(pQuerySqlNode->sessionVal.gap));
if (parseSelectClause(pCmd, index, pQuerySqlNode->pSelectList, isSTable, joinQuery, timeWindowQuery) != TSDB_CODE_SUCCESS) { if (parseSelectClause(pCmd, index, pQuerySqlNode->pSelectList, isSTable, joinQuery, timeWindowQuery) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_TSC_INVALID_SQL; return TSDB_CODE_TSC_INVALID_SQL;
......
...@@ -50,29 +50,31 @@ extern char tTokenTypeSwitcher[13]; ...@@ -50,29 +50,31 @@ extern char tTokenTypeSwitcher[13];
} \ } \
} while (0) } while (0)
#define TPARSER_HAS_TOKEN(_t) ((_t).n > 0)
typedef struct SLimitVal { typedef struct SLimitVal {
int64_t limit; int64_t limit;
int64_t offset; int64_t offset;
} SLimitVal; } SLimitVal;
typedef struct SOrderVal { typedef struct SOrderVal {
uint32_t order; uint32_t order;
int32_t orderColId; int32_t orderColId;
} SOrderVal; } SOrderVal;
typedef struct tVariantListItem { typedef struct tVariantListItem {
tVariant pVar; tVariant pVar;
uint8_t sortOrder; uint8_t sortOrder;
} tVariantListItem; } tVariantListItem;
typedef struct SIntervalVal { typedef struct SIntervalVal {
SStrToken interval; SStrToken interval;
SStrToken offset; SStrToken offset;
} SIntervalVal; } SIntervalVal;
typedef struct SSessionWindowVal { typedef struct SSessionWindowVal {
SStrToken col; SStrToken col;
SStrToken gap; SStrToken gap;
} SSessionWindowVal; } SSessionWindowVal;
typedef struct SQuerySqlNode { typedef struct SQuerySqlNode {
...@@ -81,113 +83,113 @@ typedef struct SQuerySqlNode { ...@@ -81,113 +83,113 @@ typedef struct SQuerySqlNode {
struct tSqlExpr *pWhere; // where clause [optional] struct tSqlExpr *pWhere; // where clause [optional]
SArray *pGroupby; // groupby clause, only for tags[optional], SArray<tVariantListItem> SArray *pGroupby; // groupby clause, only for tags[optional], SArray<tVariantListItem>
SArray *pSortOrder; // orderby [optional], SArray<tVariantListItem> SArray *pSortOrder; // orderby [optional], SArray<tVariantListItem>
SIntervalVal *interval; // (interval, interval_offset) [optional]
SSessionWindowVal *sessionVal; // session window [optional]
SStrToken *sliding; // sliding window [optional]
SLimitVal *limit; // limit offset [optional]
SLimitVal *slimit; // group limit offset [optional]
SArray *fillType; // fill type[optional], SArray<tVariantListItem> SArray *fillType; // fill type[optional], SArray<tVariantListItem>
SIntervalVal interval; // (interval, interval_offset) [optional]
SSessionWindowVal sessionVal; // session window [optional]
SStrToken sliding; // sliding window [optional]
SLimitVal limit; // limit offset [optional]
SLimitVal slimit; // group limit offset [optional]
SStrToken sqlstr; // sql string in select clause SStrToken sqlstr; // sql string in select clause
} SQuerySqlNode; } SQuerySqlNode;
typedef struct SCreatedTableInfo { typedef struct SCreatedTableInfo {
SStrToken name; // table name token SStrToken name; // table name token
SStrToken stableName; // super table name token , for using clause SStrToken stableName; // super table name token , for using clause
SArray *pTagNames; // create by using super table, tag name SArray *pTagNames; // create by using super table, tag name
SArray *pTagVals; // create by using super table, tag value SArray *pTagVals; // create by using super table, tag value
char *fullname; // table full name char *fullname; // table full name
STagData tagdata; // true tag data, super table full name is in STagData STagData tagdata; // true tag data, super table full name is in STagData
int8_t igExist; // ignore if exists int8_t igExist; // ignore if exists
} SCreatedTableInfo; } SCreatedTableInfo;
typedef struct SCreateTableSql { typedef struct SCreateTableSql {
SStrToken name; // table name, create table [name] xxx SStrToken name; // table name, create table [name] xxx
int8_t type; // create normal table/from super table/ stream int8_t type; // create normal table/from super table/ stream
bool existCheck; bool existCheck;
struct { struct {
SArray *pTagColumns; // SArray<TAOS_FIELD> SArray *pTagColumns; // SArray<TAOS_FIELD>
SArray *pColumns; // SArray<TAOS_FIELD> SArray *pColumns; // SArray<TAOS_FIELD>
} colInfo; } colInfo;
SArray *childTableInfo; // SArray<SCreatedTableInfo> SArray *childTableInfo; // SArray<SCreatedTableInfo>
SQuerySqlNode *pSelect; SQuerySqlNode *pSelect;
} SCreateTableSql; } SCreateTableSql;
typedef struct SAlterTableInfo { typedef struct SAlterTableInfo {
SStrToken name; SStrToken name;
int16_t tableType; int16_t tableType;
int16_t type; int16_t type;
STagData tagData; STagData tagData;
SArray *pAddColumns; // SArray<TAOS_FIELD> SArray *pAddColumns; // SArray<TAOS_FIELD>
SArray *varList; // set t=val or: change src dst, SArray<tVariantListItem> SArray *varList; // set t=val or: change src dst, SArray<tVariantListItem>
} SAlterTableInfo; } SAlterTableInfo;
typedef struct SCreateDbInfo { typedef struct SCreateDbInfo {
SStrToken dbname; SStrToken dbname;
int32_t replica; int32_t replica;
int32_t cacheBlockSize; int32_t cacheBlockSize;
int32_t maxTablesPerVnode; int32_t maxTablesPerVnode;
int32_t numOfBlocks; int32_t numOfBlocks;
int32_t daysPerFile; int32_t daysPerFile;
int32_t minRowsPerBlock; int32_t minRowsPerBlock;
int32_t maxRowsPerBlock; int32_t maxRowsPerBlock;
int32_t fsyncPeriod; int32_t fsyncPeriod;
int64_t commitTime; int64_t commitTime;
int32_t walLevel; int32_t walLevel;
int32_t quorum; int32_t quorum;
int32_t compressionLevel; int32_t compressionLevel;
SStrToken precision; SStrToken precision;
bool ignoreExists; bool ignoreExists;
int8_t update; int8_t update;
int8_t cachelast; int8_t cachelast;
SArray *keep; SArray *keep;
int8_t dbType; int8_t dbType;
int16_t partitions; int16_t partitions;
} SCreateDbInfo; } SCreateDbInfo;
typedef struct SCreateAcctInfo { typedef struct SCreateAcctInfo {
int32_t maxUsers; int32_t maxUsers;
int32_t maxDbs; int32_t maxDbs;
int32_t maxTimeSeries; int32_t maxTimeSeries;
int32_t maxStreams; int32_t maxStreams;
int32_t maxPointsPerSecond; int32_t maxPointsPerSecond;
int64_t maxStorage; int64_t maxStorage;
int64_t maxQueryTime; int64_t maxQueryTime;
int32_t maxConnections; int32_t maxConnections;
SStrToken stat; SStrToken stat;
} SCreateAcctInfo; } SCreateAcctInfo;
typedef struct SShowInfo { typedef struct SShowInfo {
uint8_t showType; uint8_t showType;
SStrToken prefix; SStrToken prefix;
SStrToken pattern; SStrToken pattern;
} SShowInfo; } SShowInfo;
typedef struct SUserInfo { typedef struct SUserInfo {
SStrToken user; SStrToken user;
SStrToken passwd; SStrToken passwd;
SStrToken privilege; SStrToken privilege;
int16_t type; int16_t type;
} SUserInfo; } SUserInfo;
typedef struct SMiscInfo { typedef struct SMiscInfo {
SArray *a; // SArray<SStrToken> SArray *a; // SArray<SStrToken>
bool existsCheck; bool existsCheck;
int16_t dbType; int16_t dbType;
int16_t tableType; int16_t tableType;
SUserInfo user; SUserInfo user;
union { union {
SCreateDbInfo dbOpt; SCreateDbInfo dbOpt;
SCreateAcctInfo acctOpt; SCreateAcctInfo acctOpt;
SShowInfo showOpt; SShowInfo showOpt;
SStrToken id; SStrToken id;
}; };
} SMiscInfo; } SMiscInfo;
typedef struct SSubclauseInfo { // "UNION" multiple select sub-clause typedef struct SSubclauseInfo { // "UNION" multiple select sub-clause
SQuerySqlNode **pClause; SQuerySqlNode **pClause;
int32_t numOfClause; int32_t numOfClause;
} SSubclauseInfo; } SSubclauseInfo;
typedef struct SSqlInfo { typedef struct SSqlInfo {
...@@ -196,34 +198,34 @@ typedef struct SSqlInfo { ...@@ -196,34 +198,34 @@ typedef struct SSqlInfo {
SSubclauseInfo subclauseInfo; SSubclauseInfo subclauseInfo;
char msg[256]; char msg[256];
union { union {
SCreateTableSql *pCreateTableInfo; SCreateTableSql *pCreateTableInfo;
SAlterTableInfo *pAlterInfo; SAlterTableInfo *pAlterInfo;
SMiscInfo *pMiscInfo; SMiscInfo *pMiscInfo;
}; };
} SSqlInfo; } SSqlInfo;
typedef struct tSqlExpr { typedef struct tSqlExpr {
uint16_t type; // sql node type uint16_t type; // sql node type
uint32_t tokenId; // TK_LE: less than(binary expr) uint32_t tokenId; // TK_LE: less than(binary expr)
// the whole string of the function(col, param), while the function name is kept in token // the whole string of the function(col, param), while the function name is kept in token
SStrToken operand; SStrToken operand;
uint32_t functionId; // function id uint32_t functionId; // function id
SStrToken colInfo; // table column info SStrToken colInfo; // table column info
tVariant value; // the use input value tVariant value; // the use input value
SStrToken token; // original sql expr string SStrToken token; // original sql expr string
struct tSqlExpr *pLeft; // left child struct tSqlExpr *pLeft; // left child
struct tSqlExpr *pRight; // right child struct tSqlExpr *pRight; // right child
struct SArray *pParam; // function parameters list struct SArray *pParam; // function parameters list
} tSqlExpr; } tSqlExpr;
// used in select clause. select <SArray> from xxx // used in select clause. select <SArray> from xxx
typedef struct tSqlExprItem { typedef struct tSqlExprItem {
tSqlExpr *pNode; // The list of expressions tSqlExpr *pNode; // The list of expressions
char * aliasName; // alias name, null-terminated string char *aliasName; // alias name, null-terminated string
bool distinct; bool distinct;
} tSqlExprItem; } tSqlExprItem;
SArray *tVariantListAppend(SArray *pList, tVariant *pVar, uint8_t sortOrder); SArray *tVariantListAppend(SArray *pList, tVariant *pVar, uint8_t sortOrder);
...@@ -241,9 +243,8 @@ SArray *tSqlExprListAppend(SArray *pList, tSqlExpr *pNode, SStrToken *pDistinc ...@@ -241,9 +243,8 @@ SArray *tSqlExprListAppend(SArray *pList, tSqlExpr *pNode, SStrToken *pDistinc
void tSqlExprListDestroy(SArray *pList); void tSqlExprListDestroy(SArray *pList);
SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SArray *pFrom, tSqlExpr *pWhere, SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SArray *pFrom, tSqlExpr *pWhere,
SArray *pGroupby, SArray *pSortOrder, SIntervalVal *pInterval, SArray *pGroupby, SArray *pSortOrder, SIntervalVal *pInterval, SSessionWindowVal *ps,
SSessionWindowVal *pSession, SStrToken *pSliding, SArray *pFill, SLimitVal *pLimit, SStrToken *pSliding, SArray *pFill, SLimitVal *pLimit, SLimitVal *pgLimit);
SLimitVal *pGLimit);
SCreateTableSql *tSetCreateTableInfo(SArray *pCols, SArray *pTags, SQuerySqlNode *pSelect, int32_t type); SCreateTableSql *tSetCreateTableInfo(SArray *pCols, SArray *pTags, SQuerySqlNode *pSelect, int32_t type);
...@@ -251,7 +252,7 @@ SAlterTableInfo *tSetAlterTableInfo(SStrToken *pTableName, SArray *pCols, SArray ...@@ -251,7 +252,7 @@ SAlterTableInfo *tSetAlterTableInfo(SStrToken *pTableName, SArray *pCols, SArray
SCreatedTableInfo createNewChildTableInfo(SStrToken *pTableName, SArray *pTagNames, SArray *pTagVals, SStrToken *pToken, SStrToken* igExists); SCreatedTableInfo createNewChildTableInfo(SStrToken *pTableName, SArray *pTagNames, SArray *pTagVals, SStrToken *pToken, SStrToken* igExists);
void destroyAllSelectClause(SSubclauseInfo *pSql); void destroyAllSelectClause(SSubclauseInfo *pSql);
void doDestroyQuerySql(SQuerySqlNode *pSql); void destroyQuerySqlNode(SQuerySqlNode *pSql);
void freeCreateTableInfo(void* p); void freeCreateTableInfo(void* p);
SSqlInfo *setSqlInfo(SSqlInfo *pInfo, void *pSqlExprInfo, SStrToken *pTableName, int32_t type); SSqlInfo *setSqlInfo(SSqlInfo *pInfo, void *pSqlExprInfo, SStrToken *pTableName, int32_t type);
......
...@@ -547,38 +547,26 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) { ...@@ -547,38 +547,26 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) {
*/ */
SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SArray *pFrom, tSqlExpr *pWhere, SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SArray *pFrom, tSqlExpr *pWhere,
SArray *pGroupby, SArray *pSortOrder, SIntervalVal *pInterval, SSessionWindowVal *pSession, SArray *pGroupby, SArray *pSortOrder, SIntervalVal *pInterval, SSessionWindowVal *pSession,
SStrToken *pSliding, SArray *pFill, SLimitVal *pLimit, SLimitVal *pGLimit) { SStrToken *pSliding, SArray *pFill, SLimitVal *pLimit, SLimitVal *psLimit) {
assert(pSelectList != NULL); assert(pSelectList != NULL && pLimit != NULL && psLimit != NULL && pInterval != NULL && pSliding != NULL &&
pSession != NULL);
SQuerySqlNode *pQuery = calloc(1, sizeof(SQuerySqlNode)); SQuerySqlNode *pQuery = calloc(1, sizeof(SQuerySqlNode));
pQuery->sqlstr = *pSelectToken;
pQuery->sqlstr.n = (uint32_t)strlen(pQuery->sqlstr.z); // all later sql string are belonged to the stream sql
pQuery->pSelectList = pSelectList; // all later sql string are belonged to the stream sql
pQuery->from = pFrom; pQuery->sqlstr = *pSelectToken;
pQuery->pGroupby = pGroupby; pQuery->sqlstr.n = (uint32_t)strlen(pQuery->sqlstr.z);
pQuery->pSortOrder = pSortOrder;
pQuery->pWhere = pWhere;
if (pLimit != NULL) {
pQuery->limit = pLimit;
}
if (pGLimit != NULL) { pQuery->pSelectList = pSelectList;
pQuery->slimit = pGLimit; pQuery->from = pFrom;
} pQuery->pGroupby = pGroupby;
pQuery->pSortOrder = pSortOrder;
if (pInterval != NULL) { pQuery->pWhere = pWhere;
pQuery->interval = pInterval; pQuery->limit = *pLimit;
} pQuery->slimit = *psLimit;
pQuery->interval = *pInterval;
if (pSliding != NULL) { pQuery->sliding = *pSliding;
pQuery->sliding = pSliding; pQuery->sessionVal = *pSession;
}
if (pSession != NULL) {
pQuery->sessionVal = pSession;
}
pQuery->fillType = pFill; pQuery->fillType = pFill;
return pQuery; return pQuery;
...@@ -597,7 +585,7 @@ void freeCreateTableInfo(void* p) { ...@@ -597,7 +585,7 @@ void freeCreateTableInfo(void* p) {
tfree(pInfo->tagdata.data); tfree(pInfo->tagdata.data);
} }
void doDestroyQuerySql(SQuerySqlNode *pQuerySql) { void destroyQuerySqlNode(SQuerySqlNode *pQuerySql) {
if (pQuerySql == NULL) { if (pQuerySql == NULL) {
return; return;
} }
...@@ -631,7 +619,7 @@ void destroyAllSelectClause(SSubclauseInfo *pClause) { ...@@ -631,7 +619,7 @@ void destroyAllSelectClause(SSubclauseInfo *pClause) {
for(int32_t i = 0; i < pClause->numOfClause; ++i) { for(int32_t i = 0; i < pClause->numOfClause; ++i) {
SQuerySqlNode *pQuerySql = pClause->pClause[i]; SQuerySqlNode *pQuerySql = pClause->pClause[i];
doDestroyQuerySql(pQuerySql); destroyQuerySqlNode(pQuerySql);
} }
tfree(pClause->pClause); tfree(pClause->pClause);
...@@ -705,7 +693,7 @@ SAlterTableInfo *tSetAlterTableInfo(SStrToken *pTableName, SArray *pCols, SArray ...@@ -705,7 +693,7 @@ SAlterTableInfo *tSetAlterTableInfo(SStrToken *pTableName, SArray *pCols, SArray
} }
void* destroyCreateTableSql(SCreateTableSql* pCreate) { void* destroyCreateTableSql(SCreateTableSql* pCreate) {
doDestroyQuerySql(pCreate->pSelect); destroyQuerySqlNode(pCreate->pSelect);
taosArrayDestroy(pCreate->colInfo.pColumns); taosArrayDestroy(pCreate->colInfo.pColumns);
taosArrayDestroy(pCreate->colInfo.pTagColumns); taosArrayDestroy(pCreate->colInfo.pTagColumns);
......
...@@ -1425,7 +1425,7 @@ destroyCreateTableSql((yypminor->yy230)); ...@@ -1425,7 +1425,7 @@ destroyCreateTableSql((yypminor->yy230));
break; break;
case 235: /* select */ case 235: /* select */
{ {
doDestroyQuerySql((yypminor->yy342)); destroyQuerySqlNode((yypminor->yy342));
} }
break; break;
case 238: /* selcollist */ case 238: /* selcollist */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册