diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 80f6b8e9e7..1920d8da17 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -173,7 +173,7 @@ def pre_test_build_mac() { ''' sh ''' cd ${WK}/debug - cmake .. -DBUILD_TEST=true -DBUILD_HTTPS=false + cmake .. -DBUILD_TEST=true -DBUILD_HTTPS=false -DCMAKE_BUILD_TYPE=Release make -j10 ctest -j10 || exit 7 ''' diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in index 75679a8ff5..a47b3b0feb 100644 --- a/cmake/taosadapter_CMakeLists.txt.in +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taosadapter ExternalProject_Add(taosadapter GIT_REPOSITORY https://github.com/taosdata/taosadapter.git - GIT_TAG 566540d + GIT_TAG f0c1753 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index c5fe95da58..0cc57d1246 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG b20c9d1 + GIT_TAG 261fcca SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index f0daf4b82a..30422ca20c 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -876,7 +876,8 @@ INTERP(expr) - The number of rows in the result set of `INTERP` is determined by the parameter `EVERY`. Starting from timestamp1, one interpolation is performed for every time interval specified `EVERY` parameter. The parameter `EVERY` must be an integer, with no quotes, with a time unit of: b(nanosecond), u(microsecond), a(millisecond)), s(second), m(minute), h(hour), d(day), or w(week). For example, `EVERY(500a)` will interpolate every 500 milliseconds. - Interpolation is performed based on `FILL` parameter. - `INTERP` can only be used to interpolate in single timeline. So it must be used with `partition by tbname` when it's used on a STable. -- Pseudo column `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.1.4). +- Pseudocolumn `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.1.4). +- Pseudocolumn `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.2.1). ### LAST diff --git a/docs/en/12-taos-sql/14-stream.md b/docs/en/12-taos-sql/14-stream.md index c47d2da0eb..e70e962668 100644 --- a/docs/en/12-taos-sql/14-stream.md +++ b/docs/en/12-taos-sql/14-stream.md @@ -108,7 +108,7 @@ SHOW STREAMS; When you create a stream, you can use the TRIGGER parameter to specify triggering conditions for it. -For non-windowed processing, triggering occurs in real time. For windowed processing, there are three methods of triggering: +For non-windowed processing, triggering occurs in real time. For windowed processing, there are three methods of triggering,the default value is AT_ONCE: 1. AT_ONCE: triggers on write diff --git a/docs/examples/go/sub/main.go b/docs/examples/go/sub/main.go index 7721eed134..3aa2fed729 100644 --- a/docs/examples/go/sub/main.go +++ b/docs/examples/go/sub/main.go @@ -24,7 +24,7 @@ func main() { if err != nil { panic(err) } - _, err = db.Exec("create topic if not exists example_tmq_topic with meta as DATABASE example_tmq") + _, err = db.Exec("create topic if not exists example_tmq_topic as DATABASE example_tmq") if err != nil { panic(err) } diff --git a/docs/zh/08-connector/05-schemaless-api.mdx b/docs/zh/08-connector/05-schemaless-api.mdx index f6d7e09212..8f0a9273b9 100644 --- a/docs/zh/08-connector/05-schemaless-api.mdx +++ b/docs/zh/08-connector/05-schemaless-api.mdx @@ -19,6 +19,7 @@ TDengine 提供了兼容 InfluxDB (v1) 和 OpenTSDB 行协议的 Schemaless API - `precision` TDengine 使用的时间精度 - `u` TDengine 用户名 - `p` TDengine 密码 +- `ttl` 自动创建的子表生命周期,以子表的第一条数据的 TTL 参数为准,不可更新。更多信息请参考[创建表文档](taos-sql/table/#创建表)的 TTL 参数 注意: 目前不支持 InfluxDB 的 token 验证方式,仅支持 Basic 验证和查询参数验证。 diff --git a/docs/zh/12-taos-sql/04-stable.md b/docs/zh/12-taos-sql/04-stable.md index bd32da68ae..c5933228de 100644 --- a/docs/zh/12-taos-sql/04-stable.md +++ b/docs/zh/12-taos-sql/04-stable.md @@ -139,10 +139,10 @@ alter_table_option: { - ADD COLUMN:添加列。 - DROP COLUMN:删除列。 -- MODIFY COLUMN:修改列定义,如果数据列的类型是可变长类型,那么可以使用此指令修改其宽度,只能改大,不能改小。 +- MODIFY COLUMN:修改列的宽度,数据列的类型必须是 nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 - ADD TAG:给超级表添加一个标签。 - DROP TAG:删除超级表的一个标签。从超级表删除某个标签后,该超级表下的所有子表也会自动删除该标签。 -- MODIFY TAG:修改超级表的一个标签的定义。如果标签的类型是可变长类型,那么可以使用此指令修改其宽度,只能改大,不能改小。 +- MODIFY TAG:修改超级表的一个标签的列宽度。标签的类型只能是 nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 - RENAME TAG:修改超级表的一个标签的名称。从超级表修改某个标签名后,该超级表下的所有子表也会自动更新该标签名。 ### 增加列 diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md index afe90b8a93..cb99c83cc5 100644 --- a/docs/zh/12-taos-sql/10-function.md +++ b/docs/zh/12-taos-sql/10-function.md @@ -880,6 +880,7 @@ INTERP(expr) - INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。 - INTERP 只能在一个时间序列内进行插值,因此当作用于超级表时必须跟 partition by tbname 一起使用。 - INTERP 可以与伪列 _irowts 一起使用,返回插值点所对应的时间戳(3.0.1.4版本以后支持)。 +- INTERP 可以与伪列 _isfilled 一起使用,显示返回结果是否为原始记录或插值算法产生的数据(3.0.2.1版本以后支持)。 ### LAST diff --git a/docs/zh/12-taos-sql/14-stream.md b/docs/zh/12-taos-sql/14-stream.md index a70d559a86..9e2fde526e 100644 --- a/docs/zh/12-taos-sql/14-stream.md +++ b/docs/zh/12-taos-sql/14-stream.md @@ -114,7 +114,7 @@ SELECT * from information_schema.`ins_streams`; 在创建流时,可以通过 TRIGGER 指令指定流式计算的触发模式。 -对于非窗口计算,流式计算的触发是实时的;对于窗口计算,目前提供 3 种触发模式: +对于非窗口计算,流式计算的触发是实时的;对于窗口计算,目前提供 3 种触发模式,默认为 AT_ONCE: 1. AT_ONCE:写入立即触发 diff --git a/examples/c/asyncdemo.c b/examples/c/asyncdemo.c index 83d217769b..c86cd44354 100644 --- a/examples/c/asyncdemo.c +++ b/examples/c/asyncdemo.c @@ -35,7 +35,7 @@ int64_t st, et; typedef struct { int id; TAOS *taos; - char name[16]; + char name[32]; time_t timeStamp; int value; int rowsInserted; diff --git a/examples/c/tmq.c b/examples/c/tmq.c index 71e571d4dd..eb41ad039a 100644 --- a/examples/c/tmq.c +++ b/examples/c/tmq.c @@ -20,7 +20,7 @@ #include #include "taos.h" -static int running = 1; +static int running = 1; static int32_t msg_process(TAOS_RES* msg) { char buf[1024]; @@ -40,8 +40,8 @@ static int32_t msg_process(TAOS_RES* msg) { TAOS_FIELD* fields = taos_fetch_fields(msg); int32_t numOfFields = taos_field_count(msg); - //int32_t* length = taos_fetch_lengths(msg); - int32_t precision = taos_result_precision(msg); + // int32_t* length = taos_fetch_lengths(msg); + int32_t precision = taos_result_precision(msg); rows++; taos_print_row(buf, row, fields, numOfFields); printf("precision: %d, row content: %s\n", precision, buf); @@ -62,14 +62,12 @@ static int32_t init_env() { pRes = taos_query(pConn, "drop topic topicname"); if (taos_errno(pRes) != 0) { printf("error in drop tmqdb, reason:%s\n", taos_errstr(pRes)); - return -1; } taos_free_result(pRes); pRes = taos_query(pConn, "drop database if exists tmqdb"); if (taos_errno(pRes) != 0) { printf("error in drop tmqdb, reason:%s\n", taos_errstr(pRes)); - return -1; } taos_free_result(pRes); @@ -77,7 +75,7 @@ static int32_t init_env() { pRes = taos_query(pConn, "create database tmqdb precision 'ns'"); if (taos_errno(pRes) != 0) { printf("error in create tmqdb, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); @@ -87,7 +85,7 @@ static int32_t init_env() { pConn, "create table tmqdb.stb (ts timestamp, c1 int, c2 float, c3 varchar(16)) tags(t1 int, t3 varchar(16))"); if (taos_errno(pRes) != 0) { printf("failed to create super table stb, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); @@ -96,28 +94,28 @@ static int32_t init_env() { pRes = taos_query(pConn, "create table tmqdb.ctb0 using tmqdb.stb tags(0, 'subtable0')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "create table tmqdb.ctb1 using tmqdb.stb tags(1, 'subtable1')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb1, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "create table tmqdb.ctb2 using tmqdb.stb tags(2, 'subtable2')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb2, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "create table tmqdb.ctb3 using tmqdb.stb tags(3, 'subtable3')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb3, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); @@ -126,33 +124,37 @@ static int32_t init_env() { pRes = taos_query(pConn, "insert into tmqdb.ctb0 values(now, 0, 0, 'a0')(now+1s, 0, 0, 'a00')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "insert into tmqdb.ctb1 values(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "insert into tmqdb.ctb2 values(now, 2, 2, 'a1')(now+1s, 22, 22, 'a22')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "insert into tmqdb.ctb3 values(now, 3, 3, 'a1')(now+1s, 33, 33, 'a33')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); - taos_close(pConn); return 0; + +END: + taos_free_result(pRes); + taos_close(pConn); + return -1; } int32_t create_topic() { diff --git a/include/client/taos.h b/include/client/taos.h index 379363c51d..647f906d4f 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -59,6 +59,7 @@ typedef enum { TSDB_OPTION_TIMEZONE, TSDB_OPTION_CONFIGDIR, TSDB_OPTION_SHELL_ACTIVITY_TIMER, + TSDB_OPTION_USE_ADAPTER, TSDB_MAX_OPTIONS } TSDB_OPTION; @@ -218,7 +219,7 @@ DLL_EXPORT const void *taos_get_raw_block(TAOS_RES *res); DLL_EXPORT int taos_get_db_route_info(TAOS *taos, const char *db, TAOS_DB_ROUTE_INFO *dbInfo); DLL_EXPORT int taos_get_table_vgId(TAOS *taos, const char *db, const char *table, int *vgId); -DLL_EXPORT int taos_load_table_info(TAOS *taos, const char *tableNameList); +DLL_EXPORT int taos_load_table_info(TAOS *taos, const char *tableNameList); /* --------------------------schemaless INTERFACE------------------------------- */ @@ -229,13 +230,14 @@ DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len int precision); DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int64_t reqid); -DLL_EXPORT TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int32_t ttl); +DLL_EXPORT TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, + int32_t ttl); DLL_EXPORT TAOS_RES *taos_schemaless_insert_ttl_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, - int precision, int32_t ttl, int64_t reqid); + int precision, int32_t ttl, int64_t reqid); DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, - int precision, int32_t ttl); + int precision, int32_t ttl); DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, - int protocol, int precision, int32_t ttl, int64_t reqid); + int protocol, int precision, int32_t ttl, int64_t reqid); /* --------------------------TMQ INTERFACE------------------------------- */ @@ -308,7 +310,8 @@ DLL_EXPORT tmq_res_t tmq_get_res_type(TAOS_RES *res); DLL_EXPORT int32_t tmq_get_raw(TAOS_RES *res, tmq_raw_data *raw); DLL_EXPORT int32_t tmq_write_raw(TAOS *taos, tmq_raw_data raw); DLL_EXPORT int taos_write_raw_block(TAOS *taos, int numOfRows, char *pData, const char *tbname); -DLL_EXPORT int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const char* tbname, TAOS_FIELD *fields, int numFields); +DLL_EXPORT int taos_write_raw_block_with_fields(TAOS *taos, int rows, char *pData, const char *tbname, + TAOS_FIELD *fields, int numFields); DLL_EXPORT void tmq_free_raw(tmq_raw_data raw); // Returning null means error. Returned result need to be freed by tmq_free_json_meta DLL_EXPORT char *tmq_get_json_meta(TAOS_RES *res); diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 92672311d0..9e8a139b31 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -101,6 +101,7 @@ extern int32_t tsRedirectPeriod; extern int32_t tsRedirectFactor; extern int32_t tsRedirectMaxPeriod; extern int32_t tsMaxRetryWaitTime; +extern bool tsUseAdapter; // client extern int32_t tsMinSlidingTime; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index aa277da982..04970ccc34 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -16,329 +16,330 @@ #ifndef _TD_COMMON_TOKEN_H_ #define _TD_COMMON_TOKEN_H_ -#define TK_OR 1 -#define TK_AND 2 -#define TK_UNION 3 -#define TK_ALL 4 -#define TK_MINUS 5 -#define TK_EXCEPT 6 -#define TK_INTERSECT 7 -#define TK_NK_BITAND 8 -#define TK_NK_BITOR 9 -#define TK_NK_LSHIFT 10 -#define TK_NK_RSHIFT 11 -#define TK_NK_PLUS 12 -#define TK_NK_MINUS 13 -#define TK_NK_STAR 14 -#define TK_NK_SLASH 15 -#define TK_NK_REM 16 -#define TK_NK_CONCAT 17 -#define TK_CREATE 18 -#define TK_ACCOUNT 19 -#define TK_NK_ID 20 -#define TK_PASS 21 -#define TK_NK_STRING 22 -#define TK_ALTER 23 -#define TK_PPS 24 -#define TK_TSERIES 25 -#define TK_STORAGE 26 -#define TK_STREAMS 27 -#define TK_QTIME 28 -#define TK_DBS 29 -#define TK_USERS 30 -#define TK_CONNS 31 -#define TK_STATE 32 -#define TK_USER 33 -#define TK_ENABLE 34 -#define TK_NK_INTEGER 35 -#define TK_SYSINFO 36 -#define TK_DROP 37 -#define TK_GRANT 38 -#define TK_ON 39 -#define TK_TO 40 -#define TK_REVOKE 41 -#define TK_FROM 42 -#define TK_SUBSCRIBE 43 -#define TK_NK_COMMA 44 -#define TK_READ 45 -#define TK_WRITE 46 -#define TK_NK_DOT 47 -#define TK_DNODE 48 -#define TK_PORT 49 -#define TK_DNODES 50 -#define TK_NK_IPTOKEN 51 -#define TK_FORCE 52 -#define TK_LOCAL 53 -#define TK_QNODE 54 -#define TK_BNODE 55 -#define TK_SNODE 56 -#define TK_MNODE 57 -#define TK_DATABASE 58 -#define TK_USE 59 -#define TK_FLUSH 60 -#define TK_TRIM 61 -#define TK_IF 62 -#define TK_NOT 63 -#define TK_EXISTS 64 -#define TK_BUFFER 65 -#define TK_CACHEMODEL 66 -#define TK_CACHESIZE 67 -#define TK_COMP 68 -#define TK_DURATION 69 -#define TK_NK_VARIABLE 70 -#define TK_MAXROWS 71 -#define TK_MINROWS 72 -#define TK_KEEP 73 -#define TK_PAGES 74 -#define TK_PAGESIZE 75 -#define TK_TSDB_PAGESIZE 76 -#define TK_PRECISION 77 -#define TK_REPLICA 78 -#define TK_VGROUPS 79 -#define TK_SINGLE_STABLE 80 -#define TK_RETENTIONS 81 -#define TK_SCHEMALESS 82 -#define TK_WAL_LEVEL 83 -#define TK_WAL_FSYNC_PERIOD 84 -#define TK_WAL_RETENTION_PERIOD 85 -#define TK_WAL_RETENTION_SIZE 86 -#define TK_WAL_ROLL_PERIOD 87 -#define TK_WAL_SEGMENT_SIZE 88 -#define TK_STT_TRIGGER 89 -#define TK_TABLE_PREFIX 90 -#define TK_TABLE_SUFFIX 91 -#define TK_NK_COLON 92 -#define TK_MAX_SPEED 93 -#define TK_TABLE 94 -#define TK_NK_LP 95 -#define TK_NK_RP 96 -#define TK_STABLE 97 -#define TK_ADD 98 -#define TK_COLUMN 99 -#define TK_MODIFY 100 -#define TK_RENAME 101 -#define TK_TAG 102 -#define TK_SET 103 -#define TK_NK_EQ 104 -#define TK_USING 105 -#define TK_TAGS 106 -#define TK_COMMENT 107 -#define TK_BOOL 108 -#define TK_TINYINT 109 -#define TK_SMALLINT 110 -#define TK_INT 111 -#define TK_INTEGER 112 -#define TK_BIGINT 113 -#define TK_FLOAT 114 -#define TK_DOUBLE 115 -#define TK_BINARY 116 -#define TK_TIMESTAMP 117 -#define TK_NCHAR 118 -#define TK_UNSIGNED 119 -#define TK_JSON 120 -#define TK_VARCHAR 121 -#define TK_MEDIUMBLOB 122 -#define TK_BLOB 123 -#define TK_VARBINARY 124 -#define TK_DECIMAL 125 -#define TK_MAX_DELAY 126 -#define TK_WATERMARK 127 -#define TK_ROLLUP 128 -#define TK_TTL 129 -#define TK_SMA 130 -#define TK_DELETE_MARK 131 -#define TK_FIRST 132 -#define TK_LAST 133 -#define TK_SHOW 134 -#define TK_PRIVILEGES 135 -#define TK_DATABASES 136 -#define TK_TABLES 137 -#define TK_STABLES 138 -#define TK_MNODES 139 -#define TK_QNODES 140 -#define TK_FUNCTIONS 141 -#define TK_INDEXES 142 -#define TK_ACCOUNTS 143 -#define TK_APPS 144 -#define TK_CONNECTIONS 145 -#define TK_LICENCES 146 -#define TK_GRANTS 147 -#define TK_QUERIES 148 -#define TK_SCORES 149 -#define TK_TOPICS 150 -#define TK_VARIABLES 151 -#define TK_CLUSTER 152 -#define TK_BNODES 153 -#define TK_SNODES 154 -#define TK_TRANSACTIONS 155 -#define TK_DISTRIBUTED 156 -#define TK_CONSUMERS 157 -#define TK_SUBSCRIPTIONS 158 -#define TK_VNODES 159 -#define TK_LIKE 160 -#define TK_TBNAME 161 -#define TK_QTAGS 162 -#define TK_AS 163 -#define TK_INDEX 164 -#define TK_FUNCTION 165 -#define TK_INTERVAL 166 -#define TK_COUNT 167 -#define TK_LAST_ROW 168 -#define TK_TOPIC 169 -#define TK_WITH 170 -#define TK_META 171 -#define TK_CONSUMER 172 -#define TK_GROUP 173 -#define TK_DESC 174 -#define TK_DESCRIBE 175 -#define TK_RESET 176 -#define TK_QUERY 177 -#define TK_CACHE 178 -#define TK_EXPLAIN 179 -#define TK_ANALYZE 180 -#define TK_VERBOSE 181 -#define TK_NK_BOOL 182 -#define TK_RATIO 183 -#define TK_NK_FLOAT 184 -#define TK_OUTPUTTYPE 185 -#define TK_AGGREGATE 186 -#define TK_BUFSIZE 187 -#define TK_STREAM 188 -#define TK_INTO 189 -#define TK_TRIGGER 190 -#define TK_AT_ONCE 191 -#define TK_WINDOW_CLOSE 192 -#define TK_IGNORE 193 -#define TK_EXPIRED 194 -#define TK_FILL_HISTORY 195 -#define TK_SUBTABLE 196 -#define TK_KILL 197 -#define TK_CONNECTION 198 -#define TK_TRANSACTION 199 -#define TK_BALANCE 200 -#define TK_VGROUP 201 -#define TK_MERGE 202 -#define TK_REDISTRIBUTE 203 -#define TK_SPLIT 204 -#define TK_DELETE 205 -#define TK_INSERT 206 -#define TK_NULL 207 -#define TK_NK_QUESTION 208 -#define TK_NK_ARROW 209 -#define TK_ROWTS 210 -#define TK_QSTART 211 -#define TK_QEND 212 -#define TK_QDURATION 213 -#define TK_WSTART 214 -#define TK_WEND 215 -#define TK_WDURATION 216 -#define TK_IROWTS 217 -#define TK_CAST 218 -#define TK_NOW 219 -#define TK_TODAY 220 -#define TK_TIMEZONE 221 -#define TK_CLIENT_VERSION 222 -#define TK_SERVER_VERSION 223 -#define TK_SERVER_STATUS 224 -#define TK_CURRENT_USER 225 -#define TK_CASE 226 -#define TK_END 227 -#define TK_WHEN 228 -#define TK_THEN 229 -#define TK_ELSE 230 -#define TK_BETWEEN 231 -#define TK_IS 232 -#define TK_NK_LT 233 -#define TK_NK_GT 234 -#define TK_NK_LE 235 -#define TK_NK_GE 236 -#define TK_NK_NE 237 -#define TK_MATCH 238 -#define TK_NMATCH 239 -#define TK_CONTAINS 240 -#define TK_IN 241 -#define TK_JOIN 242 -#define TK_INNER 243 -#define TK_SELECT 244 -#define TK_DISTINCT 245 -#define TK_WHERE 246 -#define TK_PARTITION 247 -#define TK_BY 248 -#define TK_SESSION 249 -#define TK_STATE_WINDOW 250 -#define TK_EVENT_WINDOW 251 -#define TK_START 252 -#define TK_SLIDING 253 -#define TK_FILL 254 -#define TK_VALUE 255 -#define TK_NONE 256 -#define TK_PREV 257 -#define TK_LINEAR 258 -#define TK_NEXT 259 -#define TK_HAVING 260 -#define TK_RANGE 261 -#define TK_EVERY 262 -#define TK_ORDER 263 -#define TK_SLIMIT 264 -#define TK_SOFFSET 265 -#define TK_LIMIT 266 -#define TK_OFFSET 267 -#define TK_ASC 268 -#define TK_NULLS 269 -#define TK_ABORT 270 -#define TK_AFTER 271 -#define TK_ATTACH 272 -#define TK_BEFORE 273 -#define TK_BEGIN 274 -#define TK_BITAND 275 -#define TK_BITNOT 276 -#define TK_BITOR 277 -#define TK_BLOCKS 278 -#define TK_CHANGE 279 -#define TK_COMMA 280 -#define TK_COMPACT 281 -#define TK_CONCAT 282 -#define TK_CONFLICT 283 -#define TK_COPY 284 -#define TK_DEFERRED 285 -#define TK_DELIMITERS 286 -#define TK_DETACH 287 -#define TK_DIVIDE 288 -#define TK_DOT 289 -#define TK_EACH 290 -#define TK_FAIL 291 -#define TK_FILE 292 -#define TK_FOR 293 -#define TK_GLOB 294 -#define TK_ID 295 -#define TK_IMMEDIATE 296 -#define TK_IMPORT 297 -#define TK_INITIALLY 298 -#define TK_INSTEAD 299 -#define TK_ISNULL 300 -#define TK_KEY 301 -#define TK_MODULES 302 -#define TK_NK_BITNOT 303 -#define TK_NK_SEMI 304 -#define TK_NOTNULL 305 -#define TK_OF 306 -#define TK_PLUS 307 -#define TK_PRIVILEGE 308 -#define TK_RAISE 309 -#define TK_REPLACE 310 -#define TK_RESTRICT 311 -#define TK_ROW 312 -#define TK_SEMI 313 -#define TK_STAR 314 -#define TK_STATEMENT 315 -#define TK_STRICT 316 -#define TK_STRING 317 -#define TK_TIMES 318 -#define TK_UPDATE 319 -#define TK_VALUES 320 -#define TK_VARIABLE 321 -#define TK_VIEW 322 -#define TK_WAL 323 +#define TK_OR 1 +#define TK_AND 2 +#define TK_UNION 3 +#define TK_ALL 4 +#define TK_MINUS 5 +#define TK_EXCEPT 6 +#define TK_INTERSECT 7 +#define TK_NK_BITAND 8 +#define TK_NK_BITOR 9 +#define TK_NK_LSHIFT 10 +#define TK_NK_RSHIFT 11 +#define TK_NK_PLUS 12 +#define TK_NK_MINUS 13 +#define TK_NK_STAR 14 +#define TK_NK_SLASH 15 +#define TK_NK_REM 16 +#define TK_NK_CONCAT 17 +#define TK_CREATE 18 +#define TK_ACCOUNT 19 +#define TK_NK_ID 20 +#define TK_PASS 21 +#define TK_NK_STRING 22 +#define TK_ALTER 23 +#define TK_PPS 24 +#define TK_TSERIES 25 +#define TK_STORAGE 26 +#define TK_STREAMS 27 +#define TK_QTIME 28 +#define TK_DBS 29 +#define TK_USERS 30 +#define TK_CONNS 31 +#define TK_STATE 32 +#define TK_USER 33 +#define TK_ENABLE 34 +#define TK_NK_INTEGER 35 +#define TK_SYSINFO 36 +#define TK_DROP 37 +#define TK_GRANT 38 +#define TK_ON 39 +#define TK_TO 40 +#define TK_REVOKE 41 +#define TK_FROM 42 +#define TK_SUBSCRIBE 43 +#define TK_NK_COMMA 44 +#define TK_READ 45 +#define TK_WRITE 46 +#define TK_NK_DOT 47 +#define TK_DNODE 48 +#define TK_PORT 49 +#define TK_DNODES 50 +#define TK_NK_IPTOKEN 51 +#define TK_FORCE 52 +#define TK_LOCAL 53 +#define TK_QNODE 54 +#define TK_BNODE 55 +#define TK_SNODE 56 +#define TK_MNODE 57 +#define TK_DATABASE 58 +#define TK_USE 59 +#define TK_FLUSH 60 +#define TK_TRIM 61 +#define TK_IF 62 +#define TK_NOT 63 +#define TK_EXISTS 64 +#define TK_BUFFER 65 +#define TK_CACHEMODEL 66 +#define TK_CACHESIZE 67 +#define TK_COMP 68 +#define TK_DURATION 69 +#define TK_NK_VARIABLE 70 +#define TK_MAXROWS 71 +#define TK_MINROWS 72 +#define TK_KEEP 73 +#define TK_PAGES 74 +#define TK_PAGESIZE 75 +#define TK_TSDB_PAGESIZE 76 +#define TK_PRECISION 77 +#define TK_REPLICA 78 +#define TK_VGROUPS 79 +#define TK_SINGLE_STABLE 80 +#define TK_RETENTIONS 81 +#define TK_SCHEMALESS 82 +#define TK_WAL_LEVEL 83 +#define TK_WAL_FSYNC_PERIOD 84 +#define TK_WAL_RETENTION_PERIOD 85 +#define TK_WAL_RETENTION_SIZE 86 +#define TK_WAL_ROLL_PERIOD 87 +#define TK_WAL_SEGMENT_SIZE 88 +#define TK_STT_TRIGGER 89 +#define TK_TABLE_PREFIX 90 +#define TK_TABLE_SUFFIX 91 +#define TK_NK_COLON 92 +#define TK_MAX_SPEED 93 +#define TK_TABLE 94 +#define TK_NK_LP 95 +#define TK_NK_RP 96 +#define TK_STABLE 97 +#define TK_ADD 98 +#define TK_COLUMN 99 +#define TK_MODIFY 100 +#define TK_RENAME 101 +#define TK_TAG 102 +#define TK_SET 103 +#define TK_NK_EQ 104 +#define TK_USING 105 +#define TK_TAGS 106 +#define TK_COMMENT 107 +#define TK_BOOL 108 +#define TK_TINYINT 109 +#define TK_SMALLINT 110 +#define TK_INT 111 +#define TK_INTEGER 112 +#define TK_BIGINT 113 +#define TK_FLOAT 114 +#define TK_DOUBLE 115 +#define TK_BINARY 116 +#define TK_TIMESTAMP 117 +#define TK_NCHAR 118 +#define TK_UNSIGNED 119 +#define TK_JSON 120 +#define TK_VARCHAR 121 +#define TK_MEDIUMBLOB 122 +#define TK_BLOB 123 +#define TK_VARBINARY 124 +#define TK_DECIMAL 125 +#define TK_MAX_DELAY 126 +#define TK_WATERMARK 127 +#define TK_ROLLUP 128 +#define TK_TTL 129 +#define TK_SMA 130 +#define TK_DELETE_MARK 131 +#define TK_FIRST 132 +#define TK_LAST 133 +#define TK_SHOW 134 +#define TK_PRIVILEGES 135 +#define TK_DATABASES 136 +#define TK_TABLES 137 +#define TK_STABLES 138 +#define TK_MNODES 139 +#define TK_QNODES 140 +#define TK_FUNCTIONS 141 +#define TK_INDEXES 142 +#define TK_ACCOUNTS 143 +#define TK_APPS 144 +#define TK_CONNECTIONS 145 +#define TK_LICENCES 146 +#define TK_GRANTS 147 +#define TK_QUERIES 148 +#define TK_SCORES 149 +#define TK_TOPICS 150 +#define TK_VARIABLES 151 +#define TK_CLUSTER 152 +#define TK_BNODES 153 +#define TK_SNODES 154 +#define TK_TRANSACTIONS 155 +#define TK_DISTRIBUTED 156 +#define TK_CONSUMERS 157 +#define TK_SUBSCRIPTIONS 158 +#define TK_VNODES 159 +#define TK_LIKE 160 +#define TK_TBNAME 161 +#define TK_QTAGS 162 +#define TK_AS 163 +#define TK_INDEX 164 +#define TK_FUNCTION 165 +#define TK_INTERVAL 166 +#define TK_COUNT 167 +#define TK_LAST_ROW 168 +#define TK_TOPIC 169 +#define TK_WITH 170 +#define TK_META 171 +#define TK_CONSUMER 172 +#define TK_GROUP 173 +#define TK_DESC 174 +#define TK_DESCRIBE 175 +#define TK_RESET 176 +#define TK_QUERY 177 +#define TK_CACHE 178 +#define TK_EXPLAIN 179 +#define TK_ANALYZE 180 +#define TK_VERBOSE 181 +#define TK_NK_BOOL 182 +#define TK_RATIO 183 +#define TK_NK_FLOAT 184 +#define TK_OUTPUTTYPE 185 +#define TK_AGGREGATE 186 +#define TK_BUFSIZE 187 +#define TK_STREAM 188 +#define TK_INTO 189 +#define TK_TRIGGER 190 +#define TK_AT_ONCE 191 +#define TK_WINDOW_CLOSE 192 +#define TK_IGNORE 193 +#define TK_EXPIRED 194 +#define TK_FILL_HISTORY 195 +#define TK_SUBTABLE 196 +#define TK_KILL 197 +#define TK_CONNECTION 198 +#define TK_TRANSACTION 199 +#define TK_BALANCE 200 +#define TK_VGROUP 201 +#define TK_MERGE 202 +#define TK_REDISTRIBUTE 203 +#define TK_SPLIT 204 +#define TK_DELETE 205 +#define TK_INSERT 206 +#define TK_NULL 207 +#define TK_NK_QUESTION 208 +#define TK_NK_ARROW 209 +#define TK_ROWTS 210 +#define TK_QSTART 211 +#define TK_QEND 212 +#define TK_QDURATION 213 +#define TK_WSTART 214 +#define TK_WEND 215 +#define TK_WDURATION 216 +#define TK_IROWTS 217 +#define TK_ISFILLED 218 +#define TK_CAST 219 +#define TK_NOW 220 +#define TK_TODAY 221 +#define TK_TIMEZONE 222 +#define TK_CLIENT_VERSION 223 +#define TK_SERVER_VERSION 224 +#define TK_SERVER_STATUS 225 +#define TK_CURRENT_USER 226 +#define TK_CASE 227 +#define TK_END 228 +#define TK_WHEN 229 +#define TK_THEN 230 +#define TK_ELSE 231 +#define TK_BETWEEN 232 +#define TK_IS 233 +#define TK_NK_LT 234 +#define TK_NK_GT 235 +#define TK_NK_LE 236 +#define TK_NK_GE 237 +#define TK_NK_NE 238 +#define TK_MATCH 239 +#define TK_NMATCH 240 +#define TK_CONTAINS 241 +#define TK_IN 242 +#define TK_JOIN 243 +#define TK_INNER 244 +#define TK_SELECT 245 +#define TK_DISTINCT 246 +#define TK_WHERE 247 +#define TK_PARTITION 248 +#define TK_BY 249 +#define TK_SESSION 250 +#define TK_STATE_WINDOW 251 +#define TK_EVENT_WINDOW 252 +#define TK_START 253 +#define TK_SLIDING 254 +#define TK_FILL 255 +#define TK_VALUE 256 +#define TK_NONE 257 +#define TK_PREV 258 +#define TK_LINEAR 259 +#define TK_NEXT 260 +#define TK_HAVING 261 +#define TK_RANGE 262 +#define TK_EVERY 263 +#define TK_ORDER 264 +#define TK_SLIMIT 265 +#define TK_SOFFSET 266 +#define TK_LIMIT 267 +#define TK_OFFSET 268 +#define TK_ASC 269 +#define TK_NULLS 270 +#define TK_ABORT 271 +#define TK_AFTER 272 +#define TK_ATTACH 273 +#define TK_BEFORE 274 +#define TK_BEGIN 275 +#define TK_BITAND 276 +#define TK_BITNOT 277 +#define TK_BITOR 278 +#define TK_BLOCKS 279 +#define TK_CHANGE 280 +#define TK_COMMA 281 +#define TK_COMPACT 282 +#define TK_CONCAT 283 +#define TK_CONFLICT 284 +#define TK_COPY 285 +#define TK_DEFERRED 286 +#define TK_DELIMITERS 287 +#define TK_DETACH 288 +#define TK_DIVIDE 289 +#define TK_DOT 290 +#define TK_EACH 291 +#define TK_FAIL 292 +#define TK_FILE 293 +#define TK_FOR 294 +#define TK_GLOB 295 +#define TK_ID 296 +#define TK_IMMEDIATE 297 +#define TK_IMPORT 298 +#define TK_INITIALLY 299 +#define TK_INSTEAD 300 +#define TK_ISNULL 301 +#define TK_KEY 302 +#define TK_MODULES 303 +#define TK_NK_BITNOT 304 +#define TK_NK_SEMI 305 +#define TK_NOTNULL 306 +#define TK_OF 307 +#define TK_PLUS 308 +#define TK_PRIVILEGE 309 +#define TK_RAISE 310 +#define TK_REPLACE 311 +#define TK_RESTRICT 312 +#define TK_ROW 313 +#define TK_SEMI 314 +#define TK_STAR 315 +#define TK_STATEMENT 316 +#define TK_STRICT 317 +#define TK_STRING 318 +#define TK_TIMES 319 +#define TK_UPDATE 320 +#define TK_VALUES 321 +#define TK_VARIABLE 322 +#define TK_VIEW 323 +#define TK_WAL 324 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/common/ttypes.h b/include/common/ttypes.h index 6350057c1f..d0f72fbfe5 100644 --- a/include/common/ttypes.h +++ b/include/common/ttypes.h @@ -266,6 +266,7 @@ typedef struct { #define IS_FLOAT_TYPE(_t) ((_t) == TSDB_DATA_TYPE_FLOAT || (_t) == TSDB_DATA_TYPE_DOUBLE) #define IS_INTEGER_TYPE(_t) ((IS_SIGNED_NUMERIC_TYPE(_t)) || (IS_UNSIGNED_NUMERIC_TYPE(_t))) #define IS_TIMESTAMP_TYPE(_t) ((_t) == TSDB_DATA_TYPE_TIMESTAMP) +#define IS_BOOLEAN_TYPE(_t) ((_t) == TSDB_DATA_TYPE_BOOL) #define IS_NUMERIC_TYPE(_t) ((IS_SIGNED_NUMERIC_TYPE(_t)) || (IS_UNSIGNED_NUMERIC_TYPE(_t)) || (IS_FLOAT_TYPE(_t))) #define IS_MATHABLE_TYPE(_t) \ diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index 9ca6a7a9fa..e98e341f15 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -120,6 +120,7 @@ typedef enum EFunctionType { FUNCTION_TYPE_WEND, FUNCTION_TYPE_WDURATION, FUNCTION_TYPE_IROWTS, + FUNCTION_TYPE_ISFILLED, FUNCTION_TYPE_TAGS, // internal function diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index b1054e7b85..6ea76a991a 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -225,7 +225,7 @@ typedef struct SAlterUserStmt { typedef struct SDropUserStmt { ENodeType type; - char useName[TSDB_USER_LEN]; + char userName[TSDB_USER_LEN]; } SDropUserStmt; typedef struct SCreateDnodeStmt { diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 1f266cd0ef..d023e0df63 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -117,7 +117,7 @@ typedef enum ENodeType { // Statement nodes are used in parser and planner module. QUERY_NODE_SET_OPERATOR = 100, QUERY_NODE_SELECT_STMT, - QUERY_NODE_VNODE_MODIF_STMT, + QUERY_NODE_VNODE_MODIFY_STMT, QUERY_NODE_CREATE_DATABASE_STMT, QUERY_NODE_DROP_DATABASE_STMT, QUERY_NODE_ALTER_DATABASE_STMT, diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 5805f4968b..ff3e708e77 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -364,7 +364,7 @@ typedef struct SVgDataBlocks { typedef void (*FFreeDataBlockHash)(SHashObj*); typedef void (*FFreeDataBlockArray)(SArray*); -typedef struct SVnodeModifOpStmt { +typedef struct SVnodeModifyOpStmt { ENodeType nodeType; ENodeType sqlNodeType; SArray* pDataBlocks; // data block for each vgroup, SArray. @@ -388,7 +388,7 @@ typedef struct SVnodeModifOpStmt { FFreeDataBlockArray freeArrayFunc; bool usingTableProcessing; bool fileProcessing; -} SVnodeModifOpStmt; +} SVnodeModifyOpStmt; typedef struct SExplainOptions { ENodeType type; diff --git a/packaging/release.sh b/packaging/release.sh index a3334e734d..7a8a08352f 100755 --- a/packaging/release.sh +++ b/packaging/release.sh @@ -3,7 +3,7 @@ # Generate the deb package for ubuntu, or rpm package for centos, or tar.gz package for other linux os set -e -#set -x +# set -x # release.sh -v [cluster | edge] # -c [aarch32 | aarch64 | x64 | x86 | mips64 | loongarch64...] @@ -96,6 +96,8 @@ while getopts "hv:V:c:o:l:s:d:a:n:m:H:" arg; do esac done +osType=$(uname) + echo "verMode=${verMode} verType=${verType} cpuType=${cpuType} osType=${osType} pagMode=${pagMode} soMode=${soMode} dbName=${dbName} allocator=${allocator} verNumber=${verNumber} verNumberComp=${verNumberComp} httpdBuild=${httpdBuild}" curr_dir=$(pwd) @@ -233,7 +235,12 @@ else exit 1 fi -CORES=$(grep -c ^processor /proc/cpuinfo) +ostype=`uname` +if [ "${ostype}" == "Darwin" ]; then + CORES=$(sysctl -n hw.ncpu) +else + CORES=$(grep -c ^processor /proc/cpuinfo) +fi if [[ "$allocator" == "jemalloc" ]]; then # jemalloc need compile first, so disable parallel build @@ -306,7 +313,7 @@ if [ "$osType" != "Darwin" ]; then ${csudo}./makeclient.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} else - # only make client for Darwin cd ${script_dir}/tools + ./makepkg.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${verNumberComp} ${dbName} ./makeclient.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} fi diff --git a/packaging/tools/makeclient.sh b/packaging/tools/makeclient.sh index edec338c55..db28de8dec 100755 --- a/packaging/tools/makeclient.sh +++ b/packaging/tools/makeclient.sh @@ -2,7 +2,7 @@ # # Generate tar.gz package for linux client in all os system set -e -#set -x +# set -x curr_dir=$(pwd) compile_dir=$1 @@ -249,9 +249,9 @@ if [ "$osType" != "Darwin" ]; then tar -zcv -f "$(basename ${pkg_name}).tar.gz" $(basename ${install_dir}) --remove-files || : else tar -zcv -f "$(basename ${pkg_name}).tar.gz" $(basename ${install_dir}) || : - mv "$(basename ${pkg_name}).tar.gz" .. - rm -rf ./* - mv ../"$(basename ${pkg_name}).tar.gz" . +# mv "$(basename ${pkg_name}).tar.gz" .. + rm -rf ${install_dir} ||: +# mv ../"$(basename ${pkg_name}).tar.gz" . fi cd ${curr_dir} diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 4169bed3eb..f30a8a637e 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -3,7 +3,7 @@ # Generate tar.gz package for all os system set -e -#set -x +# set -x curr_dir=$(pwd) compile_dir=$1 @@ -74,14 +74,16 @@ else tdinsight_caches="" cd ${build_dir}/bin/ && \ chmod +x TDinsight.sh - tdinsight_caches=$(./TDinsight.sh --download-only | xargs -i printf "${build_dir}/bin/{} ") + ./TDinsight.sh --download-only ||: +# tdinsight_caches=$(./TDinsight.sh --download-only | xargs -I printf "${build_dir}/bin/{} ") cd $orig_pwd echo "TDinsight caches: $tdinsight_caches" taostools_bin_files=" ${build_dir}/bin/taosdump \ ${build_dir}/bin/taosBenchmark \ ${build_dir}/bin/TDinsight.sh \ - $tdinsight_caches" + ${build_dir}/bin/tdengine-datasource.zip \ + ${build_dir}/bin/tdengine-datasource.zip.md5sum" [ -f ${build_dir}/bin/taosx ] && taosx_bin="${build_dir}/bin/taosx" bin_files="${build_dir}/bin/${serverName} \ @@ -96,8 +98,13 @@ else ${script_dir}/taosd-dump-cfg.gdb" fi -lib_files="${build_dir}/lib/libtaos.so.${version}" -wslib_files="${build_dir}/lib/libtaosws.so" +if [ "$osType" == "Darwin" ]; then + lib_files="${build_dir}/lib/libtaos.${version}.dylib" + wslib_files="${build_dir}/lib/libtaosws.dylib" +else + lib_files="${build_dir}/lib/libtaos.so.${version}" + wslib_files="${build_dir}/lib/libtaosws.so" +fi header_files="${code_dir}/include/client/taos.h ${code_dir}/include/common/taosdef.h ${code_dir}/include/util/taoserror.h ${code_dir}/include/libs/function/taosudf.h" wsheader_files="${build_dir}/include/taosws.h" @@ -226,7 +233,12 @@ if [ "$verMode" == "cloud" ]; then fi cd ${install_dir} -tar -zcv -f ${tarName} * --remove-files || : +if [ "$osType" != "Darwin" ]; then + tar -zcv -f ${tarName} * --remove-files || : +else + tar -zcv -f ${tarName} * || : +fi + exitcode=$? if [ "$exitcode" != "0" ]; then echo "tar ${tarName} error !!!" @@ -288,7 +300,7 @@ if [[ $dbName == "taos" ]]; then if [ "$verMode" == "cluster" ] || [ "$verMode" == "cloud" ]; then if [ -d "${web_dir}/admin" ] ; then mkdir -p ${install_dir}/share/ - cp ${web_dir}/admin ${install_dir}/share/ -r + cp -Rfap ${web_dir}/admin ${install_dir}/share/ cp ${web_dir}/png/taos.png ${install_dir}/share/admin/images/taos.png else echo "directory not found for enterprise release: ${web_dir}/admin" @@ -362,7 +374,15 @@ if [ "$pagMode" == "lite" ]; then pkg_name=${pkg_name}-Lite fi -tar -zcv -f "$(basename ${pkg_name}).tar.gz" "$(basename ${install_dir})" --remove-files || : + +if [ "$osType" != "Darwin" ]; then + tar -zcv -f "$(basename ${pkg_name}).tar.gz" "$(basename ${install_dir})" --remove-files || : +else + tar -zcv -f "$(basename ${pkg_name}).tar.gz" "$(basename ${install_dir})" || : + rm -rf ${install_dir} ||: + ([ -d build-taoskeeper ] && rm -rf build-taoskeeper ) ||: +fi + exitcode=$? if [ "$exitcode" != "0" ]; then echo "tar ${pkg_name}.tar.gz error !!!" @@ -371,7 +391,12 @@ fi if [ -n "${taostools_bin_files}" ]; then wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${taostools_install_dir}/bin/TDinsight.sh && echo "TDinsight.sh downloaded!"|| echo "failed to download TDinsight.sh" - tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" --remove-files || : + if [ "$osType" != "Darwin" ]; then + tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" --remove-files || : + else + tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" || : + rm -rf ${taostools_install_dir} ||: + fi exitcode=$? if [ "$exitcode" != "0" ]; then echo "tar ${taostools_pkg_name}.tar.gz error !!!" diff --git a/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h b/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h index 3b728a3142..a88bf0f7a6 100644 --- a/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h +++ b/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h @@ -260,6 +260,14 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_insertLinesImp(JN JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_schemalessInsertImp(JNIEnv *, jobject, jobjectArray, jlong, jint, jint); +/** + * Class: com_taosdata_jdbc_TSDBJNIConnector + * Method: getTableVgID + * Signature: (Ljava/lang/String;Ljava/lang/String)Lcom/taosdata/jdbc/VGroupIDResp + */ +JNIEXPORT jobject JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getTableVgID(JNIEnv *, jobject, jlong, jstring, + jstring, jobject); + #ifdef __cplusplus } #endif diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 2cb337fc4c..75a72647bd 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -76,7 +76,7 @@ static void deregisterRequest(SRequestObj *pRequest) { "current:%d, app current:%d", pRequest->self, pTscObj->id, pRequest->requestId, duration / 1000.0, num, currentInst); - if (QUERY_NODE_VNODE_MODIF_STMT == pRequest->stmtType) { + if (QUERY_NODE_VNODE_MODIFY_STMT == pRequest->stmtType) { // tscPerf("insert duration %" PRId64 "us: syntax:%" PRId64 "us, ctg:%" PRId64 "us, semantic:%" PRId64 // "us, exec:%" PRId64 "us", // duration, pRequest->metric.syntaxEnd - pRequest->metric.syntaxStart, @@ -469,6 +469,9 @@ int taos_options_imp(TSDB_OPTION option, const char *str) { case TSDB_OPTION_TIMEZONE: pItem = cfgGetItem(pCfg, "timezone"); break; + case TSDB_OPTION_USE_ADAPTER: + pItem = cfgGetItem(pCfg, "useAdapter"); + break; default: break; } diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 807c752873..15a276062f 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -739,6 +739,7 @@ int32_t handleSubmitExecRes(SRequestObj* pRequest, void* res, SCatalog* pCatalog SArray* pArray = NULL; SSubmitRsp* pRsp = (SSubmitRsp*)res; if (pRsp->nBlocks <= 0) { + taosMemoryFreeClear(pRsp->pBlocks); return TSDB_CODE_SUCCESS; } @@ -875,7 +876,7 @@ int32_t handleQueryExecRsp(SRequestObj* pRequest) { } static bool incompletaFileParsing(SNode* pStmt) { - return QUERY_NODE_VNODE_MODIF_STMT != nodeType(pStmt) ? false : ((SVnodeModifOpStmt*)pStmt)->fileProcessing; + return QUERY_NODE_VNODE_MODIFY_STMT != nodeType(pStmt) ? false : ((SVnodeModifyOpStmt*)pStmt)->fileProcessing; } // todo refacto the error code mgmt @@ -954,7 +955,7 @@ SRequestObj* launchQueryImpl(SRequestObj* pRequest, SQuery* pQuery, bool keepQue if (pQuery->pRoot && !pRequest->inRetry) { STscObj* pTscObj = pRequest->pTscObj; SAppClusterSummary* pActivity = &pTscObj->pAppInfo->summary; - if (QUERY_NODE_VNODE_MODIF_STMT == pQuery->pRoot->type) { + if (QUERY_NODE_VNODE_MODIFY_STMT == pQuery->pRoot->type) { atomic_add_fetch_64((int64_t*)&pActivity->numOfInsertsReq, 1); } else if (QUERY_NODE_SELECT_STMT == pQuery->pRoot->type) { atomic_add_fetch_64((int64_t*)&pActivity->numOfQueryReq, 1); @@ -1059,7 +1060,7 @@ static int32_t asyncExecSchQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaDat } if (TSDB_CODE_SUCCESS == code && !pRequest->validateOnly) { SArray* pNodeList = NULL; - if (QUERY_NODE_VNODE_MODIF_STMT != nodeType(pQuery->pRoot)) { + if (QUERY_NODE_VNODE_MODIFY_STMT != nodeType(pQuery->pRoot)) { buildAsyncExecNodeList(pRequest, &pNodeList, pMnodeList, pResultMeta); } diff --git a/source/client/src/clientJniConnector.c b/source/client/src/clientJniConnector.c index 34fc480432..859d4ec80f 100644 --- a/source/client/src/clientJniConnector.c +++ b/source/client/src/clientJniConnector.c @@ -488,7 +488,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchRowImp(JNIEn numOfFields); return JNI_FETCH_END; } else { - jniDebug("jobj:%p, conn:%p, interrupted query. fetch row error code: %d, msg:%s", jobj, tscon, code, taos_errstr(result)); + jniDebug("jobj:%p, conn:%p, interrupted query. fetch row error code: %d, msg:%s", jobj, tscon, code, + taos_errstr(result)); return JNI_RESULT_SET_NULL; } } @@ -583,7 +584,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchBlockImp(JNI jniDebug("jobj:%p, conn:%p, resultset:%p, no data to retrieve", jobj, tscon, (void *)res); return JNI_FETCH_END; } else { - jniError("jobj:%p, conn:%p, query interrupted. fetch block error code:%d, msg:%s", jobj, tscon, error_code, taos_errstr(tres)); + jniError("jobj:%p, conn:%p, query interrupted. fetch block error code:%d, msg:%s", jobj, tscon, error_code, + taos_errstr(tres)); return JNI_RESULT_SET_NULL; } } @@ -1028,3 +1030,62 @@ JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_schemalessInsert } return (jlong)tres; } + +// TABLE_VG_ID_FID_CACHE cache resp object for getTableVgID +typedef struct TABLE_VG_ID_FIELD_CACHE { + int cached; + jclass clazz; + jfieldID codeField; + jfieldID vgIDField; +} TABLE_VG_ID_FIELD_CACHE; + +TABLE_VG_ID_FIELD_CACHE tableVgIdFieldCache; + +void cacheTableVgIDField(JNIEnv *env, jobject jobj) { + if (tableVgIdFieldCache.cached) { + return; + } + + tableVgIdFieldCache.clazz = (*env)->GetObjectClass(env, jobj); + tableVgIdFieldCache.codeField = (*env)->GetFieldID(env, tableVgIdFieldCache.clazz, "code", "I"); + tableVgIdFieldCache.vgIDField = (*env)->GetFieldID(env, tableVgIdFieldCache.clazz, "vgID", "I"); + tableVgIdFieldCache.cached = 1; +} + +JNIEXPORT jobject JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getTableVgID(JNIEnv *env, jobject jobj, jlong conn, + jstring jdb, jstring jtable, + jobject resp) { + if (!tableVgIdFieldCache.cached) { + cacheTableVgIDField(env, resp); + } + + TAOS *taos = (TAOS *)conn; + if (taos == NULL) { + jniError("jobj:%p, connection already closed", jobj); + (*env)->SetIntField(env, resp, tableVgIdFieldCache.codeField, JNI_CONNECTION_NULL); + return resp; + } + + const char *db = NULL; + const char *table = NULL; + int vgID = 0; + + if (jdb != NULL) { + db = (*env)->GetStringUTFChars(env, jdb, NULL); + } + if (jtable != NULL) { + table = (*env)->GetStringUTFChars(env, jtable, NULL); + } + + int code = taos_get_table_vgId(taos, db, table, &vgID); + if (db != NULL) { + (*env)->ReleaseStringUTFChars(env, jdb, db); + } + if (table != NULL) { + (*env)->ReleaseStringUTFChars(env, jtable, table); + } + + (*env)->SetIntField(env, resp, tableVgIdFieldCache.codeField, code); + (*env)->SetIntField(env, resp, tableVgIdFieldCache.vgIDField, vgID); + return resp; +} diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c index 150194aa27..0b5f670c15 100644 --- a/source/client/src/clientRawBlockWrite.c +++ b/source/client/src/clientRawBlockWrite.c @@ -1211,7 +1211,8 @@ static void destroyVgHash(void* data) { taosMemoryFreeClear(vgData->data); } -int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const char* tbname, TAOS_FIELD *fields, int numFields){ +int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const char* tbname, TAOS_FIELD* fields, + int numFields) { int32_t code = TSDB_CODE_SUCCESS; STableMeta* pTableMeta = NULL; SQuery* pQuery = NULL; @@ -1267,14 +1268,14 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch uint16_t fLen = 0; int32_t rowSize = 0; int16_t nVar = 0; - for (int i = 0; i < pTableMeta->tableInfo.numOfColumns; i++) { - SSchema* schema = pTableMeta->schema + i; - fLen += TYPE_BYTES[schema->type]; - rowSize += schema->bytes; - if (IS_VAR_DATA_TYPE(schema->type)) { - nVar++; - } + for (int i = 0; i < pTableMeta->tableInfo.numOfColumns; i++) { + SSchema* schema = pTableMeta->schema + i; + fLen += TYPE_BYTES[schema->type]; + rowSize += schema->bytes; + if (IS_VAR_DATA_TYPE(schema->type)) { + nVar++; } + } fLen -= sizeof(TSKEY); @@ -1294,7 +1295,8 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch tdSRowSetTpInfo(&rb, numOfCols, fLen); int32_t dataLen = 0; - // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column length | + // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column + // length | char* pStart = pData + getVersion1BlockMetaSize(pData, numFields); int32_t* colLength = (int32_t*)pStart; pStart += sizeof(int32_t) * numFields; @@ -1326,9 +1328,9 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch for (int32_t k = 0; k < numOfCols; k++) { const SSchema* pColumn = &pTableMeta->schema[k]; int32_t* index = taosHashGet(schemaHash, pColumn->name, strlen(pColumn->name)); - if (!index) { // add none + if (!index) { // add none tdAppendColValToRow(&rb, pColumn->colId, pColumn->type, TD_VTYPE_NONE, NULL, false, offset, k); - }else{ + } else { if (IS_VAR_DATA_TYPE(pColumn->type)) { if (pCol[*index].offset[j] != -1) { char* data = pCol[*index].pData + pCol[*index].offset[j]; @@ -1377,13 +1379,13 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); nodeStmt->pDataBlocks = taosArrayInit(1, POINTER_BYTES); SVgDataBlocks* dst = taosMemoryCalloc(1, sizeof(SVgDataBlocks)); @@ -1406,7 +1408,7 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch launchQueryImpl(pRequest, pQuery, true, NULL); code = pRequest->code; - end: +end: taosMemoryFreeClear(pTableMeta); qDestroyQuery(pQuery); taosMemoryFree(subReq); @@ -1495,7 +1497,8 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname) tdSRowSetTpInfo(&rb, numOfCols, fLen); int32_t dataLen = 0; - // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column length | + // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column + // length | char* pStart = pData + getVersion1BlockMetaSize(pData, numOfCols); int32_t* colLength = (int32_t*)pStart; pStart += sizeof(int32_t) * numOfCols; @@ -1568,13 +1571,13 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname) pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); nodeStmt->pDataBlocks = taosArrayInit(1, POINTER_BYTES); SVgDataBlocks* dst = taosMemoryCalloc(1, sizeof(SVgDataBlocks)); @@ -1825,13 +1828,13 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) { pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); int32_t numOfVg = taosHashGetSize(pVgHash); nodeStmt->pDataBlocks = taosArrayInit(numOfVg, POINTER_BYTES); @@ -1873,7 +1876,6 @@ end: return code; } - static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) { int32_t code = TSDB_CODE_SUCCESS; SHashObj* pVgHash = NULL; @@ -2131,13 +2133,13 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); int32_t numOfVg = taosHashGetSize(pVgHash); nodeStmt->pDataBlocks = taosArrayInit(numOfVg, POINTER_BYTES); @@ -2167,7 +2169,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) launchQueryImpl(pRequest, pQuery, true, NULL); code = pRequest->code; - end: +end: tDeleteSTaosxRsp(&rspObj.rsp); rspObj.resInfo.pRspMsg = NULL; doFreeReqResultInfo(&rspObj.resInfo); diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index a4e943da32..8c77ef664a 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -163,9 +163,9 @@ typedef struct { SMLProtocolType protocol; int8_t precision; - bool dataFormat; // true means that the name and order of keys in each line are the same(only for influx protocol) - bool isRawLine; - int32_t ttl; + bool dataFormat; // true means that the name and order of keys in each line are the same(only for influx protocol) + bool isRawLine; + int32_t ttl; SHashObj *childTables; SHashObj *superTables; @@ -183,20 +183,20 @@ typedef struct { SHashObj *dumplicateKey; // for dumplicate key SArray *colsContainer; // for cols parse, if dataFormat == false - cJSON *root; // for parse json + cJSON *root; // for parse json } SSmlHandle; //================================================================================================= //================================================================================================= static volatile int64_t linesSmlHandleId = 0; static int64_t smlGenId() { - int64_t id; + int64_t id; - do { - id = atomic_add_fetch_64(&linesSmlHandleId, 1); + do { + id = atomic_add_fetch_64(&linesSmlHandleId, 1); } while (id == 0); - return id; + return id; } static inline bool smlDoubleToInt64OverFlow(double num) { @@ -606,7 +606,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle *info) { end: taosHashCleanup(hashTmp); taosMemoryFreeClear(pTableMeta); -// catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1); + // catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1); return code; } @@ -1534,7 +1534,7 @@ static SSmlHandle *smlBuildSmlInfo(STscObj *pTscObj, SRequestObj *request, SMLPr info->pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; info->pQuery->haveResultSet = false; info->pQuery->msgType = TDMT_VND_SUBMIT; - info->pQuery->pRoot = (SNode *)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + info->pQuery->pRoot = (SNode *)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == info->pQuery->pRoot) { uError("SML:0x%" PRIx64 " create info->pQuery->pRoot error", info->id); goto cleanup; @@ -2079,7 +2079,8 @@ static int32_t smlParseJSONString(SSmlHandle *info, cJSON *root, SSmlTableInfo * static int32_t smlParseInfluxLine(SSmlHandle *info, const char *sql, const int len) { SSmlLineInfo elements = {0}; - uDebug("SML:0x%" PRIx64 " smlParseInfluxLine raw:%d, len:%d, sql:%s", info->id, info->isRawLine, len, (info->isRawLine ? "rawdata" : sql)); + uDebug("SML:0x%" PRIx64 " smlParseInfluxLine raw:%d, len:%d, sql:%s", info->id, info->isRawLine, len, + (info->isRawLine ? "rawdata" : sql)); int ret = smlParseInfluxString(sql, sql + len, &elements, &info->msgBuf); if (ret != TSDB_CODE_SUCCESS) { @@ -2371,15 +2372,16 @@ static int32_t smlInsertData(SSmlHandle *info) { } static void smlPrintStatisticInfo(SSmlHandle *info) { - uError("SML:0x%" PRIx64 - " smlInsertLines result, code:%d,lineNum:%d,stable num:%d,ctable num:%d,create stable num:%d,alter stable tag num:%d,alter stable col num:%d \ + uError( + "SML:0x%" PRIx64 + " smlInsertLines result, code:%d,lineNum:%d,stable num:%d,ctable num:%d,create stable num:%d,alter stable tag num:%d,alter stable col num:%d \ parse cost:%" PRId64 ",schema cost:%" PRId64 ",bind cost:%" PRId64 ",rpc cost:%" PRId64 ",total cost:%" PRId64 - "", - info->id, info->cost.code, info->cost.lineNum, info->cost.numOfSTables, info->cost.numOfCTables, - info->cost.numOfCreateSTables, info->cost.numOfAlterTagSTables, info->cost.numOfAlterColSTables, - info->cost.schemaTime - info->cost.parseTime, - info->cost.insertBindTime - info->cost.schemaTime, info->cost.insertRpcTime - info->cost.insertBindTime, - info->cost.endTime - info->cost.insertRpcTime, info->cost.endTime - info->cost.parseTime); + "", + info->id, info->cost.code, info->cost.lineNum, info->cost.numOfSTables, info->cost.numOfCTables, + info->cost.numOfCreateSTables, info->cost.numOfAlterTagSTables, info->cost.numOfAlterColSTables, + info->cost.schemaTime - info->cost.parseTime, info->cost.insertBindTime - info->cost.schemaTime, + info->cost.insertRpcTime - info->cost.insertBindTime, info->cost.endTime - info->cost.insertRpcTime, + info->cost.endTime - info->cost.parseTime); } static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char *rawLineEnd, int numLines) { @@ -2593,7 +2595,7 @@ TAOS_RES *taos_schemaless_insert_inner(SRequestObj *request, char *lines[], char } info->isRawLine = (rawLine == NULL); - info->ttl = ttl; + info->ttl = ttl; int32_t perBatch = tsSmlBatchSize; @@ -2684,16 +2686,19 @@ TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int pr return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, TSDB_DEFAULT_TABLE_TTL, 0); } -TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int32_t ttl) { +TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, + int32_t ttl) { return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, ttl, 0); } -TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int64_t reqid) { - return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, TSDB_DEFAULT_TABLE_TTL, reqid); +TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision, + int64_t reqid) { + return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, TSDB_DEFAULT_TABLE_TTL, + reqid); } TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, - int precision, int32_t ttl, int64_t reqid) { + int precision, int32_t ttl, int64_t reqid) { if (NULL == taos) { terrno = TSDB_CODE_TSC_DISCONNECTED; return NULL; @@ -2727,13 +2732,18 @@ TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int return taos_schemaless_insert_inner(request, NULL, lines, lines + len, numLines, protocol, precision, ttl); } -TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int64_t reqid) { - return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, TSDB_DEFAULT_TABLE_TTL, reqid); +TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, + int precision, int64_t reqid) { + return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, + TSDB_DEFAULT_TABLE_TTL, reqid); } -TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int32_t ttl) { +TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, + int precision, int32_t ttl) { return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, ttl, 0); } -TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision) { - return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, TSDB_DEFAULT_TABLE_TTL, 0); +TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, + int precision) { + return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, + TSDB_DEFAULT_TABLE_TTL, 0); } diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 350ecdd373..c63ddea25d 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -438,6 +438,7 @@ int32_t tmqCommitCb(void* param, SDataBuf* pBuf, int32_t code) { taosMemoryFree(pParam->pOffset); taosMemoryFree(pBuf->pData); + taosMemoryFree(pBuf->pEpSet); /*tscDebug("receive offset commit cb of %s on vgId:%d, offset is %" PRId64, pParam->pOffset->subKey, pParam->->vgId, * pOffset->version);*/ @@ -724,7 +725,10 @@ void tmqAssignDelayedReportTask(void* param, void* tmrId) { } int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) { - if (pMsg && pMsg->pData) taosMemoryFree(pMsg->pData); + if (pMsg) { + taosMemoryFree(pMsg->pData); + taosMemoryFree(pMsg->pEpSet); + } return 0; } @@ -869,6 +873,8 @@ void tmqClearUnhandleMsg(tmq_t* tmq) { int32_t tmqSubscribeCb(void* param, SDataBuf* pMsg, int32_t code) { SMqSubscribeCbParam* pParam = (SMqSubscribeCbParam*)param; pParam->rspErr = code; + + taosMemoryFree(pMsg->pEpSet); tsem_post(&pParam->rspSem); return 0; } @@ -1166,6 +1172,8 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { if (code != 0) { tscWarn("msg discard from vgId:%d, epoch %d, since %s", vgId, epoch, terrstr()); if (pMsg->pData) taosMemoryFree(pMsg->pData); + if (pMsg->pEpSet) taosMemoryFree(pMsg->pEpSet); + if (code == TSDB_CODE_TMQ_CONSUMER_MISMATCH) { atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); goto CREATE_MSG_FAIL; @@ -1365,6 +1373,7 @@ int32_t tmqAskEpCb(void* param, SDataBuf* pMsg, int32_t code) { taosMemoryFree(pParam); } taosMemoryFree(pMsg->pData); + taosMemoryFree(pMsg->pEpSet); terrno = TSDB_CODE_TMQ_CONSUMER_CLOSED; return -1; } @@ -1416,6 +1425,8 @@ END: } else { taosMemoryFree(pParam); } + + taosMemoryFree(pMsg->pEpSet); taosMemoryFree(pMsg->pData); return code; } diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index f57d59fb41..9caf0cc33e 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -96,6 +96,7 @@ int32_t tsRedirectPeriod = 10; int32_t tsRedirectFactor = 2; int32_t tsRedirectMaxPeriod = 1000; int32_t tsMaxRetryWaitTime = 10000; +bool tsUseAdapter = false; /* * denote if the server needs to compress response message at the application layer to client, including query rsp, @@ -201,9 +202,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) { int32_t taosSetTfsCfg(SConfig *pCfg); #endif -struct SConfig *taosGetCfg() { - return tsCfg; -} +struct SConfig *taosGetCfg() { return tsCfg; } static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *inputCfgDir, const char *envFile, char *apolloUrl) { @@ -314,6 +313,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "smlBatchSize", tsSmlBatchSize, 1, INT32_MAX, true) != 0) return -1; if (cfgAddInt32(pCfg, "maxMemUsedByInsert", tsMaxMemUsedByInsert, 1, INT32_MAX, true) != 0) return -1; if (cfgAddInt32(pCfg, "maxRetryWaitTime", tsMaxRetryWaitTime, 0, 86400000, 0) != 0) return -1; + if (cfgAddBool(pCfg, "useAdapter", tsUseAdapter, true) != 0) return -1; tsNumOfTaskQueueThreads = tsNumOfCores / 2; tsNumOfTaskQueueThreads = TMAX(tsNumOfTaskQueueThreads, 4); @@ -668,6 +668,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) { tsQueryNodeChunkSize = cfgGetItem(pCfg, "queryNodeChunkSize")->i32; tsQueryUseNodeAllocator = cfgGetItem(pCfg, "queryUseNodeAllocator")->bval; tsKeepColumnName = cfgGetItem(pCfg, "keepColumnName")->bval; + tsUseAdapter = cfgGetItem(pCfg, "useAdapter")->bval; tsMaxRetryWaitTime = cfgGetItem(pCfg, "maxRetryWaitTime")->i32; return 0; diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 3c42f7b832..4e93a1d96e 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -174,6 +174,7 @@ typedef struct { void* param; char opername[TSDB_TRANS_OPER_LEN]; SArray* pRpcArray; + SRWLatch lockRpcArray; } STrans; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index d2fc2dc9b1..b92be19741 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -628,6 +628,7 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, pTrans->undoActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); pTrans->commitActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); pTrans->pRpcArray = taosArrayInit(1, sizeof(SRpcHandleInfo)); + taosInitRWLatch(&pTrans->lockRpcArray); if (pTrans->redoActions == NULL || pTrans->undoActions == NULL || pTrans->commitActions == NULL || pTrans->pRpcArray == NULL) { @@ -737,12 +738,14 @@ int32_t mndSetRpcInfoForDbTrans(SMnode *pMnode, SRpcMsg *pMsg, EOperType oper, c if (pTrans->oper == oper) { if (strcasecmp(dbname, pTrans->dbname) == 0) { mInfo("trans:%d, db:%s oper:%d matched with input", pTrans->id, dbname, oper); + taosWLockLatch(&pTrans->lockRpcArray); if (pTrans->pRpcArray == NULL) { - pTrans->pRpcArray = taosArrayInit(1, sizeof(SRpcHandleInfo)); + pTrans->pRpcArray = taosArrayInit(4, sizeof(SRpcHandleInfo)); } if (pTrans->pRpcArray != NULL && taosArrayPush(pTrans->pRpcArray, &pMsg->info) != NULL) { code = 0; } + taosWUnLockLatch(&pTrans->lockRpcArray); sdbRelease(pMnode->pSdb, pTrans); break; @@ -944,8 +947,12 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { pTrans->failedTimes, code); } + taosWLockLatch(&pTrans->lockRpcArray); int32_t size = taosArrayGetSize(pTrans->pRpcArray); - if (size <= 0) return; + if (size <= 0) { + taosWUnLockLatch(&pTrans->lockRpcArray); + return; + } for (int32_t i = 0; i < size; ++i) { SRpcHandleInfo *pInfo = taosArrayGet(pTrans->pRpcArray, i); @@ -997,6 +1004,7 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { } } taosArrayClear(pTrans->pRpcArray); + taosWUnLockLatch(&pTrans->lockRpcArray); } int32_t mndTransProcessRsp(SRpcMsg *pRsp) { diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 806ba0c98e..efce6255fb 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -838,9 +838,9 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock if (pUser->superUser) { cols = 0; - SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; + char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(userName, pUser->user, pShow->pMeta->pSchemas[cols].bytes); + SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataAppend(pColInfo, numOfRows, (const char *)userName, false); char privilege[20] = {0}; @@ -859,9 +859,9 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock char *db = taosHashIterate(pUser->readDbs, NULL); while (db != NULL) { cols = 0; - SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; + char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(userName, pUser->user, pShow->pMeta->pSchemas[cols].bytes); + SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataAppend(pColInfo, numOfRows, (const char *)userName, false); char privilege[20] = {0}; diff --git a/source/dnode/vnode/src/meta/metaSnapshot.c b/source/dnode/vnode/src/meta/metaSnapshot.c index 974f8a9218..054e785980 100644 --- a/source/dnode/vnode/src/meta/metaSnapshot.c +++ b/source/dnode/vnode/src/meta/metaSnapshot.c @@ -161,7 +161,10 @@ int32_t metaSnapWriterClose(SMetaSnapWriter** ppWriter, int8_t rollback) { SMetaSnapWriter* pWriter = *ppWriter; if (rollback) { + metaInfo("vgId:%d, meta snapshot writer close and rollback start ", TD_VID(pWriter->pMeta->pVnode)); code = metaAbort(pWriter->pMeta); + metaInfo("vgId:%d, meta snapshot writer close and rollback finished, code:0x%x", TD_VID(pWriter->pMeta->pVnode), + code); if (code) goto _err; } else { code = metaCommit(pWriter->pMeta, pWriter->pMeta->txn); diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 722a93137c..dc295ae5e7 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -710,6 +710,9 @@ int metaUpdateCtimeIdx(SMeta *pMeta, const SMetaEntry *pME) { if (metaBuildCtimeIdxKey(&ctimeKey, pME) < 0) { return 0; } + metaDebug("vgId:%d, start to save ctime:%" PRId64 " uid:%" PRId64 " ct:%" PRId64, TD_VID(pMeta->pVnode), pME->version, + pME->uid, ctimeKey.ctime); + return tdbTbInsert(pMeta->pCtimeIdx, &ctimeKey, sizeof(ctimeKey), NULL, 0, pMeta->txn); } diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c index c61ff343ab..266fdde2df 100644 --- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c +++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c @@ -1109,7 +1109,7 @@ static int32_t tsdbSnapWriteData(STsdbSnapWriter* pWriter, uint8_t* pData, uint3 if (pWriter->dWriter.pWriter == NULL || pWriter->fid != fid) { if (pWriter->dWriter.pWriter) { - ASSERT(fid > pWriter->fid); + // ASSERT(fid > pWriter->fid); code = tsdbSnapWriteCloseFile(pWriter); if (code) goto _err; diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 5f1b87a138..a179ec24f9 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -231,10 +231,6 @@ static const char* cacheModelStr(int8_t cacheModel) { return TSDB_CACHE_MODEL_NONE_STR; } -static const char* strictStr(int8_t strict) { - return TSDB_DB_STRICT_ON == strict ? TSDB_DB_STRICT_ON_STR : TSDB_DB_STRICT_OFF_STR; -} - static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbFName, SDbCfgInfo* pCfg) { blockDataEnsureCapacity(pBlock, 1); pBlock->info.rows = 1; @@ -269,11 +265,11 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbFName, S buf2 + VARSTR_HEADER_SIZE, "CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm " "WAL_FSYNC_PERIOD %d MAXROWS %d MINROWS %d KEEP %dm,%dm,%dm PAGES %d PAGESIZE %d PRECISION '%s' REPLICA %d " - "STRICT '%s' WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d", + "WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d", dbFName, pCfg->buffer, pCfg->cacheSize, cacheModelStr(pCfg->cacheLast), pCfg->compression, pCfg->daysPerFile, pCfg->walFsyncPeriod, pCfg->maxRows, pCfg->minRows, pCfg->daysToKeep0, pCfg->daysToKeep1, pCfg->daysToKeep2, - pCfg->pages, pCfg->pageSize, prec, pCfg->replications, strictStr(pCfg->strict), pCfg->walLevel, - pCfg->numOfVgroups, 1 == pCfg->numOfStables); + pCfg->pages, pCfg->pageSize, prec, pCfg->replications, pCfg->walLevel, pCfg->numOfVgroups, + 1 == pCfg->numOfStables); if (retentions) { len += sprintf(buf2 + VARSTR_HEADER_SIZE + len, " RETENTIONS %s", retentions); diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index a82dc13318..8db03f99c5 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -163,6 +163,10 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp if (IS_TIMESTAMP_TYPE(pExprInfo->base.resSchema.type)) { colDataAppend(pDst, rows, (char*)&pSliceInfo->current, false); continue; + } else if (IS_BOOLEAN_TYPE(pExprInfo->base.resSchema.type)) { + bool isFilled = true; + colDataAppend(pDst, pResBlock->info.rows, (char*)&isFilled, false); + continue; } int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; @@ -274,6 +278,9 @@ static void addCurrentRowToResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp* if (IS_TIMESTAMP_TYPE(pExprInfo->base.resSchema.type)) { colDataAppend(pDst, pResBlock->info.rows, (char*)&pSliceInfo->current, false); + } else if (IS_BOOLEAN_TYPE(pExprInfo->base.resSchema.type)) { + bool isFilled = false; + colDataAppend(pDst, pResBlock->info.rows, (char*)&isFilled, false); } else { int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot); diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 07e480ee1d..06406d158f 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -466,7 +466,7 @@ static int32_t translateStddevMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t static int32_t translateWduration(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // pseudo column do not need to check parameters - pFunc->node.resType = (SDataType){.bytes = sizeof(int64_t), .type = TSDB_DATA_TYPE_BIGINT}; + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; return TSDB_CODE_SUCCESS; } @@ -480,14 +480,21 @@ static int32_t translateNowToday(SFunctionNode* pFunc, char* pErrBuf, int32_t le return code; } - pFunc->node.resType = (SDataType){.bytes = sizeof(int64_t), .type = TSDB_DATA_TYPE_TIMESTAMP}; + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes, .type = TSDB_DATA_TYPE_TIMESTAMP}; return TSDB_CODE_SUCCESS; } static int32_t translateTimePseudoColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // pseudo column do not need to check parameters - pFunc->node.resType = (SDataType){.bytes = sizeof(int64_t), .type = TSDB_DATA_TYPE_TIMESTAMP}; + pFunc->node.resType = (SDataType){.bytes =tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes, .type = TSDB_DATA_TYPE_TIMESTAMP}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateIsFilledPseudoColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + // pseudo column do not need to check parameters + + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes, .type = TSDB_DATA_TYPE_BOOL}; return TSDB_CODE_SUCCESS; } @@ -3254,6 +3261,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = NULL, .finalizeFunc = NULL }, + { + .name = "_isfilled", + .type = FUNCTION_TYPE_ISFILLED, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_INTERP_PC_FUNC, + .translateFunc = translateIsFilledPseudoColumn, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = NULL, + .finalizeFunc = NULL + }, { .name = "_tags", .type = FUNCTION_TYPE_TAGS, diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 38884a37e0..af0b325f84 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -91,7 +91,7 @@ const char* nodesNodeName(ENodeType type) { return "SetOperator"; case QUERY_NODE_SELECT_STMT: return "SelectStmt"; - case QUERY_NODE_VNODE_MODIF_STMT: + case QUERY_NODE_VNODE_MODIFY_STMT: return "VnodeModifStmt"; case QUERY_NODE_CREATE_DATABASE_STMT: return "CreateDatabaseStmt"; @@ -99,6 +99,10 @@ const char* nodesNodeName(ENodeType type) { return "DropDatabaseStmt"; case QUERY_NODE_ALTER_DATABASE_STMT: return "AlterDatabaseStmt"; + case QUERY_NODE_FLUSH_DATABASE_STMT: + return "FlushDatabaseStmt"; + case QUERY_NODE_TRIM_DATABASE_STMT: + return "TrimDatabaseStmt"; case QUERY_NODE_CREATE_TABLE_STMT: return "CreateTableStmt"; case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: @@ -137,12 +141,20 @@ const char* nodesNodeName(ENodeType type) { return "CreateQnodeStmt"; case QUERY_NODE_DROP_QNODE_STMT: return "DropQnodeStmt"; + case QUERY_NODE_DROP_SNODE_STMT: + return "DropSnodeStmt"; + case QUERY_NODE_DROP_MNODE_STMT: + return "DropMnodeStmt"; case QUERY_NODE_CREATE_TOPIC_STMT: return "CreateTopicStmt"; case QUERY_NODE_DROP_TOPIC_STMT: return "DropTopicStmt"; case QUERY_NODE_ALTER_LOCAL_STMT: return "AlterLocalStmt"; + case QUERY_NODE_DROP_STREAM_STMT: + return "DropStreamStmt"; + case QUERY_NODE_SPLIT_VGROUP_STMT: + return "SplitVgroupStmt"; case QUERY_NODE_SHOW_DNODES_STMT: return "ShowDnodesStmt"; case QUERY_NODE_SHOW_MNODES_STMT: @@ -155,6 +167,8 @@ const char* nodesNodeName(ENodeType type) { return "ShowSnodesStmt"; case QUERY_NODE_SHOW_BNODES_STMT: return "ShowBnodesStmt"; + case QUERY_NODE_SHOW_CLUSTER_STMT: + return "ShowClusterStmt"; case QUERY_NODE_SHOW_DATABASES_STMT: return "ShowDatabaseStmt"; case QUERY_NODE_SHOW_FUNCTIONS_STMT: @@ -181,8 +195,30 @@ const char* nodesNodeName(ENodeType type) { return "ShowConsumersStmt"; case QUERY_NODE_SHOW_QUERIES_STMT: return "ShowQueriesStmt"; + case QUERY_NODE_SHOW_VARIABLES_STMT: + return "ShowVariablesStmt"; + case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: + return "ShowDnodeVariablesStmt"; + case QUERY_NODE_SHOW_TRANSACTIONS_STMT: + return "ShowTransactionsStmt"; + case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: + return "ShowSubscriptionsStmt"; case QUERY_NODE_SHOW_VNODES_STMT: return "ShowVnodeStmt"; + case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: + return "ShowUserPrivilegesStmt"; + case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: + return "ShowCreateDatabasesStmt"; + case QUERY_NODE_SHOW_CREATE_TABLE_STMT: + return "ShowCreateTablesStmt"; + case QUERY_NODE_SHOW_CREATE_STABLE_STMT: + return "ShowCreateStablesStmt"; + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + return "ShowTableDistributedStmt"; + case QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT: + return "ShowLocalVariablesStmt"; + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + return "ShowTableTagsStmt"; case QUERY_NODE_DELETE_STMT: return "DeleteStmt"; case QUERY_NODE_INSERT_STMT: @@ -3569,6 +3605,51 @@ static int32_t jsonToTempTableNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkJoinTableJoinType = "JoinType"; +static const char* jkJoinTableLeft = "Left"; +static const char* jkJoinTableRight = "Right"; +static const char* jkJoinTableOnCond = "OnCond"; + +static int32_t joinTableNodeToJson(const void* pObj, SJson* pJson) { + const SJoinTableNode* pNode = (const SJoinTableNode*)pObj; + + int32_t code = tableNodeToJson(pObj, pJson); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkJoinTableJoinType, pNode->joinType); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkJoinTableLeft, nodeToJson, pNode->pLeft); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkJoinTableRight, nodeToJson, pNode->pRight); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkJoinTableOnCond, nodeToJson, pNode->pOnCond); + } + + return code; +} + +static int32_t jsonToJoinTableNode(const SJson* pJson, void* pObj) { + SJoinTableNode* pNode = (SJoinTableNode*)pObj; + + int32_t code = jsonToTableNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + tjsonGetNumberValue(pJson, jkJoinTableJoinType, pNode->joinType, code); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinTableLeft, &pNode->pLeft); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinTableRight, &pNode->pRight); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinTableOnCond, &pNode->pOnCond); + } + + return code; +} + static const char* jkGroupingSetType = "GroupingSetType"; static const char* jkGroupingSetParameter = "Parameters"; @@ -4398,6 +4479,39 @@ static int32_t jsonToSelectStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkVnodeModifyOpStmtSqlNodeType = "SqlNodeType"; +static const char* jkVnodeModifyOpStmtTotalRowsNum = "TotalRowsNum"; +static const char* jkVnodeModifyOpStmtTotalTbNum = "TotalTbNum"; + +static int32_t vnodeModifyStmtToJson(const void* pObj, SJson* pJson) { + const SVnodeModifyOpStmt* pNode = (const SVnodeModifyOpStmt*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkVnodeModifyOpStmtSqlNodeType, pNode->sqlNodeType); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkVnodeModifyOpStmtTotalRowsNum, pNode->totalRowsNum); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkVnodeModifyOpStmtTotalTbNum, pNode->totalTbNum); + } + + return code; +} + +static int32_t jsonToVnodeModifyStmt(const SJson* pJson, void* pObj) { + SVnodeModifyOpStmt* pNode = (SVnodeModifyOpStmt*)pObj; + + int32_t code = TSDB_CODE_SUCCESS; + tjsonGetNumberValue(pJson, jkVnodeModifyOpStmtSqlNodeType, pNode->sqlNodeType, code); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkVnodeModifyOpStmtTotalRowsNum, &pNode->totalRowsNum); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkVnodeModifyOpStmtTotalTbNum, &pNode->totalTbNum); + } + + return code; +} + static const char* jkAlterDatabaseStmtDbName = "DbName"; static const char* jkAlterDatabaseStmtOptions = "Options"; @@ -4423,6 +4537,107 @@ static int32_t jsonToAlterDatabaseStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkTrimDatabaseStmtDbName = "DbName"; +static const char* jkTrimDatabaseStmtMaxSpeed = "MaxSpeed"; + +static int32_t trimDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const STrimDatabaseStmt* pNode = (const STrimDatabaseStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkTrimDatabaseStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTrimDatabaseStmtMaxSpeed, pNode->maxSpeed); + } + + return code; +} + +static int32_t jsonToTrimDatabaseStmt(const SJson* pJson, void* pObj) { + STrimDatabaseStmt* pNode = (STrimDatabaseStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkTrimDatabaseStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkTrimDatabaseStmtMaxSpeed, &pNode->maxSpeed); + } + + return code; +} + +static const char* jkDropTableClauseDbName = "DbName"; +static const char* jkDropTableClauseTableName = "TableName"; +static const char* jkDropTableClauseIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropTableClauseToJson(const void* pObj, SJson* pJson) { + const SDropTableClause* pNode = (const SDropTableClause*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropTableClauseDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropTableClauseTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropTableClauseIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropTableClause(const SJson* pJson, void* pObj) { + SDropTableClause* pNode = (SDropTableClause*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropTableClauseDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropTableClauseTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropTableClauseIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + +static const char* jkDropTableStmtTables = "Tables"; + +static int32_t dropTableStmtToJson(const void* pObj, SJson* pJson) { + const SDropTableStmt* pNode = (const SDropTableStmt*)pObj; + return nodeListToJson(pJson, jkDropTableStmtTables, pNode->pTables); +} + +static int32_t jsonToDropTableStmt(const SJson* pJson, void* pObj) { + SDropTableStmt* pNode = (SDropTableStmt*)pObj; + return jsonToNodeList(pJson, jkDropTableStmtTables, &pNode->pTables); +} + +static const char* jkDropSuperTableStmtDbName = "DbName"; +static const char* jkDropSuperTableStmtTableName = "TableName"; +static const char* jkDropSuperTableStmtIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropStableStmtToJson(const void* pObj, SJson* pJson) { + const SDropSuperTableStmt* pNode = (const SDropSuperTableStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropSuperTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropSuperTableStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropSuperTableStmtIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropStableStmt(const SJson* pJson, void* pObj) { + SDropSuperTableStmt* pNode = (SDropSuperTableStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropSuperTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropSuperTableStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropSuperTableStmtIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + static const char* jkAlterTableStmtDbName = "DbName"; static const char* jkAlterTableStmtTableName = "TableName"; static const char* jkAlterTableStmtAlterType = "AlterType"; @@ -4490,6 +4705,30 @@ static int32_t jsonToAlterTableStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropUserStmtUserName = "UserName"; + +static int32_t dropUserStmtToJson(const void* pObj, SJson* pJson) { + const SDropUserStmt* pNode = (const SDropUserStmt*)pObj; + return tjsonAddStringToObject(pJson, jkDropUserStmtUserName, pNode->userName); +} + +static int32_t jsonToDropUserStmt(const SJson* pJson, void* pObj) { + SDropUserStmt* pNode = (SDropUserStmt*)pObj; + return tjsonGetStringValue(pJson, jkDropUserStmtUserName, pNode->userName); +} + +static const char* jkUseDatabaseStmtDbName = "DbName"; + +static int32_t useDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const SUseDatabaseStmt* pNode = (const SUseDatabaseStmt*)pObj; + return tjsonAddStringToObject(pJson, jkUseDatabaseStmtDbName, pNode->dbName); +} + +static int32_t jsonToUseDatabaseStmt(const SJson* pJson, void* pObj) { + SUseDatabaseStmt* pNode = (SUseDatabaseStmt*)pObj; + return tjsonGetStringValue(pJson, jkUseDatabaseStmtDbName, pNode->dbName); +} + static const char* jkAlterDnodeStmtDnodeId = "DnodeId"; static const char* jkAlterDnodeStmtConfig = "Config"; static const char* jkAlterDnodeStmtValue = "Value"; @@ -4522,6 +4761,69 @@ static int32_t jsonToAlterDnodeStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropComponentNodeStmtDnodeId = "DnodeId"; + +static int32_t dropComponentNodeStmtToJson(const void* pObj, SJson* pJson) { + const SDropComponentNodeStmt* pNode = (const SDropComponentNodeStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkDropComponentNodeStmtDnodeId, pNode->dnodeId); +} + +static int32_t jsonToDropComponentNodeStmt(const SJson* pJson, void* pObj) { + SDropComponentNodeStmt* pNode = (SDropComponentNodeStmt*)pObj; + return tjsonGetIntValue(pJson, jkDropComponentNodeStmtDnodeId, &pNode->dnodeId); +} + +static int32_t dropQnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } + +static int32_t jsonToDropQnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } + +static int32_t dropSnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } + +static int32_t jsonToDropSnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } + +static int32_t dropMnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } + +static int32_t jsonToDropMnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } + +static const char* jkDropDnodeStmtDnodeId = "DnodeId"; +static const char* jkDropDnodeStmtFqdn = "Fqdn"; +static const char* jkDropDnodeStmtPort = "Port"; +static const char* jkDropDnodeStmtForce = "Force"; + +static int32_t dropDnodeStmtToJson(const void* pObj, SJson* pJson) { + const SDropDnodeStmt* pNode = (const SDropDnodeStmt*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkDropDnodeStmtDnodeId, pNode->dnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropDnodeStmtFqdn, pNode->fqdn); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkDropDnodeStmtPort, pNode->port); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropDnodeStmtForce, pNode->force); + } + + return code; +} + +static int32_t jsonToDropDnodeStmt(const SJson* pJson, void* pObj) { + SDropDnodeStmt* pNode = (SDropDnodeStmt*)pObj; + + int32_t code = tjsonGetIntValue(pJson, jkDropDnodeStmtDnodeId, &pNode->dnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropDnodeStmtFqdn, pNode->fqdn); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkDropDnodeStmtPort, &pNode->port); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropDnodeStmtForce, &pNode->force); + } + + return code; +} + static const char* jkCreateTopicStmtTopicName = "TopicName"; static const char* jkCreateTopicStmtSubscribeDbName = "SubscribeDbName"; static const char* jkCreateTopicStmtIgnoreExists = "IgnoreExists"; @@ -4561,6 +4863,328 @@ static int32_t jsonToCreateTopicStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropTopicStmtTopicName = "TopicName"; +static const char* jkDropTopicStmtIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropTopicStmtToJson(const void* pObj, SJson* pJson) { + const SDropTopicStmt* pNode = (const SDropTopicStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropTopicStmtTopicName, pNode->topicName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropTopicStmtIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropTopicStmt(const SJson* pJson, void* pObj) { + SDropTopicStmt* pNode = (SDropTopicStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropTopicStmtTopicName, pNode->topicName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropTopicStmtIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + +static const char* jkDropStreamStmtStreamName = "StreamName"; +static const char* jkDropStreamStmtIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropStreamStmtToJson(const void* pObj, SJson* pJson) { + const SDropStreamStmt* pNode = (const SDropStreamStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropStreamStmtStreamName, pNode->streamName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropStreamStmtIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropStreamStmt(const SJson* pJson, void* pObj) { + SDropStreamStmt* pNode = (SDropStreamStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropStreamStmtStreamName, pNode->streamName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropStreamStmtIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + +static const char* jkSplitVgroupStmtVgroupId = "VgroupId"; + +static int32_t splitVgroupStmtToJson(const void* pObj, SJson* pJson) { + const SSplitVgroupStmt* pNode = (const SSplitVgroupStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkSplitVgroupStmtVgroupId, pNode->vgId); +} + +static int32_t jsonToSplitVgroupStmt(const SJson* pJson, void* pObj) { + SSplitVgroupStmt* pNode = (SSplitVgroupStmt*)pObj; + return tjsonGetIntValue(pJson, jkSplitVgroupStmtVgroupId, &pNode->vgId); +} + +static const char* jkShowStmtDbName = "DbName"; +static const char* jkShowStmtTbName = "TbName"; +static const char* jkShowStmtTableCondType = "TableCondType"; + +static int32_t showStmtToJson(const void* pObj, SJson* pJson) { + const SShowStmt* pNode = (const SShowStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowStmtDbName, nodeToJson, pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowStmtTbName, nodeToJson, pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkShowStmtTableCondType, pNode->tableCondType); + } + + return code; +} + +static int32_t jsonToShowStmt(const SJson* pJson, void* pObj) { + SShowStmt* pNode = (SShowStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowStmtDbName, &pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowStmtTbName, &pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + tjsonGetNumberValue(pJson, jkShowStmtTableCondType, pNode->tableCondType, code); + } + + return code; +} + +static int32_t showDnodesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowDnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showMnodesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowMnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showQnodesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowQnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showClusterStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowClusterStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showDatabasesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowDatabasesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showFunctionsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowFunctionsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showIndexesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowIndexesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showStablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowStablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showStreamsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowStreamsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showTablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowTablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showTagsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowTagsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showUsersStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowUsersStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showVgroupsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowVgroupsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showConsumersStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowConsumersStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showVariablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowVariablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static const char* jkShowDnodeVariablesStmtDnodeId = "DnodeId"; +static const char* jkShowDnodeVariablesStmtLikePattern = "LikePattern"; + +static int32_t showDnodeVariablesStmtToJson(const void* pObj, SJson* pJson) { + const SShowDnodeVariablesStmt* pNode = (const SShowDnodeVariablesStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowDnodeVariablesStmtDnodeId, nodeToJson, pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowDnodeVariablesStmtLikePattern, nodeToJson, pNode->pLikePattern); + } + + return code; +} + +static int32_t jsonToShowDnodeVariablesStmt(const SJson* pJson, void* pObj) { + SShowDnodeVariablesStmt* pNode = (SShowDnodeVariablesStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowDnodeVariablesStmtDnodeId, &pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowDnodeVariablesStmtLikePattern, &pNode->pLikePattern); + } + + return code; +} + +static int32_t showTransactionsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowTransactionsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showSubscriptionsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowSubscriptionsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static const char* jkShowVnodesStmtDnodeId = "DnodeId"; +static const char* jkShowVnodesStmtDnodeEndpoint = "DnodeEndpoint"; + +static int32_t showVnodesStmtToJson(const void* pObj, SJson* pJson) { + const SShowVnodesStmt* pNode = (const SShowVnodesStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowVnodesStmtDnodeId, nodeToJson, pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowVnodesStmtDnodeEndpoint, nodeToJson, pNode->pDnodeEndpoint); + } + + return code; +} + +static int32_t jsonToShowVnodesStmt(const SJson* pJson, void* pObj) { + SShowVnodesStmt* pNode = (SShowVnodesStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowVnodesStmtDnodeId, &pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowVnodesStmtDnodeEndpoint, &pNode->pDnodeEndpoint); + } + + return code; +} + +static int32_t showUserPrivilegesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowUserPrivilegesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static const char* jkShowCreateDatabaseStmtDbName = "DbName"; + +static int32_t showCreateDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const SShowCreateDatabaseStmt* pNode = (const SShowCreateDatabaseStmt*)pObj; + return tjsonAddStringToObject(pJson, jkShowCreateDatabaseStmtDbName, pNode->dbName); +} + +static int32_t jsonToShowCreateDatabaseStmt(const SJson* pJson, void* pObj) { + SShowCreateDatabaseStmt* pNode = (SShowCreateDatabaseStmt*)pObj; + return tjsonGetStringValue(pJson, jkShowCreateDatabaseStmtDbName, pNode->dbName); +} + +static const char* jkShowCreateTableStmtDbName = "DbName"; +static const char* jkShowCreateTableStmtTableName = "TableName"; + +static int32_t showCreateTableStmtToJson(const void* pObj, SJson* pJson) { + const SShowCreateTableStmt* pNode = (const SShowCreateTableStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkShowCreateTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkShowCreateTableStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t jsonToShowCreateTableStmt(const SJson* pJson, void* pObj) { + SShowCreateTableStmt* pNode = (SShowCreateTableStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkShowCreateTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkShowCreateTableStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t showCreateStableStmtToJson(const void* pObj, SJson* pJson) { + return showCreateTableStmtToJson(pObj, pJson); +} + +static int32_t jsonToShowCreateStableStmt(const SJson* pJson, void* pObj) { + return jsonToShowCreateTableStmt(pJson, pObj); +} + +static const char* jkShowTableDistributedStmtDbName = "DbName"; +static const char* jkShowTableDistributedStmtTableName = "TableName"; + +static int32_t showTableDistributedStmtToJson(const void* pObj, SJson* pJson) { + const SShowTableDistributedStmt* pNode = (const SShowTableDistributedStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkShowTableDistributedStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkShowTableDistributedStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t jsonToShowTableDistributedStmt(const SJson* pJson, void* pObj) { + SShowTableDistributedStmt* pNode = (SShowTableDistributedStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkShowTableDistributedStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkShowTableDistributedStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t showLocalVariablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowLocalVariablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static const char* jkShowTableTagsStmtDbName = "DbName"; +static const char* jkShowTableTagsStmtTbName = "TbName"; +static const char* jkShowTableTagsStmtTags = "Tags"; + +static int32_t showTableTagsStmtToJson(const void* pObj, SJson* pJson) { + const SShowTableTagsStmt* pNode = (const SShowTableTagsStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowTableTagsStmtDbName, nodeToJson, pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowTableTagsStmtTbName, nodeToJson, pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkShowTableTagsStmtTags, pNode->pTags); + } + + return code; +} + +static int32_t jsonToShowTableTagsStmt(const SJson* pJson, void* pObj) { + SShowTableTagsStmt* pNode = (SShowTableTagsStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowTableTagsStmtDbName, &pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowTableTagsStmtTbName, &pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkShowTableTagsStmtTags, &pNode->pTags); + } + + return code; +} + static const char* jkDeleteStmtFromTable = "FromTable"; static const char* jkDeleteStmtWhere = "Where"; static const char* jkDeleteStmtCountFunc = "CountFunc"; @@ -4645,7 +5269,7 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_TEMP_TABLE: return tempTableNodeToJson(pObj, pJson); case QUERY_NODE_JOIN_TABLE: - break; + return joinTableNodeToJson(pObj, pJson); case QUERY_NODE_GROUPING_SET: return groupingSetNodeToJson(pObj, pJson); case QUERY_NODE_ORDER_BY_EXPR: @@ -4688,25 +5312,98 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return setOperatorToJson(pObj, pJson); case QUERY_NODE_SELECT_STMT: return selectStmtToJson(pObj, pJson); - case QUERY_NODE_VNODE_MODIF_STMT: + case QUERY_NODE_VNODE_MODIFY_STMT: + return vnodeModifyStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_DATABASE_STMT: break; case QUERY_NODE_ALTER_DATABASE_STMT: return alterDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_TRIM_DATABASE_STMT: + return trimDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TABLE_STMT: break; + case QUERY_NODE_DROP_TABLE_CLAUSE: + return dropTableClauseToJson(pObj, pJson); + case QUERY_NODE_DROP_TABLE_STMT: + return dropTableStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_SUPER_TABLE_STMT: + return dropStableStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_TABLE_STMT: return alterTableStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_USER_STMT: + return dropUserStmtToJson(pObj, pJson); case QUERY_NODE_USE_DATABASE_STMT: - break; + return useDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_DNODE_STMT: + return dropDnodeStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_DNODE_STMT: return alterDnodeStmtToJson(pObj, pJson); - case QUERY_NODE_SHOW_DATABASES_STMT: - case QUERY_NODE_SHOW_TABLES_STMT: - case QUERY_NODE_SHOW_TAGS_STMT: - break; + case QUERY_NODE_DROP_QNODE_STMT: + return dropQnodeStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_SNODE_STMT: + return dropSnodeStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_MNODE_STMT: + return dropMnodeStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TOPIC_STMT: return createTopicStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_TOPIC_STMT: + return dropTopicStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_STREAM_STMT: + return dropStreamStmtToJson(pObj, pJson); + case QUERY_NODE_SPLIT_VGROUP_STMT: + return splitVgroupStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_DNODES_STMT: + return showDnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_MNODES_STMT: + return showMnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_QNODES_STMT: + return showQnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CLUSTER_STMT: + return showClusterStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_DATABASES_STMT: + return showDatabasesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_FUNCTIONS_STMT: + return showFunctionsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_INDEXES_STMT: + return showIndexesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_STABLES_STMT: + return showStablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_STREAMS_STMT: + return showStreamsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TABLES_STMT: + return showTablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TAGS_STMT: + return showTagsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_USERS_STMT: + return showUsersStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_VGROUPS_STMT: + return showVgroupsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CONSUMERS_STMT: + return showConsumersStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_VARIABLES_STMT: + return showVariablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: + return showDnodeVariablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TRANSACTIONS_STMT: + return showTransactionsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: + return showSubscriptionsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_VNODES_STMT: + return showVnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: + return showUserPrivilegesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: + return showCreateDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CREATE_TABLE_STMT: + return showCreateTableStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CREATE_STABLE_STMT: + return showCreateStableStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + return showTableDistributedStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT: + return showLocalVariablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + return showTableTagsStmtToJson(pObj, pJson); case QUERY_NODE_DELETE_STMT: return deleteStmtToJson(pObj, pJson); case QUERY_NODE_LOGIC_PLAN_SCAN: @@ -4827,6 +5524,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToRealTableNode(pJson, pObj); case QUERY_NODE_TEMP_TABLE: return jsonToTempTableNode(pJson, pObj); + case QUERY_NODE_JOIN_TABLE: + return jsonToJoinTableNode(pJson, pObj); case QUERY_NODE_GROUPING_SET: return jsonToGroupingSetNode(pJson, pObj); case QUERY_NODE_ORDER_BY_EXPR: @@ -4865,14 +5564,94 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToSetOperator(pJson, pObj); case QUERY_NODE_SELECT_STMT: return jsonToSelectStmt(pJson, pObj); + case QUERY_NODE_VNODE_MODIFY_STMT: + return jsonToVnodeModifyStmt(pJson, pObj); case QUERY_NODE_ALTER_DATABASE_STMT: return jsonToAlterDatabaseStmt(pJson, pObj); + case QUERY_NODE_TRIM_DATABASE_STMT: + return jsonToTrimDatabaseStmt(pJson, pObj); + case QUERY_NODE_DROP_TABLE_CLAUSE: + return jsonToDropTableClause(pJson, pObj); + case QUERY_NODE_DROP_TABLE_STMT: + return jsonToDropTableStmt(pJson, pObj); + case QUERY_NODE_DROP_SUPER_TABLE_STMT: + return jsonToDropStableStmt(pJson, pObj); case QUERY_NODE_ALTER_TABLE_STMT: return jsonToAlterTableStmt(pJson, pObj); + case QUERY_NODE_DROP_USER_STMT: + return jsonToDropUserStmt(pJson, pObj); + case QUERY_NODE_USE_DATABASE_STMT: + return jsonToUseDatabaseStmt(pJson, pObj); + case QUERY_NODE_DROP_DNODE_STMT: + return jsonToDropDnodeStmt(pJson, pObj); case QUERY_NODE_ALTER_DNODE_STMT: return jsonToAlterDnodeStmt(pJson, pObj); + case QUERY_NODE_DROP_QNODE_STMT: + return jsonToDropQnodeStmt(pJson, pObj); + case QUERY_NODE_DROP_SNODE_STMT: + return jsonToDropSnodeStmt(pJson, pObj); + case QUERY_NODE_DROP_MNODE_STMT: + return jsonToDropMnodeStmt(pJson, pObj); case QUERY_NODE_CREATE_TOPIC_STMT: return jsonToCreateTopicStmt(pJson, pObj); + case QUERY_NODE_DROP_TOPIC_STMT: + return jsonToDropTopicStmt(pJson, pObj); + case QUERY_NODE_DROP_STREAM_STMT: + return jsonToDropStreamStmt(pJson, pObj); + case QUERY_NODE_SPLIT_VGROUP_STMT: + return jsonToSplitVgroupStmt(pJson, pObj); + case QUERY_NODE_SHOW_DNODES_STMT: + return jsonToShowDnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_MNODES_STMT: + return jsonToShowMnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_QNODES_STMT: + return jsonToShowQnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_CLUSTER_STMT: + return jsonToShowClusterStmt(pJson, pObj); + case QUERY_NODE_SHOW_DATABASES_STMT: + return jsonToShowDatabasesStmt(pJson, pObj); + case QUERY_NODE_SHOW_FUNCTIONS_STMT: + return jsonToShowFunctionsStmt(pJson, pObj); + case QUERY_NODE_SHOW_INDEXES_STMT: + return jsonToShowIndexesStmt(pJson, pObj); + case QUERY_NODE_SHOW_STABLES_STMT: + return jsonToShowStablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_STREAMS_STMT: + return jsonToShowStreamsStmt(pJson, pObj); + case QUERY_NODE_SHOW_TABLES_STMT: + return jsonToShowTablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_TAGS_STMT: + return jsonToShowTagsStmt(pJson, pObj); + case QUERY_NODE_SHOW_USERS_STMT: + return jsonToShowUsersStmt(pJson, pObj); + case QUERY_NODE_SHOW_VGROUPS_STMT: + return jsonToShowVgroupsStmt(pJson, pObj); + case QUERY_NODE_SHOW_CONSUMERS_STMT: + return jsonToShowConsumersStmt(pJson, pObj); + case QUERY_NODE_SHOW_VARIABLES_STMT: + return jsonToShowVariablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: + return jsonToShowDnodeVariablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_TRANSACTIONS_STMT: + return jsonToShowTransactionsStmt(pJson, pObj); + case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: + return jsonToShowSubscriptionsStmt(pJson, pObj); + case QUERY_NODE_SHOW_VNODES_STMT: + return jsonToShowVnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: + return jsonToShowUserPrivilegesStmt(pJson, pObj); + case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: + return jsonToShowCreateDatabaseStmt(pJson, pObj); + case QUERY_NODE_SHOW_CREATE_TABLE_STMT: + return jsonToShowCreateTableStmt(pJson, pObj); + case QUERY_NODE_SHOW_CREATE_STABLE_STMT: + return jsonToShowCreateStableStmt(pJson, pObj); + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + return jsonToShowTableDistributedStmt(pJson, pObj); + case QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT: + return jsonToShowLocalVariablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + return jsonToShowTableTagsStmt(pJson, pObj); case QUERY_NODE_DELETE_STMT: return jsonToDeleteStmt(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_SCAN: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 7980c58dcf..1981272785 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -305,8 +305,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SSetOperator)); case QUERY_NODE_SELECT_STMT: return makeNode(type, sizeof(SSelectStmt)); - case QUERY_NODE_VNODE_MODIF_STMT: - return makeNode(type, sizeof(SVnodeModifOpStmt)); + case QUERY_NODE_VNODE_MODIFY_STMT: + return makeNode(type, sizeof(SVnodeModifyOpStmt)); case QUERY_NODE_CREATE_DATABASE_STMT: return makeNode(type, sizeof(SCreateDatabaseStmt)); case QUERY_NODE_DROP_DATABASE_STMT: @@ -818,8 +818,8 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode((SNode*)pStmt->pSlimit); break; } - case QUERY_NODE_VNODE_MODIF_STMT: { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pNode; + case QUERY_NODE_VNODE_MODIFY_STMT: { + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pNode; destroyVgDataBlockArray(pStmt->pDataBlocks); taosMemoryFreeClear(pStmt->pTableMeta); taosHashCleanup(pStmt->pVgroupsHashObj); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index aec8558d00..cd1260584e 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -741,6 +741,7 @@ pseudo_column(A) ::= WSTART(B). pseudo_column(A) ::= WEND(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= WDURATION(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= IROWTS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } +pseudo_column(A) ::= ISFILLED(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= QTAGS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } function_expression(A) ::= function_name(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 446f758ed7..3307f560dc 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1474,7 +1474,7 @@ SNode* createDropUserStmt(SAstCreateContext* pCxt, SToken* pUserName) { } SDropUserStmt* pStmt = (SDropUserStmt*)nodesMakeNode(QUERY_NODE_DROP_USER_STMT); CHECK_OUT_OF_MEM(pStmt); - COPY_STRING_FORM_ID_TOKEN(pStmt->useName, pUserName); + COPY_STRING_FORM_ID_TOKEN(pStmt->userName, pUserName); return (SNode*)pStmt; } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index f90a42add3..92b9e67f37 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -245,6 +245,10 @@ static int32_t collectMetaKeyFromCreateTable(SCollectMetaKeyCxt* pCxt, SCreateTa if (TSDB_CODE_SUCCESS == code && NULL == pStmt->pTags) { code = reserveTableVgroupInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, pCxt->pMetaCache); } + if (TSDB_CODE_SUCCESS == code) { + code = reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, pStmt->dbName, AUTH_TYPE_WRITE, + pCxt->pMetaCache); + } return code; } @@ -261,6 +265,10 @@ static int32_t collectMetaKeyFromCreateMultiTable(SCollectMetaKeyCxt* pCxt, SCre if (TSDB_CODE_SUCCESS == code) { code = reserveTableVgroupInCache(pCxt->pParseCxt->acctId, pClause->dbName, pClause->tableName, pCxt->pMetaCache); } + if (TSDB_CODE_SUCCESS == code) { + code = reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, pClause->dbName, AUTH_TYPE_WRITE, + pCxt->pMetaCache); + } if (TSDB_CODE_SUCCESS != code) { break; } @@ -351,38 +359,59 @@ static int32_t collectMetaKeyFromCreateStream(SCollectMetaKeyCxt* pCxt, SCreateS } static int32_t collectMetaKeyFromShowDnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_DNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_DNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowMnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowModules(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MODULES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MODULES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowQnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_QNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_QNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowSnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_SNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_SNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowBnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_BNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_BNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowCluster(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_CLUSTER, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_CLUSTER, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowDatabases(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index f7ab4fccbe..4a2806511d 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -78,7 +78,7 @@ static int32_t authSetOperator(SAuthCxt* pCxt, SSetOperator* pSetOper) { } static int32_t authDropUser(SAuthCxt* pCxt, SDropUserStmt* pStmt) { - if (!pCxt->pParseCxt->isSuperUser || 0 == strcmp(pStmt->useName, TSDB_DEFAULT_USER)) { + if (!pCxt->pParseCxt->isSuperUser || 0 == strcmp(pStmt->userName, TSDB_DEFAULT_USER)) { return TSDB_CODE_PAR_PERMISSION_DENIED; } return TSDB_CODE_SUCCESS; @@ -104,6 +104,22 @@ static int32_t authShowCreateTable(SAuthCxt* pCxt, SShowCreateTableStmt* pStmt) return checkAuth(pCxt, pStmt->dbName, AUTH_TYPE_READ); } +static int32_t authCreateTable(SAuthCxt* pCxt, SCreateTableStmt* pStmt) { + return checkAuth(pCxt, pStmt->dbName, AUTH_TYPE_WRITE); +} + +static int32_t authCreateMultiTable(SAuthCxt* pCxt, SCreateMultiTableStmt* pStmt) { + int32_t code = TSDB_CODE_SUCCESS; + SNode* pNode = NULL; + FOREACH(pNode, pStmt->pSubTables) { + code = checkAuth(pCxt, ((SCreateSubTableClause*)pNode)->dbName, AUTH_TYPE_WRITE); + if (TSDB_CODE_SUCCESS != code) { + break; + } + } + return code; +} + static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { switch (nodeType(pStmt)) { case QUERY_NODE_SET_OPERATOR: @@ -116,6 +132,10 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { return authDelete(pCxt, (SDeleteStmt*)pStmt); case QUERY_NODE_INSERT_STMT: return authInsert(pCxt, (SInsertStmt*)pStmt); + case QUERY_NODE_CREATE_TABLE_STMT: + return authCreateTable(pCxt, (SCreateTableStmt*)pStmt); + case QUERY_NODE_CREATE_MULTI_TABLE_STMT: + return authCreateMultiTable(pCxt, (SCreateMultiTableStmt*)pStmt); case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index a6bead89aa..f7415b9ba8 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -155,7 +155,7 @@ static int32_t ignoreUsingClause(SInsertParseContext* pCxt, const char** pSql) { return code; } -static int32_t parseDuplicateUsingClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pDuplicate) { +static int32_t parseDuplicateUsingClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool* pDuplicate) { *pDuplicate = false; char tbFName[TSDB_TABLE_FNAME_LEN]; @@ -518,7 +518,7 @@ static int32_t parseTagToken(const char** end, SToken* pToken, SSchema* pSchema, // input pStmt->pSql: [(tag1_name, ...)] TAGS (tag1_value, ...) ... // output pStmt->pSql: TAGS (tag1_value, ...) ... -static int32_t parseBoundTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseBoundTagsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SSchema* pTagsSchema = getTableTagSchema(pStmt->pTableMeta); insSetBoundColumnInfo(&pCxt->tags, pTagsSchema, getNumOfTags(pStmt->pTableMeta)); @@ -533,7 +533,7 @@ static int32_t parseBoundTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt return parseBoundColumns(pCxt, &pStmt->pSql, true, &pCxt->tags, pTagsSchema); } -static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SSchema* pTagSchema, SToken* pToken, +static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SSchema* pTagSchema, SToken* pToken, SArray* pTagName, SArray* pTagVals, STag** pTag) { if (!isNullValue(pTagSchema->type, pToken)) { taosArrayPush(pTagName, pTagSchema->name); @@ -561,7 +561,7 @@ static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt return code; } -static void buildCreateTbReq(SVnodeModifOpStmt* pStmt, STag* pTag, SArray* pTagName) { +static void buildCreateTbReq(SVnodeModifyOpStmt* pStmt, STag* pTag, SArray* pTagName) { insBuildCreateTbReq(&pStmt->createTblReq, pStmt->targetTableName.tname, pTag, pStmt->pTableMeta->suid, pStmt->usingTableName.tname, pTagName, pStmt->pTableMeta->tableInfo.numOfTags, TSDB_DEFAULT_TABLE_TTL); @@ -591,7 +591,7 @@ static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMs } // pSql -> tag1_value, ...) -static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { int32_t code = TSDB_CODE_SUCCESS; SSchema* pSchema = getTableTagSchema(pStmt->pTableMeta); SArray* pTagVals = taosArrayInit(pCxt->tags.numOfBound, sizeof(STagVal)); @@ -649,7 +649,7 @@ static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* // input pStmt->pSql: TAGS (tag1_value, ...) [table_options] ... // output pStmt->pSql: [table_options] ... -static int32_t parseTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseTagsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; NEXT_TOKEN(pStmt->pSql, token); if (TK_TAGS != token.type) { @@ -673,7 +673,7 @@ static int32_t parseTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt return code; } -static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { pStmt->pTableMeta->suid = pStmt->pTableMeta->uid; pStmt->pTableMeta->uid = pStmt->totalTbNum; pStmt->pTableMeta->tableType = TSDB_CHILD_TABLE; @@ -688,7 +688,7 @@ static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStm return taosHashPut(pStmt->pSubTableHashObj, tbFName, strlen(tbFName), &pBackup, POINTER_BYTES); } -static int32_t parseTableOptions(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseTableOptions(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { do { int32_t index = 0; SToken token; @@ -731,7 +731,7 @@ static int32_t parseTableOptions(SInsertParseContext* pCxt, SVnodeModifOpStmt* p // output pStmt->pSql: // 1. [(field1_name, ...)] // 2. VALUES ... | FILE ... -static int32_t parseUsingClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseUsingClauseBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (!pStmt->usingTableProcessing || pCxt->usingDuplicateTable) { return TSDB_CODE_SUCCESS; } @@ -805,7 +805,7 @@ static int32_t getTableMeta(SInsertParseContext* pCxt, SName* pTbName, bool isSt return code; } -static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool isStb, bool* pMissCache) { +static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool isStb, bool* pMissCache) { int32_t code = TSDB_CODE_SUCCESS; SVgroupInfo vg; bool exists = true; @@ -830,7 +830,7 @@ static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, boo return code; } -static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pMissCache) { +static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool* pMissCache) { SVgroupInfo vg; int32_t code = catalogGetCachedTableVgMeta(pCxt->pCatalog, &pStmt->targetTableName, &vg, &pStmt->pTableMeta); if (TSDB_CODE_SUCCESS == code) { @@ -842,7 +842,7 @@ static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifOpStmt* return code; } -static int32_t getTableMetaAndVgroup(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pMissCache) { +static int32_t getTableMetaAndVgroup(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool* pMissCache) { SParseContext* pComCxt = pCxt->pComCxt; int32_t code = TSDB_CODE_SUCCESS; if (pComCxt->async) { @@ -868,25 +868,16 @@ static int32_t collectUseDatabase(const SName* pName, SHashObj* pDbs) { return taosHashPut(pDbs, dbFName, strlen(dbFName), dbFName, sizeof(dbFName)); } -static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (pCxt->forceUpdate) { pCxt->missCache = true; return TSDB_CODE_SUCCESS; } int32_t code = checkAuth(pCxt->pComCxt, &pStmt->targetTableName, &pCxt->missCache); -#if 0 - if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, &pCxt->missCache); - } - if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - code = getTableVgroup(pCxt->pComCxt, pStmt, false, &pCxt->missCache); - } -#else if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { code = getTableMetaAndVgroup(pCxt, pStmt, &pCxt->missCache); } -#endif if (TSDB_CODE_SUCCESS == code && !pCxt->pComCxt->async) { code = collectUseDatabase(&pStmt->targetTableName, pStmt->pDbFNameHashObj); if (TSDB_CODE_SUCCESS == code) { @@ -896,11 +887,11 @@ static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt return code; } -static int32_t preParseUsingTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t preParseUsingTableName(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { return insCreateSName(&pStmt->usingTableName, pTbName, pCxt->pComCxt->acctId, pCxt->pComCxt->db, &pCxt->msg); } -static int32_t getUsingTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t getUsingTableSchema(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (pCxt->forceUpdate) { pCxt->missCache = true; return TSDB_CODE_SUCCESS; @@ -922,7 +913,7 @@ static int32_t getUsingTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* return code; } -static int32_t parseUsingTableNameImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseUsingTableNameImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; NEXT_TOKEN(pStmt->pSql, token); int32_t code = preParseUsingTableName(pCxt, pStmt, &token); @@ -941,7 +932,7 @@ static int32_t parseUsingTableNameImpl(SInsertParseContext* pCxt, SVnodeModifOpS // output pStmt->pSql: // 1. [(tag1_name, ...)] TAGS (tag1_value, ...) [table_options]] ... // 2. VALUES ... | FILE ... -static int32_t parseUsingTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseUsingTableName(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; int32_t index = 0; NEXT_TOKEN_KEEP_SQL(pStmt->pSql, token, index); @@ -959,7 +950,7 @@ static int32_t parseUsingTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* return code; } -static int32_t preParseTargetTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t preParseTargetTableName(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { return insCreateSName(&pStmt->targetTableName, pTbName, pCxt->pComCxt->acctId, pCxt->pComCxt->db, &pCxt->msg); } @@ -970,7 +961,7 @@ static int32_t preParseTargetTableName(SInsertParseContext* pCxt, SVnodeModifOpS // output pStmt->pSql: // 1. [ USING ... ] ... // 2. VALUES ... | FILE ... -static int32_t preParseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t preParseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; int32_t index = 0; NEXT_TOKEN_KEEP_SQL(pStmt->pSql, token, index); @@ -984,7 +975,7 @@ static int32_t preParseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModif return skipParentheses(pCxt, &pStmt->pSql); } -static int32_t getTableDataBlocks(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks** pDataBuf) { +static int32_t getTableDataBlocks(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks** pDataBuf) { if (pCxt->pComCxt->async) { uint64_t uid = pStmt->pTableMeta->uid; if (pStmt->usingTableProcessing) { @@ -1002,7 +993,7 @@ static int32_t getTableDataBlocks(SInsertParseContext* pCxt, SVnodeModifOpStmt* pDataBuf, NULL, &pStmt->createTblReq); } -static int32_t parseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, +static int32_t parseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf) { SToken token; int32_t index = 0; @@ -1029,7 +1020,7 @@ static int32_t parseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifOpS // 1. [(tag1_name, ...)] ... // 2. VALUES ... | FILE ... // output pStmt->pSql: VALUES ... | FILE ... -static int32_t parseSchemaClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, +static int32_t parseSchemaClauseBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks** pDataBuf) { int32_t code = parseUsingClauseBottom(pCxt, pStmt); if (TSDB_CODE_SUCCESS == code) { @@ -1045,7 +1036,7 @@ static int32_t parseSchemaClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpS // output pStmt->pSql: // 1. [(tag1_name, ...)] ... // 2. VALUES ... | FILE ... -static int32_t parseSchemaClauseTop(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t parseSchemaClauseTop(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { int32_t code = preParseTargetTableName(pCxt, pStmt, pTbName); if (TSDB_CODE_SUCCESS == code) { // option: [(field1_name, ...)] @@ -1337,7 +1328,7 @@ static int32_t allocateMemIfNeed(STableDataBlocks* pDataBlock, int32_t rowSize, } // pSql -> (field1_value, ...) [(field1_value2, ...) ...] -static int32_t parseValues(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseValues(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, int32_t maxRows, int32_t* pNumOfRows, SToken* pToken) { int32_t code = insInitRowBuilder(&pDataBuf->rowBuilder, pDataBuf->pTableMeta->sversion, &pDataBuf->boundColumnInfo); @@ -1383,7 +1374,7 @@ static int32_t parseValues(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, } // VALUES (field1_value, ...) [(field1_value2, ...) ...] -static int32_t parseValuesClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseValuesClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, SToken* pToken) { int32_t maxNumOfRows = 0; int32_t numOfRows = 0; @@ -1403,7 +1394,7 @@ static int32_t parseValuesClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* p return code; } -static int32_t parseCsvFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseCsvFile(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, int maxRows, int32_t* pNumOfRows) { int32_t code = insInitRowBuilder(&pDataBuf->rowBuilder, pDataBuf->pTableMeta->sversion, &pDataBuf->boundColumnInfo); @@ -1461,7 +1452,7 @@ static int32_t parseCsvFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, return code; } -static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf) { +static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf) { int32_t maxNumOfRows = 0; int32_t numOfRows = 0; int32_t code = allocateMemIfNeed(pDataBuf, insGetExtendedRowSize(pDataBuf), &maxNumOfRows); @@ -1485,7 +1476,7 @@ static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifOpStm return code; } -static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pFilePath, +static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pFilePath, STableDataBlocks* pDataBuf) { char filePathStr[TSDB_FILENAME_LEN] = {0}; if (TK_NK_STRING == pFilePath->type) { @@ -1501,8 +1492,12 @@ static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* p return parseDataFromFileImpl(pCxt, pStmt, pDataBuf); } -static int32_t parseFileClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseFileClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, SToken* pToken) { + if (tsUseAdapter) { + return buildInvalidOperationMsg(&pCxt->msg, "proxy mode does not support csv loading"); + } + NEXT_TOKEN(pStmt->pSql, *pToken); if (0 == pToken->n || (TK_NK_STRING != pToken->type && TK_NK_ID != pToken->type)) { return buildSyntaxErrMsg(&pCxt->msg, "file path is required following keyword FILE", pToken->z); @@ -1511,7 +1506,7 @@ static int32_t parseFileClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt } // VALUES (field1_value, ...) [(field1_value2, ...) ...] | FILE csv_file_path -static int32_t parseDataClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf) { +static int32_t parseDataClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf) { SToken token; NEXT_TOKEN(pStmt->pSql, token); switch (token.type) { @@ -1528,7 +1523,7 @@ static int32_t parseDataClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt // input pStmt->pSql: // 1. [(tag1_name, ...)] ... // 2. VALUES ... | FILE ... -static int32_t parseInsertTableClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertTableClauseBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { STableDataBlocks* pDataBuf = NULL; int32_t code = parseSchemaClauseBottom(pCxt, pStmt, &pDataBuf); if (TSDB_CODE_SUCCESS == code) { @@ -1537,7 +1532,7 @@ static int32_t parseInsertTableClauseBottom(SInsertParseContext* pCxt, SVnodeMod return code; } -static void resetEnvPreTable(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static void resetEnvPreTable(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { destroyBoundColumnInfo(&pCxt->tags); taosMemoryFreeClear(pStmt->pTableMeta); tdDestroySVCreateTbReq(&pStmt->createTblReq); @@ -1549,7 +1544,7 @@ static void resetEnvPreTable(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt } // input pStmt->pSql: [(field1_name, ...)] [ USING ... ] VALUES ... | FILE ... -static int32_t parseInsertTableClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t parseInsertTableClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { resetEnvPreTable(pCxt, pStmt); int32_t code = parseSchemaClauseTop(pCxt, pStmt, pTbName); if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { @@ -1558,7 +1553,7 @@ static int32_t parseInsertTableClause(SInsertParseContext* pCxt, SVnodeModifOpSt return code; } -static int32_t checkTableClauseFirstToken(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName, +static int32_t checkTableClauseFirstToken(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName, bool* pHasData) { // no data in the sql string anymore. if (0 == pTbName->n) { @@ -1597,7 +1592,7 @@ static int32_t checkTableClauseFirstToken(SInsertParseContext* pCxt, SVnodeModif return TSDB_CODE_SUCCESS; } -static int32_t setStmtInfo(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t setStmtInfo(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SParsedDataColInfo* tags = taosMemoryMalloc(sizeof(pCxt->tags)); if (NULL == tags) { return TSDB_CODE_OUT_OF_MEMORY; @@ -1615,7 +1610,7 @@ static int32_t setStmtInfo(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) return code; } -static int32_t parseInsertBodyBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertBodyBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (TSDB_QUERY_HAS_TYPE(pStmt->insertType, TSDB_QUERY_TYPE_STMT_INSERT)) { return setStmtInfo(pCxt, pStmt); } @@ -1636,7 +1631,7 @@ static int32_t parseInsertBodyBottom(SInsertParseContext* pCxt, SVnodeModifOpStm // [(field1_name, ...)] // VALUES (field1_value, ...) [(field1_value2, ...) ...] | FILE csv_file_path // [...]; -static int32_t parseInsertBody(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertBody(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; int32_t code = TSDB_CODE_SUCCESS; bool hasData = true; @@ -1659,7 +1654,7 @@ static int32_t parseInsertBody(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt static void destroySubTableHashElem(void* p) { taosMemoryFree(*(STableMeta**)p); } static int32_t createVnodeModifOpStmt(SInsertParseContext* pCxt, bool reentry, SNode** pOutput) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pStmt) { return TSDB_CODE_OUT_OF_MEMORY; } @@ -1726,6 +1721,8 @@ static int32_t getTableMetaFromMetaData(const SArray* pTables, STableMeta** pMet if (1 != taosArrayGetSize(pTables)) { return TSDB_CODE_FAILED; } + + taosMemoryFreeClear(*pMeta); SMetaRes* pRes = taosArrayGet(pTables, 0); if (TSDB_CODE_SUCCESS == pRes->code) { *pMeta = tableMetaDup((const STableMeta*)pRes->pRes); @@ -1736,7 +1733,7 @@ static int32_t getTableMetaFromMetaData(const SArray* pTables, STableMeta** pMet return pRes->code; } -static int32_t getTableVgroupFromMetaData(const SArray* pTables, SVnodeModifOpStmt* pStmt, bool isStb) { +static int32_t getTableVgroupFromMetaData(const SArray* pTables, SVnodeModifyOpStmt* pStmt, bool isStb) { if (1 != taosArrayGetSize(pTables)) { return TSDB_CODE_FAILED; } @@ -1755,7 +1752,7 @@ static int32_t getTableVgroupFromMetaData(const SArray* pTables, SVnodeModifOpSt } static int32_t getTableSchemaFromMetaData(SInsertParseContext* pCxt, const SMetaData* pMetaData, - SVnodeModifOpStmt* pStmt, bool isStb) { + SVnodeModifyOpStmt* pStmt, bool isStb) { int32_t code = checkAuthFromMetaData(pMetaData->pUser); if (TSDB_CODE_SUCCESS == code) { code = getTableMetaFromMetaData(pMetaData->pTableMeta, &pStmt->pTableMeta); @@ -1788,7 +1785,7 @@ static void clearCatalogReq(SCatalogReq* pCatalogReq) { } static int32_t setVnodeModifOpStmt(SInsertParseContext* pCxt, SCatalogReq* pCatalogReq, const SMetaData* pMetaData, - SVnodeModifOpStmt* pStmt) { + SVnodeModifyOpStmt* pStmt) { clearCatalogReq(pCatalogReq); if (pStmt->usingTableProcessing) { @@ -1802,7 +1799,7 @@ static int32_t resetVnodeModifOpStmt(SInsertParseContext* pCxt, SQuery* pQuery) int32_t code = createVnodeModifOpStmt(pCxt, true, &pQuery->pRoot); if (TSDB_CODE_SUCCESS == code) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; (*pCxt->pComCxt->pStmtCb->getExecInfoFn)(pCxt->pComCxt->pStmtCb->pStmt, &pStmt->pVgroupsHashObj, &pStmt->pTableBlockHashObj); @@ -1831,7 +1828,7 @@ static int32_t initInsertQuery(SInsertParseContext* pCxt, SCatalogReq* pCatalogR return resetVnodeModifOpStmt(pCxt, *pQuery); } - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)(*pQuery)->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)(*pQuery)->pRoot; if (!pStmt->fileProcessing) { return setVnodeModifOpStmt(pCxt, pCatalogReq, pMetaData, pStmt); @@ -1841,7 +1838,7 @@ static int32_t initInsertQuery(SInsertParseContext* pCxt, SCatalogReq* pCatalogR } static int32_t setRefreshMate(SQuery* pQuery) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; if (taosHashGetSize(pStmt->pTableNameHashObj) > 0) { taosArrayDestroy(pQuery->pTableList); @@ -1872,7 +1869,7 @@ static int32_t setRefreshMate(SQuery* pQuery) { // [(field1_name, ...)] // VALUES (field1_value, ...) [(field1_value2, ...) ...] | FILE csv_file_path // [...]; -static int32_t parseInsertSqlFromStart(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlFromStart(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { int32_t code = skipInsertInto(&pStmt->pSql, &pCxt->msg); if (TSDB_CODE_SUCCESS == code) { code = parseInsertBody(pCxt, pStmt); @@ -1880,7 +1877,7 @@ static int32_t parseInsertSqlFromStart(SInsertParseContext* pCxt, SVnodeModifOpS return code; } -static int32_t parseInsertSqlFromCsv(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlFromCsv(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { STableDataBlocks* pDataBuf = NULL; int32_t code = getTableDataBlocks(pCxt, pStmt, &pDataBuf); if (TSDB_CODE_SUCCESS == code) { @@ -1898,7 +1895,7 @@ static int32_t parseInsertSqlFromCsv(SInsertParseContext* pCxt, SVnodeModifOpStm return code; } -static int32_t parseInsertSqlFromTable(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlFromTable(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { int32_t code = parseInsertTableClauseBottom(pCxt, pStmt); if (TSDB_CODE_SUCCESS == code) { code = parseInsertBody(pCxt, pStmt); @@ -1906,7 +1903,7 @@ static int32_t parseInsertSqlFromTable(SInsertParseContext* pCxt, SVnodeModifOpS return code; } -static int32_t parseInsertSqlImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (pStmt->pSql == pCxt->pComCxt->pSql || NULL != pCxt->pComCxt->pStmtCb) { return parseInsertSqlFromStart(pCxt, pStmt); } @@ -1958,7 +1955,7 @@ static int32_t buildInsertUserAuthReq(const char* pUser, SName* pName, SArray** return TSDB_CODE_SUCCESS; } -static int32_t buildInsertCatalogReq(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SCatalogReq* pCatalogReq) { +static int32_t buildInsertCatalogReq(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SCatalogReq* pCatalogReq) { int32_t code = buildInsertUserAuthReq(pCxt->pComCxt->pUser, &pStmt->targetTableName, &pCatalogReq->pUser); if (TSDB_CODE_SUCCESS == code) { if (0 == pStmt->usingTableName.type) { @@ -1974,7 +1971,7 @@ static int32_t buildInsertCatalogReq(SInsertParseContext* pCxt, SVnodeModifOpStm } static int32_t setNextStageInfo(SInsertParseContext* pCxt, SQuery* pQuery, SCatalogReq* pCatalogReq) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; if (pCxt->missCache) { parserDebug("0x%" PRIx64 " %d rows of %d tables have been inserted before cache miss", pCxt->pComCxt->requestId, pStmt->totalRowsNum, pStmt->totalTbNum); @@ -1999,7 +1996,7 @@ int32_t parseInsertSql(SParseContext* pCxt, SQuery** pQuery, SCatalogReq* pCatal int32_t code = initInsertQuery(&context, pCatalogReq, pMetaData, pQuery); if (TSDB_CODE_SUCCESS == code) { - code = parseInsertSqlImpl(&context, (SVnodeModifOpStmt*)(*pQuery)->pRoot); + code = parseInsertSqlImpl(&context, (SVnodeModifyOpStmt*)(*pQuery)->pRoot); } if (TSDB_CODE_SUCCESS == code) { code = setNextStageInfo(&context, *pQuery, pCatalogReq); diff --git a/source/libs/parser/src/parInsertStmt.c b/source/libs/parser/src/parInsertStmt.c index 4ed72e6c14..e10b195d34 100644 --- a/source/libs/parser/src/parInsertStmt.c +++ b/source/libs/parser/src/parInsertStmt.c @@ -37,7 +37,7 @@ int32_t qBuildStmtOutput(SQuery* pQuery, SHashObj* pVgHash, SHashObj* pBlockHash code = insMergeTableDataBlocks(pBlockHash, &pVgDataBlocks); } if (TSDB_CODE_SUCCESS == code) { - code = insBuildOutput(pVgHash, pVgDataBlocks, &((SVnodeModifOpStmt*)pQuery->pRoot)->pDataBlocks); + code = insBuildOutput(pVgHash, pVgDataBlocks, &((SVnodeModifyOpStmt*)pQuery->pRoot)->pDataBlocks); } insDestroyBlockArrayList(pVgDataBlocks); return code; @@ -47,7 +47,7 @@ int32_t qBindStmtTagsValue(void* pBlock, void* boundTags, int64_t suid, const ch TAOS_MULTI_BIND* bind, char* msgBuf, int32_t msgBufLen) { STableDataBlocks* pDataBlock = (STableDataBlocks*)pBlock; SMsgBuf pBuf = {.buf = msgBuf, .len = msgBufLen}; - int32_t code = TSDB_CODE_SUCCESS; + int32_t code = TSDB_CODE_SUCCESS; SParsedDataColInfo* tags = (SParsedDataColInfo*)boundTags; if (NULL == tags) { return TSDB_CODE_APP_ERROR; @@ -137,7 +137,8 @@ int32_t qBindStmtTagsValue(void* pBlock, void* boundTags, int64_t suid, const ch } SVCreateTbReq tbReq = {0}; - insBuildCreateTbReq(&tbReq, tName, pTag, suid, sTableName, tagName, pDataBlock->pTableMeta->tableInfo.numOfTags, TSDB_DEFAULT_TABLE_TTL); + insBuildCreateTbReq(&tbReq, tName, pTag, suid, sTableName, tagName, pDataBlock->pTableMeta->tableInfo.numOfTags, + TSDB_DEFAULT_TABLE_TTL); code = insBuildCreateTbMsg(pDataBlock, &tbReq); tdDestroySVCreateTbReq(&tbReq); diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 1f9e4e9ab1..94b32a3de2 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -260,6 +260,7 @@ static SKeyword keywordTable[] = { {"WRITE", TK_WRITE}, {"_C0", TK_ROWTS}, {"_IROWTS", TK_IROWTS}, + {"_ISFILLED", TK_ISFILLED}, {"_QDURATION", TK_QDURATION}, {"_QEND", TK_QEND}, {"_QSTART", TK_QSTART}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 3f66a4f8de..1f00d17be1 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -352,7 +352,7 @@ static int32_t getTableMetaImpl(STranslateContext* pCxt, const SName* pName, STa code = catalogGetTableMeta(pParCxt->pCatalog, &conn, pName, pMeta); } } - if (TSDB_CODE_SUCCESS != code) { + if (TSDB_CODE_SUCCESS != code && TSDB_CODE_TSC_INVALID_TABLE_NAME != code) { parserError("0x%" PRIx64 " catalogGetTableMeta error, code:%s, dbName:%s, tbName:%s", pCxt->pParseCxt->requestId, tstrerror(code), pName->dbname, pName->tname); } @@ -5110,7 +5110,7 @@ static int32_t translateAlterUser(STranslateContext* pCxt, SAlterUserStmt* pStmt static int32_t translateDropUser(STranslateContext* pCxt, SDropUserStmt* pStmt) { SDropUserReq dropReq = {0}; - strcpy(dropReq.user, pStmt->useName); + strcpy(dropReq.user, pStmt->userName); return buildCmdMsg(pCxt, TDMT_MND_DROP_USER, (FSerializeFunc)tSerializeSDropUserReq, &dropReq); } @@ -6645,7 +6645,7 @@ static void destroyCreateTbReqBatch(void* data) { } int32_t rewriteToVnodeModifyOpStmt(SQuery* pQuery, SArray* pBufArray) { - SVnodeModifOpStmt* pNewStmt = (SVnodeModifOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + SVnodeModifyOpStmt* pNewStmt = (SVnodeModifyOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (pNewStmt == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } @@ -7734,9 +7734,9 @@ static int32_t setQuery(STranslateContext* pCxt, SQuery* pQuery) { pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->msgType = TDMT_VND_SUBMIT; break; - case QUERY_NODE_VNODE_MODIF_STMT: + case QUERY_NODE_VNODE_MODIFY_STMT: pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; - pQuery->msgType = toMsgType(((SVnodeModifOpStmt*)pQuery->pRoot)->sqlNodeType); + pQuery->msgType = toMsgType(((SVnodeModifyOpStmt*)pQuery->pRoot)->sqlNodeType); break; case QUERY_NODE_DESCRIBE_STMT: case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index e8b2c122ae..1021aab6f0 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,26 +104,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 460 +#define YYNOCODE 461 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SAlterOption yy5; - bool yy57; - EFillMode yy214; - EJoinType yy332; - int32_t yy340; - int8_t yy383; - SDataType yy384; - SNodeList* yy424; - EOrder yy538; - EOperatorType yy620; - SNode* yy752; - ENullOrder yy777; - SToken yy849; - int64_t yy869; + EOrder yy32; + SToken yy77; + int32_t yy248; + int8_t yy287; + ENullOrder yy385; + EJoinType yy560; + SNode* yy600; + SNodeList* yy601; + SAlterOption yy661; + EOperatorType yy666; + int64_t yy717; + EFillMode yy798; + bool yy841; + SDataType yy888; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -140,16 +140,17 @@ typedef union { #define ParseCTX_STORE #define YYFALLBACK 1 #define YYNSTATE 714 -#define YYNRULE 544 -#define YYNTOKEN 324 +#define YYNRULE 545 +#define YYNRULE_WITH_ACTION 545 +#define YYNTOKEN 325 #define YY_MAX_SHIFT 713 -#define YY_MIN_SHIFTREDUCE 1060 -#define YY_MAX_SHIFTREDUCE 1603 -#define YY_ERROR_ACTION 1604 -#define YY_ACCEPT_ACTION 1605 -#define YY_NO_ACTION 1606 -#define YY_MIN_REDUCE 1607 -#define YY_MAX_REDUCE 2150 +#define YY_MIN_SHIFTREDUCE 1061 +#define YY_MAX_SHIFTREDUCE 1605 +#define YY_ERROR_ACTION 1606 +#define YY_ACCEPT_ACTION 1607 +#define YY_NO_ACTION 1608 +#define YY_MIN_REDUCE 1609 +#define YY_MAX_REDUCE 2153 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,810 +217,843 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3067) +#define YY_ACTTAB_COUNT (3069) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1749, 407, 460, 1874, 461, 1643, 469, 367, 461, 1643, - /* 10 */ 1806, 1808, 45, 43, 1533, 1952, 1872, 590, 1630, 466, - /* 20 */ 362, 1745, 1384, 38, 37, 462, 1948, 44, 42, 41, - /* 30 */ 40, 39, 169, 1463, 459, 1382, 229, 464, 1649, 1790, - /* 40 */ 571, 320, 38, 37, 2121, 1813, 44, 42, 41, 40, - /* 50 */ 39, 602, 355, 334, 1860, 1944, 1950, 345, 1458, 570, - /* 60 */ 175, 1811, 1934, 18, 2122, 572, 613, 38, 37, 1965, - /* 70 */ 1390, 44, 42, 41, 40, 39, 468, 1410, 583, 464, - /* 80 */ 1649, 38, 37, 45, 43, 44, 42, 41, 40, 39, - /* 90 */ 354, 362, 171, 1384, 1607, 14, 603, 327, 157, 1112, - /* 100 */ 1983, 1111, 2125, 27, 1463, 1800, 1382, 1762, 586, 134, - /* 110 */ 54, 1570, 602, 1934, 603, 619, 1410, 710, 125, 124, - /* 120 */ 123, 122, 121, 120, 119, 118, 117, 1760, 126, 1458, - /* 130 */ 1113, 1605, 1465, 1466, 18, 499, 35, 276, 1492, 1964, - /* 140 */ 84, 1390, 478, 1999, 64, 1760, 103, 1966, 623, 1968, - /* 150 */ 1969, 618, 602, 613, 130, 2126, 1807, 1808, 172, 2121, - /* 160 */ 2052, 1439, 1448, 1755, 356, 2048, 14, 1464, 1467, 257, - /* 170 */ 2060, 582, 1738, 127, 581, 2125, 84, 2121, 177, 2122, - /* 180 */ 2124, 2126, 1385, 2126, 1383, 2121, 2078, 48, 710, 1262, - /* 190 */ 1263, 160, 570, 175, 1493, 377, 1714, 2122, 572, 1756, - /* 200 */ 1411, 2125, 1409, 1465, 1466, 2122, 2123, 1388, 1389, 396, - /* 210 */ 1438, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 615, 611, - /* 220 */ 1456, 1457, 1459, 1460, 1461, 1462, 2, 48, 1329, 1330, - /* 230 */ 398, 394, 1439, 1448, 478, 60, 156, 547, 1464, 1467, - /* 240 */ 116, 2121, 648, 115, 114, 113, 112, 111, 110, 109, - /* 250 */ 108, 107, 339, 1385, 1560, 1383, 2127, 175, 41, 40, - /* 260 */ 39, 2122, 572, 1328, 1331, 34, 360, 1487, 1488, 1489, - /* 270 */ 1490, 1491, 1495, 1496, 1497, 1498, 1593, 60, 1388, 1389, - /* 280 */ 260, 1438, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 615, - /* 290 */ 611, 1456, 1457, 1459, 1460, 1461, 1462, 2, 169, 11, - /* 300 */ 45, 43, 558, 1558, 1559, 1561, 1562, 159, 362, 1619, - /* 310 */ 1384, 1093, 227, 340, 566, 338, 337, 60, 501, 89, - /* 320 */ 1861, 1463, 503, 1382, 1219, 645, 644, 643, 1223, 642, - /* 330 */ 1225, 1226, 641, 1228, 638, 1676, 1234, 635, 1236, 1237, - /* 340 */ 632, 629, 213, 259, 502, 1952, 1458, 1409, 1751, 401, - /* 350 */ 1095, 18, 1098, 1099, 1813, 11, 1948, 164, 1390, 1948, - /* 360 */ 365, 366, 574, 495, 491, 487, 483, 210, 157, 60, - /* 370 */ 1811, 45, 43, 1468, 86, 322, 178, 1762, 532, 362, - /* 380 */ 530, 1384, 1983, 14, 178, 1944, 1950, 357, 1944, 1950, - /* 390 */ 565, 547, 1463, 49, 1382, 2121, 613, 510, 509, 613, - /* 400 */ 514, 513, 512, 85, 1411, 710, 208, 1608, 131, 508, - /* 410 */ 2127, 175, 11, 507, 9, 2122, 572, 1458, 506, 511, - /* 420 */ 1465, 1466, 267, 268, 505, 1737, 178, 266, 116, 1390, - /* 430 */ 564, 115, 114, 113, 112, 111, 110, 109, 108, 107, - /* 440 */ 38, 37, 681, 679, 44, 42, 41, 40, 39, 1439, - /* 450 */ 1448, 368, 1412, 1813, 46, 1464, 1467, 38, 37, 157, - /* 460 */ 331, 44, 42, 41, 40, 39, 178, 2067, 1762, 1811, - /* 470 */ 1385, 1537, 1383, 207, 201, 60, 710, 1409, 206, 38, - /* 480 */ 37, 474, 657, 44, 42, 41, 40, 39, 1315, 1316, - /* 490 */ 1393, 1465, 1466, 2064, 1629, 1388, 1389, 199, 1438, 1441, - /* 500 */ 1442, 1443, 1444, 1445, 1446, 1447, 615, 611, 1456, 1457, - /* 510 */ 1459, 1460, 1461, 1462, 2, 514, 513, 512, 178, 1409, - /* 520 */ 1439, 1448, 528, 131, 508, 571, 1464, 1467, 507, 2121, - /* 530 */ 1179, 2067, 655, 506, 511, 526, 2067, 524, 1934, 505, - /* 540 */ 1408, 1385, 178, 1383, 570, 175, 100, 259, 1628, 2122, - /* 550 */ 572, 148, 147, 652, 651, 650, 145, 2063, 583, 589, - /* 560 */ 135, 400, 2062, 399, 1627, 1181, 1388, 1389, 1752, 1438, - /* 570 */ 1441, 1442, 1443, 1444, 1445, 1446, 1447, 615, 611, 1456, - /* 580 */ 1457, 1459, 1460, 1461, 1462, 2, 45, 43, 603, 134, - /* 590 */ 1384, 1473, 1934, 1843, 362, 237, 1384, 1409, 713, 52, - /* 600 */ 1874, 547, 180, 1382, 187, 2121, 546, 1463, 1934, 1382, - /* 610 */ 353, 146, 283, 1871, 590, 603, 1965, 1736, 1440, 1760, - /* 620 */ 2127, 175, 375, 1600, 178, 2122, 572, 168, 583, 405, - /* 630 */ 1953, 1856, 1458, 703, 699, 695, 691, 281, 1390, 1396, - /* 640 */ 81, 1948, 183, 80, 1390, 1856, 1760, 1983, 585, 173, - /* 650 */ 2060, 2061, 94, 132, 2065, 617, 185, 45, 43, 134, - /* 660 */ 1934, 603, 619, 53, 547, 362, 1494, 1384, 2121, 46, - /* 670 */ 1944, 1950, 1626, 101, 1753, 126, 274, 583, 1463, 657, - /* 680 */ 1382, 613, 504, 2127, 175, 710, 1964, 443, 2122, 572, - /* 690 */ 1999, 710, 1760, 312, 1966, 623, 1968, 1969, 618, 616, - /* 700 */ 613, 604, 2017, 1458, 1735, 1625, 1465, 1466, 134, 599, - /* 710 */ 44, 42, 41, 40, 39, 1390, 1934, 1599, 561, 174, - /* 720 */ 2060, 2061, 1624, 132, 2065, 136, 38, 37, 2023, 1747, - /* 730 */ 44, 42, 41, 40, 39, 1439, 1448, 32, 1440, 1623, - /* 740 */ 14, 1464, 1467, 603, 424, 191, 190, 1499, 262, 1934, - /* 750 */ 1385, 605, 1383, 2024, 13, 12, 1385, 406, 1383, 228, - /* 760 */ 1622, 607, 710, 2024, 1412, 1355, 1934, 231, 176, 2060, - /* 770 */ 2061, 1412, 132, 2065, 1760, 1388, 1389, 1465, 1466, 8, - /* 780 */ 374, 1388, 1389, 1934, 1438, 1441, 1442, 1443, 1444, 1445, - /* 790 */ 1446, 1447, 615, 611, 1456, 1457, 1459, 1460, 1461, 1462, - /* 800 */ 2, 567, 562, 556, 1934, 603, 1439, 1448, 319, 157, - /* 810 */ 1407, 655, 1464, 1467, 1549, 2072, 1526, 437, 1763, 415, - /* 820 */ 450, 1813, 547, 449, 1361, 1362, 2121, 1385, 1856, 1383, - /* 830 */ 148, 147, 652, 651, 650, 145, 1760, 1812, 421, 189, - /* 840 */ 451, 2127, 175, 423, 1409, 1621, 2122, 572, 649, 1506, - /* 850 */ 575, 1804, 1388, 1389, 610, 1438, 1441, 1442, 1443, 1444, - /* 860 */ 1445, 1446, 1447, 615, 611, 1456, 1457, 1459, 1460, 1461, - /* 870 */ 1462, 2, 1618, 653, 1617, 670, 1804, 1730, 158, 654, - /* 880 */ 1616, 31, 1804, 296, 335, 1673, 603, 38, 37, 1934, - /* 890 */ 1530, 44, 42, 41, 40, 39, 411, 294, 70, 33, - /* 900 */ 429, 69, 1615, 1098, 1099, 38, 37, 184, 1390, 44, - /* 910 */ 42, 41, 40, 39, 236, 408, 1934, 1760, 1934, 195, - /* 920 */ 456, 454, 290, 669, 1934, 1790, 447, 542, 409, 442, - /* 930 */ 441, 440, 439, 436, 435, 434, 433, 432, 428, 427, - /* 940 */ 426, 425, 336, 418, 417, 416, 1934, 413, 412, 333, - /* 950 */ 687, 686, 685, 684, 372, 60, 683, 682, 138, 677, - /* 960 */ 676, 675, 674, 673, 672, 671, 150, 667, 666, 665, - /* 970 */ 371, 370, 662, 661, 660, 659, 658, 1112, 503, 1111, - /* 980 */ 50, 1921, 3, 1526, 235, 1440, 1614, 578, 1613, 1612, - /* 990 */ 603, 603, 212, 603, 102, 603, 655, 1611, 1484, 519, - /* 1000 */ 502, 140, 1392, 128, 430, 476, 1965, 477, 1113, 1757, - /* 1010 */ 1743, 603, 535, 603, 529, 148, 147, 652, 651, 650, - /* 1020 */ 145, 1760, 1760, 87, 1760, 142, 1760, 543, 226, 384, - /* 1030 */ 1934, 232, 1934, 1934, 78, 77, 404, 1983, 1610, 182, - /* 1040 */ 614, 1934, 1760, 522, 1760, 620, 218, 647, 516, 216, - /* 1050 */ 1934, 1650, 619, 225, 547, 1602, 1603, 318, 2121, 1141, - /* 1060 */ 392, 71, 390, 386, 382, 379, 376, 603, 1965, 220, - /* 1070 */ 1715, 576, 219, 2127, 175, 62, 1964, 603, 2122, 572, - /* 1080 */ 1999, 587, 1934, 103, 1966, 623, 1968, 1969, 618, 67, - /* 1090 */ 613, 271, 66, 137, 1142, 143, 2023, 2052, 1760, 1983, - /* 1100 */ 705, 356, 2048, 603, 178, 603, 603, 586, 1760, 603, - /* 1110 */ 603, 79, 1934, 222, 619, 224, 221, 598, 223, 600, - /* 1120 */ 601, 1663, 1965, 277, 369, 241, 47, 1557, 264, 99, - /* 1130 */ 68, 1529, 1656, 1654, 1760, 144, 1760, 1760, 1964, 96, - /* 1140 */ 1760, 1760, 1999, 515, 1620, 103, 1966, 623, 1968, 1969, - /* 1150 */ 618, 1395, 613, 1983, 517, 520, 146, 172, 2092, 2052, - /* 1160 */ 254, 620, 62, 356, 2048, 211, 1934, 47, 619, 663, - /* 1170 */ 13, 12, 47, 1955, 559, 664, 248, 243, 1326, 627, - /* 1180 */ 269, 1965, 595, 144, 1984, 2079, 146, 273, 129, 373, - /* 1190 */ 144, 1160, 1964, 1865, 2082, 1644, 1999, 1158, 584, 103, - /* 1200 */ 1966, 623, 1968, 1969, 618, 1801, 613, 256, 1212, 253, - /* 1210 */ 579, 2141, 1983, 2052, 1500, 1, 378, 356, 2048, 1449, - /* 1220 */ 620, 1957, 4, 383, 289, 1934, 1348, 619, 2086, 332, - /* 1230 */ 284, 1240, 188, 410, 1412, 1244, 445, 1866, 1251, 1407, - /* 1240 */ 1249, 414, 149, 419, 431, 1858, 438, 1965, 444, 446, - /* 1250 */ 452, 1964, 192, 455, 453, 1999, 457, 1413, 103, 1966, - /* 1260 */ 623, 1968, 1969, 618, 458, 613, 467, 1965, 470, 1415, - /* 1270 */ 2141, 198, 2052, 1410, 471, 200, 356, 2048, 1983, 1414, - /* 1280 */ 472, 1416, 203, 473, 475, 479, 620, 2099, 1115, 498, - /* 1290 */ 205, 1934, 82, 619, 83, 209, 496, 500, 1983, 497, - /* 1300 */ 1750, 106, 321, 215, 1746, 534, 620, 1911, 536, 285, - /* 1310 */ 217, 1934, 537, 619, 151, 538, 230, 1964, 544, 233, - /* 1320 */ 152, 1999, 1748, 1744, 103, 1966, 623, 1968, 1969, 618, - /* 1330 */ 153, 613, 154, 560, 1910, 2098, 2141, 1964, 2052, 551, - /* 1340 */ 593, 1999, 356, 2048, 103, 1966, 623, 1968, 1969, 618, - /* 1350 */ 2083, 613, 541, 554, 2097, 239, 2141, 557, 2052, 359, - /* 1360 */ 358, 346, 356, 2048, 1965, 2093, 242, 563, 7, 1398, - /* 1370 */ 2074, 569, 552, 2115, 247, 550, 549, 580, 2144, 1526, - /* 1380 */ 1463, 2120, 1391, 577, 347, 255, 252, 133, 1411, 588, - /* 1390 */ 286, 350, 2068, 591, 592, 1983, 261, 1882, 1881, 1880, - /* 1400 */ 352, 287, 597, 620, 596, 1458, 91, 288, 1934, 93, - /* 1410 */ 619, 1761, 59, 2033, 95, 165, 250, 1390, 625, 1805, - /* 1420 */ 1731, 706, 280, 1965, 249, 251, 709, 291, 707, 51, - /* 1430 */ 315, 295, 323, 293, 1964, 324, 1928, 300, 1999, 1927, - /* 1440 */ 314, 103, 1966, 623, 1968, 1969, 618, 304, 613, 75, - /* 1450 */ 1926, 1925, 76, 2141, 1983, 2052, 1922, 380, 381, 356, - /* 1460 */ 2048, 1376, 620, 1377, 609, 181, 385, 1934, 1920, 619, - /* 1470 */ 2071, 389, 387, 388, 1919, 391, 1918, 393, 1917, 395, - /* 1480 */ 1916, 397, 1351, 1350, 1893, 1892, 402, 403, 1891, 1890, - /* 1490 */ 1306, 1851, 1850, 1964, 1848, 139, 1847, 1999, 1846, 1849, - /* 1500 */ 103, 1966, 623, 1968, 1969, 618, 1845, 613, 1844, 1842, - /* 1510 */ 1841, 1840, 2027, 1965, 2052, 186, 420, 1839, 356, 2048, - /* 1520 */ 422, 1838, 1837, 1836, 1835, 1834, 1833, 1832, 1831, 1399, - /* 1530 */ 1830, 1394, 1829, 1828, 1827, 1826, 1825, 1824, 1823, 141, - /* 1540 */ 1822, 1821, 1820, 1819, 1983, 1818, 1817, 1816, 448, 1815, - /* 1550 */ 1814, 1308, 620, 1187, 1402, 1404, 1678, 1934, 193, 619, - /* 1560 */ 1677, 194, 1675, 1639, 170, 1101, 611, 1456, 1457, 1459, - /* 1570 */ 1460, 1461, 1462, 196, 1638, 1965, 1906, 1900, 73, 1100, - /* 1580 */ 1889, 204, 1888, 1964, 197, 1868, 1739, 1999, 1674, 1672, - /* 1590 */ 103, 1966, 623, 1968, 1969, 618, 74, 613, 1965, 1954, - /* 1600 */ 463, 465, 2025, 202, 2052, 480, 1983, 481, 356, 2048, - /* 1610 */ 482, 1670, 1134, 484, 620, 1668, 485, 489, 486, 1934, - /* 1620 */ 490, 619, 488, 1666, 1653, 492, 1652, 1635, 1741, 1983, - /* 1630 */ 494, 493, 1256, 1740, 1255, 1178, 1177, 620, 1176, 1175, - /* 1640 */ 678, 1172, 1934, 680, 619, 1964, 1664, 1170, 1171, 1999, - /* 1650 */ 1657, 1169, 103, 1966, 623, 1968, 1969, 618, 341, 613, - /* 1660 */ 518, 342, 61, 214, 606, 1965, 2052, 1655, 1964, 343, - /* 1670 */ 356, 2048, 1999, 1634, 1633, 104, 1966, 623, 1968, 1969, - /* 1680 */ 618, 1632, 613, 521, 523, 527, 525, 1366, 1965, 2052, - /* 1690 */ 105, 1368, 1365, 2051, 2048, 531, 1983, 26, 1905, 1357, - /* 1700 */ 1899, 155, 539, 1887, 620, 1885, 19, 2126, 16, 1934, - /* 1710 */ 1572, 619, 28, 238, 553, 555, 240, 1556, 55, 1983, - /* 1720 */ 58, 245, 246, 30, 163, 244, 29, 620, 1548, 540, - /* 1730 */ 1955, 20, 1934, 1592, 619, 1964, 344, 234, 88, 1999, - /* 1740 */ 1593, 63, 104, 1966, 623, 1968, 1969, 618, 1587, 613, - /* 1750 */ 21, 1965, 17, 1586, 348, 1591, 2052, 1590, 621, 349, - /* 1760 */ 608, 2048, 1999, 545, 5, 104, 1966, 623, 1968, 1969, - /* 1770 */ 618, 1965, 613, 258, 1523, 6, 57, 166, 1522, 2052, - /* 1780 */ 1886, 1884, 1983, 326, 2048, 1883, 22, 1867, 263, 1554, - /* 1790 */ 620, 265, 270, 90, 65, 1934, 92, 619, 275, 272, - /* 1800 */ 594, 23, 1983, 12, 10, 1485, 1400, 96, 1453, 2002, - /* 1810 */ 620, 612, 167, 1451, 179, 1934, 36, 619, 1431, 1450, - /* 1820 */ 1475, 1964, 15, 626, 24, 1999, 364, 1423, 161, 1966, - /* 1830 */ 623, 1968, 1969, 618, 1474, 613, 25, 630, 1241, 624, - /* 1840 */ 1965, 1964, 628, 633, 1238, 1999, 1235, 631, 162, 1966, - /* 1850 */ 623, 1968, 1969, 618, 622, 613, 634, 636, 1229, 637, - /* 1860 */ 639, 56, 1227, 640, 1233, 1232, 1218, 646, 1231, 548, - /* 1870 */ 2089, 1983, 1230, 97, 278, 1250, 1246, 98, 1132, 620, - /* 1880 */ 656, 72, 1166, 1165, 1934, 1164, 619, 1163, 1162, 1185, - /* 1890 */ 1161, 1159, 1157, 1156, 1965, 1155, 668, 1153, 1152, 1151, - /* 1900 */ 573, 2142, 1150, 279, 1149, 1182, 1148, 1147, 1180, 1144, - /* 1910 */ 1964, 1965, 1143, 1140, 1999, 1138, 1139, 104, 1966, 623, - /* 1920 */ 1968, 1969, 618, 1137, 613, 1983, 1671, 688, 690, 1669, - /* 1930 */ 689, 2052, 692, 620, 693, 694, 2049, 1667, 1934, 696, - /* 1940 */ 619, 698, 1983, 1665, 700, 702, 697, 701, 1651, 704, - /* 1950 */ 620, 1090, 1631, 282, 708, 1934, 1386, 619, 292, 711, - /* 1960 */ 712, 1606, 1606, 1606, 1964, 1965, 1606, 1606, 1999, 1606, - /* 1970 */ 1606, 161, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, - /* 1980 */ 1606, 1964, 1606, 1965, 1606, 1999, 1606, 1606, 306, 1966, - /* 1990 */ 623, 1968, 1969, 618, 1606, 613, 1983, 1606, 1606, 1606, - /* 2000 */ 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, - /* 2010 */ 1606, 619, 1606, 2090, 1983, 1606, 1606, 1606, 1606, 351, - /* 2020 */ 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, - /* 2030 */ 1606, 1606, 568, 1606, 1606, 1964, 1606, 1965, 1606, 1999, - /* 2040 */ 1606, 1606, 162, 1966, 623, 1968, 1969, 618, 1606, 613, - /* 2050 */ 1606, 1606, 1606, 1964, 1606, 1965, 1606, 1999, 1606, 1606, - /* 2060 */ 313, 1966, 623, 1968, 1969, 618, 1606, 613, 1983, 1606, - /* 2070 */ 1606, 1606, 1606, 1606, 1606, 1606, 617, 1606, 1606, 1606, - /* 2080 */ 1606, 1934, 1606, 619, 1606, 1606, 1983, 1606, 1606, 1606, - /* 2090 */ 1606, 361, 1606, 1606, 620, 2143, 1606, 1606, 1606, 1934, - /* 2100 */ 1606, 619, 1606, 1606, 1606, 1606, 1606, 1964, 1606, 1606, - /* 2110 */ 1965, 1999, 1606, 1606, 312, 1966, 623, 1968, 1969, 618, - /* 2120 */ 1606, 613, 1606, 2018, 1606, 1964, 1606, 1606, 1606, 1999, - /* 2130 */ 1965, 1606, 313, 1966, 623, 1968, 1969, 618, 1606, 613, - /* 2140 */ 1606, 1983, 1606, 1606, 1606, 1606, 363, 1606, 1606, 620, - /* 2150 */ 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, - /* 2160 */ 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, - /* 2170 */ 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, - /* 2180 */ 1964, 1606, 1606, 1606, 1999, 1606, 1606, 313, 1966, 623, - /* 2190 */ 1968, 1969, 618, 1606, 613, 1606, 1606, 1965, 1606, 1606, - /* 2200 */ 533, 1606, 1606, 1606, 1999, 1606, 1606, 308, 1966, 623, - /* 2210 */ 1968, 1969, 618, 1606, 613, 1606, 1606, 1606, 1606, 1606, - /* 2220 */ 1606, 1606, 1965, 1606, 1606, 1606, 1606, 1606, 1983, 1606, - /* 2230 */ 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, - /* 2240 */ 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, 1606, 1965, - /* 2250 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2260 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1964, 619, 1606, - /* 2270 */ 1606, 1999, 1606, 1606, 297, 1966, 623, 1968, 1969, 618, - /* 2280 */ 1983, 613, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, - /* 2290 */ 1606, 1606, 1964, 1934, 1606, 619, 1999, 1606, 1606, 298, - /* 2300 */ 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, 1965, - /* 2310 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1964, - /* 2320 */ 1606, 1606, 1606, 1999, 1606, 1606, 299, 1966, 623, 1968, - /* 2330 */ 1969, 618, 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2340 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, - /* 2350 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, - /* 2360 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2370 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1964, - /* 2380 */ 1606, 1606, 1606, 1999, 1606, 1606, 305, 1966, 623, 1968, - /* 2390 */ 1969, 618, 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2400 */ 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 309, - /* 2410 */ 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, 1965, - /* 2420 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2430 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, - /* 2440 */ 1606, 1606, 1606, 1606, 1965, 1606, 1606, 1606, 1606, 1606, - /* 2450 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, - /* 2460 */ 1606, 1606, 1964, 1934, 1606, 619, 1999, 1606, 1606, 301, - /* 2470 */ 1966, 623, 1968, 1969, 618, 1983, 613, 1606, 1606, 1606, - /* 2480 */ 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1964, - /* 2490 */ 619, 1606, 1606, 1999, 1606, 1606, 310, 1966, 623, 1968, - /* 2500 */ 1969, 618, 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2510 */ 1606, 1606, 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1965, - /* 2520 */ 1606, 302, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, - /* 2530 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2540 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, - /* 2550 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, - /* 2560 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, - /* 2570 */ 1606, 1965, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 311, - /* 2580 */ 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, 1964, - /* 2590 */ 1606, 1606, 1606, 1999, 1965, 1606, 303, 1966, 623, 1968, - /* 2600 */ 1969, 618, 1983, 613, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2610 */ 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, - /* 2620 */ 1606, 1606, 1606, 1965, 1606, 1983, 1606, 1606, 1606, 1606, - /* 2630 */ 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, - /* 2640 */ 619, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 316, 1966, - /* 2650 */ 623, 1968, 1969, 618, 1983, 613, 1606, 1606, 1606, 1606, - /* 2660 */ 1606, 1606, 620, 1606, 1964, 1606, 1606, 1934, 1999, 619, - /* 2670 */ 1606, 317, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, - /* 2680 */ 1606, 1965, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2690 */ 1606, 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1965, - /* 2700 */ 1977, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, - /* 2710 */ 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2720 */ 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, - /* 2730 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, - /* 2740 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, - /* 2750 */ 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 1976, 1966, - /* 2760 */ 623, 1968, 1969, 618, 1965, 613, 1606, 1606, 1606, 1964, - /* 2770 */ 1606, 1606, 1606, 1999, 1606, 1606, 1975, 1966, 623, 1968, - /* 2780 */ 1969, 618, 1606, 613, 1606, 1606, 1965, 1606, 1606, 1606, - /* 2790 */ 1606, 1606, 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, - /* 2800 */ 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, - /* 2810 */ 619, 1606, 1606, 1606, 1606, 1606, 1606, 1983, 1606, 1606, - /* 2820 */ 1606, 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, - /* 2830 */ 1934, 1606, 619, 1606, 1964, 1606, 1606, 1606, 1999, 1606, - /* 2840 */ 1606, 328, 1966, 623, 1968, 1969, 618, 1965, 613, 1606, - /* 2850 */ 1606, 1606, 1606, 1606, 1606, 1606, 1964, 1606, 1606, 1606, - /* 2860 */ 1999, 1606, 1606, 329, 1966, 623, 1968, 1969, 618, 1965, - /* 2870 */ 613, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1983, 1606, - /* 2880 */ 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, - /* 2890 */ 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2900 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, - /* 2910 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1964, 1606, 1606, - /* 2920 */ 1606, 1999, 1606, 1606, 325, 1966, 623, 1968, 1969, 618, - /* 2930 */ 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1964, - /* 2940 */ 1606, 1606, 1606, 1999, 1606, 1606, 330, 1966, 623, 1968, - /* 2950 */ 1969, 618, 1606, 613, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2960 */ 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, - /* 2970 */ 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, - /* 2980 */ 1606, 1606, 1965, 1606, 1606, 1606, 1606, 1606, 1606, 1606, - /* 2990 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, - /* 3000 */ 621, 1606, 1606, 1606, 1999, 1606, 1606, 308, 1966, 623, - /* 3010 */ 1968, 1969, 618, 1983, 613, 1606, 1606, 1606, 1606, 1606, - /* 3020 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, - /* 3030 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, - /* 3040 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, - /* 3050 */ 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 307, - /* 3060 */ 1966, 623, 1968, 1969, 618, 1606, 613, + /* 0 */ 35, 276, 460, 1876, 461, 1645, 469, 367, 461, 1645, + /* 10 */ 1808, 1810, 45, 43, 1535, 1954, 1874, 590, 1751, 466, + /* 20 */ 362, 407, 1385, 38, 37, 462, 1950, 44, 42, 41, + /* 30 */ 40, 39, 169, 1465, 459, 1383, 229, 464, 1651, 1792, + /* 40 */ 571, 602, 38, 37, 2124, 602, 44, 42, 41, 40, + /* 50 */ 39, 8, 602, 334, 1862, 1946, 1952, 345, 1460, 570, + /* 60 */ 175, 320, 187, 18, 2125, 572, 613, 38, 37, 1967, + /* 70 */ 1391, 44, 42, 41, 40, 39, 468, 1411, 583, 464, + /* 80 */ 1651, 38, 37, 45, 43, 44, 42, 41, 40, 39, + /* 90 */ 2129, 362, 171, 1385, 1609, 14, 136, 327, 81, 2026, + /* 100 */ 1985, 80, 60, 27, 1465, 1802, 1383, 1412, 586, 134, + /* 110 */ 159, 1572, 1621, 1936, 603, 619, 48, 710, 125, 124, + /* 120 */ 123, 122, 121, 120, 119, 118, 117, 48, 126, 1460, + /* 130 */ 100, 160, 1467, 1468, 18, 499, 1716, 443, 1494, 1966, + /* 140 */ 64, 1391, 478, 2002, 135, 1762, 103, 1968, 623, 1970, + /* 150 */ 1971, 618, 1754, 613, 1410, 2129, 1815, 146, 172, 2124, + /* 160 */ 2055, 1440, 1450, 355, 356, 2051, 14, 1466, 1469, 257, + /* 170 */ 2063, 582, 1813, 127, 581, 2128, 566, 2124, 177, 2125, + /* 180 */ 2127, 2129, 1386, 1595, 1384, 2124, 2081, 528, 710, 1263, + /* 190 */ 1264, 260, 570, 175, 1495, 191, 190, 2125, 572, 49, + /* 200 */ 526, 2128, 524, 1467, 1468, 2125, 2126, 1389, 1390, 53, + /* 210 */ 1439, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 615, + /* 220 */ 611, 1458, 1459, 1461, 1462, 1463, 1464, 2, 60, 60, + /* 230 */ 89, 60, 1440, 1450, 2070, 1410, 156, 116, 1466, 1469, + /* 240 */ 115, 114, 113, 112, 111, 110, 109, 108, 107, 648, + /* 250 */ 259, 227, 178, 1386, 2070, 1384, 1528, 38, 37, 1632, + /* 260 */ 2067, 44, 42, 41, 40, 39, 34, 360, 1489, 1490, + /* 270 */ 1491, 1492, 1493, 1497, 1498, 1499, 1500, 178, 1389, 1390, + /* 280 */ 2066, 1439, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, + /* 290 */ 615, 611, 1458, 1459, 1461, 1462, 1463, 1464, 2, 396, + /* 300 */ 11, 45, 43, 1936, 1954, 1385, 1539, 1631, 1985, 362, + /* 310 */ 408, 1385, 1410, 86, 322, 1950, 565, 532, 1383, 530, + /* 320 */ 398, 394, 1465, 409, 1383, 1220, 645, 644, 643, 1224, + /* 330 */ 642, 1226, 1227, 641, 1229, 638, 1678, 1235, 635, 1237, + /* 340 */ 1238, 632, 629, 213, 1946, 1952, 357, 1460, 1180, 178, + /* 350 */ 401, 1936, 18, 1391, 1815, 613, 564, 1532, 164, 1391, + /* 360 */ 1113, 366, 1112, 1410, 495, 491, 487, 483, 210, 1630, + /* 370 */ 1813, 1629, 45, 43, 1470, 212, 1316, 1317, 178, 178, + /* 380 */ 362, 178, 1385, 1182, 14, 44, 42, 41, 40, 39, + /* 390 */ 657, 1114, 547, 1465, 1409, 1383, 2124, 1113, 1628, 1112, + /* 400 */ 710, 514, 513, 512, 85, 1094, 710, 208, 1610, 131, + /* 410 */ 508, 2130, 175, 1936, 507, 1936, 2125, 572, 1460, 506, + /* 420 */ 511, 1467, 1468, 1602, 1627, 505, 267, 268, 1114, 116, + /* 430 */ 1391, 266, 115, 114, 113, 112, 111, 110, 109, 108, + /* 440 */ 107, 583, 1936, 1411, 1096, 1626, 1099, 1100, 1391, 1876, + /* 450 */ 1440, 1450, 603, 1441, 1815, 46, 1466, 1469, 11, 353, + /* 460 */ 9, 331, 1873, 590, 603, 1386, 54, 1384, 1936, 575, + /* 470 */ 1813, 1386, 134, 1384, 207, 201, 1625, 710, 180, 206, + /* 480 */ 38, 37, 474, 1762, 44, 42, 41, 40, 39, 1936, + /* 490 */ 1389, 1390, 1467, 1468, 84, 1762, 1389, 1390, 199, 1439, + /* 500 */ 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 615, 611, + /* 510 */ 1458, 1459, 1461, 1462, 1463, 1464, 2, 1758, 1601, 1412, + /* 520 */ 1936, 1440, 1450, 583, 1142, 1624, 571, 1466, 1469, 603, + /* 530 */ 2124, 585, 173, 2063, 2064, 603, 132, 2068, 1413, 514, + /* 540 */ 513, 512, 1386, 405, 1384, 570, 175, 131, 508, 406, + /* 550 */ 2125, 572, 507, 1623, 134, 1330, 1331, 506, 511, 1143, + /* 560 */ 1762, 1967, 1620, 505, 1809, 1810, 1762, 1389, 1390, 1936, + /* 570 */ 1439, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 615, + /* 580 */ 611, 1458, 1459, 1461, 1462, 1463, 1464, 2, 45, 43, + /* 590 */ 1329, 1332, 1985, 1740, 84, 354, 362, 1936, 1385, 1531, + /* 600 */ 620, 1607, 605, 157, 2027, 1936, 1936, 619, 130, 1465, + /* 610 */ 228, 1383, 1764, 11, 174, 2063, 2064, 1757, 132, 2068, + /* 620 */ 38, 37, 1967, 2070, 44, 42, 41, 40, 39, 519, + /* 630 */ 561, 1966, 1413, 603, 1460, 2002, 669, 1562, 103, 1968, + /* 640 */ 623, 1970, 1971, 618, 529, 613, 1391, 126, 137, 2065, + /* 650 */ 143, 2026, 2055, 1985, 504, 478, 356, 2051, 226, 45, + /* 660 */ 43, 620, 259, 603, 1762, 377, 1936, 362, 619, 1385, + /* 670 */ 607, 46, 2027, 522, 1619, 1362, 1363, 415, 516, 1618, + /* 680 */ 1465, 184, 1383, 225, 1753, 60, 558, 1560, 1561, 1563, + /* 690 */ 1564, 576, 1966, 710, 1762, 1950, 2002, 510, 509, 161, + /* 700 */ 1968, 623, 1970, 1971, 618, 1460, 613, 547, 1467, 1468, + /* 710 */ 1738, 2124, 542, 368, 567, 562, 556, 1391, 1936, 67, + /* 720 */ 1739, 157, 66, 1936, 1946, 1952, 2130, 175, 1475, 1747, + /* 730 */ 1764, 2125, 572, 1617, 1410, 613, 649, 1440, 1450, 1806, + /* 740 */ 548, 2092, 14, 1466, 1469, 603, 38, 37, 1496, 1749, + /* 750 */ 44, 42, 41, 40, 39, 31, 169, 2128, 1386, 429, + /* 760 */ 1384, 38, 37, 503, 710, 44, 42, 41, 40, 39, + /* 770 */ 1745, 400, 657, 399, 1616, 237, 1762, 1936, 1863, 1467, + /* 780 */ 1468, 1737, 1615, 1389, 1390, 502, 1439, 1442, 1443, 1444, + /* 790 */ 1445, 1446, 1447, 1448, 1449, 615, 611, 1458, 1459, 1461, + /* 800 */ 1462, 1463, 1464, 2, 41, 40, 39, 603, 1440, 1450, + /* 810 */ 319, 50, 1408, 3, 1466, 1469, 365, 94, 1936, 437, + /* 820 */ 32, 430, 450, 232, 157, 449, 1936, 655, 614, 1386, + /* 830 */ 1501, 1384, 1614, 1764, 1551, 178, 681, 679, 1762, 1755, + /* 840 */ 421, 1955, 451, 647, 157, 423, 148, 147, 652, 651, + /* 850 */ 650, 145, 1950, 1765, 1389, 1390, 1410, 1439, 1442, 1443, + /* 860 */ 1444, 1445, 1446, 1447, 1448, 1449, 615, 611, 1458, 1459, + /* 870 */ 1461, 1462, 1463, 1464, 2, 1441, 1936, 670, 1413, 1732, + /* 880 */ 158, 1946, 1952, 33, 1845, 296, 335, 1675, 655, 38, + /* 890 */ 37, 1858, 613, 44, 42, 41, 40, 39, 411, 294, + /* 900 */ 70, 1815, 183, 69, 1858, 1858, 1622, 148, 147, 652, + /* 910 */ 651, 650, 145, 13, 12, 185, 189, 1814, 1099, 1100, + /* 920 */ 99, 195, 456, 454, 653, 2095, 654, 1806, 447, 1806, + /* 930 */ 96, 442, 441, 440, 439, 436, 435, 434, 433, 432, + /* 940 */ 428, 427, 426, 425, 336, 418, 417, 416, 589, 413, + /* 950 */ 412, 333, 687, 686, 685, 684, 372, 60, 683, 682, + /* 960 */ 138, 677, 676, 675, 674, 673, 672, 671, 150, 667, + /* 970 */ 666, 665, 371, 370, 662, 661, 660, 659, 658, 1613, + /* 980 */ 254, 603, 655, 1612, 290, 603, 375, 1792, 374, 578, + /* 990 */ 547, 2075, 1528, 603, 2124, 476, 102, 1441, 1717, 477, + /* 1000 */ 1967, 148, 147, 652, 651, 650, 145, 1759, 1508, 2130, + /* 1010 */ 175, 140, 1762, 128, 2125, 572, 1762, 218, 574, 71, + /* 1020 */ 216, 236, 220, 1936, 1762, 219, 52, 1936, 547, 603, + /* 1030 */ 547, 1985, 2124, 546, 2124, 424, 78, 77, 404, 586, + /* 1040 */ 583, 182, 603, 142, 1936, 1394, 619, 2130, 175, 2130, + /* 1050 */ 175, 559, 2125, 572, 2125, 572, 543, 1923, 535, 318, + /* 1060 */ 1762, 603, 392, 235, 390, 386, 382, 379, 376, 79, + /* 1070 */ 1966, 134, 1967, 1762, 2002, 587, 1393, 103, 1968, 623, + /* 1080 */ 1970, 1971, 618, 603, 613, 222, 62, 224, 221, 172, + /* 1090 */ 223, 2055, 1762, 1665, 211, 356, 2051, 271, 603, 603, + /* 1100 */ 547, 1658, 87, 1985, 2124, 384, 1656, 178, 603, 610, + /* 1110 */ 339, 620, 598, 600, 1762, 515, 1936, 2082, 619, 2130, + /* 1120 */ 175, 1957, 601, 517, 2125, 572, 1967, 603, 520, 1762, + /* 1130 */ 1762, 176, 2063, 2064, 241, 132, 2068, 248, 1559, 1762, + /* 1140 */ 47, 277, 1966, 1604, 1605, 1986, 2002, 264, 373, 103, + /* 1150 */ 1968, 623, 1970, 1971, 618, 663, 613, 1985, 1762, 68, + /* 1160 */ 144, 2144, 1867, 2055, 146, 620, 1646, 356, 2051, 1959, + /* 1170 */ 1936, 340, 619, 338, 337, 62, 501, 1161, 2089, 664, + /* 1180 */ 503, 1652, 1803, 603, 47, 47, 243, 1967, 13, 12, + /* 1190 */ 2085, 627, 1327, 584, 1397, 144, 1966, 369, 256, 269, + /* 1200 */ 2002, 1159, 502, 103, 1968, 623, 1970, 1971, 618, 253, + /* 1210 */ 613, 595, 273, 579, 1762, 2144, 1213, 2055, 1985, 1, + /* 1220 */ 146, 356, 2051, 129, 4, 1396, 620, 1502, 359, 358, + /* 1230 */ 705, 1936, 2102, 619, 378, 1349, 1451, 289, 1399, 144, + /* 1240 */ 383, 332, 284, 1241, 188, 410, 1413, 1245, 414, 1465, + /* 1250 */ 1967, 1392, 1868, 1486, 445, 419, 1408, 1966, 438, 444, + /* 1260 */ 431, 2002, 1860, 446, 103, 1968, 623, 1970, 1971, 618, + /* 1270 */ 1967, 613, 1252, 452, 1460, 1250, 2144, 453, 2055, 192, + /* 1280 */ 455, 1985, 356, 2051, 457, 1414, 1391, 458, 467, 620, + /* 1290 */ 1416, 149, 470, 554, 1936, 198, 619, 200, 1411, 471, + /* 1300 */ 1415, 1985, 472, 1417, 473, 203, 205, 475, 82, 620, + /* 1310 */ 83, 479, 1116, 209, 1936, 496, 619, 497, 500, 498, + /* 1320 */ 1966, 1752, 321, 106, 2002, 534, 215, 103, 1968, 623, + /* 1330 */ 1970, 1971, 618, 609, 613, 536, 285, 230, 1748, 2144, + /* 1340 */ 1966, 2055, 217, 151, 2002, 356, 2051, 103, 1968, 623, + /* 1350 */ 1970, 1971, 618, 152, 613, 1750, 2118, 1746, 153, 2144, + /* 1360 */ 154, 2055, 1913, 1912, 537, 356, 2051, 538, 233, 541, + /* 1370 */ 713, 544, 560, 1967, 551, 2086, 2074, 2101, 593, 557, + /* 1380 */ 2100, 346, 2096, 7, 283, 563, 569, 249, 239, 242, + /* 1390 */ 2077, 165, 247, 552, 550, 250, 549, 347, 1400, 168, + /* 1400 */ 1395, 580, 577, 1528, 1985, 703, 699, 695, 691, 281, + /* 1410 */ 251, 2147, 620, 255, 252, 2123, 133, 1936, 1412, 619, + /* 1420 */ 2071, 588, 261, 1403, 1405, 350, 591, 596, 286, 287, + /* 1430 */ 592, 1884, 1967, 1883, 1882, 352, 611, 1458, 1459, 1461, + /* 1440 */ 1462, 1463, 1464, 1966, 288, 101, 1763, 2002, 274, 597, + /* 1450 */ 103, 1968, 623, 1970, 1971, 618, 59, 613, 91, 93, + /* 1460 */ 2036, 95, 2030, 1985, 2055, 625, 280, 1807, 356, 2051, + /* 1470 */ 1733, 620, 291, 706, 707, 709, 1936, 315, 619, 51, + /* 1480 */ 295, 599, 1930, 323, 324, 293, 1967, 1929, 300, 75, + /* 1490 */ 1928, 314, 304, 1927, 76, 1924, 380, 381, 1377, 1378, + /* 1500 */ 181, 1922, 1966, 385, 387, 388, 2002, 389, 1921, 103, + /* 1510 */ 1968, 623, 1970, 1971, 618, 391, 613, 1985, 1920, 393, + /* 1520 */ 262, 2028, 1919, 2055, 395, 620, 397, 356, 2051, 1918, + /* 1530 */ 1936, 1352, 619, 1895, 1351, 1894, 402, 1356, 1893, 231, + /* 1540 */ 403, 1892, 1853, 1307, 1852, 1850, 139, 1967, 1849, 1848, + /* 1550 */ 1851, 1847, 1846, 1844, 1843, 1842, 1966, 186, 420, 1841, + /* 1560 */ 2002, 422, 1840, 103, 1968, 623, 1970, 1971, 618, 1839, + /* 1570 */ 613, 1838, 1837, 1836, 1835, 606, 1834, 2055, 1985, 1833, + /* 1580 */ 1832, 356, 2051, 1831, 1830, 1829, 620, 1828, 1827, 1826, + /* 1590 */ 1825, 1936, 1824, 619, 448, 1817, 1816, 1309, 141, 1823, + /* 1600 */ 1822, 1821, 1820, 1819, 1818, 1967, 1680, 1679, 1677, 1641, + /* 1610 */ 196, 170, 1188, 1956, 1640, 193, 194, 1966, 1908, 1102, + /* 1620 */ 73, 2002, 197, 1902, 104, 1968, 623, 1970, 1971, 618, + /* 1630 */ 1101, 613, 1891, 463, 1890, 204, 1985, 74, 2055, 1870, + /* 1640 */ 465, 1741, 2054, 2051, 620, 1676, 1674, 480, 1672, 1936, + /* 1650 */ 202, 619, 482, 1670, 484, 1135, 486, 488, 481, 1967, + /* 1660 */ 490, 1668, 492, 485, 494, 1655, 1654, 1637, 489, 1743, + /* 1670 */ 1257, 1256, 493, 1742, 61, 1966, 1171, 1179, 1178, 2002, + /* 1680 */ 678, 680, 104, 1968, 623, 1970, 1971, 618, 1967, 613, + /* 1690 */ 1985, 1177, 1176, 1173, 1172, 1170, 2055, 1666, 620, 214, + /* 1700 */ 608, 2051, 341, 1936, 1659, 619, 342, 1657, 343, 521, + /* 1710 */ 1636, 523, 518, 1635, 525, 1634, 527, 1367, 105, 1985, + /* 1720 */ 1366, 531, 1369, 26, 1907, 1358, 55, 617, 1901, 621, + /* 1730 */ 539, 155, 1936, 2002, 619, 1889, 104, 1968, 623, 1970, + /* 1740 */ 1971, 618, 1887, 613, 2129, 28, 1967, 19, 16, 553, + /* 1750 */ 2055, 1574, 246, 555, 326, 2051, 58, 63, 1966, 238, + /* 1760 */ 245, 1957, 2002, 30, 240, 312, 1968, 623, 1970, 1971, + /* 1770 */ 618, 616, 613, 604, 2020, 21, 163, 1985, 1589, 20, + /* 1780 */ 17, 1588, 348, 1558, 244, 620, 29, 1593, 1550, 1594, + /* 1790 */ 1936, 88, 619, 540, 234, 1595, 344, 1592, 349, 1888, + /* 1800 */ 1967, 57, 545, 258, 56, 1525, 166, 1524, 5, 1886, + /* 1810 */ 6, 1885, 22, 594, 263, 265, 1966, 1556, 270, 1869, + /* 1820 */ 2002, 65, 90, 162, 1968, 623, 1970, 1971, 618, 92, + /* 1830 */ 613, 1985, 96, 275, 272, 23, 12, 1401, 1432, 620, + /* 1840 */ 2005, 167, 179, 612, 1936, 1455, 619, 1453, 36, 626, + /* 1850 */ 624, 1234, 364, 15, 1967, 630, 1452, 1424, 1487, 24, + /* 1860 */ 25, 622, 1242, 628, 633, 1239, 631, 636, 639, 1236, + /* 1870 */ 1966, 634, 1477, 1230, 2002, 573, 2145, 104, 1968, 623, + /* 1880 */ 1970, 1971, 618, 637, 613, 1985, 1228, 640, 1219, 1233, + /* 1890 */ 278, 2055, 646, 620, 1232, 97, 2052, 1231, 1936, 98, + /* 1900 */ 619, 10, 1251, 1476, 1247, 72, 1967, 1133, 656, 1167, + /* 1910 */ 1166, 1165, 1164, 1163, 1162, 1160, 1158, 1186, 1157, 1156, + /* 1920 */ 668, 1154, 1967, 1153, 1966, 1152, 1151, 1183, 2002, 279, + /* 1930 */ 1150, 161, 1968, 623, 1970, 1971, 618, 1985, 613, 1139, + /* 1940 */ 1149, 1148, 1181, 1145, 1144, 620, 1141, 1140, 1138, 1673, + /* 1950 */ 1936, 688, 619, 1985, 690, 1671, 692, 694, 689, 1669, + /* 1960 */ 696, 620, 693, 698, 1667, 700, 1936, 697, 619, 1653, + /* 1970 */ 701, 702, 704, 2093, 1091, 1633, 1966, 712, 282, 708, + /* 1980 */ 2002, 1608, 1387, 306, 1968, 623, 1970, 1971, 618, 711, + /* 1990 */ 613, 1608, 1966, 292, 1608, 1608, 2002, 1608, 1608, 162, + /* 2000 */ 1968, 623, 1970, 1971, 618, 1608, 613, 1608, 1608, 1608, + /* 2010 */ 1608, 1967, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2020 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 568, 1608, 1967, + /* 2030 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2040 */ 1608, 1608, 1985, 1608, 1608, 1608, 1608, 351, 1608, 1608, + /* 2050 */ 620, 1608, 2146, 1608, 1608, 1936, 1608, 619, 1608, 1608, + /* 2060 */ 1985, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 617, 1608, + /* 2070 */ 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, + /* 2080 */ 1608, 1966, 1608, 1967, 1608, 2002, 1608, 1608, 313, 1968, + /* 2090 */ 623, 1970, 1971, 618, 1608, 613, 1608, 1608, 1608, 1966, + /* 2100 */ 1967, 1608, 1608, 2002, 1608, 1608, 312, 1968, 623, 1970, + /* 2110 */ 1971, 618, 1608, 613, 1985, 2021, 1608, 1608, 1608, 361, + /* 2120 */ 1608, 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, + /* 2130 */ 1608, 1985, 1608, 1608, 1608, 1608, 363, 1608, 1608, 620, + /* 2140 */ 1608, 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, + /* 2150 */ 1608, 1608, 1967, 1966, 1608, 1608, 1608, 2002, 1608, 1608, + /* 2160 */ 313, 1968, 623, 1970, 1971, 618, 1608, 613, 1967, 1608, + /* 2170 */ 1966, 1608, 1608, 1608, 2002, 1608, 1608, 313, 1968, 623, + /* 2180 */ 1970, 1971, 618, 1985, 613, 1608, 1608, 1608, 1608, 1608, + /* 2190 */ 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, 1985, + /* 2200 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 620, 1608, 1608, + /* 2210 */ 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, 1608, + /* 2220 */ 1967, 1608, 533, 1608, 1608, 1608, 2002, 1608, 1608, 308, + /* 2230 */ 1968, 623, 1970, 1971, 618, 1608, 613, 1608, 1966, 1608, + /* 2240 */ 1608, 1608, 2002, 1608, 1608, 297, 1968, 623, 1970, 1971, + /* 2250 */ 618, 1985, 613, 1608, 1608, 1608, 1608, 1608, 1608, 620, + /* 2260 */ 1608, 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, + /* 2270 */ 1608, 1608, 1608, 1608, 1967, 1608, 1608, 1608, 1608, 1608, + /* 2280 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2290 */ 1966, 1608, 1608, 1608, 2002, 1967, 1608, 298, 1968, 623, + /* 2300 */ 1970, 1971, 618, 1608, 613, 1985, 1608, 1608, 1608, 1608, + /* 2310 */ 1608, 1608, 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, + /* 2320 */ 619, 1608, 1608, 1608, 1608, 1608, 1985, 1608, 1608, 1608, + /* 2330 */ 1608, 1608, 1608, 1608, 620, 1608, 1608, 1608, 1608, 1936, + /* 2340 */ 1608, 619, 1608, 1608, 1966, 1608, 1608, 1608, 2002, 1608, + /* 2350 */ 1608, 299, 1968, 623, 1970, 1971, 618, 1608, 613, 1608, + /* 2360 */ 1608, 1608, 1608, 1608, 1608, 1966, 1608, 1608, 1608, 2002, + /* 2370 */ 1608, 1967, 305, 1968, 623, 1970, 1971, 618, 1608, 613, + /* 2380 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1967, + /* 2390 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2400 */ 1608, 1608, 1985, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2410 */ 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, + /* 2420 */ 1985, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 620, 1608, + /* 2430 */ 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, + /* 2440 */ 1608, 1966, 1608, 1967, 1608, 2002, 1608, 1608, 309, 1968, + /* 2450 */ 623, 1970, 1971, 618, 1608, 613, 1608, 1608, 1608, 1966, + /* 2460 */ 1967, 1608, 1608, 2002, 1608, 1608, 301, 1968, 623, 1970, + /* 2470 */ 1971, 618, 1608, 613, 1985, 1608, 1608, 1608, 1608, 1608, + /* 2480 */ 1608, 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, + /* 2490 */ 1608, 1985, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 620, + /* 2500 */ 1608, 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, + /* 2510 */ 1608, 1608, 1967, 1966, 1608, 1608, 1608, 2002, 1608, 1608, + /* 2520 */ 310, 1968, 623, 1970, 1971, 618, 1608, 613, 1967, 1608, + /* 2530 */ 1966, 1608, 1608, 1608, 2002, 1608, 1608, 302, 1968, 623, + /* 2540 */ 1970, 1971, 618, 1985, 613, 1608, 1608, 1608, 1608, 1608, + /* 2550 */ 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, 1985, + /* 2560 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 620, 1608, 1608, + /* 2570 */ 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, 1608, + /* 2580 */ 1967, 1608, 1966, 1608, 1608, 1608, 2002, 1608, 1608, 311, + /* 2590 */ 1968, 623, 1970, 1971, 618, 1608, 613, 1608, 1966, 1608, + /* 2600 */ 1608, 1608, 2002, 1967, 1608, 303, 1968, 623, 1970, 1971, + /* 2610 */ 618, 1985, 613, 1608, 1608, 1608, 1608, 1608, 1608, 620, + /* 2620 */ 1608, 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, + /* 2630 */ 1608, 1608, 1608, 1608, 1985, 1608, 1608, 1608, 1608, 1608, + /* 2640 */ 1608, 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, + /* 2650 */ 1966, 1608, 1608, 1608, 2002, 1967, 1608, 316, 1968, 623, + /* 2660 */ 1970, 1971, 618, 1608, 613, 1608, 1608, 1608, 1608, 1608, + /* 2670 */ 1608, 1608, 1608, 1966, 1608, 1608, 1608, 2002, 1608, 1608, + /* 2680 */ 317, 1968, 623, 1970, 1971, 618, 1985, 613, 1608, 1608, + /* 2690 */ 1608, 1608, 1608, 1608, 620, 1608, 1608, 1608, 1608, 1936, + /* 2700 */ 1608, 619, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2710 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1967, 1608, + /* 2720 */ 1608, 1608, 1608, 1608, 1608, 1966, 1608, 1608, 1608, 2002, + /* 2730 */ 1608, 1608, 1979, 1968, 623, 1970, 1971, 618, 1608, 613, + /* 2740 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1985, + /* 2750 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 620, 1608, 1608, + /* 2760 */ 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, 1608, + /* 2770 */ 1967, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2780 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1966, 1967, + /* 2790 */ 1608, 1608, 2002, 1608, 1608, 1978, 1968, 623, 1970, 1971, + /* 2800 */ 618, 1985, 613, 1608, 1608, 1608, 1608, 1608, 1608, 620, + /* 2810 */ 1608, 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, + /* 2820 */ 1985, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 620, 1608, + /* 2830 */ 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, + /* 2840 */ 1966, 1967, 1608, 1608, 2002, 1608, 1608, 1977, 1968, 623, + /* 2850 */ 1970, 1971, 618, 1608, 613, 1608, 1608, 1967, 1608, 1966, + /* 2860 */ 1608, 1608, 1608, 2002, 1608, 1608, 328, 1968, 623, 1970, + /* 2870 */ 1971, 618, 1985, 613, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2880 */ 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, 1985, 1608, + /* 2890 */ 1608, 1608, 1608, 1608, 1608, 1608, 620, 1608, 1608, 1608, + /* 2900 */ 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, 1608, 1967, + /* 2910 */ 1608, 1966, 1608, 1608, 1608, 2002, 1608, 1608, 329, 1968, + /* 2920 */ 623, 1970, 1971, 618, 1608, 613, 1608, 1966, 1608, 1608, + /* 2930 */ 1608, 2002, 1967, 1608, 325, 1968, 623, 1970, 1971, 618, + /* 2940 */ 1985, 613, 1608, 1608, 1608, 1608, 1608, 1608, 620, 1608, + /* 2950 */ 1608, 1608, 1608, 1936, 1608, 619, 1608, 1608, 1608, 1608, + /* 2960 */ 1608, 1608, 1608, 1985, 1608, 1608, 1608, 1608, 1608, 1608, + /* 2970 */ 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, 619, 1966, + /* 2980 */ 1608, 1608, 1608, 2002, 1967, 1608, 330, 1968, 623, 1970, + /* 2990 */ 1971, 618, 1608, 613, 1608, 1608, 1608, 1608, 1608, 1608, + /* 3000 */ 1608, 1608, 621, 1608, 1608, 1608, 2002, 1608, 1608, 308, + /* 3010 */ 1968, 623, 1970, 1971, 618, 1985, 613, 1608, 1608, 1608, + /* 3020 */ 1608, 1608, 1608, 620, 1608, 1608, 1608, 1608, 1936, 1608, + /* 3030 */ 619, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 3040 */ 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, 1608, + /* 3050 */ 1608, 1608, 1608, 1608, 1966, 1608, 1608, 1608, 2002, 1608, + /* 3060 */ 1608, 307, 1968, 623, 1970, 1971, 618, 1608, 613, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 359, 335, 331, 373, 333, 334, 331, 369, 333, 334, - /* 10 */ 372, 373, 12, 13, 14, 360, 386, 387, 327, 14, - /* 20 */ 20, 359, 22, 8, 9, 20, 371, 12, 13, 14, - /* 30 */ 15, 16, 358, 33, 332, 35, 351, 335, 336, 354, - /* 40 */ 430, 375, 8, 9, 434, 358, 12, 13, 14, 15, - /* 50 */ 16, 20, 365, 379, 380, 400, 401, 402, 58, 449, - /* 60 */ 450, 374, 371, 63, 454, 455, 411, 8, 9, 327, - /* 70 */ 70, 12, 13, 14, 15, 16, 332, 20, 335, 335, - /* 80 */ 336, 8, 9, 12, 13, 12, 13, 14, 15, 16, - /* 90 */ 350, 20, 357, 22, 0, 95, 335, 63, 358, 20, - /* 100 */ 358, 22, 3, 44, 33, 370, 35, 367, 366, 366, - /* 110 */ 349, 96, 20, 371, 335, 373, 20, 117, 24, 25, - /* 120 */ 26, 27, 28, 29, 30, 31, 32, 366, 349, 58, - /* 130 */ 51, 324, 132, 133, 63, 356, 419, 420, 104, 397, - /* 140 */ 341, 70, 62, 401, 4, 366, 404, 405, 406, 407, - /* 150 */ 408, 409, 20, 411, 355, 430, 372, 373, 416, 434, - /* 160 */ 418, 161, 162, 364, 422, 423, 95, 167, 168, 426, - /* 170 */ 427, 428, 0, 430, 431, 450, 341, 434, 436, 454, - /* 180 */ 455, 430, 182, 3, 184, 434, 444, 95, 117, 132, - /* 190 */ 133, 342, 449, 450, 160, 388, 347, 454, 455, 364, - /* 200 */ 20, 450, 20, 132, 133, 454, 455, 207, 208, 177, + /* 0 */ 420, 421, 332, 374, 334, 335, 332, 370, 334, 335, + /* 10 */ 373, 374, 12, 13, 14, 361, 387, 388, 360, 14, + /* 20 */ 20, 336, 22, 8, 9, 20, 372, 12, 13, 14, + /* 30 */ 15, 16, 359, 33, 333, 35, 352, 336, 337, 355, + /* 40 */ 431, 20, 8, 9, 435, 20, 12, 13, 14, 15, + /* 50 */ 16, 39, 20, 380, 381, 401, 402, 403, 58, 450, + /* 60 */ 451, 376, 58, 63, 455, 456, 412, 8, 9, 328, + /* 70 */ 70, 12, 13, 14, 15, 16, 333, 20, 336, 336, + /* 80 */ 337, 8, 9, 12, 13, 12, 13, 14, 15, 16, + /* 90 */ 3, 20, 358, 22, 0, 95, 415, 63, 94, 418, + /* 100 */ 359, 97, 95, 44, 33, 371, 35, 20, 367, 367, + /* 110 */ 327, 96, 329, 372, 336, 374, 95, 117, 24, 25, + /* 120 */ 26, 27, 28, 29, 30, 31, 32, 95, 350, 58, + /* 130 */ 340, 343, 132, 133, 63, 357, 348, 79, 104, 398, + /* 140 */ 4, 70, 62, 402, 354, 367, 405, 406, 407, 408, + /* 150 */ 409, 410, 362, 412, 20, 431, 359, 44, 417, 435, + /* 160 */ 419, 161, 162, 366, 423, 424, 95, 167, 168, 427, + /* 170 */ 428, 429, 375, 431, 432, 451, 20, 435, 437, 455, + /* 180 */ 456, 431, 182, 96, 184, 435, 445, 21, 117, 132, + /* 190 */ 133, 58, 450, 451, 160, 137, 138, 455, 456, 95, + /* 200 */ 34, 451, 36, 132, 133, 455, 456, 207, 208, 96, /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 220 */ 220, 221, 222, 223, 224, 225, 226, 95, 132, 133, - /* 230 */ 198, 199, 161, 162, 62, 95, 163, 430, 167, 168, - /* 240 */ 21, 434, 106, 24, 25, 26, 27, 28, 29, 30, - /* 250 */ 31, 32, 37, 182, 207, 184, 449, 450, 14, 15, - /* 260 */ 16, 454, 455, 167, 168, 231, 232, 233, 234, 235, - /* 270 */ 236, 237, 238, 239, 240, 241, 96, 95, 207, 208, - /* 280 */ 58, 210, 211, 212, 213, 214, 215, 216, 217, 218, - /* 290 */ 219, 220, 221, 222, 223, 224, 225, 226, 358, 228, - /* 300 */ 12, 13, 255, 256, 257, 258, 259, 326, 20, 328, - /* 310 */ 22, 4, 127, 98, 20, 100, 101, 95, 103, 97, - /* 320 */ 380, 33, 107, 35, 108, 109, 110, 111, 112, 113, - /* 330 */ 114, 115, 116, 117, 118, 0, 120, 121, 122, 123, - /* 340 */ 124, 125, 33, 163, 129, 360, 58, 20, 360, 388, - /* 350 */ 43, 63, 45, 46, 358, 228, 371, 48, 70, 371, - /* 360 */ 350, 365, 263, 54, 55, 56, 57, 58, 358, 95, - /* 370 */ 374, 12, 13, 14, 189, 190, 244, 367, 193, 20, - /* 380 */ 195, 22, 358, 95, 244, 400, 401, 402, 400, 401, - /* 390 */ 366, 430, 33, 95, 35, 434, 411, 344, 345, 411, - /* 400 */ 65, 66, 67, 94, 20, 117, 97, 0, 73, 74, - /* 410 */ 449, 450, 228, 78, 230, 454, 455, 58, 83, 84, - /* 420 */ 132, 133, 126, 127, 89, 0, 244, 131, 21, 70, - /* 430 */ 406, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 440 */ 8, 9, 344, 345, 12, 13, 14, 15, 16, 161, - /* 450 */ 162, 350, 20, 358, 95, 167, 168, 8, 9, 358, - /* 460 */ 365, 12, 13, 14, 15, 16, 244, 403, 367, 374, - /* 470 */ 182, 14, 184, 164, 165, 95, 117, 20, 169, 8, - /* 480 */ 9, 172, 62, 12, 13, 14, 15, 16, 161, 162, - /* 490 */ 35, 132, 133, 429, 327, 207, 208, 188, 210, 211, - /* 500 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 510 */ 222, 223, 224, 225, 226, 65, 66, 67, 244, 20, - /* 520 */ 161, 162, 21, 73, 74, 430, 167, 168, 78, 434, - /* 530 */ 35, 403, 107, 83, 84, 34, 403, 36, 371, 89, - /* 540 */ 20, 182, 244, 184, 449, 450, 339, 163, 327, 454, - /* 550 */ 455, 126, 127, 128, 129, 130, 131, 429, 335, 388, - /* 560 */ 353, 181, 429, 183, 327, 70, 207, 208, 361, 210, - /* 570 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - /* 580 */ 221, 222, 223, 224, 225, 226, 12, 13, 335, 366, - /* 590 */ 22, 14, 371, 0, 20, 163, 22, 20, 19, 163, - /* 600 */ 373, 430, 349, 35, 58, 434, 170, 33, 371, 35, - /* 610 */ 383, 44, 33, 386, 387, 335, 327, 0, 161, 366, - /* 620 */ 449, 450, 388, 174, 244, 454, 455, 48, 335, 349, - /* 630 */ 360, 366, 58, 54, 55, 56, 57, 58, 70, 184, - /* 640 */ 94, 371, 377, 97, 70, 366, 366, 358, 425, 426, - /* 650 */ 427, 428, 339, 430, 431, 366, 377, 12, 13, 366, - /* 660 */ 371, 335, 373, 96, 430, 20, 160, 22, 434, 95, - /* 670 */ 400, 401, 327, 94, 361, 349, 97, 335, 33, 62, - /* 680 */ 35, 411, 356, 449, 450, 117, 397, 79, 454, 455, - /* 690 */ 401, 117, 366, 404, 405, 406, 407, 408, 409, 410, - /* 700 */ 411, 412, 413, 58, 0, 327, 132, 133, 366, 130, - /* 710 */ 12, 13, 14, 15, 16, 70, 371, 268, 166, 426, - /* 720 */ 427, 428, 327, 430, 431, 414, 8, 9, 417, 359, - /* 730 */ 12, 13, 14, 15, 16, 161, 162, 231, 161, 327, - /* 740 */ 95, 167, 168, 335, 151, 137, 138, 241, 169, 371, - /* 750 */ 182, 415, 184, 417, 1, 2, 182, 349, 184, 126, - /* 760 */ 327, 415, 117, 417, 20, 186, 371, 188, 426, 427, - /* 770 */ 428, 20, 430, 431, 366, 207, 208, 132, 133, 39, - /* 780 */ 388, 207, 208, 371, 210, 211, 212, 213, 214, 215, - /* 790 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 800 */ 226, 249, 250, 251, 371, 335, 161, 162, 18, 358, - /* 810 */ 20, 107, 167, 168, 96, 242, 243, 27, 367, 349, - /* 820 */ 30, 358, 430, 33, 191, 192, 434, 182, 366, 184, - /* 830 */ 126, 127, 128, 129, 130, 131, 366, 374, 48, 377, - /* 840 */ 50, 449, 450, 53, 20, 327, 454, 455, 368, 96, - /* 850 */ 44, 371, 207, 208, 63, 210, 211, 212, 213, 214, - /* 860 */ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - /* 870 */ 225, 226, 327, 368, 327, 346, 371, 348, 18, 368, - /* 880 */ 327, 2, 371, 23, 94, 0, 335, 8, 9, 371, - /* 890 */ 4, 12, 13, 14, 15, 16, 106, 37, 38, 2, - /* 900 */ 349, 41, 327, 45, 46, 8, 9, 163, 70, 12, - /* 910 */ 13, 14, 15, 16, 163, 22, 371, 366, 371, 59, - /* 920 */ 60, 61, 351, 70, 371, 354, 136, 392, 35, 139, - /* 930 */ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - /* 940 */ 150, 151, 152, 153, 154, 155, 371, 157, 158, 159, - /* 950 */ 65, 66, 67, 68, 69, 95, 71, 72, 73, 74, - /* 960 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - /* 970 */ 85, 86, 87, 88, 89, 90, 91, 20, 107, 22, - /* 980 */ 42, 0, 44, 243, 58, 161, 327, 44, 327, 327, - /* 990 */ 335, 335, 35, 335, 134, 335, 107, 327, 207, 4, - /* 1000 */ 129, 42, 35, 44, 349, 349, 327, 349, 51, 349, - /* 1010 */ 359, 335, 388, 335, 19, 126, 127, 128, 129, 130, - /* 1020 */ 131, 366, 366, 97, 366, 349, 366, 349, 33, 48, - /* 1030 */ 371, 359, 371, 371, 174, 175, 176, 358, 327, 179, - /* 1040 */ 359, 371, 366, 48, 366, 366, 99, 359, 53, 102, - /* 1050 */ 371, 0, 373, 58, 430, 132, 133, 197, 434, 35, - /* 1060 */ 200, 106, 202, 203, 204, 205, 206, 335, 327, 99, - /* 1070 */ 347, 265, 102, 449, 450, 44, 397, 335, 454, 455, - /* 1080 */ 401, 349, 371, 404, 405, 406, 407, 408, 409, 94, - /* 1090 */ 411, 349, 97, 414, 70, 416, 417, 418, 366, 358, - /* 1100 */ 49, 422, 423, 335, 244, 335, 335, 366, 366, 335, - /* 1110 */ 335, 156, 371, 99, 373, 99, 102, 349, 102, 349, - /* 1120 */ 349, 0, 327, 349, 349, 44, 44, 96, 44, 95, - /* 1130 */ 44, 245, 0, 0, 366, 44, 366, 366, 397, 105, - /* 1140 */ 366, 366, 401, 22, 328, 404, 405, 406, 407, 408, - /* 1150 */ 409, 184, 411, 358, 22, 22, 44, 416, 381, 418, - /* 1160 */ 458, 366, 44, 422, 423, 337, 371, 44, 373, 13, - /* 1170 */ 1, 2, 44, 47, 447, 13, 441, 96, 96, 44, - /* 1180 */ 96, 327, 96, 44, 358, 444, 44, 96, 44, 337, - /* 1190 */ 44, 35, 397, 381, 381, 334, 401, 35, 432, 404, - /* 1200 */ 405, 406, 407, 408, 409, 370, 411, 451, 96, 424, - /* 1210 */ 267, 416, 358, 418, 96, 435, 399, 422, 423, 96, - /* 1220 */ 366, 95, 246, 48, 96, 371, 180, 373, 433, 398, - /* 1230 */ 390, 96, 42, 378, 20, 96, 160, 381, 96, 20, - /* 1240 */ 96, 378, 96, 376, 335, 335, 378, 327, 376, 376, - /* 1250 */ 93, 397, 335, 335, 343, 401, 335, 20, 404, 405, - /* 1260 */ 406, 407, 408, 409, 329, 411, 329, 327, 394, 20, - /* 1270 */ 416, 341, 418, 20, 373, 341, 422, 423, 358, 20, - /* 1280 */ 336, 20, 341, 389, 336, 335, 366, 433, 52, 329, - /* 1290 */ 341, 371, 341, 373, 341, 341, 338, 358, 358, 338, - /* 1300 */ 358, 335, 329, 358, 358, 196, 366, 371, 396, 394, - /* 1310 */ 358, 371, 187, 373, 358, 393, 339, 397, 335, 339, - /* 1320 */ 358, 401, 358, 358, 404, 405, 406, 407, 408, 409, - /* 1330 */ 358, 411, 358, 254, 371, 440, 416, 397, 418, 371, - /* 1340 */ 253, 401, 422, 423, 404, 405, 406, 407, 408, 409, - /* 1350 */ 381, 411, 373, 433, 440, 384, 416, 371, 418, 12, - /* 1360 */ 13, 371, 422, 423, 327, 381, 384, 371, 260, 22, - /* 1370 */ 443, 173, 262, 433, 442, 261, 247, 266, 459, 243, - /* 1380 */ 33, 453, 35, 264, 269, 452, 399, 366, 20, 335, - /* 1390 */ 384, 336, 403, 371, 371, 358, 339, 371, 371, 371, - /* 1400 */ 371, 384, 382, 366, 165, 58, 339, 354, 371, 339, - /* 1410 */ 373, 366, 95, 421, 95, 440, 438, 70, 362, 371, - /* 1420 */ 348, 36, 339, 327, 439, 437, 329, 335, 330, 391, - /* 1430 */ 395, 325, 385, 340, 397, 385, 0, 352, 401, 0, - /* 1440 */ 352, 404, 405, 406, 407, 408, 409, 352, 411, 189, - /* 1450 */ 0, 0, 42, 416, 358, 418, 0, 35, 201, 422, - /* 1460 */ 423, 35, 366, 35, 117, 35, 201, 371, 0, 373, - /* 1470 */ 433, 201, 35, 35, 0, 201, 0, 35, 0, 22, - /* 1480 */ 0, 35, 184, 182, 0, 0, 178, 177, 0, 0, - /* 1490 */ 47, 0, 0, 397, 0, 42, 0, 401, 0, 0, - /* 1500 */ 404, 405, 406, 407, 408, 409, 0, 411, 0, 0, - /* 1510 */ 0, 0, 416, 327, 418, 151, 35, 0, 422, 423, - /* 1520 */ 151, 0, 0, 0, 0, 0, 0, 0, 0, 182, - /* 1530 */ 0, 184, 0, 0, 0, 0, 0, 0, 0, 42, - /* 1540 */ 0, 0, 0, 0, 358, 0, 0, 0, 135, 0, - /* 1550 */ 0, 22, 366, 35, 207, 208, 0, 371, 58, 373, - /* 1560 */ 0, 58, 0, 0, 44, 14, 219, 220, 221, 222, - /* 1570 */ 223, 224, 225, 42, 0, 327, 0, 0, 39, 14, - /* 1580 */ 0, 173, 0, 397, 40, 0, 0, 401, 0, 0, - /* 1590 */ 404, 405, 406, 407, 408, 409, 39, 411, 327, 47, - /* 1600 */ 47, 47, 416, 39, 418, 35, 358, 48, 422, 423, - /* 1610 */ 39, 0, 64, 35, 366, 0, 48, 48, 39, 371, - /* 1620 */ 39, 373, 35, 0, 0, 35, 0, 0, 0, 358, - /* 1630 */ 39, 48, 35, 0, 22, 35, 35, 366, 35, 35, - /* 1640 */ 44, 35, 371, 44, 373, 397, 0, 22, 35, 401, - /* 1650 */ 0, 35, 404, 405, 406, 407, 408, 409, 22, 411, - /* 1660 */ 50, 22, 104, 102, 416, 327, 418, 0, 397, 22, - /* 1670 */ 422, 423, 401, 0, 0, 404, 405, 406, 407, 408, - /* 1680 */ 409, 0, 411, 35, 35, 22, 35, 35, 327, 418, - /* 1690 */ 20, 96, 35, 422, 423, 194, 358, 95, 0, 35, - /* 1700 */ 0, 185, 22, 0, 366, 0, 44, 3, 248, 371, - /* 1710 */ 96, 373, 95, 95, 227, 252, 96, 96, 163, 358, - /* 1720 */ 44, 44, 47, 44, 95, 95, 95, 366, 96, 163, - /* 1730 */ 47, 248, 371, 96, 373, 397, 163, 165, 95, 401, - /* 1740 */ 96, 3, 404, 405, 406, 407, 408, 409, 35, 411, - /* 1750 */ 44, 327, 248, 35, 35, 35, 418, 35, 397, 35, - /* 1760 */ 422, 423, 401, 171, 170, 404, 405, 406, 407, 408, - /* 1770 */ 409, 327, 411, 47, 96, 170, 44, 47, 96, 418, - /* 1780 */ 0, 0, 358, 422, 423, 0, 95, 0, 96, 96, - /* 1790 */ 366, 95, 95, 39, 95, 371, 95, 373, 47, 164, - /* 1800 */ 166, 44, 358, 2, 229, 207, 22, 105, 96, 95, - /* 1810 */ 366, 95, 47, 96, 47, 371, 95, 373, 22, 96, - /* 1820 */ 227, 397, 95, 35, 95, 401, 35, 96, 404, 405, - /* 1830 */ 406, 407, 408, 409, 227, 411, 95, 35, 96, 106, - /* 1840 */ 327, 397, 95, 35, 96, 401, 96, 95, 404, 405, - /* 1850 */ 406, 407, 408, 409, 209, 411, 95, 35, 96, 95, - /* 1860 */ 35, 242, 96, 95, 119, 119, 22, 107, 119, 445, - /* 1870 */ 446, 358, 119, 95, 44, 35, 22, 95, 64, 366, - /* 1880 */ 63, 95, 35, 35, 371, 35, 373, 35, 35, 70, - /* 1890 */ 35, 35, 35, 35, 327, 35, 92, 35, 35, 35, - /* 1900 */ 456, 457, 22, 44, 35, 70, 35, 35, 35, 35, - /* 1910 */ 397, 327, 35, 35, 401, 22, 35, 404, 405, 406, - /* 1920 */ 407, 408, 409, 35, 411, 358, 0, 35, 39, 0, - /* 1930 */ 48, 418, 35, 366, 48, 39, 423, 0, 371, 35, - /* 1940 */ 373, 39, 358, 0, 35, 39, 48, 48, 0, 35, - /* 1950 */ 366, 35, 0, 22, 21, 371, 22, 373, 22, 21, - /* 1960 */ 20, 460, 460, 460, 397, 327, 460, 460, 401, 460, - /* 1970 */ 460, 404, 405, 406, 407, 408, 409, 460, 411, 460, - /* 1980 */ 460, 397, 460, 327, 460, 401, 460, 460, 404, 405, - /* 1990 */ 406, 407, 408, 409, 460, 411, 358, 460, 460, 460, - /* 2000 */ 460, 460, 460, 460, 366, 460, 460, 460, 460, 371, - /* 2010 */ 460, 373, 460, 446, 358, 460, 460, 460, 460, 363, - /* 2020 */ 460, 460, 366, 460, 460, 460, 460, 371, 460, 373, - /* 2030 */ 460, 460, 448, 460, 460, 397, 460, 327, 460, 401, - /* 2040 */ 460, 460, 404, 405, 406, 407, 408, 409, 460, 411, - /* 2050 */ 460, 460, 460, 397, 460, 327, 460, 401, 460, 460, - /* 2060 */ 404, 405, 406, 407, 408, 409, 460, 411, 358, 460, - /* 2070 */ 460, 460, 460, 460, 460, 460, 366, 460, 460, 460, - /* 2080 */ 460, 371, 460, 373, 460, 460, 358, 460, 460, 460, - /* 2090 */ 460, 363, 460, 460, 366, 457, 460, 460, 460, 371, - /* 2100 */ 460, 373, 460, 460, 460, 460, 460, 397, 460, 460, - /* 2110 */ 327, 401, 460, 460, 404, 405, 406, 407, 408, 409, - /* 2120 */ 460, 411, 460, 413, 460, 397, 460, 460, 460, 401, - /* 2130 */ 327, 460, 404, 405, 406, 407, 408, 409, 460, 411, - /* 2140 */ 460, 358, 460, 460, 460, 460, 363, 460, 460, 366, - /* 2150 */ 460, 460, 460, 460, 371, 460, 373, 460, 460, 460, - /* 2160 */ 460, 358, 460, 460, 460, 460, 460, 460, 460, 366, - /* 2170 */ 460, 460, 460, 460, 371, 460, 373, 460, 460, 460, - /* 2180 */ 397, 460, 460, 460, 401, 460, 460, 404, 405, 406, - /* 2190 */ 407, 408, 409, 460, 411, 460, 460, 327, 460, 460, - /* 2200 */ 397, 460, 460, 460, 401, 460, 460, 404, 405, 406, - /* 2210 */ 407, 408, 409, 460, 411, 460, 460, 460, 460, 460, - /* 2220 */ 460, 460, 327, 460, 460, 460, 460, 460, 358, 460, - /* 2230 */ 460, 460, 460, 460, 460, 460, 366, 460, 460, 460, - /* 2240 */ 460, 371, 460, 373, 460, 460, 460, 460, 460, 327, - /* 2250 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, - /* 2260 */ 460, 366, 460, 460, 460, 460, 371, 397, 373, 460, - /* 2270 */ 460, 401, 460, 460, 404, 405, 406, 407, 408, 409, - /* 2280 */ 358, 411, 460, 460, 460, 460, 460, 460, 366, 460, - /* 2290 */ 460, 460, 397, 371, 460, 373, 401, 460, 460, 404, - /* 2300 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 327, - /* 2310 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 397, - /* 2320 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, - /* 2330 */ 408, 409, 327, 411, 460, 460, 460, 460, 460, 460, - /* 2340 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, - /* 2350 */ 460, 460, 460, 371, 460, 373, 460, 460, 460, 460, - /* 2360 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, - /* 2370 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 397, - /* 2380 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, - /* 2390 */ 408, 409, 327, 411, 460, 460, 460, 460, 460, 460, - /* 2400 */ 460, 460, 397, 460, 460, 460, 401, 460, 460, 404, - /* 2410 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 327, - /* 2420 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, - /* 2430 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 460, - /* 2440 */ 460, 460, 460, 460, 327, 460, 460, 460, 460, 460, - /* 2450 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, - /* 2460 */ 460, 460, 397, 371, 460, 373, 401, 460, 460, 404, - /* 2470 */ 405, 406, 407, 408, 409, 358, 411, 460, 460, 460, - /* 2480 */ 460, 460, 460, 366, 460, 460, 460, 460, 371, 397, - /* 2490 */ 373, 460, 460, 401, 460, 460, 404, 405, 406, 407, - /* 2500 */ 408, 409, 327, 411, 460, 460, 460, 460, 460, 460, - /* 2510 */ 460, 460, 460, 460, 397, 460, 460, 460, 401, 327, - /* 2520 */ 460, 404, 405, 406, 407, 408, 409, 460, 411, 460, - /* 2530 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, - /* 2540 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 460, - /* 2550 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, - /* 2560 */ 460, 460, 460, 371, 460, 373, 460, 460, 460, 460, - /* 2570 */ 460, 327, 397, 460, 460, 460, 401, 460, 460, 404, - /* 2580 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 397, - /* 2590 */ 460, 460, 460, 401, 327, 460, 404, 405, 406, 407, - /* 2600 */ 408, 409, 358, 411, 460, 460, 460, 460, 460, 460, - /* 2610 */ 366, 460, 460, 460, 460, 371, 460, 373, 460, 460, - /* 2620 */ 460, 460, 460, 327, 460, 358, 460, 460, 460, 460, - /* 2630 */ 460, 460, 460, 366, 460, 460, 460, 460, 371, 460, - /* 2640 */ 373, 397, 460, 460, 460, 401, 460, 460, 404, 405, - /* 2650 */ 406, 407, 408, 409, 358, 411, 460, 460, 460, 460, - /* 2660 */ 460, 460, 366, 460, 397, 460, 460, 371, 401, 373, - /* 2670 */ 460, 404, 405, 406, 407, 408, 409, 460, 411, 460, - /* 2680 */ 460, 327, 460, 460, 460, 460, 460, 460, 460, 460, - /* 2690 */ 460, 460, 460, 397, 460, 460, 460, 401, 460, 327, - /* 2700 */ 404, 405, 406, 407, 408, 409, 460, 411, 460, 460, - /* 2710 */ 460, 460, 358, 460, 460, 460, 460, 460, 460, 460, - /* 2720 */ 366, 460, 460, 460, 460, 371, 460, 373, 460, 460, - /* 2730 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, - /* 2740 */ 460, 460, 460, 371, 460, 373, 460, 460, 460, 460, - /* 2750 */ 460, 397, 460, 460, 460, 401, 460, 460, 404, 405, - /* 2760 */ 406, 407, 408, 409, 327, 411, 460, 460, 460, 397, - /* 2770 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, - /* 2780 */ 408, 409, 460, 411, 460, 460, 327, 460, 460, 460, - /* 2790 */ 460, 460, 460, 460, 460, 358, 460, 460, 460, 460, - /* 2800 */ 460, 460, 460, 366, 460, 460, 460, 460, 371, 460, - /* 2810 */ 373, 460, 460, 460, 460, 460, 460, 358, 460, 460, - /* 2820 */ 460, 460, 460, 460, 460, 366, 460, 460, 460, 460, - /* 2830 */ 371, 460, 373, 460, 397, 460, 460, 460, 401, 460, - /* 2840 */ 460, 404, 405, 406, 407, 408, 409, 327, 411, 460, - /* 2850 */ 460, 460, 460, 460, 460, 460, 397, 460, 460, 460, - /* 2860 */ 401, 460, 460, 404, 405, 406, 407, 408, 409, 327, - /* 2870 */ 411, 460, 460, 460, 460, 460, 460, 460, 358, 460, - /* 2880 */ 460, 460, 460, 460, 460, 460, 366, 460, 460, 460, - /* 2890 */ 460, 371, 460, 373, 460, 460, 460, 460, 460, 460, - /* 2900 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, - /* 2910 */ 460, 460, 460, 371, 460, 373, 460, 397, 460, 460, - /* 2920 */ 460, 401, 460, 460, 404, 405, 406, 407, 408, 409, - /* 2930 */ 327, 411, 460, 460, 460, 460, 460, 460, 460, 397, - /* 2940 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, - /* 2950 */ 408, 409, 460, 411, 460, 460, 460, 460, 460, 460, - /* 2960 */ 460, 358, 460, 460, 460, 460, 460, 460, 460, 366, - /* 2970 */ 460, 460, 460, 460, 371, 460, 373, 460, 460, 460, - /* 2980 */ 460, 460, 327, 460, 460, 460, 460, 460, 460, 460, - /* 2990 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, - /* 3000 */ 397, 460, 460, 460, 401, 460, 460, 404, 405, 406, - /* 3010 */ 407, 408, 409, 358, 411, 460, 460, 460, 460, 460, - /* 3020 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 460, - /* 3030 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, - /* 3040 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, - /* 3050 */ 460, 460, 397, 460, 460, 460, 401, 460, 460, 404, - /* 3060 */ 405, 406, 407, 408, 409, 460, 411, + /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 95, 95, + /* 230 */ 97, 95, 161, 162, 404, 20, 163, 21, 167, 168, + /* 240 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 106, + /* 250 */ 163, 127, 245, 182, 404, 184, 244, 8, 9, 328, + /* 260 */ 430, 12, 13, 14, 15, 16, 232, 233, 234, 235, + /* 270 */ 236, 237, 238, 239, 240, 241, 242, 245, 207, 208, + /* 280 */ 430, 210, 211, 212, 213, 214, 215, 216, 217, 218, + /* 290 */ 219, 220, 221, 222, 223, 224, 225, 226, 227, 177, + /* 300 */ 229, 12, 13, 372, 361, 22, 14, 328, 359, 20, + /* 310 */ 22, 22, 20, 189, 190, 372, 367, 193, 35, 195, + /* 320 */ 198, 199, 33, 35, 35, 108, 109, 110, 111, 112, + /* 330 */ 113, 114, 115, 116, 117, 118, 0, 120, 121, 122, + /* 340 */ 123, 124, 125, 33, 401, 402, 403, 58, 35, 245, + /* 350 */ 389, 372, 63, 70, 359, 412, 407, 4, 48, 70, + /* 360 */ 20, 366, 22, 20, 54, 55, 56, 57, 58, 328, + /* 370 */ 375, 328, 12, 13, 14, 35, 161, 162, 245, 245, + /* 380 */ 20, 245, 22, 70, 95, 12, 13, 14, 15, 16, + /* 390 */ 62, 51, 431, 33, 20, 35, 435, 20, 328, 22, + /* 400 */ 117, 65, 66, 67, 94, 4, 117, 97, 0, 73, + /* 410 */ 74, 450, 451, 372, 78, 372, 455, 456, 58, 83, + /* 420 */ 84, 132, 133, 174, 328, 89, 126, 127, 51, 21, + /* 430 */ 70, 131, 24, 25, 26, 27, 28, 29, 30, 31, + /* 440 */ 32, 336, 372, 20, 43, 328, 45, 46, 70, 374, + /* 450 */ 161, 162, 336, 161, 359, 95, 167, 168, 229, 384, + /* 460 */ 231, 366, 387, 388, 336, 182, 350, 184, 372, 44, + /* 470 */ 375, 182, 367, 184, 164, 165, 328, 117, 350, 169, + /* 480 */ 8, 9, 172, 367, 12, 13, 14, 15, 16, 372, + /* 490 */ 207, 208, 132, 133, 342, 367, 207, 208, 188, 210, + /* 500 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + /* 510 */ 221, 222, 223, 224, 225, 226, 227, 365, 269, 20, + /* 520 */ 372, 161, 162, 336, 35, 328, 431, 167, 168, 336, + /* 530 */ 435, 426, 427, 428, 429, 336, 431, 432, 20, 65, + /* 540 */ 66, 67, 182, 350, 184, 450, 451, 73, 74, 350, + /* 550 */ 455, 456, 78, 328, 367, 132, 133, 83, 84, 70, + /* 560 */ 367, 328, 328, 89, 373, 374, 367, 207, 208, 372, + /* 570 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + /* 580 */ 220, 221, 222, 223, 224, 225, 226, 227, 12, 13, + /* 590 */ 167, 168, 359, 0, 342, 351, 20, 372, 22, 246, + /* 600 */ 367, 325, 416, 359, 418, 372, 372, 374, 356, 33, + /* 610 */ 126, 35, 368, 229, 427, 428, 429, 365, 431, 432, + /* 620 */ 8, 9, 328, 404, 12, 13, 14, 15, 16, 4, + /* 630 */ 166, 398, 20, 336, 58, 402, 70, 207, 405, 406, + /* 640 */ 407, 408, 409, 410, 19, 412, 70, 350, 415, 430, + /* 650 */ 417, 418, 419, 359, 357, 62, 423, 424, 33, 12, + /* 660 */ 13, 367, 163, 336, 367, 389, 372, 20, 374, 22, + /* 670 */ 416, 95, 418, 48, 328, 191, 192, 350, 53, 328, + /* 680 */ 33, 163, 35, 58, 361, 95, 256, 257, 258, 259, + /* 690 */ 260, 266, 398, 117, 367, 372, 402, 345, 346, 405, + /* 700 */ 406, 407, 408, 409, 410, 58, 412, 431, 132, 133, + /* 710 */ 0, 435, 393, 351, 250, 251, 252, 70, 372, 94, + /* 720 */ 0, 359, 97, 372, 401, 402, 450, 451, 14, 360, + /* 730 */ 368, 455, 456, 328, 20, 412, 369, 161, 162, 372, + /* 740 */ 446, 447, 95, 167, 168, 336, 8, 9, 160, 360, + /* 750 */ 12, 13, 14, 15, 16, 2, 359, 3, 182, 350, + /* 760 */ 184, 8, 9, 107, 117, 12, 13, 14, 15, 16, + /* 770 */ 360, 181, 62, 183, 328, 163, 367, 372, 381, 132, + /* 780 */ 133, 0, 328, 207, 208, 129, 210, 211, 212, 213, + /* 790 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + /* 800 */ 224, 225, 226, 227, 14, 15, 16, 336, 161, 162, + /* 810 */ 18, 42, 20, 44, 167, 168, 351, 340, 372, 27, + /* 820 */ 232, 350, 30, 360, 359, 33, 372, 107, 360, 182, + /* 830 */ 242, 184, 328, 368, 96, 245, 345, 346, 367, 362, + /* 840 */ 48, 361, 50, 360, 359, 53, 126, 127, 128, 129, + /* 850 */ 130, 131, 372, 368, 207, 208, 20, 210, 211, 212, + /* 860 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + /* 870 */ 223, 224, 225, 226, 227, 161, 372, 347, 20, 349, + /* 880 */ 18, 401, 402, 2, 0, 23, 94, 0, 107, 8, + /* 890 */ 9, 367, 412, 12, 13, 14, 15, 16, 106, 37, + /* 900 */ 38, 359, 378, 41, 367, 367, 329, 126, 127, 128, + /* 910 */ 129, 130, 131, 1, 2, 378, 378, 375, 45, 46, + /* 920 */ 95, 59, 60, 61, 369, 382, 369, 372, 136, 372, + /* 930 */ 105, 139, 140, 141, 142, 143, 144, 145, 146, 147, + /* 940 */ 148, 149, 150, 151, 152, 153, 154, 155, 389, 157, + /* 950 */ 158, 159, 65, 66, 67, 68, 69, 95, 71, 72, + /* 960 */ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + /* 970 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 328, + /* 980 */ 459, 336, 107, 328, 352, 336, 389, 355, 389, 44, + /* 990 */ 431, 243, 244, 336, 435, 350, 134, 161, 348, 350, + /* 1000 */ 328, 126, 127, 128, 129, 130, 131, 350, 96, 450, + /* 1010 */ 451, 42, 367, 44, 455, 456, 367, 99, 264, 106, + /* 1020 */ 102, 163, 99, 372, 367, 102, 163, 372, 431, 336, + /* 1030 */ 431, 359, 435, 170, 435, 151, 174, 175, 176, 367, + /* 1040 */ 336, 179, 336, 350, 372, 35, 374, 450, 451, 450, + /* 1050 */ 451, 448, 455, 456, 455, 456, 350, 0, 389, 197, + /* 1060 */ 367, 336, 200, 58, 202, 203, 204, 205, 206, 156, + /* 1070 */ 398, 367, 328, 367, 402, 350, 35, 405, 406, 407, + /* 1080 */ 408, 409, 410, 336, 412, 99, 44, 99, 102, 417, + /* 1090 */ 102, 419, 367, 0, 338, 423, 424, 350, 336, 336, + /* 1100 */ 431, 0, 97, 359, 435, 48, 0, 245, 336, 63, + /* 1110 */ 37, 367, 350, 350, 367, 22, 372, 445, 374, 450, + /* 1120 */ 451, 47, 350, 22, 455, 456, 328, 336, 22, 367, + /* 1130 */ 367, 427, 428, 429, 44, 431, 432, 442, 96, 367, + /* 1140 */ 44, 350, 398, 132, 133, 359, 402, 44, 338, 405, + /* 1150 */ 406, 407, 408, 409, 410, 13, 412, 359, 367, 44, + /* 1160 */ 44, 417, 382, 419, 44, 367, 335, 423, 424, 95, + /* 1170 */ 372, 98, 374, 100, 101, 44, 103, 35, 434, 13, + /* 1180 */ 107, 0, 371, 336, 44, 44, 96, 328, 1, 2, + /* 1190 */ 382, 44, 96, 433, 184, 44, 398, 350, 452, 96, + /* 1200 */ 402, 35, 129, 405, 406, 407, 408, 409, 410, 425, + /* 1210 */ 412, 96, 96, 268, 367, 417, 96, 419, 359, 436, + /* 1220 */ 44, 423, 424, 44, 247, 184, 367, 96, 12, 13, + /* 1230 */ 49, 372, 434, 374, 400, 180, 96, 96, 22, 44, + /* 1240 */ 48, 399, 391, 96, 42, 379, 20, 96, 379, 33, + /* 1250 */ 328, 35, 382, 207, 160, 377, 20, 398, 379, 377, + /* 1260 */ 336, 402, 336, 377, 405, 406, 407, 408, 409, 410, + /* 1270 */ 328, 412, 96, 93, 58, 96, 417, 344, 419, 336, + /* 1280 */ 336, 359, 423, 424, 336, 20, 70, 330, 330, 367, + /* 1290 */ 20, 96, 395, 434, 372, 342, 374, 342, 20, 374, + /* 1300 */ 20, 359, 337, 20, 390, 342, 342, 337, 342, 367, + /* 1310 */ 342, 336, 52, 342, 372, 339, 374, 339, 359, 330, + /* 1320 */ 398, 359, 330, 336, 402, 196, 359, 405, 406, 407, + /* 1330 */ 408, 409, 410, 117, 412, 397, 395, 340, 359, 417, + /* 1340 */ 398, 419, 359, 359, 402, 423, 424, 405, 406, 407, + /* 1350 */ 408, 409, 410, 359, 412, 359, 434, 359, 359, 417, + /* 1360 */ 359, 419, 372, 372, 187, 423, 424, 394, 340, 374, + /* 1370 */ 19, 336, 255, 328, 372, 382, 434, 441, 254, 372, + /* 1380 */ 441, 372, 382, 261, 33, 372, 173, 440, 385, 385, + /* 1390 */ 444, 441, 443, 263, 262, 439, 248, 270, 182, 48, + /* 1400 */ 184, 267, 265, 244, 359, 54, 55, 56, 57, 58, + /* 1410 */ 438, 460, 367, 453, 400, 454, 367, 372, 20, 374, + /* 1420 */ 404, 336, 340, 207, 208, 337, 372, 165, 385, 385, + /* 1430 */ 372, 372, 328, 372, 372, 372, 220, 221, 222, 223, + /* 1440 */ 224, 225, 226, 398, 355, 94, 367, 402, 97, 383, + /* 1450 */ 405, 406, 407, 408, 409, 410, 95, 412, 340, 340, + /* 1460 */ 422, 95, 417, 359, 419, 363, 340, 372, 423, 424, + /* 1470 */ 349, 367, 336, 36, 331, 330, 372, 396, 374, 392, + /* 1480 */ 326, 130, 0, 386, 386, 341, 328, 0, 353, 189, + /* 1490 */ 0, 353, 353, 0, 42, 0, 35, 201, 35, 35, + /* 1500 */ 35, 0, 398, 201, 35, 35, 402, 201, 0, 405, + /* 1510 */ 406, 407, 408, 409, 410, 201, 412, 359, 0, 35, + /* 1520 */ 169, 417, 0, 419, 22, 367, 35, 423, 424, 0, + /* 1530 */ 372, 184, 374, 0, 182, 0, 178, 186, 0, 188, + /* 1540 */ 177, 0, 0, 47, 0, 0, 42, 328, 0, 0, + /* 1550 */ 0, 0, 0, 0, 0, 0, 398, 151, 35, 0, + /* 1560 */ 402, 151, 0, 405, 406, 407, 408, 409, 410, 0, + /* 1570 */ 412, 0, 0, 0, 0, 417, 0, 419, 359, 0, + /* 1580 */ 0, 423, 424, 0, 0, 0, 367, 0, 0, 0, + /* 1590 */ 0, 372, 0, 374, 135, 0, 0, 22, 42, 0, + /* 1600 */ 0, 0, 0, 0, 0, 328, 0, 0, 0, 0, + /* 1610 */ 42, 44, 35, 47, 0, 58, 58, 398, 0, 14, + /* 1620 */ 39, 402, 40, 0, 405, 406, 407, 408, 409, 410, + /* 1630 */ 14, 412, 0, 47, 0, 173, 359, 39, 419, 0, + /* 1640 */ 47, 0, 423, 424, 367, 0, 0, 35, 0, 372, + /* 1650 */ 39, 374, 39, 0, 35, 64, 39, 35, 48, 328, + /* 1660 */ 39, 0, 35, 48, 39, 0, 0, 0, 48, 0, + /* 1670 */ 35, 22, 48, 0, 104, 398, 22, 35, 35, 402, + /* 1680 */ 44, 44, 405, 406, 407, 408, 409, 410, 328, 412, + /* 1690 */ 359, 35, 35, 35, 35, 35, 419, 0, 367, 102, + /* 1700 */ 423, 424, 22, 372, 0, 374, 22, 0, 22, 35, + /* 1710 */ 0, 35, 50, 0, 35, 0, 22, 35, 20, 359, + /* 1720 */ 35, 194, 96, 95, 0, 35, 163, 367, 0, 398, + /* 1730 */ 22, 185, 372, 402, 374, 0, 405, 406, 407, 408, + /* 1740 */ 409, 410, 0, 412, 3, 95, 328, 44, 249, 228, + /* 1750 */ 419, 96, 47, 253, 423, 424, 44, 3, 398, 95, + /* 1760 */ 44, 47, 402, 44, 96, 405, 406, 407, 408, 409, + /* 1770 */ 410, 411, 412, 413, 414, 44, 95, 359, 35, 249, + /* 1780 */ 249, 35, 35, 96, 95, 367, 95, 35, 96, 96, + /* 1790 */ 372, 95, 374, 163, 165, 96, 163, 35, 35, 0, + /* 1800 */ 328, 44, 171, 47, 243, 96, 47, 96, 170, 0, + /* 1810 */ 170, 0, 95, 166, 96, 95, 398, 96, 95, 0, + /* 1820 */ 402, 95, 39, 405, 406, 407, 408, 409, 410, 95, + /* 1830 */ 412, 359, 105, 47, 164, 44, 2, 22, 22, 367, + /* 1840 */ 95, 47, 47, 95, 372, 96, 374, 96, 95, 35, + /* 1850 */ 106, 119, 35, 95, 328, 35, 96, 96, 207, 95, + /* 1860 */ 95, 209, 96, 95, 35, 96, 95, 35, 35, 96, + /* 1870 */ 398, 95, 228, 96, 402, 457, 458, 405, 406, 407, + /* 1880 */ 408, 409, 410, 95, 412, 359, 96, 95, 22, 119, + /* 1890 */ 44, 419, 107, 367, 119, 95, 424, 119, 372, 95, + /* 1900 */ 374, 230, 35, 228, 22, 95, 328, 64, 63, 35, + /* 1910 */ 35, 35, 35, 35, 35, 35, 35, 70, 35, 35, + /* 1920 */ 92, 35, 328, 35, 398, 35, 22, 70, 402, 44, + /* 1930 */ 35, 405, 406, 407, 408, 409, 410, 359, 412, 22, + /* 1940 */ 35, 35, 35, 35, 35, 367, 35, 35, 35, 0, + /* 1950 */ 372, 35, 374, 359, 39, 0, 35, 39, 48, 0, + /* 1960 */ 35, 367, 48, 39, 0, 35, 372, 48, 374, 0, + /* 1970 */ 48, 39, 35, 447, 35, 0, 398, 20, 22, 21, + /* 1980 */ 402, 461, 22, 405, 406, 407, 408, 409, 410, 21, + /* 1990 */ 412, 461, 398, 22, 461, 461, 402, 461, 461, 405, + /* 2000 */ 406, 407, 408, 409, 410, 461, 412, 461, 461, 461, + /* 2010 */ 461, 328, 461, 461, 461, 461, 461, 461, 461, 461, + /* 2020 */ 461, 461, 461, 461, 461, 461, 461, 449, 461, 328, + /* 2030 */ 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, + /* 2040 */ 461, 461, 359, 461, 461, 461, 461, 364, 461, 461, + /* 2050 */ 367, 461, 458, 461, 461, 372, 461, 374, 461, 461, + /* 2060 */ 359, 461, 461, 461, 461, 461, 461, 461, 367, 461, + /* 2070 */ 461, 461, 461, 372, 461, 374, 461, 461, 461, 461, + /* 2080 */ 461, 398, 461, 328, 461, 402, 461, 461, 405, 406, + /* 2090 */ 407, 408, 409, 410, 461, 412, 461, 461, 461, 398, + /* 2100 */ 328, 461, 461, 402, 461, 461, 405, 406, 407, 408, + /* 2110 */ 409, 410, 461, 412, 359, 414, 461, 461, 461, 364, + /* 2120 */ 461, 461, 367, 461, 461, 461, 461, 372, 461, 374, + /* 2130 */ 461, 359, 461, 461, 461, 461, 364, 461, 461, 367, + /* 2140 */ 461, 461, 461, 461, 372, 461, 374, 461, 461, 461, + /* 2150 */ 461, 461, 328, 398, 461, 461, 461, 402, 461, 461, + /* 2160 */ 405, 406, 407, 408, 409, 410, 461, 412, 328, 461, + /* 2170 */ 398, 461, 461, 461, 402, 461, 461, 405, 406, 407, + /* 2180 */ 408, 409, 410, 359, 412, 461, 461, 461, 461, 461, + /* 2190 */ 461, 367, 461, 461, 461, 461, 372, 461, 374, 359, + /* 2200 */ 461, 461, 461, 461, 461, 461, 461, 367, 461, 461, + /* 2210 */ 461, 461, 372, 461, 374, 461, 461, 461, 461, 461, + /* 2220 */ 328, 461, 398, 461, 461, 461, 402, 461, 461, 405, + /* 2230 */ 406, 407, 408, 409, 410, 461, 412, 461, 398, 461, + /* 2240 */ 461, 461, 402, 461, 461, 405, 406, 407, 408, 409, + /* 2250 */ 410, 359, 412, 461, 461, 461, 461, 461, 461, 367, + /* 2260 */ 461, 461, 461, 461, 372, 461, 374, 461, 461, 461, + /* 2270 */ 461, 461, 461, 461, 328, 461, 461, 461, 461, 461, + /* 2280 */ 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, + /* 2290 */ 398, 461, 461, 461, 402, 328, 461, 405, 406, 407, + /* 2300 */ 408, 409, 410, 461, 412, 359, 461, 461, 461, 461, + /* 2310 */ 461, 461, 461, 367, 461, 461, 461, 461, 372, 461, + /* 2320 */ 374, 461, 461, 461, 461, 461, 359, 461, 461, 461, + /* 2330 */ 461, 461, 461, 461, 367, 461, 461, 461, 461, 372, + /* 2340 */ 461, 374, 461, 461, 398, 461, 461, 461, 402, 461, + /* 2350 */ 461, 405, 406, 407, 408, 409, 410, 461, 412, 461, + /* 2360 */ 461, 461, 461, 461, 461, 398, 461, 461, 461, 402, + /* 2370 */ 461, 328, 405, 406, 407, 408, 409, 410, 461, 412, + /* 2380 */ 461, 461, 461, 461, 461, 461, 461, 461, 461, 328, + /* 2390 */ 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, + /* 2400 */ 461, 461, 359, 461, 461, 461, 461, 461, 461, 461, + /* 2410 */ 367, 461, 461, 461, 461, 372, 461, 374, 461, 461, + /* 2420 */ 359, 461, 461, 461, 461, 461, 461, 461, 367, 461, + /* 2430 */ 461, 461, 461, 372, 461, 374, 461, 461, 461, 461, + /* 2440 */ 461, 398, 461, 328, 461, 402, 461, 461, 405, 406, + /* 2450 */ 407, 408, 409, 410, 461, 412, 461, 461, 461, 398, + /* 2460 */ 328, 461, 461, 402, 461, 461, 405, 406, 407, 408, + /* 2470 */ 409, 410, 461, 412, 359, 461, 461, 461, 461, 461, + /* 2480 */ 461, 461, 367, 461, 461, 461, 461, 372, 461, 374, + /* 2490 */ 461, 359, 461, 461, 461, 461, 461, 461, 461, 367, + /* 2500 */ 461, 461, 461, 461, 372, 461, 374, 461, 461, 461, + /* 2510 */ 461, 461, 328, 398, 461, 461, 461, 402, 461, 461, + /* 2520 */ 405, 406, 407, 408, 409, 410, 461, 412, 328, 461, + /* 2530 */ 398, 461, 461, 461, 402, 461, 461, 405, 406, 407, + /* 2540 */ 408, 409, 410, 359, 412, 461, 461, 461, 461, 461, + /* 2550 */ 461, 367, 461, 461, 461, 461, 372, 461, 374, 359, + /* 2560 */ 461, 461, 461, 461, 461, 461, 461, 367, 461, 461, + /* 2570 */ 461, 461, 372, 461, 374, 461, 461, 461, 461, 461, + /* 2580 */ 328, 461, 398, 461, 461, 461, 402, 461, 461, 405, + /* 2590 */ 406, 407, 408, 409, 410, 461, 412, 461, 398, 461, + /* 2600 */ 461, 461, 402, 328, 461, 405, 406, 407, 408, 409, + /* 2610 */ 410, 359, 412, 461, 461, 461, 461, 461, 461, 367, + /* 2620 */ 461, 461, 461, 461, 372, 461, 374, 461, 461, 461, + /* 2630 */ 461, 461, 461, 461, 359, 461, 461, 461, 461, 461, + /* 2640 */ 461, 461, 367, 461, 461, 461, 461, 372, 461, 374, + /* 2650 */ 398, 461, 461, 461, 402, 328, 461, 405, 406, 407, + /* 2660 */ 408, 409, 410, 461, 412, 461, 461, 461, 461, 461, + /* 2670 */ 461, 461, 461, 398, 461, 461, 461, 402, 461, 461, + /* 2680 */ 405, 406, 407, 408, 409, 410, 359, 412, 461, 461, + /* 2690 */ 461, 461, 461, 461, 367, 461, 461, 461, 461, 372, + /* 2700 */ 461, 374, 461, 461, 461, 461, 461, 461, 461, 461, + /* 2710 */ 461, 461, 461, 461, 461, 461, 461, 461, 328, 461, + /* 2720 */ 461, 461, 461, 461, 461, 398, 461, 461, 461, 402, + /* 2730 */ 461, 461, 405, 406, 407, 408, 409, 410, 461, 412, + /* 2740 */ 461, 461, 461, 461, 461, 461, 461, 461, 461, 359, + /* 2750 */ 461, 461, 461, 461, 461, 461, 461, 367, 461, 461, + /* 2760 */ 461, 461, 372, 461, 374, 461, 461, 461, 461, 461, + /* 2770 */ 328, 461, 461, 461, 461, 461, 461, 461, 461, 461, + /* 2780 */ 461, 461, 461, 461, 461, 461, 461, 461, 398, 328, + /* 2790 */ 461, 461, 402, 461, 461, 405, 406, 407, 408, 409, + /* 2800 */ 410, 359, 412, 461, 461, 461, 461, 461, 461, 367, + /* 2810 */ 461, 461, 461, 461, 372, 461, 374, 461, 461, 461, + /* 2820 */ 359, 461, 461, 461, 461, 461, 461, 461, 367, 461, + /* 2830 */ 461, 461, 461, 372, 461, 374, 461, 461, 461, 461, + /* 2840 */ 398, 328, 461, 461, 402, 461, 461, 405, 406, 407, + /* 2850 */ 408, 409, 410, 461, 412, 461, 461, 328, 461, 398, + /* 2860 */ 461, 461, 461, 402, 461, 461, 405, 406, 407, 408, + /* 2870 */ 409, 410, 359, 412, 461, 461, 461, 461, 461, 461, + /* 2880 */ 367, 461, 461, 461, 461, 372, 461, 374, 359, 461, + /* 2890 */ 461, 461, 461, 461, 461, 461, 367, 461, 461, 461, + /* 2900 */ 461, 372, 461, 374, 461, 461, 461, 461, 461, 328, + /* 2910 */ 461, 398, 461, 461, 461, 402, 461, 461, 405, 406, + /* 2920 */ 407, 408, 409, 410, 461, 412, 461, 398, 461, 461, + /* 2930 */ 461, 402, 328, 461, 405, 406, 407, 408, 409, 410, + /* 2940 */ 359, 412, 461, 461, 461, 461, 461, 461, 367, 461, + /* 2950 */ 461, 461, 461, 372, 461, 374, 461, 461, 461, 461, + /* 2960 */ 461, 461, 461, 359, 461, 461, 461, 461, 461, 461, + /* 2970 */ 461, 367, 461, 461, 461, 461, 372, 461, 374, 398, + /* 2980 */ 461, 461, 461, 402, 328, 461, 405, 406, 407, 408, + /* 2990 */ 409, 410, 461, 412, 461, 461, 461, 461, 461, 461, + /* 3000 */ 461, 461, 398, 461, 461, 461, 402, 461, 461, 405, + /* 3010 */ 406, 407, 408, 409, 410, 359, 412, 461, 461, 461, + /* 3020 */ 461, 461, 461, 367, 461, 461, 461, 461, 372, 461, + /* 3030 */ 374, 461, 461, 461, 461, 461, 461, 461, 461, 461, + /* 3040 */ 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, + /* 3050 */ 461, 461, 461, 461, 398, 461, 461, 461, 402, 461, + /* 3060 */ 461, 405, 406, 407, 408, 409, 410, 461, 412, 325, + /* 3070 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3080 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3090 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3100 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3110 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3120 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3130 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3140 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3150 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3160 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3170 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3180 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3190 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3200 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3210 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3220 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3230 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3240 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3250 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3260 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3270 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3280 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3290 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3300 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3310 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3320 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3330 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3340 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3350 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3360 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3370 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3380 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3390 */ 325, 325, 325, 325, }; #define YY_SHIFT_COUNT (713) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1952) +#define YY_SHIFT_MAX (1975) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 860, 0, 71, 0, 288, 288, 288, 288, 288, 288, - /* 10 */ 288, 288, 288, 288, 288, 359, 574, 574, 645, 574, - /* 20 */ 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, - /* 30 */ 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, - /* 40 */ 574, 574, 574, 574, 574, 574, 574, 574, 132, 182, - /* 50 */ 92, 380, 222, 274, 298, 274, 92, 92, 1347, 1347, - /* 60 */ 274, 1347, 1347, 140, 274, 96, 31, 31, 96, 307, - /* 70 */ 307, 327, 57, 5, 5, 31, 31, 31, 31, 31, - /* 80 */ 31, 31, 31, 31, 31, 80, 31, 31, 294, 31, - /* 90 */ 31, 31, 499, 31, 31, 499, 31, 499, 499, 499, - /* 100 */ 31, 420, 790, 34, 34, 219, 450, 568, 568, 568, - /* 110 */ 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - /* 120 */ 568, 568, 568, 568, 568, 568, 215, 180, 327, 57, - /* 130 */ 172, 495, 384, 384, 384, 617, 184, 184, 495, 520, - /* 140 */ 520, 520, 136, 127, 499, 838, 499, 838, 838, 136, - /* 150 */ 853, 216, 216, 216, 216, 216, 216, 216, 579, 407, - /* 160 */ 335, 432, 449, 47, 957, 552, 457, 577, 79, 744, - /* 170 */ 858, 871, 751, 573, 740, 99, 573, 938, 886, 824, - /* 180 */ 976, 1175, 1046, 1190, 1214, 1190, 1076, 1219, 1219, 1190, - /* 190 */ 1076, 1076, 1157, 1219, 1219, 1219, 1237, 1237, 1249, 80, - /* 200 */ 1253, 80, 1259, 1261, 80, 1259, 80, 80, 80, 1219, - /* 210 */ 80, 1236, 1236, 1237, 499, 499, 499, 499, 499, 499, - /* 220 */ 499, 499, 499, 499, 499, 1219, 1237, 838, 838, 1109, - /* 230 */ 1249, 420, 1125, 1253, 420, 1219, 1214, 1214, 838, 1079, - /* 240 */ 1087, 838, 1079, 1087, 838, 838, 499, 1108, 1198, 1079, - /* 250 */ 1110, 1114, 1129, 976, 1115, 1111, 1119, 1136, 520, 1368, - /* 260 */ 1219, 1259, 420, 1087, 838, 838, 838, 838, 838, 1087, - /* 270 */ 838, 1239, 420, 136, 420, 520, 1317, 1319, 838, 853, - /* 280 */ 1219, 420, 1385, 1237, 3067, 3067, 3067, 3067, 3067, 3067, - /* 290 */ 3067, 3067, 3067, 885, 309, 94, 995, 15, 59, 718, - /* 300 */ 425, 879, 897, 73, 704, 471, 471, 471, 471, 471, - /* 310 */ 471, 471, 471, 471, 889, 185, 698, 698, 32, 546, - /* 320 */ 608, 501, 633, 296, 296, 244, 753, 506, 244, 244, - /* 330 */ 244, 567, 981, 893, 959, 955, 593, 947, 970, 1014, - /* 340 */ 1016, 1121, 1132, 1133, 926, 1031, 1081, 923, 806, 943, - /* 350 */ 436, 1082, 1084, 1086, 1091, 1112, 1169, 1118, 455, 967, - /* 360 */ 791, 1123, 1126, 1128, 1135, 1139, 1142, 1144, 1146, 1034, - /* 370 */ 1156, 1162, 1024, 1051, 1436, 1439, 1260, 1450, 1451, 1410, - /* 380 */ 1456, 1422, 1257, 1426, 1428, 1430, 1265, 1468, 1437, 1438, - /* 390 */ 1270, 1474, 1274, 1476, 1442, 1478, 1457, 1480, 1446, 1298, - /* 400 */ 1301, 1484, 1485, 1308, 1310, 1488, 1489, 1443, 1491, 1492, - /* 410 */ 1494, 1453, 1496, 1498, 1499, 1506, 1508, 1509, 1510, 1511, - /* 420 */ 1364, 1481, 1517, 1369, 1521, 1522, 1523, 1524, 1525, 1526, - /* 430 */ 1527, 1528, 1530, 1532, 1533, 1534, 1535, 1536, 1537, 1497, - /* 440 */ 1538, 1540, 1541, 1542, 1543, 1529, 1545, 1546, 1547, 1413, - /* 450 */ 1549, 1550, 1518, 1556, 1500, 1560, 1503, 1562, 1563, 1531, - /* 460 */ 1539, 1520, 1552, 1551, 1553, 1565, 1554, 1574, 1544, 1557, - /* 470 */ 1576, 1577, 1580, 1564, 1408, 1582, 1585, 1586, 1548, 1588, - /* 480 */ 1589, 1570, 1559, 1571, 1611, 1578, 1568, 1579, 1615, 1587, - /* 490 */ 1569, 1581, 1623, 1590, 1583, 1591, 1624, 1626, 1627, 1628, - /* 500 */ 1558, 1561, 1597, 1612, 1633, 1600, 1601, 1603, 1604, 1596, - /* 510 */ 1599, 1606, 1613, 1625, 1616, 1646, 1636, 1650, 1639, 1610, - /* 520 */ 1667, 1647, 1648, 1673, 1649, 1674, 1651, 1681, 1663, 1670, - /* 530 */ 1652, 1657, 1501, 1595, 1602, 1698, 1555, 1664, 1700, 1516, - /* 540 */ 1680, 1566, 1572, 1703, 1705, 1573, 1592, 1704, 1662, 1460, - /* 550 */ 1617, 1614, 1618, 1594, 1487, 1605, 1463, 1620, 1676, 1621, - /* 560 */ 1629, 1630, 1631, 1632, 1677, 1675, 1683, 1643, 1679, 1483, - /* 570 */ 1637, 1644, 1738, 1706, 1504, 1713, 1718, 1719, 1720, 1722, - /* 580 */ 1724, 1678, 1682, 1726, 1619, 1732, 1730, 1780, 1781, 1785, - /* 590 */ 1691, 1692, 1693, 1696, 1697, 1634, 1699, 1787, 1754, 1635, - /* 600 */ 1701, 1702, 1552, 1751, 1757, 1593, 1575, 1607, 1801, 1784, - /* 610 */ 1598, 1714, 1712, 1716, 1717, 1721, 1723, 1765, 1727, 1729, - /* 620 */ 1767, 1731, 1796, 1645, 1741, 1733, 1742, 1788, 1791, 1747, - /* 630 */ 1748, 1802, 1752, 1750, 1808, 1761, 1762, 1822, 1764, 1766, - /* 640 */ 1825, 1768, 1745, 1746, 1749, 1753, 1844, 1760, 1778, 1830, - /* 650 */ 1782, 1840, 1786, 1830, 1830, 1854, 1814, 1817, 1847, 1848, - /* 660 */ 1850, 1852, 1853, 1855, 1856, 1857, 1858, 1860, 1819, 1804, - /* 670 */ 1859, 1862, 1863, 1864, 1880, 1869, 1871, 1872, 1835, 1596, - /* 680 */ 1873, 1599, 1874, 1877, 1878, 1881, 1893, 1888, 1926, 1892, - /* 690 */ 1882, 1889, 1929, 1897, 1886, 1896, 1937, 1904, 1898, 1902, - /* 700 */ 1943, 1909, 1899, 1906, 1948, 1914, 1916, 1952, 1931, 1933, - /* 710 */ 1934, 1936, 1938, 1940, + /* 0 */ 862, 0, 71, 0, 289, 289, 289, 289, 289, 289, + /* 10 */ 289, 289, 289, 289, 289, 360, 576, 576, 647, 576, + /* 20 */ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + /* 30 */ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + /* 40 */ 576, 576, 576, 576, 576, 576, 576, 576, 32, 134, + /* 50 */ 21, 590, 133, 7, 104, 7, 21, 21, 1216, 1216, + /* 60 */ 7, 1216, 1216, 136, 7, 423, 25, 25, 423, 401, + /* 70 */ 401, 215, 57, 5, 5, 25, 25, 25, 25, 25, + /* 80 */ 25, 25, 25, 25, 25, 80, 25, 25, 156, 25, + /* 90 */ 25, 25, 343, 25, 25, 343, 25, 343, 343, 343, + /* 100 */ 25, 328, 792, 34, 34, 216, 474, 283, 283, 283, + /* 110 */ 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + /* 120 */ 283, 283, 283, 283, 283, 283, 1073, 87, 215, 57, + /* 130 */ 593, 313, 499, 499, 499, 710, 229, 229, 313, 374, + /* 140 */ 374, 374, 143, 384, 343, 378, 343, 378, 378, 143, + /* 150 */ 566, 217, 217, 217, 217, 217, 217, 217, 1351, 408, + /* 160 */ 336, 612, 249, 430, 340, 464, 292, 714, 377, 518, + /* 170 */ 873, 656, 858, 748, 12, 754, 748, 769, 353, 836, + /* 180 */ 977, 1192, 1055, 1202, 1226, 1202, 1094, 1236, 1236, 1202, + /* 190 */ 1094, 1094, 1180, 1236, 1236, 1236, 1265, 1265, 1270, 80, + /* 200 */ 1278, 80, 1280, 1283, 80, 1280, 80, 80, 80, 1236, + /* 210 */ 80, 1260, 1260, 1265, 343, 343, 343, 343, 343, 343, + /* 220 */ 343, 343, 343, 343, 343, 1236, 1265, 378, 378, 1129, + /* 230 */ 1270, 328, 1177, 1278, 328, 1236, 1226, 1226, 378, 1117, + /* 240 */ 1124, 378, 1117, 1124, 378, 378, 343, 1122, 1213, 1117, + /* 250 */ 1130, 1132, 1148, 977, 1127, 1134, 1137, 1159, 374, 1398, + /* 260 */ 1236, 1280, 328, 1124, 378, 378, 378, 378, 378, 1124, + /* 270 */ 378, 1262, 328, 143, 328, 374, 1361, 1366, 378, 566, + /* 280 */ 1236, 328, 1437, 1265, 3069, 3069, 3069, 3069, 3069, 3069, + /* 290 */ 3069, 3069, 3069, 887, 310, 94, 625, 15, 59, 738, + /* 300 */ 720, 753, 881, 73, 781, 472, 472, 472, 472, 472, + /* 310 */ 472, 472, 472, 472, 875, 124, 373, 373, 122, 4, + /* 320 */ 58, 166, 484, 300, 300, 790, 912, 588, 790, 790, + /* 330 */ 790, 113, 1057, 288, 969, 913, 884, 918, 923, 986, + /* 340 */ 988, 1093, 1101, 1106, 1005, 1042, 1090, 1011, 425, 945, + /* 350 */ 863, 1096, 1103, 1115, 1116, 1120, 1187, 1131, 1010, 1041, + /* 360 */ 1046, 1140, 1074, 1141, 1147, 1151, 1176, 1179, 1195, 825, + /* 370 */ 1142, 1166, 489, 1181, 1482, 1487, 1300, 1490, 1493, 1452, + /* 380 */ 1495, 1461, 1296, 1463, 1464, 1465, 1302, 1501, 1469, 1470, + /* 390 */ 1306, 1508, 1314, 1518, 1484, 1522, 1502, 1529, 1491, 1347, + /* 400 */ 1352, 1533, 1535, 1358, 1363, 1538, 1541, 1496, 1542, 1544, + /* 410 */ 1545, 1504, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, + /* 420 */ 1406, 1523, 1559, 1410, 1562, 1569, 1571, 1572, 1573, 1574, + /* 430 */ 1576, 1579, 1580, 1583, 1584, 1585, 1587, 1588, 1589, 1556, + /* 440 */ 1590, 1592, 1599, 1600, 1601, 1575, 1602, 1603, 1604, 1459, + /* 450 */ 1595, 1596, 1577, 1606, 1557, 1607, 1558, 1608, 1609, 1568, + /* 460 */ 1581, 1567, 1566, 1605, 1586, 1616, 1593, 1614, 1582, 1598, + /* 470 */ 1618, 1623, 1632, 1611, 1462, 1634, 1639, 1641, 1591, 1645, + /* 480 */ 1646, 1612, 1610, 1613, 1648, 1619, 1615, 1617, 1653, 1622, + /* 490 */ 1620, 1621, 1661, 1627, 1624, 1625, 1665, 1666, 1667, 1669, + /* 500 */ 1570, 1597, 1635, 1649, 1673, 1642, 1643, 1656, 1657, 1636, + /* 510 */ 1637, 1658, 1659, 1654, 1660, 1697, 1680, 1704, 1684, 1662, + /* 520 */ 1707, 1686, 1674, 1710, 1676, 1713, 1679, 1715, 1694, 1698, + /* 530 */ 1682, 1685, 1527, 1626, 1628, 1724, 1563, 1690, 1728, 1546, + /* 540 */ 1708, 1630, 1629, 1735, 1742, 1633, 1631, 1741, 1703, 1499, + /* 550 */ 1650, 1655, 1664, 1638, 1521, 1640, 1500, 1668, 1712, 1687, + /* 560 */ 1681, 1689, 1691, 1692, 1716, 1705, 1714, 1696, 1719, 1530, + /* 570 */ 1693, 1699, 1754, 1731, 1531, 1743, 1746, 1747, 1752, 1762, + /* 580 */ 1763, 1709, 1711, 1756, 1561, 1757, 1759, 1799, 1809, 1811, + /* 590 */ 1717, 1718, 1721, 1720, 1723, 1647, 1726, 1819, 1783, 1670, + /* 600 */ 1734, 1727, 1566, 1786, 1791, 1644, 1671, 1675, 1834, 1815, + /* 610 */ 1651, 1745, 1749, 1748, 1751, 1753, 1760, 1794, 1758, 1764, + /* 620 */ 1795, 1761, 1816, 1652, 1765, 1744, 1766, 1814, 1817, 1768, + /* 630 */ 1769, 1820, 1771, 1773, 1829, 1776, 1777, 1832, 1788, 1790, + /* 640 */ 1833, 1792, 1732, 1770, 1775, 1778, 1866, 1785, 1800, 1846, + /* 650 */ 1804, 1867, 1810, 1846, 1846, 1882, 1843, 1845, 1874, 1875, + /* 660 */ 1876, 1877, 1878, 1879, 1880, 1881, 1883, 1884, 1847, 1828, + /* 670 */ 1885, 1886, 1888, 1890, 1904, 1895, 1905, 1906, 1857, 1636, + /* 680 */ 1907, 1637, 1908, 1909, 1911, 1912, 1917, 1913, 1949, 1916, + /* 690 */ 1910, 1915, 1955, 1921, 1914, 1918, 1959, 1925, 1919, 1924, + /* 700 */ 1964, 1930, 1922, 1932, 1969, 1937, 1939, 1975, 1956, 1958, + /* 710 */ 1960, 1971, 1968, 1957, }; #define YY_REDUCE_COUNT (292) -#define YY_REDUCE_MIN (-390) -#define YY_REDUCE_MAX (2655) +#define YY_REDUCE_MIN (-420) +#define YY_REDUCE_MAX (2656) static const short yy_reduce_ofst[] = { - /* 0 */ -193, -258, 679, 741, 795, 854, 920, 940, 1037, 1096, - /* 10 */ 1186, 1248, 1271, 1338, 1361, 289, 1424, 1444, 1513, 1567, - /* 20 */ 1584, 1638, 1656, 1710, 1728, 1783, 1803, 1870, 1895, 1922, - /* 30 */ 1982, 2005, 2065, 2092, 2117, 2175, 2192, 2244, 2267, 2296, - /* 40 */ 2354, 2372, 2437, 2459, 2520, 2542, 2603, 2655, -257, 95, - /* 50 */ 223, -39, 171, 234, 392, 624, 293, 342, -345, -15, - /* 60 */ -390, -12, 270, -275, -249, 227, -221, 326, -370, -329, - /* 70 */ -325, -326, -362, -298, -256, -239, 253, 280, 408, 470, - /* 80 */ 551, 655, 656, 658, 660, -201, 676, 678, 24, 732, - /* 90 */ 742, 768, -260, 770, 771, -313, 774, 10, -4, 101, - /* 100 */ 775, 207, -334, -283, -283, -19, -151, -309, 167, 221, - /* 110 */ 237, 345, 378, 395, 412, 433, 518, 545, 547, 553, - /* 120 */ 575, 659, 661, 662, 670, 711, -265, 64, -60, -216, - /* 130 */ -165, 53, 64, 128, 133, 313, 336, 346, 98, 265, - /* 140 */ 279, 462, -315, 311, 451, 480, 463, 505, 511, 571, - /* 150 */ 529, -359, -338, 370, 651, 672, 681, 688, 535, 816, - /* 160 */ 723, 777, 702, 727, 828, 735, 826, 826, 852, 812, - /* 170 */ 861, 835, 813, 766, 766, 756, 766, 785, 780, 826, - /* 180 */ 817, 831, 840, 855, 856, 863, 867, 909, 910, 868, - /* 190 */ 872, 873, 911, 917, 918, 921, 935, 937, 874, 930, - /* 200 */ 901, 934, 944, 894, 941, 948, 949, 951, 953, 950, - /* 210 */ 954, 958, 961, 960, 939, 942, 945, 946, 952, 956, - /* 220 */ 962, 964, 965, 972, 974, 966, 973, 936, 963, 912, - /* 230 */ 915, 977, 922, 979, 980, 983, 969, 984, 968, 895, - /* 240 */ 971, 986, 914, 982, 990, 996, 826, 927, 932, 975, - /* 250 */ 985, 978, 988, 987, 919, 928, 933, 766, 1021, 989, - /* 260 */ 1054, 1055, 1057, 1006, 1022, 1023, 1026, 1027, 1028, 1017, - /* 270 */ 1029, 1020, 1067, 1053, 1070, 1045, 992, 1056, 1048, 1072, - /* 280 */ 1092, 1083, 1098, 1097, 1038, 1035, 1047, 1050, 1085, 1088, - /* 290 */ 1095, 1093, 1106, + /* 0 */ 276, -259, 233, 672, 744, 798, 859, 922, 942, 1045, + /* 10 */ 1104, 1158, 1219, 1277, 1331, 1360, 294, 1418, 1472, 1526, + /* 20 */ 1578, 1594, 1683, 1701, 1755, 1772, 1824, 1840, 1892, 1946, + /* 30 */ 1967, 2043, 2061, 2115, 2132, 2184, 2200, 2252, 2275, 2327, + /* 40 */ 2390, 2442, 2461, 2513, 2529, 2581, 2604, 2656, -258, 95, + /* 50 */ 105, -39, 559, 597, 599, 669, 187, 704, -346, -57, + /* 60 */ -391, 323, 480, -276, -250, 75, -222, 297, -371, -330, + /* 70 */ -326, -327, -363, -299, -257, 116, 128, 193, 199, 327, + /* 80 */ 409, 471, 645, 649, 657, 252, 693, 706, -51, 725, + /* 90 */ 747, 762, 244, 763, 772, -203, 791, 465, -5, 362, + /* 100 */ 847, -210, -315, -420, -420, -217, -212, -69, -21, 41, + /* 110 */ 43, 70, 96, 117, 148, 197, 225, 234, 346, 351, + /* 120 */ 405, 446, 454, 504, 651, 655, -266, -170, 397, 191, + /* 130 */ 152, 352, -170, -150, 219, 477, 186, 254, 491, 524, + /* 140 */ 537, 538, -316, -319, 485, 367, 542, 555, 557, 632, + /* 150 */ 530, -342, 369, 389, 410, 463, 468, 483, 319, 577, + /* 160 */ 650, 543, 521, 603, 756, 695, 786, 786, 810, 780, + /* 170 */ 831, 811, 808, 760, 760, 746, 760, 784, 783, 786, + /* 180 */ 834, 842, 851, 866, 870, 869, 878, 924, 926, 879, + /* 190 */ 882, 886, 933, 943, 944, 948, 957, 958, 897, 953, + /* 200 */ 925, 955, 965, 914, 963, 970, 964, 966, 968, 975, + /* 210 */ 971, 976, 978, 989, 959, 962, 967, 979, 983, 984, + /* 220 */ 994, 996, 998, 999, 1001, 987, 992, 990, 991, 938, + /* 230 */ 941, 997, 973, 995, 1028, 1035, 993, 1000, 1002, 936, + /* 240 */ 1003, 1007, 939, 1004, 1009, 1013, 786, 946, 949, 950, + /* 250 */ 947, 956, 972, 1014, 951, 961, 960, 760, 1049, 1016, + /* 260 */ 1085, 1088, 1082, 1043, 1054, 1058, 1059, 1061, 1062, 1044, + /* 270 */ 1063, 1066, 1118, 1089, 1119, 1079, 1038, 1102, 1095, 1121, + /* 280 */ 1136, 1126, 1143, 1145, 1087, 1081, 1097, 1098, 1135, 1138, + /* 290 */ 1139, 1144, 1154, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 10 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 20 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 30 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 40 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 50 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 60 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 70 */ 1604, 1859, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 80 */ 1604, 1604, 1604, 1604, 1604, 1682, 1604, 1604, 1604, 1604, - /* 90 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 100 */ 1604, 1680, 1852, 2054, 1604, 1604, 1604, 1604, 1604, 1604, - /* 110 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 120 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 2066, 1604, 1604, - /* 130 */ 1682, 1604, 2066, 2066, 2066, 1680, 2026, 2026, 1604, 1604, - /* 140 */ 1604, 1604, 1789, 1604, 1604, 1604, 1604, 1604, 1604, 1789, - /* 150 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1901, 1604, - /* 160 */ 1604, 2091, 2145, 1604, 1604, 2094, 1604, 1604, 1604, 1864, - /* 170 */ 1604, 1742, 2081, 2058, 2072, 2129, 2059, 2056, 2075, 1604, - /* 180 */ 2085, 1604, 1894, 1857, 1604, 1857, 1854, 1604, 1604, 1857, - /* 190 */ 1854, 1854, 1733, 1604, 1604, 1604, 1604, 1604, 1604, 1682, - /* 200 */ 1604, 1682, 1604, 1604, 1682, 1604, 1682, 1682, 1682, 1604, - /* 210 */ 1682, 1661, 1661, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 220 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1914, - /* 230 */ 1604, 1680, 1903, 1604, 1680, 1604, 1604, 1604, 1604, 2102, - /* 240 */ 2100, 1604, 2102, 2100, 1604, 1604, 1604, 2114, 2110, 2102, - /* 250 */ 2118, 2116, 2087, 2085, 2148, 2135, 2131, 2072, 1604, 1604, - /* 260 */ 1604, 1604, 1680, 2100, 1604, 1604, 1604, 1604, 1604, 2100, - /* 270 */ 1604, 1604, 1680, 1604, 1680, 1604, 1604, 1758, 1604, 1604, - /* 280 */ 1604, 1680, 1636, 1604, 1896, 1907, 1879, 1879, 1792, 1792, - /* 290 */ 1792, 1683, 1609, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 300 */ 1604, 1604, 1604, 1604, 1604, 2113, 2112, 1982, 1604, 2030, - /* 310 */ 2029, 2028, 2019, 1981, 1754, 1604, 1980, 1979, 1604, 1604, - /* 320 */ 1604, 1604, 1604, 1870, 1869, 1973, 1604, 1604, 1974, 1972, - /* 330 */ 1971, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 340 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 2132, 2136, - /* 350 */ 1604, 1604, 1604, 1604, 1604, 1604, 2055, 1604, 1604, 1604, - /* 360 */ 1604, 1604, 1956, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 370 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 380 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 390 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 400 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 410 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 420 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 430 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 440 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 450 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 460 */ 1604, 1641, 1961, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 470 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 480 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 490 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 500 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1721, - /* 510 */ 1720, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 520 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 530 */ 1604, 1604, 1604, 1964, 1604, 1604, 1604, 1604, 1604, 1604, - /* 540 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 2128, 2088, 1604, - /* 550 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 560 */ 1604, 1604, 1604, 1604, 1604, 1604, 1956, 1604, 2111, 1604, - /* 570 */ 1604, 2126, 1604, 2130, 1604, 1604, 1604, 1604, 1604, 1604, - /* 580 */ 1604, 2065, 2061, 1604, 1604, 2057, 1604, 1604, 1604, 1604, - /* 590 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 600 */ 1604, 1604, 1955, 1604, 2016, 1604, 1604, 1604, 2050, 1604, - /* 610 */ 1604, 2001, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 620 */ 1604, 1964, 1604, 1967, 1604, 1604, 1604, 1604, 1604, 1786, - /* 630 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 640 */ 1604, 1604, 1771, 1769, 1768, 1767, 1604, 1764, 1604, 1799, - /* 650 */ 1604, 1604, 1604, 1795, 1794, 1604, 1604, 1604, 1604, 1604, - /* 660 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 670 */ 1701, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1693, - /* 680 */ 1604, 1692, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 690 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 700 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, - /* 710 */ 1604, 1604, 1604, 1604, + /* 0 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 10 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 20 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 30 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 40 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 50 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 60 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 70 */ 1606, 1861, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 80 */ 1606, 1606, 1606, 1606, 1606, 1684, 1606, 1606, 1606, 1606, + /* 90 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 100 */ 1606, 1682, 1854, 2057, 1606, 1606, 1606, 1606, 1606, 1606, + /* 110 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 120 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 2069, 1606, 1606, + /* 130 */ 1684, 1606, 2069, 2069, 2069, 1682, 2029, 2029, 1606, 1606, + /* 140 */ 1606, 1606, 1791, 1606, 1606, 1606, 1606, 1606, 1606, 1791, + /* 150 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1903, 1606, + /* 160 */ 1606, 2094, 2148, 1606, 1606, 2097, 1606, 1606, 1606, 1866, + /* 170 */ 1606, 1744, 2084, 2061, 2075, 2132, 2062, 2059, 2078, 1606, + /* 180 */ 2088, 1606, 1896, 1859, 1606, 1859, 1856, 1606, 1606, 1859, + /* 190 */ 1856, 1856, 1735, 1606, 1606, 1606, 1606, 1606, 1606, 1684, + /* 200 */ 1606, 1684, 1606, 1606, 1684, 1606, 1684, 1684, 1684, 1606, + /* 210 */ 1684, 1663, 1663, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 220 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1916, + /* 230 */ 1606, 1682, 1905, 1606, 1682, 1606, 1606, 1606, 1606, 2105, + /* 240 */ 2103, 1606, 2105, 2103, 1606, 1606, 1606, 2117, 2113, 2105, + /* 250 */ 2121, 2119, 2090, 2088, 2151, 2138, 2134, 2075, 1606, 1606, + /* 260 */ 1606, 1606, 1682, 2103, 1606, 1606, 1606, 1606, 1606, 2103, + /* 270 */ 1606, 1606, 1682, 1606, 1682, 1606, 1606, 1760, 1606, 1606, + /* 280 */ 1606, 1682, 1638, 1606, 1898, 1909, 1881, 1881, 1794, 1794, + /* 290 */ 1794, 1685, 1611, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 300 */ 1606, 1606, 1606, 1606, 1606, 2116, 2115, 1984, 1606, 2033, + /* 310 */ 2032, 2031, 2022, 1983, 1756, 1606, 1982, 1981, 1606, 1606, + /* 320 */ 1606, 1606, 1606, 1872, 1871, 1975, 1606, 1606, 1976, 1974, + /* 330 */ 1973, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 340 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 2135, 2139, + /* 350 */ 1606, 1606, 1606, 1606, 1606, 1606, 2058, 1606, 1606, 1606, + /* 360 */ 1606, 1606, 1958, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 370 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 380 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 390 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 400 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 410 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 420 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 430 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 440 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 450 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 460 */ 1606, 1643, 1963, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 470 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 480 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 490 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 500 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1723, + /* 510 */ 1722, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 520 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 530 */ 1606, 1606, 1606, 1966, 1606, 1606, 1606, 1606, 1606, 1606, + /* 540 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 2131, 2091, 1606, + /* 550 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 560 */ 1606, 1606, 1606, 1606, 1606, 1606, 1958, 1606, 2114, 1606, + /* 570 */ 1606, 2129, 1606, 2133, 1606, 1606, 1606, 1606, 1606, 1606, + /* 580 */ 1606, 2068, 2064, 1606, 1606, 2060, 1606, 1606, 1606, 1606, + /* 590 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 600 */ 1606, 1606, 1957, 1606, 2019, 1606, 1606, 1606, 2053, 1606, + /* 610 */ 1606, 2004, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 620 */ 1606, 1966, 1606, 1969, 1606, 1606, 1606, 1606, 1606, 1788, + /* 630 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 640 */ 1606, 1606, 1773, 1771, 1770, 1769, 1606, 1766, 1606, 1801, + /* 650 */ 1606, 1606, 1606, 1797, 1796, 1606, 1606, 1606, 1606, 1606, + /* 660 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 670 */ 1703, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1695, + /* 680 */ 1606, 1694, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 690 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 700 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 710 */ 1606, 1606, 1606, 1606, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1257,6 +1291,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* WEND => nothing */ 0, /* WDURATION => nothing */ 0, /* IROWTS => nothing */ + 0, /* ISFILLED => nothing */ 0, /* CAST => nothing */ 0, /* NOW => nothing */ 0, /* TODAY => nothing */ @@ -1266,7 +1301,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* SERVER_STATUS => nothing */ 0, /* CURRENT_USER => nothing */ 0, /* CASE => nothing */ - 270, /* END => ABORT */ + 271, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1310,59 +1345,59 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 270, /* AFTER => ABORT */ - 270, /* ATTACH => ABORT */ - 270, /* BEFORE => ABORT */ - 270, /* BEGIN => ABORT */ - 270, /* BITAND => ABORT */ - 270, /* BITNOT => ABORT */ - 270, /* BITOR => ABORT */ - 270, /* BLOCKS => ABORT */ - 270, /* CHANGE => ABORT */ - 270, /* COMMA => ABORT */ - 270, /* COMPACT => ABORT */ - 270, /* CONCAT => ABORT */ - 270, /* CONFLICT => ABORT */ - 270, /* COPY => ABORT */ - 270, /* DEFERRED => ABORT */ - 270, /* DELIMITERS => ABORT */ - 270, /* DETACH => ABORT */ - 270, /* DIVIDE => ABORT */ - 270, /* DOT => ABORT */ - 270, /* EACH => ABORT */ - 270, /* FAIL => ABORT */ - 270, /* FILE => ABORT */ - 270, /* FOR => ABORT */ - 270, /* GLOB => ABORT */ - 270, /* ID => ABORT */ - 270, /* IMMEDIATE => ABORT */ - 270, /* IMPORT => ABORT */ - 270, /* INITIALLY => ABORT */ - 270, /* INSTEAD => ABORT */ - 270, /* ISNULL => ABORT */ - 270, /* KEY => ABORT */ - 270, /* MODULES => ABORT */ - 270, /* NK_BITNOT => ABORT */ - 270, /* NK_SEMI => ABORT */ - 270, /* NOTNULL => ABORT */ - 270, /* OF => ABORT */ - 270, /* PLUS => ABORT */ - 270, /* PRIVILEGE => ABORT */ - 270, /* RAISE => ABORT */ - 270, /* REPLACE => ABORT */ - 270, /* RESTRICT => ABORT */ - 270, /* ROW => ABORT */ - 270, /* SEMI => ABORT */ - 270, /* STAR => ABORT */ - 270, /* STATEMENT => ABORT */ - 270, /* STRICT => ABORT */ - 270, /* STRING => ABORT */ - 270, /* TIMES => ABORT */ - 270, /* UPDATE => ABORT */ - 270, /* VALUES => ABORT */ - 270, /* VARIABLE => ABORT */ - 270, /* VIEW => ABORT */ - 270, /* WAL => ABORT */ + 271, /* AFTER => ABORT */ + 271, /* ATTACH => ABORT */ + 271, /* BEFORE => ABORT */ + 271, /* BEGIN => ABORT */ + 271, /* BITAND => ABORT */ + 271, /* BITNOT => ABORT */ + 271, /* BITOR => ABORT */ + 271, /* BLOCKS => ABORT */ + 271, /* CHANGE => ABORT */ + 271, /* COMMA => ABORT */ + 271, /* COMPACT => ABORT */ + 271, /* CONCAT => ABORT */ + 271, /* CONFLICT => ABORT */ + 271, /* COPY => ABORT */ + 271, /* DEFERRED => ABORT */ + 271, /* DELIMITERS => ABORT */ + 271, /* DETACH => ABORT */ + 271, /* DIVIDE => ABORT */ + 271, /* DOT => ABORT */ + 271, /* EACH => ABORT */ + 271, /* FAIL => ABORT */ + 271, /* FILE => ABORT */ + 271, /* FOR => ABORT */ + 271, /* GLOB => ABORT */ + 271, /* ID => ABORT */ + 271, /* IMMEDIATE => ABORT */ + 271, /* IMPORT => ABORT */ + 271, /* INITIALLY => ABORT */ + 271, /* INSTEAD => ABORT */ + 271, /* ISNULL => ABORT */ + 271, /* KEY => ABORT */ + 271, /* MODULES => ABORT */ + 271, /* NK_BITNOT => ABORT */ + 271, /* NK_SEMI => ABORT */ + 271, /* NOTNULL => ABORT */ + 271, /* OF => ABORT */ + 271, /* PLUS => ABORT */ + 271, /* PRIVILEGE => ABORT */ + 271, /* RAISE => ABORT */ + 271, /* REPLACE => ABORT */ + 271, /* RESTRICT => ABORT */ + 271, /* ROW => ABORT */ + 271, /* SEMI => ABORT */ + 271, /* STAR => ABORT */ + 271, /* STATEMENT => ABORT */ + 271, /* STRICT => ABORT */ + 271, /* STRING => ABORT */ + 271, /* TIMES => ABORT */ + 271, /* UPDATE => ABORT */ + 271, /* VALUES => ABORT */ + 271, /* VARIABLE => ABORT */ + 271, /* VIEW => ABORT */ + 271, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1668,248 +1703,249 @@ static const char *const yyTokenName[] = { /* 215 */ "WEND", /* 216 */ "WDURATION", /* 217 */ "IROWTS", - /* 218 */ "CAST", - /* 219 */ "NOW", - /* 220 */ "TODAY", - /* 221 */ "TIMEZONE", - /* 222 */ "CLIENT_VERSION", - /* 223 */ "SERVER_VERSION", - /* 224 */ "SERVER_STATUS", - /* 225 */ "CURRENT_USER", - /* 226 */ "CASE", - /* 227 */ "END", - /* 228 */ "WHEN", - /* 229 */ "THEN", - /* 230 */ "ELSE", - /* 231 */ "BETWEEN", - /* 232 */ "IS", - /* 233 */ "NK_LT", - /* 234 */ "NK_GT", - /* 235 */ "NK_LE", - /* 236 */ "NK_GE", - /* 237 */ "NK_NE", - /* 238 */ "MATCH", - /* 239 */ "NMATCH", - /* 240 */ "CONTAINS", - /* 241 */ "IN", - /* 242 */ "JOIN", - /* 243 */ "INNER", - /* 244 */ "SELECT", - /* 245 */ "DISTINCT", - /* 246 */ "WHERE", - /* 247 */ "PARTITION", - /* 248 */ "BY", - /* 249 */ "SESSION", - /* 250 */ "STATE_WINDOW", - /* 251 */ "EVENT_WINDOW", - /* 252 */ "START", - /* 253 */ "SLIDING", - /* 254 */ "FILL", - /* 255 */ "VALUE", - /* 256 */ "NONE", - /* 257 */ "PREV", - /* 258 */ "LINEAR", - /* 259 */ "NEXT", - /* 260 */ "HAVING", - /* 261 */ "RANGE", - /* 262 */ "EVERY", - /* 263 */ "ORDER", - /* 264 */ "SLIMIT", - /* 265 */ "SOFFSET", - /* 266 */ "LIMIT", - /* 267 */ "OFFSET", - /* 268 */ "ASC", - /* 269 */ "NULLS", - /* 270 */ "ABORT", - /* 271 */ "AFTER", - /* 272 */ "ATTACH", - /* 273 */ "BEFORE", - /* 274 */ "BEGIN", - /* 275 */ "BITAND", - /* 276 */ "BITNOT", - /* 277 */ "BITOR", - /* 278 */ "BLOCKS", - /* 279 */ "CHANGE", - /* 280 */ "COMMA", - /* 281 */ "COMPACT", - /* 282 */ "CONCAT", - /* 283 */ "CONFLICT", - /* 284 */ "COPY", - /* 285 */ "DEFERRED", - /* 286 */ "DELIMITERS", - /* 287 */ "DETACH", - /* 288 */ "DIVIDE", - /* 289 */ "DOT", - /* 290 */ "EACH", - /* 291 */ "FAIL", - /* 292 */ "FILE", - /* 293 */ "FOR", - /* 294 */ "GLOB", - /* 295 */ "ID", - /* 296 */ "IMMEDIATE", - /* 297 */ "IMPORT", - /* 298 */ "INITIALLY", - /* 299 */ "INSTEAD", - /* 300 */ "ISNULL", - /* 301 */ "KEY", - /* 302 */ "MODULES", - /* 303 */ "NK_BITNOT", - /* 304 */ "NK_SEMI", - /* 305 */ "NOTNULL", - /* 306 */ "OF", - /* 307 */ "PLUS", - /* 308 */ "PRIVILEGE", - /* 309 */ "RAISE", - /* 310 */ "REPLACE", - /* 311 */ "RESTRICT", - /* 312 */ "ROW", - /* 313 */ "SEMI", - /* 314 */ "STAR", - /* 315 */ "STATEMENT", - /* 316 */ "STRICT", - /* 317 */ "STRING", - /* 318 */ "TIMES", - /* 319 */ "UPDATE", - /* 320 */ "VALUES", - /* 321 */ "VARIABLE", - /* 322 */ "VIEW", - /* 323 */ "WAL", - /* 324 */ "cmd", - /* 325 */ "account_options", - /* 326 */ "alter_account_options", - /* 327 */ "literal", - /* 328 */ "alter_account_option", - /* 329 */ "user_name", - /* 330 */ "sysinfo_opt", - /* 331 */ "privileges", - /* 332 */ "priv_level", - /* 333 */ "priv_type_list", - /* 334 */ "priv_type", - /* 335 */ "db_name", - /* 336 */ "topic_name", - /* 337 */ "dnode_endpoint", - /* 338 */ "force_opt", - /* 339 */ "not_exists_opt", - /* 340 */ "db_options", - /* 341 */ "exists_opt", - /* 342 */ "alter_db_options", - /* 343 */ "speed_opt", - /* 344 */ "integer_list", - /* 345 */ "variable_list", - /* 346 */ "retention_list", - /* 347 */ "alter_db_option", - /* 348 */ "retention", - /* 349 */ "full_table_name", - /* 350 */ "column_def_list", - /* 351 */ "tags_def_opt", - /* 352 */ "table_options", - /* 353 */ "multi_create_clause", - /* 354 */ "tags_def", - /* 355 */ "multi_drop_clause", - /* 356 */ "alter_table_clause", - /* 357 */ "alter_table_options", - /* 358 */ "column_name", - /* 359 */ "type_name", - /* 360 */ "signed_literal", - /* 361 */ "create_subtable_clause", - /* 362 */ "specific_cols_opt", - /* 363 */ "expression_list", - /* 364 */ "drop_table_clause", - /* 365 */ "col_name_list", - /* 366 */ "table_name", - /* 367 */ "column_def", - /* 368 */ "duration_list", - /* 369 */ "rollup_func_list", - /* 370 */ "alter_table_option", - /* 371 */ "duration_literal", - /* 372 */ "rollup_func_name", - /* 373 */ "function_name", - /* 374 */ "col_name", - /* 375 */ "db_name_cond_opt", - /* 376 */ "like_pattern_opt", - /* 377 */ "table_name_cond", - /* 378 */ "from_db_opt", - /* 379 */ "tag_list_opt", - /* 380 */ "tag_item", - /* 381 */ "column_alias", - /* 382 */ "index_options", - /* 383 */ "func_list", - /* 384 */ "sliding_opt", - /* 385 */ "sma_stream_opt", - /* 386 */ "func", - /* 387 */ "sma_func_name", - /* 388 */ "query_or_subquery", - /* 389 */ "cgroup_name", - /* 390 */ "analyze_opt", - /* 391 */ "explain_options", - /* 392 */ "agg_func_opt", - /* 393 */ "bufsize_opt", - /* 394 */ "stream_name", - /* 395 */ "stream_options", - /* 396 */ "subtable_opt", - /* 397 */ "expression", - /* 398 */ "dnode_list", - /* 399 */ "where_clause_opt", - /* 400 */ "signed", - /* 401 */ "literal_func", - /* 402 */ "literal_list", - /* 403 */ "table_alias", - /* 404 */ "expr_or_subquery", - /* 405 */ "pseudo_column", - /* 406 */ "column_reference", - /* 407 */ "function_expression", - /* 408 */ "case_when_expression", - /* 409 */ "star_func", - /* 410 */ "star_func_para_list", - /* 411 */ "noarg_func", - /* 412 */ "other_para_list", - /* 413 */ "star_func_para", - /* 414 */ "when_then_list", - /* 415 */ "case_when_else_opt", - /* 416 */ "common_expression", - /* 417 */ "when_then_expr", - /* 418 */ "predicate", - /* 419 */ "compare_op", - /* 420 */ "in_op", - /* 421 */ "in_predicate_value", - /* 422 */ "boolean_value_expression", - /* 423 */ "boolean_primary", - /* 424 */ "from_clause_opt", - /* 425 */ "table_reference_list", - /* 426 */ "table_reference", - /* 427 */ "table_primary", - /* 428 */ "joined_table", - /* 429 */ "alias_opt", - /* 430 */ "subquery", - /* 431 */ "parenthesized_joined_table", - /* 432 */ "join_type", - /* 433 */ "search_condition", - /* 434 */ "query_specification", - /* 435 */ "set_quantifier_opt", - /* 436 */ "select_list", - /* 437 */ "partition_by_clause_opt", - /* 438 */ "range_opt", - /* 439 */ "every_opt", - /* 440 */ "fill_opt", - /* 441 */ "twindow_clause_opt", - /* 442 */ "group_by_clause_opt", - /* 443 */ "having_clause_opt", - /* 444 */ "select_item", - /* 445 */ "partition_list", - /* 446 */ "partition_item", - /* 447 */ "fill_mode", - /* 448 */ "group_by_list", - /* 449 */ "query_expression", - /* 450 */ "query_simple", - /* 451 */ "order_by_clause_opt", - /* 452 */ "slimit_clause_opt", - /* 453 */ "limit_clause_opt", - /* 454 */ "union_query_expression", - /* 455 */ "query_simple_or_subquery", - /* 456 */ "sort_specification_list", - /* 457 */ "sort_specification", - /* 458 */ "ordering_specification_opt", - /* 459 */ "null_ordering_opt", + /* 218 */ "ISFILLED", + /* 219 */ "CAST", + /* 220 */ "NOW", + /* 221 */ "TODAY", + /* 222 */ "TIMEZONE", + /* 223 */ "CLIENT_VERSION", + /* 224 */ "SERVER_VERSION", + /* 225 */ "SERVER_STATUS", + /* 226 */ "CURRENT_USER", + /* 227 */ "CASE", + /* 228 */ "END", + /* 229 */ "WHEN", + /* 230 */ "THEN", + /* 231 */ "ELSE", + /* 232 */ "BETWEEN", + /* 233 */ "IS", + /* 234 */ "NK_LT", + /* 235 */ "NK_GT", + /* 236 */ "NK_LE", + /* 237 */ "NK_GE", + /* 238 */ "NK_NE", + /* 239 */ "MATCH", + /* 240 */ "NMATCH", + /* 241 */ "CONTAINS", + /* 242 */ "IN", + /* 243 */ "JOIN", + /* 244 */ "INNER", + /* 245 */ "SELECT", + /* 246 */ "DISTINCT", + /* 247 */ "WHERE", + /* 248 */ "PARTITION", + /* 249 */ "BY", + /* 250 */ "SESSION", + /* 251 */ "STATE_WINDOW", + /* 252 */ "EVENT_WINDOW", + /* 253 */ "START", + /* 254 */ "SLIDING", + /* 255 */ "FILL", + /* 256 */ "VALUE", + /* 257 */ "NONE", + /* 258 */ "PREV", + /* 259 */ "LINEAR", + /* 260 */ "NEXT", + /* 261 */ "HAVING", + /* 262 */ "RANGE", + /* 263 */ "EVERY", + /* 264 */ "ORDER", + /* 265 */ "SLIMIT", + /* 266 */ "SOFFSET", + /* 267 */ "LIMIT", + /* 268 */ "OFFSET", + /* 269 */ "ASC", + /* 270 */ "NULLS", + /* 271 */ "ABORT", + /* 272 */ "AFTER", + /* 273 */ "ATTACH", + /* 274 */ "BEFORE", + /* 275 */ "BEGIN", + /* 276 */ "BITAND", + /* 277 */ "BITNOT", + /* 278 */ "BITOR", + /* 279 */ "BLOCKS", + /* 280 */ "CHANGE", + /* 281 */ "COMMA", + /* 282 */ "COMPACT", + /* 283 */ "CONCAT", + /* 284 */ "CONFLICT", + /* 285 */ "COPY", + /* 286 */ "DEFERRED", + /* 287 */ "DELIMITERS", + /* 288 */ "DETACH", + /* 289 */ "DIVIDE", + /* 290 */ "DOT", + /* 291 */ "EACH", + /* 292 */ "FAIL", + /* 293 */ "FILE", + /* 294 */ "FOR", + /* 295 */ "GLOB", + /* 296 */ "ID", + /* 297 */ "IMMEDIATE", + /* 298 */ "IMPORT", + /* 299 */ "INITIALLY", + /* 300 */ "INSTEAD", + /* 301 */ "ISNULL", + /* 302 */ "KEY", + /* 303 */ "MODULES", + /* 304 */ "NK_BITNOT", + /* 305 */ "NK_SEMI", + /* 306 */ "NOTNULL", + /* 307 */ "OF", + /* 308 */ "PLUS", + /* 309 */ "PRIVILEGE", + /* 310 */ "RAISE", + /* 311 */ "REPLACE", + /* 312 */ "RESTRICT", + /* 313 */ "ROW", + /* 314 */ "SEMI", + /* 315 */ "STAR", + /* 316 */ "STATEMENT", + /* 317 */ "STRICT", + /* 318 */ "STRING", + /* 319 */ "TIMES", + /* 320 */ "UPDATE", + /* 321 */ "VALUES", + /* 322 */ "VARIABLE", + /* 323 */ "VIEW", + /* 324 */ "WAL", + /* 325 */ "cmd", + /* 326 */ "account_options", + /* 327 */ "alter_account_options", + /* 328 */ "literal", + /* 329 */ "alter_account_option", + /* 330 */ "user_name", + /* 331 */ "sysinfo_opt", + /* 332 */ "privileges", + /* 333 */ "priv_level", + /* 334 */ "priv_type_list", + /* 335 */ "priv_type", + /* 336 */ "db_name", + /* 337 */ "topic_name", + /* 338 */ "dnode_endpoint", + /* 339 */ "force_opt", + /* 340 */ "not_exists_opt", + /* 341 */ "db_options", + /* 342 */ "exists_opt", + /* 343 */ "alter_db_options", + /* 344 */ "speed_opt", + /* 345 */ "integer_list", + /* 346 */ "variable_list", + /* 347 */ "retention_list", + /* 348 */ "alter_db_option", + /* 349 */ "retention", + /* 350 */ "full_table_name", + /* 351 */ "column_def_list", + /* 352 */ "tags_def_opt", + /* 353 */ "table_options", + /* 354 */ "multi_create_clause", + /* 355 */ "tags_def", + /* 356 */ "multi_drop_clause", + /* 357 */ "alter_table_clause", + /* 358 */ "alter_table_options", + /* 359 */ "column_name", + /* 360 */ "type_name", + /* 361 */ "signed_literal", + /* 362 */ "create_subtable_clause", + /* 363 */ "specific_cols_opt", + /* 364 */ "expression_list", + /* 365 */ "drop_table_clause", + /* 366 */ "col_name_list", + /* 367 */ "table_name", + /* 368 */ "column_def", + /* 369 */ "duration_list", + /* 370 */ "rollup_func_list", + /* 371 */ "alter_table_option", + /* 372 */ "duration_literal", + /* 373 */ "rollup_func_name", + /* 374 */ "function_name", + /* 375 */ "col_name", + /* 376 */ "db_name_cond_opt", + /* 377 */ "like_pattern_opt", + /* 378 */ "table_name_cond", + /* 379 */ "from_db_opt", + /* 380 */ "tag_list_opt", + /* 381 */ "tag_item", + /* 382 */ "column_alias", + /* 383 */ "index_options", + /* 384 */ "func_list", + /* 385 */ "sliding_opt", + /* 386 */ "sma_stream_opt", + /* 387 */ "func", + /* 388 */ "sma_func_name", + /* 389 */ "query_or_subquery", + /* 390 */ "cgroup_name", + /* 391 */ "analyze_opt", + /* 392 */ "explain_options", + /* 393 */ "agg_func_opt", + /* 394 */ "bufsize_opt", + /* 395 */ "stream_name", + /* 396 */ "stream_options", + /* 397 */ "subtable_opt", + /* 398 */ "expression", + /* 399 */ "dnode_list", + /* 400 */ "where_clause_opt", + /* 401 */ "signed", + /* 402 */ "literal_func", + /* 403 */ "literal_list", + /* 404 */ "table_alias", + /* 405 */ "expr_or_subquery", + /* 406 */ "pseudo_column", + /* 407 */ "column_reference", + /* 408 */ "function_expression", + /* 409 */ "case_when_expression", + /* 410 */ "star_func", + /* 411 */ "star_func_para_list", + /* 412 */ "noarg_func", + /* 413 */ "other_para_list", + /* 414 */ "star_func_para", + /* 415 */ "when_then_list", + /* 416 */ "case_when_else_opt", + /* 417 */ "common_expression", + /* 418 */ "when_then_expr", + /* 419 */ "predicate", + /* 420 */ "compare_op", + /* 421 */ "in_op", + /* 422 */ "in_predicate_value", + /* 423 */ "boolean_value_expression", + /* 424 */ "boolean_primary", + /* 425 */ "from_clause_opt", + /* 426 */ "table_reference_list", + /* 427 */ "table_reference", + /* 428 */ "table_primary", + /* 429 */ "joined_table", + /* 430 */ "alias_opt", + /* 431 */ "subquery", + /* 432 */ "parenthesized_joined_table", + /* 433 */ "join_type", + /* 434 */ "search_condition", + /* 435 */ "query_specification", + /* 436 */ "set_quantifier_opt", + /* 437 */ "select_list", + /* 438 */ "partition_by_clause_opt", + /* 439 */ "range_opt", + /* 440 */ "every_opt", + /* 441 */ "fill_opt", + /* 442 */ "twindow_clause_opt", + /* 443 */ "group_by_clause_opt", + /* 444 */ "having_clause_opt", + /* 445 */ "select_item", + /* 446 */ "partition_list", + /* 447 */ "partition_item", + /* 448 */ "fill_mode", + /* 449 */ "group_by_list", + /* 450 */ "query_expression", + /* 451 */ "query_simple", + /* 452 */ "order_by_clause_opt", + /* 453 */ "slimit_clause_opt", + /* 454 */ "limit_clause_opt", + /* 455 */ "union_query_expression", + /* 456 */ "query_simple_or_subquery", + /* 457 */ "sort_specification_list", + /* 458 */ "sort_specification", + /* 459 */ "ordering_specification_opt", + /* 460 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2305,162 +2341,163 @@ static const char *const yyRuleName[] = { /* 385 */ "pseudo_column ::= WEND", /* 386 */ "pseudo_column ::= WDURATION", /* 387 */ "pseudo_column ::= IROWTS", - /* 388 */ "pseudo_column ::= QTAGS", - /* 389 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 390 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 391 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 392 */ "function_expression ::= literal_func", - /* 393 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 394 */ "literal_func ::= NOW", - /* 395 */ "noarg_func ::= NOW", - /* 396 */ "noarg_func ::= TODAY", - /* 397 */ "noarg_func ::= TIMEZONE", - /* 398 */ "noarg_func ::= DATABASE", - /* 399 */ "noarg_func ::= CLIENT_VERSION", - /* 400 */ "noarg_func ::= SERVER_VERSION", - /* 401 */ "noarg_func ::= SERVER_STATUS", - /* 402 */ "noarg_func ::= CURRENT_USER", - /* 403 */ "noarg_func ::= USER", - /* 404 */ "star_func ::= COUNT", - /* 405 */ "star_func ::= FIRST", - /* 406 */ "star_func ::= LAST", - /* 407 */ "star_func ::= LAST_ROW", - /* 408 */ "star_func_para_list ::= NK_STAR", - /* 409 */ "star_func_para_list ::= other_para_list", - /* 410 */ "other_para_list ::= star_func_para", - /* 411 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 412 */ "star_func_para ::= expr_or_subquery", - /* 413 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 414 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 415 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 416 */ "when_then_list ::= when_then_expr", - /* 417 */ "when_then_list ::= when_then_list when_then_expr", - /* 418 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 419 */ "case_when_else_opt ::=", - /* 420 */ "case_when_else_opt ::= ELSE common_expression", - /* 421 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 422 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 423 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 424 */ "predicate ::= expr_or_subquery IS NULL", - /* 425 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 426 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 427 */ "compare_op ::= NK_LT", - /* 428 */ "compare_op ::= NK_GT", - /* 429 */ "compare_op ::= NK_LE", - /* 430 */ "compare_op ::= NK_GE", - /* 431 */ "compare_op ::= NK_NE", - /* 432 */ "compare_op ::= NK_EQ", - /* 433 */ "compare_op ::= LIKE", - /* 434 */ "compare_op ::= NOT LIKE", - /* 435 */ "compare_op ::= MATCH", - /* 436 */ "compare_op ::= NMATCH", - /* 437 */ "compare_op ::= CONTAINS", - /* 438 */ "in_op ::= IN", - /* 439 */ "in_op ::= NOT IN", - /* 440 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 441 */ "boolean_value_expression ::= boolean_primary", - /* 442 */ "boolean_value_expression ::= NOT boolean_primary", - /* 443 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 444 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 445 */ "boolean_primary ::= predicate", - /* 446 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 447 */ "common_expression ::= expr_or_subquery", - /* 448 */ "common_expression ::= boolean_value_expression", - /* 449 */ "from_clause_opt ::=", - /* 450 */ "from_clause_opt ::= FROM table_reference_list", - /* 451 */ "table_reference_list ::= table_reference", - /* 452 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 453 */ "table_reference ::= table_primary", - /* 454 */ "table_reference ::= joined_table", - /* 455 */ "table_primary ::= table_name alias_opt", - /* 456 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 457 */ "table_primary ::= subquery alias_opt", - /* 458 */ "table_primary ::= parenthesized_joined_table", - /* 459 */ "alias_opt ::=", - /* 460 */ "alias_opt ::= table_alias", - /* 461 */ "alias_opt ::= AS table_alias", - /* 462 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 463 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 464 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 465 */ "join_type ::=", - /* 466 */ "join_type ::= INNER", - /* 467 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 468 */ "set_quantifier_opt ::=", - /* 469 */ "set_quantifier_opt ::= DISTINCT", - /* 470 */ "set_quantifier_opt ::= ALL", - /* 471 */ "select_list ::= select_item", - /* 472 */ "select_list ::= select_list NK_COMMA select_item", - /* 473 */ "select_item ::= NK_STAR", - /* 474 */ "select_item ::= common_expression", - /* 475 */ "select_item ::= common_expression column_alias", - /* 476 */ "select_item ::= common_expression AS column_alias", - /* 477 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 478 */ "where_clause_opt ::=", - /* 479 */ "where_clause_opt ::= WHERE search_condition", - /* 480 */ "partition_by_clause_opt ::=", - /* 481 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 482 */ "partition_list ::= partition_item", - /* 483 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 484 */ "partition_item ::= expr_or_subquery", - /* 485 */ "partition_item ::= expr_or_subquery column_alias", - /* 486 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 487 */ "twindow_clause_opt ::=", - /* 488 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 489 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 490 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 491 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 492 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 493 */ "sliding_opt ::=", - /* 494 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 495 */ "fill_opt ::=", - /* 496 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 497 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 498 */ "fill_mode ::= NONE", - /* 499 */ "fill_mode ::= PREV", - /* 500 */ "fill_mode ::= NULL", - /* 501 */ "fill_mode ::= LINEAR", - /* 502 */ "fill_mode ::= NEXT", - /* 503 */ "group_by_clause_opt ::=", - /* 504 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 505 */ "group_by_list ::= expr_or_subquery", - /* 506 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 507 */ "having_clause_opt ::=", - /* 508 */ "having_clause_opt ::= HAVING search_condition", - /* 509 */ "range_opt ::=", - /* 510 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 511 */ "every_opt ::=", - /* 512 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 513 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 514 */ "query_simple ::= query_specification", - /* 515 */ "query_simple ::= union_query_expression", - /* 516 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 517 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 518 */ "query_simple_or_subquery ::= query_simple", - /* 519 */ "query_simple_or_subquery ::= subquery", - /* 520 */ "query_or_subquery ::= query_expression", - /* 521 */ "query_or_subquery ::= subquery", - /* 522 */ "order_by_clause_opt ::=", - /* 523 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 524 */ "slimit_clause_opt ::=", - /* 525 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 526 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 527 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 528 */ "limit_clause_opt ::=", - /* 529 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 530 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 531 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 532 */ "subquery ::= NK_LP query_expression NK_RP", - /* 533 */ "subquery ::= NK_LP subquery NK_RP", - /* 534 */ "search_condition ::= common_expression", - /* 535 */ "sort_specification_list ::= sort_specification", - /* 536 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 537 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 538 */ "ordering_specification_opt ::=", - /* 539 */ "ordering_specification_opt ::= ASC", - /* 540 */ "ordering_specification_opt ::= DESC", - /* 541 */ "null_ordering_opt ::=", - /* 542 */ "null_ordering_opt ::= NULLS FIRST", - /* 543 */ "null_ordering_opt ::= NULLS LAST", + /* 388 */ "pseudo_column ::= ISFILLED", + /* 389 */ "pseudo_column ::= QTAGS", + /* 390 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 391 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 392 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 393 */ "function_expression ::= literal_func", + /* 394 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 395 */ "literal_func ::= NOW", + /* 396 */ "noarg_func ::= NOW", + /* 397 */ "noarg_func ::= TODAY", + /* 398 */ "noarg_func ::= TIMEZONE", + /* 399 */ "noarg_func ::= DATABASE", + /* 400 */ "noarg_func ::= CLIENT_VERSION", + /* 401 */ "noarg_func ::= SERVER_VERSION", + /* 402 */ "noarg_func ::= SERVER_STATUS", + /* 403 */ "noarg_func ::= CURRENT_USER", + /* 404 */ "noarg_func ::= USER", + /* 405 */ "star_func ::= COUNT", + /* 406 */ "star_func ::= FIRST", + /* 407 */ "star_func ::= LAST", + /* 408 */ "star_func ::= LAST_ROW", + /* 409 */ "star_func_para_list ::= NK_STAR", + /* 410 */ "star_func_para_list ::= other_para_list", + /* 411 */ "other_para_list ::= star_func_para", + /* 412 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 413 */ "star_func_para ::= expr_or_subquery", + /* 414 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 415 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 416 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 417 */ "when_then_list ::= when_then_expr", + /* 418 */ "when_then_list ::= when_then_list when_then_expr", + /* 419 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 420 */ "case_when_else_opt ::=", + /* 421 */ "case_when_else_opt ::= ELSE common_expression", + /* 422 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 423 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 424 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 425 */ "predicate ::= expr_or_subquery IS NULL", + /* 426 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 427 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 428 */ "compare_op ::= NK_LT", + /* 429 */ "compare_op ::= NK_GT", + /* 430 */ "compare_op ::= NK_LE", + /* 431 */ "compare_op ::= NK_GE", + /* 432 */ "compare_op ::= NK_NE", + /* 433 */ "compare_op ::= NK_EQ", + /* 434 */ "compare_op ::= LIKE", + /* 435 */ "compare_op ::= NOT LIKE", + /* 436 */ "compare_op ::= MATCH", + /* 437 */ "compare_op ::= NMATCH", + /* 438 */ "compare_op ::= CONTAINS", + /* 439 */ "in_op ::= IN", + /* 440 */ "in_op ::= NOT IN", + /* 441 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 442 */ "boolean_value_expression ::= boolean_primary", + /* 443 */ "boolean_value_expression ::= NOT boolean_primary", + /* 444 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 445 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 446 */ "boolean_primary ::= predicate", + /* 447 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 448 */ "common_expression ::= expr_or_subquery", + /* 449 */ "common_expression ::= boolean_value_expression", + /* 450 */ "from_clause_opt ::=", + /* 451 */ "from_clause_opt ::= FROM table_reference_list", + /* 452 */ "table_reference_list ::= table_reference", + /* 453 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 454 */ "table_reference ::= table_primary", + /* 455 */ "table_reference ::= joined_table", + /* 456 */ "table_primary ::= table_name alias_opt", + /* 457 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 458 */ "table_primary ::= subquery alias_opt", + /* 459 */ "table_primary ::= parenthesized_joined_table", + /* 460 */ "alias_opt ::=", + /* 461 */ "alias_opt ::= table_alias", + /* 462 */ "alias_opt ::= AS table_alias", + /* 463 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 464 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 465 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 466 */ "join_type ::=", + /* 467 */ "join_type ::= INNER", + /* 468 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 469 */ "set_quantifier_opt ::=", + /* 470 */ "set_quantifier_opt ::= DISTINCT", + /* 471 */ "set_quantifier_opt ::= ALL", + /* 472 */ "select_list ::= select_item", + /* 473 */ "select_list ::= select_list NK_COMMA select_item", + /* 474 */ "select_item ::= NK_STAR", + /* 475 */ "select_item ::= common_expression", + /* 476 */ "select_item ::= common_expression column_alias", + /* 477 */ "select_item ::= common_expression AS column_alias", + /* 478 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 479 */ "where_clause_opt ::=", + /* 480 */ "where_clause_opt ::= WHERE search_condition", + /* 481 */ "partition_by_clause_opt ::=", + /* 482 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 483 */ "partition_list ::= partition_item", + /* 484 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 485 */ "partition_item ::= expr_or_subquery", + /* 486 */ "partition_item ::= expr_or_subquery column_alias", + /* 487 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 488 */ "twindow_clause_opt ::=", + /* 489 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 490 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 491 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 492 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 493 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 494 */ "sliding_opt ::=", + /* 495 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 496 */ "fill_opt ::=", + /* 497 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 498 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 499 */ "fill_mode ::= NONE", + /* 500 */ "fill_mode ::= PREV", + /* 501 */ "fill_mode ::= NULL", + /* 502 */ "fill_mode ::= LINEAR", + /* 503 */ "fill_mode ::= NEXT", + /* 504 */ "group_by_clause_opt ::=", + /* 505 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 506 */ "group_by_list ::= expr_or_subquery", + /* 507 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 508 */ "having_clause_opt ::=", + /* 509 */ "having_clause_opt ::= HAVING search_condition", + /* 510 */ "range_opt ::=", + /* 511 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 512 */ "every_opt ::=", + /* 513 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 514 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 515 */ "query_simple ::= query_specification", + /* 516 */ "query_simple ::= union_query_expression", + /* 517 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 518 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 519 */ "query_simple_or_subquery ::= query_simple", + /* 520 */ "query_simple_or_subquery ::= subquery", + /* 521 */ "query_or_subquery ::= query_expression", + /* 522 */ "query_or_subquery ::= subquery", + /* 523 */ "order_by_clause_opt ::=", + /* 524 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 525 */ "slimit_clause_opt ::=", + /* 526 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 527 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 528 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 529 */ "limit_clause_opt ::=", + /* 530 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 531 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 532 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 533 */ "subquery ::= NK_LP query_expression NK_RP", + /* 534 */ "subquery ::= NK_LP subquery NK_RP", + /* 535 */ "search_condition ::= common_expression", + /* 536 */ "sort_specification_list ::= sort_specification", + /* 537 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 538 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 539 */ "ordering_specification_opt ::=", + /* 540 */ "ordering_specification_opt ::= ASC", + /* 541 */ "ordering_specification_opt ::= DESC", + /* 542 */ "null_ordering_opt ::=", + /* 543 */ "null_ordering_opt ::= NULLS FIRST", + /* 544 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2587,194 +2624,194 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 324: /* cmd */ - case 327: /* literal */ - case 340: /* db_options */ - case 342: /* alter_db_options */ - case 348: /* retention */ - case 349: /* full_table_name */ - case 352: /* table_options */ - case 356: /* alter_table_clause */ - case 357: /* alter_table_options */ - case 360: /* signed_literal */ - case 361: /* create_subtable_clause */ - case 364: /* drop_table_clause */ - case 367: /* column_def */ - case 371: /* duration_literal */ - case 372: /* rollup_func_name */ - case 374: /* col_name */ - case 375: /* db_name_cond_opt */ - case 376: /* like_pattern_opt */ - case 377: /* table_name_cond */ - case 378: /* from_db_opt */ - case 380: /* tag_item */ - case 382: /* index_options */ - case 384: /* sliding_opt */ - case 385: /* sma_stream_opt */ - case 386: /* func */ - case 388: /* query_or_subquery */ - case 391: /* explain_options */ - case 395: /* stream_options */ - case 396: /* subtable_opt */ - case 397: /* expression */ - case 399: /* where_clause_opt */ - case 400: /* signed */ - case 401: /* literal_func */ - case 404: /* expr_or_subquery */ - case 405: /* pseudo_column */ - case 406: /* column_reference */ - case 407: /* function_expression */ - case 408: /* case_when_expression */ - case 413: /* star_func_para */ - case 415: /* case_when_else_opt */ - case 416: /* common_expression */ - case 417: /* when_then_expr */ - case 418: /* predicate */ - case 421: /* in_predicate_value */ - case 422: /* boolean_value_expression */ - case 423: /* boolean_primary */ - case 424: /* from_clause_opt */ - case 425: /* table_reference_list */ - case 426: /* table_reference */ - case 427: /* table_primary */ - case 428: /* joined_table */ - case 430: /* subquery */ - case 431: /* parenthesized_joined_table */ - case 433: /* search_condition */ - case 434: /* query_specification */ - case 438: /* range_opt */ - case 439: /* every_opt */ - case 440: /* fill_opt */ - case 441: /* twindow_clause_opt */ - case 443: /* having_clause_opt */ - case 444: /* select_item */ - case 446: /* partition_item */ - case 449: /* query_expression */ - case 450: /* query_simple */ - case 452: /* slimit_clause_opt */ - case 453: /* limit_clause_opt */ - case 454: /* union_query_expression */ - case 455: /* query_simple_or_subquery */ - case 457: /* sort_specification */ + case 325: /* cmd */ + case 328: /* literal */ + case 341: /* db_options */ + case 343: /* alter_db_options */ + case 349: /* retention */ + case 350: /* full_table_name */ + case 353: /* table_options */ + case 357: /* alter_table_clause */ + case 358: /* alter_table_options */ + case 361: /* signed_literal */ + case 362: /* create_subtable_clause */ + case 365: /* drop_table_clause */ + case 368: /* column_def */ + case 372: /* duration_literal */ + case 373: /* rollup_func_name */ + case 375: /* col_name */ + case 376: /* db_name_cond_opt */ + case 377: /* like_pattern_opt */ + case 378: /* table_name_cond */ + case 379: /* from_db_opt */ + case 381: /* tag_item */ + case 383: /* index_options */ + case 385: /* sliding_opt */ + case 386: /* sma_stream_opt */ + case 387: /* func */ + case 389: /* query_or_subquery */ + case 392: /* explain_options */ + case 396: /* stream_options */ + case 397: /* subtable_opt */ + case 398: /* expression */ + case 400: /* where_clause_opt */ + case 401: /* signed */ + case 402: /* literal_func */ + case 405: /* expr_or_subquery */ + case 406: /* pseudo_column */ + case 407: /* column_reference */ + case 408: /* function_expression */ + case 409: /* case_when_expression */ + case 414: /* star_func_para */ + case 416: /* case_when_else_opt */ + case 417: /* common_expression */ + case 418: /* when_then_expr */ + case 419: /* predicate */ + case 422: /* in_predicate_value */ + case 423: /* boolean_value_expression */ + case 424: /* boolean_primary */ + case 425: /* from_clause_opt */ + case 426: /* table_reference_list */ + case 427: /* table_reference */ + case 428: /* table_primary */ + case 429: /* joined_table */ + case 431: /* subquery */ + case 432: /* parenthesized_joined_table */ + case 434: /* search_condition */ + case 435: /* query_specification */ + case 439: /* range_opt */ + case 440: /* every_opt */ + case 441: /* fill_opt */ + case 442: /* twindow_clause_opt */ + case 444: /* having_clause_opt */ + case 445: /* select_item */ + case 447: /* partition_item */ + case 450: /* query_expression */ + case 451: /* query_simple */ + case 453: /* slimit_clause_opt */ + case 454: /* limit_clause_opt */ + case 455: /* union_query_expression */ + case 456: /* query_simple_or_subquery */ + case 458: /* sort_specification */ { - nodesDestroyNode((yypminor->yy752)); + nodesDestroyNode((yypminor->yy600)); } break; - case 325: /* account_options */ - case 326: /* alter_account_options */ - case 328: /* alter_account_option */ - case 343: /* speed_opt */ - case 393: /* bufsize_opt */ + case 326: /* account_options */ + case 327: /* alter_account_options */ + case 329: /* alter_account_option */ + case 344: /* speed_opt */ + case 394: /* bufsize_opt */ { } break; - case 329: /* user_name */ - case 332: /* priv_level */ - case 335: /* db_name */ - case 336: /* topic_name */ - case 337: /* dnode_endpoint */ - case 358: /* column_name */ - case 366: /* table_name */ - case 373: /* function_name */ - case 381: /* column_alias */ - case 387: /* sma_func_name */ - case 389: /* cgroup_name */ - case 394: /* stream_name */ - case 403: /* table_alias */ - case 409: /* star_func */ - case 411: /* noarg_func */ - case 429: /* alias_opt */ + case 330: /* user_name */ + case 333: /* priv_level */ + case 336: /* db_name */ + case 337: /* topic_name */ + case 338: /* dnode_endpoint */ + case 359: /* column_name */ + case 367: /* table_name */ + case 374: /* function_name */ + case 382: /* column_alias */ + case 388: /* sma_func_name */ + case 390: /* cgroup_name */ + case 395: /* stream_name */ + case 404: /* table_alias */ + case 410: /* star_func */ + case 412: /* noarg_func */ + case 430: /* alias_opt */ { } break; - case 330: /* sysinfo_opt */ + case 331: /* sysinfo_opt */ { } break; - case 331: /* privileges */ - case 333: /* priv_type_list */ - case 334: /* priv_type */ + case 332: /* privileges */ + case 334: /* priv_type_list */ + case 335: /* priv_type */ { } break; - case 338: /* force_opt */ - case 339: /* not_exists_opt */ - case 341: /* exists_opt */ - case 390: /* analyze_opt */ - case 392: /* agg_func_opt */ - case 435: /* set_quantifier_opt */ + case 339: /* force_opt */ + case 340: /* not_exists_opt */ + case 342: /* exists_opt */ + case 391: /* analyze_opt */ + case 393: /* agg_func_opt */ + case 436: /* set_quantifier_opt */ { } break; - case 344: /* integer_list */ - case 345: /* variable_list */ - case 346: /* retention_list */ - case 350: /* column_def_list */ - case 351: /* tags_def_opt */ - case 353: /* multi_create_clause */ - case 354: /* tags_def */ - case 355: /* multi_drop_clause */ - case 362: /* specific_cols_opt */ - case 363: /* expression_list */ - case 365: /* col_name_list */ - case 368: /* duration_list */ - case 369: /* rollup_func_list */ - case 379: /* tag_list_opt */ - case 383: /* func_list */ - case 398: /* dnode_list */ - case 402: /* literal_list */ - case 410: /* star_func_para_list */ - case 412: /* other_para_list */ - case 414: /* when_then_list */ - case 436: /* select_list */ - case 437: /* partition_by_clause_opt */ - case 442: /* group_by_clause_opt */ - case 445: /* partition_list */ - case 448: /* group_by_list */ - case 451: /* order_by_clause_opt */ - case 456: /* sort_specification_list */ + case 345: /* integer_list */ + case 346: /* variable_list */ + case 347: /* retention_list */ + case 351: /* column_def_list */ + case 352: /* tags_def_opt */ + case 354: /* multi_create_clause */ + case 355: /* tags_def */ + case 356: /* multi_drop_clause */ + case 363: /* specific_cols_opt */ + case 364: /* expression_list */ + case 366: /* col_name_list */ + case 369: /* duration_list */ + case 370: /* rollup_func_list */ + case 380: /* tag_list_opt */ + case 384: /* func_list */ + case 399: /* dnode_list */ + case 403: /* literal_list */ + case 411: /* star_func_para_list */ + case 413: /* other_para_list */ + case 415: /* when_then_list */ + case 437: /* select_list */ + case 438: /* partition_by_clause_opt */ + case 443: /* group_by_clause_opt */ + case 446: /* partition_list */ + case 449: /* group_by_list */ + case 452: /* order_by_clause_opt */ + case 457: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy424)); + nodesDestroyList((yypminor->yy601)); } break; - case 347: /* alter_db_option */ - case 370: /* alter_table_option */ + case 348: /* alter_db_option */ + case 371: /* alter_table_option */ { } break; - case 359: /* type_name */ + case 360: /* type_name */ { } break; - case 419: /* compare_op */ - case 420: /* in_op */ + case 420: /* compare_op */ + case 421: /* in_op */ { } break; - case 432: /* join_type */ + case 433: /* join_type */ { } break; - case 447: /* fill_mode */ + case 448: /* fill_mode */ { } break; - case 458: /* ordering_specification_opt */ + case 459: /* ordering_specification_opt */ { } break; - case 459: /* null_ordering_opt */ + case 460: /* null_ordering_opt */ { } @@ -2902,15 +2939,18 @@ static YYACTIONTYPE yy_find_shift_action( do{ i = yy_shift_ofst[stateno]; assert( i>=0 ); - /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ + assert( i<=YY_ACTTAB_COUNT ); + assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); assert( iLookAhead!=YYNOCODE ); assert( iLookAhead < YYNTOKEN ); i += iLookAhead; - if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ + assert( i<(int)YY_NLOOKAHEAD ); + if( yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ - if( iLookAhead %s\n", @@ -2925,16 +2965,8 @@ static YYACTIONTYPE yy_find_shift_action( #ifdef YYWILDCARD { int j = i - iLookAhead + YYWILDCARD; - if( -#if YY_SHIFT_MIN+YYWILDCARD<0 - j>=0 && -#endif -#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT - j0 - ){ + assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) ); + if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", @@ -2948,6 +2980,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ + assert( i>=0 && iyytos; #ifndef NDEBUG if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ - yysize = yyRuleInfo[yyruleno].nrhs; + yysize = yyRuleInfoNRhs[yyruleno]; if( yysize ){ - fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", + fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", yyTracePrompt, - yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; @@ -3705,11 +4288,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,325,&yymsp[0].minor); + yy_destructor(yypParser,326,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,326,&yymsp[0].minor); + yy_destructor(yypParser,327,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3723,20 +4306,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,325,&yymsp[-2].minor); +{ yy_destructor(yypParser,326,&yymsp[-2].minor); { } - yy_destructor(yypParser,327,&yymsp[0].minor); + yy_destructor(yypParser,328,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,328,&yymsp[0].minor); +{ yy_destructor(yypParser,329,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,326,&yymsp[-1].minor); +{ yy_destructor(yypParser,327,&yymsp[-1].minor); { } - yy_destructor(yypParser,328,&yymsp[0].minor); + yy_destructor(yypParser,329,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3750,81 +4333,81 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,327,&yymsp[0].minor); + yy_destructor(yypParser,328,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy849, &yymsp[-1].minor.yy0, yymsp[0].minor.yy383); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy77, &yymsp[-1].minor.yy0, yymsp[0].minor.yy287); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy77, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy77, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy77, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy77); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy383 = 1; } +{ yymsp[1].minor.yy287 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy383 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy287 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy869, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy717, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy77); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy869, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy717, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy77); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy717 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy869 = yymsp[0].minor.yy869; } - yymsp[0].minor.yy869 = yylhsminor.yy869; +{ yylhsminor.yy717 = yymsp[0].minor.yy717; } + yymsp[0].minor.yy717 = yylhsminor.yy717; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy717 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy869 = yymsp[-2].minor.yy869 | yymsp[0].minor.yy869; } - yymsp[-2].minor.yy869 = yylhsminor.yy869; +{ yylhsminor.yy717 = yymsp[-2].minor.yy717 | yymsp[0].minor.yy717; } + yymsp[-2].minor.yy717 = yylhsminor.yy717; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy717 = PRIVILEGE_TYPE_READ; } break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy717 = PRIVILEGE_TYPE_WRITE; } break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy849 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy849 = yylhsminor.yy849; +{ yylhsminor.yy77 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy77 = yylhsminor.yy77; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy849 = yymsp[-2].minor.yy849; } - yymsp[-2].minor.yy849 = yylhsminor.yy849; +{ yylhsminor.yy77 = yymsp[-2].minor.yy77; } + yymsp[-2].minor.yy77 = yylhsminor.yy77; break; case 42: /* priv_level ::= topic_name */ case 267: /* sma_func_name ::= function_name */ yytestcase(yyruleno==267); - case 460: /* alias_opt ::= table_alias */ yytestcase(yyruleno==460); -{ yylhsminor.yy849 = yymsp[0].minor.yy849; } - yymsp[0].minor.yy849 = yylhsminor.yy849; + case 461: /* alias_opt ::= table_alias */ yytestcase(yyruleno==461); +{ yylhsminor.yy77 = yymsp[0].minor.yy77; } + yymsp[0].minor.yy77 = yylhsminor.yy77; break; case 43: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy849, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy77, NULL); } break; case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy0); } break; case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy57); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy841); } break; case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy57); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy77, yymsp[0].minor.yy841); } break; case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3855,35 +4438,35 @@ static YYACTIONTYPE yy_reduce( case 354: /* topic_name ::= NK_ID */ yytestcase(yyruleno==354); case 355: /* stream_name ::= NK_ID */ yytestcase(yyruleno==355); case 356: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==356); - case 395: /* noarg_func ::= NOW */ yytestcase(yyruleno==395); - case 396: /* noarg_func ::= TODAY */ yytestcase(yyruleno==396); - case 397: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==397); - case 398: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==398); - case 399: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==399); - case 400: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==400); - case 401: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==401); - case 402: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==402); - case 403: /* noarg_func ::= USER */ yytestcase(yyruleno==403); - case 404: /* star_func ::= COUNT */ yytestcase(yyruleno==404); - case 405: /* star_func ::= FIRST */ yytestcase(yyruleno==405); - case 406: /* star_func ::= LAST */ yytestcase(yyruleno==406); - case 407: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==407); -{ yylhsminor.yy849 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy849 = yylhsminor.yy849; + case 396: /* noarg_func ::= NOW */ yytestcase(yyruleno==396); + case 397: /* noarg_func ::= TODAY */ yytestcase(yyruleno==397); + case 398: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==398); + case 399: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==399); + case 400: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==400); + case 401: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==401); + case 402: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==402); + case 403: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==403); + case 404: /* noarg_func ::= USER */ yytestcase(yyruleno==404); + case 405: /* star_func ::= COUNT */ yytestcase(yyruleno==405); + case 406: /* star_func ::= FIRST */ yytestcase(yyruleno==406); + case 407: /* star_func ::= LAST */ yytestcase(yyruleno==407); + case 408: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==408); +{ yylhsminor.yy77 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy77 = yylhsminor.yy77; break; case 54: /* force_opt ::= */ case 73: /* not_exists_opt ::= */ yytestcase(yyruleno==73); case 75: /* exists_opt ::= */ yytestcase(yyruleno==75); case 287: /* analyze_opt ::= */ yytestcase(yyruleno==287); case 294: /* agg_func_opt ::= */ yytestcase(yyruleno==294); - case 468: /* set_quantifier_opt ::= */ yytestcase(yyruleno==468); -{ yymsp[1].minor.yy57 = false; } + case 469: /* set_quantifier_opt ::= */ yytestcase(yyruleno==469); +{ yymsp[1].minor.yy841 = false; } break; case 55: /* force_opt ::= FORCE */ case 288: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==288); case 295: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==295); - case 469: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==469); -{ yymsp[0].minor.yy57 = true; } + case 470: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==470); +{ yymsp[0].minor.yy841 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3916,206 +4499,206 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy57, &yymsp[-1].minor.yy849, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy841, &yymsp[-1].minor.yy77, yymsp[0].minor.yy600); } break; case 67: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy841, &yymsp[0].minor.yy77); } break; case 68: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy77); } break; case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy77, yymsp[0].minor.yy600); } break; case 70: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy77); } break; case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy340); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy77, yymsp[0].minor.yy248); } break; case 72: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy57 = true; } +{ yymsp[-2].minor.yy841 = true; } break; case 74: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy57 = true; } +{ yymsp[-1].minor.yy841 = true; } break; case 76: /* db_options ::= */ -{ yymsp[1].minor.yy752 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy600 = createDefaultDatabaseOptions(pCxt); } break; case 77: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 78: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 79: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 80: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 81: /* db_options ::= db_options DURATION NK_INTEGER */ case 82: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==82); -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 83: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 84: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 85: /* db_options ::= db_options KEEP integer_list */ case 86: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==86); -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_KEEP, yymsp[0].minor.yy424); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_KEEP, yymsp[0].minor.yy601); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 87: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 88: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 89: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 90: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 91: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 92: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 93: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 94: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_RETENTIONS, yymsp[0].minor.yy424); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_RETENTIONS, yymsp[0].minor.yy601); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 95: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 96: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 97: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 98: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-3].minor.yy752, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-3].minor.yy600, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 100: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-3].minor.yy752, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-3].minor.yy600, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 102: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 103: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 104: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 105: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 106: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setDatabaseOption(pCxt, yymsp[-2].minor.yy600, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 107: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy752 = createAlterDatabaseOptions(pCxt); yylhsminor.yy752 = setAlterDatabaseOption(pCxt, yylhsminor.yy752, &yymsp[0].minor.yy5); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterDatabaseOptions(pCxt); yylhsminor.yy600 = setAlterDatabaseOption(pCxt, yylhsminor.yy600, &yymsp[0].minor.yy661); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 108: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy752 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy752, &yymsp[0].minor.yy5); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy600, &yymsp[0].minor.yy661); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 109: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 110: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 111: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 113: /* alter_db_option ::= KEEP integer_list */ case 114: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==114); -{ yymsp[-1].minor.yy5.type = DB_OPTION_KEEP; yymsp[-1].minor.yy5.pList = yymsp[0].minor.yy424; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_KEEP; yymsp[-1].minor.yy661.pList = yymsp[0].minor.yy601; } break; case 115: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_PAGES; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_PAGES; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 116: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 117: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_WAL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_WAL; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 118: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 119: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy424 = yylhsminor.yy424; +{ yylhsminor.yy601 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy601 = yylhsminor.yy601; break; case 120: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 317: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==317); -{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy424 = yylhsminor.yy424; +{ yylhsminor.yy601 = addNodeToList(pCxt, yymsp[-2].minor.yy601, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy601 = yylhsminor.yy601; break; case 121: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy424 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy424 = yylhsminor.yy424; +{ yylhsminor.yy601 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy601 = yylhsminor.yy601; break; case 122: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy424 = yylhsminor.yy424; +{ yylhsminor.yy601 = addNodeToList(pCxt, yymsp[-2].minor.yy601, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy601 = yylhsminor.yy601; break; case 123: /* retention_list ::= retention */ case 145: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==145); @@ -4126,13 +4709,13 @@ static YYACTIONTYPE yy_reduce( case 253: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==253); case 264: /* func_list ::= func */ yytestcase(yyruleno==264); case 345: /* literal_list ::= signed_literal */ yytestcase(yyruleno==345); - case 410: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==410); - case 416: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==416); - case 471: /* select_list ::= select_item */ yytestcase(yyruleno==471); - case 482: /* partition_list ::= partition_item */ yytestcase(yyruleno==482); - case 535: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==535); -{ yylhsminor.yy424 = createNodeList(pCxt, yymsp[0].minor.yy752); } - yymsp[0].minor.yy424 = yylhsminor.yy424; + case 411: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==411); + case 417: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==417); + case 472: /* select_list ::= select_item */ yytestcase(yyruleno==472); + case 483: /* partition_list ::= partition_item */ yytestcase(yyruleno==483); + case 536: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==536); +{ yylhsminor.yy601 = createNodeList(pCxt, yymsp[0].minor.yy600); } + yymsp[0].minor.yy601 = yylhsminor.yy601; break; case 124: /* retention_list ::= retention_list NK_COMMA retention */ case 156: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==156); @@ -4141,270 +4724,270 @@ static YYACTIONTYPE yy_reduce( case 254: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==254); case 265: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==265); case 346: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==346); - case 411: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==411); - case 472: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==472); - case 483: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==483); - case 536: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==536); -{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } - yymsp[-2].minor.yy424 = yylhsminor.yy424; + case 412: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==412); + case 473: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==473); + case 484: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==484); + case 537: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==537); +{ yylhsminor.yy601 = addNodeToList(pCxt, yymsp[-2].minor.yy601, yymsp[0].minor.yy600); } + yymsp[-2].minor.yy601 = yylhsminor.yy601; break; case 125: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy752 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 126: /* speed_opt ::= */ case 296: /* bufsize_opt ::= */ yytestcase(yyruleno==296); -{ yymsp[1].minor.yy340 = 0; } +{ yymsp[1].minor.yy248 = 0; } break; case 127: /* speed_opt ::= MAX_SPEED NK_INTEGER */ case 297: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==297); -{ yymsp[-1].minor.yy340 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy248 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 128: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 130: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==130); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy57, yymsp[-5].minor.yy752, yymsp[-3].minor.yy424, yymsp[-1].minor.yy424, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy841, yymsp[-5].minor.yy600, yymsp[-3].minor.yy601, yymsp[-1].minor.yy601, yymsp[0].minor.yy600); } break; case 129: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy424); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy601); } break; case 131: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy424); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy601); } break; case 132: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy841, yymsp[0].minor.yy600); } break; case 133: /* cmd ::= ALTER TABLE alter_table_clause */ case 319: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==319); -{ pCxt->pRootNode = yymsp[0].minor.yy752; } +{ pCxt->pRootNode = yymsp[0].minor.yy600; } break; case 134: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy752); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy600); } break; case 135: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy752 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy600, yymsp[0].minor.yy600); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 136: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy600, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy77, yymsp[0].minor.yy888); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 137: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy752 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy752, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy849); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy600, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy77); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 138: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy600, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy77, yymsp[0].minor.yy888); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 139: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy752 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy600, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy77, &yymsp[0].minor.yy77); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 140: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy600, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy77, yymsp[0].minor.yy888); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 141: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy752 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy752, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy849); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy600, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy77); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 142: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy600, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy77, yymsp[0].minor.yy888); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 143: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy752 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy600, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy77, &yymsp[0].minor.yy77); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 144: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy752 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy752, &yymsp[-2].minor.yy849, yymsp[0].minor.yy752); } - yymsp[-5].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy600, &yymsp[-2].minor.yy77, yymsp[0].minor.yy600); } + yymsp[-5].minor.yy600 = yylhsminor.yy600; break; case 146: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 149: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==149); - case 417: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==417); -{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-1].minor.yy424, yymsp[0].minor.yy752); } - yymsp[-1].minor.yy424 = yylhsminor.yy424; + case 418: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==418); +{ yylhsminor.yy601 = addNodeToList(pCxt, yymsp[-1].minor.yy601, yymsp[0].minor.yy600); } + yymsp[-1].minor.yy601 = yylhsminor.yy601; break; case 147: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy752 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy57, yymsp[-8].minor.yy752, yymsp[-6].minor.yy752, yymsp[-5].minor.yy424, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } - yymsp[-9].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy841, yymsp[-8].minor.yy600, yymsp[-6].minor.yy600, yymsp[-5].minor.yy601, yymsp[-2].minor.yy601, yymsp[0].minor.yy600); } + yymsp[-9].minor.yy600 = yylhsminor.yy600; break; case 150: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy752 = createDropTableClause(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createDropTableClause(pCxt, yymsp[-1].minor.yy841, yymsp[0].minor.yy600); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 151: /* specific_cols_opt ::= */ case 182: /* tags_def_opt ::= */ yytestcase(yyruleno==182); case 252: /* tag_list_opt ::= */ yytestcase(yyruleno==252); - case 480: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==480); - case 503: /* group_by_clause_opt ::= */ yytestcase(yyruleno==503); - case 522: /* order_by_clause_opt ::= */ yytestcase(yyruleno==522); -{ yymsp[1].minor.yy424 = NULL; } + case 481: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==481); + case 504: /* group_by_clause_opt ::= */ yytestcase(yyruleno==504); + case 523: /* order_by_clause_opt ::= */ yytestcase(yyruleno==523); +{ yymsp[1].minor.yy601 = NULL; } break; case 152: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy424 = yymsp[-1].minor.yy424; } +{ yymsp[-2].minor.yy601 = yymsp[-1].minor.yy601; } break; case 153: /* full_table_name ::= table_name */ -{ yylhsminor.yy752 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy849, NULL); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy77, NULL); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 154: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy752 = createRealTableNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849, NULL); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRealTableNode(pCxt, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy77, NULL); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 157: /* column_def ::= column_name type_name */ -{ yylhsminor.yy752 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384, NULL); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy77, yymsp[0].minor.yy888, NULL); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 158: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy752 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-2].minor.yy384, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy77, yymsp[-2].minor.yy888, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 159: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 160: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 161: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 162: /* type_name ::= INT */ case 163: /* type_name ::= INTEGER */ yytestcase(yyruleno==163); -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_INT); } break; case 164: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 165: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 166: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 167: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy888 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 168: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 169: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy888 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 170: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy888 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 171: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy888 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 172: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy888 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 173: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy888 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 174: /* type_name ::= JSON */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 175: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy888 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 176: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 177: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 178: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy888 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 179: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy888 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 180: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy888 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy888 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 183: /* tags_def_opt ::= tags_def */ - case 409: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==409); -{ yylhsminor.yy424 = yymsp[0].minor.yy424; } - yymsp[0].minor.yy424 = yylhsminor.yy424; + case 410: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==410); +{ yylhsminor.yy601 = yymsp[0].minor.yy601; } + yymsp[0].minor.yy601 = yylhsminor.yy601; break; case 184: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy424 = yymsp[-1].minor.yy424; } +{ yymsp[-3].minor.yy601 = yymsp[-1].minor.yy601; } break; case 185: /* table_options ::= */ -{ yymsp[1].minor.yy752 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy600 = createDefaultTableOptions(pCxt); } break; case 186: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-2].minor.yy600, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 187: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy424); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-2].minor.yy600, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy601); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 188: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy424); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-2].minor.yy600, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy601); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 189: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-4].minor.yy752, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy424); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-4].minor.yy600, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy601); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 190: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-2].minor.yy600, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 191: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-4].minor.yy752, TABLE_OPTION_SMA, yymsp[-1].minor.yy424); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-4].minor.yy600, TABLE_OPTION_SMA, yymsp[-1].minor.yy601); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; case 192: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy424); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-2].minor.yy600, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy601); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 193: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy752 = createAlterTableOptions(pCxt); yylhsminor.yy752 = setTableOption(pCxt, yylhsminor.yy752, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createAlterTableOptions(pCxt); yylhsminor.yy600 = setTableOption(pCxt, yylhsminor.yy600, yymsp[0].minor.yy661.type, &yymsp[0].minor.yy661.val); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 194: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setTableOption(pCxt, yymsp[-1].minor.yy600, yymsp[0].minor.yy661.type, &yymsp[0].minor.yy661.val); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 195: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy5.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 196: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy5.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy661.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy661.val = yymsp[0].minor.yy0; } break; case 197: /* duration_list ::= duration_literal */ case 374: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==374); -{ yylhsminor.yy424 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } - yymsp[0].minor.yy424 = yylhsminor.yy424; +{ yylhsminor.yy601 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy600)); } + yymsp[0].minor.yy601 = yylhsminor.yy601; break; case 198: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 375: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==375); -{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } - yymsp[-2].minor.yy424 = yylhsminor.yy424; +{ yylhsminor.yy601 = addNodeToList(pCxt, yymsp[-2].minor.yy601, releaseRawExprNode(pCxt, yymsp[0].minor.yy600)); } + yymsp[-2].minor.yy601 = yylhsminor.yy601; break; case 201: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[0].minor.yy849, NULL); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createFunctionNode(pCxt, &yymsp[0].minor.yy77, NULL); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 202: /* rollup_func_name ::= FIRST */ case 203: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==203); case 256: /* tag_item ::= QTAGS */ yytestcase(yyruleno==256); -{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 206: /* col_name ::= column_name */ case 257: /* tag_item ::= column_name */ yytestcase(yyruleno==257); -{ yylhsminor.yy752 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy849); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy77); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 207: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -4419,13 +5002,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 211: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy600, yymsp[0].minor.yy600, OP_TYPE_LIKE); } break; case 212: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy600, yymsp[0].minor.yy600, OP_TYPE_LIKE); } break; case 213: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy752, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy600, NULL, OP_TYPE_LIKE); } break; case 214: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -4437,7 +5020,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 217: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy752, yymsp[-1].minor.yy752, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy600, yymsp[-1].minor.yy600, OP_TYPE_EQUAL); } break; case 218: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -4456,13 +5039,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 224: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy77); } break; case 225: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy600); } break; case 226: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy600); } break; case 227: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4481,7 +5064,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; case 233: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy600); } break; case 234: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } @@ -4496,7 +5079,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; case 238: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy600); } break; case 239: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4505,10 +5088,10 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; case 241: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy752, yymsp[-1].minor.yy752, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy600, yymsp[-1].minor.yy600, OP_TYPE_EQUAL); } break; case 242: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752, yymsp[-3].minor.yy424); } +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy600, yymsp[0].minor.yy600, yymsp[-3].minor.yy601); } break; case 243: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } @@ -4518,160 +5101,160 @@ static YYACTIONTYPE yy_reduce( break; case 245: /* db_name_cond_opt ::= */ case 250: /* from_db_opt ::= */ yytestcase(yyruleno==250); -{ yymsp[1].minor.yy752 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy600 = createDefaultDatabaseCondValue(pCxt); } break; case 246: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy752 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy849); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy77); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 247: /* like_pattern_opt ::= */ case 307: /* subtable_opt ::= */ yytestcase(yyruleno==307); - case 419: /* case_when_else_opt ::= */ yytestcase(yyruleno==419); - case 449: /* from_clause_opt ::= */ yytestcase(yyruleno==449); - case 478: /* where_clause_opt ::= */ yytestcase(yyruleno==478); - case 487: /* twindow_clause_opt ::= */ yytestcase(yyruleno==487); - case 493: /* sliding_opt ::= */ yytestcase(yyruleno==493); - case 495: /* fill_opt ::= */ yytestcase(yyruleno==495); - case 507: /* having_clause_opt ::= */ yytestcase(yyruleno==507); - case 509: /* range_opt ::= */ yytestcase(yyruleno==509); - case 511: /* every_opt ::= */ yytestcase(yyruleno==511); - case 524: /* slimit_clause_opt ::= */ yytestcase(yyruleno==524); - case 528: /* limit_clause_opt ::= */ yytestcase(yyruleno==528); -{ yymsp[1].minor.yy752 = NULL; } + case 420: /* case_when_else_opt ::= */ yytestcase(yyruleno==420); + case 450: /* from_clause_opt ::= */ yytestcase(yyruleno==450); + case 479: /* where_clause_opt ::= */ yytestcase(yyruleno==479); + case 488: /* twindow_clause_opt ::= */ yytestcase(yyruleno==488); + case 494: /* sliding_opt ::= */ yytestcase(yyruleno==494); + case 496: /* fill_opt ::= */ yytestcase(yyruleno==496); + case 508: /* having_clause_opt ::= */ yytestcase(yyruleno==508); + case 510: /* range_opt ::= */ yytestcase(yyruleno==510); + case 512: /* every_opt ::= */ yytestcase(yyruleno==512); + case 525: /* slimit_clause_opt ::= */ yytestcase(yyruleno==525); + case 529: /* limit_clause_opt ::= */ yytestcase(yyruleno==529); +{ yymsp[1].minor.yy600 = NULL; } break; case 248: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 249: /* table_name_cond ::= table_name */ -{ yylhsminor.yy752 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy849); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy77); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 251: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy752 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy849); } +{ yymsp[-1].minor.yy600 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy77); } break; case 255: /* tag_item ::= TBNAME */ -{ yylhsminor.yy752 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 258: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy752 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy849), &yymsp[0].minor.yy849); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy77), &yymsp[0].minor.yy77); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 259: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy752 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy849), &yymsp[0].minor.yy849); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy77), &yymsp[0].minor.yy77); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 260: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy57, yymsp[-3].minor.yy752, yymsp[-1].minor.yy752, NULL, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy841, yymsp[-3].minor.yy600, yymsp[-1].minor.yy600, NULL, yymsp[0].minor.yy600); } break; case 261: /* cmd ::= DROP INDEX exists_opt full_table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy841, yymsp[0].minor.yy600); } break; case 262: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy752 = createIndexOption(pCxt, yymsp[-7].minor.yy424, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } +{ yymsp[-9].minor.yy600 = createIndexOption(pCxt, yymsp[-7].minor.yy601, releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), NULL, yymsp[-1].minor.yy600, yymsp[0].minor.yy600); } break; case 263: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy752 = createIndexOption(pCxt, yymsp[-9].minor.yy424, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } +{ yymsp[-11].minor.yy600 = createIndexOption(pCxt, yymsp[-9].minor.yy601, releaseRawExprNode(pCxt, yymsp[-5].minor.yy600), releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), yymsp[-1].minor.yy600, yymsp[0].minor.yy600); } break; case 266: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-1].minor.yy424); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createFunctionNode(pCxt, &yymsp[-3].minor.yy77, yymsp[-1].minor.yy601); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 272: /* sma_stream_opt ::= */ case 300: /* stream_options ::= */ yytestcase(yyruleno==300); -{ yymsp[1].minor.yy752 = createStreamOptions(pCxt); } +{ yymsp[1].minor.yy600 = createStreamOptions(pCxt); } break; case 273: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ case 304: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==304); -{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-2].minor.yy600)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy600); yylhsminor.yy600 = yymsp[-2].minor.yy600; } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 274: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-2].minor.yy600)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy600); yylhsminor.yy600 = yymsp[-2].minor.yy600; } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 275: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-2].minor.yy600)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy600); yylhsminor.yy600 = yymsp[-2].minor.yy600; } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 276: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy57, &yymsp[-2].minor.yy849, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy841, &yymsp[-2].minor.yy77, yymsp[0].minor.yy600); } break; case 277: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy57, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy849, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy841, &yymsp[-3].minor.yy77, &yymsp[0].minor.yy77, false); } break; case 278: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy57, &yymsp[-5].minor.yy849, &yymsp[0].minor.yy849, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy841, &yymsp[-5].minor.yy77, &yymsp[0].minor.yy77, true); } break; case 279: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy57, &yymsp[-3].minor.yy849, yymsp[0].minor.yy752, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy841, &yymsp[-3].minor.yy77, yymsp[0].minor.yy600, false); } break; case 280: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy57, &yymsp[-5].minor.yy849, yymsp[0].minor.yy752, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy841, &yymsp[-5].minor.yy77, yymsp[0].minor.yy600, true); } break; case 281: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy841, &yymsp[0].minor.yy77); } break; case 282: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy57, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy841, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy77); } break; case 283: /* cmd ::= DESC full_table_name */ case 284: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==284); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy600); } break; case 285: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 286: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy57, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy841, yymsp[-1].minor.yy600, yymsp[0].minor.yy600); } break; case 289: /* explain_options ::= */ -{ yymsp[1].minor.yy752 = createDefaultExplainOptions(pCxt); } +{ yymsp[1].minor.yy600 = createDefaultExplainOptions(pCxt); } break; case 290: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy752 = setExplainVerbose(pCxt, yymsp[-2].minor.yy752, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setExplainVerbose(pCxt, yymsp[-2].minor.yy600, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 291: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy752 = setExplainRatio(pCxt, yymsp[-2].minor.yy752, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = setExplainRatio(pCxt, yymsp[-2].minor.yy600, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 292: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy57, yymsp[-8].minor.yy57, &yymsp[-5].minor.yy849, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy384, yymsp[0].minor.yy340); } +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy841, yymsp[-8].minor.yy841, &yymsp[-5].minor.yy77, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy888, yymsp[0].minor.yy248); } break; case 293: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy841, &yymsp[0].minor.yy77); } break; case 298: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy57, &yymsp[-7].minor.yy849, yymsp[-4].minor.yy752, yymsp[-6].minor.yy752, yymsp[-3].minor.yy424, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy841, &yymsp[-7].minor.yy77, yymsp[-4].minor.yy600, yymsp[-6].minor.yy600, yymsp[-3].minor.yy601, yymsp[-2].minor.yy600, yymsp[0].minor.yy600); } break; case 299: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy841, &yymsp[0].minor.yy77); } break; case 301: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy752)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy752 = yymsp[-2].minor.yy752; } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-2].minor.yy600)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy600 = yymsp[-2].minor.yy600; } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 302: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy752)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy752 = yymsp[-2].minor.yy752; } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-2].minor.yy600)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy600 = yymsp[-2].minor.yy600; } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 303: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy752)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy752)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-3].minor.yy752; } - yymsp[-3].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-3].minor.yy600)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy600)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy600); yylhsminor.yy600 = yymsp[-3].minor.yy600; } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 305: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-3].minor.yy752)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy752 = yymsp[-3].minor.yy752; } - yymsp[-3].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-3].minor.yy600)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy600 = yymsp[-3].minor.yy600; } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; case 306: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-2].minor.yy752)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy752 = yymsp[-2].minor.yy752; } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ ((SStreamOptions*)yymsp[-2].minor.yy600)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy600 = yymsp[-2].minor.yy600; } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 308: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 494: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==494); - case 512: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==512); -{ yymsp[-3].minor.yy752 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy752); } + case 495: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==495); + case 513: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==513); +{ yymsp[-3].minor.yy600 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy600); } break; case 309: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } @@ -4689,42 +5272,42 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 314: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy424); } +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy601); } break; case 315: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 316: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +{ yymsp[-1].minor.yy601 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 318: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy600, yymsp[0].minor.yy600); } break; case 320: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy752, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy600, yymsp[-2].minor.yy601, yymsp[0].minor.yy600); } break; case 321: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy752, NULL, yymsp[0].minor.yy752); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy600, NULL, yymsp[0].minor.yy600); } break; case 322: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 323: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 324: /* literal ::= NK_STRING */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 325: /* literal ::= NK_BOOL */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 326: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 327: /* literal ::= duration_literal */ case 337: /* signed_literal ::= signed */ yytestcase(yyruleno==337); @@ -4734,184 +5317,184 @@ static YYACTIONTYPE yy_reduce( case 360: /* expression ::= column_reference */ yytestcase(yyruleno==360); case 361: /* expression ::= function_expression */ yytestcase(yyruleno==361); case 362: /* expression ::= case_when_expression */ yytestcase(yyruleno==362); - case 392: /* function_expression ::= literal_func */ yytestcase(yyruleno==392); - case 441: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==441); - case 445: /* boolean_primary ::= predicate */ yytestcase(yyruleno==445); - case 447: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==447); - case 448: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==448); - case 451: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==451); - case 453: /* table_reference ::= table_primary */ yytestcase(yyruleno==453); - case 454: /* table_reference ::= joined_table */ yytestcase(yyruleno==454); - case 458: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==458); - case 514: /* query_simple ::= query_specification */ yytestcase(yyruleno==514); - case 515: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==515); - case 518: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==518); - case 520: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==520); -{ yylhsminor.yy752 = yymsp[0].minor.yy752; } - yymsp[0].minor.yy752 = yylhsminor.yy752; + case 393: /* function_expression ::= literal_func */ yytestcase(yyruleno==393); + case 442: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==442); + case 446: /* boolean_primary ::= predicate */ yytestcase(yyruleno==446); + case 448: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==448); + case 449: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==449); + case 452: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==452); + case 454: /* table_reference ::= table_primary */ yytestcase(yyruleno==454); + case 455: /* table_reference ::= joined_table */ yytestcase(yyruleno==455); + case 459: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==459); + case 515: /* query_simple ::= query_specification */ yytestcase(yyruleno==515); + case 516: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==516); + case 519: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==519); + case 521: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==521); +{ yylhsminor.yy600 = yymsp[0].minor.yy600; } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 328: /* literal ::= NULL */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 329: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 330: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 331: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 332: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; case 333: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 334: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 335: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 336: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 338: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 339: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 340: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 341: /* signed_literal ::= duration_literal */ case 343: /* signed_literal ::= literal_func */ yytestcase(yyruleno==343); - case 412: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==412); - case 474: /* select_item ::= common_expression */ yytestcase(yyruleno==474); - case 484: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==484); - case 519: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==519); - case 521: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==521); - case 534: /* search_condition ::= common_expression */ yytestcase(yyruleno==534); -{ yylhsminor.yy752 = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); } - yymsp[0].minor.yy752 = yylhsminor.yy752; + case 413: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==413); + case 475: /* select_item ::= common_expression */ yytestcase(yyruleno==475); + case 485: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==485); + case 520: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==520); + case 522: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==522); + case 535: /* search_condition ::= common_expression */ yytestcase(yyruleno==535); +{ yylhsminor.yy600 = releaseRawExprNode(pCxt, yymsp[0].minor.yy600); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 342: /* signed_literal ::= NULL */ -{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 344: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy752 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 363: /* expression ::= NK_LP expression NK_RP */ - case 446: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==446); - case 533: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==533); -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 447: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==447); + case 534: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==534); +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy600)); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 364: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy600)); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 365: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy752), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy600), NULL)); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; case 366: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 367: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 368: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 369: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 370: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 371: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 372: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 373: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 376: /* column_reference ::= column_name */ -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy849, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy849)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy77, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy77)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 377: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849, createColumnNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849)); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy77, createColumnNode(pCxt, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy77)); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; case 378: /* pseudo_column ::= ROWTS */ case 379: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==379); @@ -4922,340 +5505,341 @@ static YYACTIONTYPE yy_reduce( case 385: /* pseudo_column ::= WEND */ yytestcase(yyruleno==385); case 386: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==386); case 387: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==387); - case 388: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==388); - case 394: /* literal_func ::= NOW */ yytestcase(yyruleno==394); -{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy752 = yylhsminor.yy752; + case 388: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==388); + case 389: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==389); + case 395: /* literal_func ::= NOW */ yytestcase(yyruleno==395); +{ yylhsminor.yy600 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; case 380: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy849)))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy77)))); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 389: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 390: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==390); -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-1].minor.yy424)); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + case 390: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 391: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==391); +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy77, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy77, yymsp[-1].minor.yy601)); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; - case 391: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy384)); } - yymsp[-5].minor.yy752 = yylhsminor.yy752; + case 392: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), yymsp[-1].minor.yy888)); } + yymsp[-5].minor.yy600 = yylhsminor.yy600; break; - case 393: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy849, NULL)); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 394: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy77, NULL)); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 408: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy424 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy424 = yylhsminor.yy424; + case 409: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy601 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy601 = yylhsminor.yy601; break; - case 413: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 477: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==477); -{ yylhsminor.yy752 = createColumnNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 414: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 478: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==478); +{ yylhsminor.yy600 = createColumnNode(pCxt, &yymsp[-2].minor.yy77, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 414: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy424, yymsp[-1].minor.yy752)); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + case 415: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy601, yymsp[-1].minor.yy600)); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; - case 415: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-2].minor.yy424, yymsp[-1].minor.yy752)); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; + case 416: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), yymsp[-2].minor.yy601, yymsp[-1].minor.yy600)); } + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; - case 418: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy752 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } + case 419: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy600 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600)); } break; - case 420: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy752 = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); } + case 421: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy600 = releaseRawExprNode(pCxt, yymsp[0].minor.yy600); } break; - case 421: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 426: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==426); + case 422: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 427: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==427); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy620, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy666, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 422: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 423: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy752), releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy600), releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-4].minor.yy752 = yylhsminor.yy752; + yymsp[-4].minor.yy600 = yylhsminor.yy600; break; - case 423: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 424: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy600), releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-5].minor.yy752 = yylhsminor.yy752; + yymsp[-5].minor.yy600 = yylhsminor.yy600; break; - case 424: /* predicate ::= expr_or_subquery IS NULL */ + case 425: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), NULL)); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 425: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 426: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), NULL)); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; - case 427: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy620 = OP_TYPE_LOWER_THAN; } + case 428: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy666 = OP_TYPE_LOWER_THAN; } break; - case 428: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy620 = OP_TYPE_GREATER_THAN; } + case 429: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy666 = OP_TYPE_GREATER_THAN; } break; - case 429: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy620 = OP_TYPE_LOWER_EQUAL; } + case 430: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy666 = OP_TYPE_LOWER_EQUAL; } break; - case 430: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy620 = OP_TYPE_GREATER_EQUAL; } + case 431: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy666 = OP_TYPE_GREATER_EQUAL; } break; - case 431: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy620 = OP_TYPE_NOT_EQUAL; } + case 432: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy666 = OP_TYPE_NOT_EQUAL; } break; - case 432: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy620 = OP_TYPE_EQUAL; } + case 433: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy666 = OP_TYPE_EQUAL; } break; - case 433: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy620 = OP_TYPE_LIKE; } + case 434: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy666 = OP_TYPE_LIKE; } break; - case 434: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy620 = OP_TYPE_NOT_LIKE; } + case 435: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy666 = OP_TYPE_NOT_LIKE; } break; - case 435: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy620 = OP_TYPE_MATCH; } + case 436: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy666 = OP_TYPE_MATCH; } break; - case 436: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy620 = OP_TYPE_NMATCH; } + case 437: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy666 = OP_TYPE_NMATCH; } break; - case 437: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy620 = OP_TYPE_JSON_CONTAINS; } + case 438: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy666 = OP_TYPE_JSON_CONTAINS; } break; - case 438: /* in_op ::= IN */ -{ yymsp[0].minor.yy620 = OP_TYPE_IN; } + case 439: /* in_op ::= IN */ +{ yymsp[0].minor.yy666 = OP_TYPE_IN; } break; - case 439: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy620 = OP_TYPE_NOT_IN; } + case 440: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy666 = OP_TYPE_NOT_IN; } break; - case 440: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 441: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy601)); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 442: /* boolean_value_expression ::= NOT boolean_primary */ + case 443: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy752), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy600), NULL)); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; - case 443: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 444: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 444: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 445: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); - yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy600); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy600); + yylhsminor.yy600 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 450: /* from_clause_opt ::= FROM table_reference_list */ - case 479: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==479); - case 508: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==508); -{ yymsp[-1].minor.yy752 = yymsp[0].minor.yy752; } + case 451: /* from_clause_opt ::= FROM table_reference_list */ + case 480: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==480); + case 509: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==509); +{ yymsp[-1].minor.yy600 = yymsp[0].minor.yy600; } break; - case 452: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy752 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, NULL); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 453: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy600 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy600, yymsp[0].minor.yy600, NULL); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 455: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy752 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + case 456: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy600 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy77, &yymsp[0].minor.yy77); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; - case 456: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy752 = createRealTableNode(pCxt, &yymsp[-3].minor.yy849, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + case 457: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy600 = createRealTableNode(pCxt, &yymsp[-3].minor.yy77, &yymsp[-1].minor.yy77, &yymsp[0].minor.yy77); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; - case 457: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy752 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752), &yymsp[0].minor.yy849); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + case 458: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy600 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy600), &yymsp[0].minor.yy77); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; - case 459: /* alias_opt ::= */ -{ yymsp[1].minor.yy849 = nil_token; } + case 460: /* alias_opt ::= */ +{ yymsp[1].minor.yy77 = nil_token; } break; - case 461: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy849 = yymsp[0].minor.yy849; } + case 462: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy77 = yymsp[0].minor.yy77; } break; - case 462: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 463: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==463); -{ yymsp[-2].minor.yy752 = yymsp[-1].minor.yy752; } + case 463: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 464: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==464); +{ yymsp[-2].minor.yy600 = yymsp[-1].minor.yy600; } break; - case 464: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy752 = createJoinTableNode(pCxt, yymsp[-4].minor.yy332, yymsp[-5].minor.yy752, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } - yymsp[-5].minor.yy752 = yylhsminor.yy752; + case 465: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy600 = createJoinTableNode(pCxt, yymsp[-4].minor.yy560, yymsp[-5].minor.yy600, yymsp[-2].minor.yy600, yymsp[0].minor.yy600); } + yymsp[-5].minor.yy600 = yylhsminor.yy600; break; - case 465: /* join_type ::= */ -{ yymsp[1].minor.yy332 = JOIN_TYPE_INNER; } + case 466: /* join_type ::= */ +{ yymsp[1].minor.yy560 = JOIN_TYPE_INNER; } break; - case 466: /* join_type ::= INNER */ -{ yymsp[0].minor.yy332 = JOIN_TYPE_INNER; } + case 467: /* join_type ::= INNER */ +{ yymsp[0].minor.yy560 = JOIN_TYPE_INNER; } break; - case 467: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 468: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-11].minor.yy752 = createSelectStmt(pCxt, yymsp[-10].minor.yy57, yymsp[-9].minor.yy424, yymsp[-8].minor.yy752); - yymsp[-11].minor.yy752 = addWhereClause(pCxt, yymsp[-11].minor.yy752, yymsp[-7].minor.yy752); - yymsp[-11].minor.yy752 = addPartitionByClause(pCxt, yymsp[-11].minor.yy752, yymsp[-6].minor.yy424); - yymsp[-11].minor.yy752 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy752, yymsp[-2].minor.yy752); - yymsp[-11].minor.yy752 = addGroupByClause(pCxt, yymsp[-11].minor.yy752, yymsp[-1].minor.yy424); - yymsp[-11].minor.yy752 = addHavingClause(pCxt, yymsp[-11].minor.yy752, yymsp[0].minor.yy752); - yymsp[-11].minor.yy752 = addRangeClause(pCxt, yymsp[-11].minor.yy752, yymsp[-5].minor.yy752); - yymsp[-11].minor.yy752 = addEveryClause(pCxt, yymsp[-11].minor.yy752, yymsp[-4].minor.yy752); - yymsp[-11].minor.yy752 = addFillClause(pCxt, yymsp[-11].minor.yy752, yymsp[-3].minor.yy752); + yymsp[-11].minor.yy600 = createSelectStmt(pCxt, yymsp[-10].minor.yy841, yymsp[-9].minor.yy601, yymsp[-8].minor.yy600); + yymsp[-11].minor.yy600 = addWhereClause(pCxt, yymsp[-11].minor.yy600, yymsp[-7].minor.yy600); + yymsp[-11].minor.yy600 = addPartitionByClause(pCxt, yymsp[-11].minor.yy600, yymsp[-6].minor.yy601); + yymsp[-11].minor.yy600 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy600, yymsp[-2].minor.yy600); + yymsp[-11].minor.yy600 = addGroupByClause(pCxt, yymsp[-11].minor.yy600, yymsp[-1].minor.yy601); + yymsp[-11].minor.yy600 = addHavingClause(pCxt, yymsp[-11].minor.yy600, yymsp[0].minor.yy600); + yymsp[-11].minor.yy600 = addRangeClause(pCxt, yymsp[-11].minor.yy600, yymsp[-5].minor.yy600); + yymsp[-11].minor.yy600 = addEveryClause(pCxt, yymsp[-11].minor.yy600, yymsp[-4].minor.yy600); + yymsp[-11].minor.yy600 = addFillClause(pCxt, yymsp[-11].minor.yy600, yymsp[-3].minor.yy600); } break; - case 470: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy57 = false; } + case 471: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy841 = false; } break; - case 473: /* select_item ::= NK_STAR */ -{ yylhsminor.yy752 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy752 = yylhsminor.yy752; + case 474: /* select_item ::= NK_STAR */ +{ yylhsminor.yy600 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy600 = yylhsminor.yy600; break; - case 475: /* select_item ::= common_expression column_alias */ - case 485: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==485); -{ yylhsminor.yy752 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752), &yymsp[0].minor.yy849); } - yymsp[-1].minor.yy752 = yylhsminor.yy752; + case 476: /* select_item ::= common_expression column_alias */ + case 486: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==486); +{ yylhsminor.yy600 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy600), &yymsp[0].minor.yy77); } + yymsp[-1].minor.yy600 = yylhsminor.yy600; break; - case 476: /* select_item ::= common_expression AS column_alias */ - case 486: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==486); -{ yylhsminor.yy752 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), &yymsp[0].minor.yy849); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 477: /* select_item ::= common_expression AS column_alias */ + case 487: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==487); +{ yylhsminor.yy600 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), &yymsp[0].minor.yy77); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 481: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 504: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==504); - case 523: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==523); -{ yymsp[-2].minor.yy424 = yymsp[0].minor.yy424; } + case 482: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 505: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==505); + case 524: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==524); +{ yymsp[-2].minor.yy601 = yymsp[0].minor.yy601; } break; - case 488: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy752 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } + case 489: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy600 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), releaseRawExprNode(pCxt, yymsp[-1].minor.yy600)); } break; - case 489: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy752 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } + case 490: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy600 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy600)); } break; - case 490: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy752 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } + case 491: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy600 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), NULL, yymsp[-1].minor.yy600, yymsp[0].minor.yy600); } break; - case 491: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy752 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } + case 492: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy600 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy600), releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), yymsp[-1].minor.yy600, yymsp[0].minor.yy600); } break; - case 492: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy752 = createEventWindowNode(pCxt, yymsp[-3].minor.yy752, yymsp[0].minor.yy752); } + case 493: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy600 = createEventWindowNode(pCxt, yymsp[-3].minor.yy600, yymsp[0].minor.yy600); } break; - case 496: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy752 = createFillNode(pCxt, yymsp[-1].minor.yy214, NULL); } + case 497: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy600 = createFillNode(pCxt, yymsp[-1].minor.yy798, NULL); } break; - case 497: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy752 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } + case 498: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy600 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy601)); } break; - case 498: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy214 = FILL_MODE_NONE; } + case 499: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy798 = FILL_MODE_NONE; } break; - case 499: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy214 = FILL_MODE_PREV; } + case 500: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy798 = FILL_MODE_PREV; } break; - case 500: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy214 = FILL_MODE_NULL; } + case 501: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy798 = FILL_MODE_NULL; } break; - case 501: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy214 = FILL_MODE_LINEAR; } + case 502: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy798 = FILL_MODE_LINEAR; } break; - case 502: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy214 = FILL_MODE_NEXT; } + case 503: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy798 = FILL_MODE_NEXT; } break; - case 505: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy424 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[0].minor.yy424 = yylhsminor.yy424; + case 506: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy601 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } + yymsp[0].minor.yy601 = yylhsminor.yy601; break; - case 506: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy424 = yylhsminor.yy424; + case 507: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy601 = addNodeToList(pCxt, yymsp[-2].minor.yy601, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy600))); } + yymsp[-2].minor.yy601 = yylhsminor.yy601; break; - case 510: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy752 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } + case 511: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy600 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy600), releaseRawExprNode(pCxt, yymsp[-1].minor.yy600)); } break; - case 513: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 514: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy752 = addOrderByClause(pCxt, yymsp[-3].minor.yy752, yymsp[-2].minor.yy424); - yylhsminor.yy752 = addSlimitClause(pCxt, yylhsminor.yy752, yymsp[-1].minor.yy752); - yylhsminor.yy752 = addLimitClause(pCxt, yylhsminor.yy752, yymsp[0].minor.yy752); + yylhsminor.yy600 = addOrderByClause(pCxt, yymsp[-3].minor.yy600, yymsp[-2].minor.yy601); + yylhsminor.yy600 = addSlimitClause(pCxt, yylhsminor.yy600, yymsp[-1].minor.yy600); + yylhsminor.yy600 = addLimitClause(pCxt, yylhsminor.yy600, yymsp[0].minor.yy600); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; - case 516: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy752 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy752, yymsp[0].minor.yy752); } - yymsp[-3].minor.yy752 = yylhsminor.yy752; + case 517: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy600 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy600, yymsp[0].minor.yy600); } + yymsp[-3].minor.yy600 = yylhsminor.yy600; break; - case 517: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy752 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 518: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy600 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy600, yymsp[0].minor.yy600); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 525: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 529: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==529); -{ yymsp[-1].minor.yy752 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 526: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 530: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==530); +{ yymsp[-1].minor.yy600 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 526: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 530: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==530); -{ yymsp[-3].minor.yy752 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 527: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 531: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==531); +{ yymsp[-3].minor.yy600 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 527: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 531: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==531); -{ yymsp[-3].minor.yy752 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 528: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 532: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==532); +{ yymsp[-3].minor.yy600 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 532: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy752); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 533: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy600 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy600); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 537: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy752 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), yymsp[-1].minor.yy538, yymsp[0].minor.yy777); } - yymsp[-2].minor.yy752 = yylhsminor.yy752; + case 538: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy600 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy600), yymsp[-1].minor.yy32, yymsp[0].minor.yy385); } + yymsp[-2].minor.yy600 = yylhsminor.yy600; break; - case 538: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy538 = ORDER_ASC; } + case 539: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy32 = ORDER_ASC; } break; - case 539: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy538 = ORDER_ASC; } + case 540: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy32 = ORDER_ASC; } break; - case 540: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy538 = ORDER_DESC; } + case 541: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy32 = ORDER_DESC; } break; - case 541: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy777 = NULL_ORDER_DEFAULT; } + case 542: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy385 = NULL_ORDER_DEFAULT; } break; - case 542: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy777 = NULL_ORDER_FIRST; } + case 543: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy385 = NULL_ORDER_FIRST; } break; - case 543: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy777 = NULL_ORDER_LAST; } + case 544: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy385 = NULL_ORDER_LAST; } break; default: break; /********** End reduce actions ************************************************/ }; - assert( yyrulenopRoot), QUERY_NODE_VNODE_MODIF_STMT); - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_VNODE_MODIFY_STMT); + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; ASSERT_EQ(pStmt->sqlNodeType, QUERY_NODE_ALTER_TABLE_STMT); ASSERT_NE(pStmt->pDataBlocks, nullptr); diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 205c70e0df..2f965de76f 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -953,6 +953,10 @@ static int32_t createFillLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect code = TSDB_CODE_OUT_OF_MEMORY; } + if (TSDB_CODE_SUCCESS == code && 0 == LIST_LENGTH(pFill->node.pTargets)) { + code = createColumnByRewriteExpr(pFill->pWStartTs, &pFill->node.pTargets); + } + if (TSDB_CODE_SUCCESS == code) { *pLogicNode = (SLogicNode*)pFill; } else { @@ -1396,7 +1400,7 @@ static int32_t getMsgType(ENodeType sqlType) { return TDMT_VND_SUBMIT; } -static int32_t createVnodeModifLogicNode(SLogicPlanContext* pCxt, SVnodeModifOpStmt* pStmt, SLogicNode** pLogicNode) { +static int32_t createVnodeModifLogicNode(SLogicPlanContext* pCxt, SVnodeModifyOpStmt* pStmt, SLogicNode** pLogicNode) { SVnodeModifyLogicNode* pModif = (SVnodeModifyLogicNode*)nodesMakeNode(QUERY_NODE_LOGIC_PLAN_VNODE_MODIFY); if (NULL == pModif) { return TSDB_CODE_OUT_OF_MEMORY; @@ -1580,8 +1584,8 @@ static int32_t createQueryLogicNode(SLogicPlanContext* pCxt, SNode* pStmt, SLogi switch (nodeType(pStmt)) { case QUERY_NODE_SELECT_STMT: return createSelectLogicNode(pCxt, (SSelectStmt*)pStmt, pLogicNode); - case QUERY_NODE_VNODE_MODIF_STMT: - return createVnodeModifLogicNode(pCxt, (SVnodeModifOpStmt*)pStmt, pLogicNode); + case QUERY_NODE_VNODE_MODIFY_STMT: + return createVnodeModifLogicNode(pCxt, (SVnodeModifyOpStmt*)pStmt, pLogicNode); case QUERY_NODE_EXPLAIN_STMT: return createQueryLogicNode(pCxt, ((SExplainStmt*)pStmt)->pQuery, pLogicNode); case QUERY_NODE_SET_OPERATOR: diff --git a/source/libs/planner/test/planBasicTest.cpp b/source/libs/planner/test/planBasicTest.cpp index 150df76416..10ab71ab0e 100644 --- a/source/libs/planner/test/planBasicTest.cpp +++ b/source/libs/planner/test/planBasicTest.cpp @@ -104,6 +104,8 @@ TEST_F(PlanBasicTest, interpFunc) { run("SELECT _IROWTS, INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); + run("SELECT _IROWTS, INTERP(c1), _ISFILLED FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); + run("SELECT TBNAME, _IROWTS, INTERP(c1) FROM t1 PARTITION BY TBNAME " "RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); } diff --git a/source/libs/scheduler/src/schRemote.c b/source/libs/scheduler/src/schRemote.c index c23b461b47..b6de9383d7 100644 --- a/source/libs/scheduler/src/schRemote.c +++ b/source/libs/scheduler/src/schRemote.c @@ -456,6 +456,7 @@ int32_t schHandleLinkBrokenCallback(void *param, SDataBuf *pMsg, int32_t code) { if (head->isHbParam) { taosMemoryFree(pMsg->pData); + taosMemoryFree(pMsg->pEpSet); SSchHbCallbackParam *hbParam = (SSchHbCallbackParam *)param; SSchTrans trans = {.pTrans = hbParam->pTrans, .pHandle = NULL}; diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index 88727351c6..d875d3ca09 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -275,6 +275,8 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt SyncIndex index = pEntry->index; SyncIndex prevIndex = pEntry->index - 1; SyncTerm lastMatchTerm = syncLogBufferGetLastMatchTerm(pBuf); + SSyncRaftEntry* pExist = NULL; + bool inBuf = true; if (index <= pBuf->commitIndex) { sTrace("vgId:%d, already committed. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 @@ -306,10 +308,9 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt } // check current in buffer - SSyncRaftEntry* pExist = pBuf->entries[index % pBuf->size].pItem; + pExist = syncLogBufferGetOneEntry(pBuf, pNode, index, &inBuf); if (pExist != NULL) { ASSERT(pEntry->index == pExist->index); - if (pEntry->term != pExist->term) { (void)syncLogBufferRollback(pBuf, pNode, index); } else { @@ -317,14 +318,15 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); - SyncTerm existPrevTerm = pBuf->entries[index % pBuf->size].prevLogTerm; - ASSERT(pEntry->term == pExist->term && prevTerm == existPrevTerm); + SyncTerm existPrevTerm = syncLogReplMgrGetPrevLogTerm(NULL, pNode, index); + ASSERT(pEntry->term == pExist->term && (pEntry->index > pBuf->matchIndex || prevTerm == existPrevTerm)); ret = 0; goto _out; } } // update + ASSERT(pBuf->entries[index % pBuf->size].pItem == NULL); SSyncLogBufEntry tmp = {.pItem = pEntry, .prevLogIndex = prevIndex, .prevLogTerm = prevTerm}; pEntry = NULL; pBuf->entries[index % pBuf->size] = tmp; @@ -337,6 +339,10 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt _out: syncEntryDestroy(pEntry); + if (!inBuf) { + syncEntryDestroy(pExist); + pExist = NULL; + } syncLogBufferValidate(pBuf); taosThreadMutexUnlock(&pBuf->mutex); return ret; @@ -1008,6 +1014,16 @@ int32_t syncLogBufferRollback(SSyncLogBuffer* pBuf, SSyncNode* pNode, SyncIndex lastVer = pNode->pLogStore->syncLogLastIndex(pNode->pLogStore); ASSERT(toIndex == lastVer + 1); + // refill buffer on need + if (toIndex <= pBuf->startIndex) { + int32_t ret = syncLogBufferInitWithoutLock(pBuf, pNode); + if (ret < 0) { + sError("vgId:%d, failed to refill sync log buffer since %s", pNode->vgId, terrstr()); + return -1; + } + } + + ASSERT(pBuf->endIndex == toIndex); syncLogBufferValidate(pBuf); return 0; } diff --git a/source/libs/tdb/src/db/tdbPage.c b/source/libs/tdb/src/db/tdbPage.c index ac2725d8ec..50dc8e0a65 100644 --- a/source/libs/tdb/src/db/tdbPage.c +++ b/source/libs/tdb/src/db/tdbPage.c @@ -111,6 +111,9 @@ void tdbPageZero(SPage *pPage, u8 szAmHdr, int (*xCellSize)(const SPage *, SCell void tdbPageInit(SPage *pPage, u8 szAmHdr, int (*xCellSize)(const SPage *, SCell *, int, TXN *, SBTree *pBt)) { tdbTrace("page/init: %p %" PRIu8 " %p", pPage, szAmHdr, xCellSize); pPage->pPageHdr = pPage->pData + szAmHdr; + if (TDB_PAGE_NCELLS(pPage) == 0) { + return tdbPageZero(pPage, szAmHdr, xCellSize); + } pPage->pCellIdx = pPage->pPageHdr + TDB_PAGE_HDR_SIZE(pPage); pPage->pFreeStart = pPage->pCellIdx + TDB_PAGE_OFFSET_SIZE(pPage) * TDB_PAGE_NCELLS(pPage); pPage->pFreeEnd = pPage->pData + TDB_PAGE_CCELLS(pPage); diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index 23ab0004b9..b554170b39 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -466,11 +466,19 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { return -1; } + if (tdbOsLSeek(jfd, 0L, SEEK_SET) < 0) { + tdbError("failed to lseek jfd due to %s. file:%s, offset:0", strerror(errno), pPager->dbFileName); + terrno = TAOS_SYSTEM_ERROR(errno); + return -1; + } + u8 *pageBuf = tdbOsCalloc(1, pPager->pageSize); if (pageBuf == NULL) { return -1; } + tdbDebug("tdb/abort: pager:%p,", pPager); + for (int pgIndex = 0; pgIndex < journalSize; ++pgIndex) { // read pgno & the page from journal SPgno pgno; @@ -481,6 +489,8 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { return -1; } + tdbTrace("tdb/abort: pgno:%d,", pgno); + ret = tdbOsRead(jfd, pageBuf, pPager->pageSize); if (ret < 0) { tdbOsFree(pageBuf); @@ -578,12 +588,12 @@ int tdbPagerFlushPage(SPager *pPager, TXN *pTxn) { return -1; } - tdbTrace("tdb/flush:%p, %d/%d/%d", pPager, pPager->dbOrigSize, pPager->dbFileSize, maxPgno); + tdbTrace("tdb/flush:%p, pgno:%d, %d/%d/%d", pPager, pgno, pPager->dbOrigSize, pPager->dbFileSize, maxPgno); pPager->dbOrigSize = maxPgno; pPage->isDirty = 0; - tdbTrace("pager/flush drop page: %p %d from dirty tree: %p", pPage, TDB_PAGE_PGNO(pPage), &pPager->rbt); + tdbTrace("pager/flush drop page: %p, pgno:%d, from dirty tree: %p", pPage, TDB_PAGE_PGNO(pPage), &pPager->rbt); tRBTreeDrop(&pPager->rbt, (SRBTreeNode *)pPage); tdbPCacheRelease(pPager->pCache, pPage, pTxn); @@ -830,7 +840,7 @@ static int tdbPagerPWritePageToDB(SPager *pPager, SPage *pPage) { return 0; } -static int tdbPagerRestore(SPager *pPager, SBTree *pBt, const char *jFileName) { +static int tdbPagerRestore(SPager *pPager, const char *jFileName) { int ret = 0; SPgno journalSize = 0; u8 *pageBuf = NULL; @@ -908,7 +918,7 @@ static int tdbPagerRestore(SPager *pPager, SBTree *pBt, const char *jFileName) { return 0; } -int tdbPagerRestoreJournals(SPager *pPager, SBTree *pBt) { +int tdbPagerRestoreJournals(SPager *pPager) { tdbDirEntryPtr pDirEntry; tdbDirPtr pDir = taosOpenDir(pPager->pEnv->dbName); if (pDir == NULL) { @@ -919,7 +929,7 @@ int tdbPagerRestoreJournals(SPager *pPager, SBTree *pBt) { while ((pDirEntry = tdbReadDir(pDir)) != NULL) { char *name = tdbDirEntryBaseName(tdbGetDirEntryName(pDirEntry)); if (strncmp(TDB_MAINDB_NAME "-journal", name, 16) == 0) { - if (tdbPagerRestore(pPager, pBt, name) < 0) { + if (tdbPagerRestore(pPager, name) < 0) { tdbCloseDir(&pDir); tdbError("failed to restore file due to %s. jFileName:%s", strerror(errno), name); diff --git a/source/libs/tdb/src/db/tdbTable.c b/source/libs/tdb/src/db/tdbTable.c index c5c2d6aebe..2950169979 100644 --- a/source/libs/tdb/src/db/tdbTable.c +++ b/source/libs/tdb/src/db/tdbTable.c @@ -107,6 +107,16 @@ int tdbTbOpen(const char *tbname, int keyLen, int valLen, tdb_cmpr_fn_t keyCmprF ASSERT(pPager != NULL); + if (rollback) { + tdbPagerRollback(pPager); + } else { + ret = tdbPagerRestoreJournals(pPager); + if (ret < 0) { + tdbOsFree(pTb); + return -1; + } + } + // pTb->pBt ret = tdbBtreeOpen(keyLen, valLen, pPager, tbname, pgno, keyCmprFn, pEnv, &(pTb->pBt)); if (ret < 0) { @@ -114,16 +124,6 @@ int tdbTbOpen(const char *tbname, int keyLen, int valLen, tdb_cmpr_fn_t keyCmprF return -1; } - if (rollback) { - tdbPagerRollback(pPager); - } else { - ret = tdbPagerRestoreJournals(pPager, pTb->pBt); - if (ret < 0) { - tdbOsFree(pTb); - return -1; - } - } - *ppTb = pTb; return 0; } diff --git a/source/libs/tdb/src/inc/tdbInt.h b/source/libs/tdb/src/inc/tdbInt.h index ab9c5995ec..45e01e83f3 100644 --- a/source/libs/tdb/src/inc/tdbInt.h +++ b/source/libs/tdb/src/inc/tdbInt.h @@ -197,7 +197,7 @@ int tdbPagerFetchPage(SPager *pPager, SPgno *ppgno, SPage **ppPage, int (*initP TXN *pTxn); void tdbPagerReturnPage(SPager *pPager, SPage *pPage, TXN *pTxn); int tdbPagerAllocPage(SPager *pPager, SPgno *ppgno); -int tdbPagerRestoreJournals(SPager *pPager, SBTree *pBt); +int tdbPagerRestoreJournals(SPager *pPager); int tdbPagerRollback(SPager *pPager); // tdbPCache.c ==================================== diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 6ad126162e..d144a76eb0 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -599,6 +599,10 @@ static int32_t allocConnRef(SCliConn* conn, bool update) { exh->pThrd = conn->hostThrd; exh->refId = transAddExHandle(transGetRefMgt(), exh); conn->refId = exh->refId; + + if (conn->refId == -1) { + taosMemoryFree(exh); + } return 0; } diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 5361ba356f..b703f434df 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -648,6 +648,9 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 -n 3 + +,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py -N 6 -M 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py -N 6 -M 3 @@ -658,6 +661,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertData.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 -n 3 + ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeDrop.py -N 5 @@ -1018,6 +1022,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-20582.py #develop test diff --git a/tests/pytest/util/cluster.py b/tests/pytest/util/cluster.py index 72b7e1fddf..2607cf63c2 100644 --- a/tests/pytest/util/cluster.py +++ b/tests/pytest/util/cluster.py @@ -53,7 +53,7 @@ class ConfigureyCluster: # configure dnoe of independent mnodes if num <= self.mnodeNums and self.mnodeNums != 0 and independentMnode == True : - dnode.addExtraCfg("supportVnodes", 0) + dnode.addExtraCfg("supportVnodes", 1024) # print(dnode) self.dnodes.append(dnode) return self.dnodes diff --git a/tests/script/tmp/data.sim b/tests/script/tmp/data.sim index cdabc97c09..e3bfe23c3d 100644 --- a/tests/script/tmp/data.sim +++ b/tests/script/tmp/data.sim @@ -3,6 +3,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 +system sh/deploy.sh -n dnode5 -i 5 +system sh/deploy.sh -n dnode6 -i 6 +system sh/deploy.sh -n dnode7 -i 7 system sh/cfg.sh -n dnode1 -c supportVnodes -v 0 system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start @@ -14,6 +17,9 @@ print =============== step1: create dnodes sql create dnode $hostname port 7200 sql create dnode $hostname port 7300 sql create dnode $hostname port 7400 +sql create dnode $hostname port 7500 +sql create dnode $hostname port 7600 +sql create dnode $hostname port 7700 $x = 0 step1: @@ -29,7 +35,7 @@ print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 print ===> $data30 $data31 $data32 $data33 $data24 $data35 -if $rows != 4 then +if $rows != 7 then return -1 endi if $data(1)[4] != ready then diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index cd4acae438..7220088369 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -68,6 +68,7 @@ class TDTestCase: my_file = Path(f"{packagePath}/{packageName}") if not my_file.exists(): print(f"{packageName} is not exists") + tdLog.info(f"cd {packagePath} && wget https://www.tdengine.com/assets-download/3.0/{packageName}") os.system(f"cd {packagePath} && wget https://www.tdengine.com/assets-download/3.0/{packageName}") else: print(f"{packageName} has been exists") diff --git a/tests/system-test/2-query/insert_null_none.py b/tests/system-test/2-query/insert_null_none.py new file mode 100755 index 0000000000..cf5636fb1f --- /dev/null +++ b/tests/system-test/2-query/insert_null_none.py @@ -0,0 +1,2579 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import random +import os +import time +import taos +import subprocess +from faker import Faker +from util.log import tdLog +from util.cases import tdCases +from util.sql import tdSql +from util.dnodes import tdDnodes +from util.dnodes import * + +class TDTestCase: + updatecfgDict = {'maxSQLLength':1048576,'debugFlag': 143 ,"querySmaOptimize":1} + + def init(self, conn, logSql, replicaVar): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + self.testcasePath = os.path.split(__file__)[0] + self.testcaseFilename = os.path.split(__file__)[-1] + os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) + + self.db = "insert_null_none" + + def dropandcreateDB_random(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + tdSql.execute('''drop database if exists %s ;''' %database) + tdSql.execute('''create database %s keep 36500 ;'''%(database)) + tdSql.execute('''use %s;'''%database) + + tdSql.execute('''create stable %s.stable_1 (ts timestamp , q_int int , q_bigint bigint , q_smallint smallint , q_tinyint tinyint , q_float float , q_double double , q_bool bool , q_binary binary(100) , q_nchar nchar(100) , q_ts timestamp , \ + q_int_null int , q_bigint_null bigint , q_smallint_null smallint , q_tinyint_null tinyint, q_float_null float , q_double_null double , q_bool_null bool , q_binary_null binary(20) , q_nchar_null nchar(20) , q_ts_null timestamp) \ + tags(loc nchar(100) , t_int int , t_bigint bigint , t_smallint smallint , t_tinyint tinyint, t_bool bool , t_binary binary(100) , t_nchar nchar(100) ,t_float float , t_double double , t_ts timestamp);'''%database) + tdSql.execute('''create stable %s.stable_2 (ts timestamp , q_int int , q_bigint bigint , q_smallint smallint , q_tinyint tinyint , q_float float , q_double double , q_bool bool , q_binary binary(100) , q_nchar nchar(100) , q_ts timestamp , \ + q_int_null int , q_bigint_null bigint , q_smallint_null smallint , q_tinyint_null tinyint, q_float_null float , q_double_null double , q_bool_null bool , q_binary_null binary(20) , q_nchar_null nchar(20) , q_ts_null timestamp) \ + tags(loc nchar(100) , t_int int , t_bigint bigint , t_smallint smallint , t_tinyint tinyint, t_bool bool , t_binary binary(100) , t_nchar nchar(100) ,t_float float , t_double double , t_ts timestamp);'''%database) + + for i in range(num_random): + tdSql.execute('''create table %s.table_%d \ + (ts timestamp , q_int int , q_bigint bigint , q_smallint smallint , q_tinyint tinyint , q_float float , q_double double , q_bool bool , q_binary binary(100) , q_nchar nchar(100) , q_ts timestamp ) ;'''%(database,i)) + tdSql.execute('''create table %s.stable_1_%d using %s.stable_1 tags('stable_1_%d', '%d' , '%d', '%d' , '%d' , 1 , 'binary1.%s' , 'nchar1.%s' , '%f', '%f' ,'%d') ;''' + %(database,i,database,i,fake.random_int(min=-2147483647, max=2147483647, step=1), fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pystr() ,fake.pystr() ,fake.pyfloat(),fake.pyfloat(),fake.random_int(min=-2147483647, max=2147483647, step=1))) + + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.query("select count(*) from %s.stable_1;" %database) + tdSql.checkData(0,0,num_random*n) + tdSql.query("select count(*) from %s.table_0;"%database) + tdSql.checkData(0,0,n) + + def qint_none(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_none_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_none_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qint_none_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qbigint_none(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), 'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), 'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_none_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), 'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_none_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qbigint_none_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qsmallint_none(self,database,n): + tdLog.info("qsmallint_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_null(self,database,n): + tdLog.info("qsmallint_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_none_null(self,database,n): + tdLog.info("qsmallint_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , 'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_none_value(self,database,n): + tdLog.info("qsmallint_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_null_value(self,database,n): + tdLog.info("qsmallint_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qsmallint_none_null_value(self,database,n): + tdLog.info("qsmallint_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , 'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + + def qtinyint_none(self,database,n): + tdLog.info("qtinyint_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_null(self,database,n): + tdLog.info("qtinyint_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_none_null(self,database,n): + tdLog.info("qtinyint_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_none_value(self,database,n): + tdLog.info("qtinyint_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_null_value(self,database,n): + tdLog.info("qtinyint_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qtinyint_none_null_value(self,database,n): + tdLog.info("qtinyint_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qfloat_none(self,database,n): + tdLog.info("qfloat_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_null(self,database,n): + tdLog.info("qfloat_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_none_null(self,database,n): + tdLog.info("qfloat_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_none_value(self,database,n): + tdLog.info("qfloat_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_null_value(self,database,n): + tdLog.info("qfloat_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qfloat_none_null_value(self,database,n): + tdLog.info("qfloat_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qdouble_none(self,database,n): + tdLog.info("qdouble_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_null(self,database,n): + tdLog.info("qdouble_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_none_null(self,database,n): + tdLog.info("qdouble_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL' , fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_none_value(self,database,n): + tdLog.info("qdouble_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_null_value(self,database,n): + tdLog.info("qdouble_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + + def qdouble_none_null_value(self,database,n): + tdLog.info("qdouble_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + + + + + def qbinary_none(self,database,n): + tdLog.info("qbinary_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + def qbinary_null(self,database,n): + tdLog.info("qbinary_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i )) + + def qbinary_none_null(self,database,n): + tdLog.info("qbinary_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i )) + + def qbinary_none_value(self,database,n): + tdLog.info("qbinary_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbinary_null_value(self,database,n): + tdLog.info("qbinary_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , ts + i )) + + + def qbinary_none_null_value(self,database,n): + tdLog.info("qbinary_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL' , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat(), 'NULL' , fake.pystr() , ts + i )) + + + + def qnchar_none(self,database,n): + tdLog.info("qnchar_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + def qnchar_null(self,database,n): + tdLog.info("qnchar_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL', ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL', ts + i )) + + def qnchar_none_null(self,database,n): + tdLog.info("qnchar_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() ,'NULL', ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() ,'NULL', ts + i )) + + def qnchar_none_value(self,database,n): + tdLog.info("qnchar_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary ,q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qnchar_null_value(self,database,n): + tdLog.info("qnchar_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL', ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,fake.pystr() ,'NULL', ts + i )) + + + def qnchar_none_null_value(self,database,n): + tdLog.info("qnchar_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary , q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %s , %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL' , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %s , %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat(), fake.pystr() , 'NULL' , ts + i )) + + def qts_none(self,database,n): + tdLog.info("qts_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + def qts_null(self,database,n): + tdLog.info("qts_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr(),fake.pystr() , 'NULL')) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr(),fake.pystr() , 'NULL' )) + + def qts_none_null(self,database,n): + tdLog.info("qts_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr(),'NULL')) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr(),'NULL' )) + + def qts_none_value(self,database,n): + tdLog.info("qts_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qts_null_value(self,database,n): + tdLog.info("qts_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s','nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() ,fake.pystr(), 'NULL')) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s','nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,fake.pystr() ,fake.pystr(),'NULL' )) + + + def qts_none_null_value(self,database,n): + tdLog.info("qts_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary , q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s' , %s) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() ,fake.pystr() , 'NULL' )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s' , %s) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat(), fake.pystr() ,fake.pystr() , 'NULL' )) + + + def qbool_none(self,database,n): + tdLog.info("qbool_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i )) + + def qbool_null(self,database,n): + tdLog.info("qbool_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def qbool_none_null(self,database,n): + tdLog.info("qbool_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def qbool_none_value(self,database,n): + tdLog.info("qbool_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d);''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbool_null_value(self,database,n): + tdLog.info("qbool_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + + def qbool_none_null_value(self,database,n): + tdLog.info("qbool_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d );''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(),fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d );''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def sqls(self,database): + sql = "select * from %s.stable_1 ;" %database + tdSql.query(sql) + sql = "select * from %s.table_1 ;" %database + tdSql.query(sql) + + sql1 = "select count(*) from %s.stable_1 ;" %database + tdSql.query(sql1) + sql1_value = tdSql.getData(0,0) + + sql2 = "select count(ts) from %s.stable_1 ;" %database + self.constant_check(sql1,sql2) + + sql3 = "select count(q_int) from %s.stable_1 ;" %database + self.constant_check(sql1,sql3) + + sql4 = "select count(q_bigint) from %s.stable_1 ;" %database + self.constant_check(sql1,sql4) + + sql5 = "select count(q_smallint) from %s.stable_1 ;" %database + self.constant_check(sql1,sql5) + + sql6 = "select count(q_tinyint) from %s.stable_1 ;" %database + self.constant_check(sql1,sql6) + + sql7 = "select count(q_float) from %s.stable_1 ;" %database + self.constant_check(sql1,sql7) + + sql8 = "select count(q_double) from %s.stable_1 ;" %database + self.constant_check(sql1,sql8) + + sql9 = "select count(q_bool) from %s.stable_1 ;" %database + self.constant_check(sql1,sql9) + + sql10 = "select count(q_binary) from %s.stable_1 ;" %database + self.constant_check(sql1,sql10) + + sql11 = "select count(q_nchar) from %s.stable_1 ;" %database + self.constant_check(sql1,sql11) + + sql12 = "select count(q_ts) from %s.stable_1 ;" %database + self.constant_check(sql1,sql12) + + def check_flushdb(self,database): + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qbigint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qsmallint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qtinyint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qfloat_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qdouble_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qts_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qbool_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + def constant_check(self,sql1,sql2): + tdLog.info("\n=============sql1:(%s)___sql2:(%s) ====================\n" %(sql1,sql2)) + tdSql.query(sql1) + sql1_value = tdSql.getData(0,0) + tdSql.query(sql2) + sql2_value = tdSql.getData(0,0) + self.value_check(sql1_value,sql2_value) + + def value_check(self,base_value,check_value): + if base_value==check_value: + tdLog.info(f"checkEqual success, base_value={base_value},check_value={check_value}") + elif base_value > check_value: + tdLog.info(f"checkEqual success,but count not include NULL, base_value=={base_value},check_value={check_value}") + else : + tdLog.exit(f"checkEqual error, base_value=={base_value},check_value={check_value}") + + def run(self): + + startTime = time.time() + + os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) + + self.dropandcreateDB_random("%s" %self.db, 10) + + self.check_flushdb("%s" %self.db) + + + # #taos -f sql + # startTime1 = time.time() + # print("taos -f sql start!") + # taos_cmd1 = "taos -f %s/%s.sql" % (self.testcasePath,self.testcaseFilename) + # _ = subprocess.check_output(taos_cmd1, shell=True) + # print("taos -f sql over!") + # endTime1 = time.time() + # print("total time %ds" % (endTime1 - startTime1)) + + endTime = time.time() + print("total time %ds" % (endTime - startTime)) + + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/system-test/2-query/interp.py b/tests/system-test/2-query/interp.py index ce57357abd..5077b70d72 100644 --- a/tests/system-test/2-query/interp.py +++ b/tests/system-test/2-query/interp.py @@ -362,12 +362,12 @@ class TDTestCase: tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:16', '2020-02-01 00:00:19') every(1s) fill(linear)") tdSql.checkRows(0) - tdLog.printNoPrefix("==========step8:test _irowts with interp") + tdLog.printNoPrefix("==========step8:test _irowts,_isfilled with interp") # fill null - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(null)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(null)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -379,9 +379,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(null)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(null)") tdSql.checkRows(13) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:04.000') tdSql.checkData(1, 0, '2020-02-01 00:00:05.000') @@ -397,9 +407,23 @@ class TDTestCase: tdSql.checkData(11, 0, '2020-02-01 00:00:15.000') tdSql.checkData(12, 0, '2020-02-01 00:00:16.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(null)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, False) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, False) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, True) + tdSql.checkData(11, 1, False) + tdSql.checkData(12, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(null)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -408,10 +432,16 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) # fill value - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(value, 1)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(value, 1)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -423,9 +453,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(value, 1)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(value, 1)") tdSql.checkRows(13) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:04.000') tdSql.checkData(1, 0, '2020-02-01 00:00:05.000') @@ -441,9 +481,23 @@ class TDTestCase: tdSql.checkData(11, 0, '2020-02-01 00:00:15.000') tdSql.checkData(12, 0, '2020-02-01 00:00:16.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(value, 1)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, False) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, False) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, True) + tdSql.checkData(11, 1, False) + tdSql.checkData(12, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(value, 1)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -452,10 +506,17 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + # fill prev - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(prev)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(prev)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -467,9 +528,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(prev)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(prev)") tdSql.checkRows(12) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:06.000') @@ -484,9 +555,22 @@ class TDTestCase: tdSql.checkData(10, 0, '2020-02-01 00:00:15.000') tdSql.checkData(11, 0, '2020-02-01 00:00:16.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(prev)") + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, False) + tdSql.checkData(11, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(prev)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -495,10 +579,16 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) # fill next - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(next)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(next)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -510,9 +600,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(next)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(next)") tdSql.checkRows(12) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:04.000') tdSql.checkData(1, 0, '2020-02-01 00:00:05.000') @@ -527,9 +627,22 @@ class TDTestCase: tdSql.checkData(10, 0, '2020-02-01 00:00:14.000') tdSql.checkData(11, 0, '2020-02-01 00:00:15.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(next)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, False) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, False) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, True) + tdSql.checkData(11, 1, False) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(next)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -538,10 +651,17 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + # fill linear - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(linear)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(linear)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -553,9 +673,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") tdSql.checkRows(11) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:06.000') @@ -569,9 +699,21 @@ class TDTestCase: tdSql.checkData(9, 0, '2020-02-01 00:00:14.000') tdSql.checkData(10, 0, '2020-02-01 00:00:15.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(linear)") + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, False) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(linear)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -580,28 +722,47 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') - # multiple _irowts - tdSql.query(f"select interp(c0),_irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") - tdSql.checkRows(11) - tdSql.checkCols(2) + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) - tdSql.checkData(0, 1, '2020-02-01 00:00:05.000') - tdSql.checkData(1, 1, '2020-02-01 00:00:06.000') - tdSql.checkData(2, 1, '2020-02-01 00:00:07.000') - tdSql.checkData(3, 1, '2020-02-01 00:00:08.000') - tdSql.checkData(4, 1, '2020-02-01 00:00:09.000') - tdSql.checkData(5, 1, '2020-02-01 00:00:10.000') - tdSql.checkData(6, 1, '2020-02-01 00:00:11.000') - tdSql.checkData(7, 1, '2020-02-01 00:00:12.000') - tdSql.checkData(8, 1, '2020-02-01 00:00:13.000') - tdSql.checkData(9, 1, '2020-02-01 00:00:14.000') + # multiple _irowts,_isfilled + tdSql.query(f"select interp(c0),_irowts,_isfilled from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") + tdSql.checkRows(11) + tdSql.checkCols(3) + + tdSql.checkData(0, 1, '2020-02-01 00:00:05.000') + tdSql.checkData(1, 1, '2020-02-01 00:00:06.000') + tdSql.checkData(2, 1, '2020-02-01 00:00:07.000') + tdSql.checkData(3, 1, '2020-02-01 00:00:08.000') + tdSql.checkData(4, 1, '2020-02-01 00:00:09.000') + tdSql.checkData(5, 1, '2020-02-01 00:00:10.000') + tdSql.checkData(6, 1, '2020-02-01 00:00:11.000') + tdSql.checkData(7, 1, '2020-02-01 00:00:12.000') + tdSql.checkData(8, 1, '2020-02-01 00:00:13.000') + tdSql.checkData(9, 1, '2020-02-01 00:00:14.000') tdSql.checkData(10, 1, '2020-02-01 00:00:15.000') - tdSql.query(f"select _irowts, interp(c0), interp(c0), _irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") - tdSql.checkRows(11) - tdSql.checkCols(4) + tdSql.checkData(0, 2, False) + tdSql.checkData(1, 2, True) + tdSql.checkData(2, 2, True) + tdSql.checkData(3, 2, True) + tdSql.checkData(4, 2, True) + tdSql.checkData(5, 2, False) + tdSql.checkData(6, 2, True) + tdSql.checkData(7, 2, True) + tdSql.checkData(8, 2, True) + tdSql.checkData(9, 2, True) + tdSql.checkData(10, 2, False) - cols = (0, 3) + tdSql.query(f"select _irowts, _isfilled, interp(c0), interp(c0), _isfilled, _irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") + tdSql.checkRows(11) + tdSql.checkCols(6) + + cols = (0, 5) for i in cols: tdSql.checkData(0, i, '2020-02-01 00:00:05.000') tdSql.checkData(1, i, '2020-02-01 00:00:06.000') @@ -615,6 +776,20 @@ class TDTestCase: tdSql.checkData(9, i, '2020-02-01 00:00:14.000') tdSql.checkData(10, i, '2020-02-01 00:00:15.000') + cols = (1, 4) + for i in cols: + tdSql.checkData(0, i, False) + tdSql.checkData(1, i, True) + tdSql.checkData(2, i, True) + tdSql.checkData(3, i, True) + tdSql.checkData(4, i, True) + tdSql.checkData(5, i, False) + tdSql.checkData(6, i, True) + tdSql.checkData(7, i, True) + tdSql.checkData(8, i, True) + tdSql.checkData(9, i, True) + tdSql.checkData(10, i, False) + tdLog.printNoPrefix("==========step9:test intra block interpolation") tdSql.execute(f"drop database {dbname}"); diff --git a/tests/system-test/2-query/leastsquares.py b/tests/system-test/2-query/leastsquares.py index 8ece4c46f0..1718802a82 100644 --- a/tests/system-test/2-query/leastsquares.py +++ b/tests/system-test/2-query/leastsquares.py @@ -19,12 +19,17 @@ BINARY_COL = "c8" NCHAR_COL = "c9" TS_COL = "c10" -NUM_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, ] +UINT_COL = "c11" +UBINT_COL = "c12" +USINT_COL = "c13" +UTINT_COL = "c14" + +NUM_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, UINT_COL, UBINT_COL, USINT_COL, UTINT_COL] CHAR_COL = [ BINARY_COL, NCHAR_COL, ] BOOLEAN_COL = [ BOOL_COL, ] TS_TYPE_COL = [ TS_COL, ] -ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_COL, BINARY_COL, NCHAR_COL, TS_COL ] +ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_COL, BINARY_COL, NCHAR_COL, TS_COL, UINT_COL, UBINT_COL, USINT_COL, UTINT_COL ] DBNAME = "db" class TDTestCase: @@ -208,6 +213,13 @@ class TDTestCase: tdLog.info(f"sql: {current_sqls[i]}") tdSql.query(current_sqls[i]) + def check_result(self): + for col in NUM_COL: + tdSql.query("select leastsquares(%s, 1, 9) from %s.stb1" % (col, DBNAME)) + tdSql.checkRows(1) + res = tdSql.getData(0, 0) + if res is None: + tdLog.exit("result is not correct") def __test_current(self): # tdSql.query("explain select c1 from {dbname}.ct1") @@ -236,6 +248,7 @@ class TDTestCase: def all_test(self): self.__test_error() self.__test_current() + self.check_result() def __create_tb(self, dbname=DBNAME): @@ -243,13 +256,15 @@ class TDTestCase: create_stb_sql = f'''create table {dbname}.stb1( ts timestamp, {INT_COL} int, {BINT_COL} bigint, {SINT_COL} smallint, {TINT_COL} tinyint, {FLOAT_COL} float, {DOUBLE_COL} double, {BOOL_COL} bool, - {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp + {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp, {UINT_COL} int unsigned, + {UBINT_COL} bigint unsigned, {USINT_COL} smallint unsigned, {UTINT_COL} tinyint unsigned ) tags (t1 int) ''' create_ntb_sql = f'''create table {dbname}.nt1( ts timestamp, {INT_COL} int, {BINT_COL} bigint, {SINT_COL} smallint, {TINT_COL} tinyint, {FLOAT_COL} float, {DOUBLE_COL} double, {BOOL_COL} bool, - {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp + {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp, {UINT_COL} int unsigned, + {UBINT_COL} bigint unsigned, {USINT_COL} smallint unsigned, {UTINT_COL} tinyint unsigned ) ''' tdSql.execute(create_stb_sql) @@ -262,49 +277,49 @@ class TDTestCase: now_time = int(datetime.datetime.timestamp(datetime.datetime.now()) * 1000) for i in range(rows): tdSql.execute( - f"insert into {dbname}.ct1 values ( { now_time - i * 1000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i } )" + f"insert into {dbname}.ct1 values ( { now_time - i * 1000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127} )" ) tdSql.execute( - f"insert into {dbname}.ct4 values ( { now_time - i * 7776000000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i } )" + f"insert into {dbname}.ct4 values ( { now_time - i * 7776000000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127} )" ) tdSql.execute( - f"insert into {dbname}.ct2 values ( { now_time - i * 7776000000 }, {-i}, {-11111 * i}, {-111 * i % 32767 }, {-11 * i % 127}, {-1.11*i}, {-1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i } )" + f"insert into {dbname}.ct2 values ( { now_time - i * 7776000000 }, {-i}, {-11111 * i}, {-111 * i % 32767 }, {-11 * i % 127}, {-1.11*i}, {-1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127} )" ) tdSql.execute( f'''insert into {dbname}.ct1 values - ( { now_time - rows * 5 }, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar_测试_0', { now_time + 8 } ) - ( { now_time + 10000 }, { rows }, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar_测试_9', { now_time + 9 } ) + ( { now_time - rows * 5 }, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar_测试_0', { now_time + 8 }, 0, 0, 0, 0) + ( { now_time + 10000 }, { rows }, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar_测试_9', { now_time + 9 }, 0, 0, 0, NULL ) ''' ) tdSql.execute( f'''insert into {dbname}.ct4 values - ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) ( { now_time + 5184000000}, {pow(2,31)-pow(2,15)}, {pow(2,63)-pow(2,30)}, 32767, 127, - { 3.3 * pow(10,38) }, { 1.3 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000} + { 3.3 * pow(10,38) }, { 1.3 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000}, NULL, NULL, NULL, NULL ) ( { now_time + 2592000000 }, {pow(2,31)-pow(2,16)}, {pow(2,63)-pow(2,31)}, 32766, 126, - { 3.2 * pow(10,38) }, { 1.2 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000} + { 3.2 * pow(10,38) }, { 1.2 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000}, NULL, NULL, NULL, NULL ) ''' ) tdSql.execute( f'''insert into {dbname}.ct2 values - ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) + ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) ( { now_time + 5184000000 }, { -1 * pow(2,31) + pow(2,15) }, { -1 * pow(2,63) + pow(2,30) }, -32766, -126, - { -1 * 3.2 * pow(10,38) }, { -1.2 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 } + { -1 * 3.2 * pow(10,38) }, { -1.2 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 }, NULL, NULL, NULL, NULL ) ( { now_time + 2592000000 }, { -1 * pow(2,31) + pow(2,16) }, { -1 * pow(2,63) + pow(2,31) }, -32767, -127, - { - 3.3 * pow(10,38) }, { -1.3 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 } + { - 3.3 * pow(10,38) }, { -1.3 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 }, NULL, NULL, NULL, NULL ) ''' ) @@ -312,22 +327,22 @@ class TDTestCase: for i in range(rows): insert_data = f'''insert into {dbname}.nt1 values ( { now_time - i * 3600000 }, {i}, {i * 11111}, { i % 32767 }, { i % 127}, { i * 1.11111 }, { i * 1000.1111 }, { i % 2}, - "binary_{i}", "nchar_测试_{i}", { now_time - 1000 * i } ) + "binary_{i}", "nchar_测试_{i}", { now_time - 1000 * i }, NULL, NULL, NULL, NULL ) ''' tdSql.execute(insert_data) tdSql.execute( f'''insert into {dbname}.nt1 values - ( { now_time + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - (( rows // 2 ) * 60 + 30) * 60000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - rows * 3600000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - (( rows // 2 ) * 60 + 30) * 60000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 3600000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) ( { now_time + 7200000 }, { pow(2,31) - pow(2,15) }, { pow(2,63) - pow(2,30) }, 32767, 127, { 3.3 * pow(10,38) }, { 1.3 * pow(10,308) }, { rows % 2 }, - "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 } + "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 }, NULL, NULL, NULL, NULL ) ( { now_time + 3600000 } , { pow(2,31) - pow(2,16) }, { pow(2,63) - pow(2,31) }, 32766, 126, { 3.2 * pow(10,38) }, { 1.2 * pow(10,308) }, { (rows-1) % 2 }, - "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 } + "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 }, NULL, NULL, NULL, NULL ) ''' ) diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py index 94e02b77b3..392b0d7764 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py @@ -161,6 +161,19 @@ class TDTestCase: stableName= '%s_%d'%(paraDict['stbName'],i) newTdSql=tdCom.newTdSql() threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + + for i in range(5): + clusterComCreate.createUser(newTdSql,f"user{i}",f"pass{i}") + userTdSql=tdCom.newTdSql(user=f"user{i}",password=f"pass{i}") + clusterComCreate.alterUser(userTdSql,f"user{i}",f"pass{i+1}") + clusterComCreate.deleteUser(newTdSql,f"user{i}") + for j in range(5): + i=100 + clusterComCreate.createUser(newTdSql,f"user{i}",f"pass{i}") + userTdSql=tdCom.newTdSql(user=f"user{i}",password=f"pass{i}") + clusterComCreate.alterUser(userTdSql,f"user{i}",f"pass{i+1}") + clusterComCreate.deleteUser(newTdSql,f"user{i}") + for tr in threads: tr.start() for tr in threads: diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py index d6d06446a1..66c2fdd14f 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py @@ -67,29 +67,11 @@ class TDTestCase: self._async_raise(thread.ident, SystemExit) - def insertData(self,countstart,countstop): - # fisrt add data : db\stable\childtable\general table - - for couti in range(countstart,countstop): - tdLog.debug("drop database if exists db%d" %couti) - tdSql.execute("drop database if exists db%d" %couti) - print("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("use db%d" %couti) - tdSql.execute( - '''create table stb1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - tags (t1 int) - ''' - ) - tdSql.execute( - ''' - create table t1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - ''' - ) - for i in range(4): - tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + def reCreateUser(self, tdsql, count, user, passwd): + clusterComCreate.createUser(tdsql,f"{user}{count}",f"{passwd}{count}") + userTdSql=tdCom.newTdSql(user=f"{user}{count}",password=f"{passwd}{count}") + clusterComCreate.alterUser(userTdSql,f"{user}{count}",f"{passwd}{count+1}") + clusterComCreate.deleteUser(tdsql,f"{user}{count}") def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): @@ -161,6 +143,8 @@ class TDTestCase: stableName= '%s_%d'%(paraDict['stbName'],i) newTdSql=tdCom.newTdSql() threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + threads.append(threading.Thread(target=self.reCreateUser,args=(newTdSql,i,"user","passwd"))) + for tr in threads: tr.start() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py index 881f383b8c..b55c689eee 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py @@ -147,6 +147,9 @@ class TDTestCase: # print(f"==================={dbNameIndex},{a11111}") threads.append(threading.Thread(target=clusterComCreate.createDeltedatabases, args=(newTdSql, dbNameIndex,repeatNumber,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']))) + redbNameIndex = '%s%d'%(paraDict["dbName"],i+100) + threads.append(threading.Thread(target=clusterComCreate.createDeltedatabases, args=(newTdSql, redbNameIndex,1,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']))) + for tr in threads: tr.start() @@ -199,7 +202,7 @@ class TDTestCase: def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=4,stopRole='dnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py index 265000bdc9..296e9daeca 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py @@ -97,7 +97,7 @@ class TDTestCase: 'dropFlag': 1, 'event': '', 'vgroups': 4, - 'replica': 1, + 'replica': 3, 'stbName': 'stb', 'stbNumbers': 2, 'colPrefix': 'c', @@ -105,9 +105,9 @@ class TDTestCase: 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], 'ctbPrefix': 'ctb', - 'ctbNum': 200, + 'ctbNum': 100, 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 - "rowsPerTbl": 10000, + "rowsPerTbl": 100000, "batchNum": 5000 } @@ -198,16 +198,16 @@ class TDTestCase: clusterComCheck.checkDbRows(dbNumbers) # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) - tdSql.execute("use %s" %(paraDict["dbName"])) - tdSql.query("show stables") + # tdSql.execute("use %s" %(paraDict["dbName"])) + tdSql.query("show %s.stables"%(paraDict["dbName"])) tdSql.checkRows(paraDict["stbNumbers"]) for i in range(paraDict['stbNumbers']): - stableName= '%s_%d'%(paraDict['stbName'],i) - tdSql.query("select * from %s"%stableName) - tdSql.checkRows(rowsPerStb) + stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + tdSql.query("select count(*) from %s"%stableName) + tdSql.checkData(0,0,rowsPerStb) def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=5,mnodeNums=3,restartNumbers=2,stopRole='dnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py new file mode 100644 index 0000000000..06d626b77c --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py @@ -0,0 +1,202 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +from numpy import row_stack +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db0_0', + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 3, + 'stbName': 'stb', + 'stbNumbers': 2, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 200, + 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 + "rowsPerTbl": 1000, + "batchNum": 5000 + } + + dnodeNumbers=int(dnodeNumbers) + mnodeNums=int(mnodeNums) + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allctbNumbers=(paraDict['stbNumbers']*paraDict["ctbNum"]) + rowsPerStb=paraDict["ctbNum"]*paraDict["rowsPerTbl"] + rowsall=rowsPerStb*paraDict['stbNumbers'] + dbNumbers = 1 + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + tdLog.info("Take turns stopping Mnodes ") + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + + # create stable:stb_0 + stableName= paraDict['stbName'] + newTdSql=tdCom.newTdSql() + clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers']) + #create child table:ctb_0 + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum']) + #insert date + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + for tr in threads: + tr.start() + for tr in threads: + tr.join() + + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + clusterComCheck.checkDbRows(dbNumbers) + if i == 0 : + stableName= '%s_%d'%(paraDict['stbName'],0) + newTdSql=tdCom.newTdSql() + clusterComCreate.alterStbMetaData(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"]) + # sleep(10) + tdDnodes[i].starttaosd() + + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("123") + else: + print("456") + + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + clusterComCheck.checkDnodes(dnodeNumbers) + clusterComCheck.checkDbRows(dbNumbers) + # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) + + # tdSql.execute("use %s" %(paraDict["dbName"])) + tdSql.query("show %s.stables"%(paraDict["dbName"])) + tdSql.checkRows(paraDict["stbNumbers"]) + for i in range(paraDict['stbNumbers']): + stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + tdSql.query("select count(*) from %s"%stableName) + if i == 0 : + tdSql.checkData(0,0,rowsPerStb*2) + else: + tdSql.checkData(0,0,rowsPerStb) + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py new file mode 100644 index 0000000000..9d99980b88 --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py @@ -0,0 +1,209 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + self.replicaVar=int(replicaVar) + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def insertData(self,countstart,countstop): + # fisrt add data : db\stable\childtable\general table + + for couti in range(countstart,countstop): + tdLog.debug("drop database if exists db%d" %couti) + tdSql.execute("drop database if exists db%d" %couti) + print("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("use db%d" %couti) + tdSql.execute( + '''create table stb1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + tags (t1 int) + ''' + ) + tdSql.execute( + ''' + create table t1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + ''' + ) + for i in range(4): + tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db', + 'dbNumbers': 4, + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 3, + 'stbName': 'stb', + 'stbNumbers': 100, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 1, + } + + dnodeNumbers=int(dnodeNumbers) + dbNumbers=paraDict['dbNumbers'] + mnodeNums=int(mnodeNums) + repeatNumber = 2 + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allDbNumbers=dbNumbers + allStbNumbers=(paraDict['stbNumbers']*restartNumbers) + paraDict['replica'] = self.replicaVar + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + for i in range(dbNumbers): + dbNameIndex = '%s%d'%(paraDict["dbName"],0) + newTdSql=tdCom.newTdSql() + # a11111=paraDict["dbNumbers"] + # print(f"==================={dbNameIndex},{a11111}") + clusterComCreate.createDeltedatabases(newTdSql, dbNameIndex,repeatNumber,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + + redbNameIndex = '%s%d'%(paraDict["dbName"],100) + clusterComCreate.createDeltedatabases(newTdSql, redbNameIndex,1,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + + + tdLog.info("Take turns stopping Mnodes ") + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("check dnodes status is ready") + else: + tdLog.info("check dnodes status is not ready") + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + tdLog.info("check dnode number:") + clusterComCheck.checkDnodes(dnodeNumbers) + tdSql.query("select * from information_schema.ins_databases") + tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) + + # tdLog.info("check DB Rows:") + # clusterComCheck.checkDbRows(allDbNumbers) + # tdLog.info("check DB Status on by on") + # for i in range(restartNumbers): + # clusterComCheck.checkDb(paraDict['dbNumbers'],restartNumbers,dbNameIndex = '%s%d'%(paraDict["dbName"],i)) + + + + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=2,stopRole='dnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py new file mode 100644 index 0000000000..3e4dc2483f --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py @@ -0,0 +1,207 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +from numpy import row_stack +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db0_0', + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 3, + 'stbName': 'stb', + 'stbNumbers': 2, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 200, + 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 + "rowsPerTbl": 1000, + "batchNum": 5000 + } + + dnodeNumbers=int(dnodeNumbers) + mnodeNums=int(mnodeNums) + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allctbNumbers=(paraDict['stbNumbers']*paraDict["ctbNum"]) + rowsPerStb=paraDict["ctbNum"]*paraDict["rowsPerTbl"] + rowsall=rowsPerStb*paraDict['stbNumbers'] + dbNumbers = 1 + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + tdLog.info("Take turns stopping Mnodes ") + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + + # create stable:stb_0 + stableName= paraDict['stbName'] + newTdSql=tdCom.newTdSql() + clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers']) + #create child table:ctb_0 + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum']) + #insert date + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + for tr in threads: + tr.start() + for tr in threads: + tr.join() + + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + if i == 0 : + stableName= '%s_%d'%(paraDict['stbName'],0) + newTdSql=tdCom.newTdSql() + clusterComCreate.alterStbMetaData(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"]) + elif i == 1 : + tdSql.execute("ALTER TABLE db0_0.stb_0_0 SET TAG t1r=10000;") + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + clusterComCheck.checkDbRows(dbNumbers) + + # sleep(10) + tdDnodes[i].starttaosd() + + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("123") + else: + print("456") + + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + clusterComCheck.checkDnodes(dnodeNumbers) + clusterComCheck.checkDbRows(dbNumbers) + # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) + + # tdSql.execute("use %s" %(paraDict["dbName"])) + tdSql.query("select t1r from db0_0.stb_0_0 limit 1;") + tdSql.checkData(0,0,10000) + tdSql.query("show %s.stables"%(paraDict["dbName"])) + tdSql.checkRows(paraDict["stbNumbers"]) + for i in range(paraDict['stbNumbers']): + stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + tdSql.query("select count(*) from %s"%stableName) + if i == 0 : + tdSql.checkData(0,0,rowsPerStb*2) + else: + tdSql.checkData(0,0,rowsPerStb) + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='mnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSepVnodeStopDnodeCreateUser.py b/tests/system-test/6-cluster/5dnode3mnodeSepVnodeStopDnodeCreateUser.py new file mode 100644 index 0000000000..94e02b77b3 --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSepVnodeStopDnodeCreateUser.py @@ -0,0 +1,224 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +from numpy import row_stack +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + self.replicaVar = int(replicaVar) + + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def insertData(self,countstart,countstop): + # fisrt add data : db\stable\childtable\general table + + for couti in range(countstart,countstop): + tdLog.debug("drop database if exists db%d" %couti) + tdSql.execute("drop database if exists db%d" %couti) + print("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("use db%d" %couti) + tdSql.execute( + '''create table stb1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + tags (t1 int) + ''' + ) + tdSql.execute( + ''' + create table t1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + ''' + ) + for i in range(4): + tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db0_0', + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 1, + 'stbName': 'stb', + 'stbNumbers': 2, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 200, + 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 + "rowsPerTbl": 100, + "batchNum": 5000 + } + + dnodeNumbers=int(dnodeNumbers) + mnodeNums=int(mnodeNums) + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allctbNumbers=(paraDict['stbNumbers']*paraDict["ctbNum"]) + rowsPerStb=paraDict["ctbNum"]*paraDict["rowsPerTbl"] + rowsall=rowsPerStb*paraDict['stbNumbers'] + dbNumbers = 1 + paraDict['replica'] = self.replicaVar + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + tdLog.info("Take turns stopping Mnodes ") + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + + # create stable:stb_0 + stableName= paraDict['stbName'] + newTdSql=tdCom.newTdSql() + clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers']) + #create child table:ctb_0 + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum']) + #insert data + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + for tr in threads: + tr.start() + for tr in threads: + tr.join() + + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("dnode is ready") + else: + print("dnodes is not ready") + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + clusterComCheck.checkDnodes(dnodeNumbers) + clusterComCheck.checkDbRows(dbNumbers) + # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) + + newTdSql=tdCom.newTdSql() + newTdSql.execute("reset query cache") + newTdSql.execute("use %s" %(paraDict["dbName"])) + newTdSql.query("show %s.stables"%(paraDict["dbName"])) + newTdSql.checkRows(paraDict["stbNumbers"]) + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql.query("select * from %s"%stableName) + newTdSql.checkRows(rowsPerStb) + + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=2,stopRole='dnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py deleted file mode 100644 index a34895ff42..0000000000 --- a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py +++ /dev/null @@ -1,324 +0,0 @@ -from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE -import taos -import sys -import time -import os - -from util.log import * -from util.sql import * -from util.cases import * -from util.dnodes import TDDnodes -from util.dnodes import TDDnode -from util.cluster import * -from util.common import * -sys.path.append("./7-tmq") -from tmqCommon import * - -import time -import socket -import subprocess -from multiprocessing import Process -import threading -import time -import inspect -import ctypes - -class TDTestCase: - - def init(self, conn, logSql, replicaVar=1): - tdLog.debug(f"start to excute {__file__}") - # tdSql.init(conn.cursor()) - # self.host = socket.gethostname() - - def getBuildPath(self): - selfPath = os.path.dirname(os.path.realpath(__file__)) - - if ("community" in selfPath): - projPath = selfPath[:selfPath.find("community")] - else: - projPath = selfPath[:selfPath.find("tests")] - - for root, dirs, files in os.walk(projPath): - if ("taosd" in files): - rootRealPath = os.path.dirname(os.path.realpath(root)) - if ("packaging" not in rootRealPath): - buildPath = root[:len(root) - len("/build/bin")] - break - return buildPath - - def _async_raise(self, tid, exctype): - """raises the exception, performs cleanup if needed""" - if not inspect.isclass(exctype): - exctype = type(exctype) - res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) - if res == 0: - raise ValueError("invalid thread id") - elif res != 1: - # """if it returns a number greater than one, you're in trouble, - # and you should call it again with exc=NULL to revert the effect""" - ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) - raise SystemError("PyThreadState_SetAsyncExc failed") - - def stop_thread(self,thread): - self._async_raise(thread.ident, SystemExit) - - - def insert_data(self,countstart,countstop): - # fisrt add data : db\stable\childtable\general table - - for couti in range(countstart,countstop): - tdLog.debug("drop database if exists db%d" %couti) - tdSql.execute("drop database if exists db%d" %couti) - print("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("use db%d" %couti) - tdSql.execute( - '''create table stb1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - tags (t1 int) - ''' - ) - tdSql.execute( - ''' - create table t1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - ''' - ) - for i in range(4): - tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') - - def checkData(self,dbname,stbname,stableCount,CtableCount,rowsPerSTable,): - tdSql.execute("use %s"%dbname) - tdSql.query("show stables") - tdSql.checkRows(stableCount) - tdSql.query("show tables") - tdSql.checkRows(CtableCount) - for i in range(stableCount): - tdSql.query("select count(*) from %s%d"%(stbname,i)) - tdSql.checkData(0,0,rowsPerSTable) - return - - def checkdnodes(self,dnodenumber): - count=0 - while count < 100: - time.sleep(1) - statusReadyBumber=0 - tdSql.query("select * from information_schema.ins_dnodes;") - if tdSql.checkRows(dnodenumber) : - print("dnode is %d nodes"%dnodenumber) - for i in range(dnodenumber): - if tdSql.queryResult[i][4] !='ready' : - status=tdSql.queryResult[i][4] - print("dnode:%d status is %s "%(i,status)) - break - else: - statusReadyBumber+=1 - print(statusReadyBumber) - if statusReadyBumber == dnodenumber : - print("all of %d mnodes is ready in 10s "%dnodenumber) - return True - break - count+=1 - else: - print("%d mnodes is not ready in 10s "%dnodenumber) - return False - - - def check3mnode(self): - count=0 - while count < 10: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='leader' : - if tdSql.queryResult[1][2]=='follower': - if tdSql.queryResult[2][2]=='follower': - print("three mnodes is ready in 10s") - break - elif tdSql.queryResult[0][2]=='follower' : - if tdSql.queryResult[1][2]=='leader': - if tdSql.queryResult[2][2]=='follower': - print("three mnodes is ready in 10s") - break - elif tdSql.queryResult[0][2]=='follower' : - if tdSql.queryResult[1][2]=='follower': - if tdSql.queryResult[2][2]=='leader': - print("three mnodes is ready in 10s") - break - count+=1 - else: - print("three mnodes is not ready in 10s ") - return -1 - - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,3,'ready') - - def check3mnode1off(self): - count=0 - while count < 10: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='offline' : - if tdSql.queryResult[1][2]=='leader': - if tdSql.queryResult[2][2]=='follower': - print("stop mnodes on dnode 2 successfully in 10s") - break - elif tdSql.queryResult[1][2]=='follower': - if tdSql.queryResult[2][2]=='leader': - print("stop mnodes on dnode 2 successfully in 10s") - break - count+=1 - else: - print("stop mnodes on dnode 2 failed in 10s ") - return -1 - tdSql.error("drop mnode on dnode 1;") - - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'offline') - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,3,'ready') - - def check3mnode2off(self): - count=0 - while count < 40: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='leader' : - if tdSql.queryResult[1][2]=='offline': - if tdSql.queryResult[2][2]=='follower': - print("stop mnodes on dnode 2 successfully in 10s") - break - count+=1 - else: - print("stop mnodes on dnode 2 failed in 10s ") - return -1 - tdSql.error("drop mnode on dnode 2;") - - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'leader') - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,2,'offline') - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,2,'follower') - tdSql.checkData(2,3,'ready') - - def check3mnode3off(self): - count=0 - while count < 10: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='leader' : - if tdSql.queryResult[2][2]=='offline': - if tdSql.queryResult[1][2]=='follower': - print("stop mnodes on dnode 3 successfully in 10s") - break - count+=1 - else: - print("stop mnodes on dnode 3 failed in 10s") - return -1 - tdSql.error("drop mnode on dnode 3;") - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'leader') - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,2,'follower') - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,2,'offline') - tdSql.checkData(2,3,'ready') - - - def check5dnode(self): - tdSql.query("select * from information_schema.ins_dnodes;") - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(4,1,'%s:6430'%self.host) - tdSql.checkData(0,4,'ready') - tdSql.checkData(4,4,'ready') - - def five_dnode_three_mnode(self,dnodenumber): - tdSql.query("select * from information_schema.ins_dnodes;") - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(4,1,'%s:6430'%self.host) - tdSql.checkData(0,4,'ready') - tdSql.checkData(4,4,'ready') - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(1) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'leader') - tdSql.checkData(0,3,'ready') - - # fisr add three mnodes; - tdSql.execute("create mnode on dnode 2") - tdSql.execute("create mnode on dnode 3") - - # fisrt check statut ready - self.check3mnode() - - tdSql.error("create mnode on dnode 2") - tdSql.query("select * from information_schema.ins_dnodes;") - print(tdSql.queryResult) - tdLog.debug("stop all of mnode ") - - # seperate vnode and mnode in different dnodes. - # create database and stable - stopcount =0 - while stopcount < 2: - for i in range(dnodenumber): - # threads=[] - # threads = MyThreadFunc(self.insert_data(i*2,i*2+2)) - threads=threading.Thread(target=self.insert_data, args=(i,i+1)) - threads.start() - self.TDDnodes.stoptaosd(i+1) - self.TDDnodes.starttaosd(i+1) - - if self.checkdnodes(5): - print("123") - threads.join() - else: - print("456") - threads.join() - self.stop_thread(threads) - assert 1 == 2 ,"some dnode started failed" - return False - # self.check3mnode() - self.check3mnode() - - - stopcount+=1 - self.check3mnode() - - - def run(self): - # print(self.master_dnode.cfgDict) - self.five_dnode_three_mnode(5) - - def stop(self): - tdSql.close() - tdLog.success(f"{__file__} successfully executed") - -tdCases.addLinux(__file__, TDTestCase()) -tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/clusterCommonCheck.py b/tests/system-test/6-cluster/clusterCommonCheck.py index 7cbe9d9680..2a50e1ee31 100644 --- a/tests/system-test/6-cluster/clusterCommonCheck.py +++ b/tests/system-test/6-cluster/clusterCommonCheck.py @@ -64,7 +64,7 @@ class ClusterComCheck: dbNumbers=int(dbNumbers) count=0 while count < 5: - tdSql.query("select * from information_schema.ins_databases;") + tdSql.query("select * from information_schema.ins_databases where name!='collectd' ;") count+=1 if tdSql.checkRows(dbNumbers+2): tdLog.success("we find %d databases and expect %d in clusters! " %(tdSql.queryRows,dbNumbers+2)) diff --git a/tests/system-test/6-cluster/clusterCommonCreate.py b/tests/system-test/6-cluster/clusterCommonCreate.py index 236708cf07..6e699e2396 100644 --- a/tests/system-test/6-cluster/clusterCommonCreate.py +++ b/tests/system-test/6-cluster/clusterCommonCreate.py @@ -137,12 +137,24 @@ class ClusterComCreate: # for i in range(dbNumbers): for i in range(dbNumbers): if dropFlag == 1: - tsql.execute("drop database if exists %s_%d"%(dbNameIndex,1)) - tdLog.debug("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,1, vgroups, replica)) - tsql.execute("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,1, vgroups, replica)) - tdLog.debug("complete to create database %s_%d"%(dbNameIndex,1)) + tsql.execute("drop database if exists %s_%d"%(dbNameIndex,i)) + tdLog.debug("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,i, vgroups, replica)) + tsql.execute("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,i, vgroups, replica)) + tdLog.debug("complete to create database %s_%d"%(dbNameIndex,i)) + def createUser(self,tsql,user,password): + tdLog.info(f"create new user f{user}") + tsql.execute(f"CREATE USER {user} PASS '{password}';") + def alterUser(self,tsql,user,password): + tdLog.info(f"alter user {user} pass '{password}'") + tsql.execute(f"alter USER {user} pass '{password}' ;") + + def deleteUser(self,tsql,user): + tdLog.info(f"drop user f{user}") + tsql.execute(f"DROP USER {user} ;") + + def create_stable(self,tsql, dbName,stbName): tsql.execute("create table if not exists %s.%s (ts timestamp, c1 int, c2 int, c3 binary(16)) tags(t1 int, t2 binary(32))"%(dbName, stbName)) tdLog.debug("complete to create %s.%s" %(dbName, stbName)) @@ -202,6 +214,52 @@ class ClusterComCreate: tdLog.debug("insert data ............ [OK]") return + def alterStbMetaData(self,tsql,dbName,stbName,ctbNum,rowsPerTbl,batchNum,startTs=None): + tdLog.debug("alter Stb column ............") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} MODIFY COLUMN c3 binary(20);") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} MODIFY COLUMN c3 binary(20);") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} ADD COLUMN c4 DOUBLE;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} ADD COLUMN c4 DOUBLE;") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} DROP COLUMN c2;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} DROP COLUMN c2;") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} RENAME TAG t1 t1r;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} RENAME TAG t1 t1r;") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} DROP TAG t2;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} DROP TAG t2;") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} ADD TAG t2 binary(32) ;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} ADD TAG t2 binary(32);") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} MODIFY TAG t2 binary(34) ;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} MODIFY TAG t2 binary(34);") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} ADD TAG t3 double ;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} ADD TAG t3 double;") + tsql.error(f" ALTER STABLE {dbName}.{stbName} ADD TAG t2 double;") + + tdLog.debug("start to insert data ............") + # tsql.execute("use %s" %dbName) + pre_insert = "insert into " + sql = pre_insert + + if startTs is None: + t = time.time() + startTs = int(round(t * 1000)) + #tdLog.debug("doing insert data into stable:%s rows:%d ..."%(stbName, allRows)) + for i in range(ctbNum): + sql += " %s.%s_%d values "%(dbName,stbName,i) + for j in range(rowsPerTbl): + sql += "(%d, %d,'mnode_%d', %d ) "%(startTs + j, j, j,j) + if (j > 0) and ((j%batchNum == 0) or (j == rowsPerTbl - 1)): + tsql.execute(sql) + if j < rowsPerTbl - 1: + sql = "insert into %s.%s_%d values " %(dbName,stbName,i) + else: + sql = "insert into " + #end sql + if sql != pre_insert: + #print("insert sql:%s"%sql) + tsql.execute(sql) + tdLog.debug("insert data ............ [OK]") + return + def insert_data_1(self,tsql,dbName,ctbPrefix,ctbNum,rowsPerTbl,batchNum,startTs): tdLog.debug("start to insert data ............") tsql.execute("use %s" %dbName) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 01c8042c0e..b391d59725 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -969,38 +969,43 @@ bool matchVarWord(SWord* word1, SWord* word2) { // ------------------- match words -------------------------- // -// compare command cmd1 come from shellCommands , cmd2 come from user input -int32_t compareCommand(SWords* cmd1, SWords* cmd2) { - SWord* word1 = cmd1->head; - SWord* word2 = cmd2->head; +// compare command cmdPattern come from shellCommands , cmdInput come from user input +int32_t compareCommand(SWords* cmdPattern, SWords* cmdInput) { + SWord* wordPattern = cmdPattern->head; + SWord* wordInput = cmdInput->head; - if (word1 == NULL || word2 == NULL) { + if (wordPattern == NULL || wordInput == NULL) { return -1; } - for (int32_t i = 0; i < cmd1->count; i++) { - if (word1->type == WT_TEXT) { + for (int32_t i = 0; i < cmdPattern->count; i++) { + if (wordPattern->type == WT_TEXT) { // WT_TEXT match - if (word1->len == word2->len) { - if (strncasecmp(word1->word, word2->word, word1->len) != 0) return -1; - } else if (word1->len < word2->len) { + if (wordPattern->len == wordInput->len) { + if (strncasecmp(wordPattern->word, wordInput->word, wordPattern->len) != 0) return -1; + } else if (wordPattern->len < wordInput->len) { return -1; } else { - // word1->len > word2->len - if (strncasecmp(word1->word, word2->word, word2->len) == 0) { - cmd1->matchIndex = i; - cmd1->matchLen = word2->len; - return i; + // wordPattern->len > wordInput->len + if (strncasecmp(wordPattern->word, wordInput->word, wordInput->len) == 0) { + if (i + 1 == cmdInput->count) { + // last word return match + cmdPattern->matchIndex = i; + cmdPattern->matchLen = wordInput->len; + return i; + } else { + return -1; + } } else { return -1; } } } else { // WT_VAR auto match any one word - if (word2->next == NULL) { // input words last one - if (matchVarWord(word1, word2)) { - cmd1->matchIndex = i; - cmd1->matchLen = word2->len; + if (wordInput->next == NULL) { // input words last one + if (matchVarWord(wordPattern, wordInput)) { + cmdPattern->matchIndex = i; + cmdPattern->matchLen = wordInput->len; varMode = true; return i; } @@ -1009,9 +1014,9 @@ int32_t compareCommand(SWords* cmd1, SWords* cmd2) { } // move next - word1 = word1->next; - word2 = word2->next; - if (word1 == NULL || word2 == NULL) { + wordPattern = wordPattern->next; + wordInput = wordInput->next; + if (wordPattern == NULL || wordInput == NULL) { return -1; } }