提交 71718ff3 编写于 作者: H Haojun Liao

Merge branch 'develop' into feature/query

......@@ -6374,13 +6374,13 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
}
SArray* pSrcMeterName = pInfo->pCreateTableInfo->pSelect->from;
if (pSrcMeterName == NULL || taosArrayGetSize(pSrcMeterName) == 0) {
SFromInfo* pFromInfo = pInfo->pCreateTableInfo->pSelect->from;
if (pFromInfo == NULL || taosArrayGetSize(pFromInfo->tableList) == 0) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg6);
}
tVariantListItem* p1 = taosArrayGet(pSrcMeterName, 0);
SStrToken srcToken = {.z = p1->pVar.pz, .n = p1->pVar.nLen, .type = TK_STRING};
STableNamePair* p1 = taosArrayGet(pFromInfo->tableList, 0);
SStrToken srcToken = {.z = p1->name.z, .n = p1->name.n, .type = TK_STRING};
if (tscValidateName(&srcToken) != TSDB_CODE_SUCCESS) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1);
}
......@@ -6498,7 +6498,7 @@ static int32_t checkQueryRangeForFill(SSqlCmd* pCmd, SQueryInfo* pQueryInfo) {
}
int32_t doValidateSqlNode(SSqlObj* pSql, SQuerySqlNode* pQuerySqlNode, int32_t index) {
assert(pQuerySqlNode != NULL && (pQuerySqlNode->from == NULL || taosArrayGetSize(pQuerySqlNode->from) > 0));
assert(pQuerySqlNode != NULL && (pQuerySqlNode->from == NULL || taosArrayGetSize(pQuerySqlNode->from->tableList) > 0));
const char* msg0 = "invalid table name";
const char* msg1 = "point interpolation query needs timestamp";
......@@ -6508,6 +6508,7 @@ int32_t doValidateSqlNode(SSqlObj* pSql, SQuerySqlNode* pQuerySqlNode, int32_t i
const char* msg5 = "too many columns in selection clause";
const char* msg6 = "too many tables in from clause";
const char* msg7 = "invalid table alias name";
const char* msg8 = "alias name too long";
int32_t code = TSDB_CODE_SUCCESS;
......@@ -6539,71 +6540,71 @@ int32_t doValidateSqlNode(SSqlObj* pSql, SQuerySqlNode* pQuerySqlNode, int32_t i
return doLocalQueryProcess(pCmd, pQueryInfo, pQuerySqlNode);
}
size_t fromSize = taosArrayGetSize(pQuerySqlNode->from);
if (fromSize > TSDB_MAX_JOIN_TABLE_NUM * 2) {
size_t fromSize = taosArrayGetSize(pQuerySqlNode->from->tableList);
if (fromSize > TSDB_MAX_JOIN_TABLE_NUM) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg4);
}
pQueryInfo->command = TSDB_SQL_SELECT;
if (fromSize > 4) {
if (fromSize > 2) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg6);
}
// set all query tables, which are maybe more than one.
for (int32_t i = 0; i < fromSize; ) {
tVariantListItem* item = taosArrayGet(pQuerySqlNode->from, i);
tVariant* pTableItem = &item->pVar;
for (int32_t i = 0; i < fromSize; ++i) {
STableNamePair* item = taosArrayGet(pQuerySqlNode->from->tableList, i);
SStrToken* pTableItem = &item->name;
if (pTableItem->nType != TSDB_DATA_TYPE_BINARY) {
if (pTableItem->type != TSDB_DATA_TYPE_BINARY) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg0);
}
pTableItem->nLen = strdequote(pTableItem->pz);
tscDequoteAndTrimToken(pTableItem);
SStrToken tableName = {.z = pTableItem->pz, .n = pTableItem->nLen, .type = TK_STRING};
SStrToken tableName = {.z = pTableItem->z, .n = pTableItem->n, .type = TK_STRING};
if (tscValidateName(&tableName) != TSDB_CODE_SUCCESS) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg0);
}
if (pQueryInfo->numOfTables <= i/2) { // more than one table
if (pQueryInfo->numOfTables <= i) { // more than one table
tscAddEmptyMetaInfo(pQueryInfo);
}
STableMetaInfo* pTableMetaInfo1 = tscGetMetaInfo(pQueryInfo, i/2);
SStrToken t = {.type = TSDB_DATA_TYPE_BINARY, .n = pTableItem->nLen, .z = pTableItem->pz};
code = tscSetTableFullName(pTableMetaInfo1, &t, pSql);
STableMetaInfo* pTableMetaInfo1 = tscGetMetaInfo(pQueryInfo, i);
code = tscSetTableFullName(pTableMetaInfo1, pTableItem, pSql);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
tVariantListItem* p1 = taosArrayGet(pQuerySqlNode->from, i + 1);
if (p1->pVar.nType != TSDB_DATA_TYPE_BINARY) {
SStrToken* aliasName = &item->aliasName;
if (TPARSER_HAS_TOKEN(*aliasName)) {
if (aliasName->type != TSDB_DATA_TYPE_BINARY) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg7);
}
SStrToken aliasName = {.z = p1->pVar.pz, .n = p1->pVar.nLen, .type = TK_STRING};
if (tscValidateName(&aliasName) != TSDB_CODE_SUCCESS) {
tscDequoteAndTrimToken(aliasName);
SStrToken aliasName1 = {.z = aliasName->z, .n = aliasName->n, .type = TK_STRING};
if (tscValidateName(&aliasName1) != TSDB_CODE_SUCCESS) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg7);
}
// has no table alias name
if (memcmp(pTableItem->pz, p1->pVar.pz, p1->pVar.nLen) == 0) {
strncpy(pTableMetaInfo1->aliasName, tNameGetTableName(&pTableMetaInfo1->name), tListLen(pTableMetaInfo->aliasName));
if (aliasName1.n >= TSDB_TABLE_NAME_LEN) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg8);
}
strncpy(pTableMetaInfo1->aliasName, aliasName1.z, aliasName1.n);
} else {
tstrncpy(pTableMetaInfo1->aliasName, p1->pVar.pz, sizeof(pTableMetaInfo1->aliasName));
strncpy(pTableMetaInfo1->aliasName, tNameGetTableName(&pTableMetaInfo1->name), tListLen(pTableMetaInfo1->aliasName));
}
code = tscGetTableMeta(pSql, pTableMetaInfo1);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
i += 2;
}
assert(pQueryInfo->numOfTables == taosArrayGetSize(pQuerySqlNode->from) / 2);
assert(pQueryInfo->numOfTables == taosArrayGetSize(pQuerySqlNode->from->tableList));
bool isSTable = false;
if (UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo)) {
......@@ -6637,12 +6638,12 @@ int32_t doValidateSqlNode(SSqlObj* pSql, SQuerySqlNode* pQuerySqlNode, int32_t i
pQueryInfo->window.ekey = pQueryInfo->window.ekey / 1000;
}
} else { // set the time rang
if (taosArrayGetSize(pQuerySqlNode->from) > 2) { // it is a join query, no wher clause is not allowed.
if (taosArrayGetSize(pQuerySqlNode->from->tableList) > 1) { // it is a join query, no where clause is not allowed.
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), "condition missing for join query ");
}
}
int32_t joinQuery = (pQuerySqlNode->from != NULL && taosArrayGetSize(pQuerySqlNode->from) > 2);
int32_t joinQuery = (pQuerySqlNode->from != NULL && taosArrayGetSize(pQuerySqlNode->from->tableList) > 1);
int32_t timeWindowQuery =
(TPARSER_HAS_TOKEN(pQuerySqlNode->interval.interval) || TPARSER_HAS_TOKEN(pQuerySqlNode->sessionVal.gap));
......
......@@ -39,6 +39,11 @@ enum SQL_NODE_TYPE {
SQL_NODE_EXPR = 4,
};
enum SQL_NODE_FROM_TYPE {
SQL_NODE_FROM_SUBQUERY = 1,
SQL_NODE_FROM_NAMELIST = 2,
};
extern char tTokenTypeSwitcher[13];
#define toTSDBType(x) \
......@@ -78,9 +83,11 @@ typedef struct SSessionWindowVal {
SStrToken gap;
} SSessionWindowVal;
struct SFromInfo;
typedef struct SQuerySqlNode {
struct SArray *pSelectList; // select clause
SArray *from; // from clause SArray<SQuerySqlNode>
struct SFromInfo *from; // from clause SArray<SQuerySqlNode>
struct tSqlExpr *pWhere; // where clause [optional]
SArray *pGroupby; // groupby clause, only for tags[optional], SArray<tVariantListItem>
SArray *pSortOrder; // orderby [optional], SArray<tVariantListItem>
......@@ -93,6 +100,24 @@ typedef struct SQuerySqlNode {
SStrToken sqlstr; // sql string in select clause
} SQuerySqlNode;
typedef struct STableNamePair {
SStrToken name;
SStrToken aliasName;
} STableNamePair;
typedef struct SSubclauseInfo { // "UNION" multiple select sub-clause
SQuerySqlNode **pClause;
int32_t numOfClause;
} SSubclauseInfo;
typedef struct SFromInfo {
int32_t type; // nested query|table name list
union {
SSubclauseInfo *pNode;
SArray *tableList; // SArray<STableNamePair>
};
} SFromInfo;
typedef struct SCreatedTableInfo {
SStrToken name; // table name token
SStrToken stableName; // super table name token , for using clause
......@@ -188,11 +213,6 @@ typedef struct SMiscInfo {
};
} SMiscInfo;
typedef struct SSubclauseInfo { // "UNION" multiple select sub-clause
SQuerySqlNode **pClause;
int32_t numOfClause;
} SSubclauseInfo;
typedef struct SSqlInfo {
int32_t type;
bool valid;
......@@ -233,6 +253,10 @@ SArray *tVariantListAppend(SArray *pList, tVariant *pVar, uint8_t sortOrder);
SArray *tVariantListInsert(SArray *pList, tVariant *pVar, uint8_t sortOrder, int32_t index);
SArray *tVariantListAppendToken(SArray *pList, SStrToken *pAliasToken, uint8_t sortOrder);
SFromInfo *setTableNameList(SFromInfo* pFromInfo, SStrToken *pName, SStrToken* pAlias);
SFromInfo *setSubquery(SFromInfo* pFromInfo, SQuerySqlNode *pSqlNode);
void *destroyFromInfo(SFromInfo* pFromInfo);
// sql expr leaf node
tSqlExpr *tSqlExprCreateIdValue(SStrToken *pToken, int32_t optrType);
tSqlExpr *tSqlExprCreateFunction(SArray *pParam, SStrToken *pFuncToken, SStrToken *endToken, int32_t optType);
......@@ -246,7 +270,7 @@ void tSqlExprDestroy(tSqlExpr *pExpr);
SArray *tSqlExprListAppend(SArray *pList, tSqlExpr *pNode, SStrToken *pDistinct, SStrToken *pToken);
void tSqlExprListDestroy(SArray *pList);
SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SArray *pFrom, tSqlExpr *pWhere,
SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SFromInfo *pFrom, tSqlExpr *pWhere,
SArray *pGroupby, SArray *pSortOrder, SIntervalVal *pInterval, SSessionWindowVal *ps,
SStrToken *pSliding, SArray *pFill, SLimitVal *pLimit, SLimitVal *pgLimit);
......
......@@ -2366,13 +2366,13 @@ static int32_t doTSJoinFilter(SQueryRuntimeEnv *pRuntimeEnv, TSKEY key, bool asc
}
void filterRowsInDataBlock(SQueryRuntimeEnv* pRuntimeEnv, SSingleColumnFilterInfo* pFilterInfo, int32_t numOfFilterCols,
SSDataBlock* pBlock, STSBuf* pTsBuf, bool ascQuery) {
SSDataBlock* pBlock, bool ascQuery) {
int32_t numOfRows = pBlock->info.rows;
int8_t *p = calloc(numOfRows, sizeof(int8_t));
bool all = true;
if (pTsBuf != NULL) {
if (pRuntimeEnv->pTsBuf != NULL) {
SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, 0);
TSKEY* k = (TSKEY*) pColInfoData->pData;
......@@ -2393,6 +2393,9 @@ void filterRowsInDataBlock(SQueryRuntimeEnv* pRuntimeEnv, SSingleColumnFilterInf
break;
}
}
// save the cursor status
pRuntimeEnv->pQuery->current->cur = tsBufGetCursor(pRuntimeEnv->pTsBuf);
} else {
for (int32_t i = 0; i < numOfRows; ++i) {
bool qualified = false;
......@@ -2653,8 +2656,7 @@ int32_t loadDataBlockOnDemand(SQueryRuntimeEnv* pRuntimeEnv, STableScanInfo* pTa
doSetFilterColumnInfo(pQuery, pBlock);
if (pQuery->numOfFilterCols > 0 || pRuntimeEnv->pTsBuf != NULL) {
filterRowsInDataBlock(pRuntimeEnv, pQuery->pFilterInfo, pQuery->numOfFilterCols, pBlock, pRuntimeEnv->pTsBuf,
ascQuery);
filterRowsInDataBlock(pRuntimeEnv, pQuery->pFilterInfo, pQuery->numOfFilterCols, pBlock, ascQuery);
}
}
......
......@@ -443,6 +443,52 @@ SArray *tVariantListInsert(SArray *pList, tVariant *pVar, uint8_t sortOrder, int
return pList;
}
SFromInfo *setTableNameList(SFromInfo* pFromInfo, SStrToken *pName, SStrToken* pAlias) {
if (pFromInfo == NULL) {
pFromInfo = calloc(1, sizeof(SFromInfo));
pFromInfo->tableList = taosArrayInit(4, sizeof(STableNamePair));
}
pFromInfo->type = SQL_NODE_FROM_NAMELIST;
STableNamePair p = {.name = *pName};
if (pAlias != NULL) {
p.aliasName = *pAlias;
} else {
TPARSER_SET_NONE_TOKEN(p.aliasName);
}
taosArrayPush(pFromInfo->tableList, &p);
return pFromInfo;
}
SFromInfo *setSubquery(SFromInfo* pFromInfo, SQuerySqlNode* pSqlNode) {
if (pFromInfo == NULL) {
pFromInfo = calloc(1, sizeof(SFromInfo));
}
pFromInfo->type = SQL_NODE_FROM_SUBQUERY;
pFromInfo->pNode->pClause[pFromInfo->pNode->numOfClause - 1] = pSqlNode;
return pFromInfo;
}
void* destroyFromInfo(SFromInfo* pFromInfo) {
if (pFromInfo == NULL) {
return NULL;
}
if (pFromInfo->type == SQL_NODE_FROM_NAMELIST) {
taosArrayDestroy(pFromInfo->tableList);
} else {
destroyAllSelectClause(pFromInfo->pNode);
}
tfree(pFromInfo);
return NULL;
}
void tSetDbName(SStrToken *pCpxName, SStrToken *pDb) {
pCpxName->type = pDb->type;
pCpxName->z = pDb->z;
......@@ -582,9 +628,10 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) {
/*
* extract the select info out of sql string
*/
SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SArray *pFrom, tSqlExpr *pWhere,
SArray *pGroupby, SArray *pSortOrder, SIntervalVal *pInterval, SSessionWindowVal *pSession,
SStrToken *pSliding, SArray *pFill, SLimitVal *pLimit, SLimitVal *psLimit) {
SQuerySqlNode *tSetQuerySqlNode(SStrToken *pSelectToken, SArray *pSelectList, SFromInfo *pFrom, tSqlExpr *pWhere,
SArray *pGroupby, SArray *pSortOrder, SIntervalVal *pInterval,
SSessionWindowVal *pSession, SStrToken *pSliding, SArray *pFill, SLimitVal *pLimit,
SLimitVal *psLimit) {
assert(pSelectList != NULL);
SQuerySqlNode *pSqlNode = calloc(1, sizeof(SQuerySqlNode));
......@@ -668,8 +715,7 @@ void destroyQuerySqlNode(SQuerySqlNode *pQuerySql) {
taosArrayDestroyEx(pQuerySql->pGroupby, freeVariant);
pQuerySql->pGroupby = NULL;
taosArrayDestroyEx(pQuerySql->from, freeVariant);
pQuerySql->from = NULL;
pQuerySql->from = destroyFromInfo(pQuerySql->from);
taosArrayDestroyEx(pQuerySql->fillType, freeVariant);
pQuerySql->fillType = NULL;
......
......@@ -104,9 +104,9 @@ typedef union {
int yyinit;
ParseTOKENTYPE yy0;
SCreatedTableInfo yy96;
SFromInfo* yy162;
tSqlExpr* yy178;
SCreateAcctInfo yy187;
SCreateTableSql* yy230;
SArray* yy285;
TAOS_FIELD yy295;
SQuerySqlNode* yy342;
......@@ -114,6 +114,7 @@ typedef union {
SIntervalVal yy376;
SLimitVal yy438;
int yy460;
SCreateTableSql* yy470;
SSubclauseInfo* yy513;
SSessionWindowVal yy523;
int64_t yy525;
......@@ -203,76 +204,76 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (675)
#define YY_ACTTAB_COUNT (676)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 910, 549, 201, 310, 205, 138, 938, 3, 166, 550,
/* 10 */ 768, 312, 17, 47, 48, 138, 51, 52, 30, 180,
/* 0 */ 910, 549, 201, 310, 205, 139, 937, 3, 166, 550,
/* 10 */ 768, 312, 17, 47, 48, 139, 51, 52, 30, 180,
/* 20 */ 213, 41, 180, 50, 260, 55, 53, 57, 54, 1016,
/* 30 */ 916, 208, 1017, 46, 45, 178, 180, 44, 43, 42,
/* 40 */ 47, 48, 219, 51, 52, 207, 1017, 213, 41, 549,
/* 50 */ 50, 260, 55, 53, 57, 54, 927, 550, 184, 203,
/* 60 */ 46, 45, 913, 218, 44, 43, 42, 48, 935, 51,
/* 50 */ 50, 260, 55, 53, 57, 54, 928, 550, 184, 202,
/* 60 */ 46, 45, 913, 218, 44, 43, 42, 48, 934, 51,
/* 70 */ 52, 240, 968, 213, 41, 549, 50, 260, 55, 53,
/* 80 */ 57, 54, 969, 550, 255, 220, 46, 45, 82, 916,
/* 80 */ 57, 54, 969, 550, 255, 220, 46, 45, 276, 916,
/* 90 */ 44, 43, 42, 503, 504, 505, 506, 507, 508, 509,
/* 100 */ 510, 511, 512, 513, 514, 515, 311, 628, 815, 230,
/* 110 */ 70, 916, 165, 47, 48, 30, 51, 52, 276, 30,
/* 120 */ 213, 41, 904, 50, 260, 55, 53, 57, 54, 44,
/* 130 */ 43, 42, 714, 46, 45, 286, 285, 44, 43, 42,
/* 140 */ 47, 49, 824, 51, 52, 224, 165, 213, 41, 24,
/* 150 */ 50, 260, 55, 53, 57, 54, 216, 36, 902, 913,
/* 100 */ 510, 511, 512, 513, 514, 515, 311, 628, 84, 230,
/* 110 */ 69, 916, 296, 47, 48, 30, 51, 52, 1013, 30,
/* 120 */ 213, 41, 549, 50, 260, 55, 53, 57, 54, 1012,
/* 130 */ 550, 306, 714, 46, 45, 286, 285, 44, 43, 42,
/* 140 */ 47, 49, 904, 51, 52, 224, 1011, 213, 41, 667,
/* 150 */ 50, 260, 55, 53, 57, 54, 216, 916, 902, 913,
/* 160 */ 46, 45, 222, 912, 44, 43, 42, 23, 274, 305,
/* 170 */ 304, 273, 272, 271, 303, 270, 302, 301, 300, 269,
/* 180 */ 299, 298, 876, 138, 864, 865, 866, 867, 868, 869,
/* 180 */ 299, 298, 876, 139, 864, 865, 866, 867, 868, 869,
/* 190 */ 870, 871, 872, 873, 874, 875, 877, 878, 51, 52,
/* 200 */ 816, 306, 213, 41, 165, 50, 260, 55, 53, 57,
/* 210 */ 54, 296, 18, 79, 226, 46, 45, 283, 282, 44,
/* 220 */ 43, 42, 212, 727, 927, 131, 718, 916, 721, 189,
/* 230 */ 724, 223, 212, 727, 278, 190, 718, 276, 721, 202,
/* 240 */ 724, 115, 114, 188, 899, 900, 29, 903, 257, 233,
/* 250 */ 76, 309, 308, 123, 209, 210, 237, 236, 259, 138,
/* 260 */ 23, 225, 305, 304, 209, 210, 69, 303, 979, 302,
/* 270 */ 301, 300, 24, 299, 298, 884, 102, 30, 882, 883,
/* 280 */ 36, 296, 78, 885, 1013, 887, 888, 886, 245, 889,
/* 290 */ 890, 55, 53, 57, 54, 71, 914, 261, 901, 46,
/* 300 */ 45, 668, 239, 44, 43, 42, 100, 105, 30, 196,
/* 310 */ 1, 153, 94, 104, 110, 113, 103, 720, 217, 723,
/* 320 */ 129, 913, 107, 5, 155, 56, 77, 30, 36, 33,
/* 330 */ 154, 89, 84, 88, 30, 56, 173, 169, 726, 719,
/* 340 */ 30, 722, 171, 168, 118, 117, 116, 12, 726, 279,
/* 350 */ 211, 81, 913, 149, 725, 660, 46, 45, 695, 696,
/* 360 */ 44, 43, 42, 242, 725, 243, 665, 652, 280, 31,
/* 370 */ 649, 913, 650, 25, 651, 284, 680, 716, 913, 672,
/* 380 */ 133, 288, 686, 687, 913, 747, 60, 20, 728, 19,
/* 390 */ 61, 1012, 19, 730, 6, 64, 638, 263, 227, 228,
/* 400 */ 31, 31, 640, 265, 639, 1011, 60, 80, 60, 93,
/* 410 */ 92, 28, 62, 717, 266, 65, 14, 13, 67, 197,
/* 420 */ 627, 99, 98, 198, 16, 15, 656, 654, 657, 655,
/* 430 */ 112, 111, 128, 126, 182, 1026, 183, 185, 179, 186,
/* 440 */ 915, 187, 193, 194, 192, 177, 191, 181, 978, 929,
/* 450 */ 214, 975, 974, 215, 287, 130, 39, 937, 148, 944,
/* 460 */ 946, 132, 136, 36, 241, 961, 960, 150, 909, 127,
/* 470 */ 679, 246, 911, 204, 248, 140, 653, 151, 141, 926,
/* 480 */ 152, 827, 63, 253, 66, 268, 37, 175, 34, 139,
/* 490 */ 58, 258, 277, 823, 1031, 90, 1030, 1028, 156, 256,
/* 500 */ 281, 1025, 96, 1024, 142, 1022, 254, 157, 845, 35,
/* 510 */ 32, 38, 176, 812, 106, 252, 810, 108, 109, 808,
/* 520 */ 807, 229, 167, 805, 804, 803, 250, 802, 801, 800,
/* 530 */ 170, 172, 797, 795, 793, 791, 789, 174, 247, 244,
/* 540 */ 72, 73, 249, 962, 40, 297, 101, 289, 290, 291,
/* 550 */ 292, 293, 294, 199, 295, 221, 307, 267, 766, 231,
/* 560 */ 232, 765, 234, 235, 200, 85, 86, 195, 764, 752,
/* 570 */ 238, 242, 662, 74, 68, 8, 262, 806, 681, 799,
/* 580 */ 164, 846, 160, 158, 159, 162, 161, 163, 119, 2,
/* 590 */ 120, 121, 880, 798, 4, 122, 790, 134, 147, 143,
/* 600 */ 144, 145, 146, 135, 684, 75, 206, 251, 137, 892,
/* 610 */ 688, 26, 9, 10, 729, 27, 7, 11, 731, 21,
/* 620 */ 22, 264, 83, 591, 587, 81, 585, 584, 583, 580,
/* 630 */ 553, 275, 31, 87, 91, 630, 59, 629, 95, 626,
/* 640 */ 575, 573, 565, 571, 567, 569, 97, 563, 561, 594,
/* 650 */ 593, 592, 590, 589, 588, 586, 582, 581, 60, 551,
/* 660 */ 519, 517, 124, 770, 769, 769, 769, 769, 769, 769,
/* 670 */ 769, 769, 769, 769, 125,
/* 200 */ 815, 197, 213, 41, 165, 50, 260, 55, 53, 57,
/* 210 */ 54, 198, 18, 81, 226, 46, 45, 283, 282, 44,
/* 220 */ 43, 42, 212, 727, 928, 25, 718, 671, 721, 189,
/* 230 */ 724, 223, 212, 727, 278, 190, 718, 276, 721, 203,
/* 240 */ 724, 117, 116, 188, 899, 900, 29, 903, 257, 233,
/* 250 */ 77, 44, 43, 42, 209, 210, 237, 236, 259, 139,
/* 260 */ 23, 104, 305, 304, 209, 210, 296, 303, 79, 302,
/* 270 */ 301, 300, 73, 299, 298, 884, 132, 30, 882, 883,
/* 280 */ 36, 70, 225, 885, 824, 887, 888, 886, 165, 889,
/* 290 */ 890, 55, 53, 57, 54, 182, 309, 308, 125, 46,
/* 300 */ 45, 1026, 239, 44, 43, 42, 102, 107, 30, 196,
/* 310 */ 261, 73, 96, 106, 112, 115, 105, 914, 217, 36,
/* 320 */ 674, 913, 109, 5, 155, 56, 78, 30, 243, 33,
/* 330 */ 154, 91, 86, 90, 30, 56, 173, 169, 726, 245,
/* 340 */ 30, 68, 171, 168, 120, 119, 118, 12, 726, 279,
/* 350 */ 183, 83, 913, 80, 725, 28, 46, 45, 266, 816,
/* 360 */ 44, 43, 42, 165, 725, 1, 153, 652, 280, 716,
/* 370 */ 649, 913, 650, 901, 651, 284, 695, 696, 913, 664,
/* 380 */ 720, 288, 723, 241, 913, 680, 24, 31, 686, 134,
/* 390 */ 687, 747, 60, 728, 20, 19, 211, 19, 227, 228,
/* 400 */ 719, 61, 722, 185, 638, 717, 730, 64, 31, 263,
/* 410 */ 640, 265, 639, 31, 60, 82, 60, 179, 95, 94,
/* 420 */ 186, 14, 13, 62, 101, 100, 67, 65, 627, 187,
/* 430 */ 16, 15, 656, 654, 657, 655, 114, 113, 130, 128,
/* 440 */ 6, 193, 194, 192, 177, 191, 181, 915, 979, 131,
/* 450 */ 978, 214, 975, 974, 215, 287, 936, 39, 961, 944,
/* 460 */ 946, 133, 960, 929, 244, 137, 129, 150, 911, 149,
/* 470 */ 242, 909, 679, 246, 151, 204, 653, 247, 258, 256,
/* 480 */ 66, 152, 827, 268, 63, 926, 37, 140, 175, 34,
/* 490 */ 248, 253, 277, 823, 1031, 92, 58, 141, 254, 142,
/* 500 */ 1030, 1028, 156, 281, 1025, 98, 1024, 1022, 157, 845,
/* 510 */ 35, 32, 38, 176, 252, 144, 812, 108, 810, 110,
/* 520 */ 111, 808, 807, 229, 167, 805, 804, 803, 250, 802,
/* 530 */ 801, 800, 170, 172, 797, 795, 793, 791, 789, 174,
/* 540 */ 40, 71, 74, 249, 962, 297, 103, 289, 290, 291,
/* 550 */ 292, 293, 294, 295, 307, 199, 766, 221, 231, 232,
/* 560 */ 267, 765, 234, 235, 764, 752, 200, 195, 238, 87,
/* 570 */ 88, 243, 75, 8, 262, 659, 72, 806, 681, 121,
/* 580 */ 206, 135, 122, 799, 160, 123, 159, 846, 158, 161,
/* 590 */ 162, 164, 163, 798, 684, 124, 880, 790, 2, 136,
/* 600 */ 4, 145, 143, 146, 147, 76, 148, 251, 892, 688,
/* 610 */ 138, 26, 264, 729, 9, 10, 27, 7, 11, 21,
/* 620 */ 731, 22, 85, 591, 83, 587, 585, 584, 583, 580,
/* 630 */ 553, 275, 93, 89, 31, 59, 630, 97, 99, 629,
/* 640 */ 626, 575, 573, 565, 571, 567, 569, 563, 561, 594,
/* 650 */ 593, 592, 590, 589, 588, 586, 582, 581, 60, 519,
/* 660 */ 551, 517, 770, 769, 769, 769, 769, 769, 769, 769,
/* 670 */ 769, 769, 769, 769, 126, 127,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 192, 1, 191, 192, 211, 192, 192, 195, 196, 9,
......@@ -283,66 +284,66 @@ static const YYCODETYPE yy_lookahead[] = {
/* 50 */ 23, 24, 25, 26, 27, 28, 235, 9, 253, 233,
/* 60 */ 33, 34, 236, 211, 37, 38, 39, 14, 254, 16,
/* 70 */ 17, 250, 259, 20, 21, 1, 23, 24, 25, 26,
/* 80 */ 27, 28, 259, 9, 261, 211, 33, 34, 198, 237,
/* 80 */ 27, 28, 259, 9, 261, 211, 33, 34, 79, 237,
/* 90 */ 37, 38, 39, 45, 46, 47, 48, 49, 50, 51,
/* 100 */ 52, 53, 54, 55, 56, 57, 58, 5, 197, 61,
/* 110 */ 110, 237, 201, 13, 14, 192, 16, 17, 79, 192,
/* 120 */ 20, 21, 232, 23, 24, 25, 26, 27, 28, 37,
/* 130 */ 38, 39, 105, 33, 34, 33, 34, 37, 38, 39,
/* 140 */ 13, 14, 197, 16, 17, 67, 201, 20, 21, 104,
/* 150 */ 23, 24, 25, 26, 27, 28, 233, 112, 0, 236,
/* 100 */ 52, 53, 54, 55, 56, 57, 58, 5, 198, 61,
/* 110 */ 110, 237, 81, 13, 14, 192, 16, 17, 253, 192,
/* 120 */ 20, 21, 1, 23, 24, 25, 26, 27, 28, 253,
/* 130 */ 9, 211, 105, 33, 34, 33, 34, 37, 38, 39,
/* 140 */ 13, 14, 232, 16, 17, 67, 253, 20, 21, 37,
/* 150 */ 23, 24, 25, 26, 27, 28, 233, 237, 0, 236,
/* 160 */ 33, 34, 67, 236, 37, 38, 39, 88, 89, 90,
/* 170 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
/* 180 */ 101, 102, 210, 192, 212, 213, 214, 215, 216, 217,
/* 190 */ 218, 219, 220, 221, 222, 223, 224, 225, 16, 17,
/* 200 */ 197, 211, 20, 21, 201, 23, 24, 25, 26, 27,
/* 210 */ 28, 81, 44, 198, 136, 33, 34, 139, 140, 37,
/* 220 */ 38, 39, 1, 2, 235, 192, 5, 237, 7, 61,
/* 200 */ 197, 253, 20, 21, 201, 23, 24, 25, 26, 27,
/* 210 */ 28, 253, 44, 198, 136, 33, 34, 139, 140, 37,
/* 220 */ 38, 39, 1, 2, 235, 104, 5, 115, 7, 61,
/* 230 */ 9, 136, 1, 2, 139, 67, 5, 79, 7, 250,
/* 240 */ 9, 73, 74, 75, 229, 230, 231, 232, 257, 135,
/* 250 */ 259, 64, 65, 66, 33, 34, 142, 143, 37, 192,
/* 260 */ 88, 192, 90, 91, 33, 34, 198, 95, 228, 97,
/* 270 */ 98, 99, 104, 101, 102, 210, 76, 192, 213, 214,
/* 280 */ 112, 81, 238, 218, 253, 220, 221, 222, 255, 224,
/* 290 */ 225, 25, 26, 27, 28, 251, 227, 15, 230, 33,
/* 300 */ 34, 37, 134, 37, 38, 39, 62, 63, 192, 141,
/* 310 */ 199, 200, 68, 69, 70, 71, 72, 5, 233, 7,
/* 320 */ 104, 236, 78, 62, 63, 104, 259, 192, 112, 68,
/* 330 */ 69, 70, 71, 72, 192, 104, 62, 63, 117, 5,
/* 340 */ 192, 7, 68, 69, 70, 71, 72, 104, 117, 233,
/* 350 */ 60, 108, 236, 110, 133, 105, 33, 34, 124, 125,
/* 360 */ 37, 38, 39, 113, 133, 105, 109, 2, 233, 109,
/* 370 */ 5, 236, 7, 116, 9, 233, 105, 1, 236, 115,
/* 380 */ 109, 233, 105, 105, 236, 105, 109, 109, 105, 109,
/* 390 */ 109, 253, 109, 111, 104, 109, 105, 105, 33, 34,
/* 400 */ 109, 109, 105, 105, 105, 253, 109, 109, 109, 137,
/* 410 */ 138, 104, 131, 37, 107, 129, 137, 138, 104, 253,
/* 420 */ 106, 137, 138, 253, 137, 138, 5, 5, 7, 7,
/* 430 */ 76, 77, 62, 63, 253, 237, 253, 253, 253, 253,
/* 440 */ 237, 253, 253, 253, 253, 253, 253, 253, 228, 235,
/* 450 */ 228, 228, 228, 228, 228, 192, 252, 192, 239, 192,
/* 460 */ 192, 192, 192, 112, 235, 260, 260, 192, 192, 60,
/* 470 */ 117, 256, 235, 256, 256, 247, 111, 192, 246, 249,
/* 480 */ 192, 192, 130, 256, 128, 192, 192, 192, 192, 248,
/* 490 */ 127, 122, 192, 192, 192, 192, 192, 192, 192, 126,
/* 500 */ 192, 192, 192, 192, 245, 192, 121, 192, 192, 192,
/* 510 */ 192, 192, 192, 192, 192, 120, 192, 192, 192, 192,
/* 520 */ 192, 192, 192, 192, 192, 192, 119, 192, 192, 192,
/* 530 */ 192, 192, 192, 192, 192, 192, 192, 192, 118, 193,
/* 540 */ 193, 193, 193, 193, 132, 103, 87, 86, 50, 83,
/* 550 */ 85, 54, 84, 193, 82, 193, 79, 193, 5, 144,
/* 560 */ 5, 5, 144, 5, 193, 198, 198, 193, 5, 89,
/* 570 */ 135, 113, 105, 109, 114, 104, 107, 193, 105, 193,
/* 580 */ 202, 209, 203, 208, 207, 204, 206, 205, 194, 199,
/* 590 */ 194, 194, 226, 193, 195, 194, 193, 104, 240, 244,
/* 600 */ 243, 242, 241, 109, 105, 104, 1, 104, 104, 226,
/* 610 */ 105, 109, 123, 123, 105, 109, 104, 104, 111, 104,
/* 620 */ 104, 107, 76, 9, 5, 108, 5, 5, 5, 5,
/* 630 */ 80, 15, 109, 76, 138, 5, 16, 5, 138, 105,
/* 640 */ 5, 5, 5, 5, 5, 5, 138, 5, 5, 5,
/* 650 */ 5, 5, 5, 5, 5, 5, 5, 5, 109, 80,
/* 660 */ 60, 59, 21, 0, 264, 264, 264, 264, 264, 264,
/* 670 */ 264, 264, 264, 264, 21, 264, 264, 264, 264, 264,
/* 250 */ 259, 37, 38, 39, 33, 34, 142, 143, 37, 192,
/* 260 */ 88, 76, 90, 91, 33, 34, 81, 95, 238, 97,
/* 270 */ 98, 99, 104, 101, 102, 210, 192, 192, 213, 214,
/* 280 */ 112, 251, 192, 218, 197, 220, 221, 222, 201, 224,
/* 290 */ 225, 25, 26, 27, 28, 253, 64, 65, 66, 33,
/* 300 */ 34, 237, 134, 37, 38, 39, 62, 63, 192, 141,
/* 310 */ 15, 104, 68, 69, 70, 71, 72, 227, 233, 112,
/* 320 */ 105, 236, 78, 62, 63, 104, 259, 192, 113, 68,
/* 330 */ 69, 70, 71, 72, 192, 104, 62, 63, 117, 255,
/* 340 */ 192, 198, 68, 69, 70, 71, 72, 104, 117, 233,
/* 350 */ 253, 108, 236, 110, 133, 104, 33, 34, 107, 197,
/* 360 */ 37, 38, 39, 201, 133, 199, 200, 2, 233, 1,
/* 370 */ 5, 236, 7, 230, 9, 233, 124, 125, 236, 109,
/* 380 */ 5, 233, 7, 105, 236, 105, 116, 109, 105, 109,
/* 390 */ 105, 105, 109, 105, 109, 109, 60, 109, 33, 34,
/* 400 */ 5, 109, 7, 253, 105, 37, 111, 109, 109, 105,
/* 410 */ 105, 105, 105, 109, 109, 109, 109, 253, 137, 138,
/* 420 */ 253, 137, 138, 131, 137, 138, 104, 129, 106, 253,
/* 430 */ 137, 138, 5, 5, 7, 7, 76, 77, 62, 63,
/* 440 */ 104, 253, 253, 253, 253, 253, 253, 237, 228, 192,
/* 450 */ 228, 228, 228, 228, 228, 228, 192, 252, 260, 192,
/* 460 */ 192, 192, 260, 235, 235, 192, 60, 192, 235, 239,
/* 470 */ 193, 192, 117, 256, 192, 256, 111, 118, 122, 126,
/* 480 */ 128, 192, 192, 192, 130, 249, 192, 248, 192, 192,
/* 490 */ 256, 256, 192, 192, 192, 192, 127, 247, 121, 246,
/* 500 */ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
/* 510 */ 192, 192, 192, 192, 120, 244, 192, 192, 192, 192,
/* 520 */ 192, 192, 192, 192, 192, 192, 192, 192, 119, 192,
/* 530 */ 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
/* 540 */ 132, 193, 193, 193, 193, 103, 87, 86, 50, 83,
/* 550 */ 85, 54, 84, 82, 79, 193, 5, 193, 144, 5,
/* 560 */ 193, 5, 144, 5, 5, 89, 193, 193, 135, 198,
/* 570 */ 198, 113, 109, 104, 107, 105, 114, 193, 105, 194,
/* 580 */ 1, 104, 194, 193, 203, 194, 207, 209, 208, 206,
/* 590 */ 204, 202, 205, 193, 105, 194, 226, 193, 199, 109,
/* 600 */ 195, 243, 245, 242, 241, 104, 240, 104, 226, 105,
/* 610 */ 104, 109, 107, 105, 123, 123, 109, 104, 104, 104,
/* 620 */ 111, 104, 76, 9, 108, 5, 5, 5, 5, 5,
/* 630 */ 80, 15, 138, 76, 109, 16, 5, 138, 138, 5,
/* 640 */ 105, 5, 5, 5, 5, 5, 5, 5, 5, 5,
/* 650 */ 5, 5, 5, 5, 5, 5, 5, 5, 109, 60,
/* 660 */ 80, 59, 0, 264, 264, 264, 264, 264, 264, 264,
/* 670 */ 264, 264, 264, 264, 21, 21, 264, 264, 264, 264,
/* 680 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 690 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 700 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
......@@ -361,84 +362,84 @@ static const YYCODETYPE yy_lookahead[] = {
/* 830 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 840 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 850 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264,
/* 860 */ 264, 264, 264,
/* 860 */ 264, 264, 264, 264,
};
#define YY_SHIFT_COUNT (312)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (663)
#define YY_SHIFT_MAX (662)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 168, 79, 79, 172, 172, 39, 221, 231, 74, 74,
/* 0 */ 168, 79, 79, 172, 172, 9, 221, 231, 74, 74,
/* 10 */ 74, 74, 74, 74, 74, 74, 74, 0, 48, 231,
/* 20 */ 365, 365, 365, 365, 45, 74, 74, 74, 74, 158,
/* 30 */ 74, 74, 200, 39, 130, 130, 675, 675, 675, 231,
/* 20 */ 365, 365, 365, 365, 121, 207, 74, 74, 74, 158,
/* 30 */ 74, 74, 185, 9, 31, 31, 676, 676, 676, 231,
/* 40 */ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231,
/* 50 */ 231, 231, 231, 231, 231, 231, 231, 231, 231, 365,
/* 60 */ 365, 102, 102, 102, 102, 102, 102, 102, 216, 74,
/* 70 */ 74, 264, 74, 74, 74, 74, 234, 234, 257, 74,
/* 80 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
/* 60 */ 365, 102, 102, 102, 102, 102, 102, 102, 74, 74,
/* 70 */ 112, 74, 207, 207, 74, 74, 74, 252, 252, 270,
/* 80 */ 207, 74, 74, 74, 74, 74, 74, 74, 74, 74,
/* 90 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
/* 100 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
/* 110 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
/* 120 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 351,
/* 130 */ 409, 409, 409, 353, 353, 353, 409, 353, 409, 356,
/* 140 */ 352, 363, 369, 373, 385, 395, 407, 420, 412, 351,
/* 150 */ 409, 409, 409, 442, 39, 39, 409, 409, 459, 461,
/* 160 */ 498, 466, 465, 497, 468, 472, 442, 409, 477, 477,
/* 170 */ 409, 477, 409, 477, 409, 675, 675, 27, 100, 127,
/* 120 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74,
/* 130 */ 74, 406, 406, 406, 355, 355, 355, 406, 355, 406,
/* 140 */ 352, 354, 369, 356, 353, 377, 394, 409, 359, 408,
/* 150 */ 406, 406, 406, 442, 9, 9, 406, 406, 459, 461,
/* 160 */ 498, 466, 465, 497, 468, 471, 442, 406, 475, 475,
/* 170 */ 406, 475, 406, 475, 406, 676, 676, 27, 100, 127,
/* 180 */ 100, 100, 53, 182, 266, 266, 266, 266, 244, 261,
/* 190 */ 274, 323, 323, 323, 323, 78, 114, 92, 92, 243,
/* 200 */ 95, 187, 250, 260, 271, 277, 278, 280, 283, 312,
/* 210 */ 334, 376, 290, 282, 281, 286, 291, 292, 297, 298,
/* 220 */ 299, 307, 272, 279, 284, 314, 287, 421, 422, 354,
/* 230 */ 370, 553, 415, 555, 556, 418, 558, 563, 480, 435,
/* 240 */ 458, 467, 460, 469, 471, 464, 473, 493, 499, 494,
/* 250 */ 501, 605, 503, 505, 504, 502, 489, 506, 490, 509,
/* 260 */ 512, 507, 513, 469, 515, 514, 516, 517, 546, 614,
/* 270 */ 619, 621, 622, 623, 624, 550, 616, 557, 496, 523,
/* 280 */ 523, 620, 500, 508, 523, 630, 632, 534, 523, 635,
/* 290 */ 636, 637, 638, 639, 640, 642, 643, 644, 645, 646,
/* 300 */ 647, 648, 649, 650, 651, 652, 549, 579, 641, 653,
/* 310 */ 600, 602, 663,
/* 190 */ 274, 323, 323, 323, 323, 78, 114, 214, 214, 243,
/* 200 */ 95, 232, 278, 215, 280, 283, 285, 286, 288, 375,
/* 210 */ 395, 368, 336, 295, 292, 298, 299, 304, 305, 306,
/* 220 */ 307, 251, 281, 284, 287, 322, 293, 427, 428, 360,
/* 230 */ 376, 551, 414, 554, 556, 418, 558, 559, 476, 433,
/* 240 */ 458, 467, 469, 462, 470, 463, 473, 477, 489, 490,
/* 250 */ 501, 579, 503, 504, 506, 502, 491, 507, 492, 508,
/* 260 */ 513, 509, 514, 467, 515, 505, 517, 516, 546, 614,
/* 270 */ 620, 621, 622, 623, 624, 550, 616, 557, 494, 525,
/* 280 */ 525, 619, 499, 500, 525, 631, 634, 535, 525, 636,
/* 290 */ 637, 638, 639, 640, 641, 642, 643, 644, 645, 646,
/* 300 */ 647, 648, 649, 650, 651, 652, 549, 580, 653, 654,
/* 310 */ 599, 602, 662,
};
#define YY_REDUCE_COUNT (176)
#define YY_REDUCE_MIN (-241)
#define YY_REDUCE_MAX (403)
#define YY_REDUCE_MAX (405)
static const short yy_reduce_ofst[] = {
/* 0 */ -179, -28, -28, 65, 65, 15, -231, -217, -174, -177,
/* 10 */ -9, -77, 85, 116, 135, 142, 148, -186, -189, -234,
/* 20 */ -207, -148, -126, -10, -11, 33, -187, 67, -192, -110,
/* 30 */ 69, -73, -89, 68, -55, 3, 44, 111, -188, -241,
/* 40 */ -218, -195, 31, 138, 152, 166, 170, 181, 183, 184,
/* 50 */ 185, 186, 188, 189, 190, 191, 192, 193, 194, 198,
/* 60 */ 203, 40, 220, 222, 223, 224, 225, 226, 214, 263,
/* 70 */ 265, 204, 267, 268, 269, 270, 205, 206, 219, 275,
/* 80 */ 276, 285, 288, 289, 293, 294, 295, 296, 300, 301,
/* 90 */ 302, 303, 304, 305, 306, 308, 309, 310, 311, 313,
/* 100 */ 315, 316, 317, 318, 319, 320, 321, 322, 324, 325,
/* 110 */ 326, 327, 328, 329, 330, 331, 332, 333, 335, 336,
/* 120 */ 337, 338, 339, 340, 341, 342, 343, 344, 345, 229,
/* 130 */ 346, 347, 348, 215, 217, 218, 349, 227, 350, 230,
/* 140 */ 241, 228, 232, 259, 355, 357, 359, 361, 358, 237,
/* 150 */ 360, 362, 364, 366, 367, 368, 371, 374, 372, 375,
/* 160 */ 377, 379, 380, 381, 382, 378, 383, 384, 394, 396,
/* 170 */ 386, 397, 400, 401, 403, 390, 399,
/* 20 */ -207, -148, -126, -80, 84, -11, -187, 67, -192, -90,
/* 30 */ 90, -73, 3, 143, 87, 162, 30, 166, -188, -241,
/* 40 */ -218, -195, -135, -124, -107, -52, -42, 42, 97, 150,
/* 50 */ 164, 167, 176, 188, 189, 190, 191, 192, 193, 64,
/* 60 */ 210, 220, 222, 223, 224, 225, 226, 227, 257, 264,
/* 70 */ 205, 267, 228, 229, 268, 269, 273, 198, 202, 230,
/* 80 */ 233, 275, 279, 282, 289, 290, 291, 294, 296, 297,
/* 90 */ 300, 301, 302, 303, 308, 309, 310, 311, 312, 313,
/* 100 */ 314, 315, 316, 317, 318, 319, 320, 321, 324, 325,
/* 110 */ 326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
/* 120 */ 337, 338, 339, 340, 341, 342, 343, 344, 345, 346,
/* 130 */ 347, 277, 348, 349, 217, 219, 234, 350, 235, 351,
/* 140 */ 236, 239, 250, 253, 357, 271, 358, 361, 363, 366,
/* 150 */ 362, 364, 367, 370, 371, 372, 373, 374, 378, 380,
/* 160 */ 379, 381, 383, 386, 387, 389, 382, 384, 385, 388,
/* 170 */ 390, 391, 400, 401, 404, 399, 405,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 767, 879, 825, 891, 813, 822, 1019, 1019, 767, 767,
/* 10 */ 767, 767, 767, 767, 767, 767, 767, 939, 786, 1019,
/* 10 */ 767, 767, 767, 767, 767, 767, 767, 938, 786, 1019,
/* 20 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 822,
/* 30 */ 767, 767, 828, 822, 828, 828, 934, 863, 881, 767,
/* 30 */ 767, 767, 828, 822, 828, 828, 933, 863, 881, 767,
/* 40 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 50 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 60 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 70 */ 767, 941, 943, 945, 767, 767, 965, 965, 932, 767,
/* 70 */ 940, 943, 767, 767, 945, 767, 767, 965, 965, 931,
/* 80 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 90 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 100 */ 767, 767, 767, 767, 767, 767, 811, 767, 809, 767,
/* 110 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 120 */ 767, 767, 767, 796, 767, 767, 767, 767, 767, 767,
/* 130 */ 788, 788, 788, 767, 767, 767, 788, 767, 788, 972,
/* 140 */ 976, 970, 958, 966, 957, 953, 951, 950, 980, 767,
/* 100 */ 767, 767, 767, 767, 767, 767, 767, 767, 811, 767,
/* 110 */ 809, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 120 */ 767, 767, 767, 767, 767, 796, 767, 767, 767, 767,
/* 130 */ 767, 788, 788, 788, 767, 767, 767, 788, 767, 788,
/* 140 */ 972, 976, 970, 958, 966, 957, 953, 951, 950, 980,
/* 150 */ 788, 788, 788, 826, 822, 822, 788, 788, 844, 842,
/* 160 */ 840, 832, 838, 834, 836, 830, 814, 788, 820, 820,
/* 170 */ 788, 820, 788, 820, 788, 863, 881, 767, 981, 767,
......@@ -448,7 +449,7 @@ static const YYACTIONTYPE yy_default[] = {
/* 210 */ 767, 767, 983, 767, 977, 973, 767, 767, 767, 767,
/* 220 */ 767, 767, 767, 767, 767, 893, 767, 767, 767, 767,
/* 230 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
/* 240 */ 931, 767, 767, 767, 767, 942, 767, 767, 767, 767,
/* 240 */ 930, 767, 767, 767, 767, 941, 767, 767, 767, 767,
/* 250 */ 767, 767, 767, 767, 767, 967, 767, 959, 767, 767,
/* 260 */ 767, 767, 767, 905, 767, 767, 767, 767, 767, 767,
/* 270 */ 767, 767, 767, 767, 767, 767, 767, 767, 767, 1029,
......@@ -1177,22 +1178,22 @@ static const char *const yyRuleName[] = {
/* 154 */ "tagitem ::= PLUS INTEGER",
/* 155 */ "tagitem ::= PLUS FLOAT",
/* 156 */ "select ::= SELECT selcollist from where_opt interval_opt session_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt",
/* 157 */ "union ::= select",
/* 158 */ "union ::= LP union RP",
/* 157 */ "select ::= LP select RP",
/* 158 */ "union ::= select",
/* 159 */ "union ::= union UNION ALL select",
/* 160 */ "union ::= union UNION ALL LP select RP",
/* 161 */ "cmd ::= union",
/* 162 */ "select ::= SELECT selcollist",
/* 163 */ "sclp ::= selcollist COMMA",
/* 164 */ "sclp ::=",
/* 165 */ "selcollist ::= sclp distinct expr as",
/* 166 */ "selcollist ::= sclp STAR",
/* 167 */ "as ::= AS ids",
/* 168 */ "as ::= ids",
/* 169 */ "as ::=",
/* 170 */ "distinct ::= DISTINCT",
/* 171 */ "distinct ::=",
/* 172 */ "from ::= FROM tablelist",
/* 160 */ "cmd ::= union",
/* 161 */ "select ::= SELECT selcollist",
/* 162 */ "sclp ::= selcollist COMMA",
/* 163 */ "sclp ::=",
/* 164 */ "selcollist ::= sclp distinct expr as",
/* 165 */ "selcollist ::= sclp STAR",
/* 166 */ "as ::= AS ids",
/* 167 */ "as ::= ids",
/* 168 */ "as ::=",
/* 169 */ "distinct ::= DISTINCT",
/* 170 */ "distinct ::=",
/* 171 */ "from ::= FROM tablelist",
/* 172 */ "from ::= FROM LP union RP",
/* 173 */ "tablelist ::= ids cpxName",
/* 174 */ "tablelist ::= ids cpxName ids",
/* 175 */ "tablelist ::= tablelist COMMA ids cpxName",
......@@ -1420,7 +1421,7 @@ taosArrayDestroy((yypminor->yy285));
break;
case 231: /* create_table_list */
{
destroyCreateTableSql((yypminor->yy230));
destroyCreateTableSql((yypminor->yy470));
}
break;
case 235: /* select */
......@@ -1901,22 +1902,22 @@ static const struct {
{ 237, -2 }, /* (154) tagitem ::= PLUS INTEGER */
{ 237, -2 }, /* (155) tagitem ::= PLUS FLOAT */
{ 235, -13 }, /* (156) select ::= SELECT selcollist from where_opt interval_opt session_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{ 250, -1 }, /* (157) union ::= select */
{ 250, -3 }, /* (158) union ::= LP union RP */
{ 235, -3 }, /* (157) select ::= LP select RP */
{ 250, -1 }, /* (158) union ::= select */
{ 250, -4 }, /* (159) union ::= union UNION ALL select */
{ 250, -6 }, /* (160) union ::= union UNION ALL LP select RP */
{ 190, -1 }, /* (161) cmd ::= union */
{ 235, -2 }, /* (162) select ::= SELECT selcollist */
{ 251, -2 }, /* (163) sclp ::= selcollist COMMA */
{ 251, 0 }, /* (164) sclp ::= */
{ 238, -4 }, /* (165) selcollist ::= sclp distinct expr as */
{ 238, -2 }, /* (166) selcollist ::= sclp STAR */
{ 254, -2 }, /* (167) as ::= AS ids */
{ 254, -1 }, /* (168) as ::= ids */
{ 254, 0 }, /* (169) as ::= */
{ 252, -1 }, /* (170) distinct ::= DISTINCT */
{ 252, 0 }, /* (171) distinct ::= */
{ 239, -2 }, /* (172) from ::= FROM tablelist */
{ 190, -1 }, /* (160) cmd ::= union */
{ 235, -2 }, /* (161) select ::= SELECT selcollist */
{ 251, -2 }, /* (162) sclp ::= selcollist COMMA */
{ 251, 0 }, /* (163) sclp ::= */
{ 238, -4 }, /* (164) selcollist ::= sclp distinct expr as */
{ 238, -2 }, /* (165) selcollist ::= sclp STAR */
{ 254, -2 }, /* (166) as ::= AS ids */
{ 254, -1 }, /* (167) as ::= ids */
{ 254, 0 }, /* (168) as ::= */
{ 252, -1 }, /* (169) distinct ::= DISTINCT */
{ 252, 0 }, /* (170) distinct ::= */
{ 239, -2 }, /* (171) from ::= FROM tablelist */
{ 239, -4 }, /* (172) from ::= FROM LP union RP */
{ 255, -2 }, /* (173) tablelist ::= ids cpxName */
{ 255, -3 }, /* (174) tablelist ::= ids cpxName ids */
{ 255, -4 }, /* (175) tablelist ::= tablelist COMMA ids cpxName */
......@@ -2273,7 +2274,7 @@ static void yy_reduce(
break;
case 50: /* ifexists ::= */
case 52: /* ifnotexists ::= */ yytestcase(yyruleno==52);
case 171: /* distinct ::= */ yytestcase(yyruleno==171);
case 170: /* distinct ::= */ yytestcase(yyruleno==170);
{ yymsp[1].minor.yy0.n = 0;}
break;
case 51: /* ifnotexists ::= IF NOT EXISTS */
......@@ -2471,7 +2472,7 @@ static void yy_reduce(
{ yymsp[-1].minor.yy525 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);}
break;
case 132: /* cmd ::= CREATE TABLE create_table_list */
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy230;}
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy470;}
break;
case 133: /* create_table_list ::= create_from_stable */
{
......@@ -2480,36 +2481,36 @@ static void yy_reduce(
taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy96);
pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE;
yylhsminor.yy230 = pCreateTable;
yylhsminor.yy470 = pCreateTable;
}
yymsp[0].minor.yy230 = yylhsminor.yy230;
yymsp[0].minor.yy470 = yylhsminor.yy470;
break;
case 134: /* create_table_list ::= create_table_list create_from_stable */
{
taosArrayPush(yymsp[-1].minor.yy230->childTableInfo, &yymsp[0].minor.yy96);
yylhsminor.yy230 = yymsp[-1].minor.yy230;
taosArrayPush(yymsp[-1].minor.yy470->childTableInfo, &yymsp[0].minor.yy96);
yylhsminor.yy470 = yymsp[-1].minor.yy470;
}
yymsp[-1].minor.yy230 = yylhsminor.yy230;
yymsp[-1].minor.yy470 = yylhsminor.yy470;
break;
case 135: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
yylhsminor.yy230 = tSetCreateTableInfo(yymsp[-1].minor.yy285, NULL, NULL, TSQL_CREATE_TABLE);
setSqlInfo(pInfo, yylhsminor.yy230, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy470 = tSetCreateTableInfo(yymsp[-1].minor.yy285, NULL, NULL, TSQL_CREATE_TABLE);
setSqlInfo(pInfo, yylhsminor.yy470, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0);
}
yymsp[-5].minor.yy230 = yylhsminor.yy230;
yymsp[-5].minor.yy470 = yylhsminor.yy470;
break;
case 136: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
yylhsminor.yy230 = tSetCreateTableInfo(yymsp[-5].minor.yy285, yymsp[-1].minor.yy285, NULL, TSQL_CREATE_STABLE);
setSqlInfo(pInfo, yylhsminor.yy230, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy470 = tSetCreateTableInfo(yymsp[-5].minor.yy285, yymsp[-1].minor.yy285, NULL, TSQL_CREATE_STABLE);
setSqlInfo(pInfo, yylhsminor.yy470, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
yymsp[-9].minor.yy230 = yylhsminor.yy230;
yymsp[-9].minor.yy470 = yylhsminor.yy470;
break;
case 137: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
......@@ -2537,13 +2538,13 @@ static void yy_reduce(
break;
case 141: /* create_table_args ::= ifnotexists ids cpxName AS select */
{
yylhsminor.yy230 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy342, TSQL_CREATE_STREAM);
setSqlInfo(pInfo, yylhsminor.yy230, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy470 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy342, TSQL_CREATE_STREAM);
setSqlInfo(pInfo, yylhsminor.yy470, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0);
}
yymsp[-4].minor.yy230 = yylhsminor.yy230;
yymsp[-4].minor.yy470 = yylhsminor.yy470;
break;
case 142: /* columnlist ::= columnlist COMMA column */
{taosArrayPush(yymsp[-2].minor.yy285, &yymsp[0].minor.yy295); yylhsminor.yy285 = yymsp[-2].minor.yy285; }
......@@ -2592,78 +2593,76 @@ static void yy_reduce(
break;
case 156: /* select ::= SELECT selcollist from where_opt interval_opt session_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
yylhsminor.yy342 = tSetQuerySqlNode(&yymsp[-12].minor.yy0, yymsp[-11].minor.yy285, yymsp[-10].minor.yy285, yymsp[-9].minor.yy178, yymsp[-4].minor.yy285, yymsp[-3].minor.yy285, &yymsp[-8].minor.yy376, &yymsp[-7].minor.yy523, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy285, &yymsp[0].minor.yy438, &yymsp[-1].minor.yy438);
yylhsminor.yy342 = tSetQuerySqlNode(&yymsp[-12].minor.yy0, yymsp[-11].minor.yy285, yymsp[-10].minor.yy162, yymsp[-9].minor.yy178, yymsp[-4].minor.yy285, yymsp[-3].minor.yy285, &yymsp[-8].minor.yy376, &yymsp[-7].minor.yy523, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy285, &yymsp[0].minor.yy438, &yymsp[-1].minor.yy438);
}
yymsp[-12].minor.yy342 = yylhsminor.yy342;
break;
case 157: /* union ::= select */
case 157: /* select ::= LP select RP */
{yymsp[-2].minor.yy342 = yymsp[-1].minor.yy342;}
break;
case 158: /* union ::= select */
{ yylhsminor.yy513 = setSubclause(NULL, yymsp[0].minor.yy342); }
yymsp[0].minor.yy513 = yylhsminor.yy513;
break;
case 158: /* union ::= LP union RP */
{ yymsp[-2].minor.yy513 = yymsp[-1].minor.yy513; }
break;
case 159: /* union ::= union UNION ALL select */
{ yylhsminor.yy513 = appendSelectClause(yymsp[-3].minor.yy513, yymsp[0].minor.yy342); }
yymsp[-3].minor.yy513 = yylhsminor.yy513;
break;
case 160: /* union ::= union UNION ALL LP select RP */
{ yylhsminor.yy513 = appendSelectClause(yymsp[-5].minor.yy513, yymsp[-1].minor.yy342); }
yymsp[-5].minor.yy513 = yylhsminor.yy513;
break;
case 161: /* cmd ::= union */
case 160: /* cmd ::= union */
{ setSqlInfo(pInfo, yymsp[0].minor.yy513, NULL, TSDB_SQL_SELECT); }
break;
case 162: /* select ::= SELECT selcollist */
case 161: /* select ::= SELECT selcollist */
{
yylhsminor.yy342 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy285, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}
yymsp[-1].minor.yy342 = yylhsminor.yy342;
break;
case 163: /* sclp ::= selcollist COMMA */
case 162: /* sclp ::= selcollist COMMA */
{yylhsminor.yy285 = yymsp[-1].minor.yy285;}
yymsp[-1].minor.yy285 = yylhsminor.yy285;
break;
case 164: /* sclp ::= */
case 163: /* sclp ::= */
case 188: /* orderby_opt ::= */ yytestcase(yyruleno==188);
{yymsp[1].minor.yy285 = 0;}
break;
case 165: /* selcollist ::= sclp distinct expr as */
case 164: /* selcollist ::= sclp distinct expr as */
{
yylhsminor.yy285 = tSqlExprListAppend(yymsp[-3].minor.yy285, yymsp[-1].minor.yy178, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
}
yymsp[-3].minor.yy285 = yylhsminor.yy285;
break;
case 166: /* selcollist ::= sclp STAR */
case 165: /* selcollist ::= sclp STAR */
{
tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL);
yylhsminor.yy285 = tSqlExprListAppend(yymsp[-1].minor.yy285, pNode, 0, 0);
}
yymsp[-1].minor.yy285 = yylhsminor.yy285;
break;
case 167: /* as ::= AS ids */
case 166: /* as ::= AS ids */
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
break;
case 168: /* as ::= ids */
case 167: /* as ::= ids */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 169: /* as ::= */
case 168: /* as ::= */
{ yymsp[1].minor.yy0.n = 0; }
break;
case 170: /* distinct ::= DISTINCT */
case 169: /* distinct ::= DISTINCT */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 172: /* from ::= FROM tablelist */
{yymsp[-1].minor.yy285 = yymsp[0].minor.yy285;}
case 171: /* from ::= FROM tablelist */
{yymsp[-1].minor.yy162 = yymsp[0].minor.yy285;}
break;
case 172: /* from ::= FROM LP union RP */
{yymsp[-3].minor.yy162 = yymsp[-1].minor.yy513;}
break;
case 173: /* tablelist ::= ids cpxName */
{
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy285 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
yylhsminor.yy285 = tVariantListAppendToken(yylhsminor.yy285, &yymsp[-1].minor.yy0, -1); // table alias name
yylhsminor.yy285 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL);
}
yymsp[-1].minor.yy285 = yylhsminor.yy285;
break;
......@@ -2672,8 +2671,7 @@ static void yy_reduce(
toTSDBType(yymsp[-2].minor.yy0.type);
toTSDBType(yymsp[0].minor.yy0.type);
yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
yylhsminor.yy285 = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1);
yylhsminor.yy285 = tVariantListAppendToken(yylhsminor.yy285, &yymsp[0].minor.yy0, -1);
yylhsminor.yy285 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
yymsp[-2].minor.yy285 = yylhsminor.yy285;
break;
......@@ -2681,8 +2679,7 @@ static void yy_reduce(
{
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy285 = tVariantListAppendToken(yymsp[-3].minor.yy285, &yymsp[-1].minor.yy0, -1);
yylhsminor.yy285 = tVariantListAppendToken(yylhsminor.yy285, &yymsp[-1].minor.yy0, -1);
yylhsminor.yy285 = setTableNameList(yymsp[-3].minor.yy285, &yymsp[-1].minor.yy0, NULL);
}
yymsp[-3].minor.yy285 = yylhsminor.yy285;
break;
......@@ -2691,8 +2688,8 @@ static void yy_reduce(
toTSDBType(yymsp[-2].minor.yy0.type);
toTSDBType(yymsp[0].minor.yy0.type);
yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
yylhsminor.yy285 = tVariantListAppendToken(yymsp[-4].minor.yy285, &yymsp[-2].minor.yy0, -1);
yylhsminor.yy285 = tVariantListAppendToken(yylhsminor.yy285, &yymsp[0].minor.yy0, -1);
yylhsminor.yy285 = setTableNameList(yymsp[-4].minor.yy285, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
yymsp[-4].minor.yy285 = yylhsminor.yy285;
break;
......
......@@ -94,8 +94,9 @@ class TDTestCase:
tdSql.query("select * from stb1 limit 2 offset 3")
tdSql.checkRows(1)
# query ... alias for table ---- bug
tdSql.error("select t.ts from tb1 t")
# query ... alias for table
tdSql.query("select t.ts from tb1 t")
tdSql.checkRows(2)
# query ... tbname
tdSql.query("select tbname from stb1")
......
......@@ -448,7 +448,7 @@ endi
sql select first(join_tb0.c8),first(join_tb0.c9) from join_tb1 , join_tb0 where join_tb1.ts = join_tb0.ts and join_tb1.ts <= 100002 and join_tb0.c7 = true
#====================group by=========================================
print =================>"group by not supported"
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxtablespervnode -v 4
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 100
$dbPrefix = join_m_db
$tbPrefix = join_tb
$mtPrefix = join_mt
$tbNum = 3
$rowNum = 20000
$totalNum = $tbNum * $rowNum
print =============== join_manyBlocks.sim
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
$tstart = 100000
sql drop database if exists $db -x step1
step1:
sql create database if not exists $db keep 36500
sql use $db
sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12))
$mt1 = $mtPrefix . 1 . $i
sql create table $mt1 (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12), t3 int)
$i = 0
$tbPrefix1 = join_1_tb
$i = 0
while $i < $tbNum
$tb = $tbPrefix . $i
$tg2 = ' . abc
$tg2 = $tg2 . '
sql create table $tb using $mt tags( $i , $tg2 )
$tb1 = $tbPrefix1 . $i
$c = $i
$t3 = $i + 1
$binary = ' . abc
$binary = $binary . $i
$binary = $binary . '
print $binary
sql create table $tb1 using $mt1 tags( $i , $binary , $t3 )
$x = 0
while $x < $rowNum
$ms = $x . m
$c = $x / 100
$c = $c * 100
$c = $x - $c
$binary = ' . binary
$binary = $binary . $c
$binary = $binary . '
$nchar = ' . nchar
$nchar = $nchar . $c
$nchar = $nchar . '
sql insert into $tb values ($tstart , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar ) $tb1 values ($tstart , $c , $c , $c , $c , $c , $c , $c , $binary , $nchar )
$tstart = $tstart + 1
$x = $x + 1
endw
$i = $i + 1
$tstart = 100000
endw
sleep 100
print ===============join_manyblocks.sim
print ==============> td-3313
sql select join_mt0.ts,join_mt0.ts,join_mt0.t1 from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t1=join_mt1.t1;
print $row
if $row != 60000 then
print expect 60000, actual: $row
return -1
endi
print ======= second tags join
......@@ -41,7 +41,7 @@ while $x < 15
sql create table db.tb (ts timestamp, i int)
sleep 2000
sleep 1000
$x = $x + 1
endw
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册