diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index b2d44f1a1d..68ac0b0bb5 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -873,9 +873,9 @@ INTERP(expr) - `INTERP` is used to get the value that matches the specified time slice from a column. If no such value exists an interpolation value will be returned based on `FILL` parameter. - The input data of `INTERP` is the value of the specified column and a `where` clause can be used to filter the original data. If no `where` condition is specified then all original data is the input. - `INTERP` must be used along with `RANGE`, `EVERY`, `FILL` keywords. -- The output time range of `INTERP` is specified by `RANGE(timestamp1,timestamp2)` parameter, with timestamp1<=timestamp2. timestamp1 is the starting point of the output time range and must be specified. timestamp2 is the ending point of the output time range and must be specified. -- 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. +- The output time range of `INTERP` is specified by `RANGE(timestamp1,timestamp2)` parameter, with timestamp1 < timestamp2. timestamp1 is the starting point of the output time range and must be specified. timestamp2 is the ending point of the output time range and must be specified. +- The number of rows in the result set of `INTERP` is determined by the parameter `EVERY(time_unit)`. Starting from timestamp1, one interpolation is performed for every time interval specified `time_unit` parameter. The parameter `time_unit` must be an integer, with no quotes, with a time unit of: 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. For more information about FILL clause, see [FILL Clause](./distinguished/#fill-clause). - `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. - 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.3). diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md index 81fdb46f25..669d037705 100644 --- a/docs/zh/12-taos-sql/10-function.md +++ b/docs/zh/12-taos-sql/10-function.md @@ -875,9 +875,9 @@ INTERP(expr) - INTERP 用于在指定时间断面获取指定列的记录值,如果该时间断面不存在符合条件的行数据,那么会根据 FILL 参数的设定进行插值。 - INTERP 的输入数据为指定列的数据,可以通过条件语句(where 子句)来对原始列数据进行过滤,如果没有指定过滤条件则输入为全部数据。 - INTERP 需要同时与 RANGE,EVERY 和 FILL 关键字一起使用。 -- INTERP 的输出时间范围根据 RANGE(timestamp1,timestamp2)字段来指定,需满足 timestamp1<=timestamp2。其中 timestamp1(必选值)为输出时间范围的起始值,即如果 timestamp1 时刻符合插值条件则 timestamp1 为输出的第一条记录,timestamp2(必选值)为输出时间范围的结束值,即输出的最后一条记录的 timestamp 不能大于 timestamp2。 -- INTERP 根据 EVERY 字段来确定输出时间范围内的结果条数,即从 timestamp1 开始每隔固定长度的时间(EVERY 值)进行插值。 -- INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。 +- INTERP 的输出时间范围根据 RANGE(timestamp1,timestamp2)字段来指定,需满足 timestamp1 < timestamp2。其中 timestamp1(必选值)为输出时间范围的起始值,即如果 timestamp1 时刻符合插值条件则 timestamp1 为输出的第一条记录,timestamp2(必选值)为输出时间范围的结束值,即输出的最后一条记录的 timestamp 不能大于 timestamp2。 +- INTERP 根据 EVERY(time_unit) 字段来确定输出时间范围内的结果条数,即从 timestamp1 开始每隔固定长度的时间(time_unit 值)进行插值,time_unit 可取值时间单位:1a(毫秒),1s(秒),1m(分),1h(小时),1d(天),1w(周)。例如 EVERY(500a) 将对于指定数据每500毫秒间隔进行一次插值. +- INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。关于 FILL 子句如何使用请参考 [FILL 子句](./distinguished/#fill-子句) - INTERP 只能在一个时间序列内进行插值,因此当作用于超级表时必须跟 partition by tbname 一起使用。 - INTERP 可以与伪列 _irowts 一起使用,返回插值点所对应的时间戳(3.0.1.4版本以后支持)。 - INTERP 可以与伪列 _isfilled 一起使用,显示返回结果是否为原始记录或插值算法产生的数据(3.0.2.3版本以后支持)。 diff --git a/include/common/tmsg.h b/include/common/tmsg.h index c0e8cbae49..7067ea0336 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -58,7 +58,7 @@ extern int32_t tMsgDict[]; #define TMSG_INFO(TYPE) \ ((TYPE) < TDMT_DND_MAX_MSG || (TYPE) < TDMT_MND_MAX_MSG || (TYPE) < TDMT_VND_MAX_MSG || (TYPE) < TDMT_SCH_MAX_MSG || \ (TYPE) < TDMT_STREAM_MAX_MSG || (TYPE) < TDMT_MON_MAX_MSG || (TYPE) < TDMT_SYNC_MAX_MSG) || \ - (TYPE) < TDMT_VND_STREAM_MSG || (TYPE) < TDMT_VND_TMQ_MSG \ + (TYPE) < TDMT_VND_STREAM_MSG || (TYPE) < TDMT_VND_TMQ_MSG || (TYPE) < TDMT_VND_TMQ_MAX_MSG \ ? tMsgInfo[tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE)] \ : 0 @@ -145,12 +145,14 @@ typedef enum _mgmt_table { #define TSDB_ALTER_TABLE_UPDATE_OPTIONS 9 #define TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME 10 -#define TSDB_FILL_NONE 0 -#define TSDB_FILL_NULL 1 -#define TSDB_FILL_SET_VALUE 2 -#define TSDB_FILL_LINEAR 3 -#define TSDB_FILL_PREV 4 -#define TSDB_FILL_NEXT 5 +#define TSDB_FILL_NONE 0 +#define TSDB_FILL_NULL 1 +#define TSDB_FILL_NULL_F 2 +#define TSDB_FILL_SET_VALUE 3 +#define TSDB_FILL_SET_VALUE_F 4 +#define TSDB_FILL_LINEAR 5 +#define TSDB_FILL_PREV 6 +#define TSDB_FILL_NEXT 7 #define TSDB_ALTER_USER_PASSWD 0x1 #define TSDB_ALTER_USER_SUPERUSER 0x2 diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 597371d9d1..25d52d4269 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -16,331 +16,333 @@ #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_ALIVE 160 -#define TK_LIKE 161 -#define TK_TBNAME 162 -#define TK_QTAGS 163 -#define TK_AS 164 -#define TK_INDEX 165 -#define TK_FUNCTION 166 -#define TK_INTERVAL 167 -#define TK_COUNT 168 -#define TK_LAST_ROW 169 -#define TK_TOPIC 170 -#define TK_WITH 171 -#define TK_META 172 -#define TK_CONSUMER 173 -#define TK_GROUP 174 -#define TK_DESC 175 -#define TK_DESCRIBE 176 -#define TK_RESET 177 -#define TK_QUERY 178 -#define TK_CACHE 179 -#define TK_EXPLAIN 180 -#define TK_ANALYZE 181 -#define TK_VERBOSE 182 -#define TK_NK_BOOL 183 -#define TK_RATIO 184 -#define TK_NK_FLOAT 185 -#define TK_OUTPUTTYPE 186 -#define TK_AGGREGATE 187 -#define TK_BUFSIZE 188 -#define TK_STREAM 189 -#define TK_INTO 190 -#define TK_TRIGGER 191 -#define TK_AT_ONCE 192 -#define TK_WINDOW_CLOSE 193 -#define TK_IGNORE 194 -#define TK_EXPIRED 195 -#define TK_FILL_HISTORY 196 -#define TK_SUBTABLE 197 -#define TK_KILL 198 -#define TK_CONNECTION 199 -#define TK_TRANSACTION 200 -#define TK_BALANCE 201 -#define TK_VGROUP 202 -#define TK_MERGE 203 -#define TK_REDISTRIBUTE 204 -#define TK_SPLIT 205 -#define TK_DELETE 206 -#define TK_INSERT 207 -#define TK_NULL 208 -#define TK_NK_QUESTION 209 -#define TK_NK_ARROW 210 -#define TK_ROWTS 211 -#define TK_QSTART 212 -#define TK_QEND 213 -#define TK_QDURATION 214 -#define TK_WSTART 215 -#define TK_WEND 216 -#define TK_WDURATION 217 -#define TK_IROWTS 218 -#define TK_ISFILLED 219 -#define TK_CAST 220 -#define TK_NOW 221 -#define TK_TODAY 222 -#define TK_TIMEZONE 223 -#define TK_CLIENT_VERSION 224 -#define TK_SERVER_VERSION 225 -#define TK_SERVER_STATUS 226 -#define TK_CURRENT_USER 227 -#define TK_CASE 228 -#define TK_END 229 -#define TK_WHEN 230 -#define TK_THEN 231 -#define TK_ELSE 232 -#define TK_BETWEEN 233 -#define TK_IS 234 -#define TK_NK_LT 235 -#define TK_NK_GT 236 -#define TK_NK_LE 237 -#define TK_NK_GE 238 -#define TK_NK_NE 239 -#define TK_MATCH 240 -#define TK_NMATCH 241 -#define TK_CONTAINS 242 -#define TK_IN 243 -#define TK_JOIN 244 -#define TK_INNER 245 -#define TK_SELECT 246 -#define TK_DISTINCT 247 -#define TK_WHERE 248 -#define TK_PARTITION 249 -#define TK_BY 250 -#define TK_SESSION 251 -#define TK_STATE_WINDOW 252 -#define TK_EVENT_WINDOW 253 -#define TK_START 254 -#define TK_SLIDING 255 -#define TK_FILL 256 -#define TK_VALUE 257 -#define TK_NONE 258 -#define TK_PREV 259 -#define TK_LINEAR 260 -#define TK_NEXT 261 -#define TK_HAVING 262 -#define TK_RANGE 263 -#define TK_EVERY 264 -#define TK_ORDER 265 -#define TK_SLIMIT 266 -#define TK_SOFFSET 267 -#define TK_LIMIT 268 -#define TK_OFFSET 269 -#define TK_ASC 270 -#define TK_NULLS 271 -#define TK_ABORT 272 -#define TK_AFTER 273 -#define TK_ATTACH 274 -#define TK_BEFORE 275 -#define TK_BEGIN 276 -#define TK_BITAND 277 -#define TK_BITNOT 278 -#define TK_BITOR 279 -#define TK_BLOCKS 280 -#define TK_CHANGE 281 -#define TK_COMMA 282 -#define TK_COMPACT 283 -#define TK_CONCAT 284 -#define TK_CONFLICT 285 -#define TK_COPY 286 -#define TK_DEFERRED 287 -#define TK_DELIMITERS 288 -#define TK_DETACH 289 -#define TK_DIVIDE 290 -#define TK_DOT 291 -#define TK_EACH 292 -#define TK_FAIL 293 -#define TK_FILE 294 -#define TK_FOR 295 -#define TK_GLOB 296 -#define TK_ID 297 -#define TK_IMMEDIATE 298 -#define TK_IMPORT 299 -#define TK_INITIALLY 300 -#define TK_INSTEAD 301 -#define TK_ISNULL 302 -#define TK_KEY 303 -#define TK_MODULES 304 -#define TK_NK_BITNOT 305 -#define TK_NK_SEMI 306 -#define TK_NOTNULL 307 -#define TK_OF 308 -#define TK_PLUS 309 -#define TK_PRIVILEGE 310 -#define TK_RAISE 311 -#define TK_REPLACE 312 -#define TK_RESTRICT 313 -#define TK_ROW 314 -#define TK_SEMI 315 -#define TK_STAR 316 -#define TK_STATEMENT 317 -#define TK_STRICT 318 -#define TK_STRING 319 -#define TK_TIMES 320 -#define TK_UPDATE 321 -#define TK_VALUES 322 -#define TK_VARIABLE 323 -#define TK_VIEW 324 -#define TK_WAL 325 +#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_ALIVE 160 +#define TK_LIKE 161 +#define TK_TBNAME 162 +#define TK_QTAGS 163 +#define TK_AS 164 +#define TK_INDEX 165 +#define TK_FUNCTION 166 +#define TK_INTERVAL 167 +#define TK_COUNT 168 +#define TK_LAST_ROW 169 +#define TK_TOPIC 170 +#define TK_WITH 171 +#define TK_META 172 +#define TK_CONSUMER 173 +#define TK_GROUP 174 +#define TK_DESC 175 +#define TK_DESCRIBE 176 +#define TK_RESET 177 +#define TK_QUERY 178 +#define TK_CACHE 179 +#define TK_EXPLAIN 180 +#define TK_ANALYZE 181 +#define TK_VERBOSE 182 +#define TK_NK_BOOL 183 +#define TK_RATIO 184 +#define TK_NK_FLOAT 185 +#define TK_OUTPUTTYPE 186 +#define TK_AGGREGATE 187 +#define TK_BUFSIZE 188 +#define TK_STREAM 189 +#define TK_INTO 190 +#define TK_TRIGGER 191 +#define TK_AT_ONCE 192 +#define TK_WINDOW_CLOSE 193 +#define TK_IGNORE 194 +#define TK_EXPIRED 195 +#define TK_FILL_HISTORY 196 +#define TK_SUBTABLE 197 +#define TK_KILL 198 +#define TK_CONNECTION 199 +#define TK_TRANSACTION 200 +#define TK_BALANCE 201 +#define TK_VGROUP 202 +#define TK_MERGE 203 +#define TK_REDISTRIBUTE 204 +#define TK_SPLIT 205 +#define TK_DELETE 206 +#define TK_INSERT 207 +#define TK_NULL 208 +#define TK_NK_QUESTION 209 +#define TK_NK_ARROW 210 +#define TK_ROWTS 211 +#define TK_QSTART 212 +#define TK_QEND 213 +#define TK_QDURATION 214 +#define TK_WSTART 215 +#define TK_WEND 216 +#define TK_WDURATION 217 +#define TK_IROWTS 218 +#define TK_ISFILLED 219 +#define TK_CAST 220 +#define TK_NOW 221 +#define TK_TODAY 222 +#define TK_TIMEZONE 223 +#define TK_CLIENT_VERSION 224 +#define TK_SERVER_VERSION 225 +#define TK_SERVER_STATUS 226 +#define TK_CURRENT_USER 227 +#define TK_CASE 228 +#define TK_END 229 +#define TK_WHEN 230 +#define TK_THEN 231 +#define TK_ELSE 232 +#define TK_BETWEEN 233 +#define TK_IS 234 +#define TK_NK_LT 235 +#define TK_NK_GT 236 +#define TK_NK_LE 237 +#define TK_NK_GE 238 +#define TK_NK_NE 239 +#define TK_MATCH 240 +#define TK_NMATCH 241 +#define TK_CONTAINS 242 +#define TK_IN 243 +#define TK_JOIN 244 +#define TK_INNER 245 +#define TK_SELECT 246 +#define TK_DISTINCT 247 +#define TK_WHERE 248 +#define TK_PARTITION 249 +#define TK_BY 250 +#define TK_SESSION 251 +#define TK_STATE_WINDOW 252 +#define TK_EVENT_WINDOW 253 +#define TK_START 254 +#define TK_SLIDING 255 +#define TK_FILL 256 +#define TK_VALUE 257 +#define TK_VALUE_F 258 +#define TK_NONE 259 +#define TK_PREV 260 +#define TK_NULL_F 261 +#define TK_LINEAR 262 +#define TK_NEXT 263 +#define TK_HAVING 264 +#define TK_RANGE 265 +#define TK_EVERY 266 +#define TK_ORDER 267 +#define TK_SLIMIT 268 +#define TK_SOFFSET 269 +#define TK_LIMIT 270 +#define TK_OFFSET 271 +#define TK_ASC 272 +#define TK_NULLS 273 +#define TK_ABORT 274 +#define TK_AFTER 275 +#define TK_ATTACH 276 +#define TK_BEFORE 277 +#define TK_BEGIN 278 +#define TK_BITAND 279 +#define TK_BITNOT 280 +#define TK_BITOR 281 +#define TK_BLOCKS 282 +#define TK_CHANGE 283 +#define TK_COMMA 284 +#define TK_COMPACT 285 +#define TK_CONCAT 286 +#define TK_CONFLICT 287 +#define TK_COPY 288 +#define TK_DEFERRED 289 +#define TK_DELIMITERS 290 +#define TK_DETACH 291 +#define TK_DIVIDE 292 +#define TK_DOT 293 +#define TK_EACH 294 +#define TK_FAIL 295 +#define TK_FILE 296 +#define TK_FOR 297 +#define TK_GLOB 298 +#define TK_ID 299 +#define TK_IMMEDIATE 300 +#define TK_IMPORT 301 +#define TK_INITIALLY 302 +#define TK_INSTEAD 303 +#define TK_ISNULL 304 +#define TK_KEY 305 +#define TK_MODULES 306 +#define TK_NK_BITNOT 307 +#define TK_NK_SEMI 308 +#define TK_NOTNULL 309 +#define TK_OF 310 +#define TK_PLUS 311 +#define TK_PRIVILEGE 312 +#define TK_RAISE 313 +#define TK_REPLACE 314 +#define TK_RESTRICT 315 +#define TK_ROW 316 +#define TK_SEMI 317 +#define TK_STAR 318 +#define TK_STATEMENT 319 +#define TK_STRICT 320 +#define TK_STRING 321 +#define TK_TIMES 322 +#define TK_UPDATE 323 +#define TK_VALUES 324 +#define TK_VARIABLE 325 +#define TK_VIEW 326 +#define TK_WAL 327 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index e98e341f15..7b65c06b85 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -219,6 +219,7 @@ bool fmIsKeepOrderFunc(int32_t funcId); bool fmIsCumulativeFunc(int32_t funcId); bool fmIsInterpPseudoColumnFunc(int32_t funcId); bool fmIsGroupKeyFunc(int32_t funcId); +bool fmIsBlockDistFunc(int32_t funcId); void getLastCacheDataType(SDataType* pType); diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 2d14391247..1a9700907e 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -233,8 +233,10 @@ typedef struct SEventWindowNode { typedef enum EFillMode { FILL_MODE_NONE = 1, FILL_MODE_VALUE, + FILL_MODE_VALUE_F, FILL_MODE_PREV, FILL_MODE_NULL, + FILL_MODE_NULL_F, FILL_MODE_LINEAR, FILL_MODE_NEXT } EFillMode; diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 52d8a75ee0..53f25d3fe4 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -357,6 +357,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_MND_STREAM_MUST_BE_DELETED TAOS_DEF_ERROR_CODE(0, 0x03F3) #define TSDB_CODE_MND_STREAM_TASK_DROPPED TAOS_DEF_ERROR_CODE(0, 0x03F4) #define TSDB_CODE_MND_MULTI_REPLICA_SOURCE_DB TAOS_DEF_ERROR_CODE(0, 0x03F5) +#define TSDB_CODE_MND_TOO_MANY_STREAMS TAOS_DEF_ERROR_CODE(0, 0x03F6) // mnode-sma #define TSDB_CODE_MND_SMA_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0480) diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index 0c445c7fbf..a14fc650d8 100644 --- a/source/client/CMakeLists.txt +++ b/source/client/CMakeLists.txt @@ -60,6 +60,6 @@ target_link_libraries( PRIVATE os util common transport nodes parser command planner catalog scheduler function qcom ) -if(${BUILD_TEST}) +#if(${BUILD_TEST}) ADD_SUBDIRECTORY(test) -endif(${BUILD_TEST}) \ No newline at end of file +#endif(${BUILD_TEST}) \ No newline at end of file diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 2c53fe4080..f63a2ebde0 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -138,6 +138,12 @@ STscObj* taos_connect_internal(const char* ip, const char* user, const char* pas p->mgmtEp = epSet; taosThreadMutexInit(&p->qnodeMutex, NULL); p->pTransporter = openTransporter(user, secretEncrypt, tsNumOfCores / 2); + if (p->pTransporter == NULL) { + taosThreadMutexUnlock(&appInfo.mutex); + taosMemoryFreeClear(key); + taosMemoryFree(p); + return NULL; + } p->pAppHbMgr = appHbMgrInit(p, key); if (NULL == p->pAppHbMgr) { destroyAppInst(p); @@ -1386,8 +1392,6 @@ int32_t doProcessMsgFromServer(void* param) { tscError("0x%" PRIx64 " rsp msg:%s, code:%s rspLen:%d, elapsed time:%d ms, reqId:0x%" PRIx64, pRequest->self, TMSG_INFO(pMsg->msgType), tstrerror(pMsg->code), pMsg->contLen, elapsed / 1000, pRequest->requestId); } - - taosReleaseRef(clientReqRefPool, pSendInfo->requestObjRefId); } } @@ -1407,6 +1411,11 @@ int32_t doProcessMsgFromServer(void* param) { } pSendInfo->fp(pSendInfo->param, &buf, pMsg->code); + + if (pTscObj) { + taosReleaseRef(clientReqRefPool, pSendInfo->requestObjRefId); + } + rpcFreeCont(pMsg->pCont); destroySendMsgInfo(pSendInfo); @@ -1444,6 +1453,7 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) { tscError("failed to sched msg to tsc, tsc ready to quit"); rpcFreeCont(pMsg->pCont); taosMemoryFree(arg->pEpset); + destroySendMsgInfo(pMsg->info.ahandle); taosMemoryFree(arg); } } diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index 82202b8820..a75411a854 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -112,7 +112,7 @@ void createNewTable(TAOS* pConn, int32_t index) { } taos_free_result(pRes); - for(int32_t i = 0; i < 20; i += 20) { + for(int32_t i = 0; i < 2000; i += 20) { char sql[1024] = {0}; sprintf(sql, "insert into tu%d values(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)" @@ -692,6 +692,7 @@ TEST(testCase, insert_test) { taos_free_result(pRes); taos_close(pConn); } +#endif TEST(testCase, projection_query_tables) { TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); @@ -725,7 +726,7 @@ TEST(testCase, projection_query_tables) { } taos_free_result(pRes); - for (int32_t i = 0; i < 200000; ++i) { + for (int32_t i = 0; i < 2; ++i) { printf("create table :%d\n", i); createNewTable(pConn, i); } @@ -751,6 +752,7 @@ TEST(testCase, projection_query_tables) { taos_close(pConn); } +#if 0 TEST(testCase, tsbs_perf_test) { TdThread qid[20] = {0}; @@ -760,8 +762,6 @@ TEST(testCase, tsbs_perf_test) { getchar(); } -#endif - TEST(testCase, projection_query_stables) { TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); ASSERT_NE(pConn, nullptr); @@ -790,7 +790,6 @@ TEST(testCase, projection_query_stables) { taos_close(pConn); } -#if 0 TEST(testCase, agg_query_tables) { TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); ASSERT_NE(pConn, nullptr); @@ -831,7 +830,7 @@ TEST(testCase, async_api_test) { ASSERT_NE(pConn, nullptr); taos_query(pConn, "use abc1"); -#if 0 + TAOS_RES* pRes = taos_query(pConn, "insert into tu(ts) values('2022-02-27 12:12:61')"); if (taos_errno(pRes) != 0) { printf("failed, reason:%s\n", taos_errstr(pRes)); @@ -854,7 +853,6 @@ TEST(testCase, async_api_test) { printf("%s\n", str); memset(str, 0, sizeof(str)); } -#endif taos_query_a(pConn, "select count(*) from tu", queryCallback, pConn); getchar(); diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c index 095857825d..b0810d528f 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c @@ -49,7 +49,7 @@ static void mmProcessRpcMsg(SQueueInfo *pInfo, SRpcMsg *pMsg) { pMsg->info.node = pMgmt->pMnode; const STraceId *trace = &pMsg->info.traceId; - dGTrace("msg:%p, get from mnode queue", pMsg); + dGTrace("msg:%p, get from mnode queue, type:%s", pMsg, TMSG_INFO(pMsg->msgType)); int32_t code = mndProcessRpcMsg(pMsg); diff --git a/source/dnode/mnode/impl/inc/mndTrans.h b/source/dnode/mnode/impl/inc/mndTrans.h index 07066d2251..d6e5d322ba 100644 --- a/source/dnode/mnode/impl/inc/mndTrans.h +++ b/source/dnode/mnode/impl/inc/mndTrans.h @@ -81,7 +81,7 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans); int32_t mndTransProcessRsp(SRpcMsg *pRsp); void mndTransPullup(SMnode *pMnode); int32_t mndKillTrans(SMnode *pMnode, STrans *pTrans); -void mndTransExecute(SMnode *pMnode, STrans *pTrans); +void mndTransExecute(SMnode *pMnode, STrans *pTrans, bool isLeader); int32_t mndSetRpcInfoForDbTrans(SMnode *pMnode, SRpcMsg *pMsg, EOperType oper, const char *dbname); #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 6b54a36a6f..c192ea7efd 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -31,6 +31,8 @@ #define MND_STREAM_VER_NUMBER 2 #define MND_STREAM_RESERVE_SIZE 64 +#define MND_STREAM_MAX_NUM 10 + static int32_t mndStreamActionInsert(SSdb *pSdb, SStreamObj *pStream); static int32_t mndStreamActionDelete(SSdb *pSdb, SStreamObj *pStream); static int32_t mndStreamActionUpdate(SSdb *pSdb, SStreamObj *pStream, SStreamObj *pNewStream); @@ -666,6 +668,35 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { goto _OVER; } + { + int32_t numOfStream = 0; + + SStreamObj *pStream = NULL; + void *pIter = NULL; + + while (1) { + pIter = sdbFetch(pMnode->pSdb, SDB_STREAM, pIter, (void **)&pStream); + if (pIter == NULL) { + if (numOfStream > MND_STREAM_MAX_NUM) { + mError("too many streams, no more than 10 for each database"); + terrno = TSDB_CODE_MND_TOO_MANY_STREAMS; + goto _OVER; + } + break; + } + + if (pStream->sourceDbUid == streamObj.sourceDbUid) { + ++numOfStream; + } + sdbRelease(pMnode->pSdb, pStream); + if (numOfStream > MND_STREAM_MAX_NUM) { + mError("too many streams, no more than 10 for each database"); + terrno = TSDB_CODE_MND_TOO_MANY_STREAMS; + goto _OVER; + } + } + } + pDb = mndAcquireDb(pMnode, streamObj.sourceDb); if (pDb->cfg.replications != 1) { mError("stream source db must have only 1 replica, but %s has %d", pDb->name, pDb->cfg.replications); diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 7dc0912403..f618b8afae 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -85,7 +85,11 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta pRaw, pMgmt->transSec, pMgmt->transSeq); if (pMeta->code == 0) { - sdbWriteWithoutFree(pMnode->pSdb, pRaw); + int32_t code = sdbWriteWithoutFree(pMnode->pSdb, pRaw); + if (code != 0) { + mError("trans:%d, failed to write to sdb since %s", transId, terrstr()); + return 0; + } sdbSetApplyInfo(pMnode->pSdb, pMeta->index, pMeta->term, pMeta->lastConfigIndex); } @@ -110,8 +114,9 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta taosThreadMutexUnlock(&pMgmt->lock); STrans *pTrans = mndAcquireTrans(pMnode, transId); if (pTrans != NULL) { - mInfo("trans:%d, execute in mnode which not leader or sync timeout", transId); - mndTransExecute(pMnode, pTrans); + mInfo("trans:%d, execute in mnode which not leader or sync timeout, createTime:%" PRId64 " saved trans:%d", + transId, pTrans->createdTime, pMgmt->transId); + mndTransExecute(pMnode, pTrans, false); mndReleaseTrans(pMnode, pTrans); // sdbWriteFile(pMnode->pSdb, SDB_WRITE_DELTA); } else { @@ -368,7 +373,7 @@ int32_t mndSyncPropose(SMnode *pMnode, SSdbRaw *pRaw, int32_t transId) { taosThreadMutexLock(&pMgmt->lock); pMgmt->errCode = 0; - if (pMgmt->transId != 0) { + if (pMgmt->transId != 0 /* && pMgmt->transId != transId*/) { mError("trans:%d, can't be proposed since trans:%d already waiting for confirm", transId, pMgmt->transId); taosThreadMutexUnlock(&pMgmt->lock); rpcFreeCont(req.pCont); diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index dfcd55bcba..6bb286cd6f 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -572,8 +572,20 @@ static void mndTransUpdateActions(SArray *pOldArray, SArray *pNewArray) { } static int32_t mndTransActionUpdate(SSdb *pSdb, STrans *pOld, STrans *pNew) { - mTrace("trans:%d, perform update action, old row:%p stage:%s, new row:%p stage:%s", pOld->id, pOld, - mndTransStr(pOld->stage), pNew, mndTransStr(pNew->stage)); + mTrace("trans:%d, perform update action, old row:%p stage:%s create:%" PRId64 ", new row:%p stage:%s create:%" PRId64, + pOld->id, pOld, mndTransStr(pOld->stage), pOld->createdTime, pNew, mndTransStr(pNew->stage), + pNew->createdTime); + + if (pOld->createdTime != pNew->createdTime) { + mError("trans:%d, failed to perform update action since createTime not match, old row:%p stage:%s create:%" PRId64 + ", new row:%p stage:%s create:%" PRId64, + pOld->id, pOld, mndTransStr(pOld->stage), pOld->createdTime, pNew, mndTransStr(pNew->stage), + pNew->createdTime); + // only occured while sync timeout + terrno = TSDB_CODE_MND_TRNAS_SYNC_TIMEOUT; + return -1; + } + mndTransUpdateActions(pOld->redoActions, pNew->redoActions); mndTransUpdateActions(pOld->undoActions, pNew->undoActions); mndTransUpdateActions(pOld->commitActions, pNew->commitActions); @@ -779,16 +791,18 @@ static int32_t mndTransSync(SMnode *pMnode, STrans *pTrans) { } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); - mInfo("trans:%d, sync to other mnodes, stage:%s", pTrans->id, mndTransStr(pTrans->stage)); + mInfo("trans:%d, sync to other mnodes, stage:%s createTime:%" PRId64, pTrans->id, mndTransStr(pTrans->stage), + pTrans->createdTime); int32_t code = mndSyncPropose(pMnode, pRaw, pTrans->id); if (code != 0) { - mError("trans:%d, failed to sync, errno:%s code:%s", pTrans->id, terrstr(), tstrerror(code)); + mError("trans:%d, failed to sync, errno:%s code:%s createTime:%" PRId64 " saved trans:%d", pTrans->id, terrstr(), + tstrerror(code), pTrans->createdTime, pMnode->syncMgmt.transId); sdbFreeRaw(pRaw); return -1; } sdbFreeRaw(pRaw); - mInfo("trans:%d, sync finished", pTrans->id); + mInfo("trans:%d, sync finished, createTime:%" PRId64, pTrans->id, pTrans->createdTime); return 0; } @@ -891,7 +905,7 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans) { pTrans->rpcRsp = NULL; pTrans->rpcRspLen = 0; - mndTransExecute(pMnode, pNew); + mndTransExecute(pMnode, pNew, true); mndReleaseTrans(pMnode, pNew); return 0; } @@ -1054,7 +1068,7 @@ int32_t mndTransProcessRsp(SRpcMsg *pRsp) { mInfo("trans:%d, %s:%d response is received, code:0x%x, accept:0x%x retry:0x%x", transId, mndTransStr(pAction->stage), action, pRsp->code, pAction->acceptableCode, pAction->retryCode); - mndTransExecute(pMnode, pTrans); + mndTransExecute(pMnode, pTrans, true); _OVER: mndReleaseTrans(pMnode, pTrans); @@ -1483,15 +1497,17 @@ static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans) { mError("trans:%d, failed to write sdb since %s", pTrans->id, terrstr()); } - mInfo("trans:%d, execute finished, code:0x%x, failedTimes:%d", pTrans->id, pTrans->code, pTrans->failedTimes); + mInfo("trans:%d, execute finished, code:0x%x, failedTimes:%d createTime:%" PRId64, pTrans->id, pTrans->code, + pTrans->failedTimes, pTrans->createdTime); return continueExec; } -void mndTransExecute(SMnode *pMnode, STrans *pTrans) { +void mndTransExecute(SMnode *pMnode, STrans *pTrans, bool isLeader) { bool continueExec = true; while (continueExec) { - mInfo("trans:%d, continue to execute, stage:%s", pTrans->id, mndTransStr(pTrans->stage)); + mInfo("trans:%d, continue to execute, stage:%s createTime:%" PRId64 " leader:%d", pTrans->id, + mndTransStr(pTrans->stage), pTrans->createdTime, isLeader); pTrans->lastExecTime = taosGetTimestampMs(); switch (pTrans->stage) { case TRN_STAGE_PREPARE: @@ -1501,13 +1517,23 @@ void mndTransExecute(SMnode *pMnode, STrans *pTrans) { continueExec = mndTransPerformRedoActionStage(pMnode, pTrans); break; case TRN_STAGE_COMMIT: - continueExec = mndTransPerformCommitStage(pMnode, pTrans); + if (isLeader) { + continueExec = mndTransPerformCommitStage(pMnode, pTrans); + } else { + mInfo("trans:%d, can not commit since not leader", pTrans->id); + continueExec = false; + } break; case TRN_STAGE_COMMIT_ACTION: continueExec = mndTransPerformCommitActionStage(pMnode, pTrans); break; case TRN_STAGE_ROLLBACK: - continueExec = mndTransPerformRollbackStage(pMnode, pTrans); + if (isLeader) { + continueExec = mndTransPerformRollbackStage(pMnode, pTrans); + } else { + mInfo("trans:%d, can not rollback since not leader", pTrans->id); + continueExec = false; + } break; case TRN_STAGE_UNDO_ACTION: continueExec = mndTransPerformUndoActionStage(pMnode, pTrans); @@ -1550,7 +1576,7 @@ int32_t mndKillTrans(SMnode *pMnode, STrans *pTrans) { pAction->errCode = 0; } - mndTransExecute(pMnode, pTrans); + mndTransExecute(pMnode, pTrans, true); return 0; } @@ -1608,7 +1634,7 @@ void mndTransPullup(SMnode *pMnode) { int32_t *pTransId = taosArrayGet(pArray, i); STrans *pTrans = mndAcquireTrans(pMnode, *pTransId); if (pTrans != NULL) { - mndTransExecute(pMnode, pTrans); + mndTransExecute(pMnode, pTrans, true); } mndReleaseTrans(pMnode, pTrans); } diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index db35a7c088..fd91d438e7 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -181,7 +181,6 @@ int32_t tsdbReaderOpen(SVnode *pVnode, SQueryTableDataCond *pCond, void *pTableL void tsdbReaderClose(STsdbReader *pReader); bool tsdbNextDataBlock(STsdbReader *pReader); -void tsdbRetrieveDataBlockInfo(const STsdbReader *pReader, int32_t *rows, uint64_t *uid, STimeWindow *pWindow); int32_t tsdbRetrieveDatablockSMA(STsdbReader *pReader, SSDataBlock *pDataBlock, bool *allHave); void tsdbReleaseDataBlock(STsdbReader *pReader); SSDataBlock *tsdbRetrieveDataBlock(STsdbReader *pTsdbReadHandle, SArray *pColumnIdList); diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 6ff085c8f1..18222cbf21 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -325,6 +325,8 @@ struct STsdb { STsdbFS fs; SLRUCache *lruCache; TdThreadMutex lruMutex; + SLRUCache *biCache; + TdThreadMutex biMutex; }; struct TSDBKEY { @@ -764,6 +766,9 @@ int32_t tsdbCacheGetLastH(SLRUCache *pCache, tb_uid_t uid, SCacheRowsReader *pr, int32_t tsdbCacheGetLastrowH(SLRUCache *pCache, tb_uid_t uid, SCacheRowsReader *pr, LRUHandle **h); int32_t tsdbCacheRelease(SLRUCache *pCache, LRUHandle *h); +int32_t tsdbCacheGetBlockIdx(SLRUCache *pCache, SDataFReader *pFileReader, LRUHandle **handle); +int32_t tsdbBICacheRelease(SLRUCache *pCache, LRUHandle *h); + int32_t tsdbCacheDeleteLastrow(SLRUCache *pCache, tb_uid_t uid, TSKEY eKey); int32_t tsdbCacheDeleteLast(SLRUCache *pCache, tb_uid_t uid, TSKEY eKey); int32_t tsdbCacheDelete(SLRUCache *pCache, tb_uid_t uid, TSKEY eKey); diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index d18014c37b..c67fa4bdf1 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -15,6 +15,34 @@ #include "tsdb.h" +static int32_t tsdbOpenBICache(STsdb *pTsdb) { + int32_t code = 0; + SLRUCache *pCache = taosLRUCacheInit(5 * 1024 * 1024, -1, .5); + if (pCache == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } + + taosLRUCacheSetStrictCapacity(pCache, false); + + taosThreadMutexInit(&pTsdb->biMutex, NULL); + +_err: + pTsdb->biCache = pCache; + return code; +} + +static void tsdbCloseBICache(STsdb *pTsdb) { + SLRUCache *pCache = pTsdb->biCache; + if (pCache) { + taosLRUCacheEraseUnrefEntries(pCache); + + taosLRUCacheCleanup(pCache); + + taosThreadMutexDestroy(&pTsdb->biMutex); + } +} + int32_t tsdbOpenCache(STsdb *pTsdb) { int32_t code = 0; SLRUCache *pCache = NULL; @@ -26,6 +54,12 @@ int32_t tsdbOpenCache(STsdb *pTsdb) { goto _err; } + code = tsdbOpenBICache(pTsdb); + if (code != TSDB_CODE_SUCCESS) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } + taosLRUCacheSetStrictCapacity(pCache, false); taosThreadMutexInit(&pTsdb->lruMutex, NULL); @@ -44,6 +78,8 @@ void tsdbCloseCache(STsdb *pTsdb) { taosThreadMutexDestroy(&pTsdb->lruMutex); } + + tsdbCloseBICache(pTsdb); } static void getTableCacheKey(tb_uid_t uid, int cacheType, char *key, int *len) { @@ -1538,3 +1574,84 @@ size_t tsdbCacheGetUsage(SVnode *pVnode) { return usage; } + +static void getBICacheKey(int32_t fid, int64_t commitID, char *key, int *len) { + struct { + int32_t fid; + int64_t commitID; + } biKey = {0}; + + biKey.fid = fid; + biKey.commitID = commitID; + + *len = sizeof(biKey); + memcpy(key, &biKey, *len); +} + +static int32_t tsdbCacheLoadBlockIdx(SDataFReader *pFileReader, SArray **aBlockIdx) { + SArray *pArray = taosArrayInit(8, sizeof(SBlockIdx)); + int32_t code = tsdbReadBlockIdx(pFileReader, pArray); + + if (code != TSDB_CODE_SUCCESS) { + taosArrayDestroy(pArray); + code = TSDB_CODE_OUT_OF_MEMORY; + return code; + } + + *aBlockIdx = pArray; + + return code; +} + +static void deleteBICache(const void *key, size_t keyLen, void *value) { + SArray *pArray = (SArray *)value; + + taosArrayDestroy(pArray); +} + +int32_t tsdbCacheGetBlockIdx(SLRUCache *pCache, SDataFReader *pFileReader, LRUHandle **handle) { + int32_t code = 0; + char key[128] = {0}; + int keyLen = 0; + + getBICacheKey(pFileReader->pSet->fid, pFileReader->pSet->pHeadF->commitID, key, &keyLen); + LRUHandle *h = taosLRUCacheLookup(pCache, key, keyLen); + if (!h) { + STsdb *pTsdb = pFileReader->pTsdb; + taosThreadMutexLock(&pTsdb->biMutex); + + h = taosLRUCacheLookup(pCache, key, keyLen); + if (!h) { + SArray *pArray = NULL; + code = tsdbCacheLoadBlockIdx(pFileReader, &pArray); + // if table's empty or error, return code of -1 + if (code != TSDB_CODE_SUCCESS || pArray == NULL) { + taosThreadMutexUnlock(&pTsdb->biMutex); + + *handle = NULL; + return 0; + } + + size_t charge = pArray->capacity * pArray->elemSize + sizeof(*pArray); + _taos_lru_deleter_t deleter = deleteBICache; + LRUStatus status = taosLRUCacheInsert(pCache, key, keyLen, pArray, charge, deleter, &h, TAOS_LRU_PRIORITY_LOW); + if (status != TAOS_LRU_STATUS_OK) { + code = -1; + } + } + + taosThreadMutexUnlock(&pTsdb->biMutex); + } + + *handle = h; + + return code; +} + +int32_t tsdbBICacheRelease(SLRUCache *pCache, LRUHandle *h) { + int32_t code = 0; + + taosLRUCacheRelease(pCache, h, false); + + return code; +} diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index 1f99444cf3..a97cd3db27 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -515,7 +515,7 @@ bool tLDataIterNextRow(SLDataIter *pIter, const char *idStr) { pIter->rInfo.row = tsdbRowFromBlockData(pBlockData, pIter->iRow); _exit: - return (terrno == TSDB_CODE_SUCCESS) && (pIter->pSttBlk != NULL); + return (terrno == TSDB_CODE_SUCCESS) && (pIter->pSttBlk != NULL) && (pBlockData != NULL); } SRowInfo *tLDataIterGet(SLDataIter *pIter) { return &pIter->rInfo; } diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index fc0678e3e6..6abdabe6fc 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -79,6 +79,9 @@ typedef struct SIOCostSummary { int64_t composedBlocks; double buildComposedBlockTime; double createScanInfoList; + // double getTbFromMemTime; + // double getTbFromIMemTime; + double initDelSkylineIterTime; } SIOCostSummary; typedef struct SBlockLoadSuppInfo { @@ -176,10 +179,9 @@ struct STsdbReader { SDataFReader* pFileReader; // the file reader SDelFReader* pDelFReader; // the del file reader SArray* pDelIdx; // del file block index; - // SVersionRange verRange; - SBlockInfoBuf blockInfoBuf; - int32_t step; - STsdbReader* innerReader[2]; + SBlockInfoBuf blockInfoBuf; + int32_t step; + STsdbReader* innerReader[2]; }; static SFileDataBlockInfo* getCurrentBlockInfo(SDataBlockIter* pBlockIter); @@ -220,6 +222,8 @@ static bool hasDataInFileBlock(const SBlockData* pBlockData, const SFil static void initBlockDumpInfo(STsdbReader* pReader, SDataBlockIter* pBlockIter); static int32_t getInitialDelIndex(const SArray* pDelSkyline, int32_t order); +static FORCE_INLINE STSchema* getLatestTableSchema(STsdbReader* pReader, uint64_t uid); + static bool outOfTimeWindow(int64_t ts, STimeWindow* pWindow) { return (ts > pWindow->ekey) || (ts < pWindow->skey); } static int32_t setColumnIdSlotList(SBlockLoadSuppInfo* pSupInfo, SColumnInfo* pCols, const int32_t* pSlotIdList, @@ -711,17 +715,21 @@ _end: } static int32_t doLoadBlockIndex(STsdbReader* pReader, SDataFReader* pFileReader, SArray* pIndexList) { - SArray* aBlockIdx = taosArrayInit(8, sizeof(SBlockIdx)); + // SArray* aBlockIdx = taosArrayInit(8, sizeof(SBlockIdx)); int64_t st = taosGetTimestampUs(); - int32_t code = tsdbReadBlockIdx(pFileReader, aBlockIdx); - if (code != TSDB_CODE_SUCCESS) { + // int32_t code = tsdbReadBlockIdx(pFileReader, aBlockIdx); + LRUHandle* handle = NULL; + int32_t code = tsdbCacheGetBlockIdx(pFileReader->pTsdb->biCache, pFileReader, &handle); + if (code != TSDB_CODE_SUCCESS || handle == NULL) { goto _end; } - size_t num = taosArrayGetSize(aBlockIdx); + SArray* aBlockIdx = (SArray*)taosLRUCacheValue(pFileReader->pTsdb->biCache, handle); + size_t num = taosArrayGetSize(aBlockIdx); if (num == 0) { - taosArrayDestroy(aBlockIdx); + tsdbBICacheRelease(pFileReader->pTsdb->biCache, handle); + // taosArrayDestroy(aBlockIdx); return TSDB_CODE_SUCCESS; } @@ -757,7 +765,8 @@ static int32_t doLoadBlockIndex(STsdbReader* pReader, SDataFReader* pFileReader, pReader->cost.headFileLoadTime += (et1 - st) / 1000.0; _end: - taosArrayDestroy(aBlockIdx); + // taosArrayDestroy(aBlockIdx); + tsdbBICacheRelease(pFileReader->pTsdb->biCache, handle); return code; } @@ -1070,7 +1079,7 @@ static void copyNumericCols(const SColData* pData, SFileBlockDumpInfo* pDumpInfo } } -static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanInfo* pBlockScanInfo) { +static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader) { SReaderStatus* pStatus = &pReader->status; SDataBlockIter* pBlockIter = &pStatus->blockIter; SBlockLoadSuppInfo* pSupInfo = &pReader->suppInfo; @@ -1087,6 +1096,14 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn bool asc = ASCENDING_TRAVERSE(pReader->order); int32_t step = asc ? 1 : -1; + // no data exists, return directly. + if (pBlockData->nRow == 0 || pBlockData->aTSKEY == 0) { + tsdbWarn("%p no need to copy since no data in blockData, table uid:%" PRIu64 " has been dropped, %s", pReader, + pBlockInfo->uid, pReader->idStr); + pResBlock->info.rows = 0; + return 0; + } + if ((pDumpInfo->rowIndex == 0 && asc) || (pDumpInfo->rowIndex == pBlock->nRow - 1 && (!asc))) { if (asc && pReader->window.skey <= pBlock->minKey.ts) { // pDumpInfo->rowIndex = 0; @@ -1186,14 +1203,12 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn setBlockAllDumped(pDumpInfo, ts, pReader->order); } - pBlockScanInfo->lastKey = pDumpInfo->lastKey; - double elapsedTime = (taosGetTimestampUs() - st) / 1000.0; pReader->cost.blockLoadTime += elapsedTime; int32_t unDumpedRows = asc ? pBlock->nRow - pDumpInfo->rowIndex : pDumpInfo->rowIndex + 1; tsdbDebug("%p copy file block to sdatablock, global index:%d, table index:%d, brange:%" PRId64 "-%" PRId64 - ", rows:%d, remain:%d, minVer:%" PRId64 ", maxVer:%" PRId64 ", uid:%"PRIu64" elapsed time:%.2f ms, %s", + ", rows:%d, remain:%d, minVer:%" PRId64 ", maxVer:%" PRId64 ", uid:%" PRIu64 " elapsed time:%.2f ms, %s", pReader, pBlockIter->index, pBlockInfo->tbBlockIdx, pBlock->minKey.ts, pBlock->maxKey.ts, dumpedRows, unDumpedRows, pBlock->minVer, pBlock->maxVer, pBlockInfo->uid, elapsedTime, pReader->idStr); @@ -1202,12 +1217,19 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn static int32_t doLoadFileBlockData(STsdbReader* pReader, SDataBlockIter* pBlockIter, SBlockData* pBlockData, uint64_t uid) { + int32_t code = 0; int64_t st = taosGetTimestampUs(); tBlockDataReset(pBlockData); - TABLEID tid = {.suid = pReader->suid, .uid = uid}; - int32_t code = - tBlockDataInit(pBlockData, &tid, pReader->pSchema, &pReader->suppInfo.colId[1], pReader->suppInfo.numOfCols - 1); + STSchema* pSchema = getLatestTableSchema(pReader, uid); + if (pSchema == NULL) { + tsdbDebug("%p table uid:%" PRIu64 " has been dropped, no data existed, %s", pReader, uid, pReader->idStr); + return code; + } + + SBlockLoadSuppInfo* pSup = &pReader->suppInfo; + TABLEID tid = {.suid = pReader->suid, .uid = uid}; + code = tBlockDataInit(pBlockData, &tid, pSchema, &pSup->colId[1], pSup->numOfCols - 1); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -1633,7 +1655,7 @@ static bool fileBlockShouldLoad(STsdbReader* pReader, SFileDataBlockInfo* pBlock // log the reason why load the datablock for profile if (loadDataBlock) { tsdbDebug("%p uid:%" PRIu64 - " need to load the datablock, overlapwithneighborblock:%d, hasDup:%d, partiallyRequired:%d, " + " need to load the datablock, overlapneighbor:%d, hasDup:%d, partiallyRequired:%d, " "overlapWithKey:%d, greaterThanBuf:%d, overlapWithDel:%d, overlapWithlastBlock:%d, %s", pReader, pBlockInfo->uid, info.overlapWithNeighborBlock, info.hasDupTs, info.partiallyRequired, info.overlapWithKeyInBuf, info.moreThanCapcity, info.overlapWithDelInfo, info.overlapWithLastBlock, @@ -1731,6 +1753,19 @@ static bool tryCopyDistinctRowFromSttBlock(TSDBROW* fRow, SLastBlockReader* pLas return false; } +static FORCE_INLINE STSchema* getLatestTableSchema(STsdbReader* pReader, uint64_t uid) { + if (pReader->pSchema != NULL) { + return pReader->pSchema; + } + + pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, uid, -1, 1); + if (pReader->pSchema == NULL) { + tsdbError("failed to get table schema, uid:%" PRIu64 ", it may have been dropped, ver:-1, %s", uid, pReader->idStr); + } + + return pReader->pSchema; +} + static FORCE_INLINE STSchema* doGetSchemaForTSRow(int32_t sversion, STsdbReader* pReader, uint64_t uid) { // always set the newest schema version in pReader->pSchema if (pReader->pSchema == NULL) { @@ -2260,6 +2295,7 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea } int32_t backward = (!ASCENDING_TRAVERSE(pReader->order)); + int64_t st = 0; STbData* d = NULL; if (pReader->pReadSnap->pMem != NULL) { @@ -2303,7 +2339,9 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea tsdbDebug("%p uid:%" PRIu64 ", no data in imem, %s", pReader, pBlockScanInfo->uid, pReader->idStr); } + st = taosGetTimestampUs(); initDelSkylineIterator(pBlockScanInfo, pReader, d, di); + pReader->cost.initDelSkylineIterTime += (taosGetTimestampUs() - st) / 1000.0; pBlockScanInfo->iterInit = true; return TSDB_CODE_SUCCESS; @@ -2533,7 +2571,7 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) { if (isCleanFileDataBlock(pReader, pBlockInfo, pBlock, pBlockScanInfo, keyInBuf, pLastBlockReader) && pBlock->nRow <= pReader->capacity) { if (asc || ((!asc) && (!hasDataInLastBlock(pLastBlockReader)))) { - copyBlockDataToSDataBlock(pReader, pBlockScanInfo); + copyBlockDataToSDataBlock(pReader); // record the last key value pBlockScanInfo->lastKey = asc ? pBlock->maxKey.ts : pBlock->minKey.ts; @@ -2678,21 +2716,39 @@ _err: } TSDBKEY getCurrentKeyInBuf(STableBlockScanInfo* pScanInfo, STsdbReader* pReader) { - TSDBKEY key = {.ts = TSKEY_INITIAL_VAL}; + bool asc = ASCENDING_TRAVERSE(pReader->order); + // TSKEY initialVal = asc? TSKEY_MIN:TSKEY_MAX; + + TSDBKEY key = {.ts = TSKEY_INITIAL_VAL}, ikey = {.ts = TSKEY_INITIAL_VAL}; + + bool hasKey = false, hasIKey = false; TSDBROW* pRow = getValidMemRow(&pScanInfo->iter, pScanInfo->delSkyline, pReader); if (pRow != NULL) { + hasKey = true; key = TSDBROW_KEY(pRow); } - pRow = getValidMemRow(&pScanInfo->iiter, pScanInfo->delSkyline, pReader); - if (pRow != NULL) { - TSDBKEY k = TSDBROW_KEY(pRow); - if (key.ts > k.ts) { - key = k; - } + TSDBROW* pIRow = getValidMemRow(&pScanInfo->iiter, pScanInfo->delSkyline, pReader); + if (pIRow != NULL) { + hasIKey = true; + ikey = TSDBROW_KEY(pIRow); } - return key; + if (hasKey) { + if (hasIKey) { // has data in mem & imem + if (asc) { + return key.ts <= ikey.ts ? key : ikey; + } else { + return key.ts <= ikey.ts ? ikey : key; + } + } else { // no data in imem + return key; + } + } else { + // no data in mem & imem, return the initial value + // only imem has data, return ikey + return ikey; + } } static int32_t moveToNextFile(STsdbReader* pReader, SBlockNumber* pBlockNum) { @@ -2921,59 +2977,19 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) { ASSERT(pBlockInfo != NULL); - if (pBlockInfo != NULL) { - pScanInfo = - *(STableBlockScanInfo**)taosHashGet(pReader->status.pTableMap, &pBlockInfo->uid, sizeof(pBlockInfo->uid)); - } else { - pScanInfo = *pReader->status.pTableIter; - } - + pScanInfo = *(STableBlockScanInfo**)taosHashGet(pReader->status.pTableMap, &pBlockInfo->uid, sizeof(pBlockInfo->uid)); if (pScanInfo == NULL) { tsdbError("failed to get table scan-info, %s", pReader->idStr); code = TSDB_CODE_INVALID_PARA; return code; } - if (pBlockInfo != NULL) { - pBlock = getCurrentBlock(pBlockIter); - } + pBlock = getCurrentBlock(pBlockIter); initLastBlockReader(pLastBlockReader, pScanInfo, pReader); TSDBKEY keyInBuf = getCurrentKeyInBuf(pScanInfo, pReader); - /*if (pBlockInfo == NULL) { // build data block from last data file - SBlockData* pBData = &pReader->status.fileBlockData; - tBlockDataReset(pBData); - - SSDataBlock* pResBlock = pReader->pResBlock; - tsdbDebug("load data in last block firstly, due to desc scan data, %s", pReader->idStr); - - int64_t st = taosGetTimestampUs(); - - while (1) { - bool hasBlockLData = hasDataInLastBlock(pLastBlockReader); - - // no data in last block and block, no need to proceed. - if (hasBlockLData == false) { - break; - } - - buildComposedDataBlockImpl(pReader, pScanInfo, &pReader->status.fileBlockData, pLastBlockReader); - if (pResBlock->info.rows >= pReader->capacity) { - break; - } - } - - double el = (taosGetTimestampUs() - st) / 1000.0; - updateComposedBlockInfo(pReader, el, pScanInfo); - - if (pResBlock->info.rows > 0) { - tsdbDebug("%p uid:%" PRIu64 ", composed data block created, brange:%" PRIu64 "-%" PRIu64 - " rows:%d, elapsed time:%.2f ms %s", - pReader, pResBlock->info.id.uid, pResBlock->info.window.skey, pResBlock->info.window.ekey, - pResBlock->info.rows, el, pReader->idStr); - } - } else*/ if (fileBlockShouldLoad(pReader, pBlockInfo, pBlock, pScanInfo, keyInBuf, pLastBlockReader)) { + if (fileBlockShouldLoad(pReader, pBlockInfo, pBlock, pScanInfo, keyInBuf, pLastBlockReader)) { code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pScanInfo->uid); if (code != TSDB_CODE_SUCCESS) { return code; @@ -3033,6 +3049,11 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) { // update the last key for the corresponding table pScanInfo->lastKey = ASCENDING_TRAVERSE(pReader->order) ? pInfo->window.ekey : pInfo->window.skey; + tsdbDebug("%p uid:%" PRIu64 + " clean file block retrieved from file, global index:%d, " + "table index:%d, rows:%d, brange:%" PRId64 "-%" PRId64 ", %s", + pReader, pScanInfo->uid, pBlockIter->index, pBlockInfo->tbBlockIdx, pBlock->nRow, pBlock->minKey.ts, + pBlock->maxKey.ts, pReader->idStr); } } @@ -4124,19 +4145,21 @@ void tsdbReaderClose(STsdbReader* pReader) { taosMemoryFree(pLReader); } - tsdbDebug("%p :io-cost summary: head-file:%" PRIu64 ", head-file time:%.2f ms, SMA:%" PRId64 - " SMA-time:%.2f ms, fileBlocks:%" PRId64 - ", fileBlocks-load-time:%.2f ms, " - "build in-memory-block-time:%.2f ms, lastBlocks:%" PRId64 - ", lastBlocks-time:%.2f ms, composed-blocks:%" PRId64 - ", composed-blocks-time:%.2fms, STableBlockScanInfo size:%.2f Kb, creatTime:%.2f ms, %s", - pReader, pCost->headFileLoad, pCost->headFileLoadTime, pCost->smaDataLoad, pCost->smaLoadTime, - pCost->numOfBlocks, pCost->blockLoadTime, pCost->buildmemBlock, pCost->lastBlockLoad, - pCost->lastBlockLoadTime, pCost->composedBlocks, pCost->buildComposedBlockTime, - numOfTables * sizeof(STableBlockScanInfo) / 1000.0, pCost->createScanInfoList, pReader->idStr); + tsdbDebug( + "%p :io-cost summary: head-file:%" PRIu64 ", head-file time:%.2f ms, SMA:%" PRId64 + " SMA-time:%.2f ms, fileBlocks:%" PRId64 + ", fileBlocks-load-time:%.2f ms, " + "build in-memory-block-time:%.2f ms, lastBlocks:%" PRId64 ", lastBlocks-time:%.2f ms, composed-blocks:%" PRId64 + ", composed-blocks-time:%.2fms, STableBlockScanInfo size:%.2f Kb, createTime:%.2f ms,initDelSkylineIterTime:%.2f " + "ms, %s", + pReader, pCost->headFileLoad, pCost->headFileLoadTime, pCost->smaDataLoad, pCost->smaLoadTime, pCost->numOfBlocks, + pCost->blockLoadTime, pCost->buildmemBlock, pCost->lastBlockLoad, pCost->lastBlockLoadTime, pCost->composedBlocks, + pCost->buildComposedBlockTime, numOfTables * sizeof(STableBlockScanInfo) / 1000.0, pCost->createScanInfoList, + pCost->initDelSkylineIterTime, pReader->idStr); taosMemoryFree(pReader->idStr); taosMemoryFree(pReader->pSchema); + if (pReader->pMemSchema != pReader->pSchema) { taosMemoryFree(pReader->pMemSchema); } @@ -4435,26 +4458,6 @@ bool tsdbNextDataBlock(STsdbReader* pReader) { return false; } -static void setBlockInfo(const STsdbReader* pReader, int32_t* rows, uint64_t* uid, STimeWindow* pWindow) { - *rows = pReader->pResBlock->info.rows; - *uid = pReader->pResBlock->info.id.uid; - *pWindow = pReader->pResBlock->info.window; -} - -void tsdbRetrieveDataBlockInfo(const STsdbReader* pReader, int32_t* rows, uint64_t* uid, STimeWindow* pWindow) { - if (pReader->type == TIMEWINDOW_RANGE_EXTERNAL) { - if (pReader->step == EXTERNAL_ROWS_MAIN) { - setBlockInfo(pReader, rows, uid, pWindow); - } else if (pReader->step == EXTERNAL_ROWS_PREV) { - setBlockInfo(pReader->innerReader[0], rows, uid, pWindow); - } else { - setBlockInfo(pReader->innerReader[1], rows, uid, pWindow); - } - } else { - setBlockInfo(pReader, rows, uid, pWindow); - } -} - static void doFillNullColSMA(SBlockLoadSuppInfo* pSup, int32_t numOfRows, int32_t numOfCols, SColumnDataAgg* pTsAgg) { // do fill all null column value SMA info int32_t i = 0, j = 0; @@ -4585,7 +4588,7 @@ static SSDataBlock* doRetrieveDataBlock(STsdbReader* pReader) { return NULL; } - copyBlockDataToSDataBlock(pReader, pBlockScanInfo); + copyBlockDataToSDataBlock(pReader); return pReader->pResBlock; } diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index 4e051b8b30..5249a8396e 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -926,8 +926,9 @@ int32_t tsdbRowMergerGetRow(SRowMerger *pMerger, SRow **ppRow) { return tRowBuild(pMerger->pArray, pMerger->pTSchema, ppRow); } +/* // delete skyline ====================================================== -static int32_t tsdbMergeSkyline(SArray *aSkyline1, SArray *aSkyline2, SArray *aSkyline) { +static int32_t tsdbMergeSkyline2(SArray *aSkyline1, SArray *aSkyline2, SArray *aSkyline) { int32_t code = 0; int32_t i1 = 0; int32_t n1 = taosArrayGetSize(aSkyline1); @@ -993,7 +994,141 @@ static int32_t tsdbMergeSkyline(SArray *aSkyline1, SArray *aSkyline2, SArray *aS _exit: return code; } +*/ + +// delete skyline ====================================================== +static int32_t tsdbMergeSkyline(SArray *pSkyline1, SArray *pSkyline2, SArray *pSkyline) { + int32_t code = 0; + int32_t i1 = 0; + int32_t n1 = taosArrayGetSize(pSkyline1); + int32_t i2 = 0; + int32_t n2 = taosArrayGetSize(pSkyline2); + TSDBKEY *pKey1; + TSDBKEY *pKey2; + int64_t version1 = 0; + int64_t version2 = 0; + + ASSERT(n1 > 0 && n2 > 0); + + taosArrayClear(pSkyline); + TSDBKEY **pItem = TARRAY_GET_ELEM(pSkyline, 0); + + while (i1 < n1 && i2 < n2) { + pKey1 = (TSDBKEY *)taosArrayGetP(pSkyline1, i1); + pKey2 = (TSDBKEY *)taosArrayGetP(pSkyline2, i2); + + if (pKey1->ts < pKey2->ts) { + version1 = pKey1->version; + *pItem = pKey1; + i1++; + } else if (pKey1->ts > pKey2->ts) { + version2 = pKey2->version; + *pItem = pKey2; + i2++; + } else { + version1 = pKey1->version; + version2 = pKey2->version; + *pItem = pKey1; + i1++; + i2++; + } + + (*pItem)->version = TMAX(version1, version2); + pItem++; + } + + while (i1 < n1) { + pKey1 = (TSDBKEY *)taosArrayGetP(pSkyline1, i1); + *pItem = pKey1; + pItem++; + i1++; + } + + while (i2 < n2) { + pKey2 = (TSDBKEY *)taosArrayGetP(pSkyline2, i2); + *pItem = pKey2; + pItem++; + i2++; + } + + taosArraySetSize(pSkyline, TARRAY_ELEM_IDX(pSkyline, pItem)); + +_exit: + return code; +} + + +int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, SArray *pSkyline) { + int32_t code = 0; + SDelData *pDelData; + int32_t midx; + + taosArrayClear(pSkyline); + if (sidx == eidx) { + TSDBKEY *pItem1 = taosArrayGet(aSkyline, sidx * 2); + TSDBKEY *pItem2 = taosArrayGet(aSkyline, sidx * 2 + 1); + taosArrayPush(pSkyline, &pItem1); + taosArrayPush(pSkyline, &pItem2); + } else { + SArray *pSkyline1 = NULL; + SArray *pSkyline2 = NULL; + midx = (sidx + eidx) / 2; + + pSkyline1 = taosArrayInit((midx - sidx + 1) * 2, POINTER_BYTES); + pSkyline2 = taosArrayInit((eidx - midx) * 2, POINTER_BYTES); + if (pSkyline1 == NULL || pSkyline1 == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _clear; + } + + code = tsdbBuildDeleteSkylineImpl(aSkyline, sidx, midx, pSkyline1); + if (code) goto _clear; + + code = tsdbBuildDeleteSkylineImpl(aSkyline, midx + 1, eidx, pSkyline2); + if (code) goto _clear; + + code = tsdbMergeSkyline(pSkyline1, pSkyline2, pSkyline); + + _clear: + taosArrayDestroy(pSkyline1); + taosArrayDestroy(pSkyline2); + } + + return code; +} + + int32_t tsdbBuildDeleteSkyline(SArray *aDelData, int32_t sidx, int32_t eidx, SArray *aSkyline) { + SDelData *pDelData; + int32_t code = 0; + int32_t dataNum = eidx - sidx + 1; + SArray *aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY)); + SArray *pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES); + + for (int32_t i = sidx; i <= eidx; ++i) { + pDelData = (SDelData *)taosArrayGet(aDelData, i); + taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}); + taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}); + } + + code = tsdbBuildDeleteSkylineImpl(aTmpSkyline, sidx, eidx, pSkyline); + if (code) goto _clear; + + int32_t skylineNum = taosArrayGetSize(pSkyline); + for (int32_t i = 0; i < skylineNum; ++i) { + TSDBKEY *p = taosArrayGetP(pSkyline, i); + taosArrayPush(aSkyline, p); + } + +_clear: + taosArrayDestroy(aTmpSkyline); + taosArrayDestroy(pSkyline); + + return code; +} + +/* +int32_t tsdbBuildDeleteSkyline2(SArray *aDelData, int32_t sidx, int32_t eidx, SArray *aSkyline) { int32_t code = 0; SDelData *pDelData; int32_t midx; @@ -1030,6 +1165,7 @@ int32_t tsdbBuildDeleteSkyline(SArray *aDelData, int32_t sidx, int32_t eidx, SAr return code; } +*/ // SBlockData ====================================================== int32_t tBlockDataCreate(SBlockData *pBlockData) { diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 313b9da9a5..a384defa91 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -1335,7 +1335,7 @@ static int32_t vnodeProcessBatchDeleteReq(SVnode *pVnode, int64_t version, void tDecodeSBatchDeleteReq(&decoder, &deleteReq); SMetaReader mr = {0}; - metaReaderInit(&mr, pVnode->pMeta, 0); + metaReaderInit(&mr, pVnode->pMeta, META_READER_NOLOCK); int32_t sz = taosArrayGetSize(deleteReq.deleteReqs); for (int32_t i = 0; i < sz; i++) { diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 540b5e90f8..a6f9a13407 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1670,12 +1670,18 @@ int32_t convertFillType(int32_t mode) { case FILL_MODE_NULL: type = TSDB_FILL_NULL; break; + case FILL_MODE_NULL_F: + type = TSDB_FILL_NULL_F; + break; case FILL_MODE_NEXT: type = TSDB_FILL_NEXT; break; case FILL_MODE_VALUE: type = TSDB_FILL_SET_VALUE; break; + case FILL_MODE_VALUE_F: + type = TSDB_FILL_SET_VALUE_F; + break; case FILL_MODE_LINEAR: type = TSDB_FILL_LINEAR; break; diff --git a/source/libs/executor/src/filloperator.c b/source/libs/executor/src/filloperator.c index 187c8f582a..41e4c990f8 100644 --- a/source/libs/executor/src/filloperator.c +++ b/source/libs/executor/src/filloperator.c @@ -140,7 +140,7 @@ static SSDataBlock* doFillImpl(SOperatorInfo* pOperator) { while (1) { SSDataBlock* pBlock = pDownstream->fpSet.getNextFn(pDownstream); if (pBlock == NULL) { - if (pInfo->totalInputRows == 0) { + if (pInfo->totalInputRows == 0 && (pInfo->pFillInfo->type != TSDB_FILL_NULL_F && pInfo->pFillInfo->type != TSDB_FILL_SET_VALUE_F)) { setOperatorCompleted(pOperator); return NULL; } @@ -456,7 +456,8 @@ void* destroyStreamFillLinearInfo(SStreamFillLinearInfo* pFillLinear) { return NULL; } void* destroyStreamFillInfo(SStreamFillInfo* pFillInfo) { - if (pFillInfo->type == TSDB_FILL_SET_VALUE || pFillInfo->type == TSDB_FILL_NULL) { + if (pFillInfo->type == TSDB_FILL_SET_VALUE || pFillInfo->type == TSDB_FILL_SET_VALUE_F || + pFillInfo->type == TSDB_FILL_NULL || pFillInfo->type == TSDB_FILL_NULL_F) { taosMemoryFreeClear(pFillInfo->pResRow->pRowVal); taosMemoryFreeClear(pFillInfo->pResRow); } @@ -661,7 +662,9 @@ void setDeleteFillValueInfo(TSKEY start, TSKEY end, SStreamFillSupporter* pFillS pFillInfo->pos = FILL_POS_INVALID; switch (pFillInfo->type) { case TSDB_FILL_NULL: + case TSDB_FILL_NULL_F: case TSDB_FILL_SET_VALUE: + case TSDB_FILL_SET_VALUE_F: break; case TSDB_FILL_PREV: pFillInfo->pResRow = &pFillSup->prev; @@ -720,7 +723,9 @@ void setFillValueInfo(SSDataBlock* pBlock, TSKEY ts, int32_t rowId, SStreamFillS pFillInfo->pos = FILL_POS_INVALID; switch (pFillInfo->type) { case TSDB_FILL_NULL: - case TSDB_FILL_SET_VALUE: { + case TSDB_FILL_NULL_F: + case TSDB_FILL_SET_VALUE: + case TSDB_FILL_SET_VALUE_F: { if (pFillSup->prev.key == pFillInfo->preRowKey) { resetFillWindow(&pFillSup->prev); } @@ -1360,7 +1365,8 @@ SStreamFillInfo* initStreamFillInfo(SStreamFillSupporter* pFillSup, SSDataBlock* pFillInfo->pLinearInfo->winIndex = 0; pFillInfo->pResRow = NULL; - if (pFillSup->type == TSDB_FILL_SET_VALUE || pFillSup->type == TSDB_FILL_NULL) { + if (pFillSup->type == TSDB_FILL_SET_VALUE || pFillSup->type == TSDB_FILL_SET_VALUE_F + || pFillSup->type == TSDB_FILL_NULL || pFillSup->type == TSDB_FILL_NULL_F) { pFillInfo->pResRow = taosMemoryCalloc(1, sizeof(SResultRowData)); pFillInfo->pResRow->key = INT64_MIN; pFillInfo->pResRow->pRowVal = taosMemoryCalloc(1, pFillSup->rowSize); @@ -1405,7 +1411,7 @@ SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFi goto _error; } - if (pInfo->pFillInfo->type == TSDB_FILL_SET_VALUE) { + if (pInfo->pFillInfo->type == TSDB_FILL_SET_VALUE || pInfo->pFillInfo->type == TSDB_FILL_SET_VALUE_F) { for (int32_t i = 0; i < pInfo->pFillSup->numOfAllCols; ++i) { SFillColInfo* pFillCol = pInfo->pFillSup->pAllColInfo + i; int32_t slotId = GET_DEST_SLOT_ID(pFillCol); @@ -1427,7 +1433,7 @@ SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFi pCell->isNull = true; } } - } else if (pInfo->pFillInfo->type == TSDB_FILL_NULL) { + } else if (pInfo->pFillInfo->type == TSDB_FILL_NULL || pInfo->pFillInfo->type == TSDB_FILL_NULL_F) { for (int32_t i = 0; i < pInfo->pFillSup->numOfAllCols; ++i) { SFillColInfo* pFillCol = pInfo->pFillSup->pAllColInfo + i; int32_t slotId = GET_DEST_SLOT_ID(pFillCol); diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 9c8137db34..1d7a996541 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -492,8 +492,8 @@ _error: static void doHashPartition(SOperatorInfo* pOperator, SSDataBlock* pBlock) { SPartitionOperatorInfo* pInfo = pOperator->info; - SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; - + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + for (int32_t j = 0; j < pBlock->info.rows; ++j) { recordNewGroupKeys(pInfo->pGroupCols, pInfo->pGroupColVals, pBlock, j); int32_t len = buildGroupKeys(pInfo->keyBuf, pInfo->pGroupColVals); @@ -690,8 +690,8 @@ static int compareDataGroupInfo(const void* group1, const void* group2) { static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) { SPartitionOperatorInfo* pInfo = pOperator->info; - SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; - + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SDataGroupInfo* pGroupInfo = (pInfo->groupIndex != -1) ? taosArrayGet(pInfo->sortedGroupArray, pInfo->groupIndex) : NULL; if (pInfo->groupIndex == -1 || pInfo->pageIndex >= taosArrayGetSize(pGroupInfo->pPageList)) { @@ -713,7 +713,7 @@ static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) { qError("failed to get buffer, code:%s, %s", tstrerror(terrno), GET_TASKID(pTaskInfo)); T_LONG_JMP(pTaskInfo->env, terrno); } - + blockDataEnsureCapacity(pInfo->binfo.pRes, pInfo->rowCapacity); blockDataFromBuf1(pInfo->binfo.pRes, page, pInfo->rowCapacity); @@ -829,6 +829,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition SPartitionOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SPartitionOperatorInfo)); SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); if (pInfo == NULL || pOperator == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + pTaskInfo->code = terrno; goto _error; } @@ -841,6 +843,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition SExprInfo* pExprInfo1 = createExprInfo(pPartNode->pExprs, NULL, &num); int32_t code = initExprSupp(&pInfo->scalarSup, pExprInfo1, num); if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = terrno; goto _error; } } @@ -848,6 +852,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY); pInfo->pGroupSet = taosHashInit(100, hashFn, false, HASH_NO_LOCK); if (pInfo->pGroupSet == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + pTaskInfo->code = terrno; goto _error; } @@ -866,6 +872,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition int32_t code = createDiskbasedBuf(&pInfo->pBuf, defaultPgsz, defaultBufsz, pTaskInfo->id.str, tsTempDir); if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = code; goto _error; } @@ -873,6 +881,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition pInfo->columnOffset = setupColumnOffset(pInfo->binfo.pRes, pInfo->rowCapacity); code = initGroupOptrInfo(&pInfo->pGroupColVals, &pInfo->groupKeyLen, &pInfo->keyBuf, pInfo->pGroupCols); if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = code; goto _error; } @@ -885,10 +895,15 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition createOperatorFpSet(optrDummyOpenFn, hashPartition, NULL, destroyPartitionOperatorInfo, optrDefaultBufFn, NULL); code = appendDownstream(pOperator, &downstream, 1); + if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = code; + goto _error; + } + return pOperator; _error: - pTaskInfo->code = TSDB_CODE_OUT_OF_MEMORY; if (pInfo != NULL) { destroyPartitionOperatorInfo(pInfo); } diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index f84871ea92..5a221a0fbd 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -190,6 +190,7 @@ static int32_t setInfoForNewGroup(SSDataBlock* pBlock, SLimitInfo* pLimitInfo, S return PROJECT_RETRIEVE_DONE; } +// todo refactor static int32_t doIngroupLimitOffset(SLimitInfo* pLimitInfo, uint64_t groupId, SSDataBlock* pBlock, SOperatorInfo* pOperator) { // set current group id diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index a7b9cce7aa..0d27332502 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -312,8 +312,8 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanBase* pTableSca tsdbReleaseDataBlock(pTableScanInfo->dataReader); return TSDB_CODE_SUCCESS; } else if (*status == FUNC_DATA_REQUIRED_NOT_LOAD) { - qDebug("%s data block skipped, brange:%" PRId64 "-%" PRId64 ", rows:%d", GET_TASKID(pTaskInfo), - pBlockInfo->window.skey, pBlockInfo->window.ekey, pBlockInfo->rows); + qDebug("%s data block skipped, brange:%" PRId64 "-%" PRId64 ", rows:%d, uid:%" PRIu64, GET_TASKID(pTaskInfo), + pBlockInfo->window.skey, pBlockInfo->window.ekey, pBlockInfo->rows, pBlockInfo->id.uid); doSetTagColumnData(pTableScanInfo, pBlock, pTaskInfo, 1); pCost->skipBlocks += 1; tsdbReleaseDataBlock(pTableScanInfo->dataReader); @@ -399,7 +399,7 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanBase* pTableSca } bool limitReached = applyLimitOffset(&pTableScanInfo->limitInfo, pBlock, pTaskInfo); - if (limitReached) { // set operator flag is done + if (limitReached) { // set operator flag is done setOperatorCompleted(pOperator); } @@ -450,6 +450,15 @@ static STableCachedVal* createTableCacheVal(const SMetaReader* pMetaReader) { // const void *key, size_t keyLen, void *value static void freeCachedMetaItem(const void* key, size_t keyLen, void* value) { freeTableCachedVal(value); } +static void doSetNullValue(SSDataBlock* pBlock, const SExprInfo* pExpr, int32_t numOfExpr) { + for (int32_t j = 0; j < numOfExpr; ++j) { + int32_t dstSlotId = pExpr[j].base.resSchema.slotId; + + SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, dstSlotId); + colDataAppendNNULL(pColInfoData, 0, pBlock->info.rows); + } +} + int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int32_t numOfExpr, SSDataBlock* pBlock, int32_t rows, const char* idStr, STableMetaCacheInfo* pCache) { // currently only the tbname pseudo column @@ -469,14 +478,21 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int SMetaReader mr = {0}; LRUHandle* h = NULL; + // todo refactor: extract method + // the handling of the null data should be packed in the extracted method + // 1. check if it is existed in meta cache if (pCache == NULL) { metaReaderInit(&mr, pHandle->meta, 0); code = metaGetTableEntryByUidCache(&mr, pBlock->info.id.uid); if (code != TSDB_CODE_SUCCESS) { + // when encounter the TSDB_CODE_PAR_TABLE_NOT_EXIST error, we proceed. if (terrno == TSDB_CODE_PAR_TABLE_NOT_EXIST) { qWarn("failed to get table meta, table may have been dropped, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); + + // append null value before return to caller, since the caller will ignore this error code and proceed + doSetNullValue(pBlock, pExpr, numOfExpr); } else { qError("failed to get table meta, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); @@ -502,6 +518,8 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int if (terrno == TSDB_CODE_PAR_TABLE_NOT_EXIST) { qWarn("failed to get table meta, table may have been dropped, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); + // append null value before return to caller, since the caller will ignore this error code and proceed + doSetNullValue(pBlock, pExpr, numOfExpr); } else { qError("failed to get table meta, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); @@ -621,6 +639,11 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) { T_LONG_JMP(pTaskInfo->env, pTaskInfo->code); } + if (pOperator->status == OP_EXEC_DONE) { + tsdbReleaseDataBlock(pTableScanInfo->base.dataReader); + break; + } + // process this data block based on the probabilities bool processThisBlock = processBlockWithProbability(&pTableScanInfo->sample); if (!processThisBlock) { @@ -632,9 +655,8 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) { uint32_t status = 0; int32_t code = loadDataBlock(pOperator, &pTableScanInfo->base, pBlock, &status); - // int32_t code = loadDataBlockOnDemand(pOperator->pRuntimeEnv, pTableScanInfo, pBlock, &status); if (code != TSDB_CODE_SUCCESS) { - T_LONG_JMP(pOperator->pTaskInfo->env, code); + T_LONG_JMP(pTaskInfo->env, code); } // current block is filter out according to filter condition, continue load the next block @@ -2539,7 +2561,7 @@ static SSDataBlock* getTableDataBlockImpl(void* param) { } uint32_t status = 0; - loadDataBlock(pOperator, &pInfo->base, pBlock, &status); + code = loadDataBlock(pOperator, &pInfo->base, pBlock, &status); // code = loadDataBlockFromOneTable(pOperator, pTableScanInfo, pBlock, &status); if (code != TSDB_CODE_SUCCESS) { T_LONG_JMP(pTaskInfo->env, code); @@ -2714,10 +2736,13 @@ SSDataBlock* getSortedTableMergeScanBlockData(SSortHandle* pHandle, SSDataBlock* } } - applyLimitOffset(&pInfo->limitInfo, pResBlock, pTaskInfo); - qDebug("%s get sorted row block, rows:%d, limit:%"PRId64, GET_TASKID(pTaskInfo), pResBlock->info.rows, - pInfo->limitInfo.numOfOutputRows); + bool limitReached = applyLimitOffset(&pInfo->limitInfo, pResBlock, pTaskInfo); + qDebug("%s get sorted row block, rows:%d, limit:%" PRId64, GET_TASKID(pTaskInfo), pResBlock->info.rows, + pInfo->limitInfo.numOfOutputRows); + if (limitReached) { + resetLimitInfoForNextGroup(&pInfo->limitInfo); + } return (pResBlock->info.rows > 0) ? pResBlock : NULL; } diff --git a/source/libs/executor/src/tfill.c b/source/libs/executor/src/tfill.c index 2d921d43d3..778281f9b4 100644 --- a/source/libs/executor/src/tfill.c +++ b/source/libs/executor/src/tfill.c @@ -186,7 +186,7 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock* } } } - } else if (pFillInfo->type == TSDB_FILL_NULL) { // fill with NULL + } else if (pFillInfo->type == TSDB_FILL_NULL || pFillInfo->type == TSDB_FILL_NULL_F) { // fill with NULL setNullRow(pBlock, pFillInfo, index); } else { // fill with user specified value for each column for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) { @@ -349,7 +349,7 @@ static int32_t fillResultImpl(SFillInfo* pFillInfo, SSDataBlock* pBlock, int32_t bool isNull = colDataIsNull_s(pSrc, pFillInfo->index); colDataAppend(pDst, index, src, isNull); saveColData(pFillInfo->prev.pRowVal, i, src, isNull); // todo: - } else if (pFillInfo->type == TSDB_FILL_NULL) { + } else if (pFillInfo->type == TSDB_FILL_NULL || pFillInfo->type == TSDB_FILL_NULL_F) { colDataAppendNULL(pDst, index); } else if (pFillInfo->type == TSDB_FILL_NEXT) { SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->next.pRowVal : pFillInfo->prev.pRowVal; @@ -447,32 +447,6 @@ struct SFillInfo* taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t taosResetFillInfo(pFillInfo, skey); - switch (fillType) { - case FILL_MODE_NONE: - pFillInfo->type = TSDB_FILL_NONE; - break; - case FILL_MODE_PREV: - pFillInfo->type = TSDB_FILL_PREV; - break; - case FILL_MODE_NULL: - pFillInfo->type = TSDB_FILL_NULL; - break; - case FILL_MODE_LINEAR: - pFillInfo->type = TSDB_FILL_LINEAR; - break; - case FILL_MODE_NEXT: - pFillInfo->type = TSDB_FILL_NEXT; - break; - case FILL_MODE_VALUE: - pFillInfo->type = TSDB_FILL_SET_VALUE; - break; - default: { - taosMemoryFree(pFillInfo); - terrno = TSDB_CODE_INVALID_PARA; - return NULL; - } - } - pFillInfo->type = fillType; pFillInfo->pFillCol = pCol; pFillInfo->numOfCols = numOfFillCols + numOfNotFillCols; @@ -572,15 +546,14 @@ bool taosFillHasMoreResults(SFillInfo* pFillInfo) { } int64_t getNumOfResultsAfterFillGap(SFillInfo* pFillInfo, TSKEY ekey, int32_t maxNumOfRows) { - SColumnInfoData* pCol = taosArrayGet(pFillInfo->pSrcBlock->pDataBlock, pFillInfo->srcTsSlotId); - - int64_t* tsList = (int64_t*)pCol->pData; int32_t numOfRows = taosNumOfRemainRows(pFillInfo); TSKEY ekey1 = ekey; int64_t numOfRes = -1; if (numOfRows > 0) { // still fill gap within current data block, not generating data after the result set. + SColumnInfoData* pCol = taosArrayGet(pFillInfo->pSrcBlock->pDataBlock, pFillInfo->srcTsSlotId); + int64_t* tsList = (int64_t*)pCol->pData; TSKEY lastKey = tsList[pFillInfo->numOfRows - 1]; numOfRes = taosTimeCountInterval(lastKey, pFillInfo->currentKey, pFillInfo->interval.sliding, pFillInfo->interval.slidingUnit, pFillInfo->interval.precision); diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index 7cb49c8f54..bce8443353 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -185,12 +185,14 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; switch (pSliceInfo->fillType) { - case TSDB_FILL_NULL: { + case TSDB_FILL_NULL: + case TSDB_FILL_NULL_F: { colDataAppendNULL(pDst, rows); break; } - case TSDB_FILL_SET_VALUE: { + case TSDB_FILL_SET_VALUE: + case TSDB_FILL_SET_VALUE_F: { SVariant* pVar = &pSliceInfo->pFillColInfo[j].fillVal; if (pDst->info.type == TSDB_DATA_TYPE_FLOAT) { diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c index 661e9f97b7..90f20f40b8 100644 --- a/source/libs/executor/src/tsort.c +++ b/source/libs/executor/src/tsort.c @@ -190,8 +190,9 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) { qError("Add to buf failed since %s", terrstr(terrno)); return terrno; } + int32_t code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize, - "doAddToBuf", tsTempDir); + "sortExternalBuf", tsTempDir); dBufSetPrintInfo(pHandle->pBuf); if (code != TSDB_CODE_SUCCESS) { return code; @@ -635,6 +636,7 @@ int32_t getProperSortPageSize(size_t rowSize, uint32_t numOfCols) { static int32_t createInitialSources(SSortHandle* pHandle) { size_t sortBufSize = pHandle->numOfPages * pHandle->pageSize; + int32_t code = 0; if (pHandle->type == SORT_SINGLESOURCE_SORT) { SSortSource** pSource = taosArrayGet(pHandle->pOrderedSource, 0); @@ -663,8 +665,8 @@ static int32_t createInitialSources(SSortHandle* pHandle) { pHandle->beforeFp(pBlock, pHandle->param); } - int32_t code = blockDataMerge(pHandle->pDataBlock, pBlock); - if (code != 0) { + code = blockDataMerge(pHandle->pDataBlock, pBlock); + if (code != TSDB_CODE_SUCCESS) { if (source->param && !source->onlyRef) { taosMemoryFree(source->param); } @@ -689,6 +691,7 @@ static int32_t createInitialSources(SSortHandle* pHandle) { blockDataDestroy(source->src.pBlock); source->src.pBlock = NULL; } + taosMemoryFree(source); return code; } @@ -696,13 +699,17 @@ static int32_t createInitialSources(SSortHandle* pHandle) { int64_t el = taosGetTimestampUs() - p; pHandle->sortElapsed += el; - doAddToBuf(pHandle->pDataBlock, pHandle); + code = doAddToBuf(pHandle->pDataBlock, pHandle); + if (code != TSDB_CODE_SUCCESS) { + return code; + } } } if (source->param && !source->onlyRef) { taosMemoryFree(source->param); } + taosMemoryFree(source); if (pHandle->pDataBlock != NULL && pHandle->pDataBlock->info.rows > 0) { @@ -711,7 +718,7 @@ static int32_t createInitialSources(SSortHandle* pHandle) { // Perform the in-memory sort and then flush data in the buffer into disk. int64_t p = taosGetTimestampUs(); - int32_t code = blockDataSort(pHandle->pDataBlock, pHandle->pSortInfo); + code = blockDataSort(pHandle->pDataBlock, pHandle->pSortInfo); if (code != 0) { return code; } @@ -729,12 +736,12 @@ static int32_t createInitialSources(SSortHandle* pHandle) { pHandle->tupleHandle.pBlock = pHandle->pDataBlock; return 0; } else { - doAddToBuf(pHandle->pDataBlock, pHandle); + code = doAddToBuf(pHandle->pDataBlock, pHandle); } } } - return TSDB_CODE_SUCCESS; + return code; } int32_t tsortOpen(SSortHandle* pHandle) { diff --git a/source/libs/function/src/detail/tminmax.c b/source/libs/function/src/detail/tminmax.c index 847c738655..a511ca97f1 100644 --- a/source/libs/function/src/detail/tminmax.c +++ b/source/libs/function/src/detail/tminmax.c @@ -714,26 +714,18 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc, int32_t* nElems) pBuf->type = type; if (IS_NULL_TYPE(type)) { - numOfElems = 0; goto _over; } // data in current data block are qualified to the query if (pInput->colDataSMAIsSet) { numOfElems = pInput->numOfRows - pAgg->numOfNull; - if (numOfElems == 0) { goto _over; } - void* tval = NULL; int16_t index = 0; - - if (isMinFunc) { - tval = &pInput->pColumnDataAgg[0]->min; - } else { - tval = &pInput->pColumnDataAgg[0]->max; - } + void* tval = (isMinFunc) ? &pInput->pColumnDataAgg[0]->min : &pInput->pColumnDataAgg[0]->max; if (!pBuf->assign) { if (type == TSDB_DATA_TYPE_FLOAT) { @@ -824,8 +816,9 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc, int32_t* nElems) } } + numOfElems = 1; pBuf->assign = true; - return TSDB_CODE_SUCCESS; + goto _over; } int32_t start = pInput->startRowIndex; diff --git a/source/libs/function/src/functionMgt.c b/source/libs/function/src/functionMgt.c index 6ab91a4483..e3127fcd7b 100644 --- a/source/libs/function/src/functionMgt.c +++ b/source/libs/function/src/functionMgt.c @@ -262,6 +262,13 @@ bool fmIsGroupKeyFunc(int32_t funcId) { return FUNCTION_TYPE_GROUP_KEY == funcMgtBuiltins[funcId].type; } +bool fmIsBlockDistFunc(int32_t funcId) { + if (funcId < 0 || funcId >= funcMgtBuiltinsNum) { + return false; + } + return FUNCTION_TYPE_BLOCK_DIST == funcMgtBuiltins[funcId].type; +} + void fmFuncMgtDestroy() { void* m = gFunMgtService.pFuncNameHashTable; if (m != NULL && atomic_val_compare_exchange_ptr((void**)&gFunMgtService.pFuncNameHashTable, m, 0) == m) { diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 723d6d9eee..816842ff4c 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -2019,10 +2019,14 @@ char* nodesGetFillModeString(EFillMode mode) { return "none"; case FILL_MODE_VALUE: return "value"; + case FILL_MODE_VALUE_F: + return "value_f"; case FILL_MODE_PREV: return "prev"; case FILL_MODE_NULL: return "null"; + case FILL_MODE_NULL_F: + return "null_f"; case FILL_MODE_LINEAR: return "linear"; case FILL_MODE_NEXT: diff --git a/source/libs/parser/inc/parInsertUtil.h b/source/libs/parser/inc/parInsertUtil.h index 7b816359f9..303d349b34 100644 --- a/source/libs/parser/inc/parInsertUtil.h +++ b/source/libs/parser/inc/parInsertUtil.h @@ -20,11 +20,11 @@ struct SToken; -#define NEXT_TOKEN(pSql, sToken) \ - do { \ - int32_t index = 0; \ - sToken = tStrGetToken(pSql, &index, false); \ - pSql += index; \ +#define NEXT_TOKEN(pSql, sToken) \ + do { \ + int32_t index = 0; \ + sToken = tStrGetToken(pSql, &index, false, NULL); \ + pSql += index; \ } while (0) #define CHECK_CODE(expr) \ diff --git a/source/libs/parser/inc/parToken.h b/source/libs/parser/inc/parToken.h index 642979c471..86bcc18fd5 100644 --- a/source/libs/parser/inc/parToken.h +++ b/source/libs/parser/inc/parToken.h @@ -55,7 +55,7 @@ uint32_t tGetToken(const char *z, uint32_t *tokenType); * @param isPrevOptr * @return */ -SToken tStrGetToken(const char *str, int32_t *i, bool isPrevOptr); +SToken tStrGetToken(const char *str, int32_t *i, bool isPrevOptr, bool *pIgnoreComma); /** * check if it is a keyword or not diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index eaaa101701..ab30ecaa40 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -1009,12 +1009,14 @@ sliding_opt(A) ::= SLIDING NK_LP duration_literal(B) NK_RP. fill_opt(A) ::= . { A = NULL; } fill_opt(A) ::= FILL NK_LP fill_mode(B) NK_RP. { A = createFillNode(pCxt, B, NULL); } fill_opt(A) ::= FILL NK_LP VALUE NK_COMMA literal_list(B) NK_RP. { A = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, B)); } +fill_opt(A) ::= FILL NK_LP VALUE_F NK_COMMA literal_list(B) NK_RP. { A = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, B)); } %type fill_mode { EFillMode } %destructor fill_mode { } fill_mode(A) ::= NONE. { A = FILL_MODE_NONE; } fill_mode(A) ::= PREV. { A = FILL_MODE_PREV; } fill_mode(A) ::= NULL. { A = FILL_MODE_NULL; } +fill_mode(A) ::= NULL_F. { A = FILL_MODE_NULL_F; } fill_mode(A) ::= LINEAR. { A = FILL_MODE_LINEAR; } fill_mode(A) ::= NEXT. { A = FILL_MODE_NEXT; } diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 630b61bd4b..e82b1edee1 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -18,16 +18,23 @@ #include "tglobal.h" #include "ttime.h" -#define NEXT_TOKEN_WITH_PREV(pSql, token) \ - do { \ - int32_t index = 0; \ - token = tStrGetToken(pSql, &index, true); \ - pSql += index; \ +#define NEXT_TOKEN_WITH_PREV(pSql, token) \ + do { \ + int32_t index = 0; \ + token = tStrGetToken(pSql, &index, true, NULL); \ + pSql += index; \ } while (0) -#define NEXT_TOKEN_KEEP_SQL(pSql, token, index) \ - do { \ - token = tStrGetToken(pSql, &index, false); \ +#define NEXT_TOKEN_WITH_PREV_EXT(pSql, token, pIgnoreComma) \ + do { \ + int32_t index = 0; \ + token = tStrGetToken(pSql, &index, true, pIgnoreComma); \ + pSql += index; \ + } while (0) + +#define NEXT_TOKEN_KEEP_SQL(pSql, token, index) \ + do { \ + token = tStrGetToken(pSql, &index, false, NULL); \ } while (0) #define NEXT_VALID_TOKEN(pSql, token) \ @@ -266,12 +273,12 @@ static int parseTime(const char** end, SToken* pToken, int16_t timePrec, int64_t * e.g., now+12a, now-5h */ index = 0; - SToken token = tStrGetToken(pTokenEnd, &index, false); + SToken token = tStrGetToken(pTokenEnd, &index, false, NULL); pTokenEnd += index; if (token.type == TK_NK_MINUS || token.type == TK_NK_PLUS) { index = 0; - SToken valueToken = tStrGetToken(pTokenEnd, &index, false); + SToken valueToken = tStrGetToken(pTokenEnd, &index, false, NULL); pTokenEnd += index; if (valueToken.n < 2) { @@ -1240,7 +1247,14 @@ static int parseOneRow(SInsertParseContext* pCxt, const char** pSql, STableDataC int32_t code = TSDB_CODE_SUCCESS; // 1. set the parsed value from sql string for (int i = 0; i < pCols->numOfBound && TSDB_CODE_SUCCESS == code; ++i) { - NEXT_TOKEN_WITH_PREV(*pSql, *pToken); + const char* pOrigSql = *pSql; + bool ignoreComma = false; + NEXT_TOKEN_WITH_PREV_EXT(*pSql, *pToken, &ignoreComma); + if (ignoreComma) { + code = buildSyntaxErrMsg(&pCxt->msg, "invalid data or symbol", pOrigSql); + break; + } + SSchema* pSchema = &pSchemas[pCols->pColIndex[i]]; SColVal* pVal = taosArrayGet(pTableCxt->pValues, pCols->pColIndex[i]); @@ -1248,20 +1262,22 @@ static int parseOneRow(SInsertParseContext* pCxt, const char** pSql, STableDataC isParseBindParam = true; if (NULL == pCxt->pComCxt->pStmtCb) { code = buildSyntaxErrMsg(&pCxt->msg, "? only used in stmt", pToken->z); + break; + } + } else { + if (TK_NK_RP == pToken->type) { + code = generateSyntaxErrMsg(&pCxt->msg, TSDB_CODE_PAR_INVALID_COLUMNS_NUM); + break; } - continue; - } - if (TSDB_CODE_SUCCESS == code && TK_NK_RP == pToken->type) { - code = generateSyntaxErrMsg(&pCxt->msg, TSDB_CODE_PAR_INVALID_COLUMNS_NUM); - } + if (isParseBindParam) { + code = buildInvalidOperationMsg(&pCxt->msg, "no mix usage for ? and values"); + break; + } - if (TSDB_CODE_SUCCESS == code && isParseBindParam) { - code = buildInvalidOperationMsg(&pCxt->msg, "no mix usage for ? and values"); - } - - if (TSDB_CODE_SUCCESS == code) { - code = parseValueToken(pCxt, pSql, pToken, pSchema, getTableInfo(pTableCxt->pMeta).precision, pVal); + if (TSDB_CODE_SUCCESS == code) { + code = parseValueToken(pCxt, pSql, pToken, pSchema, getTableInfo(pTableCxt->pMeta).precision, pVal); + } } if (TSDB_CODE_SUCCESS == code && i < pCols->numOfBound - 1) { diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 93bfe179f4..feb2992875 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -149,6 +149,7 @@ static SKeyword keywordTable[] = { {"NOT", TK_NOT}, {"NOW", TK_NOW}, {"NULL", TK_NULL}, + {"NULL_F", TK_NULL_F}, {"NULLS", TK_NULLS}, {"OFFSET", TK_OFFSET}, {"ON", TK_ON}, @@ -239,6 +240,7 @@ static SKeyword keywordTable[] = { {"USERS", TK_USERS}, {"USING", TK_USING}, {"VALUE", TK_VALUE}, + {"VALUE_F", TK_VALUE_F}, {"VALUES", TK_VALUES}, {"VARCHAR", TK_VARCHAR}, {"VARIABLES", TK_VARIABLES}, @@ -624,7 +626,7 @@ uint32_t tGetToken(const char* z, uint32_t* tokenId) { return 0; } -SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr) { +SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr, bool* pIgnoreComma) { SToken t0 = {0}; // here we reach the end of sql string, null-terminated string @@ -645,6 +647,10 @@ SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr) { return t0; } + if (NULL != pIgnoreComma && t == ',') { + *pIgnoreComma = true; + } + t = str[++(*i)]; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 5dceec2cfd..9d6f0a5e8a 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1561,6 +1561,26 @@ static int32_t translateRepeatScanFunc(STranslateContext* pCxt, SFunctionNode* p return TSDB_CODE_SUCCESS; } +static int32_t translateBlockDistFunc(STranslateContext* pCtx, SFunctionNode* pFunc) { + if (!fmIsBlockDistFunc(pFunc->funcId)) { + return TSDB_CODE_SUCCESS; + } + if (!isSelectStmt(pCtx->pCurrStmt)) { + return generateSyntaxErrMsgExt(&pCtx->msgBuf, TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, + "%s is only supported in single table query", pFunc->functionName); + } + SSelectStmt* pSelect = (SSelectStmt*)pCtx->pCurrStmt; + SNode* pTable = pSelect->pFromTable; + if (NULL != pTable && (QUERY_NODE_REAL_TABLE != nodeType(pTable) || + (TSDB_SUPER_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType && + TSDB_CHILD_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType && + TSDB_NORMAL_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType))) { + return generateSyntaxErrMsgExt(&pCtx->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC, + "%s is only supported on super table, child table or normal table", pFunc->functionName); + } + return TSDB_CODE_SUCCESS; +} + static bool isStar(SNode* pNode) { return (QUERY_NODE_COLUMN == nodeType(pNode)) && ('\0' == ((SColumnNode*)pNode)->tableAlias[0]) && (0 == strcmp(((SColumnNode*)pNode)->colName, "*")); @@ -1720,7 +1740,7 @@ static int32_t rewriteSystemInfoFunc(STranslateContext* pCxt, SNode** pNode) { return TSDB_CODE_PAR_INTERNAL_ERROR; } -static int32_t translateNoramlFunction(STranslateContext* pCxt, SFunctionNode* pFunc) { +static int32_t translateNormalFunction(STranslateContext* pCxt, SFunctionNode* pFunc) { int32_t code = translateAggFunc(pCxt, pFunc); if (TSDB_CODE_SUCCESS == code) { code = translateScanPseudoColumnFunc(pCxt, pFunc); @@ -1752,6 +1772,9 @@ static int32_t translateNoramlFunction(STranslateContext* pCxt, SFunctionNode* p if (TSDB_CODE_SUCCESS == code) { code = translateTimelineFunc(pCxt, pFunc); } + if (TSDB_CODE_SUCCESS == code) { + code = translateBlockDistFunc(pCxt, pFunc); + } if (TSDB_CODE_SUCCESS == code) { setFuncClassification(pCxt->pCurrStmt, pFunc); } @@ -1812,7 +1835,7 @@ static int32_t translateFunctionImpl(STranslateContext* pCxt, SFunctionNode** pF if (fmIsClientPseudoColumnFunc((*pFunc)->funcId)) { return rewriteClientPseudoColumnFunc(pCxt, (SNode**)pFunc); } - return translateNoramlFunction(pCxt, *pFunc); + return translateNormalFunction(pCxt, *pFunc); } static EDealRes translateFunction(STranslateContext* pCxt, SFunctionNode** pFunc) { @@ -2798,7 +2821,7 @@ static int32_t convertFillValue(STranslateContext* pCxt, SDataType dt, SNodeList } static int32_t checkFillValues(STranslateContext* pCxt, SFillNode* pFill, SNodeList* pProjectionList) { - if (FILL_MODE_VALUE != pFill->mode) { + if (FILL_MODE_VALUE != pFill->mode && FILL_MODE_VALUE_F != pFill->mode) { return TSDB_CODE_SUCCESS; } diff --git a/source/libs/parser/src/parser.c b/source/libs/parser/src/parser.c index cf338d63ff..47482db740 100644 --- a/source/libs/parser/src/parser.c +++ b/source/libs/parser/src/parser.c @@ -27,7 +27,7 @@ bool qIsInsertValuesSql(const char* pStr, size_t length) { const char* pSql = pStr; int32_t index = 0; - SToken t = tStrGetToken((char*)pStr, &index, false); + SToken t = tStrGetToken((char*)pStr, &index, false, NULL); if (TK_INSERT != t.type && TK_IMPORT != t.type) { return false; } @@ -35,7 +35,7 @@ bool qIsInsertValuesSql(const char* pStr, size_t length) { do { pStr += index; index = 0; - t = tStrGetToken((char*)pStr, &index, false); + t = tStrGetToken((char*)pStr, &index, false, NULL); if (TK_USING == t.type || TK_VALUES == t.type || TK_FILE == t.type) { return true; } else if (TK_SELECT == t.type) { diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 6086858043..5f0bf43f2b 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 467 +#define YYNOCODE 469 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EFillMode yy22; - ENullOrder yy23; - SNode* yy44; - int64_t yy91; - SAlterOption yy153; - bool yy163; - int8_t yy169; - SDataType yy260; - SToken yy455; - EOrder yy490; - SNodeList* yy684; - EOperatorType yy704; - EJoinType yy724; - int32_t yy832; + EOperatorType yy2; + SNode* yy42; + bool yy103; + EOrder yy106; + SNodeList* yy110; + SToken yy225; + EFillMode yy410; + SDataType yy448; + SAlterOption yy459; + int32_t yy508; + ENullOrder yy599; + EJoinType yy638; + int64_t yy641; + int8_t yy705; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 734 -#define YYNRULE 558 -#define YYNTOKEN 326 -#define YY_MAX_SHIFT 733 -#define YY_MIN_SHIFTREDUCE 1089 -#define YY_MAX_SHIFTREDUCE 1646 -#define YY_ERROR_ACTION 1647 -#define YY_ACCEPT_ACTION 1648 -#define YY_NO_ACTION 1649 -#define YY_MIN_REDUCE 1650 -#define YY_MAX_REDUCE 2207 +#define YYNSTATE 737 +#define YYNRULE 560 +#define YYNTOKEN 328 +#define YY_MAX_SHIFT 736 +#define YY_MIN_SHIFTREDUCE 1094 +#define YY_MAX_SHIFTREDUCE 1653 +#define YY_ERROR_ACTION 1654 +#define YY_ACCEPT_ACTION 1655 +#define YY_NO_ACTION 1656 +#define YY_MIN_REDUCE 1657 +#define YY_MAX_REDUCE 2216 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,819 +216,769 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (3082) +#define YY_ACTTAB_COUNT (2837) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 474, 1673, 475, 1686, 1886, 586, 1792, 604, 2007, 2178, - /* 10 */ 1788, 1856, 45, 43, 1576, 480, 1922, 175, 342, 2003, - /* 20 */ 374, 476, 1425, 1794, 585, 181, 419, 1854, 365, 2179, - /* 30 */ 587, 1919, 610, 1506, 2003, 1423, 2021, 2183, 344, 1905, - /* 40 */ 2007, 2178, 38, 37, 1922, 1989, 44, 42, 41, 40, - /* 50 */ 39, 2003, 562, 1999, 2005, 356, 2178, 2182, 1501, 1920, - /* 60 */ 610, 2179, 2181, 18, 633, 177, 327, 2039, 1999, 2005, - /* 70 */ 1431, 2184, 181, 366, 598, 637, 2179, 587, 1843, 633, - /* 80 */ 1989, 163, 639, 45, 43, 1999, 2005, 369, 586, 1959, - /* 90 */ 1805, 374, 2178, 1425, 163, 14, 633, 337, 44, 42, - /* 100 */ 41, 40, 39, 1806, 1506, 139, 1423, 585, 181, 35, - /* 110 */ 285, 2020, 2179, 587, 165, 2056, 1662, 730, 321, 2022, - /* 120 */ 643, 2024, 2025, 638, 636, 633, 624, 2074, 267, 1501, - /* 130 */ 1450, 2008, 1508, 1509, 18, 235, 379, 1982, 1535, 1849, - /* 140 */ 1851, 1431, 2003, 590, 1248, 665, 664, 663, 1252, 662, - /* 150 */ 1254, 1255, 661, 1257, 658, 437, 1263, 655, 1265, 1266, - /* 160 */ 652, 649, 1481, 1491, 436, 60, 14, 91, 1507, 1510, - /* 170 */ 264, 2117, 597, 1781, 132, 596, 1999, 2005, 2178, 41, - /* 180 */ 40, 39, 562, 1426, 1856, 1424, 2178, 633, 730, 348, - /* 190 */ 1122, 353, 1451, 585, 181, 1536, 1850, 1851, 2179, 587, - /* 200 */ 1854, 2184, 181, 1508, 1509, 166, 2179, 587, 1429, 1430, - /* 210 */ 1757, 1480, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, - /* 220 */ 635, 631, 1499, 1500, 1502, 1503, 1504, 1505, 2, 1124, - /* 230 */ 1975, 1127, 1128, 1481, 1491, 492, 622, 85, 121, 1507, - /* 240 */ 1510, 120, 119, 118, 117, 116, 115, 114, 113, 112, - /* 250 */ 349, 135, 347, 346, 1426, 515, 1424, 38, 37, 517, - /* 260 */ 1798, 44, 42, 41, 40, 39, 593, 34, 372, 1530, - /* 270 */ 1531, 1532, 1533, 1534, 1538, 1539, 1540, 1541, 394, 1429, - /* 280 */ 1430, 516, 1480, 1483, 1484, 1485, 1486, 1487, 1488, 1489, - /* 290 */ 1490, 635, 631, 1499, 1500, 1502, 1503, 1504, 1505, 2, - /* 300 */ 377, 11, 45, 43, 1291, 1292, 622, 219, 160, 622, - /* 310 */ 374, 48, 1425, 1651, 609, 354, 184, 1805, 1672, 1141, - /* 320 */ 598, 1140, 170, 1506, 1854, 1423, 2021, 1603, 509, 505, - /* 330 */ 501, 497, 216, 623, 121, 233, 60, 120, 119, 118, - /* 340 */ 117, 116, 115, 114, 113, 112, 1450, 131, 1501, 1580, - /* 350 */ 1142, 139, 1573, 18, 513, 1450, 483, 2039, 475, 1686, - /* 360 */ 1431, 490, 1989, 1915, 1803, 640, 591, 675, 86, 2124, - /* 370 */ 1989, 214, 639, 45, 43, 1511, 573, 1601, 1602, 1604, - /* 380 */ 1605, 374, 1671, 1425, 48, 14, 153, 152, 672, 671, - /* 390 */ 670, 150, 105, 1779, 1506, 2121, 1423, 2021, 88, 332, - /* 400 */ 608, 2020, 546, 2124, 544, 2056, 140, 730, 167, 2022, - /* 410 */ 643, 2024, 2025, 638, 1795, 633, 180, 2117, 2118, 1501, - /* 420 */ 137, 2122, 1508, 1509, 1643, 1450, 1989, 1452, 2039, 2120, - /* 430 */ 64, 1431, 175, 1141, 473, 1140, 640, 478, 1692, 213, - /* 440 */ 207, 1989, 482, 639, 212, 478, 1692, 488, 218, 563, - /* 450 */ 2146, 1670, 1481, 1491, 1906, 677, 46, 1208, 1507, 1510, - /* 460 */ 492, 38, 37, 205, 1142, 44, 42, 41, 40, 39, - /* 470 */ 581, 49, 2020, 1426, 1719, 1424, 2056, 677, 730, 168, - /* 480 */ 2022, 643, 2024, 2025, 638, 8, 633, 184, 1346, 1347, - /* 490 */ 1648, 594, 1210, 1508, 1509, 1989, 598, 1482, 1429, 1430, - /* 500 */ 60, 1480, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, - /* 510 */ 635, 631, 1499, 1500, 1502, 1503, 1504, 1505, 2, 1642, - /* 520 */ 623, 60, 1901, 1481, 1491, 524, 523, 139, 623, 1507, - /* 530 */ 1510, 588, 2199, 189, 186, 184, 623, 1451, 1449, 528, - /* 540 */ 527, 526, 54, 406, 1426, 1537, 1424, 136, 522, 1613, - /* 550 */ 417, 1803, 521, 2039, 1983, 60, 387, 520, 525, 1803, - /* 560 */ 386, 580, 551, 519, 408, 404, 11, 1803, 9, 1429, - /* 570 */ 1430, 266, 1480, 1483, 1484, 1485, 1486, 1487, 1488, 1489, - /* 580 */ 1490, 635, 631, 1499, 1500, 1502, 1503, 1504, 1505, 2, - /* 590 */ 45, 43, 182, 2117, 2118, 1572, 137, 2122, 374, 562, - /* 600 */ 1425, 562, 733, 2178, 2124, 2178, 579, 457, 2183, 13, - /* 610 */ 12, 1506, 2178, 1423, 2021, 623, 292, 32, 2184, 181, - /* 620 */ 2184, 181, 184, 2179, 587, 2179, 587, 1542, 2182, 418, - /* 630 */ 2119, 174, 2179, 2180, 609, 1450, 1501, 723, 719, 715, - /* 640 */ 711, 290, 411, 623, 410, 2039, 1803, 1856, 1431, 1363, - /* 650 */ 1364, 184, 1856, 640, 362, 701, 699, 427, 1989, 367, - /* 660 */ 639, 45, 43, 1854, 85, 197, 196, 409, 1854, 374, - /* 670 */ 1453, 1425, 184, 46, 1803, 2183, 141, 106, 598, 2080, - /* 680 */ 283, 607, 1506, 1915, 1423, 1362, 1365, 1799, 456, 2020, - /* 690 */ 413, 1569, 1452, 2056, 412, 730, 167, 2022, 643, 2024, - /* 700 */ 2025, 638, 1650, 633, 1549, 1453, 184, 1501, 1516, 139, - /* 710 */ 1508, 1509, 420, 619, 1450, 609, 38, 37, 234, 1431, - /* 720 */ 44, 42, 41, 40, 39, 421, 130, 129, 128, 127, - /* 730 */ 126, 125, 124, 123, 122, 562, 623, 11, 2147, 2178, - /* 740 */ 1481, 1491, 1856, 690, 14, 1773, 1507, 1510, 270, 378, - /* 750 */ 131, 668, 27, 269, 2184, 181, 576, 518, 1854, 2179, - /* 760 */ 587, 1426, 618, 1424, 1915, 1669, 730, 1803, 1636, 625, - /* 770 */ 1390, 2081, 238, 600, 179, 2117, 2118, 1482, 137, 2122, - /* 780 */ 1668, 1508, 1509, 1431, 1401, 1402, 1429, 1430, 99, 1480, - /* 790 */ 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 635, 631, - /* 800 */ 1499, 1500, 1502, 1503, 1504, 1505, 2, 623, 689, 1989, - /* 810 */ 1796, 1481, 1491, 330, 190, 1448, 623, 1507, 1510, 623, - /* 820 */ 1901, 442, 450, 224, 1989, 464, 222, 377, 463, 380, - /* 830 */ 443, 191, 1426, 491, 1424, 163, 266, 163, 1803, 542, - /* 840 */ 582, 577, 571, 433, 1805, 465, 1805, 1803, 435, 243, - /* 850 */ 1803, 1667, 540, 1666, 538, 2182, 1482, 1429, 1430, 1790, - /* 860 */ 1480, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 635, - /* 870 */ 631, 1499, 1500, 1502, 1503, 1504, 1505, 2, 1665, 1664, - /* 880 */ 623, 276, 277, 164, 1661, 627, 275, 2081, 305, 345, - /* 890 */ 1716, 528, 527, 526, 1800, 1989, 1786, 1989, 623, 136, - /* 900 */ 522, 423, 303, 71, 521, 1901, 70, 1127, 1128, 520, - /* 910 */ 525, 1803, 236, 38, 37, 519, 195, 44, 42, 41, - /* 920 */ 40, 39, 1989, 1989, 201, 470, 468, 669, 1989, 1803, - /* 930 */ 1847, 461, 2129, 1569, 455, 454, 453, 452, 449, 448, - /* 940 */ 447, 446, 445, 441, 440, 439, 438, 329, 430, 429, - /* 950 */ 428, 1660, 425, 424, 343, 707, 706, 705, 704, 384, - /* 960 */ 60, 703, 702, 143, 697, 696, 695, 694, 693, 692, - /* 970 */ 691, 155, 687, 686, 685, 383, 382, 682, 681, 680, - /* 980 */ 679, 678, 38, 37, 623, 533, 44, 42, 41, 40, - /* 990 */ 39, 623, 667, 1659, 1453, 1989, 104, 31, 558, 107, - /* 1000 */ 543, 1592, 1780, 38, 37, 602, 101, 44, 42, 41, - /* 1010 */ 40, 39, 2021, 33, 232, 1803, 549, 1434, 623, 38, - /* 1020 */ 37, 623, 1803, 44, 42, 41, 40, 39, 1856, 536, - /* 1030 */ 239, 517, 606, 623, 530, 280, 623, 1989, 634, 231, - /* 1040 */ 79, 78, 416, 2039, 1855, 188, 1658, 620, 623, 1803, - /* 1050 */ 621, 601, 1803, 516, 299, 1706, 1989, 1833, 639, 1657, - /* 1060 */ 1656, 562, 286, 328, 1803, 2178, 402, 1803, 400, 396, - /* 1070 */ 392, 389, 409, 1778, 623, 68, 2021, 529, 67, 1803, - /* 1080 */ 2184, 181, 193, 1655, 557, 2179, 587, 2020, 381, 1425, - /* 1090 */ 1989, 2056, 1654, 1433, 108, 2022, 643, 2024, 2025, 638, - /* 1100 */ 1653, 633, 1423, 1989, 1989, 1803, 178, 2039, 2109, 675, - /* 1110 */ 630, 184, 368, 2105, 72, 640, 226, 589, 82, 225, - /* 1120 */ 1989, 81, 639, 51, 1663, 3, 183, 1989, 153, 152, - /* 1130 */ 672, 671, 670, 150, 2135, 2021, 1989, 1431, 244, 1758, - /* 1140 */ 673, 38, 37, 1847, 1989, 44, 42, 41, 40, 39, - /* 1150 */ 674, 2020, 2149, 1847, 151, 2056, 1699, 261, 108, 2022, - /* 1160 */ 643, 2024, 2025, 638, 80, 633, 2039, 1437, 142, 574, - /* 1170 */ 148, 2080, 2109, 145, 601, 133, 368, 2105, 531, 1989, - /* 1180 */ 675, 639, 1645, 1646, 730, 38, 37, 1697, 151, 44, - /* 1190 */ 42, 41, 40, 39, 228, 2021, 151, 227, 217, 153, - /* 1200 */ 152, 672, 671, 670, 150, 230, 53, 242, 229, 534, - /* 1210 */ 2020, 62, 47, 248, 2056, 151, 47, 108, 2022, 643, - /* 1220 */ 2024, 2025, 638, 52, 633, 2010, 2039, 1170, 2040, 178, - /* 1230 */ 561, 2109, 13, 12, 640, 368, 2105, 1693, 273, 1989, - /* 1240 */ 1396, 639, 69, 1436, 255, 385, 89, 149, 1399, 151, - /* 1250 */ 1426, 62, 1424, 47, 2021, 1527, 647, 2136, 149, 151, - /* 1260 */ 134, 149, 1171, 1600, 1492, 250, 1910, 605, 1360, 1687, - /* 1270 */ 2020, 1844, 2139, 2012, 2056, 1429, 1430, 108, 2022, 643, - /* 1280 */ 2024, 2025, 638, 599, 633, 2039, 725, 683, 2021, 2198, - /* 1290 */ 278, 2109, 684, 640, 615, 368, 2105, 162, 1989, 282, - /* 1300 */ 639, 1241, 260, 1543, 263, 298, 2143, 393, 1269, 1189, - /* 1310 */ 1273, 1280, 1278, 154, 1187, 1, 4, 388, 341, 2039, - /* 1320 */ 1383, 293, 194, 422, 1453, 1911, 426, 640, 431, 2020, - /* 1330 */ 1448, 459, 1989, 2056, 639, 444, 108, 2022, 643, 2024, - /* 1340 */ 2025, 638, 1903, 633, 451, 458, 460, 466, 2198, 467, - /* 1350 */ 2109, 198, 469, 471, 368, 2105, 1454, 472, 481, 1456, - /* 1360 */ 484, 204, 1451, 2020, 485, 2156, 206, 2056, 1455, 486, - /* 1370 */ 108, 2022, 643, 2024, 2025, 638, 1457, 633, 487, 209, - /* 1380 */ 489, 2021, 2198, 211, 2109, 493, 83, 84, 368, 2105, - /* 1390 */ 1144, 510, 215, 511, 512, 371, 370, 514, 1793, 569, - /* 1400 */ 550, 2021, 111, 1965, 87, 1439, 221, 331, 1964, 552, - /* 1410 */ 548, 147, 2039, 575, 1789, 237, 1506, 223, 1432, 294, - /* 1420 */ 640, 156, 157, 553, 1791, 1989, 1787, 639, 240, 158, - /* 1430 */ 159, 556, 2039, 559, 2155, 613, 7, 2154, 2131, 584, - /* 1440 */ 640, 1501, 254, 2140, 565, 1989, 171, 639, 566, 567, - /* 1450 */ 572, 357, 578, 1431, 2150, 256, 2020, 257, 2201, 564, - /* 1460 */ 2056, 358, 592, 108, 2022, 643, 2024, 2025, 638, 595, - /* 1470 */ 633, 246, 249, 258, 1569, 2198, 2020, 2109, 1452, 2177, - /* 1480 */ 2056, 368, 2105, 108, 2022, 643, 2024, 2025, 638, 138, - /* 1490 */ 633, 259, 2172, 262, 268, 2198, 2125, 2109, 603, 94, - /* 1500 */ 629, 368, 2105, 361, 1458, 1916, 295, 611, 612, 1930, - /* 1510 */ 1929, 1928, 2128, 296, 364, 616, 96, 617, 297, 1804, - /* 1520 */ 98, 59, 2090, 100, 645, 300, 1774, 1848, 726, 727, - /* 1530 */ 289, 729, 333, 302, 334, 50, 309, 323, 313, 1981, - /* 1540 */ 2021, 1980, 324, 1979, 76, 304, 1976, 390, 391, 1416, - /* 1550 */ 1417, 187, 395, 1974, 397, 398, 399, 1973, 1972, 401, - /* 1560 */ 403, 1971, 405, 1970, 407, 77, 1440, 1386, 1435, 1385, - /* 1570 */ 1942, 2039, 1941, 1940, 414, 415, 1939, 1938, 1337, 640, - /* 1580 */ 1894, 1893, 1891, 1890, 1989, 192, 639, 144, 1889, 1892, - /* 1590 */ 1888, 1443, 1445, 1887, 1885, 1884, 1883, 432, 1882, 434, - /* 1600 */ 2021, 146, 1866, 1865, 631, 1499, 1500, 1502, 1503, 1504, - /* 1610 */ 1505, 1896, 1881, 1880, 1879, 2020, 1878, 1877, 1876, 2056, - /* 1620 */ 1875, 1874, 108, 2022, 643, 2024, 2025, 638, 2021, 633, - /* 1630 */ 1873, 2039, 1872, 1871, 2084, 1870, 2109, 1869, 1868, 640, - /* 1640 */ 368, 2105, 1867, 1864, 1989, 1895, 639, 1863, 1862, 1339, - /* 1650 */ 1861, 1860, 1859, 462, 1858, 1857, 1721, 1216, 199, 2039, - /* 1660 */ 1720, 1718, 200, 1682, 74, 202, 2009, 640, 176, 1681, - /* 1670 */ 1955, 1130, 1989, 477, 639, 2020, 1129, 1949, 479, 2056, - /* 1680 */ 203, 1937, 108, 2022, 643, 2024, 2025, 638, 75, 633, - /* 1690 */ 1936, 210, 208, 1914, 2082, 2021, 2109, 1782, 1163, 1717, - /* 1700 */ 368, 2105, 1715, 2020, 496, 1713, 494, 2056, 1711, 498, - /* 1710 */ 108, 2022, 643, 2024, 2025, 638, 495, 633, 2021, 500, - /* 1720 */ 499, 502, 626, 503, 2109, 1709, 2039, 504, 368, 2105, - /* 1730 */ 507, 506, 1696, 508, 640, 1695, 1678, 1784, 1285, 1989, - /* 1740 */ 61, 639, 1284, 220, 1783, 1207, 1206, 1205, 1204, 2039, - /* 1750 */ 698, 700, 1201, 1200, 1198, 1199, 1707, 640, 1700, 532, - /* 1760 */ 350, 351, 1989, 352, 639, 1698, 535, 1677, 1676, 537, - /* 1770 */ 2020, 1675, 541, 110, 2056, 539, 1954, 109, 2022, 643, - /* 1780 */ 2024, 2025, 638, 1406, 633, 1408, 2021, 1405, 1948, 1392, - /* 1790 */ 1935, 2109, 545, 2020, 161, 2108, 2105, 2056, 1933, 26, - /* 1800 */ 109, 2022, 643, 2024, 2025, 638, 2021, 633, 55, 65, - /* 1810 */ 555, 554, 2183, 19, 2109, 16, 28, 2039, 628, 2105, - /* 1820 */ 1615, 245, 570, 355, 241, 640, 247, 253, 568, 58, - /* 1830 */ 1989, 252, 639, 2010, 20, 30, 560, 2039, 5, 1599, - /* 1840 */ 169, 251, 29, 63, 90, 640, 21, 6, 1630, 1629, - /* 1850 */ 1989, 1591, 639, 1635, 359, 1636, 17, 1634, 1633, 360, - /* 1860 */ 1566, 641, 1565, 265, 57, 2056, 1934, 1932, 109, 2022, - /* 1870 */ 643, 2024, 2025, 638, 172, 633, 1931, 1913, 93, 92, - /* 1880 */ 271, 2020, 2109, 56, 1912, 2056, 336, 2105, 109, 2022, - /* 1890 */ 643, 2024, 2025, 638, 22, 633, 2021, 272, 95, 1597, - /* 1900 */ 274, 279, 2109, 66, 284, 97, 23, 2106, 1518, 614, - /* 1910 */ 12, 1441, 101, 2059, 2021, 10, 281, 1496, 1473, 173, - /* 1920 */ 1517, 632, 185, 1528, 1494, 36, 15, 2039, 1493, 24, - /* 1930 */ 2021, 1465, 642, 25, 646, 640, 376, 1270, 648, 650, - /* 1940 */ 1989, 1267, 639, 644, 651, 2039, 1264, 653, 654, 656, - /* 1950 */ 1258, 657, 659, 640, 1256, 660, 1247, 287, 1989, 666, - /* 1960 */ 639, 2039, 1279, 1262, 102, 1261, 363, 1260, 103, 640, - /* 1970 */ 1275, 2020, 676, 73, 1989, 2056, 639, 1195, 315, 2022, - /* 1980 */ 643, 2024, 2025, 638, 1259, 633, 1161, 1194, 1193, 2020, - /* 1990 */ 1192, 1191, 1190, 2056, 1188, 1186, 168, 2022, 643, 2024, - /* 2000 */ 2025, 638, 2021, 633, 1185, 2020, 1184, 1214, 688, 2056, - /* 2010 */ 288, 1182, 322, 2022, 643, 2024, 2025, 638, 1181, 633, - /* 2020 */ 1180, 1179, 583, 1178, 2021, 1167, 1177, 1176, 1211, 1209, - /* 2030 */ 1173, 1172, 1169, 2039, 1714, 1168, 1166, 708, 1712, 1710, - /* 2040 */ 1708, 637, 712, 1694, 710, 716, 1989, 714, 639, 2200, - /* 2050 */ 718, 720, 709, 722, 713, 2039, 724, 717, 1119, 1674, - /* 2060 */ 373, 721, 728, 640, 291, 1649, 1427, 301, 1989, 731, - /* 2070 */ 639, 732, 1649, 1649, 1649, 1649, 1649, 2020, 1649, 1649, - /* 2080 */ 1649, 2056, 1649, 1649, 321, 2022, 643, 2024, 2025, 638, - /* 2090 */ 1649, 633, 2021, 2075, 1649, 1649, 1649, 1649, 1649, 2020, - /* 2100 */ 1649, 1649, 1649, 2056, 1649, 1649, 322, 2022, 643, 2024, - /* 2110 */ 2025, 638, 2021, 633, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2120 */ 1649, 1649, 1649, 2039, 1649, 1649, 1649, 1649, 375, 1649, - /* 2130 */ 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, - /* 2140 */ 1649, 1649, 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2150 */ 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, - /* 2160 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2020, 1649, 1649, - /* 2170 */ 1649, 2056, 1649, 1649, 322, 2022, 643, 2024, 2025, 638, - /* 2180 */ 2021, 633, 1649, 1649, 1649, 1649, 1649, 547, 1649, 1649, - /* 2190 */ 1649, 2056, 1649, 1649, 317, 2022, 643, 2024, 2025, 638, - /* 2200 */ 2021, 633, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2210 */ 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 640, - /* 2220 */ 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, 1649, 1649, - /* 2230 */ 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 640, - /* 2240 */ 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, 1649, 1649, - /* 2250 */ 1649, 1649, 1649, 1649, 1649, 2020, 1649, 2021, 1649, 2056, - /* 2260 */ 1649, 1649, 306, 2022, 643, 2024, 2025, 638, 1649, 633, - /* 2270 */ 1649, 1649, 1649, 1649, 1649, 2020, 1649, 1649, 1649, 2056, - /* 2280 */ 1649, 1649, 307, 2022, 643, 2024, 2025, 638, 2039, 633, - /* 2290 */ 1649, 2021, 1649, 1649, 1649, 1649, 640, 1649, 1649, 1649, - /* 2300 */ 1649, 1989, 1649, 639, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2310 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2021, - /* 2320 */ 1649, 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2330 */ 640, 1649, 2020, 1649, 1649, 1989, 2056, 639, 1649, 308, - /* 2340 */ 2022, 643, 2024, 2025, 638, 1649, 633, 1649, 1649, 1649, - /* 2350 */ 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 640, 1649, - /* 2360 */ 1649, 1649, 1649, 1989, 1649, 639, 2020, 1649, 1649, 1649, - /* 2370 */ 2056, 1649, 1649, 314, 2022, 643, 2024, 2025, 638, 2021, - /* 2380 */ 633, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2390 */ 1649, 1649, 1649, 1649, 2020, 1649, 1649, 1649, 2056, 1649, - /* 2400 */ 2021, 318, 2022, 643, 2024, 2025, 638, 1649, 633, 1649, - /* 2410 */ 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 640, 1649, - /* 2420 */ 1649, 1649, 1649, 1989, 1649, 639, 1649, 1649, 1649, 1649, - /* 2430 */ 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 640, - /* 2440 */ 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, 1649, 1649, - /* 2450 */ 1649, 1649, 1649, 1649, 2020, 1649, 1649, 1649, 2056, 1649, - /* 2460 */ 1649, 310, 2022, 643, 2024, 2025, 638, 1649, 633, 1649, - /* 2470 */ 1649, 1649, 1649, 2021, 1649, 2020, 1649, 1649, 1649, 2056, - /* 2480 */ 1649, 1649, 319, 2022, 643, 2024, 2025, 638, 1649, 633, - /* 2490 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2021, 1649, 1649, - /* 2500 */ 1649, 1649, 1649, 1649, 2039, 1649, 1649, 1649, 1649, 1649, - /* 2510 */ 1649, 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, 639, - /* 2520 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2039, 1649, - /* 2530 */ 1649, 1649, 1649, 1649, 1649, 1649, 640, 1649, 1649, 1649, - /* 2540 */ 1649, 1989, 1649, 639, 1649, 1649, 1649, 1649, 2020, 1649, - /* 2550 */ 1649, 1649, 2056, 1649, 2021, 311, 2022, 643, 2024, 2025, - /* 2560 */ 638, 1649, 633, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2570 */ 1649, 1649, 2020, 1649, 2021, 1649, 2056, 1649, 1649, 320, - /* 2580 */ 2022, 643, 2024, 2025, 638, 2039, 633, 1649, 1649, 1649, - /* 2590 */ 1649, 1649, 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, - /* 2600 */ 639, 1649, 1649, 1649, 1649, 2039, 1649, 1649, 1649, 1649, - /* 2610 */ 1649, 1649, 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, - /* 2620 */ 639, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2020, - /* 2630 */ 1649, 2021, 1649, 2056, 1649, 1649, 312, 2022, 643, 2024, - /* 2640 */ 2025, 638, 1649, 633, 1649, 1649, 1649, 1649, 1649, 2020, - /* 2650 */ 1649, 1649, 2021, 2056, 1649, 1649, 325, 2022, 643, 2024, - /* 2660 */ 2025, 638, 2039, 633, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2670 */ 640, 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, 1649, - /* 2680 */ 2021, 1649, 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2690 */ 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, - /* 2700 */ 1649, 1649, 1649, 1649, 1649, 1649, 2020, 1649, 1649, 1649, - /* 2710 */ 2056, 2039, 1649, 326, 2022, 643, 2024, 2025, 638, 640, - /* 2720 */ 633, 1649, 1649, 1649, 1989, 1649, 639, 2020, 1649, 1649, - /* 2730 */ 1649, 2056, 1649, 1649, 2033, 2022, 643, 2024, 2025, 638, - /* 2740 */ 2021, 633, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2750 */ 1649, 1649, 1649, 1649, 1649, 2020, 1649, 1649, 1649, 2056, - /* 2760 */ 1649, 2021, 2032, 2022, 643, 2024, 2025, 638, 1649, 633, - /* 2770 */ 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 640, - /* 2780 */ 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, 1649, 1649, - /* 2790 */ 1649, 1649, 2039, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2800 */ 640, 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, 1649, - /* 2810 */ 1649, 1649, 1649, 1649, 1649, 2020, 1649, 1649, 1649, 2056, - /* 2820 */ 1649, 1649, 2031, 2022, 643, 2024, 2025, 638, 1649, 633, - /* 2830 */ 1649, 1649, 1649, 1649, 2021, 1649, 2020, 1649, 1649, 1649, - /* 2840 */ 2056, 1649, 1649, 338, 2022, 643, 2024, 2025, 638, 1649, - /* 2850 */ 633, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2021, 1649, - /* 2860 */ 1649, 1649, 1649, 1649, 1649, 2039, 1649, 1649, 1649, 1649, - /* 2870 */ 1649, 1649, 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, - /* 2880 */ 639, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2039, - /* 2890 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 640, 1649, 1649, - /* 2900 */ 1649, 1649, 1989, 1649, 639, 1649, 1649, 1649, 1649, 2020, - /* 2910 */ 1649, 1649, 1649, 2056, 1649, 2021, 339, 2022, 643, 2024, - /* 2920 */ 2025, 638, 1649, 633, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2930 */ 1649, 1649, 1649, 2020, 1649, 2021, 1649, 2056, 1649, 1649, - /* 2940 */ 335, 2022, 643, 2024, 2025, 638, 2039, 633, 1649, 1649, - /* 2950 */ 1649, 1649, 1649, 1649, 640, 1649, 1649, 1649, 1649, 1989, - /* 2960 */ 1649, 639, 1649, 1649, 1649, 1649, 2039, 1649, 1649, 1649, - /* 2970 */ 1649, 1649, 1649, 1649, 640, 1649, 1649, 1649, 1649, 1989, - /* 2980 */ 1649, 639, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 2990 */ 2020, 1649, 2021, 1649, 2056, 1649, 1649, 340, 2022, 643, - /* 3000 */ 2024, 2025, 638, 1649, 633, 1649, 1649, 1649, 1649, 1649, - /* 3010 */ 641, 1649, 1649, 1649, 2056, 1649, 1649, 317, 2022, 643, - /* 3020 */ 2024, 2025, 638, 2039, 633, 1649, 1649, 1649, 1649, 1649, - /* 3030 */ 1649, 640, 1649, 1649, 1649, 1649, 1989, 1649, 639, 1649, - /* 3040 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 3050 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, 1649, - /* 3060 */ 1649, 1649, 1649, 1649, 1649, 1649, 1649, 2020, 1649, 1649, - /* 3070 */ 1649, 2056, 1649, 1649, 316, 2022, 643, 2024, 2025, 638, - /* 3080 */ 1649, 633, + /* 0 */ 476, 1680, 477, 1693, 1893, 589, 1799, 607, 2014, 2187, + /* 10 */ 1795, 1863, 45, 43, 1581, 482, 1929, 176, 343, 2010, + /* 20 */ 376, 478, 1430, 1801, 588, 182, 421, 1861, 367, 2188, + /* 30 */ 590, 1926, 613, 1511, 2010, 1428, 2028, 2192, 345, 1912, + /* 40 */ 2014, 2187, 38, 37, 1929, 1996, 44, 42, 41, 40, + /* 50 */ 39, 2010, 564, 2006, 2012, 357, 2187, 2191, 1506, 1927, + /* 60 */ 613, 2188, 2190, 18, 636, 178, 328, 2046, 2006, 2012, + /* 70 */ 1436, 2193, 182, 368, 601, 640, 2188, 590, 1850, 636, + /* 80 */ 1996, 164, 642, 45, 43, 2006, 2012, 358, 589, 1455, + /* 90 */ 1812, 376, 2187, 1430, 164, 14, 636, 338, 44, 42, + /* 100 */ 41, 40, 39, 1813, 1511, 140, 1428, 588, 182, 35, + /* 110 */ 286, 2027, 2188, 590, 166, 2063, 1669, 733, 322, 2029, + /* 120 */ 646, 2031, 2032, 641, 639, 636, 627, 2081, 268, 1506, + /* 130 */ 8, 2015, 1513, 1514, 18, 1788, 381, 1989, 1540, 1856, + /* 140 */ 1858, 1436, 2010, 625, 1253, 668, 667, 666, 1257, 665, + /* 150 */ 1259, 1260, 664, 1262, 661, 439, 1268, 658, 1270, 1271, + /* 160 */ 655, 652, 1486, 1496, 438, 61, 14, 92, 1512, 1515, + /* 170 */ 265, 2124, 600, 1585, 133, 599, 2006, 2012, 2187, 1455, + /* 180 */ 1857, 1858, 564, 1431, 1863, 1429, 2187, 636, 733, 349, + /* 190 */ 1127, 354, 1456, 588, 182, 1541, 61, 494, 2188, 590, + /* 200 */ 1861, 2193, 182, 1513, 1514, 167, 2188, 590, 1434, 1435, + /* 210 */ 1764, 1485, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, + /* 220 */ 638, 634, 1504, 1505, 1507, 1508, 1509, 1510, 2, 1129, + /* 230 */ 611, 1132, 1133, 1486, 1496, 494, 49, 86, 122, 1512, + /* 240 */ 1515, 121, 120, 119, 118, 117, 116, 115, 114, 113, + /* 250 */ 350, 136, 348, 347, 1431, 517, 1429, 38, 37, 519, + /* 260 */ 1805, 44, 42, 41, 40, 39, 584, 34, 374, 1535, + /* 270 */ 1536, 1537, 1538, 1539, 1543, 1544, 1545, 1546, 1456, 1434, + /* 280 */ 1435, 518, 1485, 1488, 1489, 1490, 1491, 1492, 1493, 1494, + /* 290 */ 1495, 638, 634, 1504, 1505, 1507, 1508, 1509, 1510, 2, + /* 300 */ 379, 11, 45, 43, 1296, 1297, 2046, 220, 161, 612, + /* 310 */ 376, 1863, 1430, 1658, 583, 355, 185, 1812, 364, 680, + /* 320 */ 601, 1487, 171, 1511, 1861, 1428, 2028, 1861, 511, 507, + /* 330 */ 503, 499, 217, 1990, 122, 535, 1574, 121, 120, 119, + /* 340 */ 118, 117, 116, 115, 114, 113, 1454, 185, 1506, 61, + /* 350 */ 545, 140, 485, 18, 477, 1693, 492, 2046, 1922, 582, + /* 360 */ 1436, 1146, 1679, 1145, 233, 643, 234, 2131, 87, 379, + /* 370 */ 1996, 215, 642, 45, 43, 1516, 219, 164, 564, 538, + /* 380 */ 579, 376, 2187, 1430, 532, 14, 1812, 185, 1863, 232, + /* 390 */ 1368, 1369, 1147, 2128, 1511, 369, 1428, 2193, 182, 65, + /* 400 */ 1455, 2027, 2188, 590, 1861, 2063, 1996, 733, 168, 2029, + /* 410 */ 646, 2031, 2032, 641, 553, 636, 181, 2124, 2125, 1506, + /* 420 */ 138, 2129, 1513, 1514, 1650, 69, 1367, 1370, 68, 89, + /* 430 */ 333, 1436, 100, 548, 382, 546, 413, 601, 412, 214, + /* 440 */ 208, 626, 164, 1982, 213, 2131, 626, 490, 612, 565, + /* 450 */ 2153, 1812, 1486, 1496, 1803, 132, 46, 1657, 1512, 1515, + /* 460 */ 132, 411, 515, 206, 585, 580, 573, 520, 140, 86, + /* 470 */ 625, 2127, 1810, 1431, 1726, 1429, 475, 1810, 733, 480, + /* 480 */ 1699, 131, 130, 129, 128, 127, 126, 125, 124, 123, + /* 490 */ 61, 396, 1806, 1513, 1514, 610, 601, 1922, 1434, 1435, + /* 500 */ 185, 1485, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, + /* 510 */ 638, 634, 1504, 1505, 1507, 1508, 1509, 1510, 2, 2192, + /* 520 */ 2028, 1649, 1521, 1486, 1496, 1787, 625, 140, 1455, 1512, + /* 530 */ 1515, 176, 603, 180, 2124, 2125, 1457, 138, 2129, 530, + /* 540 */ 529, 528, 1351, 1352, 1431, 48, 1429, 137, 524, 1863, + /* 550 */ 1455, 2046, 523, 1913, 13, 12, 380, 522, 527, 604, + /* 560 */ 11, 612, 9, 521, 1996, 1861, 642, 526, 525, 1434, + /* 570 */ 1435, 1678, 1485, 1488, 1489, 1490, 1491, 1492, 1493, 1494, + /* 580 */ 1495, 638, 634, 1504, 1505, 1507, 1508, 1509, 1510, 2, + /* 590 */ 45, 43, 183, 2124, 2125, 2027, 138, 2129, 376, 2063, + /* 600 */ 1430, 48, 109, 2029, 646, 2031, 2032, 641, 621, 636, + /* 610 */ 1922, 1511, 1643, 1428, 179, 1996, 2116, 1863, 459, 2028, + /* 620 */ 370, 2112, 1213, 38, 37, 61, 11, 44, 42, 41, + /* 630 */ 40, 39, 678, 1862, 184, 1458, 1506, 1677, 408, 38, + /* 640 */ 37, 185, 2142, 44, 42, 41, 40, 39, 1436, 1554, + /* 650 */ 2046, 154, 153, 675, 674, 673, 151, 1215, 643, 410, + /* 660 */ 406, 45, 43, 1996, 1457, 642, 1542, 2014, 2192, 376, + /* 670 */ 1487, 1430, 2187, 46, 2131, 1786, 198, 197, 2010, 194, + /* 680 */ 267, 1996, 1511, 235, 1428, 2028, 484, 415, 2191, 480, + /* 690 */ 1699, 414, 2188, 2189, 2027, 733, 185, 2017, 2063, 458, + /* 700 */ 2126, 169, 2029, 646, 2031, 2032, 641, 1506, 636, 1785, + /* 710 */ 1513, 1514, 2006, 2012, 371, 83, 2046, 519, 82, 1436, + /* 720 */ 628, 106, 2088, 636, 643, 277, 278, 1620, 626, 1996, + /* 730 */ 276, 642, 564, 671, 1676, 141, 2187, 680, 32, 518, + /* 740 */ 1486, 1496, 287, 1802, 14, 2019, 1512, 1515, 1547, 1406, + /* 750 */ 1407, 2193, 182, 591, 2208, 142, 2188, 590, 2087, 1810, + /* 760 */ 2027, 1431, 544, 1429, 2063, 1436, 733, 168, 2029, 646, + /* 770 */ 2031, 2032, 641, 52, 636, 542, 185, 540, 1996, 245, + /* 780 */ 563, 1513, 1514, 41, 40, 39, 1434, 1435, 633, 1485, + /* 790 */ 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 638, 634, + /* 800 */ 1504, 1505, 1507, 1508, 1509, 1510, 2, 422, 267, 2154, + /* 810 */ 626, 1486, 1496, 331, 1175, 1453, 678, 1512, 1515, 1908, + /* 820 */ 423, 630, 452, 2088, 187, 466, 704, 702, 465, 693, + /* 830 */ 190, 1780, 1431, 1908, 1429, 154, 153, 675, 674, 673, + /* 840 */ 151, 1810, 1675, 435, 192, 467, 38, 37, 437, 1176, + /* 850 */ 44, 42, 41, 40, 39, 1578, 1458, 1434, 1435, 1966, + /* 860 */ 1485, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 638, + /* 870 */ 634, 1504, 1505, 1507, 1508, 1509, 1510, 2, 73, 1674, + /* 880 */ 626, 626, 626, 165, 1132, 1133, 1996, 1908, 306, 346, + /* 890 */ 1723, 530, 529, 528, 54, 419, 420, 692, 196, 137, + /* 900 */ 524, 425, 304, 72, 523, 236, 71, 1652, 1653, 522, + /* 910 */ 527, 1810, 1810, 1810, 1797, 521, 672, 1655, 676, 1854, + /* 920 */ 1146, 1854, 1145, 1996, 202, 472, 470, 677, 81, 300, + /* 930 */ 1854, 463, 1840, 1532, 457, 456, 455, 454, 451, 450, + /* 940 */ 449, 448, 447, 443, 442, 441, 440, 330, 432, 431, + /* 950 */ 430, 1147, 427, 426, 344, 710, 709, 708, 707, 386, + /* 960 */ 61, 706, 705, 144, 700, 699, 698, 697, 696, 695, + /* 970 */ 694, 156, 690, 689, 688, 385, 384, 685, 684, 683, + /* 980 */ 682, 681, 1673, 389, 38, 37, 1672, 388, 44, 42, + /* 990 */ 41, 40, 39, 1671, 1668, 1667, 626, 1458, 225, 108, + /* 1000 */ 191, 223, 1666, 2136, 1574, 2028, 1609, 1455, 38, 37, + /* 1010 */ 429, 31, 44, 42, 41, 40, 39, 38, 37, 1793, + /* 1020 */ 27, 44, 42, 41, 40, 39, 1996, 1810, 564, 2191, + /* 1030 */ 1996, 1665, 2187, 1664, 1663, 1662, 2046, 1996, 1996, 1996, + /* 1040 */ 80, 79, 418, 152, 643, 189, 1996, 2193, 182, 1996, + /* 1050 */ 626, 642, 2188, 590, 596, 576, 575, 1607, 1608, 1610, + /* 1060 */ 1611, 1612, 152, 329, 444, 51, 404, 3, 402, 398, + /* 1070 */ 394, 391, 411, 2028, 1661, 1996, 1660, 1996, 1996, 1996, + /* 1080 */ 2027, 1810, 152, 146, 2063, 134, 1713, 109, 2029, 646, + /* 1090 */ 2031, 2032, 641, 2028, 636, 1401, 1597, 143, 1577, 149, + /* 1100 */ 2087, 2116, 593, 670, 2046, 370, 2112, 227, 531, 1706, + /* 1110 */ 226, 185, 604, 229, 53, 33, 228, 1996, 1996, 642, + /* 1120 */ 1996, 38, 37, 678, 2046, 44, 42, 41, 40, 39, + /* 1130 */ 231, 533, 643, 230, 1404, 13, 12, 1996, 559, 642, + /* 1140 */ 626, 244, 154, 153, 675, 674, 673, 151, 2027, 1487, + /* 1150 */ 626, 243, 2063, 1439, 445, 109, 2029, 646, 2031, 2032, + /* 1160 */ 641, 1704, 636, 240, 493, 63, 2028, 179, 2027, 2116, + /* 1170 */ 637, 1810, 2063, 370, 2112, 109, 2029, 646, 2031, 2032, + /* 1180 */ 641, 1810, 636, 536, 63, 626, 249, 2207, 626, 2116, + /* 1190 */ 90, 1670, 626, 370, 2112, 2143, 1765, 2046, 2156, 1807, + /* 1200 */ 2028, 626, 237, 105, 2150, 643, 560, 152, 1438, 47, + /* 1210 */ 1996, 274, 642, 102, 262, 605, 1810, 1606, 70, 1810, + /* 1220 */ 150, 38, 37, 1810, 152, 44, 42, 41, 40, 39, + /* 1230 */ 577, 2046, 1810, 626, 2028, 2047, 1605, 218, 251, 643, + /* 1240 */ 626, 2027, 256, 626, 1996, 2063, 642, 609, 109, 2029, + /* 1250 */ 646, 2031, 2032, 641, 281, 636, 387, 623, 1694, 608, + /* 1260 */ 2207, 1365, 2116, 279, 1810, 2046, 370, 2112, 2028, 686, + /* 1270 */ 618, 1810, 283, 643, 1810, 2027, 1246, 2163, 1996, 2063, + /* 1280 */ 642, 597, 109, 2029, 646, 2031, 2032, 641, 63, 636, + /* 1290 */ 47, 1194, 47, 592, 2207, 1917, 2116, 650, 1851, 2046, + /* 1300 */ 370, 2112, 2146, 1442, 150, 602, 390, 643, 626, 2027, + /* 1310 */ 626, 571, 1996, 2063, 642, 152, 109, 2029, 646, 2031, + /* 1320 */ 2032, 641, 624, 636, 383, 261, 687, 594, 2207, 551, + /* 1330 */ 2116, 1700, 135, 150, 370, 2112, 264, 1, 4, 1810, + /* 1340 */ 1548, 1810, 1497, 2027, 299, 2181, 395, 2063, 1192, 1274, + /* 1350 */ 109, 2029, 646, 2031, 2032, 641, 1278, 636, 1441, 342, + /* 1360 */ 373, 372, 2207, 1388, 2116, 195, 294, 1285, 370, 2112, + /* 1370 */ 1444, 424, 1458, 2028, 564, 1430, 1918, 163, 2187, 2135, + /* 1380 */ 728, 1511, 461, 1437, 1283, 155, 428, 433, 1428, 1453, + /* 1390 */ 446, 1910, 460, 2193, 182, 453, 468, 462, 2188, 590, + /* 1400 */ 2028, 469, 199, 471, 2046, 473, 1506, 1459, 474, 483, + /* 1410 */ 1461, 1456, 643, 205, 487, 207, 486, 1996, 1436, 642, + /* 1420 */ 1460, 488, 1462, 1436, 489, 210, 550, 491, 212, 84, + /* 1430 */ 85, 2046, 2028, 495, 216, 1149, 514, 512, 513, 643, + /* 1440 */ 516, 1800, 1972, 238, 1996, 552, 642, 332, 2027, 1971, + /* 1450 */ 222, 112, 2063, 1796, 224, 109, 2029, 646, 2031, 2032, + /* 1460 */ 641, 157, 636, 2046, 2028, 632, 158, 2091, 1798, 2116, + /* 1470 */ 733, 643, 1794, 370, 2112, 2027, 1996, 159, 642, 2063, + /* 1480 */ 88, 160, 109, 2029, 646, 2031, 2032, 641, 554, 636, + /* 1490 */ 241, 561, 2147, 558, 2089, 2046, 2116, 568, 295, 578, + /* 1500 */ 370, 2112, 2157, 643, 2162, 148, 616, 2027, 1996, 2161, + /* 1510 */ 642, 2063, 574, 247, 169, 2029, 646, 2031, 2032, 641, + /* 1520 */ 555, 636, 250, 359, 581, 7, 566, 567, 587, 2138, + /* 1530 */ 569, 1445, 260, 1440, 2186, 598, 1431, 2028, 1429, 2027, + /* 1540 */ 360, 2210, 595, 2063, 1574, 258, 109, 2029, 646, 2031, + /* 1550 */ 2032, 641, 363, 636, 172, 139, 1448, 1450, 629, 257, + /* 1560 */ 2116, 1434, 1435, 1457, 370, 2112, 2132, 2209, 2046, 634, + /* 1570 */ 1504, 1505, 1507, 1508, 1509, 1510, 643, 255, 606, 269, + /* 1580 */ 95, 1996, 259, 642, 1463, 1923, 263, 619, 296, 614, + /* 1590 */ 615, 1937, 1936, 1935, 297, 366, 620, 2028, 97, 298, + /* 1600 */ 99, 1811, 60, 101, 648, 2097, 1781, 1855, 301, 729, + /* 1610 */ 730, 290, 2027, 732, 334, 335, 2063, 2028, 1988, 110, + /* 1620 */ 2029, 646, 2031, 2032, 641, 50, 636, 325, 2046, 310, + /* 1630 */ 305, 324, 1987, 2116, 314, 303, 643, 2115, 2112, 1986, + /* 1640 */ 77, 1996, 1983, 642, 392, 393, 1421, 1422, 2046, 188, + /* 1650 */ 397, 1981, 399, 401, 400, 1980, 643, 403, 1979, 405, + /* 1660 */ 1978, 1996, 407, 642, 1977, 409, 78, 1391, 1390, 1949, + /* 1670 */ 1948, 1947, 2027, 416, 417, 1946, 2063, 2028, 1342, 110, + /* 1680 */ 2029, 646, 2031, 2032, 641, 1945, 636, 1901, 1900, 1898, + /* 1690 */ 145, 1897, 644, 2116, 434, 193, 2063, 631, 2112, 110, + /* 1700 */ 2029, 646, 2031, 2032, 641, 2028, 636, 1896, 2046, 1899, + /* 1710 */ 1895, 1894, 1892, 2116, 1891, 1890, 643, 337, 2112, 1889, + /* 1720 */ 436, 1996, 1903, 642, 1888, 1887, 1886, 1885, 1884, 1883, + /* 1730 */ 1882, 1881, 1880, 1879, 1878, 1877, 2046, 1876, 1875, 1874, + /* 1740 */ 147, 1873, 1872, 1871, 643, 1902, 1870, 1869, 1868, 1996, + /* 1750 */ 1867, 642, 2027, 1866, 1865, 464, 2063, 1864, 1344, 110, + /* 1760 */ 2029, 646, 2031, 2032, 641, 1728, 636, 1727, 1725, 1689, + /* 1770 */ 2016, 2028, 1168, 2116, 200, 1221, 201, 1135, 2113, 1688, + /* 1780 */ 2027, 1962, 1956, 1944, 2063, 1134, 203, 316, 2029, 646, + /* 1790 */ 2031, 2032, 641, 177, 636, 2028, 204, 75, 479, 481, + /* 1800 */ 76, 209, 2046, 1943, 1921, 1789, 1724, 365, 211, 1722, + /* 1810 */ 643, 496, 497, 498, 1720, 1996, 502, 642, 501, 500, + /* 1820 */ 1718, 504, 1716, 505, 506, 508, 2046, 1703, 509, 1702, + /* 1830 */ 736, 586, 510, 1685, 640, 1791, 1290, 1289, 1790, 1996, + /* 1840 */ 701, 642, 1212, 1211, 293, 1210, 2027, 1209, 1206, 1714, + /* 1850 */ 2063, 1205, 1204, 323, 2029, 646, 2031, 2032, 641, 175, + /* 1860 */ 636, 221, 703, 2028, 62, 726, 722, 718, 714, 291, + /* 1870 */ 2027, 1203, 351, 1707, 2063, 352, 534, 322, 2029, 646, + /* 1880 */ 2031, 2032, 641, 2028, 636, 1705, 2082, 353, 1684, 537, + /* 1890 */ 539, 1683, 541, 1682, 2046, 111, 543, 1411, 1410, 375, + /* 1900 */ 547, 1961, 643, 1397, 1955, 107, 162, 1996, 284, 642, + /* 1910 */ 1942, 556, 1940, 1413, 2046, 19, 26, 2192, 66, 377, + /* 1920 */ 28, 242, 643, 16, 1622, 570, 246, 1996, 572, 642, + /* 1930 */ 55, 58, 20, 248, 59, 1604, 170, 557, 2027, 252, + /* 1940 */ 253, 622, 2063, 29, 2028, 323, 2029, 646, 2031, 2032, + /* 1950 */ 641, 356, 636, 254, 1596, 2017, 91, 30, 2027, 64, + /* 1960 */ 2028, 562, 2063, 5, 21, 323, 2029, 646, 2031, 2032, + /* 1970 */ 641, 6, 636, 1642, 1643, 2046, 271, 1571, 1637, 1636, + /* 1980 */ 361, 270, 1641, 643, 1640, 362, 266, 173, 1996, 1941, + /* 1990 */ 642, 2046, 57, 1570, 1939, 1938, 1920, 93, 1395, 643, + /* 2000 */ 239, 94, 272, 273, 1996, 1602, 642, 617, 1919, 2028, + /* 2010 */ 22, 275, 280, 67, 96, 285, 282, 98, 23, 549, + /* 2020 */ 12, 1446, 56, 2063, 102, 2028, 318, 2029, 646, 2031, + /* 2030 */ 2032, 641, 1533, 636, 1501, 2027, 2066, 174, 1478, 2063, + /* 2040 */ 2046, 17, 307, 2029, 646, 2031, 2032, 641, 643, 636, + /* 2050 */ 10, 186, 635, 1996, 1499, 642, 2046, 1498, 36, 15, + /* 2060 */ 24, 1523, 1470, 1522, 643, 25, 645, 1275, 649, 1996, + /* 2070 */ 378, 642, 651, 647, 1272, 654, 653, 1269, 656, 657, + /* 2080 */ 659, 1263, 660, 662, 2027, 1252, 669, 663, 2063, 1261, + /* 2090 */ 288, 308, 2029, 646, 2031, 2032, 641, 103, 636, 1284, + /* 2100 */ 2027, 1267, 1266, 2028, 2063, 1265, 104, 309, 2029, 646, + /* 2110 */ 2031, 2032, 641, 1280, 636, 74, 1264, 1166, 679, 2028, + /* 2120 */ 1200, 1199, 1198, 1197, 1196, 1195, 691, 1193, 1191, 1190, + /* 2130 */ 1189, 1219, 1187, 1186, 2046, 1185, 1184, 1183, 1182, 1181, + /* 2140 */ 289, 1216, 643, 1214, 1178, 1177, 1174, 1996, 1173, 642, + /* 2150 */ 2046, 1172, 1171, 1721, 711, 712, 1719, 713, 643, 715, + /* 2160 */ 716, 717, 1717, 1996, 720, 642, 719, 721, 1715, 723, + /* 2170 */ 1701, 724, 725, 727, 1124, 1681, 2028, 292, 2027, 731, + /* 2180 */ 735, 1432, 2063, 302, 734, 315, 2029, 646, 2031, 2032, + /* 2190 */ 641, 1656, 636, 1656, 2027, 2028, 1656, 1656, 2063, 1656, + /* 2200 */ 1656, 319, 2029, 646, 2031, 2032, 641, 2046, 636, 1656, + /* 2210 */ 1656, 1656, 1656, 1656, 1656, 643, 1656, 1656, 1656, 1656, + /* 2220 */ 1996, 1656, 642, 1656, 1656, 1656, 2046, 1656, 1656, 1656, + /* 2230 */ 1656, 1656, 1656, 1656, 643, 1656, 1656, 1656, 1656, 1996, + /* 2240 */ 1656, 642, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2250 */ 1656, 2027, 1656, 1656, 2028, 2063, 1656, 1656, 311, 2029, + /* 2260 */ 646, 2031, 2032, 641, 1656, 636, 1656, 1656, 1656, 1656, + /* 2270 */ 2027, 1656, 1656, 2028, 2063, 1656, 1656, 320, 2029, 646, + /* 2280 */ 2031, 2032, 641, 1656, 636, 2046, 1656, 1656, 1656, 1656, + /* 2290 */ 1656, 1656, 1656, 643, 1656, 1656, 1656, 1656, 1996, 1656, + /* 2300 */ 642, 1656, 1656, 1656, 2046, 1656, 1656, 1656, 1656, 1656, + /* 2310 */ 1656, 1656, 643, 1656, 1656, 1656, 1656, 1996, 1656, 642, + /* 2320 */ 1656, 1656, 2028, 1656, 1656, 1656, 1656, 1656, 1656, 2027, + /* 2330 */ 1656, 1656, 1656, 2063, 1656, 1656, 312, 2029, 646, 2031, + /* 2340 */ 2032, 641, 1656, 636, 1656, 1656, 1656, 1656, 2027, 1656, + /* 2350 */ 1656, 1656, 2063, 2046, 1656, 321, 2029, 646, 2031, 2032, + /* 2360 */ 641, 643, 636, 1656, 1656, 1656, 1996, 1656, 642, 1656, + /* 2370 */ 1656, 2028, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2380 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 2028, 1656, 1656, + /* 2390 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 2027, 1656, 1656, + /* 2400 */ 1656, 2063, 2046, 2028, 313, 2029, 646, 2031, 2032, 641, + /* 2410 */ 643, 636, 1656, 1656, 1656, 1996, 1656, 642, 2046, 1656, + /* 2420 */ 1656, 1656, 1656, 1656, 1656, 1656, 643, 1656, 1656, 1656, + /* 2430 */ 1656, 1996, 1656, 642, 2046, 1656, 1656, 1656, 1656, 1656, + /* 2440 */ 1656, 1656, 643, 1656, 1656, 1656, 2027, 1996, 1656, 642, + /* 2450 */ 2063, 1656, 1656, 326, 2029, 646, 2031, 2032, 641, 1656, + /* 2460 */ 636, 1656, 2027, 1656, 1656, 1656, 2063, 1656, 1656, 327, + /* 2470 */ 2029, 646, 2031, 2032, 641, 1656, 636, 1656, 2027, 2028, + /* 2480 */ 1656, 1656, 2063, 1656, 1656, 2040, 2029, 646, 2031, 2032, + /* 2490 */ 641, 1656, 636, 1656, 1656, 2028, 1656, 1656, 1656, 1656, + /* 2500 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2510 */ 2046, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 643, 1656, + /* 2520 */ 1656, 1656, 1656, 1996, 1656, 642, 2046, 1656, 1656, 1656, + /* 2530 */ 1656, 1656, 1656, 1656, 643, 1656, 1656, 1656, 1656, 1996, + /* 2540 */ 1656, 642, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2550 */ 1656, 1656, 2028, 1656, 2027, 1656, 1656, 1656, 2063, 1656, + /* 2560 */ 1656, 2039, 2029, 646, 2031, 2032, 641, 1656, 636, 1656, + /* 2570 */ 2027, 2028, 1656, 1656, 2063, 1656, 1656, 2038, 2029, 646, + /* 2580 */ 2031, 2032, 641, 2046, 636, 1656, 1656, 1656, 1656, 1656, + /* 2590 */ 1656, 643, 1656, 1656, 1656, 1656, 1996, 1656, 642, 1656, + /* 2600 */ 1656, 1656, 2046, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2610 */ 643, 1656, 1656, 1656, 1656, 1996, 1656, 642, 1656, 1656, + /* 2620 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 2027, 1656, 1656, + /* 2630 */ 2028, 2063, 1656, 1656, 339, 2029, 646, 2031, 2032, 641, + /* 2640 */ 1656, 636, 1656, 1656, 1656, 1656, 2027, 1656, 1656, 2028, + /* 2650 */ 2063, 1656, 1656, 340, 2029, 646, 2031, 2032, 641, 1656, + /* 2660 */ 636, 2046, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 643, + /* 2670 */ 1656, 1656, 1656, 1656, 1996, 1656, 642, 1656, 1656, 1656, + /* 2680 */ 2046, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 643, 1656, + /* 2690 */ 1656, 1656, 1656, 1996, 1656, 642, 1656, 1656, 2028, 1656, + /* 2700 */ 1656, 1656, 1656, 1656, 1656, 2027, 1656, 1656, 1656, 2063, + /* 2710 */ 1656, 1656, 336, 2029, 646, 2031, 2032, 641, 1656, 636, + /* 2720 */ 1656, 1656, 1656, 1656, 2027, 1656, 1656, 1656, 2063, 2046, + /* 2730 */ 1656, 341, 2029, 646, 2031, 2032, 641, 643, 636, 1656, + /* 2740 */ 1656, 1656, 1996, 1656, 642, 1656, 1656, 2028, 1656, 1656, + /* 2750 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2760 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2770 */ 1656, 1656, 1656, 644, 1656, 1656, 1656, 2063, 2046, 1656, + /* 2780 */ 318, 2029, 646, 2031, 2032, 641, 643, 636, 1656, 1656, + /* 2790 */ 1656, 1996, 1656, 642, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2800 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2810 */ 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, 1656, + /* 2820 */ 1656, 1656, 2027, 1656, 1656, 1656, 2063, 1656, 1656, 317, + /* 2830 */ 2029, 646, 2031, 2032, 641, 1656, 636, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 333, 329, 335, 336, 0, 437, 361, 392, 362, 441, - /* 10 */ 361, 360, 12, 13, 14, 14, 375, 360, 367, 373, - /* 20 */ 20, 20, 22, 362, 456, 457, 337, 376, 387, 461, - /* 30 */ 462, 390, 391, 33, 373, 35, 329, 437, 381, 382, - /* 40 */ 362, 441, 8, 9, 375, 373, 12, 13, 14, 15, - /* 50 */ 16, 373, 437, 407, 408, 409, 441, 457, 58, 390, - /* 60 */ 391, 461, 462, 63, 418, 359, 377, 360, 407, 408, - /* 70 */ 70, 456, 457, 352, 337, 368, 461, 462, 372, 418, - /* 80 */ 373, 360, 375, 12, 13, 407, 408, 409, 437, 356, - /* 90 */ 369, 20, 441, 22, 360, 95, 418, 63, 12, 13, - /* 100 */ 14, 15, 16, 369, 33, 368, 35, 456, 457, 426, - /* 110 */ 427, 404, 461, 462, 328, 408, 330, 117, 411, 412, - /* 120 */ 413, 414, 415, 416, 417, 418, 419, 420, 58, 58, - /* 130 */ 20, 362, 132, 133, 63, 402, 371, 392, 104, 374, - /* 140 */ 375, 70, 373, 44, 108, 109, 110, 111, 112, 113, + /* 0 */ 335, 331, 337, 338, 0, 439, 363, 394, 364, 443, + /* 10 */ 363, 362, 12, 13, 14, 14, 377, 362, 369, 375, + /* 20 */ 20, 20, 22, 364, 458, 459, 339, 378, 389, 463, + /* 30 */ 464, 392, 393, 33, 375, 35, 331, 439, 383, 384, + /* 40 */ 364, 443, 8, 9, 377, 375, 12, 13, 14, 15, + /* 50 */ 16, 375, 439, 409, 410, 411, 443, 459, 58, 392, + /* 60 */ 393, 463, 464, 63, 420, 361, 379, 362, 409, 410, + /* 70 */ 70, 458, 459, 354, 339, 370, 463, 464, 374, 420, + /* 80 */ 375, 362, 377, 12, 13, 409, 410, 411, 439, 20, + /* 90 */ 371, 20, 443, 22, 362, 95, 420, 63, 12, 13, + /* 100 */ 14, 15, 16, 371, 33, 370, 35, 458, 459, 428, + /* 110 */ 429, 406, 463, 464, 330, 410, 332, 117, 413, 414, + /* 120 */ 415, 416, 417, 418, 419, 420, 421, 422, 58, 58, + /* 130 */ 39, 364, 132, 133, 63, 0, 373, 394, 104, 376, + /* 140 */ 377, 70, 375, 20, 108, 109, 110, 111, 112, 113, /* 150 */ 114, 115, 116, 117, 118, 151, 120, 121, 122, 123, /* 160 */ 124, 125, 162, 163, 160, 95, 95, 97, 168, 169, - /* 170 */ 433, 434, 435, 0, 437, 438, 407, 408, 441, 14, - /* 180 */ 15, 16, 437, 183, 360, 185, 441, 418, 117, 37, - /* 190 */ 4, 367, 20, 456, 457, 161, 374, 375, 461, 462, - /* 200 */ 376, 456, 457, 132, 133, 344, 461, 462, 208, 209, - /* 210 */ 349, 211, 212, 213, 214, 215, 216, 217, 218, 219, + /* 170 */ 435, 436, 437, 14, 439, 440, 409, 410, 443, 20, + /* 180 */ 376, 377, 439, 183, 362, 185, 443, 420, 117, 37, + /* 190 */ 4, 369, 20, 458, 459, 161, 95, 62, 463, 464, + /* 200 */ 378, 458, 459, 132, 133, 346, 463, 464, 208, 209, + /* 210 */ 351, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 43, - /* 230 */ 0, 45, 46, 162, 163, 62, 20, 343, 21, 168, + /* 230 */ 20, 45, 46, 162, 163, 62, 95, 345, 21, 168, /* 240 */ 169, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 250 */ 98, 357, 100, 101, 183, 103, 185, 8, 9, 107, - /* 260 */ 366, 12, 13, 14, 15, 16, 44, 233, 234, 235, - /* 270 */ 236, 237, 238, 239, 240, 241, 242, 243, 48, 208, + /* 250 */ 98, 359, 100, 101, 183, 103, 185, 8, 9, 107, + /* 260 */ 368, 12, 13, 14, 15, 16, 20, 233, 234, 235, + /* 270 */ 236, 237, 238, 239, 240, 241, 242, 243, 20, 208, /* 280 */ 209, 129, 211, 212, 213, 214, 215, 216, 217, 218, /* 290 */ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - /* 300 */ 352, 230, 12, 13, 132, 133, 20, 33, 360, 20, - /* 310 */ 20, 95, 22, 0, 337, 367, 246, 369, 329, 20, - /* 320 */ 337, 22, 48, 33, 376, 35, 329, 208, 54, 55, - /* 330 */ 56, 57, 58, 337, 21, 127, 95, 24, 25, 26, - /* 340 */ 27, 28, 29, 30, 31, 32, 20, 351, 58, 14, - /* 350 */ 51, 368, 4, 63, 358, 20, 333, 360, 335, 336, - /* 360 */ 70, 384, 373, 386, 368, 368, 267, 107, 94, 410, - /* 370 */ 373, 97, 375, 12, 13, 14, 257, 258, 259, 260, - /* 380 */ 261, 20, 329, 22, 95, 95, 126, 127, 128, 129, - /* 390 */ 130, 131, 341, 0, 33, 436, 35, 329, 190, 191, - /* 400 */ 20, 404, 194, 410, 196, 408, 355, 117, 411, 412, - /* 410 */ 413, 414, 415, 416, 363, 418, 433, 434, 435, 58, - /* 420 */ 437, 438, 132, 133, 175, 20, 373, 20, 360, 436, - /* 430 */ 4, 70, 360, 20, 334, 22, 368, 337, 338, 165, - /* 440 */ 166, 373, 334, 375, 170, 337, 338, 173, 35, 452, - /* 450 */ 453, 329, 162, 163, 382, 62, 95, 35, 168, 169, - /* 460 */ 62, 8, 9, 189, 51, 12, 13, 14, 15, 16, - /* 470 */ 20, 95, 404, 183, 0, 185, 408, 62, 117, 411, - /* 480 */ 412, 413, 414, 415, 416, 39, 418, 246, 162, 163, - /* 490 */ 326, 269, 70, 132, 133, 373, 337, 162, 208, 209, - /* 500 */ 95, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 510 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 270, - /* 520 */ 337, 95, 368, 162, 163, 346, 347, 368, 337, 168, - /* 530 */ 169, 463, 464, 379, 351, 246, 337, 20, 20, 65, - /* 540 */ 66, 67, 351, 178, 183, 161, 185, 73, 74, 96, - /* 550 */ 351, 368, 78, 360, 392, 95, 392, 83, 84, 368, - /* 560 */ 396, 368, 106, 89, 199, 200, 230, 368, 232, 208, - /* 570 */ 209, 164, 211, 212, 213, 214, 215, 216, 217, 218, + /* 300 */ 354, 230, 12, 13, 132, 133, 362, 33, 362, 339, + /* 310 */ 20, 362, 22, 0, 370, 369, 246, 371, 369, 62, + /* 320 */ 339, 162, 48, 33, 378, 35, 331, 378, 54, 55, + /* 330 */ 56, 57, 58, 394, 21, 4, 245, 24, 25, 26, + /* 340 */ 27, 28, 29, 30, 31, 32, 20, 246, 58, 95, + /* 350 */ 19, 370, 335, 63, 337, 338, 386, 362, 388, 415, + /* 360 */ 70, 20, 331, 22, 33, 370, 127, 412, 94, 354, + /* 370 */ 375, 97, 377, 12, 13, 14, 35, 362, 439, 48, + /* 380 */ 167, 20, 443, 22, 53, 95, 371, 246, 362, 58, + /* 390 */ 132, 133, 51, 438, 33, 369, 35, 458, 459, 4, + /* 400 */ 20, 406, 463, 464, 378, 410, 375, 117, 413, 414, + /* 410 */ 415, 416, 417, 418, 106, 420, 435, 436, 437, 58, + /* 420 */ 439, 440, 132, 133, 175, 94, 168, 169, 97, 190, + /* 430 */ 191, 70, 343, 194, 354, 196, 182, 339, 184, 165, + /* 440 */ 166, 339, 362, 0, 170, 412, 339, 173, 339, 454, + /* 450 */ 455, 371, 162, 163, 365, 353, 95, 0, 168, 169, + /* 460 */ 353, 207, 360, 189, 251, 252, 253, 360, 370, 345, + /* 470 */ 20, 438, 370, 183, 0, 185, 336, 370, 117, 339, + /* 480 */ 340, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 490 */ 95, 48, 368, 132, 133, 386, 339, 388, 208, 209, + /* 500 */ 246, 211, 212, 213, 214, 215, 216, 217, 218, 219, + /* 510 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 3, + /* 520 */ 331, 272, 14, 162, 163, 0, 20, 370, 20, 168, + /* 530 */ 169, 362, 434, 435, 436, 437, 20, 439, 440, 65, + /* 540 */ 66, 67, 162, 163, 183, 95, 185, 73, 74, 362, + /* 550 */ 20, 362, 78, 384, 1, 2, 369, 83, 84, 370, + /* 560 */ 230, 339, 232, 89, 375, 378, 377, 348, 349, 208, + /* 570 */ 209, 331, 211, 212, 213, 214, 215, 216, 217, 218, /* 580 */ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - /* 590 */ 12, 13, 433, 434, 435, 247, 437, 438, 20, 437, - /* 600 */ 22, 437, 19, 441, 410, 441, 413, 79, 437, 1, - /* 610 */ 2, 33, 441, 35, 329, 337, 33, 233, 456, 457, - /* 620 */ 456, 457, 246, 461, 462, 461, 462, 243, 457, 351, - /* 630 */ 436, 48, 461, 462, 337, 20, 58, 54, 55, 56, - /* 640 */ 57, 58, 182, 337, 184, 360, 368, 360, 70, 132, - /* 650 */ 133, 246, 360, 368, 367, 346, 347, 351, 373, 367, - /* 660 */ 375, 12, 13, 376, 343, 137, 138, 207, 376, 20, - /* 670 */ 20, 22, 246, 95, 368, 3, 421, 94, 337, 424, - /* 680 */ 97, 384, 33, 386, 35, 168, 169, 366, 160, 404, - /* 690 */ 392, 245, 20, 408, 396, 117, 411, 412, 413, 414, - /* 700 */ 415, 416, 0, 418, 96, 20, 246, 58, 14, 368, - /* 710 */ 132, 133, 22, 130, 20, 337, 8, 9, 126, 70, - /* 720 */ 12, 13, 14, 15, 16, 35, 24, 25, 26, 27, - /* 730 */ 28, 29, 30, 31, 32, 437, 337, 230, 453, 441, - /* 740 */ 162, 163, 360, 348, 95, 350, 168, 169, 165, 367, - /* 750 */ 351, 106, 44, 170, 456, 457, 167, 358, 376, 461, - /* 760 */ 462, 183, 384, 185, 386, 329, 117, 368, 96, 422, - /* 770 */ 187, 424, 189, 432, 433, 434, 435, 162, 437, 438, - /* 780 */ 329, 132, 133, 70, 192, 193, 208, 209, 341, 211, + /* 590 */ 12, 13, 435, 436, 437, 406, 439, 440, 20, 410, + /* 600 */ 22, 95, 413, 414, 415, 416, 417, 418, 386, 420, + /* 610 */ 388, 33, 96, 35, 425, 375, 427, 362, 79, 331, + /* 620 */ 431, 432, 35, 8, 9, 95, 230, 12, 13, 14, + /* 630 */ 15, 16, 107, 378, 445, 20, 58, 331, 178, 8, + /* 640 */ 9, 246, 453, 12, 13, 14, 15, 16, 70, 96, + /* 650 */ 362, 126, 127, 128, 129, 130, 131, 70, 370, 199, + /* 660 */ 200, 12, 13, 375, 20, 377, 161, 364, 439, 20, + /* 670 */ 162, 22, 443, 95, 412, 0, 137, 138, 375, 58, + /* 680 */ 164, 375, 33, 126, 35, 331, 336, 394, 459, 339, + /* 690 */ 340, 398, 463, 464, 406, 117, 246, 47, 410, 160, + /* 700 */ 438, 413, 414, 415, 416, 417, 418, 58, 420, 0, + /* 710 */ 132, 133, 409, 410, 411, 94, 362, 107, 97, 70, + /* 720 */ 424, 343, 426, 420, 370, 126, 127, 96, 339, 375, + /* 730 */ 131, 377, 439, 106, 331, 357, 443, 62, 233, 129, + /* 740 */ 162, 163, 353, 365, 95, 95, 168, 169, 243, 192, + /* 750 */ 193, 458, 459, 465, 466, 423, 463, 464, 426, 370, + /* 760 */ 406, 183, 21, 185, 410, 70, 117, 413, 414, 415, + /* 770 */ 416, 417, 418, 164, 420, 34, 246, 36, 375, 164, + /* 780 */ 171, 132, 133, 14, 15, 16, 208, 209, 63, 211, /* 790 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 800 */ 222, 223, 224, 225, 226, 227, 228, 337, 70, 373, - /* 810 */ 363, 162, 163, 18, 164, 20, 337, 168, 169, 337, - /* 820 */ 368, 351, 27, 99, 373, 30, 102, 352, 33, 352, - /* 830 */ 351, 379, 183, 351, 185, 360, 164, 360, 368, 21, - /* 840 */ 251, 252, 253, 48, 369, 50, 369, 368, 53, 164, - /* 850 */ 368, 329, 34, 329, 36, 3, 162, 208, 209, 361, + /* 800 */ 222, 223, 224, 225, 226, 227, 228, 22, 164, 455, + /* 810 */ 339, 162, 163, 18, 35, 20, 107, 168, 169, 370, + /* 820 */ 35, 424, 27, 426, 353, 30, 348, 349, 33, 350, + /* 830 */ 381, 352, 183, 370, 185, 126, 127, 128, 129, 130, + /* 840 */ 131, 370, 331, 48, 381, 50, 8, 9, 53, 70, + /* 850 */ 12, 13, 14, 15, 16, 4, 20, 208, 209, 358, /* 860 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - /* 870 */ 221, 222, 223, 224, 225, 226, 227, 228, 329, 329, - /* 880 */ 337, 126, 127, 18, 329, 422, 131, 424, 23, 94, - /* 890 */ 0, 65, 66, 67, 351, 373, 361, 373, 337, 73, - /* 900 */ 74, 106, 37, 38, 78, 368, 41, 45, 46, 83, - /* 910 */ 84, 368, 351, 8, 9, 89, 379, 12, 13, 14, - /* 920 */ 15, 16, 373, 373, 59, 60, 61, 370, 373, 368, - /* 930 */ 373, 136, 244, 245, 139, 140, 141, 142, 143, 144, + /* 870 */ 221, 222, 223, 224, 225, 226, 227, 228, 106, 331, + /* 880 */ 339, 339, 339, 18, 45, 46, 375, 370, 23, 94, + /* 890 */ 0, 65, 66, 67, 353, 353, 353, 70, 381, 73, + /* 900 */ 74, 106, 37, 38, 78, 404, 41, 132, 133, 83, + /* 910 */ 84, 370, 370, 370, 363, 89, 372, 328, 372, 375, + /* 920 */ 20, 375, 22, 375, 59, 60, 61, 372, 156, 355, + /* 930 */ 375, 136, 358, 208, 139, 140, 141, 142, 143, 144, /* 940 */ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - /* 950 */ 155, 329, 157, 158, 159, 65, 66, 67, 68, 69, + /* 950 */ 155, 51, 157, 158, 159, 65, 66, 67, 68, 69, /* 960 */ 95, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 970 */ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - /* 980 */ 90, 91, 8, 9, 337, 4, 12, 13, 14, 15, - /* 990 */ 16, 337, 361, 329, 20, 373, 95, 2, 351, 134, - /* 1000 */ 19, 96, 0, 8, 9, 351, 105, 12, 13, 14, - /* 1010 */ 15, 16, 329, 2, 33, 368, 392, 35, 337, 8, - /* 1020 */ 9, 337, 368, 12, 13, 14, 15, 16, 360, 48, - /* 1030 */ 361, 107, 351, 337, 53, 351, 337, 373, 361, 58, - /* 1040 */ 175, 176, 177, 360, 376, 180, 329, 351, 337, 368, - /* 1050 */ 351, 368, 368, 129, 353, 0, 373, 356, 375, 329, - /* 1060 */ 329, 437, 351, 198, 368, 441, 201, 368, 203, 204, - /* 1070 */ 205, 206, 207, 0, 337, 94, 329, 22, 97, 368, - /* 1080 */ 456, 457, 58, 329, 397, 461, 462, 404, 351, 22, - /* 1090 */ 373, 408, 329, 35, 411, 412, 413, 414, 415, 416, - /* 1100 */ 329, 418, 35, 373, 373, 368, 423, 360, 425, 107, - /* 1110 */ 63, 246, 429, 430, 106, 368, 99, 265, 94, 102, - /* 1120 */ 373, 97, 375, 42, 330, 44, 443, 373, 126, 127, - /* 1130 */ 128, 129, 130, 131, 451, 329, 373, 70, 164, 349, - /* 1140 */ 370, 8, 9, 373, 373, 12, 13, 14, 15, 16, - /* 1150 */ 370, 404, 383, 373, 44, 408, 0, 465, 411, 412, - /* 1160 */ 413, 414, 415, 416, 156, 418, 360, 185, 421, 454, - /* 1170 */ 423, 424, 425, 42, 368, 44, 429, 430, 22, 373, - /* 1180 */ 107, 375, 132, 133, 117, 8, 9, 0, 44, 12, - /* 1190 */ 13, 14, 15, 16, 99, 329, 44, 102, 339, 126, - /* 1200 */ 127, 128, 129, 130, 131, 99, 96, 58, 102, 22, - /* 1210 */ 404, 44, 44, 44, 408, 44, 44, 411, 412, 413, - /* 1220 */ 414, 415, 416, 164, 418, 47, 360, 35, 360, 423, - /* 1230 */ 171, 425, 1, 2, 368, 429, 430, 0, 44, 373, - /* 1240 */ 96, 375, 44, 185, 448, 339, 97, 44, 96, 44, - /* 1250 */ 183, 44, 185, 44, 329, 208, 44, 451, 44, 44, - /* 1260 */ 44, 44, 70, 96, 96, 96, 383, 96, 96, 336, - /* 1270 */ 404, 372, 383, 95, 408, 208, 209, 411, 412, 413, - /* 1280 */ 414, 415, 416, 439, 418, 360, 49, 13, 329, 423, - /* 1290 */ 96, 425, 13, 368, 96, 429, 430, 164, 373, 96, - /* 1300 */ 375, 96, 431, 96, 458, 96, 440, 48, 96, 35, - /* 1310 */ 96, 96, 96, 96, 35, 442, 248, 406, 405, 360, - /* 1320 */ 181, 394, 42, 380, 20, 383, 380, 368, 378, 404, - /* 1330 */ 20, 161, 373, 408, 375, 337, 411, 412, 413, 414, - /* 1340 */ 415, 416, 337, 418, 380, 378, 378, 93, 423, 345, - /* 1350 */ 425, 337, 337, 337, 429, 430, 20, 331, 331, 20, - /* 1360 */ 399, 343, 20, 404, 375, 440, 343, 408, 20, 338, - /* 1370 */ 411, 412, 413, 414, 415, 416, 20, 418, 393, 343, - /* 1380 */ 338, 329, 423, 343, 425, 337, 343, 343, 429, 430, - /* 1390 */ 52, 340, 343, 340, 331, 12, 13, 360, 360, 440, - /* 1400 */ 403, 329, 337, 373, 95, 22, 360, 331, 373, 188, - /* 1410 */ 197, 401, 360, 256, 360, 341, 33, 360, 35, 399, - /* 1420 */ 368, 360, 360, 398, 360, 373, 360, 375, 341, 360, - /* 1430 */ 360, 375, 360, 337, 447, 255, 262, 447, 450, 174, - /* 1440 */ 368, 58, 449, 383, 263, 373, 447, 375, 373, 264, - /* 1450 */ 373, 373, 373, 70, 383, 446, 404, 445, 466, 249, - /* 1460 */ 408, 271, 266, 411, 412, 413, 414, 415, 416, 268, - /* 1470 */ 418, 388, 388, 444, 245, 423, 404, 425, 20, 460, - /* 1480 */ 408, 429, 430, 411, 412, 413, 414, 415, 416, 368, - /* 1490 */ 418, 406, 440, 459, 341, 423, 410, 425, 337, 341, - /* 1500 */ 117, 429, 430, 338, 20, 386, 388, 373, 373, 373, - /* 1510 */ 373, 373, 440, 388, 373, 166, 341, 385, 356, 368, - /* 1520 */ 341, 95, 428, 95, 364, 337, 350, 373, 36, 332, - /* 1530 */ 341, 331, 389, 342, 389, 395, 354, 354, 354, 0, - /* 1540 */ 329, 0, 400, 0, 42, 327, 0, 35, 202, 35, - /* 1550 */ 35, 35, 202, 0, 35, 35, 202, 0, 0, 202, - /* 1560 */ 35, 0, 22, 0, 35, 190, 183, 185, 185, 183, - /* 1570 */ 0, 360, 0, 0, 179, 178, 0, 0, 47, 368, - /* 1580 */ 0, 0, 0, 0, 373, 151, 375, 42, 0, 0, - /* 1590 */ 0, 208, 209, 0, 0, 0, 0, 35, 0, 151, - /* 1600 */ 329, 42, 0, 0, 221, 222, 223, 224, 225, 226, - /* 1610 */ 227, 0, 0, 0, 0, 404, 0, 0, 0, 408, - /* 1620 */ 0, 0, 411, 412, 413, 414, 415, 416, 329, 418, - /* 1630 */ 0, 360, 0, 0, 423, 0, 425, 0, 0, 368, - /* 1640 */ 429, 430, 0, 0, 373, 0, 375, 0, 0, 22, - /* 1650 */ 0, 0, 0, 135, 0, 0, 0, 35, 58, 360, - /* 1660 */ 0, 0, 58, 0, 39, 42, 47, 368, 44, 0, - /* 1670 */ 0, 14, 373, 47, 375, 404, 14, 0, 47, 408, - /* 1680 */ 40, 0, 411, 412, 413, 414, 415, 416, 39, 418, - /* 1690 */ 0, 174, 39, 0, 423, 329, 425, 0, 64, 0, - /* 1700 */ 429, 430, 0, 404, 39, 0, 35, 408, 0, 35, - /* 1710 */ 411, 412, 413, 414, 415, 416, 48, 418, 329, 39, - /* 1720 */ 48, 35, 423, 48, 425, 0, 360, 39, 429, 430, - /* 1730 */ 48, 35, 0, 39, 368, 0, 0, 0, 35, 373, - /* 1740 */ 104, 375, 22, 102, 0, 35, 35, 35, 35, 360, - /* 1750 */ 44, 44, 35, 35, 35, 22, 0, 368, 0, 50, - /* 1760 */ 22, 22, 373, 22, 375, 0, 35, 0, 0, 35, - /* 1770 */ 404, 0, 22, 20, 408, 35, 0, 411, 412, 413, - /* 1780 */ 414, 415, 416, 35, 418, 96, 329, 35, 0, 35, - /* 1790 */ 0, 425, 195, 404, 186, 429, 430, 408, 0, 95, - /* 1800 */ 411, 412, 413, 414, 415, 416, 329, 418, 164, 95, - /* 1810 */ 164, 22, 3, 44, 425, 250, 95, 360, 429, 430, - /* 1820 */ 96, 95, 254, 164, 166, 368, 96, 47, 229, 44, - /* 1830 */ 373, 44, 375, 47, 250, 44, 172, 360, 171, 96, - /* 1840 */ 95, 95, 95, 3, 95, 368, 44, 171, 35, 35, - /* 1850 */ 373, 96, 375, 96, 35, 96, 250, 35, 35, 35, - /* 1860 */ 96, 404, 96, 47, 44, 408, 0, 0, 411, 412, - /* 1870 */ 413, 414, 415, 416, 47, 418, 0, 0, 39, 95, - /* 1880 */ 47, 404, 425, 244, 0, 408, 429, 430, 411, 412, - /* 1890 */ 413, 414, 415, 416, 95, 418, 329, 96, 39, 96, - /* 1900 */ 95, 95, 425, 95, 47, 95, 44, 430, 229, 167, - /* 1910 */ 2, 22, 105, 95, 329, 231, 165, 96, 22, 47, - /* 1920 */ 229, 95, 47, 208, 96, 95, 95, 360, 96, 95, - /* 1930 */ 329, 96, 210, 95, 35, 368, 35, 96, 95, 35, - /* 1940 */ 373, 96, 375, 106, 95, 360, 96, 35, 95, 35, - /* 1950 */ 96, 95, 35, 368, 96, 95, 22, 44, 373, 107, - /* 1960 */ 375, 360, 35, 119, 95, 119, 365, 119, 95, 368, - /* 1970 */ 22, 404, 63, 95, 373, 408, 375, 35, 411, 412, - /* 1980 */ 413, 414, 415, 416, 119, 418, 64, 35, 35, 404, - /* 1990 */ 35, 35, 35, 408, 35, 35, 411, 412, 413, 414, - /* 2000 */ 415, 416, 329, 418, 35, 404, 35, 70, 92, 408, - /* 2010 */ 44, 35, 411, 412, 413, 414, 415, 416, 35, 418, - /* 2020 */ 35, 22, 455, 35, 329, 22, 35, 35, 70, 35, - /* 2030 */ 35, 35, 35, 360, 0, 35, 35, 35, 0, 0, - /* 2040 */ 0, 368, 35, 0, 39, 35, 373, 39, 375, 464, - /* 2050 */ 39, 35, 48, 39, 48, 360, 35, 48, 35, 0, - /* 2060 */ 365, 48, 21, 368, 22, 467, 22, 22, 373, 21, - /* 2070 */ 375, 20, 467, 467, 467, 467, 467, 404, 467, 467, - /* 2080 */ 467, 408, 467, 467, 411, 412, 413, 414, 415, 416, - /* 2090 */ 467, 418, 329, 420, 467, 467, 467, 467, 467, 404, - /* 2100 */ 467, 467, 467, 408, 467, 467, 411, 412, 413, 414, - /* 2110 */ 415, 416, 329, 418, 467, 467, 467, 467, 467, 467, - /* 2120 */ 467, 467, 467, 360, 467, 467, 467, 467, 365, 467, - /* 2130 */ 467, 368, 467, 467, 467, 467, 373, 467, 375, 467, - /* 2140 */ 467, 467, 467, 360, 467, 467, 467, 467, 467, 467, - /* 2150 */ 467, 368, 467, 467, 467, 467, 373, 467, 375, 467, - /* 2160 */ 467, 467, 467, 467, 467, 467, 467, 404, 467, 467, - /* 2170 */ 467, 408, 467, 467, 411, 412, 413, 414, 415, 416, - /* 2180 */ 329, 418, 467, 467, 467, 467, 467, 404, 467, 467, - /* 2190 */ 467, 408, 467, 467, 411, 412, 413, 414, 415, 416, - /* 2200 */ 329, 418, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2210 */ 467, 360, 467, 467, 467, 467, 467, 467, 467, 368, - /* 2220 */ 467, 467, 467, 467, 373, 467, 375, 467, 467, 467, - /* 2230 */ 467, 360, 467, 467, 467, 467, 467, 467, 467, 368, - /* 2240 */ 467, 467, 467, 467, 373, 467, 375, 467, 467, 467, - /* 2250 */ 467, 467, 467, 467, 467, 404, 467, 329, 467, 408, - /* 2260 */ 467, 467, 411, 412, 413, 414, 415, 416, 467, 418, - /* 2270 */ 467, 467, 467, 467, 467, 404, 467, 467, 467, 408, - /* 2280 */ 467, 467, 411, 412, 413, 414, 415, 416, 360, 418, - /* 2290 */ 467, 329, 467, 467, 467, 467, 368, 467, 467, 467, - /* 2300 */ 467, 373, 467, 375, 467, 467, 467, 467, 467, 467, - /* 2310 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 329, - /* 2320 */ 467, 467, 360, 467, 467, 467, 467, 467, 467, 467, - /* 2330 */ 368, 467, 404, 467, 467, 373, 408, 375, 467, 411, - /* 2340 */ 412, 413, 414, 415, 416, 467, 418, 467, 467, 467, - /* 2350 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467, - /* 2360 */ 467, 467, 467, 373, 467, 375, 404, 467, 467, 467, - /* 2370 */ 408, 467, 467, 411, 412, 413, 414, 415, 416, 329, - /* 2380 */ 418, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2390 */ 467, 467, 467, 467, 404, 467, 467, 467, 408, 467, - /* 2400 */ 329, 411, 412, 413, 414, 415, 416, 467, 418, 467, - /* 2410 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467, - /* 2420 */ 467, 467, 467, 373, 467, 375, 467, 467, 467, 467, - /* 2430 */ 467, 360, 467, 467, 467, 467, 467, 467, 467, 368, - /* 2440 */ 467, 467, 467, 467, 373, 467, 375, 467, 467, 467, - /* 2450 */ 467, 467, 467, 467, 404, 467, 467, 467, 408, 467, - /* 2460 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, 467, - /* 2470 */ 467, 467, 467, 329, 467, 404, 467, 467, 467, 408, - /* 2480 */ 467, 467, 411, 412, 413, 414, 415, 416, 467, 418, - /* 2490 */ 467, 467, 467, 467, 467, 467, 467, 329, 467, 467, - /* 2500 */ 467, 467, 467, 467, 360, 467, 467, 467, 467, 467, - /* 2510 */ 467, 467, 368, 467, 467, 467, 467, 373, 467, 375, - /* 2520 */ 467, 467, 467, 467, 467, 467, 467, 467, 360, 467, - /* 2530 */ 467, 467, 467, 467, 467, 467, 368, 467, 467, 467, - /* 2540 */ 467, 373, 467, 375, 467, 467, 467, 467, 404, 467, - /* 2550 */ 467, 467, 408, 467, 329, 411, 412, 413, 414, 415, - /* 2560 */ 416, 467, 418, 467, 467, 467, 467, 467, 467, 467, - /* 2570 */ 467, 467, 404, 467, 329, 467, 408, 467, 467, 411, - /* 2580 */ 412, 413, 414, 415, 416, 360, 418, 467, 467, 467, - /* 2590 */ 467, 467, 467, 368, 467, 467, 467, 467, 373, 467, - /* 2600 */ 375, 467, 467, 467, 467, 360, 467, 467, 467, 467, - /* 2610 */ 467, 467, 467, 368, 467, 467, 467, 467, 373, 467, - /* 2620 */ 375, 467, 467, 467, 467, 467, 467, 467, 467, 404, - /* 2630 */ 467, 329, 467, 408, 467, 467, 411, 412, 413, 414, - /* 2640 */ 415, 416, 467, 418, 467, 467, 467, 467, 467, 404, - /* 2650 */ 467, 467, 329, 408, 467, 467, 411, 412, 413, 414, - /* 2660 */ 415, 416, 360, 418, 467, 467, 467, 467, 467, 467, - /* 2670 */ 368, 467, 467, 467, 467, 373, 467, 375, 467, 467, - /* 2680 */ 329, 467, 467, 360, 467, 467, 467, 467, 467, 467, - /* 2690 */ 467, 368, 467, 467, 467, 467, 373, 467, 375, 467, - /* 2700 */ 467, 467, 467, 467, 467, 467, 404, 467, 467, 467, - /* 2710 */ 408, 360, 467, 411, 412, 413, 414, 415, 416, 368, - /* 2720 */ 418, 467, 467, 467, 373, 467, 375, 404, 467, 467, - /* 2730 */ 467, 408, 467, 467, 411, 412, 413, 414, 415, 416, - /* 2740 */ 329, 418, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2750 */ 467, 467, 467, 467, 467, 404, 467, 467, 467, 408, - /* 2760 */ 467, 329, 411, 412, 413, 414, 415, 416, 467, 418, - /* 2770 */ 467, 360, 467, 467, 467, 467, 467, 467, 467, 368, - /* 2780 */ 467, 467, 467, 467, 373, 467, 375, 467, 467, 467, - /* 2790 */ 467, 467, 360, 467, 467, 467, 467, 467, 467, 467, - /* 2800 */ 368, 467, 467, 467, 467, 373, 467, 375, 467, 467, - /* 2810 */ 467, 467, 467, 467, 467, 404, 467, 467, 467, 408, - /* 2820 */ 467, 467, 411, 412, 413, 414, 415, 416, 467, 418, - /* 2830 */ 467, 467, 467, 467, 329, 467, 404, 467, 467, 467, - /* 2840 */ 408, 467, 467, 411, 412, 413, 414, 415, 416, 467, - /* 2850 */ 418, 467, 467, 467, 467, 467, 467, 467, 329, 467, - /* 2860 */ 467, 467, 467, 467, 467, 360, 467, 467, 467, 467, - /* 2870 */ 467, 467, 467, 368, 467, 467, 467, 467, 373, 467, - /* 2880 */ 375, 467, 467, 467, 467, 467, 467, 467, 467, 360, - /* 2890 */ 467, 467, 467, 467, 467, 467, 467, 368, 467, 467, - /* 2900 */ 467, 467, 373, 467, 375, 467, 467, 467, 467, 404, - /* 2910 */ 467, 467, 467, 408, 467, 329, 411, 412, 413, 414, - /* 2920 */ 415, 416, 467, 418, 467, 467, 467, 467, 467, 467, - /* 2930 */ 467, 467, 467, 404, 467, 329, 467, 408, 467, 467, - /* 2940 */ 411, 412, 413, 414, 415, 416, 360, 418, 467, 467, - /* 2950 */ 467, 467, 467, 467, 368, 467, 467, 467, 467, 373, - /* 2960 */ 467, 375, 467, 467, 467, 467, 360, 467, 467, 467, - /* 2970 */ 467, 467, 467, 467, 368, 467, 467, 467, 467, 373, - /* 2980 */ 467, 375, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2990 */ 404, 467, 329, 467, 408, 467, 467, 411, 412, 413, - /* 3000 */ 414, 415, 416, 467, 418, 467, 467, 467, 467, 467, - /* 3010 */ 404, 467, 467, 467, 408, 467, 467, 411, 412, 413, - /* 3020 */ 414, 415, 416, 360, 418, 467, 467, 467, 467, 467, - /* 3030 */ 467, 368, 467, 467, 467, 467, 373, 467, 375, 467, - /* 3040 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 3050 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 3060 */ 467, 467, 467, 467, 467, 467, 467, 404, 467, 467, - /* 3070 */ 467, 408, 467, 467, 411, 412, 413, 414, 415, 416, - /* 3080 */ 467, 418, + /* 980 */ 90, 91, 331, 394, 8, 9, 331, 398, 12, 13, + /* 990 */ 14, 15, 16, 331, 331, 331, 339, 20, 99, 134, + /* 1000 */ 164, 102, 331, 244, 245, 331, 208, 20, 8, 9, + /* 1010 */ 353, 2, 12, 13, 14, 15, 16, 8, 9, 363, + /* 1020 */ 44, 12, 13, 14, 15, 16, 375, 370, 439, 3, + /* 1030 */ 375, 331, 443, 331, 331, 331, 362, 375, 375, 375, + /* 1040 */ 175, 176, 177, 44, 370, 180, 375, 458, 459, 375, + /* 1050 */ 339, 377, 463, 464, 44, 257, 258, 259, 260, 261, + /* 1060 */ 262, 263, 44, 198, 353, 42, 201, 44, 203, 204, + /* 1070 */ 205, 206, 207, 331, 331, 375, 331, 375, 375, 375, + /* 1080 */ 406, 370, 44, 42, 410, 44, 0, 413, 414, 415, + /* 1090 */ 416, 417, 418, 331, 420, 96, 96, 423, 247, 425, + /* 1100 */ 426, 427, 44, 363, 362, 431, 432, 99, 22, 0, + /* 1110 */ 102, 246, 370, 99, 96, 2, 102, 375, 375, 377, + /* 1120 */ 375, 8, 9, 107, 362, 12, 13, 14, 15, 16, + /* 1130 */ 99, 22, 370, 102, 96, 1, 2, 375, 399, 377, + /* 1140 */ 339, 164, 126, 127, 128, 129, 130, 131, 406, 162, + /* 1150 */ 339, 58, 410, 35, 353, 413, 414, 415, 416, 417, + /* 1160 */ 418, 0, 420, 363, 353, 44, 331, 425, 406, 427, + /* 1170 */ 363, 370, 410, 431, 432, 413, 414, 415, 416, 417, + /* 1180 */ 418, 370, 420, 22, 44, 339, 44, 425, 339, 427, + /* 1190 */ 97, 332, 339, 431, 432, 453, 351, 362, 385, 353, + /* 1200 */ 331, 339, 353, 95, 442, 370, 353, 44, 35, 44, + /* 1210 */ 375, 44, 377, 105, 467, 353, 370, 96, 44, 370, + /* 1220 */ 44, 8, 9, 370, 44, 12, 13, 14, 15, 16, + /* 1230 */ 456, 362, 370, 339, 331, 362, 96, 341, 96, 370, + /* 1240 */ 339, 406, 450, 339, 375, 410, 377, 353, 413, 414, + /* 1250 */ 415, 416, 417, 418, 353, 420, 341, 353, 338, 96, + /* 1260 */ 425, 96, 427, 96, 370, 362, 431, 432, 331, 13, + /* 1270 */ 96, 370, 96, 370, 370, 406, 96, 442, 375, 410, + /* 1280 */ 377, 271, 413, 414, 415, 416, 417, 418, 44, 420, + /* 1290 */ 44, 35, 44, 267, 425, 385, 427, 44, 374, 362, + /* 1300 */ 431, 432, 385, 185, 44, 441, 408, 370, 339, 406, + /* 1310 */ 339, 442, 375, 410, 377, 44, 413, 414, 415, 416, + /* 1320 */ 417, 418, 353, 420, 353, 433, 13, 269, 425, 394, + /* 1330 */ 427, 0, 44, 44, 431, 432, 460, 444, 248, 370, + /* 1340 */ 96, 370, 96, 406, 96, 442, 48, 410, 35, 96, + /* 1350 */ 413, 414, 415, 416, 417, 418, 96, 420, 185, 407, + /* 1360 */ 12, 13, 425, 181, 427, 42, 396, 96, 431, 432, + /* 1370 */ 22, 382, 20, 331, 439, 22, 385, 164, 443, 442, + /* 1380 */ 49, 33, 161, 35, 96, 96, 382, 380, 35, 20, + /* 1390 */ 339, 339, 380, 458, 459, 382, 93, 380, 463, 464, + /* 1400 */ 331, 347, 339, 339, 362, 339, 58, 20, 333, 333, + /* 1410 */ 20, 20, 370, 345, 377, 345, 401, 375, 70, 377, + /* 1420 */ 20, 340, 20, 70, 395, 345, 197, 340, 345, 345, + /* 1430 */ 345, 362, 331, 339, 345, 52, 333, 342, 342, 370, + /* 1440 */ 362, 362, 375, 343, 375, 405, 377, 333, 406, 375, + /* 1450 */ 362, 339, 410, 362, 362, 413, 414, 415, 416, 417, + /* 1460 */ 418, 362, 420, 362, 331, 117, 362, 425, 362, 427, + /* 1470 */ 117, 370, 362, 431, 432, 406, 375, 362, 377, 410, + /* 1480 */ 95, 362, 413, 414, 415, 416, 417, 418, 188, 420, + /* 1490 */ 343, 339, 385, 377, 425, 362, 427, 375, 401, 256, + /* 1500 */ 431, 432, 385, 370, 449, 403, 255, 406, 375, 449, + /* 1510 */ 377, 410, 375, 390, 413, 414, 415, 416, 417, 418, + /* 1520 */ 400, 420, 390, 375, 375, 264, 249, 265, 174, 452, + /* 1530 */ 266, 183, 408, 185, 462, 270, 183, 331, 185, 406, + /* 1540 */ 273, 468, 268, 410, 245, 447, 413, 414, 415, 416, + /* 1550 */ 417, 418, 340, 420, 449, 370, 208, 209, 425, 448, + /* 1560 */ 427, 208, 209, 20, 431, 432, 412, 466, 362, 221, + /* 1570 */ 222, 223, 224, 225, 226, 227, 370, 451, 339, 343, + /* 1580 */ 343, 375, 446, 377, 20, 388, 461, 166, 390, 375, + /* 1590 */ 375, 375, 375, 375, 390, 375, 387, 331, 343, 358, + /* 1600 */ 343, 370, 95, 95, 366, 430, 352, 375, 339, 36, + /* 1610 */ 334, 343, 406, 333, 391, 391, 410, 331, 0, 413, + /* 1620 */ 414, 415, 416, 417, 418, 397, 420, 402, 362, 356, + /* 1630 */ 329, 356, 0, 427, 356, 344, 370, 431, 432, 0, + /* 1640 */ 42, 375, 0, 377, 35, 202, 35, 35, 362, 35, + /* 1650 */ 202, 0, 35, 202, 35, 0, 370, 202, 0, 35, + /* 1660 */ 0, 375, 22, 377, 0, 35, 190, 185, 183, 0, + /* 1670 */ 0, 0, 406, 179, 178, 0, 410, 331, 47, 413, + /* 1680 */ 414, 415, 416, 417, 418, 0, 420, 0, 0, 0, + /* 1690 */ 42, 0, 406, 427, 35, 151, 410, 431, 432, 413, + /* 1700 */ 414, 415, 416, 417, 418, 331, 420, 0, 362, 0, + /* 1710 */ 0, 0, 0, 427, 0, 0, 370, 431, 432, 0, + /* 1720 */ 151, 375, 0, 377, 0, 0, 0, 0, 0, 0, + /* 1730 */ 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, + /* 1740 */ 42, 0, 0, 0, 370, 0, 0, 0, 0, 375, + /* 1750 */ 0, 377, 406, 0, 0, 135, 410, 0, 22, 413, + /* 1760 */ 414, 415, 416, 417, 418, 0, 420, 0, 0, 0, + /* 1770 */ 47, 331, 64, 427, 58, 35, 58, 14, 432, 0, + /* 1780 */ 406, 0, 0, 0, 410, 14, 42, 413, 414, 415, + /* 1790 */ 416, 417, 418, 44, 420, 331, 40, 39, 47, 47, + /* 1800 */ 39, 39, 362, 0, 0, 0, 0, 367, 174, 0, + /* 1810 */ 370, 35, 48, 39, 0, 375, 39, 377, 48, 35, + /* 1820 */ 0, 35, 0, 48, 39, 35, 362, 0, 48, 0, + /* 1830 */ 19, 457, 39, 0, 370, 0, 35, 22, 0, 375, + /* 1840 */ 44, 377, 35, 35, 33, 35, 406, 35, 35, 0, + /* 1850 */ 410, 35, 22, 413, 414, 415, 416, 417, 418, 48, + /* 1860 */ 420, 102, 44, 331, 104, 54, 55, 56, 57, 58, + /* 1870 */ 406, 35, 22, 0, 410, 22, 50, 413, 414, 415, + /* 1880 */ 416, 417, 418, 331, 420, 0, 422, 22, 0, 35, + /* 1890 */ 35, 0, 35, 0, 362, 20, 22, 35, 35, 367, + /* 1900 */ 195, 0, 370, 35, 0, 94, 186, 375, 97, 377, + /* 1910 */ 0, 22, 0, 96, 362, 44, 95, 3, 95, 367, + /* 1920 */ 95, 166, 370, 250, 96, 229, 95, 375, 254, 377, + /* 1930 */ 164, 44, 250, 96, 44, 96, 95, 164, 406, 95, + /* 1940 */ 44, 130, 410, 95, 331, 413, 414, 415, 416, 417, + /* 1950 */ 418, 164, 420, 47, 96, 47, 95, 44, 406, 3, + /* 1960 */ 331, 172, 410, 171, 44, 413, 414, 415, 416, 417, + /* 1970 */ 418, 171, 420, 96, 96, 362, 165, 96, 35, 35, + /* 1980 */ 35, 170, 35, 370, 35, 35, 47, 47, 375, 0, + /* 1990 */ 377, 362, 44, 96, 0, 0, 0, 95, 187, 370, + /* 2000 */ 189, 39, 47, 96, 375, 96, 377, 167, 0, 331, + /* 2010 */ 95, 95, 95, 95, 39, 47, 165, 95, 44, 406, + /* 2020 */ 2, 22, 244, 410, 105, 331, 413, 414, 415, 416, + /* 2030 */ 417, 418, 208, 420, 96, 406, 95, 47, 22, 410, + /* 2040 */ 362, 250, 413, 414, 415, 416, 417, 418, 370, 420, + /* 2050 */ 231, 47, 95, 375, 96, 377, 362, 96, 95, 95, + /* 2060 */ 95, 229, 96, 229, 370, 95, 210, 96, 35, 375, + /* 2070 */ 35, 377, 95, 106, 96, 95, 35, 96, 35, 95, + /* 2080 */ 35, 96, 95, 35, 406, 22, 107, 95, 410, 96, + /* 2090 */ 44, 413, 414, 415, 416, 417, 418, 95, 420, 35, + /* 2100 */ 406, 119, 119, 331, 410, 119, 95, 413, 414, 415, + /* 2110 */ 416, 417, 418, 22, 420, 95, 119, 64, 63, 331, + /* 2120 */ 35, 35, 35, 35, 35, 35, 92, 35, 35, 35, + /* 2130 */ 35, 70, 35, 35, 362, 35, 22, 35, 35, 35, + /* 2140 */ 44, 70, 370, 35, 35, 35, 35, 375, 35, 377, + /* 2150 */ 362, 22, 35, 0, 35, 48, 0, 39, 370, 35, + /* 2160 */ 48, 39, 0, 375, 48, 377, 35, 39, 0, 35, + /* 2170 */ 0, 48, 39, 35, 35, 0, 331, 22, 406, 21, + /* 2180 */ 20, 22, 410, 22, 21, 413, 414, 415, 416, 417, + /* 2190 */ 418, 469, 420, 469, 406, 331, 469, 469, 410, 469, + /* 2200 */ 469, 413, 414, 415, 416, 417, 418, 362, 420, 469, + /* 2210 */ 469, 469, 469, 469, 469, 370, 469, 469, 469, 469, + /* 2220 */ 375, 469, 377, 469, 469, 469, 362, 469, 469, 469, + /* 2230 */ 469, 469, 469, 469, 370, 469, 469, 469, 469, 375, + /* 2240 */ 469, 377, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2250 */ 469, 406, 469, 469, 331, 410, 469, 469, 413, 414, + /* 2260 */ 415, 416, 417, 418, 469, 420, 469, 469, 469, 469, + /* 2270 */ 406, 469, 469, 331, 410, 469, 469, 413, 414, 415, + /* 2280 */ 416, 417, 418, 469, 420, 362, 469, 469, 469, 469, + /* 2290 */ 469, 469, 469, 370, 469, 469, 469, 469, 375, 469, + /* 2300 */ 377, 469, 469, 469, 362, 469, 469, 469, 469, 469, + /* 2310 */ 469, 469, 370, 469, 469, 469, 469, 375, 469, 377, + /* 2320 */ 469, 469, 331, 469, 469, 469, 469, 469, 469, 406, + /* 2330 */ 469, 469, 469, 410, 469, 469, 413, 414, 415, 416, + /* 2340 */ 417, 418, 469, 420, 469, 469, 469, 469, 406, 469, + /* 2350 */ 469, 469, 410, 362, 469, 413, 414, 415, 416, 417, + /* 2360 */ 418, 370, 420, 469, 469, 469, 375, 469, 377, 469, + /* 2370 */ 469, 331, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2380 */ 469, 469, 469, 469, 469, 469, 469, 331, 469, 469, + /* 2390 */ 469, 469, 469, 469, 469, 469, 469, 406, 469, 469, + /* 2400 */ 469, 410, 362, 331, 413, 414, 415, 416, 417, 418, + /* 2410 */ 370, 420, 469, 469, 469, 375, 469, 377, 362, 469, + /* 2420 */ 469, 469, 469, 469, 469, 469, 370, 469, 469, 469, + /* 2430 */ 469, 375, 469, 377, 362, 469, 469, 469, 469, 469, + /* 2440 */ 469, 469, 370, 469, 469, 469, 406, 375, 469, 377, + /* 2450 */ 410, 469, 469, 413, 414, 415, 416, 417, 418, 469, + /* 2460 */ 420, 469, 406, 469, 469, 469, 410, 469, 469, 413, + /* 2470 */ 414, 415, 416, 417, 418, 469, 420, 469, 406, 331, + /* 2480 */ 469, 469, 410, 469, 469, 413, 414, 415, 416, 417, + /* 2490 */ 418, 469, 420, 469, 469, 331, 469, 469, 469, 469, + /* 2500 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2510 */ 362, 469, 469, 469, 469, 469, 469, 469, 370, 469, + /* 2520 */ 469, 469, 469, 375, 469, 377, 362, 469, 469, 469, + /* 2530 */ 469, 469, 469, 469, 370, 469, 469, 469, 469, 375, + /* 2540 */ 469, 377, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2550 */ 469, 469, 331, 469, 406, 469, 469, 469, 410, 469, + /* 2560 */ 469, 413, 414, 415, 416, 417, 418, 469, 420, 469, + /* 2570 */ 406, 331, 469, 469, 410, 469, 469, 413, 414, 415, + /* 2580 */ 416, 417, 418, 362, 420, 469, 469, 469, 469, 469, + /* 2590 */ 469, 370, 469, 469, 469, 469, 375, 469, 377, 469, + /* 2600 */ 469, 469, 362, 469, 469, 469, 469, 469, 469, 469, + /* 2610 */ 370, 469, 469, 469, 469, 375, 469, 377, 469, 469, + /* 2620 */ 469, 469, 469, 469, 469, 469, 469, 406, 469, 469, + /* 2630 */ 331, 410, 469, 469, 413, 414, 415, 416, 417, 418, + /* 2640 */ 469, 420, 469, 469, 469, 469, 406, 469, 469, 331, + /* 2650 */ 410, 469, 469, 413, 414, 415, 416, 417, 418, 469, + /* 2660 */ 420, 362, 469, 469, 469, 469, 469, 469, 469, 370, + /* 2670 */ 469, 469, 469, 469, 375, 469, 377, 469, 469, 469, + /* 2680 */ 362, 469, 469, 469, 469, 469, 469, 469, 370, 469, + /* 2690 */ 469, 469, 469, 375, 469, 377, 469, 469, 331, 469, + /* 2700 */ 469, 469, 469, 469, 469, 406, 469, 469, 469, 410, + /* 2710 */ 469, 469, 413, 414, 415, 416, 417, 418, 469, 420, + /* 2720 */ 469, 469, 469, 469, 406, 469, 469, 469, 410, 362, + /* 2730 */ 469, 413, 414, 415, 416, 417, 418, 370, 420, 469, + /* 2740 */ 469, 469, 375, 469, 377, 469, 469, 331, 469, 469, + /* 2750 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2760 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2770 */ 469, 469, 469, 406, 469, 469, 469, 410, 362, 469, + /* 2780 */ 413, 414, 415, 416, 417, 418, 370, 420, 469, 469, + /* 2790 */ 469, 375, 469, 377, 469, 469, 469, 469, 469, 469, + /* 2800 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2810 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2820 */ 469, 469, 406, 469, 469, 469, 410, 469, 469, 413, + /* 2830 */ 414, 415, 416, 417, 418, 469, 420, }; -#define YY_SHIFT_COUNT (733) +#define YY_SHIFT_COUNT (736) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2059) +#define YY_SHIFT_MAX (2175) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 865, 0, 71, 0, 290, 290, 290, 290, 290, 290, /* 10 */ 290, 290, 290, 290, 290, 361, 578, 578, 649, 578, /* 20 */ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, /* 30 */ 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, - /* 40 */ 578, 578, 578, 578, 578, 578, 578, 578, 289, 405, - /* 50 */ 460, 216, 70, 241, 376, 241, 216, 216, 1383, 1383, - /* 60 */ 241, 1383, 1383, 426, 241, 110, 517, 286, 286, 517, - /* 70 */ 186, 186, 326, 172, 1, 1, 286, 286, 286, 286, - /* 80 */ 286, 286, 286, 380, 286, 286, 398, 110, 286, 286, - /* 90 */ 450, 286, 110, 286, 380, 286, 380, 110, 286, 286, - /* 100 */ 110, 286, 110, 110, 110, 286, 415, 795, 34, 34, - /* 110 */ 217, 826, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, - /* 120 */ 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, - /* 130 */ 1067, 152, 672, 326, 172, 173, 422, 407, 407, 407, - /* 140 */ 393, 336, 336, 422, 518, 518, 518, 456, 507, 110, - /* 150 */ 713, 110, 713, 713, 645, 738, 36, 36, 36, 36, - /* 160 */ 36, 36, 36, 36, 583, 313, 474, 974, 249, 119, - /* 170 */ 413, 589, 335, 694, 299, 650, 862, 924, 685, 688, - /* 180 */ 446, 852, 688, 1081, 348, 615, 1068, 1259, 1139, 1280, - /* 190 */ 1304, 1280, 1170, 1310, 1310, 1280, 1170, 1170, 1254, 1310, - /* 200 */ 1310, 1310, 1336, 1336, 1339, 398, 1342, 398, 1348, 1356, - /* 210 */ 398, 1348, 398, 398, 398, 1310, 398, 1338, 1338, 1336, - /* 220 */ 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - /* 230 */ 110, 1310, 1336, 713, 713, 1213, 1309, 1339, 415, 1221, - /* 240 */ 1342, 415, 1310, 1304, 1304, 713, 1157, 1180, 713, 1157, - /* 250 */ 1180, 713, 713, 110, 1174, 1265, 1157, 1185, 1181, 1210, - /* 260 */ 1068, 1190, 1201, 1196, 1229, 518, 1458, 1310, 1348, 415, - /* 270 */ 415, 1484, 1180, 713, 713, 713, 713, 713, 1180, 713, - /* 280 */ 1349, 415, 645, 415, 518, 1426, 1428, 713, 738, 1310, - /* 290 */ 415, 1492, 1336, 3082, 3082, 3082, 3082, 3082, 3082, 3082, - /* 300 */ 3082, 3082, 890, 274, 702, 981, 453, 708, 905, 1002, - /* 310 */ 995, 1011, 1133, 1073, 1177, 1177, 1177, 1177, 1177, 1177, - /* 320 */ 1177, 1177, 1177, 260, 208, 86, 86, 528, 365, 4, - /* 330 */ 1024, 818, 592, 755, 755, 165, 608, 384, 165, 165, - /* 340 */ 165, 230, 1110, 690, 1131, 1008, 724, 1017, 1095, 1106, - /* 350 */ 1055, 1156, 1187, 1144, 1152, 1149, 1167, 1169, 1050, 99, - /* 360 */ 222, 1059, 1171, 1172, 1194, 1198, 1203, 1205, 1231, 1207, - /* 370 */ 982, 1058, 1047, 1168, 1178, 1209, 1212, 1214, 1215, 1216, - /* 380 */ 1217, 901, 1274, 1279, 1192, 1237, 1539, 1541, 1543, 1502, - /* 390 */ 1546, 1512, 1346, 1514, 1515, 1516, 1350, 1553, 1519, 1520, - /* 400 */ 1354, 1557, 1357, 1558, 1525, 1561, 1540, 1563, 1529, 1375, - /* 410 */ 1382, 1386, 1570, 1572, 1573, 1395, 1397, 1576, 1577, 1531, - /* 420 */ 1580, 1581, 1582, 1545, 1583, 1588, 1589, 1590, 1593, 1594, - /* 430 */ 1595, 1596, 1434, 1562, 1598, 1448, 1611, 1612, 1613, 1614, - /* 440 */ 1616, 1617, 1618, 1620, 1621, 1630, 1632, 1633, 1635, 1637, - /* 450 */ 1638, 1642, 1559, 1602, 1603, 1643, 1645, 1647, 1648, 1627, - /* 460 */ 1650, 1651, 1652, 1518, 1654, 1655, 1622, 1656, 1600, 1660, - /* 470 */ 1604, 1661, 1663, 1623, 1625, 1624, 1619, 1657, 1626, 1662, - /* 480 */ 1631, 1669, 1640, 1649, 1670, 1677, 1681, 1653, 1517, 1690, - /* 490 */ 1693, 1697, 1634, 1699, 1702, 1671, 1668, 1665, 1705, 1674, - /* 500 */ 1672, 1680, 1708, 1686, 1675, 1688, 1725, 1696, 1682, 1694, - /* 510 */ 1732, 1735, 1736, 1737, 1636, 1641, 1703, 1720, 1744, 1710, - /* 520 */ 1711, 1712, 1713, 1706, 1707, 1717, 1718, 1733, 1719, 1756, - /* 530 */ 1738, 1758, 1739, 1709, 1765, 1741, 1731, 1767, 1734, 1768, - /* 540 */ 1740, 1771, 1750, 1753, 1748, 1752, 1597, 1689, 1704, 1776, - /* 550 */ 1644, 1714, 1754, 1788, 1608, 1789, 1646, 1658, 1790, 1798, - /* 560 */ 1659, 1664, 1809, 1769, 1565, 1721, 1724, 1726, 1667, 1599, - /* 570 */ 1676, 1568, 1730, 1785, 1743, 1745, 1746, 1747, 1755, 1787, - /* 580 */ 1780, 1786, 1749, 1791, 1584, 1757, 1759, 1840, 1802, 1606, - /* 590 */ 1813, 1814, 1819, 1822, 1823, 1824, 1764, 1766, 1816, 1639, - /* 600 */ 1820, 1827, 1866, 1867, 1876, 1877, 1784, 1839, 1619, 1833, - /* 610 */ 1799, 1801, 1803, 1805, 1806, 1742, 1808, 1884, 1859, 1751, - /* 620 */ 1810, 1807, 1619, 1857, 1862, 1679, 1684, 1691, 1908, 1889, - /* 630 */ 1715, 1818, 1821, 1826, 1828, 1830, 1832, 1872, 1831, 1834, - /* 640 */ 1875, 1835, 1896, 1722, 1838, 1837, 1841, 1899, 1901, 1843, - /* 650 */ 1845, 1904, 1849, 1850, 1912, 1853, 1854, 1914, 1856, 1858, - /* 660 */ 1917, 1860, 1844, 1846, 1848, 1865, 1934, 1852, 1869, 1913, - /* 670 */ 1873, 1927, 1878, 1913, 1913, 1948, 1922, 1909, 1942, 1952, - /* 680 */ 1953, 1955, 1956, 1957, 1959, 1960, 1969, 1971, 1937, 1916, - /* 690 */ 1966, 1976, 1983, 1985, 1999, 1988, 1991, 1992, 1958, 1706, - /* 700 */ 1994, 1707, 1995, 1996, 1997, 2000, 2003, 2001, 2034, 2002, - /* 710 */ 2004, 2005, 2038, 2007, 2006, 2008, 2039, 2010, 2009, 2011, - /* 720 */ 2040, 2016, 2013, 2014, 2043, 2021, 2023, 2059, 2042, 2041, - /* 730 */ 2044, 2045, 2048, 2051, + /* 40 */ 578, 578, 578, 578, 578, 578, 578, 578, 450, 530, + /* 50 */ 254, 506, 70, 101, 141, 101, 506, 506, 1348, 1348, + /* 60 */ 1348, 101, 1348, 1348, 395, 101, 69, 258, 123, 123, + /* 70 */ 258, 186, 186, 380, 172, 1, 1, 123, 123, 123, + /* 80 */ 123, 123, 123, 123, 210, 123, 123, 173, 69, 123, + /* 90 */ 123, 246, 123, 69, 123, 210, 123, 210, 69, 123, + /* 100 */ 123, 69, 123, 69, 69, 69, 123, 257, 795, 34, + /* 110 */ 34, 217, 826, 1353, 1353, 1353, 1353, 1353, 1353, 1353, + /* 120 */ 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, 1353, + /* 130 */ 1353, 1353, 152, 516, 380, 172, 135, 587, 644, 644, + /* 140 */ 644, 675, 330, 330, 587, 326, 326, 326, 308, 396, + /* 150 */ 69, 695, 69, 695, 695, 627, 827, 36, 36, 36, + /* 160 */ 36, 36, 36, 36, 36, 1811, 313, 474, 615, 249, + /* 170 */ 798, 341, 213, 159, 508, 900, 836, 839, 610, 977, + /* 180 */ 759, 91, 1026, 759, 1023, 851, 987, 1090, 1298, 1182, + /* 190 */ 1323, 1352, 1323, 1221, 1369, 1369, 1323, 1221, 1221, 1303, + /* 200 */ 1369, 1369, 1369, 1387, 1387, 1390, 173, 1391, 173, 1400, + /* 210 */ 1402, 173, 1400, 173, 173, 173, 1369, 173, 1383, 1383, + /* 220 */ 1387, 69, 69, 69, 69, 69, 69, 69, 69, 69, + /* 230 */ 69, 69, 1369, 1387, 695, 695, 1229, 1385, 1390, 257, + /* 240 */ 1300, 1391, 257, 1369, 1352, 1352, 695, 1243, 1251, 695, + /* 250 */ 1243, 1251, 695, 695, 69, 1261, 1354, 1243, 1264, 1262, + /* 260 */ 1277, 1090, 1267, 1265, 1274, 1299, 326, 1543, 1369, 1400, + /* 270 */ 257, 257, 1564, 1251, 695, 695, 695, 695, 695, 1251, + /* 280 */ 695, 1421, 257, 627, 257, 326, 1507, 1508, 695, 827, + /* 290 */ 1369, 257, 1573, 1387, 2837, 2837, 2837, 2837, 2837, 2837, + /* 300 */ 2837, 2837, 2837, 890, 274, 457, 331, 631, 976, 1000, + /* 310 */ 525, 1009, 1113, 1213, 709, 838, 838, 838, 838, 838, + /* 320 */ 838, 838, 838, 838, 1016, 239, 86, 86, 539, 460, + /* 330 */ 4, 621, 741, 557, 599, 599, 769, 553, 505, 769, + /* 340 */ 769, 769, 443, 1018, 785, 1041, 772, 899, 1008, 1014, + /* 350 */ 1031, 1086, 1109, 1161, 999, 1038, 1093, 1121, 1140, 1142, + /* 360 */ 775, 1058, 1010, 609, 1163, 1165, 1167, 1174, 1176, 1180, + /* 370 */ 1134, 1244, 1118, 1173, 725, 1246, 650, 1248, 1253, 1260, + /* 380 */ 1271, 1288, 1289, 1108, 1256, 1313, 779, 1331, 1618, 1632, + /* 390 */ 1639, 1598, 1642, 1609, 1443, 1611, 1612, 1614, 1448, 1651, + /* 400 */ 1617, 1619, 1451, 1655, 1455, 1658, 1624, 1660, 1640, 1664, + /* 410 */ 1630, 1476, 1482, 1485, 1669, 1670, 1671, 1494, 1496, 1675, + /* 420 */ 1685, 1631, 1687, 1688, 1689, 1648, 1691, 1707, 1709, 1710, + /* 430 */ 1711, 1712, 1714, 1715, 1544, 1659, 1719, 1569, 1722, 1724, + /* 440 */ 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, + /* 450 */ 1735, 1737, 1738, 1739, 1698, 1741, 1742, 1743, 1745, 1746, + /* 460 */ 1747, 1736, 1748, 1750, 1753, 1620, 1754, 1757, 1740, 1765, + /* 470 */ 1716, 1767, 1718, 1768, 1769, 1744, 1758, 1749, 1723, 1763, + /* 480 */ 1751, 1771, 1752, 1779, 1756, 1761, 1781, 1782, 1783, 1762, + /* 490 */ 1634, 1803, 1804, 1805, 1708, 1806, 1809, 1776, 1764, 1774, + /* 500 */ 1814, 1784, 1770, 1777, 1820, 1786, 1775, 1785, 1822, 1790, + /* 510 */ 1780, 1793, 1827, 1829, 1833, 1835, 1760, 1759, 1801, 1815, + /* 520 */ 1838, 1807, 1808, 1810, 1812, 1796, 1818, 1813, 1816, 1830, + /* 530 */ 1836, 1849, 1850, 1873, 1853, 1826, 1885, 1865, 1854, 1888, + /* 540 */ 1855, 1891, 1857, 1893, 1874, 1875, 1862, 1863, 1705, 1817, + /* 550 */ 1821, 1901, 1766, 1823, 1868, 1904, 1720, 1889, 1773, 1755, + /* 560 */ 1910, 1912, 1787, 1789, 1914, 1871, 1673, 1825, 1828, 1831, + /* 570 */ 1792, 1696, 1800, 1674, 1837, 1887, 1890, 1839, 1841, 1844, + /* 580 */ 1848, 1858, 1896, 1906, 1908, 1861, 1913, 1682, 1877, 1878, + /* 590 */ 1956, 1920, 1791, 1943, 1944, 1945, 1947, 1949, 1950, 1881, + /* 600 */ 1897, 1939, 1778, 1948, 1940, 1989, 1994, 1995, 1996, 1902, + /* 610 */ 1962, 1723, 1955, 1915, 1907, 1909, 1916, 1917, 1840, 1918, + /* 620 */ 2008, 1975, 1851, 1922, 1919, 1723, 1968, 1974, 1832, 1819, + /* 630 */ 1834, 2018, 1999, 1824, 1941, 1938, 1957, 1958, 1963, 1961, + /* 640 */ 1990, 1964, 1965, 2004, 1966, 2016, 1856, 1970, 1967, 1971, + /* 650 */ 2033, 2035, 1977, 1978, 2041, 1980, 1981, 2043, 1984, 1985, + /* 660 */ 2045, 1987, 1993, 2048, 1992, 1982, 1983, 1986, 1997, 2063, + /* 670 */ 1979, 2002, 2046, 2011, 2064, 2020, 2046, 2046, 2091, 2053, + /* 680 */ 2055, 2085, 2086, 2087, 2088, 2089, 2090, 2092, 2093, 2094, + /* 690 */ 2095, 2061, 2034, 2096, 2097, 2098, 2100, 2114, 2102, 2103, + /* 700 */ 2104, 2071, 1796, 2108, 1818, 2109, 2110, 2111, 2113, 2129, + /* 710 */ 2117, 2153, 2119, 2107, 2118, 2156, 2124, 2112, 2122, 2162, + /* 720 */ 2131, 2116, 2128, 2168, 2134, 2123, 2133, 2170, 2138, 2139, + /* 730 */ 2175, 2155, 2158, 2159, 2161, 2163, 2160, }; -#define YY_REDUCE_COUNT (301) -#define YY_REDUCE_MIN (-432) -#define YY_REDUCE_MAX (2663) +#define YY_REDUCE_COUNT (302) +#define YY_REDUCE_MIN (-434) +#define YY_REDUCE_MAX (2416) static const short yy_reduce_ofst[] = { - /* 0 */ 164, 683, 747, 806, 866, 925, 959, 1052, 1072, 1211, - /* 10 */ 1271, 1299, 1366, 1389, 1457, -293, -3, 68, 1477, 285, - /* 20 */ 1567, 1585, 1601, 1673, 1695, 1763, 1783, 1851, 1871, 1928, - /* 30 */ 1962, 1990, 2050, 2071, 2144, 2168, 2225, 2245, 2302, 2323, - /* 40 */ 2351, 2411, 2432, 2505, 2529, 2586, 2606, 2663, -263, -349, - /* 50 */ 298, 341, -385, -255, 162, 624, -17, 159, -354, -322, - /* 60 */ -432, -339, -231, -400, 171, -52, -359, -4, 399, -331, - /* 70 */ -333, 23, -343, -235, 100, 108, 183, 191, 199, 278, - /* 80 */ 306, 470, 479, -23, 482, 543, -106, -176, 561, 647, - /* 90 */ 193, 654, 287, 681, 297, 684, 378, -279, 696, 699, - /* 100 */ 292, 711, 475, 382, 477, 737, 51, -311, -317, -317, - /* 110 */ -214, -139, -328, -11, 53, 122, 436, 451, 522, 524, - /* 120 */ 549, 550, 555, 622, 664, 717, 730, 731, 754, 763, - /* 130 */ 771, -294, -41, 72, -178, 321, 179, -41, -7, 194, - /* 140 */ 447, 347, 463, 309, 154, 452, 537, -267, 255, -266, - /* 150 */ 557, 668, 770, 780, 701, 395, -355, -351, 498, 535, - /* 160 */ 631, 669, 677, 631, 687, 794, 790, 769, 692, 715, - /* 170 */ 859, 796, 868, 868, 906, 883, 933, 899, 889, 844, - /* 180 */ 844, 846, 844, 871, 873, 868, 911, 913, 927, 943, - /* 190 */ 942, 946, 950, 998, 1005, 964, 967, 968, 1004, 1014, - /* 200 */ 1015, 1016, 1026, 1027, 961, 1018, 989, 1023, 1031, 985, - /* 210 */ 1036, 1042, 1040, 1043, 1044, 1048, 1049, 1051, 1053, 1063, - /* 220 */ 1037, 1038, 1046, 1054, 1057, 1061, 1062, 1064, 1066, 1069, - /* 230 */ 1070, 1065, 1076, 1030, 1035, 997, 1010, 1020, 1074, 1025, - /* 240 */ 1056, 1087, 1096, 1060, 1071, 1075, 987, 1083, 1077, 990, - /* 250 */ 1084, 1078, 1079, 868, 988, 993, 999, 1009, 1012, 1029, - /* 260 */ 1085, 992, 1019, 1034, 844, 1121, 1086, 1161, 1165, 1153, - /* 270 */ 1158, 1119, 1118, 1134, 1135, 1136, 1137, 1138, 1125, 1141, - /* 280 */ 1132, 1175, 1162, 1179, 1151, 1094, 1160, 1154, 1176, 1188, - /* 290 */ 1189, 1197, 1200, 1140, 1142, 1143, 1145, 1182, 1183, 1184, - /* 300 */ 1191, 1218, + /* 0 */ 589, 189, 674, 742, 762, 835, 869, 903, 937, 1042, + /* 10 */ 1069, 1133, 1206, 1266, 1286, -295, -5, 288, 1346, 354, + /* 20 */ 1374, 1101, 1440, 1464, 1532, 1552, 1613, 1629, 1678, 1694, + /* 30 */ 1772, 1788, 1845, 1864, 1923, 1942, 1991, 2040, 2056, 2072, + /* 40 */ 2148, 2164, 2221, 2240, 2299, 2318, 2367, 2416, -265, -351, + /* 50 */ 293, 98, -387, -257, -61, 935, -19, 157, -356, -324, + /* 60 */ 303, -434, -341, -233, -402, 229, -54, -361, 102, 107, + /* 70 */ -333, -335, 17, -345, -237, 140, 350, 471, 541, 542, + /* 80 */ 543, 657, 711, 801, -30, 811, 846, -108, -178, 849, + /* 90 */ 853, -56, 862, -51, 894, 109, 901, 222, -281, 904, + /* 100 */ 969, 26, 389, 15, 187, 80, 971, 378, -313, -319, + /* 110 */ -319, -216, -141, -330, 31, 240, 306, 403, 511, 548, + /* 120 */ 651, 655, 662, 663, 664, 671, 700, 702, 703, 704, + /* 130 */ 743, 745, -296, -45, 169, -196, 124, 219, -45, 33, + /* 140 */ 262, 89, 296, 397, 478, 449, 463, 517, 501, 332, + /* 150 */ -268, 544, 255, 546, 555, 574, 479, -357, -353, 551, + /* 160 */ 656, 740, 800, 807, 740, 739, 859, 845, 813, 747, + /* 170 */ 774, 896, 792, 873, 873, 915, 910, 920, 924, 917, + /* 180 */ 864, 864, 876, 864, 892, 893, 873, 898, 952, 970, + /* 190 */ 989, 991, 1004, 1007, 1051, 1052, 1013, 1012, 1017, 1054, + /* 200 */ 1063, 1064, 1066, 1075, 1076, 1015, 1068, 1037, 1070, 1081, + /* 210 */ 1029, 1080, 1087, 1083, 1084, 1085, 1094, 1089, 1095, 1096, + /* 220 */ 1103, 1078, 1079, 1088, 1091, 1092, 1099, 1104, 1106, 1110, + /* 230 */ 1115, 1119, 1112, 1114, 1067, 1074, 1040, 1102, 1097, 1100, + /* 240 */ 1120, 1116, 1147, 1152, 1107, 1117, 1122, 1055, 1123, 1137, + /* 250 */ 1060, 1132, 1148, 1149, 873, 1077, 1126, 1105, 1111, 1098, + /* 260 */ 1136, 1124, 1073, 1072, 1125, 864, 1185, 1154, 1239, 1212, + /* 270 */ 1236, 1237, 1197, 1198, 1214, 1215, 1216, 1217, 1218, 1204, + /* 280 */ 1220, 1209, 1255, 1241, 1257, 1231, 1175, 1238, 1232, 1254, + /* 290 */ 1269, 1268, 1276, 1280, 1228, 1225, 1223, 1224, 1273, 1275, + /* 300 */ 1278, 1291, 1301, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 10 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 20 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 30 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 40 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 50 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 60 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 70 */ 1647, 1647, 1904, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 80 */ 1647, 1647, 1647, 1647, 1647, 1647, 1725, 1647, 1647, 1647, - /* 90 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 100 */ 1647, 1647, 1647, 1647, 1647, 1647, 1723, 1897, 2111, 1647, - /* 110 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 120 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 130 */ 1647, 1647, 2123, 1647, 1647, 1725, 1647, 2123, 2123, 2123, - /* 140 */ 1723, 2083, 2083, 1647, 1647, 1647, 1647, 1958, 1647, 1647, - /* 150 */ 1647, 1647, 1647, 1647, 1832, 1647, 1647, 1647, 1647, 1647, - /* 160 */ 1856, 1647, 1647, 1647, 1950, 1647, 1647, 2148, 2202, 1647, - /* 170 */ 1647, 2151, 1647, 1647, 1647, 1909, 1647, 1785, 2138, 2115, - /* 180 */ 2129, 2186, 2116, 2113, 2132, 1647, 2142, 1647, 1943, 1902, - /* 190 */ 1647, 1902, 1899, 1647, 1647, 1902, 1899, 1899, 1776, 1647, - /* 200 */ 1647, 1647, 1647, 1647, 1647, 1725, 1647, 1725, 1647, 1647, - /* 210 */ 1725, 1647, 1725, 1725, 1725, 1647, 1725, 1704, 1704, 1647, - /* 220 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 230 */ 1647, 1647, 1647, 1647, 1647, 1968, 1956, 1647, 1723, 1952, - /* 240 */ 1647, 1723, 1647, 1647, 1647, 1647, 2159, 2157, 1647, 2159, - /* 250 */ 2157, 1647, 1647, 1647, 2171, 2167, 2159, 2175, 2173, 2144, - /* 260 */ 2142, 2205, 2192, 2188, 2129, 1647, 1647, 1647, 1647, 1723, - /* 270 */ 1723, 1647, 2157, 1647, 1647, 1647, 1647, 1647, 2157, 1647, - /* 280 */ 1647, 1723, 1647, 1723, 1647, 1647, 1801, 1647, 1647, 1647, - /* 290 */ 1723, 1679, 1647, 1945, 1961, 1927, 1927, 1835, 1835, 1835, - /* 300 */ 1726, 1652, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 310 */ 1647, 1647, 1647, 1647, 2170, 2169, 2038, 1647, 2087, 2086, - /* 320 */ 2085, 2076, 2037, 1797, 1647, 2036, 2035, 1647, 1647, 1647, - /* 330 */ 1647, 1647, 1647, 1918, 1917, 2029, 1647, 1647, 2030, 2028, - /* 340 */ 2027, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 350 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 2189, - /* 360 */ 2193, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 2112, 1647, - /* 370 */ 1647, 1647, 1647, 1647, 2011, 1647, 1647, 1647, 1647, 1647, - /* 380 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 390 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 400 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 410 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 420 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 430 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 440 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 450 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 460 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 470 */ 1647, 1647, 1647, 1647, 1647, 1684, 2016, 1647, 1647, 1647, - /* 480 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 490 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 500 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 510 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 520 */ 1647, 1647, 1647, 1764, 1763, 1647, 1647, 1647, 1647, 1647, - /* 530 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 540 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 2020, 1647, 1647, - /* 550 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 560 */ 1647, 1647, 2185, 2145, 1647, 1647, 1647, 1647, 1647, 1647, - /* 570 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 580 */ 1647, 2011, 1647, 2168, 1647, 1647, 2183, 1647, 2187, 1647, - /* 590 */ 1647, 1647, 1647, 1647, 1647, 1647, 2122, 2118, 1647, 1647, - /* 600 */ 2114, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 2019, 1647, - /* 610 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 620 */ 1647, 1647, 2010, 1647, 2073, 1647, 1647, 1647, 2107, 1647, - /* 630 */ 1647, 2058, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 640 */ 1647, 2020, 1647, 2023, 1647, 1647, 1647, 1647, 1647, 1829, - /* 650 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 660 */ 1647, 1647, 1814, 1812, 1811, 1810, 1647, 1807, 1647, 1842, - /* 670 */ 1647, 1647, 1647, 1838, 1837, 1647, 1647, 1647, 1647, 1647, - /* 680 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 690 */ 1744, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1736, - /* 700 */ 1647, 1735, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 710 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 720 */ 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, 1647, - /* 730 */ 1647, 1647, 1647, 1647, + /* 0 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 10 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 20 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 30 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 40 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 50 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 60 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 70 */ 1654, 1654, 1654, 1911, 1654, 1654, 1654, 1654, 1654, 1654, + /* 80 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1732, 1654, 1654, + /* 90 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 100 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1730, 1904, 2118, + /* 110 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 120 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 130 */ 1654, 1654, 1654, 2130, 1654, 1654, 1732, 1654, 2130, 2130, + /* 140 */ 2130, 1730, 2090, 2090, 1654, 1654, 1654, 1654, 1965, 1654, + /* 150 */ 1654, 1654, 1654, 1654, 1654, 1839, 1654, 1654, 1654, 1654, + /* 160 */ 1654, 1863, 1654, 1654, 1654, 1957, 1654, 1654, 2155, 2211, + /* 170 */ 1654, 1654, 2158, 1654, 1654, 1654, 1916, 1654, 1792, 2145, + /* 180 */ 2122, 2136, 2195, 2123, 2120, 2139, 1654, 2149, 1654, 1950, + /* 190 */ 1909, 1654, 1909, 1906, 1654, 1654, 1909, 1906, 1906, 1783, + /* 200 */ 1654, 1654, 1654, 1654, 1654, 1654, 1732, 1654, 1732, 1654, + /* 210 */ 1654, 1732, 1654, 1732, 1732, 1732, 1654, 1732, 1711, 1711, + /* 220 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 230 */ 1654, 1654, 1654, 1654, 1654, 1654, 1975, 1963, 1654, 1730, + /* 240 */ 1959, 1654, 1730, 1654, 1654, 1654, 1654, 2166, 2164, 1654, + /* 250 */ 2166, 2164, 1654, 1654, 1654, 2180, 2176, 2166, 2184, 2182, + /* 260 */ 2151, 2149, 2214, 2201, 2197, 2136, 1654, 1654, 1654, 1654, + /* 270 */ 1730, 1730, 1654, 2164, 1654, 1654, 1654, 1654, 1654, 2164, + /* 280 */ 1654, 1654, 1730, 1654, 1730, 1654, 1654, 1808, 1654, 1654, + /* 290 */ 1654, 1730, 1686, 1654, 1952, 1968, 1934, 1934, 1842, 1842, + /* 300 */ 1842, 1733, 1659, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 310 */ 1654, 1654, 1654, 1654, 1654, 2179, 2178, 2045, 1654, 2094, + /* 320 */ 2093, 2092, 2083, 2044, 1804, 1654, 2043, 2042, 1654, 1654, + /* 330 */ 1654, 1654, 1654, 1654, 1925, 1924, 2036, 1654, 1654, 2037, + /* 340 */ 2035, 2034, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 350 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 360 */ 1654, 2198, 2202, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 370 */ 2119, 1654, 1654, 1654, 1654, 1654, 2018, 1654, 1654, 1654, + /* 380 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 390 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 400 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 410 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 420 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 430 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 440 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 450 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 460 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 470 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1691, 2023, 1654, + /* 480 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 490 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 500 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 510 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 520 */ 1654, 1654, 1654, 1654, 1654, 1771, 1770, 1654, 1654, 1654, + /* 530 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 540 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 2027, + /* 550 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 560 */ 1654, 1654, 1654, 1654, 2194, 2152, 1654, 1654, 1654, 1654, + /* 570 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 580 */ 1654, 1654, 1654, 1654, 2018, 1654, 2177, 1654, 1654, 2192, + /* 590 */ 1654, 2196, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 2129, + /* 600 */ 2125, 1654, 1654, 2121, 1654, 1654, 1654, 1654, 1654, 1654, + /* 610 */ 1654, 2026, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 620 */ 1654, 1654, 1654, 1654, 1654, 2017, 1654, 2080, 1654, 1654, + /* 630 */ 1654, 2114, 1654, 1654, 2065, 1654, 1654, 1654, 1654, 1654, + /* 640 */ 1654, 1654, 1654, 1654, 2027, 1654, 2030, 1654, 1654, 1654, + /* 650 */ 1654, 1654, 1836, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 660 */ 1654, 1654, 1654, 1654, 1654, 1821, 1819, 1818, 1817, 1654, + /* 670 */ 1814, 1654, 1849, 1654, 1654, 1654, 1845, 1844, 1654, 1654, + /* 680 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 690 */ 1654, 1654, 1654, 1751, 1654, 1654, 1654, 1654, 1654, 1654, + /* 700 */ 1654, 1654, 1743, 1654, 1742, 1654, 1654, 1654, 1654, 1654, + /* 710 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 720 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, 1654, + /* 730 */ 1654, 1654, 1654, 1654, 1654, 1654, 1654, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1277,7 +1227,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* SERVER_STATUS => nothing */ 0, /* CURRENT_USER => nothing */ 0, /* CASE => nothing */ - 272, /* END => ABORT */ + 274, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1306,8 +1256,10 @@ static const YYCODETYPE yyFallback[] = { 0, /* SLIDING => nothing */ 0, /* FILL => nothing */ 0, /* VALUE => nothing */ + 0, /* VALUE_F => nothing */ 0, /* NONE => nothing */ 0, /* PREV => nothing */ + 0, /* NULL_F => nothing */ 0, /* LINEAR => nothing */ 0, /* NEXT => nothing */ 0, /* HAVING => nothing */ @@ -1321,59 +1273,59 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 272, /* AFTER => ABORT */ - 272, /* ATTACH => ABORT */ - 272, /* BEFORE => ABORT */ - 272, /* BEGIN => ABORT */ - 272, /* BITAND => ABORT */ - 272, /* BITNOT => ABORT */ - 272, /* BITOR => ABORT */ - 272, /* BLOCKS => ABORT */ - 272, /* CHANGE => ABORT */ - 272, /* COMMA => ABORT */ - 272, /* COMPACT => ABORT */ - 272, /* CONCAT => ABORT */ - 272, /* CONFLICT => ABORT */ - 272, /* COPY => ABORT */ - 272, /* DEFERRED => ABORT */ - 272, /* DELIMITERS => ABORT */ - 272, /* DETACH => ABORT */ - 272, /* DIVIDE => ABORT */ - 272, /* DOT => ABORT */ - 272, /* EACH => ABORT */ - 272, /* FAIL => ABORT */ - 272, /* FILE => ABORT */ - 272, /* FOR => ABORT */ - 272, /* GLOB => ABORT */ - 272, /* ID => ABORT */ - 272, /* IMMEDIATE => ABORT */ - 272, /* IMPORT => ABORT */ - 272, /* INITIALLY => ABORT */ - 272, /* INSTEAD => ABORT */ - 272, /* ISNULL => ABORT */ - 272, /* KEY => ABORT */ - 272, /* MODULES => ABORT */ - 272, /* NK_BITNOT => ABORT */ - 272, /* NK_SEMI => ABORT */ - 272, /* NOTNULL => ABORT */ - 272, /* OF => ABORT */ - 272, /* PLUS => ABORT */ - 272, /* PRIVILEGE => ABORT */ - 272, /* RAISE => ABORT */ - 272, /* REPLACE => ABORT */ - 272, /* RESTRICT => ABORT */ - 272, /* ROW => ABORT */ - 272, /* SEMI => ABORT */ - 272, /* STAR => ABORT */ - 272, /* STATEMENT => ABORT */ - 272, /* STRICT => ABORT */ - 272, /* STRING => ABORT */ - 272, /* TIMES => ABORT */ - 272, /* UPDATE => ABORT */ - 272, /* VALUES => ABORT */ - 272, /* VARIABLE => ABORT */ - 272, /* VIEW => ABORT */ - 272, /* WAL => ABORT */ + 274, /* AFTER => ABORT */ + 274, /* ATTACH => ABORT */ + 274, /* BEFORE => ABORT */ + 274, /* BEGIN => ABORT */ + 274, /* BITAND => ABORT */ + 274, /* BITNOT => ABORT */ + 274, /* BITOR => ABORT */ + 274, /* BLOCKS => ABORT */ + 274, /* CHANGE => ABORT */ + 274, /* COMMA => ABORT */ + 274, /* COMPACT => ABORT */ + 274, /* CONCAT => ABORT */ + 274, /* CONFLICT => ABORT */ + 274, /* COPY => ABORT */ + 274, /* DEFERRED => ABORT */ + 274, /* DELIMITERS => ABORT */ + 274, /* DETACH => ABORT */ + 274, /* DIVIDE => ABORT */ + 274, /* DOT => ABORT */ + 274, /* EACH => ABORT */ + 274, /* FAIL => ABORT */ + 274, /* FILE => ABORT */ + 274, /* FOR => ABORT */ + 274, /* GLOB => ABORT */ + 274, /* ID => ABORT */ + 274, /* IMMEDIATE => ABORT */ + 274, /* IMPORT => ABORT */ + 274, /* INITIALLY => ABORT */ + 274, /* INSTEAD => ABORT */ + 274, /* ISNULL => ABORT */ + 274, /* KEY => ABORT */ + 274, /* MODULES => ABORT */ + 274, /* NK_BITNOT => ABORT */ + 274, /* NK_SEMI => ABORT */ + 274, /* NOTNULL => ABORT */ + 274, /* OF => ABORT */ + 274, /* PLUS => ABORT */ + 274, /* PRIVILEGE => ABORT */ + 274, /* RAISE => ABORT */ + 274, /* REPLACE => ABORT */ + 274, /* RESTRICT => ABORT */ + 274, /* ROW => ABORT */ + 274, /* SEMI => ABORT */ + 274, /* STAR => ABORT */ + 274, /* STATEMENT => ABORT */ + 274, /* STRICT => ABORT */ + 274, /* STRING => ABORT */ + 274, /* TIMES => ABORT */ + 274, /* UPDATE => ABORT */ + 274, /* VALUES => ABORT */ + 274, /* VARIABLE => ABORT */ + 274, /* VIEW => ABORT */ + 274, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1719,215 +1671,217 @@ static const char *const yyTokenName[] = { /* 255 */ "SLIDING", /* 256 */ "FILL", /* 257 */ "VALUE", - /* 258 */ "NONE", - /* 259 */ "PREV", - /* 260 */ "LINEAR", - /* 261 */ "NEXT", - /* 262 */ "HAVING", - /* 263 */ "RANGE", - /* 264 */ "EVERY", - /* 265 */ "ORDER", - /* 266 */ "SLIMIT", - /* 267 */ "SOFFSET", - /* 268 */ "LIMIT", - /* 269 */ "OFFSET", - /* 270 */ "ASC", - /* 271 */ "NULLS", - /* 272 */ "ABORT", - /* 273 */ "AFTER", - /* 274 */ "ATTACH", - /* 275 */ "BEFORE", - /* 276 */ "BEGIN", - /* 277 */ "BITAND", - /* 278 */ "BITNOT", - /* 279 */ "BITOR", - /* 280 */ "BLOCKS", - /* 281 */ "CHANGE", - /* 282 */ "COMMA", - /* 283 */ "COMPACT", - /* 284 */ "CONCAT", - /* 285 */ "CONFLICT", - /* 286 */ "COPY", - /* 287 */ "DEFERRED", - /* 288 */ "DELIMITERS", - /* 289 */ "DETACH", - /* 290 */ "DIVIDE", - /* 291 */ "DOT", - /* 292 */ "EACH", - /* 293 */ "FAIL", - /* 294 */ "FILE", - /* 295 */ "FOR", - /* 296 */ "GLOB", - /* 297 */ "ID", - /* 298 */ "IMMEDIATE", - /* 299 */ "IMPORT", - /* 300 */ "INITIALLY", - /* 301 */ "INSTEAD", - /* 302 */ "ISNULL", - /* 303 */ "KEY", - /* 304 */ "MODULES", - /* 305 */ "NK_BITNOT", - /* 306 */ "NK_SEMI", - /* 307 */ "NOTNULL", - /* 308 */ "OF", - /* 309 */ "PLUS", - /* 310 */ "PRIVILEGE", - /* 311 */ "RAISE", - /* 312 */ "REPLACE", - /* 313 */ "RESTRICT", - /* 314 */ "ROW", - /* 315 */ "SEMI", - /* 316 */ "STAR", - /* 317 */ "STATEMENT", - /* 318 */ "STRICT", - /* 319 */ "STRING", - /* 320 */ "TIMES", - /* 321 */ "UPDATE", - /* 322 */ "VALUES", - /* 323 */ "VARIABLE", - /* 324 */ "VIEW", - /* 325 */ "WAL", - /* 326 */ "cmd", - /* 327 */ "account_options", - /* 328 */ "alter_account_options", - /* 329 */ "literal", - /* 330 */ "alter_account_option", - /* 331 */ "user_name", - /* 332 */ "sysinfo_opt", - /* 333 */ "privileges", - /* 334 */ "priv_level", - /* 335 */ "priv_type_list", - /* 336 */ "priv_type", - /* 337 */ "db_name", - /* 338 */ "topic_name", - /* 339 */ "dnode_endpoint", - /* 340 */ "force_opt", - /* 341 */ "not_exists_opt", - /* 342 */ "db_options", - /* 343 */ "exists_opt", - /* 344 */ "alter_db_options", - /* 345 */ "speed_opt", - /* 346 */ "integer_list", - /* 347 */ "variable_list", - /* 348 */ "retention_list", - /* 349 */ "alter_db_option", - /* 350 */ "retention", - /* 351 */ "full_table_name", - /* 352 */ "column_def_list", - /* 353 */ "tags_def_opt", - /* 354 */ "table_options", - /* 355 */ "multi_create_clause", - /* 356 */ "tags_def", - /* 357 */ "multi_drop_clause", - /* 358 */ "alter_table_clause", - /* 359 */ "alter_table_options", - /* 360 */ "column_name", - /* 361 */ "type_name", - /* 362 */ "signed_literal", - /* 363 */ "create_subtable_clause", - /* 364 */ "specific_cols_opt", - /* 365 */ "expression_list", - /* 366 */ "drop_table_clause", - /* 367 */ "col_name_list", - /* 368 */ "table_name", - /* 369 */ "column_def", - /* 370 */ "duration_list", - /* 371 */ "rollup_func_list", - /* 372 */ "alter_table_option", - /* 373 */ "duration_literal", - /* 374 */ "rollup_func_name", - /* 375 */ "function_name", - /* 376 */ "col_name", - /* 377 */ "db_name_cond_opt", - /* 378 */ "like_pattern_opt", - /* 379 */ "table_name_cond", - /* 380 */ "from_db_opt", - /* 381 */ "tag_list_opt", - /* 382 */ "tag_item", - /* 383 */ "column_alias", - /* 384 */ "full_index_name", - /* 385 */ "index_options", - /* 386 */ "index_name", - /* 387 */ "func_list", - /* 388 */ "sliding_opt", - /* 389 */ "sma_stream_opt", - /* 390 */ "func", - /* 391 */ "sma_func_name", - /* 392 */ "query_or_subquery", - /* 393 */ "cgroup_name", - /* 394 */ "analyze_opt", - /* 395 */ "explain_options", - /* 396 */ "insert_query", - /* 397 */ "agg_func_opt", - /* 398 */ "bufsize_opt", - /* 399 */ "stream_name", - /* 400 */ "stream_options", - /* 401 */ "col_list_opt", - /* 402 */ "tag_def_or_ref_opt", - /* 403 */ "subtable_opt", - /* 404 */ "expression", - /* 405 */ "dnode_list", - /* 406 */ "where_clause_opt", - /* 407 */ "signed", - /* 408 */ "literal_func", - /* 409 */ "literal_list", - /* 410 */ "table_alias", - /* 411 */ "expr_or_subquery", - /* 412 */ "pseudo_column", - /* 413 */ "column_reference", - /* 414 */ "function_expression", - /* 415 */ "case_when_expression", - /* 416 */ "star_func", - /* 417 */ "star_func_para_list", - /* 418 */ "noarg_func", - /* 419 */ "other_para_list", - /* 420 */ "star_func_para", - /* 421 */ "when_then_list", - /* 422 */ "case_when_else_opt", - /* 423 */ "common_expression", - /* 424 */ "when_then_expr", - /* 425 */ "predicate", - /* 426 */ "compare_op", - /* 427 */ "in_op", - /* 428 */ "in_predicate_value", - /* 429 */ "boolean_value_expression", - /* 430 */ "boolean_primary", - /* 431 */ "from_clause_opt", - /* 432 */ "table_reference_list", - /* 433 */ "table_reference", - /* 434 */ "table_primary", - /* 435 */ "joined_table", - /* 436 */ "alias_opt", - /* 437 */ "subquery", - /* 438 */ "parenthesized_joined_table", - /* 439 */ "join_type", - /* 440 */ "search_condition", - /* 441 */ "query_specification", - /* 442 */ "set_quantifier_opt", - /* 443 */ "select_list", - /* 444 */ "partition_by_clause_opt", - /* 445 */ "range_opt", - /* 446 */ "every_opt", - /* 447 */ "fill_opt", - /* 448 */ "twindow_clause_opt", - /* 449 */ "group_by_clause_opt", - /* 450 */ "having_clause_opt", - /* 451 */ "select_item", - /* 452 */ "partition_list", - /* 453 */ "partition_item", - /* 454 */ "fill_mode", - /* 455 */ "group_by_list", - /* 456 */ "query_expression", - /* 457 */ "query_simple", - /* 458 */ "order_by_clause_opt", - /* 459 */ "slimit_clause_opt", - /* 460 */ "limit_clause_opt", - /* 461 */ "union_query_expression", - /* 462 */ "query_simple_or_subquery", - /* 463 */ "sort_specification_list", - /* 464 */ "sort_specification", - /* 465 */ "ordering_specification_opt", - /* 466 */ "null_ordering_opt", + /* 258 */ "VALUE_F", + /* 259 */ "NONE", + /* 260 */ "PREV", + /* 261 */ "NULL_F", + /* 262 */ "LINEAR", + /* 263 */ "NEXT", + /* 264 */ "HAVING", + /* 265 */ "RANGE", + /* 266 */ "EVERY", + /* 267 */ "ORDER", + /* 268 */ "SLIMIT", + /* 269 */ "SOFFSET", + /* 270 */ "LIMIT", + /* 271 */ "OFFSET", + /* 272 */ "ASC", + /* 273 */ "NULLS", + /* 274 */ "ABORT", + /* 275 */ "AFTER", + /* 276 */ "ATTACH", + /* 277 */ "BEFORE", + /* 278 */ "BEGIN", + /* 279 */ "BITAND", + /* 280 */ "BITNOT", + /* 281 */ "BITOR", + /* 282 */ "BLOCKS", + /* 283 */ "CHANGE", + /* 284 */ "COMMA", + /* 285 */ "COMPACT", + /* 286 */ "CONCAT", + /* 287 */ "CONFLICT", + /* 288 */ "COPY", + /* 289 */ "DEFERRED", + /* 290 */ "DELIMITERS", + /* 291 */ "DETACH", + /* 292 */ "DIVIDE", + /* 293 */ "DOT", + /* 294 */ "EACH", + /* 295 */ "FAIL", + /* 296 */ "FILE", + /* 297 */ "FOR", + /* 298 */ "GLOB", + /* 299 */ "ID", + /* 300 */ "IMMEDIATE", + /* 301 */ "IMPORT", + /* 302 */ "INITIALLY", + /* 303 */ "INSTEAD", + /* 304 */ "ISNULL", + /* 305 */ "KEY", + /* 306 */ "MODULES", + /* 307 */ "NK_BITNOT", + /* 308 */ "NK_SEMI", + /* 309 */ "NOTNULL", + /* 310 */ "OF", + /* 311 */ "PLUS", + /* 312 */ "PRIVILEGE", + /* 313 */ "RAISE", + /* 314 */ "REPLACE", + /* 315 */ "RESTRICT", + /* 316 */ "ROW", + /* 317 */ "SEMI", + /* 318 */ "STAR", + /* 319 */ "STATEMENT", + /* 320 */ "STRICT", + /* 321 */ "STRING", + /* 322 */ "TIMES", + /* 323 */ "UPDATE", + /* 324 */ "VALUES", + /* 325 */ "VARIABLE", + /* 326 */ "VIEW", + /* 327 */ "WAL", + /* 328 */ "cmd", + /* 329 */ "account_options", + /* 330 */ "alter_account_options", + /* 331 */ "literal", + /* 332 */ "alter_account_option", + /* 333 */ "user_name", + /* 334 */ "sysinfo_opt", + /* 335 */ "privileges", + /* 336 */ "priv_level", + /* 337 */ "priv_type_list", + /* 338 */ "priv_type", + /* 339 */ "db_name", + /* 340 */ "topic_name", + /* 341 */ "dnode_endpoint", + /* 342 */ "force_opt", + /* 343 */ "not_exists_opt", + /* 344 */ "db_options", + /* 345 */ "exists_opt", + /* 346 */ "alter_db_options", + /* 347 */ "speed_opt", + /* 348 */ "integer_list", + /* 349 */ "variable_list", + /* 350 */ "retention_list", + /* 351 */ "alter_db_option", + /* 352 */ "retention", + /* 353 */ "full_table_name", + /* 354 */ "column_def_list", + /* 355 */ "tags_def_opt", + /* 356 */ "table_options", + /* 357 */ "multi_create_clause", + /* 358 */ "tags_def", + /* 359 */ "multi_drop_clause", + /* 360 */ "alter_table_clause", + /* 361 */ "alter_table_options", + /* 362 */ "column_name", + /* 363 */ "type_name", + /* 364 */ "signed_literal", + /* 365 */ "create_subtable_clause", + /* 366 */ "specific_cols_opt", + /* 367 */ "expression_list", + /* 368 */ "drop_table_clause", + /* 369 */ "col_name_list", + /* 370 */ "table_name", + /* 371 */ "column_def", + /* 372 */ "duration_list", + /* 373 */ "rollup_func_list", + /* 374 */ "alter_table_option", + /* 375 */ "duration_literal", + /* 376 */ "rollup_func_name", + /* 377 */ "function_name", + /* 378 */ "col_name", + /* 379 */ "db_name_cond_opt", + /* 380 */ "like_pattern_opt", + /* 381 */ "table_name_cond", + /* 382 */ "from_db_opt", + /* 383 */ "tag_list_opt", + /* 384 */ "tag_item", + /* 385 */ "column_alias", + /* 386 */ "full_index_name", + /* 387 */ "index_options", + /* 388 */ "index_name", + /* 389 */ "func_list", + /* 390 */ "sliding_opt", + /* 391 */ "sma_stream_opt", + /* 392 */ "func", + /* 393 */ "sma_func_name", + /* 394 */ "query_or_subquery", + /* 395 */ "cgroup_name", + /* 396 */ "analyze_opt", + /* 397 */ "explain_options", + /* 398 */ "insert_query", + /* 399 */ "agg_func_opt", + /* 400 */ "bufsize_opt", + /* 401 */ "stream_name", + /* 402 */ "stream_options", + /* 403 */ "col_list_opt", + /* 404 */ "tag_def_or_ref_opt", + /* 405 */ "subtable_opt", + /* 406 */ "expression", + /* 407 */ "dnode_list", + /* 408 */ "where_clause_opt", + /* 409 */ "signed", + /* 410 */ "literal_func", + /* 411 */ "literal_list", + /* 412 */ "table_alias", + /* 413 */ "expr_or_subquery", + /* 414 */ "pseudo_column", + /* 415 */ "column_reference", + /* 416 */ "function_expression", + /* 417 */ "case_when_expression", + /* 418 */ "star_func", + /* 419 */ "star_func_para_list", + /* 420 */ "noarg_func", + /* 421 */ "other_para_list", + /* 422 */ "star_func_para", + /* 423 */ "when_then_list", + /* 424 */ "case_when_else_opt", + /* 425 */ "common_expression", + /* 426 */ "when_then_expr", + /* 427 */ "predicate", + /* 428 */ "compare_op", + /* 429 */ "in_op", + /* 430 */ "in_predicate_value", + /* 431 */ "boolean_value_expression", + /* 432 */ "boolean_primary", + /* 433 */ "from_clause_opt", + /* 434 */ "table_reference_list", + /* 435 */ "table_reference", + /* 436 */ "table_primary", + /* 437 */ "joined_table", + /* 438 */ "alias_opt", + /* 439 */ "subquery", + /* 440 */ "parenthesized_joined_table", + /* 441 */ "join_type", + /* 442 */ "search_condition", + /* 443 */ "query_specification", + /* 444 */ "set_quantifier_opt", + /* 445 */ "select_list", + /* 446 */ "partition_by_clause_opt", + /* 447 */ "range_opt", + /* 448 */ "every_opt", + /* 449 */ "fill_opt", + /* 450 */ "twindow_clause_opt", + /* 451 */ "group_by_clause_opt", + /* 452 */ "having_clause_opt", + /* 453 */ "select_item", + /* 454 */ "partition_list", + /* 455 */ "partition_item", + /* 456 */ "fill_mode", + /* 457 */ "group_by_list", + /* 458 */ "query_expression", + /* 459 */ "query_simple", + /* 460 */ "order_by_clause_opt", + /* 461 */ "slimit_clause_opt", + /* 462 */ "limit_clause_opt", + /* 463 */ "union_query_expression", + /* 464 */ "query_simple_or_subquery", + /* 465 */ "sort_specification_list", + /* 466 */ "sort_specification", + /* 467 */ "ordering_specification_opt", + /* 468 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2447,52 +2401,54 @@ static const char *const yyRuleName[] = { /* 509 */ "fill_opt ::=", /* 510 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", /* 511 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 512 */ "fill_mode ::= NONE", - /* 513 */ "fill_mode ::= PREV", - /* 514 */ "fill_mode ::= NULL", - /* 515 */ "fill_mode ::= LINEAR", - /* 516 */ "fill_mode ::= NEXT", - /* 517 */ "group_by_clause_opt ::=", - /* 518 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 519 */ "group_by_list ::= expr_or_subquery", - /* 520 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 521 */ "having_clause_opt ::=", - /* 522 */ "having_clause_opt ::= HAVING search_condition", - /* 523 */ "range_opt ::=", - /* 524 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 525 */ "every_opt ::=", - /* 526 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 527 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 528 */ "query_simple ::= query_specification", - /* 529 */ "query_simple ::= union_query_expression", - /* 530 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 531 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 532 */ "query_simple_or_subquery ::= query_simple", - /* 533 */ "query_simple_or_subquery ::= subquery", - /* 534 */ "query_or_subquery ::= query_expression", - /* 535 */ "query_or_subquery ::= subquery", - /* 536 */ "order_by_clause_opt ::=", - /* 537 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 538 */ "slimit_clause_opt ::=", - /* 539 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 540 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 541 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 542 */ "limit_clause_opt ::=", - /* 543 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 544 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 545 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 546 */ "subquery ::= NK_LP query_expression NK_RP", - /* 547 */ "subquery ::= NK_LP subquery NK_RP", - /* 548 */ "search_condition ::= common_expression", - /* 549 */ "sort_specification_list ::= sort_specification", - /* 550 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 551 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 552 */ "ordering_specification_opt ::=", - /* 553 */ "ordering_specification_opt ::= ASC", - /* 554 */ "ordering_specification_opt ::= DESC", - /* 555 */ "null_ordering_opt ::=", - /* 556 */ "null_ordering_opt ::= NULLS FIRST", - /* 557 */ "null_ordering_opt ::= NULLS LAST", + /* 512 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", + /* 513 */ "fill_mode ::= NONE", + /* 514 */ "fill_mode ::= PREV", + /* 515 */ "fill_mode ::= NULL", + /* 516 */ "fill_mode ::= NULL_F", + /* 517 */ "fill_mode ::= LINEAR", + /* 518 */ "fill_mode ::= NEXT", + /* 519 */ "group_by_clause_opt ::=", + /* 520 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 521 */ "group_by_list ::= expr_or_subquery", + /* 522 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 523 */ "having_clause_opt ::=", + /* 524 */ "having_clause_opt ::= HAVING search_condition", + /* 525 */ "range_opt ::=", + /* 526 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 527 */ "every_opt ::=", + /* 528 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 529 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 530 */ "query_simple ::= query_specification", + /* 531 */ "query_simple ::= union_query_expression", + /* 532 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 533 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 534 */ "query_simple_or_subquery ::= query_simple", + /* 535 */ "query_simple_or_subquery ::= subquery", + /* 536 */ "query_or_subquery ::= query_expression", + /* 537 */ "query_or_subquery ::= subquery", + /* 538 */ "order_by_clause_opt ::=", + /* 539 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 540 */ "slimit_clause_opt ::=", + /* 541 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 542 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 543 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 544 */ "limit_clause_opt ::=", + /* 545 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 546 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 547 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 548 */ "subquery ::= NK_LP query_expression NK_RP", + /* 549 */ "subquery ::= NK_LP subquery NK_RP", + /* 550 */ "search_condition ::= common_expression", + /* 551 */ "sort_specification_list ::= sort_specification", + /* 552 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 553 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 554 */ "ordering_specification_opt ::=", + /* 555 */ "ordering_specification_opt ::= ASC", + /* 556 */ "ordering_specification_opt ::= DESC", + /* 557 */ "null_ordering_opt ::=", + /* 558 */ "null_ordering_opt ::= NULLS FIRST", + /* 559 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2619,199 +2575,199 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 326: /* cmd */ - case 329: /* literal */ - case 342: /* db_options */ - case 344: /* alter_db_options */ - case 350: /* retention */ - case 351: /* full_table_name */ - case 354: /* table_options */ - case 358: /* alter_table_clause */ - case 359: /* alter_table_options */ - case 362: /* signed_literal */ - case 363: /* create_subtable_clause */ - case 366: /* drop_table_clause */ - case 369: /* column_def */ - case 373: /* duration_literal */ - case 374: /* rollup_func_name */ - case 376: /* col_name */ - case 377: /* db_name_cond_opt */ - case 378: /* like_pattern_opt */ - case 379: /* table_name_cond */ - case 380: /* from_db_opt */ - case 382: /* tag_item */ - case 384: /* full_index_name */ - case 385: /* index_options */ - case 388: /* sliding_opt */ - case 389: /* sma_stream_opt */ - case 390: /* func */ - case 392: /* query_or_subquery */ - case 395: /* explain_options */ - case 396: /* insert_query */ - case 400: /* stream_options */ - case 403: /* subtable_opt */ - case 404: /* expression */ - case 406: /* where_clause_opt */ - case 407: /* signed */ - case 408: /* literal_func */ - case 411: /* expr_or_subquery */ - case 412: /* pseudo_column */ - case 413: /* column_reference */ - case 414: /* function_expression */ - case 415: /* case_when_expression */ - case 420: /* star_func_para */ - case 422: /* case_when_else_opt */ - case 423: /* common_expression */ - case 424: /* when_then_expr */ - case 425: /* predicate */ - case 428: /* in_predicate_value */ - case 429: /* boolean_value_expression */ - case 430: /* boolean_primary */ - case 431: /* from_clause_opt */ - case 432: /* table_reference_list */ - case 433: /* table_reference */ - case 434: /* table_primary */ - case 435: /* joined_table */ - case 437: /* subquery */ - case 438: /* parenthesized_joined_table */ - case 440: /* search_condition */ - case 441: /* query_specification */ - case 445: /* range_opt */ - case 446: /* every_opt */ - case 447: /* fill_opt */ - case 448: /* twindow_clause_opt */ - case 450: /* having_clause_opt */ - case 451: /* select_item */ - case 453: /* partition_item */ - case 456: /* query_expression */ - case 457: /* query_simple */ - case 459: /* slimit_clause_opt */ - case 460: /* limit_clause_opt */ - case 461: /* union_query_expression */ - case 462: /* query_simple_or_subquery */ - case 464: /* sort_specification */ + case 328: /* cmd */ + case 331: /* literal */ + case 344: /* db_options */ + case 346: /* alter_db_options */ + case 352: /* retention */ + case 353: /* full_table_name */ + case 356: /* table_options */ + case 360: /* alter_table_clause */ + case 361: /* alter_table_options */ + case 364: /* signed_literal */ + case 365: /* create_subtable_clause */ + case 368: /* drop_table_clause */ + case 371: /* column_def */ + case 375: /* duration_literal */ + case 376: /* rollup_func_name */ + case 378: /* col_name */ + case 379: /* db_name_cond_opt */ + case 380: /* like_pattern_opt */ + case 381: /* table_name_cond */ + case 382: /* from_db_opt */ + case 384: /* tag_item */ + case 386: /* full_index_name */ + case 387: /* index_options */ + case 390: /* sliding_opt */ + case 391: /* sma_stream_opt */ + case 392: /* func */ + case 394: /* query_or_subquery */ + case 397: /* explain_options */ + case 398: /* insert_query */ + case 402: /* stream_options */ + case 405: /* subtable_opt */ + case 406: /* expression */ + case 408: /* where_clause_opt */ + case 409: /* signed */ + case 410: /* literal_func */ + case 413: /* expr_or_subquery */ + case 414: /* pseudo_column */ + case 415: /* column_reference */ + case 416: /* function_expression */ + case 417: /* case_when_expression */ + case 422: /* star_func_para */ + case 424: /* case_when_else_opt */ + case 425: /* common_expression */ + case 426: /* when_then_expr */ + case 427: /* predicate */ + case 430: /* in_predicate_value */ + case 431: /* boolean_value_expression */ + case 432: /* boolean_primary */ + case 433: /* from_clause_opt */ + case 434: /* table_reference_list */ + case 435: /* table_reference */ + case 436: /* table_primary */ + case 437: /* joined_table */ + case 439: /* subquery */ + case 440: /* parenthesized_joined_table */ + case 442: /* search_condition */ + case 443: /* query_specification */ + case 447: /* range_opt */ + case 448: /* every_opt */ + case 449: /* fill_opt */ + case 450: /* twindow_clause_opt */ + case 452: /* having_clause_opt */ + case 453: /* select_item */ + case 455: /* partition_item */ + case 458: /* query_expression */ + case 459: /* query_simple */ + case 461: /* slimit_clause_opt */ + case 462: /* limit_clause_opt */ + case 463: /* union_query_expression */ + case 464: /* query_simple_or_subquery */ + case 466: /* sort_specification */ { - nodesDestroyNode((yypminor->yy44)); + nodesDestroyNode((yypminor->yy42)); } break; - case 327: /* account_options */ - case 328: /* alter_account_options */ - case 330: /* alter_account_option */ - case 345: /* speed_opt */ - case 398: /* bufsize_opt */ + case 329: /* account_options */ + case 330: /* alter_account_options */ + case 332: /* alter_account_option */ + case 347: /* speed_opt */ + case 400: /* bufsize_opt */ { } break; - case 331: /* user_name */ - case 334: /* priv_level */ - case 337: /* db_name */ - case 338: /* topic_name */ - case 339: /* dnode_endpoint */ - case 360: /* column_name */ - case 368: /* table_name */ - case 375: /* function_name */ - case 383: /* column_alias */ - case 386: /* index_name */ - case 391: /* sma_func_name */ - case 393: /* cgroup_name */ - case 399: /* stream_name */ - case 410: /* table_alias */ - case 416: /* star_func */ - case 418: /* noarg_func */ - case 436: /* alias_opt */ + case 333: /* user_name */ + case 336: /* priv_level */ + case 339: /* db_name */ + case 340: /* topic_name */ + case 341: /* dnode_endpoint */ + case 362: /* column_name */ + case 370: /* table_name */ + case 377: /* function_name */ + case 385: /* column_alias */ + case 388: /* index_name */ + case 393: /* sma_func_name */ + case 395: /* cgroup_name */ + case 401: /* stream_name */ + case 412: /* table_alias */ + case 418: /* star_func */ + case 420: /* noarg_func */ + case 438: /* alias_opt */ { } break; - case 332: /* sysinfo_opt */ + case 334: /* sysinfo_opt */ { } break; - case 333: /* privileges */ - case 335: /* priv_type_list */ - case 336: /* priv_type */ + case 335: /* privileges */ + case 337: /* priv_type_list */ + case 338: /* priv_type */ { } break; - case 340: /* force_opt */ - case 341: /* not_exists_opt */ - case 343: /* exists_opt */ - case 394: /* analyze_opt */ - case 397: /* agg_func_opt */ - case 442: /* set_quantifier_opt */ + case 342: /* force_opt */ + case 343: /* not_exists_opt */ + case 345: /* exists_opt */ + case 396: /* analyze_opt */ + case 399: /* agg_func_opt */ + case 444: /* set_quantifier_opt */ { } break; - case 346: /* integer_list */ - case 347: /* variable_list */ - case 348: /* retention_list */ - case 352: /* column_def_list */ - case 353: /* tags_def_opt */ - case 355: /* multi_create_clause */ - case 356: /* tags_def */ - case 357: /* multi_drop_clause */ - case 364: /* specific_cols_opt */ - case 365: /* expression_list */ - case 367: /* col_name_list */ - case 370: /* duration_list */ - case 371: /* rollup_func_list */ - case 381: /* tag_list_opt */ - case 387: /* func_list */ - case 401: /* col_list_opt */ - case 402: /* tag_def_or_ref_opt */ - case 405: /* dnode_list */ - case 409: /* literal_list */ - case 417: /* star_func_para_list */ - case 419: /* other_para_list */ - case 421: /* when_then_list */ - case 443: /* select_list */ - case 444: /* partition_by_clause_opt */ - case 449: /* group_by_clause_opt */ - case 452: /* partition_list */ - case 455: /* group_by_list */ - case 458: /* order_by_clause_opt */ - case 463: /* sort_specification_list */ + case 348: /* integer_list */ + case 349: /* variable_list */ + case 350: /* retention_list */ + case 354: /* column_def_list */ + case 355: /* tags_def_opt */ + case 357: /* multi_create_clause */ + case 358: /* tags_def */ + case 359: /* multi_drop_clause */ + case 366: /* specific_cols_opt */ + case 367: /* expression_list */ + case 369: /* col_name_list */ + case 372: /* duration_list */ + case 373: /* rollup_func_list */ + case 383: /* tag_list_opt */ + case 389: /* func_list */ + case 403: /* col_list_opt */ + case 404: /* tag_def_or_ref_opt */ + case 407: /* dnode_list */ + case 411: /* literal_list */ + case 419: /* star_func_para_list */ + case 421: /* other_para_list */ + case 423: /* when_then_list */ + case 445: /* select_list */ + case 446: /* partition_by_clause_opt */ + case 451: /* group_by_clause_opt */ + case 454: /* partition_list */ + case 457: /* group_by_list */ + case 460: /* order_by_clause_opt */ + case 465: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy684)); + nodesDestroyList((yypminor->yy110)); } break; - case 349: /* alter_db_option */ - case 372: /* alter_table_option */ + case 351: /* alter_db_option */ + case 374: /* alter_table_option */ { } break; - case 361: /* type_name */ + case 363: /* type_name */ { } break; - case 426: /* compare_op */ - case 427: /* in_op */ + case 428: /* compare_op */ + case 429: /* in_op */ { } break; - case 439: /* join_type */ + case 441: /* join_type */ { } break; - case 454: /* fill_mode */ + case 456: /* fill_mode */ { } break; - case 465: /* ordering_specification_opt */ + case 467: /* ordering_specification_opt */ { } break; - case 466: /* null_ordering_opt */ + case 468: /* null_ordering_opt */ { } @@ -3110,564 +3066,566 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 326, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 326, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 327, 0 }, /* (2) account_options ::= */ - { 327, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 327, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 327, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 327, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 327, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 327, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 327, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 327, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 327, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 328, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 328, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 330, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 330, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 330, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 330, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 330, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 330, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 330, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 330, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 330, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 330, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 326, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ - { 326, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 326, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - { 326, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - { 326, -3 }, /* (28) cmd ::= DROP USER user_name */ - { 332, 0 }, /* (29) sysinfo_opt ::= */ - { 332, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ - { 326, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 326, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 333, -1 }, /* (33) privileges ::= ALL */ - { 333, -1 }, /* (34) privileges ::= priv_type_list */ - { 333, -1 }, /* (35) privileges ::= SUBSCRIBE */ - { 335, -1 }, /* (36) priv_type_list ::= priv_type */ - { 335, -3 }, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 336, -1 }, /* (38) priv_type ::= READ */ - { 336, -1 }, /* (39) priv_type ::= WRITE */ - { 334, -3 }, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 334, -3 }, /* (41) priv_level ::= db_name NK_DOT NK_STAR */ - { 334, -1 }, /* (42) priv_level ::= topic_name */ - { 326, -3 }, /* (43) cmd ::= CREATE DNODE dnode_endpoint */ - { 326, -5 }, /* (44) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - { 326, -4 }, /* (45) cmd ::= DROP DNODE NK_INTEGER force_opt */ - { 326, -4 }, /* (46) cmd ::= DROP DNODE dnode_endpoint force_opt */ - { 326, -4 }, /* (47) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 326, -5 }, /* (48) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 326, -4 }, /* (49) cmd ::= ALTER ALL DNODES NK_STRING */ - { 326, -5 }, /* (50) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 339, -1 }, /* (51) dnode_endpoint ::= NK_STRING */ - { 339, -1 }, /* (52) dnode_endpoint ::= NK_ID */ - { 339, -1 }, /* (53) dnode_endpoint ::= NK_IPTOKEN */ - { 340, 0 }, /* (54) force_opt ::= */ - { 340, -1 }, /* (55) force_opt ::= FORCE */ - { 326, -3 }, /* (56) cmd ::= ALTER LOCAL NK_STRING */ - { 326, -4 }, /* (57) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 326, -5 }, /* (58) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (59) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (60) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (61) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (62) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (63) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (64) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (65) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (66) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 326, -4 }, /* (67) cmd ::= DROP DATABASE exists_opt db_name */ - { 326, -2 }, /* (68) cmd ::= USE db_name */ - { 326, -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 326, -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */ - { 326, -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */ - { 341, -3 }, /* (72) not_exists_opt ::= IF NOT EXISTS */ - { 341, 0 }, /* (73) not_exists_opt ::= */ - { 343, -2 }, /* (74) exists_opt ::= IF EXISTS */ - { 343, 0 }, /* (75) exists_opt ::= */ - { 342, 0 }, /* (76) db_options ::= */ - { 342, -3 }, /* (77) db_options ::= db_options BUFFER NK_INTEGER */ - { 342, -3 }, /* (78) db_options ::= db_options CACHEMODEL NK_STRING */ - { 342, -3 }, /* (79) db_options ::= db_options CACHESIZE NK_INTEGER */ - { 342, -3 }, /* (80) db_options ::= db_options COMP NK_INTEGER */ - { 342, -3 }, /* (81) db_options ::= db_options DURATION NK_INTEGER */ - { 342, -3 }, /* (82) db_options ::= db_options DURATION NK_VARIABLE */ - { 342, -3 }, /* (83) db_options ::= db_options MAXROWS NK_INTEGER */ - { 342, -3 }, /* (84) db_options ::= db_options MINROWS NK_INTEGER */ - { 342, -3 }, /* (85) db_options ::= db_options KEEP integer_list */ - { 342, -3 }, /* (86) db_options ::= db_options KEEP variable_list */ - { 342, -3 }, /* (87) db_options ::= db_options PAGES NK_INTEGER */ - { 342, -3 }, /* (88) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 342, -3 }, /* (89) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - { 342, -3 }, /* (90) db_options ::= db_options PRECISION NK_STRING */ - { 342, -3 }, /* (91) db_options ::= db_options REPLICA NK_INTEGER */ - { 342, -3 }, /* (92) db_options ::= db_options VGROUPS NK_INTEGER */ - { 342, -3 }, /* (93) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 342, -3 }, /* (94) db_options ::= db_options RETENTIONS retention_list */ - { 342, -3 }, /* (95) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 342, -3 }, /* (96) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - { 342, -3 }, /* (97) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - { 342, -3 }, /* (98) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - { 342, -4 }, /* (99) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - { 342, -3 }, /* (100) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - { 342, -4 }, /* (101) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - { 342, -3 }, /* (102) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - { 342, -3 }, /* (103) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - { 342, -3 }, /* (104) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - { 342, -3 }, /* (105) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ - { 342, -3 }, /* (106) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ - { 344, -1 }, /* (107) alter_db_options ::= alter_db_option */ - { 344, -2 }, /* (108) alter_db_options ::= alter_db_options alter_db_option */ - { 349, -2 }, /* (109) alter_db_option ::= BUFFER NK_INTEGER */ - { 349, -2 }, /* (110) alter_db_option ::= CACHEMODEL NK_STRING */ - { 349, -2 }, /* (111) alter_db_option ::= CACHESIZE NK_INTEGER */ - { 349, -2 }, /* (112) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - { 349, -2 }, /* (113) alter_db_option ::= KEEP integer_list */ - { 349, -2 }, /* (114) alter_db_option ::= KEEP variable_list */ - { 349, -2 }, /* (115) alter_db_option ::= PAGES NK_INTEGER */ - { 349, -2 }, /* (116) alter_db_option ::= REPLICA NK_INTEGER */ - { 349, -2 }, /* (117) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - { 349, -2 }, /* (118) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - { 346, -1 }, /* (119) integer_list ::= NK_INTEGER */ - { 346, -3 }, /* (120) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 347, -1 }, /* (121) variable_list ::= NK_VARIABLE */ - { 347, -3 }, /* (122) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 348, -1 }, /* (123) retention_list ::= retention */ - { 348, -3 }, /* (124) retention_list ::= retention_list NK_COMMA retention */ - { 350, -3 }, /* (125) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 345, 0 }, /* (126) speed_opt ::= */ - { 345, -2 }, /* (127) speed_opt ::= MAX_SPEED NK_INTEGER */ - { 326, -9 }, /* (128) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 326, -3 }, /* (129) cmd ::= CREATE TABLE multi_create_clause */ - { 326, -9 }, /* (130) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 326, -3 }, /* (131) cmd ::= DROP TABLE multi_drop_clause */ - { 326, -4 }, /* (132) cmd ::= DROP STABLE exists_opt full_table_name */ - { 326, -3 }, /* (133) cmd ::= ALTER TABLE alter_table_clause */ - { 326, -3 }, /* (134) cmd ::= ALTER STABLE alter_table_clause */ - { 358, -2 }, /* (135) alter_table_clause ::= full_table_name alter_table_options */ - { 358, -5 }, /* (136) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 358, -4 }, /* (137) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 358, -5 }, /* (138) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 358, -5 }, /* (139) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 358, -5 }, /* (140) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 358, -4 }, /* (141) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 358, -5 }, /* (142) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 358, -5 }, /* (143) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 358, -6 }, /* (144) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 355, -1 }, /* (145) multi_create_clause ::= create_subtable_clause */ - { 355, -2 }, /* (146) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 363, -10 }, /* (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 */ - { 357, -1 }, /* (148) multi_drop_clause ::= drop_table_clause */ - { 357, -2 }, /* (149) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 366, -2 }, /* (150) drop_table_clause ::= exists_opt full_table_name */ - { 364, 0 }, /* (151) specific_cols_opt ::= */ - { 364, -3 }, /* (152) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 351, -1 }, /* (153) full_table_name ::= table_name */ - { 351, -3 }, /* (154) full_table_name ::= db_name NK_DOT table_name */ - { 352, -1 }, /* (155) column_def_list ::= column_def */ - { 352, -3 }, /* (156) column_def_list ::= column_def_list NK_COMMA column_def */ - { 369, -2 }, /* (157) column_def ::= column_name type_name */ - { 369, -4 }, /* (158) column_def ::= column_name type_name COMMENT NK_STRING */ - { 361, -1 }, /* (159) type_name ::= BOOL */ - { 361, -1 }, /* (160) type_name ::= TINYINT */ - { 361, -1 }, /* (161) type_name ::= SMALLINT */ - { 361, -1 }, /* (162) type_name ::= INT */ - { 361, -1 }, /* (163) type_name ::= INTEGER */ - { 361, -1 }, /* (164) type_name ::= BIGINT */ - { 361, -1 }, /* (165) type_name ::= FLOAT */ - { 361, -1 }, /* (166) type_name ::= DOUBLE */ - { 361, -4 }, /* (167) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 361, -1 }, /* (168) type_name ::= TIMESTAMP */ - { 361, -4 }, /* (169) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 361, -2 }, /* (170) type_name ::= TINYINT UNSIGNED */ - { 361, -2 }, /* (171) type_name ::= SMALLINT UNSIGNED */ - { 361, -2 }, /* (172) type_name ::= INT UNSIGNED */ - { 361, -2 }, /* (173) type_name ::= BIGINT UNSIGNED */ - { 361, -1 }, /* (174) type_name ::= JSON */ - { 361, -4 }, /* (175) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 361, -1 }, /* (176) type_name ::= MEDIUMBLOB */ - { 361, -1 }, /* (177) type_name ::= BLOB */ - { 361, -4 }, /* (178) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 361, -1 }, /* (179) type_name ::= DECIMAL */ - { 361, -4 }, /* (180) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 361, -6 }, /* (181) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 353, 0 }, /* (182) tags_def_opt ::= */ - { 353, -1 }, /* (183) tags_def_opt ::= tags_def */ - { 356, -4 }, /* (184) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 354, 0 }, /* (185) table_options ::= */ - { 354, -3 }, /* (186) table_options ::= table_options COMMENT NK_STRING */ - { 354, -3 }, /* (187) table_options ::= table_options MAX_DELAY duration_list */ - { 354, -3 }, /* (188) table_options ::= table_options WATERMARK duration_list */ - { 354, -5 }, /* (189) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 354, -3 }, /* (190) table_options ::= table_options TTL NK_INTEGER */ - { 354, -5 }, /* (191) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 354, -3 }, /* (192) table_options ::= table_options DELETE_MARK duration_list */ - { 359, -1 }, /* (193) alter_table_options ::= alter_table_option */ - { 359, -2 }, /* (194) alter_table_options ::= alter_table_options alter_table_option */ - { 372, -2 }, /* (195) alter_table_option ::= COMMENT NK_STRING */ - { 372, -2 }, /* (196) alter_table_option ::= TTL NK_INTEGER */ - { 370, -1 }, /* (197) duration_list ::= duration_literal */ - { 370, -3 }, /* (198) duration_list ::= duration_list NK_COMMA duration_literal */ - { 371, -1 }, /* (199) rollup_func_list ::= rollup_func_name */ - { 371, -3 }, /* (200) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 374, -1 }, /* (201) rollup_func_name ::= function_name */ - { 374, -1 }, /* (202) rollup_func_name ::= FIRST */ - { 374, -1 }, /* (203) rollup_func_name ::= LAST */ - { 367, -1 }, /* (204) col_name_list ::= col_name */ - { 367, -3 }, /* (205) col_name_list ::= col_name_list NK_COMMA col_name */ - { 376, -1 }, /* (206) col_name ::= column_name */ - { 326, -2 }, /* (207) cmd ::= SHOW DNODES */ - { 326, -2 }, /* (208) cmd ::= SHOW USERS */ - { 326, -3 }, /* (209) cmd ::= SHOW USER PRIVILEGES */ - { 326, -2 }, /* (210) cmd ::= SHOW DATABASES */ - { 326, -4 }, /* (211) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 326, -4 }, /* (212) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 326, -3 }, /* (213) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 326, -2 }, /* (214) cmd ::= SHOW MNODES */ - { 326, -2 }, /* (215) cmd ::= SHOW QNODES */ - { 326, -2 }, /* (216) cmd ::= SHOW FUNCTIONS */ - { 326, -5 }, /* (217) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 326, -2 }, /* (218) cmd ::= SHOW STREAMS */ - { 326, -2 }, /* (219) cmd ::= SHOW ACCOUNTS */ - { 326, -2 }, /* (220) cmd ::= SHOW APPS */ - { 326, -2 }, /* (221) cmd ::= SHOW CONNECTIONS */ - { 326, -2 }, /* (222) cmd ::= SHOW LICENCES */ - { 326, -2 }, /* (223) cmd ::= SHOW GRANTS */ - { 326, -4 }, /* (224) cmd ::= SHOW CREATE DATABASE db_name */ - { 326, -4 }, /* (225) cmd ::= SHOW CREATE TABLE full_table_name */ - { 326, -4 }, /* (226) cmd ::= SHOW CREATE STABLE full_table_name */ - { 326, -2 }, /* (227) cmd ::= SHOW QUERIES */ - { 326, -2 }, /* (228) cmd ::= SHOW SCORES */ - { 326, -2 }, /* (229) cmd ::= SHOW TOPICS */ - { 326, -2 }, /* (230) cmd ::= SHOW VARIABLES */ - { 326, -3 }, /* (231) cmd ::= SHOW CLUSTER VARIABLES */ - { 326, -3 }, /* (232) cmd ::= SHOW LOCAL VARIABLES */ - { 326, -5 }, /* (233) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - { 326, -2 }, /* (234) cmd ::= SHOW BNODES */ - { 326, -2 }, /* (235) cmd ::= SHOW SNODES */ - { 326, -2 }, /* (236) cmd ::= SHOW CLUSTER */ - { 326, -2 }, /* (237) cmd ::= SHOW TRANSACTIONS */ - { 326, -4 }, /* (238) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 326, -2 }, /* (239) cmd ::= SHOW CONSUMERS */ - { 326, -2 }, /* (240) cmd ::= SHOW SUBSCRIPTIONS */ - { 326, -5 }, /* (241) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 326, -7 }, /* (242) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - { 326, -3 }, /* (243) cmd ::= SHOW VNODES NK_INTEGER */ - { 326, -3 }, /* (244) cmd ::= SHOW VNODES NK_STRING */ - { 326, -3 }, /* (245) cmd ::= SHOW db_name_cond_opt ALIVE */ - { 326, -3 }, /* (246) cmd ::= SHOW CLUSTER ALIVE */ - { 377, 0 }, /* (247) db_name_cond_opt ::= */ - { 377, -2 }, /* (248) db_name_cond_opt ::= db_name NK_DOT */ - { 378, 0 }, /* (249) like_pattern_opt ::= */ - { 378, -2 }, /* (250) like_pattern_opt ::= LIKE NK_STRING */ - { 379, -1 }, /* (251) table_name_cond ::= table_name */ - { 380, 0 }, /* (252) from_db_opt ::= */ - { 380, -2 }, /* (253) from_db_opt ::= FROM db_name */ - { 381, 0 }, /* (254) tag_list_opt ::= */ - { 381, -1 }, /* (255) tag_list_opt ::= tag_item */ - { 381, -3 }, /* (256) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - { 382, -1 }, /* (257) tag_item ::= TBNAME */ - { 382, -1 }, /* (258) tag_item ::= QTAGS */ - { 382, -1 }, /* (259) tag_item ::= column_name */ - { 382, -2 }, /* (260) tag_item ::= column_name column_alias */ - { 382, -3 }, /* (261) tag_item ::= column_name AS column_alias */ - { 326, -8 }, /* (262) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ - { 326, -9 }, /* (263) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ - { 326, -4 }, /* (264) cmd ::= DROP INDEX exists_opt full_index_name */ - { 384, -1 }, /* (265) full_index_name ::= index_name */ - { 384, -3 }, /* (266) full_index_name ::= db_name NK_DOT index_name */ - { 385, -10 }, /* (267) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 385, -12 }, /* (268) 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 */ - { 387, -1 }, /* (269) func_list ::= func */ - { 387, -3 }, /* (270) func_list ::= func_list NK_COMMA func */ - { 390, -4 }, /* (271) func ::= sma_func_name NK_LP expression_list NK_RP */ - { 391, -1 }, /* (272) sma_func_name ::= function_name */ - { 391, -1 }, /* (273) sma_func_name ::= COUNT */ - { 391, -1 }, /* (274) sma_func_name ::= FIRST */ - { 391, -1 }, /* (275) sma_func_name ::= LAST */ - { 391, -1 }, /* (276) sma_func_name ::= LAST_ROW */ - { 389, 0 }, /* (277) sma_stream_opt ::= */ - { 389, -3 }, /* (278) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 389, -3 }, /* (279) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 389, -3 }, /* (280) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 326, -6 }, /* (281) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 326, -7 }, /* (282) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 326, -9 }, /* (283) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 326, -7 }, /* (284) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 326, -9 }, /* (285) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 326, -4 }, /* (286) cmd ::= DROP TOPIC exists_opt topic_name */ - { 326, -7 }, /* (287) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 326, -2 }, /* (288) cmd ::= DESC full_table_name */ - { 326, -2 }, /* (289) cmd ::= DESCRIBE full_table_name */ - { 326, -3 }, /* (290) cmd ::= RESET QUERY CACHE */ - { 326, -4 }, /* (291) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 326, -4 }, /* (292) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - { 394, 0 }, /* (293) analyze_opt ::= */ - { 394, -1 }, /* (294) analyze_opt ::= ANALYZE */ - { 395, 0 }, /* (295) explain_options ::= */ - { 395, -3 }, /* (296) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 395, -3 }, /* (297) explain_options ::= explain_options RATIO NK_FLOAT */ - { 326, -10 }, /* (298) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 326, -4 }, /* (299) cmd ::= DROP FUNCTION exists_opt function_name */ - { 397, 0 }, /* (300) agg_func_opt ::= */ - { 397, -1 }, /* (301) agg_func_opt ::= AGGREGATE */ - { 398, 0 }, /* (302) bufsize_opt ::= */ - { 398, -2 }, /* (303) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 326, -12 }, /* (304) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - { 326, -4 }, /* (305) cmd ::= DROP STREAM exists_opt stream_name */ - { 401, 0 }, /* (306) col_list_opt ::= */ - { 401, -3 }, /* (307) col_list_opt ::= NK_LP col_name_list NK_RP */ - { 402, 0 }, /* (308) tag_def_or_ref_opt ::= */ - { 402, -1 }, /* (309) tag_def_or_ref_opt ::= tags_def */ - { 402, -4 }, /* (310) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - { 400, 0 }, /* (311) stream_options ::= */ - { 400, -3 }, /* (312) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 400, -3 }, /* (313) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 400, -4 }, /* (314) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 400, -3 }, /* (315) stream_options ::= stream_options WATERMARK duration_literal */ - { 400, -4 }, /* (316) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 400, -3 }, /* (317) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 403, 0 }, /* (318) subtable_opt ::= */ - { 403, -4 }, /* (319) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 326, -3 }, /* (320) cmd ::= KILL CONNECTION NK_INTEGER */ - { 326, -3 }, /* (321) cmd ::= KILL QUERY NK_STRING */ - { 326, -3 }, /* (322) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 326, -2 }, /* (323) cmd ::= BALANCE VGROUP */ - { 326, -4 }, /* (324) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 326, -4 }, /* (325) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 326, -3 }, /* (326) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 405, -2 }, /* (327) dnode_list ::= DNODE NK_INTEGER */ - { 405, -3 }, /* (328) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 326, -4 }, /* (329) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 326, -1 }, /* (330) cmd ::= query_or_subquery */ - { 326, -1 }, /* (331) cmd ::= insert_query */ - { 396, -7 }, /* (332) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 396, -4 }, /* (333) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - { 329, -1 }, /* (334) literal ::= NK_INTEGER */ - { 329, -1 }, /* (335) literal ::= NK_FLOAT */ - { 329, -1 }, /* (336) literal ::= NK_STRING */ - { 329, -1 }, /* (337) literal ::= NK_BOOL */ - { 329, -2 }, /* (338) literal ::= TIMESTAMP NK_STRING */ - { 329, -1 }, /* (339) literal ::= duration_literal */ - { 329, -1 }, /* (340) literal ::= NULL */ - { 329, -1 }, /* (341) literal ::= NK_QUESTION */ - { 373, -1 }, /* (342) duration_literal ::= NK_VARIABLE */ - { 407, -1 }, /* (343) signed ::= NK_INTEGER */ - { 407, -2 }, /* (344) signed ::= NK_PLUS NK_INTEGER */ - { 407, -2 }, /* (345) signed ::= NK_MINUS NK_INTEGER */ - { 407, -1 }, /* (346) signed ::= NK_FLOAT */ - { 407, -2 }, /* (347) signed ::= NK_PLUS NK_FLOAT */ - { 407, -2 }, /* (348) signed ::= NK_MINUS NK_FLOAT */ - { 362, -1 }, /* (349) signed_literal ::= signed */ - { 362, -1 }, /* (350) signed_literal ::= NK_STRING */ - { 362, -1 }, /* (351) signed_literal ::= NK_BOOL */ - { 362, -2 }, /* (352) signed_literal ::= TIMESTAMP NK_STRING */ - { 362, -1 }, /* (353) signed_literal ::= duration_literal */ - { 362, -1 }, /* (354) signed_literal ::= NULL */ - { 362, -1 }, /* (355) signed_literal ::= literal_func */ - { 362, -1 }, /* (356) signed_literal ::= NK_QUESTION */ - { 409, -1 }, /* (357) literal_list ::= signed_literal */ - { 409, -3 }, /* (358) literal_list ::= literal_list NK_COMMA signed_literal */ - { 337, -1 }, /* (359) db_name ::= NK_ID */ - { 368, -1 }, /* (360) table_name ::= NK_ID */ - { 360, -1 }, /* (361) column_name ::= NK_ID */ - { 375, -1 }, /* (362) function_name ::= NK_ID */ - { 410, -1 }, /* (363) table_alias ::= NK_ID */ - { 383, -1 }, /* (364) column_alias ::= NK_ID */ - { 331, -1 }, /* (365) user_name ::= NK_ID */ - { 338, -1 }, /* (366) topic_name ::= NK_ID */ - { 399, -1 }, /* (367) stream_name ::= NK_ID */ - { 393, -1 }, /* (368) cgroup_name ::= NK_ID */ - { 386, -1 }, /* (369) index_name ::= NK_ID */ - { 411, -1 }, /* (370) expr_or_subquery ::= expression */ - { 404, -1 }, /* (371) expression ::= literal */ - { 404, -1 }, /* (372) expression ::= pseudo_column */ - { 404, -1 }, /* (373) expression ::= column_reference */ - { 404, -1 }, /* (374) expression ::= function_expression */ - { 404, -1 }, /* (375) expression ::= case_when_expression */ - { 404, -3 }, /* (376) expression ::= NK_LP expression NK_RP */ - { 404, -2 }, /* (377) expression ::= NK_PLUS expr_or_subquery */ - { 404, -2 }, /* (378) expression ::= NK_MINUS expr_or_subquery */ - { 404, -3 }, /* (379) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 404, -3 }, /* (380) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 404, -3 }, /* (381) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 404, -3 }, /* (382) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 404, -3 }, /* (383) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 404, -3 }, /* (384) expression ::= column_reference NK_ARROW NK_STRING */ - { 404, -3 }, /* (385) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 404, -3 }, /* (386) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 365, -1 }, /* (387) expression_list ::= expr_or_subquery */ - { 365, -3 }, /* (388) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 413, -1 }, /* (389) column_reference ::= column_name */ - { 413, -3 }, /* (390) column_reference ::= table_name NK_DOT column_name */ - { 412, -1 }, /* (391) pseudo_column ::= ROWTS */ - { 412, -1 }, /* (392) pseudo_column ::= TBNAME */ - { 412, -3 }, /* (393) pseudo_column ::= table_name NK_DOT TBNAME */ - { 412, -1 }, /* (394) pseudo_column ::= QSTART */ - { 412, -1 }, /* (395) pseudo_column ::= QEND */ - { 412, -1 }, /* (396) pseudo_column ::= QDURATION */ - { 412, -1 }, /* (397) pseudo_column ::= WSTART */ - { 412, -1 }, /* (398) pseudo_column ::= WEND */ - { 412, -1 }, /* (399) pseudo_column ::= WDURATION */ - { 412, -1 }, /* (400) pseudo_column ::= IROWTS */ - { 412, -1 }, /* (401) pseudo_column ::= ISFILLED */ - { 412, -1 }, /* (402) pseudo_column ::= QTAGS */ - { 414, -4 }, /* (403) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 414, -4 }, /* (404) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 414, -6 }, /* (405) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 414, -1 }, /* (406) function_expression ::= literal_func */ - { 408, -3 }, /* (407) literal_func ::= noarg_func NK_LP NK_RP */ - { 408, -1 }, /* (408) literal_func ::= NOW */ - { 418, -1 }, /* (409) noarg_func ::= NOW */ - { 418, -1 }, /* (410) noarg_func ::= TODAY */ - { 418, -1 }, /* (411) noarg_func ::= TIMEZONE */ - { 418, -1 }, /* (412) noarg_func ::= DATABASE */ - { 418, -1 }, /* (413) noarg_func ::= CLIENT_VERSION */ - { 418, -1 }, /* (414) noarg_func ::= SERVER_VERSION */ - { 418, -1 }, /* (415) noarg_func ::= SERVER_STATUS */ - { 418, -1 }, /* (416) noarg_func ::= CURRENT_USER */ - { 418, -1 }, /* (417) noarg_func ::= USER */ - { 416, -1 }, /* (418) star_func ::= COUNT */ - { 416, -1 }, /* (419) star_func ::= FIRST */ - { 416, -1 }, /* (420) star_func ::= LAST */ - { 416, -1 }, /* (421) star_func ::= LAST_ROW */ - { 417, -1 }, /* (422) star_func_para_list ::= NK_STAR */ - { 417, -1 }, /* (423) star_func_para_list ::= other_para_list */ - { 419, -1 }, /* (424) other_para_list ::= star_func_para */ - { 419, -3 }, /* (425) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 420, -1 }, /* (426) star_func_para ::= expr_or_subquery */ - { 420, -3 }, /* (427) star_func_para ::= table_name NK_DOT NK_STAR */ - { 415, -4 }, /* (428) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 415, -5 }, /* (429) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 421, -1 }, /* (430) when_then_list ::= when_then_expr */ - { 421, -2 }, /* (431) when_then_list ::= when_then_list when_then_expr */ - { 424, -4 }, /* (432) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 422, 0 }, /* (433) case_when_else_opt ::= */ - { 422, -2 }, /* (434) case_when_else_opt ::= ELSE common_expression */ - { 425, -3 }, /* (435) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 425, -5 }, /* (436) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 425, -6 }, /* (437) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 425, -3 }, /* (438) predicate ::= expr_or_subquery IS NULL */ - { 425, -4 }, /* (439) predicate ::= expr_or_subquery IS NOT NULL */ - { 425, -3 }, /* (440) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 426, -1 }, /* (441) compare_op ::= NK_LT */ - { 426, -1 }, /* (442) compare_op ::= NK_GT */ - { 426, -1 }, /* (443) compare_op ::= NK_LE */ - { 426, -1 }, /* (444) compare_op ::= NK_GE */ - { 426, -1 }, /* (445) compare_op ::= NK_NE */ - { 426, -1 }, /* (446) compare_op ::= NK_EQ */ - { 426, -1 }, /* (447) compare_op ::= LIKE */ - { 426, -2 }, /* (448) compare_op ::= NOT LIKE */ - { 426, -1 }, /* (449) compare_op ::= MATCH */ - { 426, -1 }, /* (450) compare_op ::= NMATCH */ - { 426, -1 }, /* (451) compare_op ::= CONTAINS */ - { 427, -1 }, /* (452) in_op ::= IN */ - { 427, -2 }, /* (453) in_op ::= NOT IN */ - { 428, -3 }, /* (454) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 429, -1 }, /* (455) boolean_value_expression ::= boolean_primary */ - { 429, -2 }, /* (456) boolean_value_expression ::= NOT boolean_primary */ - { 429, -3 }, /* (457) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 429, -3 }, /* (458) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 430, -1 }, /* (459) boolean_primary ::= predicate */ - { 430, -3 }, /* (460) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 423, -1 }, /* (461) common_expression ::= expr_or_subquery */ - { 423, -1 }, /* (462) common_expression ::= boolean_value_expression */ - { 431, 0 }, /* (463) from_clause_opt ::= */ - { 431, -2 }, /* (464) from_clause_opt ::= FROM table_reference_list */ - { 432, -1 }, /* (465) table_reference_list ::= table_reference */ - { 432, -3 }, /* (466) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 433, -1 }, /* (467) table_reference ::= table_primary */ - { 433, -1 }, /* (468) table_reference ::= joined_table */ - { 434, -2 }, /* (469) table_primary ::= table_name alias_opt */ - { 434, -4 }, /* (470) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 434, -2 }, /* (471) table_primary ::= subquery alias_opt */ - { 434, -1 }, /* (472) table_primary ::= parenthesized_joined_table */ - { 436, 0 }, /* (473) alias_opt ::= */ - { 436, -1 }, /* (474) alias_opt ::= table_alias */ - { 436, -2 }, /* (475) alias_opt ::= AS table_alias */ - { 438, -3 }, /* (476) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 438, -3 }, /* (477) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 435, -6 }, /* (478) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 439, 0 }, /* (479) join_type ::= */ - { 439, -1 }, /* (480) join_type ::= INNER */ - { 441, -12 }, /* (481) 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 */ - { 442, 0 }, /* (482) set_quantifier_opt ::= */ - { 442, -1 }, /* (483) set_quantifier_opt ::= DISTINCT */ - { 442, -1 }, /* (484) set_quantifier_opt ::= ALL */ - { 443, -1 }, /* (485) select_list ::= select_item */ - { 443, -3 }, /* (486) select_list ::= select_list NK_COMMA select_item */ - { 451, -1 }, /* (487) select_item ::= NK_STAR */ - { 451, -1 }, /* (488) select_item ::= common_expression */ - { 451, -2 }, /* (489) select_item ::= common_expression column_alias */ - { 451, -3 }, /* (490) select_item ::= common_expression AS column_alias */ - { 451, -3 }, /* (491) select_item ::= table_name NK_DOT NK_STAR */ - { 406, 0 }, /* (492) where_clause_opt ::= */ - { 406, -2 }, /* (493) where_clause_opt ::= WHERE search_condition */ - { 444, 0 }, /* (494) partition_by_clause_opt ::= */ - { 444, -3 }, /* (495) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 452, -1 }, /* (496) partition_list ::= partition_item */ - { 452, -3 }, /* (497) partition_list ::= partition_list NK_COMMA partition_item */ - { 453, -1 }, /* (498) partition_item ::= expr_or_subquery */ - { 453, -2 }, /* (499) partition_item ::= expr_or_subquery column_alias */ - { 453, -3 }, /* (500) partition_item ::= expr_or_subquery AS column_alias */ - { 448, 0 }, /* (501) twindow_clause_opt ::= */ - { 448, -6 }, /* (502) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 448, -4 }, /* (503) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 448, -6 }, /* (504) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 448, -8 }, /* (505) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 448, -7 }, /* (506) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - { 388, 0 }, /* (507) sliding_opt ::= */ - { 388, -4 }, /* (508) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 447, 0 }, /* (509) fill_opt ::= */ - { 447, -4 }, /* (510) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 447, -6 }, /* (511) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 454, -1 }, /* (512) fill_mode ::= NONE */ - { 454, -1 }, /* (513) fill_mode ::= PREV */ - { 454, -1 }, /* (514) fill_mode ::= NULL */ - { 454, -1 }, /* (515) fill_mode ::= LINEAR */ - { 454, -1 }, /* (516) fill_mode ::= NEXT */ - { 449, 0 }, /* (517) group_by_clause_opt ::= */ - { 449, -3 }, /* (518) group_by_clause_opt ::= GROUP BY group_by_list */ - { 455, -1 }, /* (519) group_by_list ::= expr_or_subquery */ - { 455, -3 }, /* (520) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 450, 0 }, /* (521) having_clause_opt ::= */ - { 450, -2 }, /* (522) having_clause_opt ::= HAVING search_condition */ - { 445, 0 }, /* (523) range_opt ::= */ - { 445, -6 }, /* (524) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 446, 0 }, /* (525) every_opt ::= */ - { 446, -4 }, /* (526) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 456, -4 }, /* (527) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 457, -1 }, /* (528) query_simple ::= query_specification */ - { 457, -1 }, /* (529) query_simple ::= union_query_expression */ - { 461, -4 }, /* (530) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 461, -3 }, /* (531) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 462, -1 }, /* (532) query_simple_or_subquery ::= query_simple */ - { 462, -1 }, /* (533) query_simple_or_subquery ::= subquery */ - { 392, -1 }, /* (534) query_or_subquery ::= query_expression */ - { 392, -1 }, /* (535) query_or_subquery ::= subquery */ - { 458, 0 }, /* (536) order_by_clause_opt ::= */ - { 458, -3 }, /* (537) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 459, 0 }, /* (538) slimit_clause_opt ::= */ - { 459, -2 }, /* (539) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 459, -4 }, /* (540) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 459, -4 }, /* (541) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 460, 0 }, /* (542) limit_clause_opt ::= */ - { 460, -2 }, /* (543) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 460, -4 }, /* (544) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 460, -4 }, /* (545) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 437, -3 }, /* (546) subquery ::= NK_LP query_expression NK_RP */ - { 437, -3 }, /* (547) subquery ::= NK_LP subquery NK_RP */ - { 440, -1 }, /* (548) search_condition ::= common_expression */ - { 463, -1 }, /* (549) sort_specification_list ::= sort_specification */ - { 463, -3 }, /* (550) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 464, -3 }, /* (551) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 465, 0 }, /* (552) ordering_specification_opt ::= */ - { 465, -1 }, /* (553) ordering_specification_opt ::= ASC */ - { 465, -1 }, /* (554) ordering_specification_opt ::= DESC */ - { 466, 0 }, /* (555) null_ordering_opt ::= */ - { 466, -2 }, /* (556) null_ordering_opt ::= NULLS FIRST */ - { 466, -2 }, /* (557) null_ordering_opt ::= NULLS LAST */ + { 328, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 328, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 329, 0 }, /* (2) account_options ::= */ + { 329, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 329, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 329, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 329, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 329, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 329, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 329, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 329, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 329, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 330, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 330, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 332, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 332, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 332, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 332, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 332, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 332, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 332, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 332, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 332, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 332, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 328, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ + { 328, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 328, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + { 328, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + { 328, -3 }, /* (28) cmd ::= DROP USER user_name */ + { 334, 0 }, /* (29) sysinfo_opt ::= */ + { 334, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ + { 328, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 328, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 335, -1 }, /* (33) privileges ::= ALL */ + { 335, -1 }, /* (34) privileges ::= priv_type_list */ + { 335, -1 }, /* (35) privileges ::= SUBSCRIBE */ + { 337, -1 }, /* (36) priv_type_list ::= priv_type */ + { 337, -3 }, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 338, -1 }, /* (38) priv_type ::= READ */ + { 338, -1 }, /* (39) priv_type ::= WRITE */ + { 336, -3 }, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 336, -3 }, /* (41) priv_level ::= db_name NK_DOT NK_STAR */ + { 336, -1 }, /* (42) priv_level ::= topic_name */ + { 328, -3 }, /* (43) cmd ::= CREATE DNODE dnode_endpoint */ + { 328, -5 }, /* (44) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + { 328, -4 }, /* (45) cmd ::= DROP DNODE NK_INTEGER force_opt */ + { 328, -4 }, /* (46) cmd ::= DROP DNODE dnode_endpoint force_opt */ + { 328, -4 }, /* (47) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 328, -5 }, /* (48) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 328, -4 }, /* (49) cmd ::= ALTER ALL DNODES NK_STRING */ + { 328, -5 }, /* (50) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 341, -1 }, /* (51) dnode_endpoint ::= NK_STRING */ + { 341, -1 }, /* (52) dnode_endpoint ::= NK_ID */ + { 341, -1 }, /* (53) dnode_endpoint ::= NK_IPTOKEN */ + { 342, 0 }, /* (54) force_opt ::= */ + { 342, -1 }, /* (55) force_opt ::= FORCE */ + { 328, -3 }, /* (56) cmd ::= ALTER LOCAL NK_STRING */ + { 328, -4 }, /* (57) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 328, -5 }, /* (58) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (59) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (60) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (61) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (62) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (63) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (64) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (65) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (66) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 328, -4 }, /* (67) cmd ::= DROP DATABASE exists_opt db_name */ + { 328, -2 }, /* (68) cmd ::= USE db_name */ + { 328, -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 328, -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */ + { 328, -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */ + { 343, -3 }, /* (72) not_exists_opt ::= IF NOT EXISTS */ + { 343, 0 }, /* (73) not_exists_opt ::= */ + { 345, -2 }, /* (74) exists_opt ::= IF EXISTS */ + { 345, 0 }, /* (75) exists_opt ::= */ + { 344, 0 }, /* (76) db_options ::= */ + { 344, -3 }, /* (77) db_options ::= db_options BUFFER NK_INTEGER */ + { 344, -3 }, /* (78) db_options ::= db_options CACHEMODEL NK_STRING */ + { 344, -3 }, /* (79) db_options ::= db_options CACHESIZE NK_INTEGER */ + { 344, -3 }, /* (80) db_options ::= db_options COMP NK_INTEGER */ + { 344, -3 }, /* (81) db_options ::= db_options DURATION NK_INTEGER */ + { 344, -3 }, /* (82) db_options ::= db_options DURATION NK_VARIABLE */ + { 344, -3 }, /* (83) db_options ::= db_options MAXROWS NK_INTEGER */ + { 344, -3 }, /* (84) db_options ::= db_options MINROWS NK_INTEGER */ + { 344, -3 }, /* (85) db_options ::= db_options KEEP integer_list */ + { 344, -3 }, /* (86) db_options ::= db_options KEEP variable_list */ + { 344, -3 }, /* (87) db_options ::= db_options PAGES NK_INTEGER */ + { 344, -3 }, /* (88) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 344, -3 }, /* (89) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + { 344, -3 }, /* (90) db_options ::= db_options PRECISION NK_STRING */ + { 344, -3 }, /* (91) db_options ::= db_options REPLICA NK_INTEGER */ + { 344, -3 }, /* (92) db_options ::= db_options VGROUPS NK_INTEGER */ + { 344, -3 }, /* (93) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 344, -3 }, /* (94) db_options ::= db_options RETENTIONS retention_list */ + { 344, -3 }, /* (95) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 344, -3 }, /* (96) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + { 344, -3 }, /* (97) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + { 344, -3 }, /* (98) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + { 344, -4 }, /* (99) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + { 344, -3 }, /* (100) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + { 344, -4 }, /* (101) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + { 344, -3 }, /* (102) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + { 344, -3 }, /* (103) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + { 344, -3 }, /* (104) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + { 344, -3 }, /* (105) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ + { 344, -3 }, /* (106) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ + { 346, -1 }, /* (107) alter_db_options ::= alter_db_option */ + { 346, -2 }, /* (108) alter_db_options ::= alter_db_options alter_db_option */ + { 351, -2 }, /* (109) alter_db_option ::= BUFFER NK_INTEGER */ + { 351, -2 }, /* (110) alter_db_option ::= CACHEMODEL NK_STRING */ + { 351, -2 }, /* (111) alter_db_option ::= CACHESIZE NK_INTEGER */ + { 351, -2 }, /* (112) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + { 351, -2 }, /* (113) alter_db_option ::= KEEP integer_list */ + { 351, -2 }, /* (114) alter_db_option ::= KEEP variable_list */ + { 351, -2 }, /* (115) alter_db_option ::= PAGES NK_INTEGER */ + { 351, -2 }, /* (116) alter_db_option ::= REPLICA NK_INTEGER */ + { 351, -2 }, /* (117) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + { 351, -2 }, /* (118) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + { 348, -1 }, /* (119) integer_list ::= NK_INTEGER */ + { 348, -3 }, /* (120) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 349, -1 }, /* (121) variable_list ::= NK_VARIABLE */ + { 349, -3 }, /* (122) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 350, -1 }, /* (123) retention_list ::= retention */ + { 350, -3 }, /* (124) retention_list ::= retention_list NK_COMMA retention */ + { 352, -3 }, /* (125) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 347, 0 }, /* (126) speed_opt ::= */ + { 347, -2 }, /* (127) speed_opt ::= MAX_SPEED NK_INTEGER */ + { 328, -9 }, /* (128) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 328, -3 }, /* (129) cmd ::= CREATE TABLE multi_create_clause */ + { 328, -9 }, /* (130) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 328, -3 }, /* (131) cmd ::= DROP TABLE multi_drop_clause */ + { 328, -4 }, /* (132) cmd ::= DROP STABLE exists_opt full_table_name */ + { 328, -3 }, /* (133) cmd ::= ALTER TABLE alter_table_clause */ + { 328, -3 }, /* (134) cmd ::= ALTER STABLE alter_table_clause */ + { 360, -2 }, /* (135) alter_table_clause ::= full_table_name alter_table_options */ + { 360, -5 }, /* (136) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 360, -4 }, /* (137) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 360, -5 }, /* (138) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 360, -5 }, /* (139) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 360, -5 }, /* (140) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 360, -4 }, /* (141) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 360, -5 }, /* (142) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 360, -5 }, /* (143) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 360, -6 }, /* (144) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 357, -1 }, /* (145) multi_create_clause ::= create_subtable_clause */ + { 357, -2 }, /* (146) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 365, -10 }, /* (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 */ + { 359, -1 }, /* (148) multi_drop_clause ::= drop_table_clause */ + { 359, -2 }, /* (149) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 368, -2 }, /* (150) drop_table_clause ::= exists_opt full_table_name */ + { 366, 0 }, /* (151) specific_cols_opt ::= */ + { 366, -3 }, /* (152) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 353, -1 }, /* (153) full_table_name ::= table_name */ + { 353, -3 }, /* (154) full_table_name ::= db_name NK_DOT table_name */ + { 354, -1 }, /* (155) column_def_list ::= column_def */ + { 354, -3 }, /* (156) column_def_list ::= column_def_list NK_COMMA column_def */ + { 371, -2 }, /* (157) column_def ::= column_name type_name */ + { 371, -4 }, /* (158) column_def ::= column_name type_name COMMENT NK_STRING */ + { 363, -1 }, /* (159) type_name ::= BOOL */ + { 363, -1 }, /* (160) type_name ::= TINYINT */ + { 363, -1 }, /* (161) type_name ::= SMALLINT */ + { 363, -1 }, /* (162) type_name ::= INT */ + { 363, -1 }, /* (163) type_name ::= INTEGER */ + { 363, -1 }, /* (164) type_name ::= BIGINT */ + { 363, -1 }, /* (165) type_name ::= FLOAT */ + { 363, -1 }, /* (166) type_name ::= DOUBLE */ + { 363, -4 }, /* (167) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 363, -1 }, /* (168) type_name ::= TIMESTAMP */ + { 363, -4 }, /* (169) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 363, -2 }, /* (170) type_name ::= TINYINT UNSIGNED */ + { 363, -2 }, /* (171) type_name ::= SMALLINT UNSIGNED */ + { 363, -2 }, /* (172) type_name ::= INT UNSIGNED */ + { 363, -2 }, /* (173) type_name ::= BIGINT UNSIGNED */ + { 363, -1 }, /* (174) type_name ::= JSON */ + { 363, -4 }, /* (175) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 363, -1 }, /* (176) type_name ::= MEDIUMBLOB */ + { 363, -1 }, /* (177) type_name ::= BLOB */ + { 363, -4 }, /* (178) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 363, -1 }, /* (179) type_name ::= DECIMAL */ + { 363, -4 }, /* (180) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 363, -6 }, /* (181) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 355, 0 }, /* (182) tags_def_opt ::= */ + { 355, -1 }, /* (183) tags_def_opt ::= tags_def */ + { 358, -4 }, /* (184) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 356, 0 }, /* (185) table_options ::= */ + { 356, -3 }, /* (186) table_options ::= table_options COMMENT NK_STRING */ + { 356, -3 }, /* (187) table_options ::= table_options MAX_DELAY duration_list */ + { 356, -3 }, /* (188) table_options ::= table_options WATERMARK duration_list */ + { 356, -5 }, /* (189) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 356, -3 }, /* (190) table_options ::= table_options TTL NK_INTEGER */ + { 356, -5 }, /* (191) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 356, -3 }, /* (192) table_options ::= table_options DELETE_MARK duration_list */ + { 361, -1 }, /* (193) alter_table_options ::= alter_table_option */ + { 361, -2 }, /* (194) alter_table_options ::= alter_table_options alter_table_option */ + { 374, -2 }, /* (195) alter_table_option ::= COMMENT NK_STRING */ + { 374, -2 }, /* (196) alter_table_option ::= TTL NK_INTEGER */ + { 372, -1 }, /* (197) duration_list ::= duration_literal */ + { 372, -3 }, /* (198) duration_list ::= duration_list NK_COMMA duration_literal */ + { 373, -1 }, /* (199) rollup_func_list ::= rollup_func_name */ + { 373, -3 }, /* (200) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 376, -1 }, /* (201) rollup_func_name ::= function_name */ + { 376, -1 }, /* (202) rollup_func_name ::= FIRST */ + { 376, -1 }, /* (203) rollup_func_name ::= LAST */ + { 369, -1 }, /* (204) col_name_list ::= col_name */ + { 369, -3 }, /* (205) col_name_list ::= col_name_list NK_COMMA col_name */ + { 378, -1 }, /* (206) col_name ::= column_name */ + { 328, -2 }, /* (207) cmd ::= SHOW DNODES */ + { 328, -2 }, /* (208) cmd ::= SHOW USERS */ + { 328, -3 }, /* (209) cmd ::= SHOW USER PRIVILEGES */ + { 328, -2 }, /* (210) cmd ::= SHOW DATABASES */ + { 328, -4 }, /* (211) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 328, -4 }, /* (212) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 328, -3 }, /* (213) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 328, -2 }, /* (214) cmd ::= SHOW MNODES */ + { 328, -2 }, /* (215) cmd ::= SHOW QNODES */ + { 328, -2 }, /* (216) cmd ::= SHOW FUNCTIONS */ + { 328, -5 }, /* (217) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 328, -2 }, /* (218) cmd ::= SHOW STREAMS */ + { 328, -2 }, /* (219) cmd ::= SHOW ACCOUNTS */ + { 328, -2 }, /* (220) cmd ::= SHOW APPS */ + { 328, -2 }, /* (221) cmd ::= SHOW CONNECTIONS */ + { 328, -2 }, /* (222) cmd ::= SHOW LICENCES */ + { 328, -2 }, /* (223) cmd ::= SHOW GRANTS */ + { 328, -4 }, /* (224) cmd ::= SHOW CREATE DATABASE db_name */ + { 328, -4 }, /* (225) cmd ::= SHOW CREATE TABLE full_table_name */ + { 328, -4 }, /* (226) cmd ::= SHOW CREATE STABLE full_table_name */ + { 328, -2 }, /* (227) cmd ::= SHOW QUERIES */ + { 328, -2 }, /* (228) cmd ::= SHOW SCORES */ + { 328, -2 }, /* (229) cmd ::= SHOW TOPICS */ + { 328, -2 }, /* (230) cmd ::= SHOW VARIABLES */ + { 328, -3 }, /* (231) cmd ::= SHOW CLUSTER VARIABLES */ + { 328, -3 }, /* (232) cmd ::= SHOW LOCAL VARIABLES */ + { 328, -5 }, /* (233) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + { 328, -2 }, /* (234) cmd ::= SHOW BNODES */ + { 328, -2 }, /* (235) cmd ::= SHOW SNODES */ + { 328, -2 }, /* (236) cmd ::= SHOW CLUSTER */ + { 328, -2 }, /* (237) cmd ::= SHOW TRANSACTIONS */ + { 328, -4 }, /* (238) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 328, -2 }, /* (239) cmd ::= SHOW CONSUMERS */ + { 328, -2 }, /* (240) cmd ::= SHOW SUBSCRIPTIONS */ + { 328, -5 }, /* (241) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 328, -7 }, /* (242) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + { 328, -3 }, /* (243) cmd ::= SHOW VNODES NK_INTEGER */ + { 328, -3 }, /* (244) cmd ::= SHOW VNODES NK_STRING */ + { 328, -3 }, /* (245) cmd ::= SHOW db_name_cond_opt ALIVE */ + { 328, -3 }, /* (246) cmd ::= SHOW CLUSTER ALIVE */ + { 379, 0 }, /* (247) db_name_cond_opt ::= */ + { 379, -2 }, /* (248) db_name_cond_opt ::= db_name NK_DOT */ + { 380, 0 }, /* (249) like_pattern_opt ::= */ + { 380, -2 }, /* (250) like_pattern_opt ::= LIKE NK_STRING */ + { 381, -1 }, /* (251) table_name_cond ::= table_name */ + { 382, 0 }, /* (252) from_db_opt ::= */ + { 382, -2 }, /* (253) from_db_opt ::= FROM db_name */ + { 383, 0 }, /* (254) tag_list_opt ::= */ + { 383, -1 }, /* (255) tag_list_opt ::= tag_item */ + { 383, -3 }, /* (256) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + { 384, -1 }, /* (257) tag_item ::= TBNAME */ + { 384, -1 }, /* (258) tag_item ::= QTAGS */ + { 384, -1 }, /* (259) tag_item ::= column_name */ + { 384, -2 }, /* (260) tag_item ::= column_name column_alias */ + { 384, -3 }, /* (261) tag_item ::= column_name AS column_alias */ + { 328, -8 }, /* (262) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + { 328, -9 }, /* (263) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + { 328, -4 }, /* (264) cmd ::= DROP INDEX exists_opt full_index_name */ + { 386, -1 }, /* (265) full_index_name ::= index_name */ + { 386, -3 }, /* (266) full_index_name ::= db_name NK_DOT index_name */ + { 387, -10 }, /* (267) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 387, -12 }, /* (268) 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 */ + { 389, -1 }, /* (269) func_list ::= func */ + { 389, -3 }, /* (270) func_list ::= func_list NK_COMMA func */ + { 392, -4 }, /* (271) func ::= sma_func_name NK_LP expression_list NK_RP */ + { 393, -1 }, /* (272) sma_func_name ::= function_name */ + { 393, -1 }, /* (273) sma_func_name ::= COUNT */ + { 393, -1 }, /* (274) sma_func_name ::= FIRST */ + { 393, -1 }, /* (275) sma_func_name ::= LAST */ + { 393, -1 }, /* (276) sma_func_name ::= LAST_ROW */ + { 391, 0 }, /* (277) sma_stream_opt ::= */ + { 391, -3 }, /* (278) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 391, -3 }, /* (279) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 391, -3 }, /* (280) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 328, -6 }, /* (281) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 328, -7 }, /* (282) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 328, -9 }, /* (283) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 328, -7 }, /* (284) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 328, -9 }, /* (285) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 328, -4 }, /* (286) cmd ::= DROP TOPIC exists_opt topic_name */ + { 328, -7 }, /* (287) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 328, -2 }, /* (288) cmd ::= DESC full_table_name */ + { 328, -2 }, /* (289) cmd ::= DESCRIBE full_table_name */ + { 328, -3 }, /* (290) cmd ::= RESET QUERY CACHE */ + { 328, -4 }, /* (291) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 328, -4 }, /* (292) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + { 396, 0 }, /* (293) analyze_opt ::= */ + { 396, -1 }, /* (294) analyze_opt ::= ANALYZE */ + { 397, 0 }, /* (295) explain_options ::= */ + { 397, -3 }, /* (296) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 397, -3 }, /* (297) explain_options ::= explain_options RATIO NK_FLOAT */ + { 328, -10 }, /* (298) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 328, -4 }, /* (299) cmd ::= DROP FUNCTION exists_opt function_name */ + { 399, 0 }, /* (300) agg_func_opt ::= */ + { 399, -1 }, /* (301) agg_func_opt ::= AGGREGATE */ + { 400, 0 }, /* (302) bufsize_opt ::= */ + { 400, -2 }, /* (303) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 328, -12 }, /* (304) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + { 328, -4 }, /* (305) cmd ::= DROP STREAM exists_opt stream_name */ + { 403, 0 }, /* (306) col_list_opt ::= */ + { 403, -3 }, /* (307) col_list_opt ::= NK_LP col_name_list NK_RP */ + { 404, 0 }, /* (308) tag_def_or_ref_opt ::= */ + { 404, -1 }, /* (309) tag_def_or_ref_opt ::= tags_def */ + { 404, -4 }, /* (310) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + { 402, 0 }, /* (311) stream_options ::= */ + { 402, -3 }, /* (312) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 402, -3 }, /* (313) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 402, -4 }, /* (314) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 402, -3 }, /* (315) stream_options ::= stream_options WATERMARK duration_literal */ + { 402, -4 }, /* (316) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 402, -3 }, /* (317) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 405, 0 }, /* (318) subtable_opt ::= */ + { 405, -4 }, /* (319) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 328, -3 }, /* (320) cmd ::= KILL CONNECTION NK_INTEGER */ + { 328, -3 }, /* (321) cmd ::= KILL QUERY NK_STRING */ + { 328, -3 }, /* (322) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 328, -2 }, /* (323) cmd ::= BALANCE VGROUP */ + { 328, -4 }, /* (324) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 328, -4 }, /* (325) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 328, -3 }, /* (326) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 407, -2 }, /* (327) dnode_list ::= DNODE NK_INTEGER */ + { 407, -3 }, /* (328) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 328, -4 }, /* (329) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 328, -1 }, /* (330) cmd ::= query_or_subquery */ + { 328, -1 }, /* (331) cmd ::= insert_query */ + { 398, -7 }, /* (332) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 398, -4 }, /* (333) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + { 331, -1 }, /* (334) literal ::= NK_INTEGER */ + { 331, -1 }, /* (335) literal ::= NK_FLOAT */ + { 331, -1 }, /* (336) literal ::= NK_STRING */ + { 331, -1 }, /* (337) literal ::= NK_BOOL */ + { 331, -2 }, /* (338) literal ::= TIMESTAMP NK_STRING */ + { 331, -1 }, /* (339) literal ::= duration_literal */ + { 331, -1 }, /* (340) literal ::= NULL */ + { 331, -1 }, /* (341) literal ::= NK_QUESTION */ + { 375, -1 }, /* (342) duration_literal ::= NK_VARIABLE */ + { 409, -1 }, /* (343) signed ::= NK_INTEGER */ + { 409, -2 }, /* (344) signed ::= NK_PLUS NK_INTEGER */ + { 409, -2 }, /* (345) signed ::= NK_MINUS NK_INTEGER */ + { 409, -1 }, /* (346) signed ::= NK_FLOAT */ + { 409, -2 }, /* (347) signed ::= NK_PLUS NK_FLOAT */ + { 409, -2 }, /* (348) signed ::= NK_MINUS NK_FLOAT */ + { 364, -1 }, /* (349) signed_literal ::= signed */ + { 364, -1 }, /* (350) signed_literal ::= NK_STRING */ + { 364, -1 }, /* (351) signed_literal ::= NK_BOOL */ + { 364, -2 }, /* (352) signed_literal ::= TIMESTAMP NK_STRING */ + { 364, -1 }, /* (353) signed_literal ::= duration_literal */ + { 364, -1 }, /* (354) signed_literal ::= NULL */ + { 364, -1 }, /* (355) signed_literal ::= literal_func */ + { 364, -1 }, /* (356) signed_literal ::= NK_QUESTION */ + { 411, -1 }, /* (357) literal_list ::= signed_literal */ + { 411, -3 }, /* (358) literal_list ::= literal_list NK_COMMA signed_literal */ + { 339, -1 }, /* (359) db_name ::= NK_ID */ + { 370, -1 }, /* (360) table_name ::= NK_ID */ + { 362, -1 }, /* (361) column_name ::= NK_ID */ + { 377, -1 }, /* (362) function_name ::= NK_ID */ + { 412, -1 }, /* (363) table_alias ::= NK_ID */ + { 385, -1 }, /* (364) column_alias ::= NK_ID */ + { 333, -1 }, /* (365) user_name ::= NK_ID */ + { 340, -1 }, /* (366) topic_name ::= NK_ID */ + { 401, -1 }, /* (367) stream_name ::= NK_ID */ + { 395, -1 }, /* (368) cgroup_name ::= NK_ID */ + { 388, -1 }, /* (369) index_name ::= NK_ID */ + { 413, -1 }, /* (370) expr_or_subquery ::= expression */ + { 406, -1 }, /* (371) expression ::= literal */ + { 406, -1 }, /* (372) expression ::= pseudo_column */ + { 406, -1 }, /* (373) expression ::= column_reference */ + { 406, -1 }, /* (374) expression ::= function_expression */ + { 406, -1 }, /* (375) expression ::= case_when_expression */ + { 406, -3 }, /* (376) expression ::= NK_LP expression NK_RP */ + { 406, -2 }, /* (377) expression ::= NK_PLUS expr_or_subquery */ + { 406, -2 }, /* (378) expression ::= NK_MINUS expr_or_subquery */ + { 406, -3 }, /* (379) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 406, -3 }, /* (380) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 406, -3 }, /* (381) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 406, -3 }, /* (382) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 406, -3 }, /* (383) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 406, -3 }, /* (384) expression ::= column_reference NK_ARROW NK_STRING */ + { 406, -3 }, /* (385) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 406, -3 }, /* (386) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 367, -1 }, /* (387) expression_list ::= expr_or_subquery */ + { 367, -3 }, /* (388) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 415, -1 }, /* (389) column_reference ::= column_name */ + { 415, -3 }, /* (390) column_reference ::= table_name NK_DOT column_name */ + { 414, -1 }, /* (391) pseudo_column ::= ROWTS */ + { 414, -1 }, /* (392) pseudo_column ::= TBNAME */ + { 414, -3 }, /* (393) pseudo_column ::= table_name NK_DOT TBNAME */ + { 414, -1 }, /* (394) pseudo_column ::= QSTART */ + { 414, -1 }, /* (395) pseudo_column ::= QEND */ + { 414, -1 }, /* (396) pseudo_column ::= QDURATION */ + { 414, -1 }, /* (397) pseudo_column ::= WSTART */ + { 414, -1 }, /* (398) pseudo_column ::= WEND */ + { 414, -1 }, /* (399) pseudo_column ::= WDURATION */ + { 414, -1 }, /* (400) pseudo_column ::= IROWTS */ + { 414, -1 }, /* (401) pseudo_column ::= ISFILLED */ + { 414, -1 }, /* (402) pseudo_column ::= QTAGS */ + { 416, -4 }, /* (403) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 416, -4 }, /* (404) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 416, -6 }, /* (405) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 416, -1 }, /* (406) function_expression ::= literal_func */ + { 410, -3 }, /* (407) literal_func ::= noarg_func NK_LP NK_RP */ + { 410, -1 }, /* (408) literal_func ::= NOW */ + { 420, -1 }, /* (409) noarg_func ::= NOW */ + { 420, -1 }, /* (410) noarg_func ::= TODAY */ + { 420, -1 }, /* (411) noarg_func ::= TIMEZONE */ + { 420, -1 }, /* (412) noarg_func ::= DATABASE */ + { 420, -1 }, /* (413) noarg_func ::= CLIENT_VERSION */ + { 420, -1 }, /* (414) noarg_func ::= SERVER_VERSION */ + { 420, -1 }, /* (415) noarg_func ::= SERVER_STATUS */ + { 420, -1 }, /* (416) noarg_func ::= CURRENT_USER */ + { 420, -1 }, /* (417) noarg_func ::= USER */ + { 418, -1 }, /* (418) star_func ::= COUNT */ + { 418, -1 }, /* (419) star_func ::= FIRST */ + { 418, -1 }, /* (420) star_func ::= LAST */ + { 418, -1 }, /* (421) star_func ::= LAST_ROW */ + { 419, -1 }, /* (422) star_func_para_list ::= NK_STAR */ + { 419, -1 }, /* (423) star_func_para_list ::= other_para_list */ + { 421, -1 }, /* (424) other_para_list ::= star_func_para */ + { 421, -3 }, /* (425) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 422, -1 }, /* (426) star_func_para ::= expr_or_subquery */ + { 422, -3 }, /* (427) star_func_para ::= table_name NK_DOT NK_STAR */ + { 417, -4 }, /* (428) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 417, -5 }, /* (429) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 423, -1 }, /* (430) when_then_list ::= when_then_expr */ + { 423, -2 }, /* (431) when_then_list ::= when_then_list when_then_expr */ + { 426, -4 }, /* (432) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 424, 0 }, /* (433) case_when_else_opt ::= */ + { 424, -2 }, /* (434) case_when_else_opt ::= ELSE common_expression */ + { 427, -3 }, /* (435) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 427, -5 }, /* (436) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 427, -6 }, /* (437) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 427, -3 }, /* (438) predicate ::= expr_or_subquery IS NULL */ + { 427, -4 }, /* (439) predicate ::= expr_or_subquery IS NOT NULL */ + { 427, -3 }, /* (440) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 428, -1 }, /* (441) compare_op ::= NK_LT */ + { 428, -1 }, /* (442) compare_op ::= NK_GT */ + { 428, -1 }, /* (443) compare_op ::= NK_LE */ + { 428, -1 }, /* (444) compare_op ::= NK_GE */ + { 428, -1 }, /* (445) compare_op ::= NK_NE */ + { 428, -1 }, /* (446) compare_op ::= NK_EQ */ + { 428, -1 }, /* (447) compare_op ::= LIKE */ + { 428, -2 }, /* (448) compare_op ::= NOT LIKE */ + { 428, -1 }, /* (449) compare_op ::= MATCH */ + { 428, -1 }, /* (450) compare_op ::= NMATCH */ + { 428, -1 }, /* (451) compare_op ::= CONTAINS */ + { 429, -1 }, /* (452) in_op ::= IN */ + { 429, -2 }, /* (453) in_op ::= NOT IN */ + { 430, -3 }, /* (454) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 431, -1 }, /* (455) boolean_value_expression ::= boolean_primary */ + { 431, -2 }, /* (456) boolean_value_expression ::= NOT boolean_primary */ + { 431, -3 }, /* (457) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 431, -3 }, /* (458) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 432, -1 }, /* (459) boolean_primary ::= predicate */ + { 432, -3 }, /* (460) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 425, -1 }, /* (461) common_expression ::= expr_or_subquery */ + { 425, -1 }, /* (462) common_expression ::= boolean_value_expression */ + { 433, 0 }, /* (463) from_clause_opt ::= */ + { 433, -2 }, /* (464) from_clause_opt ::= FROM table_reference_list */ + { 434, -1 }, /* (465) table_reference_list ::= table_reference */ + { 434, -3 }, /* (466) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 435, -1 }, /* (467) table_reference ::= table_primary */ + { 435, -1 }, /* (468) table_reference ::= joined_table */ + { 436, -2 }, /* (469) table_primary ::= table_name alias_opt */ + { 436, -4 }, /* (470) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 436, -2 }, /* (471) table_primary ::= subquery alias_opt */ + { 436, -1 }, /* (472) table_primary ::= parenthesized_joined_table */ + { 438, 0 }, /* (473) alias_opt ::= */ + { 438, -1 }, /* (474) alias_opt ::= table_alias */ + { 438, -2 }, /* (475) alias_opt ::= AS table_alias */ + { 440, -3 }, /* (476) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 440, -3 }, /* (477) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 437, -6 }, /* (478) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 441, 0 }, /* (479) join_type ::= */ + { 441, -1 }, /* (480) join_type ::= INNER */ + { 443, -12 }, /* (481) 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 */ + { 444, 0 }, /* (482) set_quantifier_opt ::= */ + { 444, -1 }, /* (483) set_quantifier_opt ::= DISTINCT */ + { 444, -1 }, /* (484) set_quantifier_opt ::= ALL */ + { 445, -1 }, /* (485) select_list ::= select_item */ + { 445, -3 }, /* (486) select_list ::= select_list NK_COMMA select_item */ + { 453, -1 }, /* (487) select_item ::= NK_STAR */ + { 453, -1 }, /* (488) select_item ::= common_expression */ + { 453, -2 }, /* (489) select_item ::= common_expression column_alias */ + { 453, -3 }, /* (490) select_item ::= common_expression AS column_alias */ + { 453, -3 }, /* (491) select_item ::= table_name NK_DOT NK_STAR */ + { 408, 0 }, /* (492) where_clause_opt ::= */ + { 408, -2 }, /* (493) where_clause_opt ::= WHERE search_condition */ + { 446, 0 }, /* (494) partition_by_clause_opt ::= */ + { 446, -3 }, /* (495) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 454, -1 }, /* (496) partition_list ::= partition_item */ + { 454, -3 }, /* (497) partition_list ::= partition_list NK_COMMA partition_item */ + { 455, -1 }, /* (498) partition_item ::= expr_or_subquery */ + { 455, -2 }, /* (499) partition_item ::= expr_or_subquery column_alias */ + { 455, -3 }, /* (500) partition_item ::= expr_or_subquery AS column_alias */ + { 450, 0 }, /* (501) twindow_clause_opt ::= */ + { 450, -6 }, /* (502) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 450, -4 }, /* (503) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 450, -6 }, /* (504) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 450, -8 }, /* (505) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 450, -7 }, /* (506) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + { 390, 0 }, /* (507) sliding_opt ::= */ + { 390, -4 }, /* (508) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 449, 0 }, /* (509) fill_opt ::= */ + { 449, -4 }, /* (510) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 449, -6 }, /* (511) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 449, -6 }, /* (512) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ + { 456, -1 }, /* (513) fill_mode ::= NONE */ + { 456, -1 }, /* (514) fill_mode ::= PREV */ + { 456, -1 }, /* (515) fill_mode ::= NULL */ + { 456, -1 }, /* (516) fill_mode ::= NULL_F */ + { 456, -1 }, /* (517) fill_mode ::= LINEAR */ + { 456, -1 }, /* (518) fill_mode ::= NEXT */ + { 451, 0 }, /* (519) group_by_clause_opt ::= */ + { 451, -3 }, /* (520) group_by_clause_opt ::= GROUP BY group_by_list */ + { 457, -1 }, /* (521) group_by_list ::= expr_or_subquery */ + { 457, -3 }, /* (522) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 452, 0 }, /* (523) having_clause_opt ::= */ + { 452, -2 }, /* (524) having_clause_opt ::= HAVING search_condition */ + { 447, 0 }, /* (525) range_opt ::= */ + { 447, -6 }, /* (526) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 448, 0 }, /* (527) every_opt ::= */ + { 448, -4 }, /* (528) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 458, -4 }, /* (529) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 459, -1 }, /* (530) query_simple ::= query_specification */ + { 459, -1 }, /* (531) query_simple ::= union_query_expression */ + { 463, -4 }, /* (532) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 463, -3 }, /* (533) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 464, -1 }, /* (534) query_simple_or_subquery ::= query_simple */ + { 464, -1 }, /* (535) query_simple_or_subquery ::= subquery */ + { 394, -1 }, /* (536) query_or_subquery ::= query_expression */ + { 394, -1 }, /* (537) query_or_subquery ::= subquery */ + { 460, 0 }, /* (538) order_by_clause_opt ::= */ + { 460, -3 }, /* (539) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 461, 0 }, /* (540) slimit_clause_opt ::= */ + { 461, -2 }, /* (541) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 461, -4 }, /* (542) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 461, -4 }, /* (543) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 462, 0 }, /* (544) limit_clause_opt ::= */ + { 462, -2 }, /* (545) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 462, -4 }, /* (546) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 462, -4 }, /* (547) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 439, -3 }, /* (548) subquery ::= NK_LP query_expression NK_RP */ + { 439, -3 }, /* (549) subquery ::= NK_LP subquery NK_RP */ + { 442, -1 }, /* (550) search_condition ::= common_expression */ + { 465, -1 }, /* (551) sort_specification_list ::= sort_specification */ + { 465, -3 }, /* (552) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 466, -3 }, /* (553) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 467, 0 }, /* (554) ordering_specification_opt ::= */ + { 467, -1 }, /* (555) ordering_specification_opt ::= ASC */ + { 467, -1 }, /* (556) ordering_specification_opt ::= DESC */ + { 468, 0 }, /* (557) null_ordering_opt ::= */ + { 468, -2 }, /* (558) null_ordering_opt ::= NULLS FIRST */ + { 468, -2 }, /* (559) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3756,11 +3714,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,327,&yymsp[0].minor); + yy_destructor(yypParser,329,&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,328,&yymsp[0].minor); + yy_destructor(yypParser,330,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3774,20 +3732,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,327,&yymsp[-2].minor); +{ yy_destructor(yypParser,329,&yymsp[-2].minor); { } - yy_destructor(yypParser,329,&yymsp[0].minor); + yy_destructor(yypParser,331,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,330,&yymsp[0].minor); +{ yy_destructor(yypParser,332,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,328,&yymsp[-1].minor); +{ yy_destructor(yypParser,330,&yymsp[-1].minor); { } - yy_destructor(yypParser,330,&yymsp[0].minor); + yy_destructor(yypParser,332,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3801,81 +3759,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,329,&yymsp[0].minor); + yy_destructor(yypParser,331,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy455, &yymsp[-1].minor.yy0, yymsp[0].minor.yy169); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy225, &yymsp[-1].minor.yy0, yymsp[0].minor.yy705); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy455, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy225, 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.yy455, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy225, 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.yy455, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy225, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy225); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy169 = 1; } +{ yymsp[1].minor.yy705 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy169 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy705 = 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.yy91, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy641, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy91, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy641, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy91 = yymsp[0].minor.yy91; } - yymsp[0].minor.yy91 = yylhsminor.yy91; +{ yylhsminor.yy641 = yymsp[0].minor.yy641; } + yymsp[0].minor.yy641 = yylhsminor.yy641; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy91 = yymsp[-2].minor.yy91 | yymsp[0].minor.yy91; } - yymsp[-2].minor.yy91 = yylhsminor.yy91; +{ yylhsminor.yy641 = yymsp[-2].minor.yy641 | yymsp[0].minor.yy641; } + yymsp[-2].minor.yy641 = yylhsminor.yy641; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_READ; } break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_WRITE; } break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy455 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy225 = yylhsminor.yy225; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy455 = yymsp[-2].minor.yy455; } - yymsp[-2].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[-2].minor.yy225; } + yymsp[-2].minor.yy225 = yylhsminor.yy225; break; case 42: /* priv_level ::= topic_name */ case 272: /* sma_func_name ::= function_name */ yytestcase(yyruleno==272); case 474: /* alias_opt ::= table_alias */ yytestcase(yyruleno==474); -{ yylhsminor.yy455 = yymsp[0].minor.yy455; } - yymsp[0].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[0].minor.yy225; } + yymsp[0].minor.yy225 = yylhsminor.yy225; break; case 43: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy455, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy225, NULL); } break; case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy225, &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.yy163); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy103); } break; case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy163); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy103); } break; case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3920,8 +3878,8 @@ static YYACTIONTYPE yy_reduce( case 419: /* star_func ::= FIRST */ yytestcase(yyruleno==419); case 420: /* star_func ::= LAST */ yytestcase(yyruleno==420); case 421: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==421); -{ yylhsminor.yy455 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy225 = yylhsminor.yy225; break; case 54: /* force_opt ::= */ case 73: /* not_exists_opt ::= */ yytestcase(yyruleno==73); @@ -3929,13 +3887,13 @@ static YYACTIONTYPE yy_reduce( case 293: /* analyze_opt ::= */ yytestcase(yyruleno==293); case 300: /* agg_func_opt ::= */ yytestcase(yyruleno==300); case 482: /* set_quantifier_opt ::= */ yytestcase(yyruleno==482); -{ yymsp[1].minor.yy163 = false; } +{ yymsp[1].minor.yy103 = false; } break; case 55: /* force_opt ::= FORCE */ case 294: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==294); case 301: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==301); case 483: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==483); -{ yymsp[0].minor.yy163 = true; } +{ yymsp[0].minor.yy103 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3968,206 +3926,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.yy163, &yymsp[-1].minor.yy455, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy103, &yymsp[-1].minor.yy225, yymsp[0].minor.yy42); } break; case 67: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 68: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } break; case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy42); } break; case 70: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } break; case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy832); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy508); } break; case 72: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy163 = true; } +{ yymsp[-2].minor.yy103 = true; } break; case 74: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy163 = true; } +{ yymsp[-1].minor.yy103 = true; } break; case 76: /* db_options ::= */ -{ yymsp[1].minor.yy44 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultDatabaseOptions(pCxt); } break; case 77: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 78: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 79: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 80: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 81: /* db_options ::= db_options DURATION NK_INTEGER */ case 82: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==82); -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 83: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 84: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 85: /* db_options ::= db_options KEEP integer_list */ case 86: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==86); -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_KEEP, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_KEEP, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 87: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 88: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 89: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 90: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 91: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 92: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 93: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 94: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_RETENTIONS, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_RETENTIONS, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 95: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 96: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 97: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 98: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; 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.yy44 = setDatabaseOption(pCxt, yymsp[-3].minor.yy44, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-3].minor.yy42, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 100: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; 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.yy44 = setDatabaseOption(pCxt, yymsp[-3].minor.yy44, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-3].minor.yy42, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 102: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 103: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 104: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 105: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 106: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 107: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy44 = createAlterDatabaseOptions(pCxt); yylhsminor.yy44 = setAlterDatabaseOption(pCxt, yylhsminor.yy44, &yymsp[0].minor.yy153); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterDatabaseOptions(pCxt); yylhsminor.yy42 = setAlterDatabaseOption(pCxt, yylhsminor.yy42, &yymsp[0].minor.yy459); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 108: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy44 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy44, &yymsp[0].minor.yy153); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy42, &yymsp[0].minor.yy459); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 109: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 110: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 111: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy459.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.yy153.type = DB_OPTION_KEEP; yymsp[-1].minor.yy153.pList = yymsp[0].minor.yy684; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_KEEP; yymsp[-1].minor.yy459.pList = yymsp[0].minor.yy110; } break; case 115: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_PAGES; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_PAGES; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 116: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 117: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_WAL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_WAL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 118: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 119: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy684 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 120: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 328: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==328); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 121: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy684 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 122: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 123: /* retention_list ::= retention */ case 145: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==145); @@ -4182,9 +4140,9 @@ static YYACTIONTYPE yy_reduce( case 430: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==430); case 485: /* select_list ::= select_item */ yytestcase(yyruleno==485); case 496: /* partition_list ::= partition_item */ yytestcase(yyruleno==496); - case 549: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==549); -{ yylhsminor.yy684 = createNodeList(pCxt, yymsp[0].minor.yy44); } - yymsp[0].minor.yy684 = yylhsminor.yy684; + case 551: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==551); +{ yylhsminor.yy110 = createNodeList(pCxt, yymsp[0].minor.yy42); } + yymsp[0].minor.yy110 = yylhsminor.yy110; 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); @@ -4196,96 +4154,96 @@ static YYACTIONTYPE yy_reduce( case 425: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==425); case 486: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==486); case 497: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==497); - case 550: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==550); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; + case 552: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==552); +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 125: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy44 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 126: /* speed_opt ::= */ case 302: /* bufsize_opt ::= */ yytestcase(yyruleno==302); -{ yymsp[1].minor.yy832 = 0; } +{ yymsp[1].minor.yy508 = 0; } break; case 127: /* speed_opt ::= MAX_SPEED NK_INTEGER */ case 303: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==303); -{ yymsp[-1].minor.yy832 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy508 = 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.yy163, yymsp[-5].minor.yy44, yymsp[-3].minor.yy684, yymsp[-1].minor.yy684, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy103, yymsp[-5].minor.yy42, yymsp[-3].minor.yy110, yymsp[-1].minor.yy110, yymsp[0].minor.yy42); } break; case 129: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy684); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy110); } break; case 131: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy684); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy110); } break; case 132: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } break; case 133: /* cmd ::= ALTER TABLE alter_table_clause */ case 330: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==330); case 331: /* cmd ::= insert_query */ yytestcase(yyruleno==331); -{ pCxt->pRootNode = yymsp[0].minor.yy44; } +{ pCxt->pRootNode = yymsp[0].minor.yy42; } break; case 134: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy44); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy42); } break; case 135: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy44 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 136: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 137: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy44 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy44, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy455); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy42, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy225); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 138: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 139: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy44 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 140: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 141: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy44 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy44, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy455); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy42, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy225); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 142: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 143: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy44 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 144: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy44 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy44, &yymsp[-2].minor.yy455, yymsp[0].minor.yy44); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy42, &yymsp[-2].minor.yy225, yymsp[0].minor.yy42); } + yymsp[-5].minor.yy42 = yylhsminor.yy42; 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 431: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==431); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-1].minor.yy684, yymsp[0].minor.yy44); } - yymsp[-1].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-1].minor.yy110, yymsp[0].minor.yy42); } + yymsp[-1].minor.yy110 = yylhsminor.yy110; 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.yy44 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy163, yymsp[-8].minor.yy44, yymsp[-6].minor.yy44, yymsp[-5].minor.yy684, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); } - yymsp[-9].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy103, yymsp[-8].minor.yy42, yymsp[-6].minor.yy42, yymsp[-5].minor.yy110, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } + yymsp[-9].minor.yy42 = yylhsminor.yy42; break; case 150: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy44 = createDropTableClause(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createDropTableClause(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 151: /* specific_cols_opt ::= */ case 182: /* tags_def_opt ::= */ yytestcase(yyruleno==182); @@ -4293,176 +4251,176 @@ static YYACTIONTYPE yy_reduce( case 306: /* col_list_opt ::= */ yytestcase(yyruleno==306); case 308: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==308); case 494: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==494); - case 517: /* group_by_clause_opt ::= */ yytestcase(yyruleno==517); - case 536: /* order_by_clause_opt ::= */ yytestcase(yyruleno==536); -{ yymsp[1].minor.yy684 = NULL; } + case 519: /* group_by_clause_opt ::= */ yytestcase(yyruleno==519); + case 538: /* order_by_clause_opt ::= */ yytestcase(yyruleno==538); +{ yymsp[1].minor.yy110 = NULL; } break; case 152: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ case 307: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==307); -{ yymsp[-2].minor.yy684 = yymsp[-1].minor.yy684; } +{ yymsp[-2].minor.yy110 = yymsp[-1].minor.yy110; } break; case 153: /* full_table_name ::= table_name */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy455, NULL); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy225, NULL); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 154: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455, NULL); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225, NULL); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 157: /* column_def ::= column_name type_name */ -{ yylhsminor.yy44 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260, NULL); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448, NULL); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 158: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy44 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-2].minor.yy260, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-2].minor.yy448, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 159: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 160: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 161: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 162: /* type_name ::= INT */ case 163: /* type_name ::= INTEGER */ yytestcase(yyruleno==163); -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_INT); } break; case 164: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 165: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 166: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 167: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 168: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 169: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 170: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 171: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 172: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 173: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 174: /* type_name ::= JSON */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 175: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 176: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 177: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 178: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 179: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 180: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 183: /* tags_def_opt ::= tags_def */ case 309: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==309); case 423: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==423); -{ yylhsminor.yy684 = yymsp[0].minor.yy684; } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = yymsp[0].minor.yy110; } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 184: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ case 310: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==310); -{ yymsp[-3].minor.yy684 = yymsp[-1].minor.yy684; } +{ yymsp[-3].minor.yy110 = yymsp[-1].minor.yy110; } break; case 185: /* table_options ::= */ -{ yymsp[1].minor.yy44 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultTableOptions(pCxt); } break; case 186: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 187: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 188: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 189: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-4].minor.yy44, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy684); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-4].minor.yy42, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy110); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 190: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 191: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-4].minor.yy44, TABLE_OPTION_SMA, yymsp[-1].minor.yy684); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-4].minor.yy42, TABLE_OPTION_SMA, yymsp[-1].minor.yy110); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 192: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 193: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy44 = createAlterTableOptions(pCxt); yylhsminor.yy44 = setTableOption(pCxt, yylhsminor.yy44, yymsp[0].minor.yy153.type, &yymsp[0].minor.yy153.val); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableOptions(pCxt); yylhsminor.yy42 = setTableOption(pCxt, yylhsminor.yy42, yymsp[0].minor.yy459.type, &yymsp[0].minor.yy459.val); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 194: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy153.type, &yymsp[0].minor.yy153.val); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy459.type, &yymsp[0].minor.yy459.val); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 195: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy153.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 196: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 197: /* duration_list ::= duration_literal */ case 387: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==387); -{ yylhsminor.yy684 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 198: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 388: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==388); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 201: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[0].minor.yy455, NULL); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[0].minor.yy225, NULL); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 202: /* rollup_func_name ::= FIRST */ case 203: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==203); case 258: /* tag_item ::= QTAGS */ yytestcase(yyruleno==258); -{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 206: /* col_name ::= column_name */ case 259: /* tag_item ::= column_name */ yytestcase(yyruleno==259); -{ yylhsminor.yy44 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy455); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy225); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 207: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -4477,13 +4435,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.yy44, yymsp[0].minor.yy44, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, 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.yy44, yymsp[0].minor.yy44, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, 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.yy44, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy42, NULL, OP_TYPE_LIKE); } break; case 214: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -4495,7 +4453,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.yy44, yymsp[-1].minor.yy44, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy42, yymsp[-1].minor.yy42, OP_TYPE_EQUAL); } break; case 218: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -4514,13 +4472,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.yy455); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } break; case 225: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy42); } break; case 226: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy42); } break; case 227: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4539,7 +4497,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.yy44); } +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy42); } break; case 234: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } @@ -4554,7 +4512,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.yy44); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy42); } break; case 239: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4563,10 +4521,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.yy44, yymsp[-1].minor.yy44, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy42, yymsp[-1].minor.yy42, 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.yy44, yymsp[0].minor.yy44, yymsp[-3].minor.yy684); } +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42, yymsp[-3].minor.yy110); } break; case 243: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } @@ -4575,18 +4533,18 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } break; case 245: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy44, QUERY_NODE_SHOW_DB_ALIVE_STMT); } +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy42, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; case 246: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; case 247: /* db_name_cond_opt ::= */ case 252: /* from_db_opt ::= */ yytestcase(yyruleno==252); -{ yymsp[1].minor.yy44 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultDatabaseCondValue(pCxt); } break; case 248: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy44 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 249: /* like_pattern_opt ::= */ case 318: /* subtable_opt ::= */ yytestcase(yyruleno==318); @@ -4596,158 +4554,158 @@ static YYACTIONTYPE yy_reduce( case 501: /* twindow_clause_opt ::= */ yytestcase(yyruleno==501); case 507: /* sliding_opt ::= */ yytestcase(yyruleno==507); case 509: /* fill_opt ::= */ yytestcase(yyruleno==509); - case 521: /* having_clause_opt ::= */ yytestcase(yyruleno==521); - case 523: /* range_opt ::= */ yytestcase(yyruleno==523); - case 525: /* every_opt ::= */ yytestcase(yyruleno==525); - case 538: /* slimit_clause_opt ::= */ yytestcase(yyruleno==538); - case 542: /* limit_clause_opt ::= */ yytestcase(yyruleno==542); -{ yymsp[1].minor.yy44 = NULL; } + case 523: /* having_clause_opt ::= */ yytestcase(yyruleno==523); + case 525: /* range_opt ::= */ yytestcase(yyruleno==525); + case 527: /* every_opt ::= */ yytestcase(yyruleno==527); + case 540: /* slimit_clause_opt ::= */ yytestcase(yyruleno==540); + case 544: /* limit_clause_opt ::= */ yytestcase(yyruleno==544); +{ yymsp[1].minor.yy42 = NULL; } break; case 250: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 251: /* table_name_cond ::= table_name */ -{ yylhsminor.yy44 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy455); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy225); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 253: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy44 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy455); } +{ yymsp[-1].minor.yy42 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy225); } break; case 257: /* tag_item ::= TBNAME */ -{ yylhsminor.yy44 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 260: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy44 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy455), &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy225), &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 261: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy44 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy455), &yymsp[0].minor.yy455); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy225), &yymsp[0].minor.yy225); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 262: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy163, yymsp[-3].minor.yy44, yymsp[-1].minor.yy44, NULL, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy103, yymsp[-3].minor.yy42, yymsp[-1].minor.yy42, NULL, yymsp[0].minor.yy42); } break; case 263: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy163, yymsp[-5].minor.yy44, yymsp[-3].minor.yy44, yymsp[-1].minor.yy684, NULL); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy103, yymsp[-5].minor.yy42, yymsp[-3].minor.yy42, yymsp[-1].minor.yy110, NULL); } break; case 264: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } break; case 265: /* full_index_name ::= index_name */ -{ yylhsminor.yy44 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy455); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy225); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 266: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy44 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 267: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy44 = createIndexOption(pCxt, yymsp[-7].minor.yy684, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-9].minor.yy42 = createIndexOption(pCxt, yymsp[-7].minor.yy110, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 268: /* 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.yy44 = createIndexOption(pCxt, yymsp[-9].minor.yy684, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-11].minor.yy42 = createIndexOption(pCxt, yymsp[-9].minor.yy110, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 271: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-1].minor.yy684); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-1].minor.yy110); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 277: /* sma_stream_opt ::= */ case 311: /* stream_options ::= */ yytestcase(yyruleno==311); -{ yymsp[1].minor.yy44 = createStreamOptions(pCxt); } +{ yymsp[1].minor.yy42 = createStreamOptions(pCxt); } break; case 278: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ case 315: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==315); -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 279: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 280: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 281: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy163, &yymsp[-2].minor.yy455, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy103, &yymsp[-2].minor.yy225, yymsp[0].minor.yy42); } break; case 282: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy163, &yymsp[-3].minor.yy455, &yymsp[0].minor.yy455, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy103, &yymsp[-3].minor.yy225, &yymsp[0].minor.yy225, false); } break; case 283: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy163, &yymsp[-5].minor.yy455, &yymsp[0].minor.yy455, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy103, &yymsp[-5].minor.yy225, &yymsp[0].minor.yy225, true); } break; case 284: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy163, &yymsp[-3].minor.yy455, yymsp[0].minor.yy44, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy103, &yymsp[-3].minor.yy225, yymsp[0].minor.yy42, false); } break; case 285: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy163, &yymsp[-5].minor.yy455, yymsp[0].minor.yy44, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy103, &yymsp[-5].minor.yy225, yymsp[0].minor.yy42, true); } break; case 286: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 287: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy163, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy103, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } break; case 288: /* cmd ::= DESC full_table_name */ case 289: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==289); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy42); } break; case 290: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 291: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ case 292: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==292); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy163, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy103, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 295: /* explain_options ::= */ -{ yymsp[1].minor.yy44 = createDefaultExplainOptions(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultExplainOptions(pCxt); } break; case 296: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy44 = setExplainVerbose(pCxt, yymsp[-2].minor.yy44, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setExplainVerbose(pCxt, yymsp[-2].minor.yy42, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 297: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy44 = setExplainRatio(pCxt, yymsp[-2].minor.yy44, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setExplainRatio(pCxt, yymsp[-2].minor.yy42, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 298: /* 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.yy163, yymsp[-8].minor.yy163, &yymsp[-5].minor.yy455, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy260, yymsp[0].minor.yy832); } +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy103, yymsp[-8].minor.yy103, &yymsp[-5].minor.yy225, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy448, yymsp[0].minor.yy508); } break; case 299: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 304: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy163, &yymsp[-8].minor.yy455, yymsp[-5].minor.yy44, yymsp[-7].minor.yy44, yymsp[-3].minor.yy684, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, yymsp[-4].minor.yy684); } +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy103, &yymsp[-8].minor.yy225, yymsp[-5].minor.yy42, yymsp[-7].minor.yy42, yymsp[-3].minor.yy110, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, yymsp[-4].minor.yy110); } break; case 305: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 312: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 313: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 314: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy44)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy44)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-3].minor.yy44; } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-3].minor.yy42)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy42)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-3].minor.yy42; } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 316: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-3].minor.yy44)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy44 = yymsp[-3].minor.yy44; } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-3].minor.yy42)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy42 = yymsp[-3].minor.yy42; } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 317: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 319: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ case 508: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==508); - case 526: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==526); -{ yymsp[-3].minor.yy44 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy44); } + case 528: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==528); +{ yymsp[-3].minor.yy42 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy42); } break; case 320: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } @@ -4765,42 +4723,42 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 325: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy684); } +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy110); } break; case 326: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 327: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy684 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +{ yymsp[-1].minor.yy110 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 329: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 332: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy44 = createInsertStmt(pCxt, yymsp[-4].minor.yy44, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); } +{ yymsp[-6].minor.yy42 = createInsertStmt(pCxt, yymsp[-4].minor.yy42, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } break; case 333: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy44 = createInsertStmt(pCxt, yymsp[-1].minor.yy44, NULL, yymsp[0].minor.yy44); } +{ yymsp[-3].minor.yy42 = createInsertStmt(pCxt, yymsp[-1].minor.yy42, NULL, yymsp[0].minor.yy42); } break; case 334: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 335: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 336: /* literal ::= NK_STRING */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 337: /* literal ::= NK_BOOL */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 338: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 339: /* literal ::= duration_literal */ case 349: /* signed_literal ::= signed */ yytestcase(yyruleno==349); @@ -4819,175 +4777,175 @@ static YYACTIONTYPE yy_reduce( case 467: /* table_reference ::= table_primary */ yytestcase(yyruleno==467); case 468: /* table_reference ::= joined_table */ yytestcase(yyruleno==468); case 472: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==472); - case 528: /* query_simple ::= query_specification */ yytestcase(yyruleno==528); - case 529: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==529); - case 532: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==532); - case 534: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==534); -{ yylhsminor.yy44 = yymsp[0].minor.yy44; } - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 530: /* query_simple ::= query_specification */ yytestcase(yyruleno==530); + case 531: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==531); + case 534: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==534); + case 536: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==536); +{ yylhsminor.yy42 = yymsp[0].minor.yy42; } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 340: /* literal ::= NULL */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 341: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 342: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 343: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 344: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; case 345: /* 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.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 346: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 347: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 348: /* 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.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 350: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 351: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 352: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 353: /* signed_literal ::= duration_literal */ case 355: /* signed_literal ::= literal_func */ yytestcase(yyruleno==355); case 426: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==426); case 488: /* select_item ::= common_expression */ yytestcase(yyruleno==488); case 498: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==498); - case 533: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==533); - case 535: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==535); - case 548: /* search_condition ::= common_expression */ yytestcase(yyruleno==548); -{ yylhsminor.yy44 = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); } - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 535: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==535); + case 537: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==537); + case 550: /* search_condition ::= common_expression */ yytestcase(yyruleno==550); +{ yylhsminor.yy42 = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 354: /* signed_literal ::= NULL */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 356: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy44 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 376: /* expression ::= NK_LP expression NK_RP */ case 460: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==460); - case 547: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==547); -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 549: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==549); +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 377: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 378: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy44), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy42), NULL)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 379: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 380: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 381: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 382: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 383: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 384: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 385: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 386: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 389: /* column_reference ::= column_name */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy455, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy455)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy225, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy225)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 390: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455, createColumnNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225, createColumnNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 391: /* pseudo_column ::= ROWTS */ case 392: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==392); @@ -5001,330 +4959,336 @@ static YYACTIONTYPE yy_reduce( case 401: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==401); case 402: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==402); case 408: /* literal_func ::= NOW */ yytestcase(yyruleno==408); -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 393: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy455)))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy225)))); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 403: /* function_expression ::= function_name NK_LP expression_list NK_RP */ case 404: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==404); -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-1].minor.yy684)); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-1].minor.yy110)); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 405: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy260)); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy448)); } + yymsp[-5].minor.yy42 = yylhsminor.yy42; break; case 407: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy455, NULL)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy225, NULL)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 422: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy684 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 427: /* star_func_para ::= table_name NK_DOT NK_STAR */ case 491: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==491); -{ yylhsminor.yy44 = createColumnNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 428: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy684, yymsp[-1].minor.yy44)); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy110, yymsp[-1].minor.yy42)); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 429: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-2].minor.yy684, yymsp[-1].minor.yy44)); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-2].minor.yy110, yymsp[-1].minor.yy42)); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 432: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy44 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); } +{ yymsp[-3].minor.yy42 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } break; case 434: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy44 = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); } +{ yymsp[-1].minor.yy42 = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); } break; case 435: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ case 440: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==440); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy704, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy2, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 436: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy44), releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy42), releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 437: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; + yymsp[-5].minor.yy42 = yylhsminor.yy42; break; case 438: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), NULL)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 439: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL)); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 441: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy704 = OP_TYPE_LOWER_THAN; } +{ yymsp[0].minor.yy2 = OP_TYPE_LOWER_THAN; } break; case 442: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy704 = OP_TYPE_GREATER_THAN; } +{ yymsp[0].minor.yy2 = OP_TYPE_GREATER_THAN; } break; case 443: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy704 = OP_TYPE_LOWER_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_LOWER_EQUAL; } break; case 444: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy704 = OP_TYPE_GREATER_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_GREATER_EQUAL; } break; case 445: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy704 = OP_TYPE_NOT_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_NOT_EQUAL; } break; case 446: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy704 = OP_TYPE_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_EQUAL; } break; case 447: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy704 = OP_TYPE_LIKE; } +{ yymsp[0].minor.yy2 = OP_TYPE_LIKE; } break; case 448: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy704 = OP_TYPE_NOT_LIKE; } +{ yymsp[-1].minor.yy2 = OP_TYPE_NOT_LIKE; } break; case 449: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy704 = OP_TYPE_MATCH; } +{ yymsp[0].minor.yy2 = OP_TYPE_MATCH; } break; case 450: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy704 = OP_TYPE_NMATCH; } +{ yymsp[0].minor.yy2 = OP_TYPE_NMATCH; } break; case 451: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy704 = OP_TYPE_JSON_CONTAINS; } +{ yymsp[0].minor.yy2 = OP_TYPE_JSON_CONTAINS; } break; case 452: /* in_op ::= IN */ -{ yymsp[0].minor.yy704 = OP_TYPE_IN; } +{ yymsp[0].minor.yy2 = OP_TYPE_IN; } break; case 453: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy704 = OP_TYPE_NOT_IN; } +{ yymsp[-1].minor.yy2 = OP_TYPE_NOT_IN; } break; case 454: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy684)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 456: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy44), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy42), NULL)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 457: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 458: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 464: /* from_clause_opt ::= FROM table_reference_list */ case 493: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==493); - case 522: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==522); -{ yymsp[-1].minor.yy44 = yymsp[0].minor.yy44; } + case 524: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==524); +{ yymsp[-1].minor.yy42 = yymsp[0].minor.yy42; } break; case 466: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy44 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, NULL); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, NULL); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 469: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 470: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, &yymsp[-3].minor.yy455, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, &yymsp[-3].minor.yy225, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 471: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy44 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44), &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42), &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 473: /* alias_opt ::= */ -{ yymsp[1].minor.yy455 = nil_token; } +{ yymsp[1].minor.yy225 = nil_token; } break; case 475: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy455 = yymsp[0].minor.yy455; } +{ yymsp[-1].minor.yy225 = yymsp[0].minor.yy225; } break; case 476: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 477: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==477); -{ yymsp[-2].minor.yy44 = yymsp[-1].minor.yy44; } +{ yymsp[-2].minor.yy42 = yymsp[-1].minor.yy42; } break; case 478: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy44 = createJoinTableNode(pCxt, yymsp[-4].minor.yy724, yymsp[-5].minor.yy44, yymsp[-2].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createJoinTableNode(pCxt, yymsp[-4].minor.yy638, yymsp[-5].minor.yy42, yymsp[-2].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-5].minor.yy42 = yylhsminor.yy42; break; case 479: /* join_type ::= */ -{ yymsp[1].minor.yy724 = JOIN_TYPE_INNER; } +{ yymsp[1].minor.yy638 = JOIN_TYPE_INNER; } break; case 480: /* join_type ::= INNER */ -{ yymsp[0].minor.yy724 = JOIN_TYPE_INNER; } +{ yymsp[0].minor.yy638 = JOIN_TYPE_INNER; } break; case 481: /* 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.yy44 = createSelectStmt(pCxt, yymsp[-10].minor.yy163, yymsp[-9].minor.yy684, yymsp[-8].minor.yy44); - yymsp[-11].minor.yy44 = addWhereClause(pCxt, yymsp[-11].minor.yy44, yymsp[-7].minor.yy44); - yymsp[-11].minor.yy44 = addPartitionByClause(pCxt, yymsp[-11].minor.yy44, yymsp[-6].minor.yy684); - yymsp[-11].minor.yy44 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy44, yymsp[-2].minor.yy44); - yymsp[-11].minor.yy44 = addGroupByClause(pCxt, yymsp[-11].minor.yy44, yymsp[-1].minor.yy684); - yymsp[-11].minor.yy44 = addHavingClause(pCxt, yymsp[-11].minor.yy44, yymsp[0].minor.yy44); - yymsp[-11].minor.yy44 = addRangeClause(pCxt, yymsp[-11].minor.yy44, yymsp[-5].minor.yy44); - yymsp[-11].minor.yy44 = addEveryClause(pCxt, yymsp[-11].minor.yy44, yymsp[-4].minor.yy44); - yymsp[-11].minor.yy44 = addFillClause(pCxt, yymsp[-11].minor.yy44, yymsp[-3].minor.yy44); + yymsp[-11].minor.yy42 = createSelectStmt(pCxt, yymsp[-10].minor.yy103, yymsp[-9].minor.yy110, yymsp[-8].minor.yy42); + yymsp[-11].minor.yy42 = addWhereClause(pCxt, yymsp[-11].minor.yy42, yymsp[-7].minor.yy42); + yymsp[-11].minor.yy42 = addPartitionByClause(pCxt, yymsp[-11].minor.yy42, yymsp[-6].minor.yy110); + yymsp[-11].minor.yy42 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy42, yymsp[-2].minor.yy42); + yymsp[-11].minor.yy42 = addGroupByClause(pCxt, yymsp[-11].minor.yy42, yymsp[-1].minor.yy110); + yymsp[-11].minor.yy42 = addHavingClause(pCxt, yymsp[-11].minor.yy42, yymsp[0].minor.yy42); + yymsp[-11].minor.yy42 = addRangeClause(pCxt, yymsp[-11].minor.yy42, yymsp[-5].minor.yy42); + yymsp[-11].minor.yy42 = addEveryClause(pCxt, yymsp[-11].minor.yy42, yymsp[-4].minor.yy42); + yymsp[-11].minor.yy42 = addFillClause(pCxt, yymsp[-11].minor.yy42, yymsp[-3].minor.yy42); } break; case 484: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy163 = false; } +{ yymsp[0].minor.yy103 = false; } break; case 487: /* select_item ::= NK_STAR */ -{ yylhsminor.yy44 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 489: /* select_item ::= common_expression column_alias */ case 499: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==499); -{ yylhsminor.yy44 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44), &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42), &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 490: /* select_item ::= common_expression AS column_alias */ case 500: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==500); -{ yylhsminor.yy44 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), &yymsp[0].minor.yy455); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), &yymsp[0].minor.yy225); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 495: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 518: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==518); - case 537: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==537); -{ yymsp[-2].minor.yy684 = yymsp[0].minor.yy684; } + case 520: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==520); + case 539: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==539); +{ yymsp[-2].minor.yy110 = yymsp[0].minor.yy110; } break; case 502: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy44 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } +{ yymsp[-5].minor.yy42 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } break; case 503: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy44 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } +{ yymsp[-3].minor.yy42 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } break; case 504: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy44 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-5].minor.yy42 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 505: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy44 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-7].minor.yy42 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 506: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy44 = createEventWindowNode(pCxt, yymsp[-3].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-6].minor.yy42 = createEventWindowNode(pCxt, yymsp[-3].minor.yy42, yymsp[0].minor.yy42); } break; case 510: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy44 = createFillNode(pCxt, yymsp[-1].minor.yy22, NULL); } +{ yymsp[-3].minor.yy42 = createFillNode(pCxt, yymsp[-1].minor.yy410, NULL); } break; case 511: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy44 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy684)); } +{ yymsp[-5].minor.yy42 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } break; - case 512: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy22 = FILL_MODE_NONE; } + case 512: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy42 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } break; - case 513: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy22 = FILL_MODE_PREV; } + case 513: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy410 = FILL_MODE_NONE; } break; - case 514: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy22 = FILL_MODE_NULL; } + case 514: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy410 = FILL_MODE_PREV; } break; - case 515: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy22 = FILL_MODE_LINEAR; } + case 515: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy410 = FILL_MODE_NULL; } break; - case 516: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy22 = FILL_MODE_NEXT; } + case 516: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy410 = FILL_MODE_NULL_F; } break; - case 519: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy684 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); } - yymsp[0].minor.yy684 = yylhsminor.yy684; + case 517: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy410 = FILL_MODE_LINEAR; } break; - case 520: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; + case 518: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy410 = FILL_MODE_NEXT; } break; - case 524: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy44 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } + case 521: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy110 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; - case 527: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 522: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; + break; + case 526: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy42 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } + break; + case 529: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy44 = addOrderByClause(pCxt, yymsp[-3].minor.yy44, yymsp[-2].minor.yy684); - yylhsminor.yy44 = addSlimitClause(pCxt, yylhsminor.yy44, yymsp[-1].minor.yy44); - yylhsminor.yy44 = addLimitClause(pCxt, yylhsminor.yy44, yymsp[0].minor.yy44); + yylhsminor.yy42 = addOrderByClause(pCxt, yymsp[-3].minor.yy42, yymsp[-2].minor.yy110); + yylhsminor.yy42 = addSlimitClause(pCxt, yylhsminor.yy42, yymsp[-1].minor.yy42); + yylhsminor.yy42 = addLimitClause(pCxt, yylhsminor.yy42, yymsp[0].minor.yy42); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; - case 530: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy44 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + case 532: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy42 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; - case 531: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy44 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 533: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy42 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; - case 539: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 543: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==543); -{ yymsp[-1].minor.yy44 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 541: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 545: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==545); +{ yymsp[-1].minor.yy42 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 540: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 544: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==544); -{ yymsp[-3].minor.yy44 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 542: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 546: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==546); +{ yymsp[-3].minor.yy42 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 541: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 545: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==545); -{ yymsp[-3].minor.yy44 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 543: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 547: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==547); +{ yymsp[-3].minor.yy42 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 546: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy44); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 548: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy42); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; - case 551: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy44 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), yymsp[-1].minor.yy490, yymsp[0].minor.yy23); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 553: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy42 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), yymsp[-1].minor.yy106, yymsp[0].minor.yy599); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; - case 552: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy490 = ORDER_ASC; } + case 554: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy106 = ORDER_ASC; } break; - case 553: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy490 = ORDER_ASC; } + case 555: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy106 = ORDER_ASC; } break; - case 554: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy490 = ORDER_DESC; } + case 556: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy106 = ORDER_DESC; } break; - case 555: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy23 = NULL_ORDER_DEFAULT; } + case 557: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy599 = NULL_ORDER_DEFAULT; } break; - case 556: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy23 = NULL_ORDER_FIRST; } + case 558: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy599 = NULL_ORDER_FIRST; } break; - case 557: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy23 = NULL_ORDER_LAST; } + case 559: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy599 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c index 1e35529d27..5645e969a2 100644 --- a/source/libs/qworker/src/qworker.c +++ b/source/libs/qworker/src/qworker.c @@ -516,7 +516,7 @@ int32_t qwHandlePostPhaseEvents(QW_FPARAMS_DEF, int8_t phase, SQWPhaseInput *inp } if (QW_EVENT_RECEIVED(ctx, QW_EVENT_DROP)) { - if (QW_PHASE_POST_FETCH != phase || qwTaskNotInExec(ctx)) { + if (QW_PHASE_POST_FETCH != phase || ((!QW_QUERY_RUNNING(ctx)) && qwTaskNotInExec(ctx))) { QW_ERR_JRET(qwDropTask(QW_FPARAMS())); QW_ERR_JRET(ctx->rspCode); } diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 56c3c3ebef..2ef351cbb0 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -128,7 +128,7 @@ SStreamState* streamStateOpen(char* path, SStreamTask* pTask, bool specPath, int memset(statePath, 0, 1024); tstrncpy(statePath, path, 1024); } - if (tdbOpen(statePath, szPage, pages, &pState->pTdbState->db, 0) < 0) { + if (tdbOpen(statePath, szPage, pages, &pState->pTdbState->db, 1) < 0) { goto _err; } diff --git a/source/libs/sync/src/syncCommit.c b/source/libs/sync/src/syncCommit.c index 67ed1e0701..6d256a735d 100644 --- a/source/libs/sync/src/syncCommit.c +++ b/source/libs/sync/src/syncCommit.c @@ -110,7 +110,7 @@ int64_t syncNodeCheckCommitIndex(SSyncNode* ths, SyncIndex indexLikely) { if (indexLikely > ths->commitIndex && syncNodeAgreedUpon(ths, indexLikely)) { SyncIndex commitIndex = indexLikely; syncNodeUpdateCommitIndex(ths, commitIndex); - sTrace("vgId:%d, agreed upon. role:%d, term:%" PRId64 ", index: %" PRId64 "", ths->vgId, ths->state, + sTrace("vgId:%d, agreed upon. role:%d, term:%" PRId64 ", index:%" PRId64 "", ths->vgId, ths->state, ths->raftStore.currentTerm, commitIndex); } return ths->commitIndex; diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 77b87a885b..1d96412ba3 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -85,7 +85,7 @@ int64_t syncOpen(SSyncInfo* pSyncInfo) { int32_t syncStart(int64_t rid) { SSyncNode* pSyncNode = syncNodeAcquire(rid); if (pSyncNode == NULL) { - sError("failed to acquire rid: %" PRId64 " of tsNodeReftId for pSyncNode", rid); + sError("failed to acquire rid:%" PRId64 " of tsNodeReftId for pSyncNode", rid); return -1; } @@ -756,7 +756,7 @@ int32_t syncNodeLogStoreRestoreOnNeed(SSyncNode* pNode) { SyncIndex lastVer = pNode->pLogStore->syncLogLastIndex(pNode->pLogStore); if (lastVer < commitIndex || firstVer > commitIndex + 1) { if (pNode->pLogStore->syncLogRestoreFromSnapshot(pNode->pLogStore, commitIndex)) { - sError("vgId:%d, failed to restore log store from snapshot since %s. lastVer: %" PRId64 ", snapshotVer: %" PRId64, + sError("vgId:%d, failed to restore log store from snapshot since %s. lastVer:%" PRId64 ", snapshotVer:%" PRId64, pNode->vgId, terrstr(), lastVer, commitIndex); return -1; } @@ -1112,7 +1112,7 @@ int32_t syncNodeRestore(SSyncNode* pSyncNode) { SyncIndex endIndex = pSyncNode->pLogBuf->endIndex; if (lastVer != -1 && endIndex != lastVer + 1) { terrno = TSDB_CODE_WAL_LOG_INCOMPLETE; - sError("vgId:%d, failed to restore sync node since %s. expected lastLogIndex: %" PRId64 ", lastVer: %" PRId64 "", + sError("vgId:%d, failed to restore sync node since %s. expected lastLogIndex:%" PRId64 ", lastVer:%" PRId64 "", pSyncNode->vgId, terrstr(), endIndex - 1, lastVer); return -1; } @@ -1831,7 +1831,7 @@ void syncNodeCandidate2Leader(SSyncNode* pSyncNode) { SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); ASSERT(lastIndex >= 0); - sInfo("vgId:%d, become leader. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64 "", + sInfo("vgId:%d, become leader. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64 "", pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); } @@ -1850,7 +1850,7 @@ void syncNodeFollower2Candidate(SSyncNode* pSyncNode) { ASSERT(pSyncNode->state == TAOS_SYNC_STATE_FOLLOWER); pSyncNode->state = TAOS_SYNC_STATE_CANDIDATE; SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); - sInfo("vgId:%d, become candidate from follower. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64, + sInfo("vgId:%d, become candidate from follower. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64, pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); sNTrace(pSyncNode, "follower to candidate"); @@ -1860,7 +1860,7 @@ void syncNodeLeader2Follower(SSyncNode* pSyncNode) { ASSERT(pSyncNode->state == TAOS_SYNC_STATE_LEADER); syncNodeBecomeFollower(pSyncNode, "leader to follower"); SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); - sInfo("vgId:%d, become follower from leader. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64, + sInfo("vgId:%d, become follower from leader. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64, pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); sNTrace(pSyncNode, "leader to follower"); @@ -1870,7 +1870,7 @@ void syncNodeCandidate2Follower(SSyncNode* pSyncNode) { ASSERT(pSyncNode->state == TAOS_SYNC_STATE_CANDIDATE); syncNodeBecomeFollower(pSyncNode, "candidate to follower"); SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); - sInfo("vgId:%d, become follower from candidate. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64, + sInfo("vgId:%d, become follower from candidate. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64, pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); sNTrace(pSyncNode, "candidate to follower"); @@ -2310,7 +2310,7 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) { // proceed match index, with replicating on needed SyncIndex matchIndex = syncLogBufferProceed(ths->pLogBuf, ths, NULL); - sTrace("vgId:%d, append raft entry. index: %" PRId64 ", term: %" PRId64 " pBuf: [%" PRId64 " %" PRId64 " %" PRId64 + sTrace("vgId:%d, append raft entry. index:%" PRId64 ", term:%" PRId64 " pBuf: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", ths->vgId, pEntry->index, pEntry->term, ths->pLogBuf->startIndex, ths->pLogBuf->commitIndex, ths->pLogBuf->matchIndex, ths->pLogBuf->endIndex); @@ -2483,7 +2483,7 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) { sError("vgId:%d, sync enqueue step-down msg error, code:%d", ths->vgId, code); rpcFreeCont(rpcMsgLocalCmd.pCont); } else { - sTrace("vgId:%d, sync enqueue step-down msg, new-term: %" PRId64, ths->vgId, pSyncMsg->currentTerm); + sTrace("vgId:%d, sync enqueue step-down msg, new-term:%" PRId64, ths->vgId, pSyncMsg->currentTerm); } } } @@ -2549,7 +2549,7 @@ int32_t syncNodeOnLocalCmd(SSyncNode* ths, const SRpcMsg* pRpcMsg) { (void)syncNodeUpdateCommitIndex(ths, pMsg->commitIndex); } if (syncLogBufferCommit(ths->pLogBuf, ths, ths->commitIndex) < 0) { - sError("vgId:%d, failed to commit raft log since %s. commit index: %" PRId64 "", ths->vgId, terrstr(), + sError("vgId:%d, failed to commit raft log since %s. commit index:%" PRId64 "", ths->vgId, terrstr(), ths->commitIndex); } } else { diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index bb3bb0d6a4..b3eb5684cf 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -132,16 +132,16 @@ SSyncRaftEntry* syncEntryBuildDummy(SyncTerm term, SyncIndex index, int32_t vgId int32_t syncLogValidateAlignmentOfCommit(SSyncNode* pNode, SyncIndex commitIndex) { SyncIndex firstVer = pNode->pLogStore->syncLogBeginIndex(pNode->pLogStore); if (firstVer > commitIndex + 1) { - sError("vgId:%d, firstVer of WAL log greater than tsdb commit version + 1. firstVer: %" PRId64 - ", tsdb commit version: %" PRId64 "", + sError("vgId:%d, firstVer of WAL log greater than tsdb commit version + 1. firstVer:%" PRId64 + ", tsdb commit version:%" PRId64 "", pNode->vgId, firstVer, commitIndex); return -1; } SyncIndex lastVer = pNode->pLogStore->syncLogLastIndex(pNode->pLogStore); if (lastVer < commitIndex) { - sError("vgId:%d, lastVer of WAL log less than tsdb commit version. lastVer: %" PRId64 - ", tsdb commit version: %" PRId64 "", + sError("vgId:%d, lastVer of WAL log less than tsdb commit version. lastVer:%" PRId64 + ", tsdb commit version:%" PRId64 "", pNode->vgId, lastVer, commitIndex); return -1; } @@ -293,7 +293,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt bool inBuf = true; if (index <= pBuf->commitIndex) { - sTrace("vgId:%d, already committed. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 + sTrace("vgId:%d, already committed. index:%" PRId64 ", term:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -306,7 +306,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt } if (index - pBuf->startIndex >= pBuf->size) { - sWarn("vgId:%d, out of buffer range. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 + sWarn("vgId:%d, out of buffer range. index:%" PRId64 ", term:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -314,8 +314,8 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt } if (index > pBuf->matchIndex && lastMatchTerm != prevTerm) { - sWarn("vgId:%d, not ready to accept. index: %" PRId64 ", term: %" PRId64 ": prevterm: %" PRId64 - " != lastmatch: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", + sWarn("vgId:%d, not ready to accept. index:%" PRId64 ", term:%" PRId64 ": prevterm:%" PRId64 + " != lastmatch:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, prevTerm, lastMatchTerm, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); goto _out; @@ -328,7 +328,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt if (pEntry->term != pExist->term) { (void)syncLogBufferRollback(pBuf, pNode, index); } else { - sTrace("vgId:%d, duplicate log entry received. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 + sTrace("vgId:%d, duplicate log entry received. index:%" PRId64 ", term:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -434,7 +434,7 @@ int64_t syncLogBufferProceed(SSyncLogBuffer* pBuf, SSyncNode* pNode, SyncTerm* p // increase match index pBuf->matchIndex = index; - sTrace("vgId:%d, log buffer proceed. start index: %" PRId64 ", match index: %" PRId64 ", end index: %" PRId64, + sTrace("vgId:%d, log buffer proceed. start index:%" PRId64 ", match index:%" PRId64 ", end index:%" PRId64, pNode->vgId, pBuf->startIndex, pBuf->matchIndex, pBuf->endIndex); // replicate on demand @@ -475,7 +475,7 @@ int32_t syncLogFsmExecute(SSyncNode* pNode, SSyncFSM* pFsm, ESyncState role, Syn } if (pEntry->originalRpcType == TDMT_VND_COMMIT) { - sInfo("vgId:%d, fsm execute vnode commit. index: %" PRId64 ", term: %" PRId64 "", pNode->vgId, pEntry->index, + sInfo("vgId:%d, fsm execute vnode commit. index:%" PRId64 ", term:%" PRId64 "", pNode->vgId, pEntry->index, pEntry->term); } @@ -528,7 +528,7 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm goto _out; } - sTrace("vgId:%d, commit. log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 "), role: %d, term: %" PRId64, + sTrace("vgId:%d, commit. log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 "), role:%d, term:%" PRId64, pNode->vgId, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex, role, term); // execute in fsm @@ -541,19 +541,19 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm // execute it if (!syncUtilUserCommit(pEntry->originalRpcType)) { - sInfo("vgId:%d, commit sync barrier. index: %" PRId64 ", term:%" PRId64 ", type: %s", vgId, pEntry->index, + sInfo("vgId:%d, commit sync barrier. index:%" PRId64 ", term:%" PRId64 ", type:%s", vgId, pEntry->index, pEntry->term, TMSG_INFO(pEntry->originalRpcType)); } if (syncLogFsmExecute(pNode, pFsm, role, term, pEntry, 0) != 0) { sError("vgId:%d, failed to execute sync log entry. index:%" PRId64 ", term:%" PRId64 - ", role: %d, current term: %" PRId64, + ", role:%d, current term:%" PRId64, vgId, pEntry->index, pEntry->term, role, term); goto _out; } pBuf->commitIndex = index; - sTrace("vgId:%d, committed index: %" PRId64 ", term: %" PRId64 ", role: %d, current term: %" PRId64 "", pNode->vgId, + sTrace("vgId:%d, committed index:%" PRId64 ", term:%" PRId64 ", role:%d, current term:%" PRId64 "", pNode->vgId, pEntry->index, pEntry->term, role, term); if (!inBuf) { @@ -614,7 +614,7 @@ int32_t syncLogReplMgrRetryOnNeed(SSyncLogReplMgr* pMgr, SSyncNode* pNode) { SRaftId* pDestId = &pNode->replicasId[pMgr->peerId]; if (pMgr->retryBackoff == SYNC_MAX_RETRY_BACKOFF) { syncLogReplMgrReset(pMgr); - sWarn("vgId:%d, reset sync log repl mgr since retry backoff exceeding limit. peer: %" PRIx64, pNode->vgId, + sWarn("vgId:%d, reset sync log repl mgr since retry backoff exceeding limit. peer:%" PRIx64, pNode->vgId, pDestId->addr); return -1; } @@ -639,7 +639,7 @@ int32_t syncLogReplMgrRetryOnNeed(SSyncLogReplMgr* pMgr, SSyncNode* pNode) { if (pMgr->states[pos].acked) { if (pMgr->matchIndex < index && pMgr->states[pos].timeMs + (syncGetRetryMaxWaitMs() << 3) < nowMs) { syncLogReplMgrReset(pMgr); - sWarn("vgId:%d, reset sync log repl mgr since stagnation. index: %" PRId64 ", peer: %" PRIx64, pNode->vgId, + sWarn("vgId:%d, reset sync log repl mgr since stagnation. index:%" PRId64 ", peer:%" PRIx64, pNode->vgId, index, pDestId->addr); goto _out; } @@ -648,7 +648,7 @@ int32_t syncLogReplMgrRetryOnNeed(SSyncLogReplMgr* pMgr, SSyncNode* pNode) { bool barrier = false; if (syncLogReplMgrReplicateOneTo(pMgr, pNode, index, &term, pDestId, &barrier) < 0) { - sError("vgId:%d, failed to replicate sync log entry since %s. index: %" PRId64 ", dest: %" PRIx64 "", pNode->vgId, + sError("vgId:%d, failed to replicate sync log entry since %s. index:%" PRId64 ", dest:%" PRIx64 "", pNode->vgId, terrstr(), index, pDestId->addr); goto _out; } @@ -670,8 +670,8 @@ _out: if (retried) { pMgr->retryBackoff = syncLogGetNextRetryBackoff(pMgr); SSyncLogBuffer* pBuf = pNode->pLogBuf; - sInfo("vgId:%d, resend %d sync log entries. dest: %" PRIx64 ", indexes: %" PRId64 " ..., terms: ... %" PRId64 - ", retryWaitMs: %" PRId64 ", mgr: [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 + sInfo("vgId:%d, resend %d sync log entries. dest:%" PRIx64 ", indexes:%" PRId64 " ..., terms: ... %" PRId64 + ", retryWaitMs:%" PRId64 ", mgr: [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, count, pDestId->addr, firstIndex, term, retryWaitMs, pMgr->startIndex, pMgr->matchIndex, pMgr->endIndex, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -714,7 +714,7 @@ int32_t syncLogReplMgrProcessReplyAsRecovery(SSyncLogReplMgr* pMgr, SSyncNode* p } if (pMsg->success == false && pMsg->matchIndex >= pMsg->lastSendIndex) { - sWarn("vgId:%d, failed to rollback match index. peer: dnode:%d, match index: %" PRId64 ", last sent: %" PRId64, + sWarn("vgId:%d, failed to rollback match index. peer: dnode:%d, match index:%" PRId64 ", last sent:%" PRId64, pNode->vgId, DID(&destId), pMsg->matchIndex, pMsg->lastSendIndex); if (syncNodeStartSnapshot(pNode, &destId) < 0) { sError("vgId:%d, failed to start snapshot for peer dnode:%d", pNode->vgId, DID(&destId)); @@ -761,7 +761,7 @@ int32_t syncLogReplMgrProcessHeartbeatReply(SSyncLogReplMgr* pMgr, SSyncNode* pN SSyncLogBuffer* pBuf = pNode->pLogBuf; taosThreadMutexLock(&pBuf->mutex); if (pMsg->startTime != 0 && pMsg->startTime != pMgr->peerStartTime) { - sInfo("vgId:%d, reset sync log repl mgr in heartbeat. peer: %" PRIx64 ", start time:%" PRId64 ", old:%" PRId64 "", + sInfo("vgId:%d, reset sync log repl mgr in heartbeat. peer:%" PRIx64 ", start time:%" PRId64 ", old:%" PRId64 "", pNode->vgId, pMsg->srcId.addr, pMsg->startTime, pMgr->peerStartTime); syncLogReplMgrReset(pMgr); pMgr->peerStartTime = pMsg->startTime; @@ -774,7 +774,7 @@ int32_t syncLogReplMgrProcessReply(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sync SSyncLogBuffer* pBuf = pNode->pLogBuf; taosThreadMutexLock(&pBuf->mutex); if (pMsg->startTime != pMgr->peerStartTime) { - sInfo("vgId:%d, reset sync log repl mgr in appendlog reply. peer: %" PRIx64 ", start time:%" PRId64 + sInfo("vgId:%d, reset sync log repl mgr in appendlog reply. peer:%" PRIx64 ", start time:%" PRId64 ", old:%" PRId64, pNode->vgId, pMsg->srcId.addr, pMsg->startTime, pMgr->peerStartTime); syncLogReplMgrReset(pMgr); @@ -815,7 +815,7 @@ int32_t syncLogReplMgrReplicateProbe(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy bool barrier = false; SyncTerm term = -1; if (syncLogReplMgrReplicateOneTo(pMgr, pNode, index, &term, pDestId, &barrier) < 0) { - sError("vgId:%d, failed to replicate log entry since %s. index: %" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, + sError("vgId:%d, failed to replicate log entry since %s. index:%" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, terrstr(), index, pDestId->addr); return -1; } @@ -830,7 +830,7 @@ int32_t syncLogReplMgrReplicateProbe(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy pMgr->endIndex = index + 1; SSyncLogBuffer* pBuf = pNode->pLogBuf; - sTrace("vgId:%d, probe peer:%" PRIx64 " with msg of index:%" PRId64 " term: %" PRId64 ". mgr (rs:%d): [%" PRId64 + sTrace("vgId:%d, probe peer:%" PRIx64 " with msg of index:%" PRId64 " term:%" PRId64 ". mgr (rs:%d): [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pDestId->addr, index, term, pMgr->restored, pMgr->startIndex, pMgr->matchIndex, pMgr->endIndex, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -860,7 +860,7 @@ int32_t syncLogReplMgrReplicateAttempt(SSyncLogReplMgr* pMgr, SSyncNode* pNode) bool barrier = false; SyncTerm term = -1; if (syncLogReplMgrReplicateOneTo(pMgr, pNode, index, &term, pDestId, &barrier) < 0) { - sError("vgId:%d, failed to replicate log entry since %s. index: %" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, + sError("vgId:%d, failed to replicate log entry since %s. index:%" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, terrstr(), index, pDestId->addr); return -1; } @@ -874,7 +874,7 @@ int32_t syncLogReplMgrReplicateAttempt(SSyncLogReplMgr* pMgr, SSyncNode* pNode) pMgr->endIndex = index + 1; if (barrier) { - sInfo("vgId:%d, replicated sync barrier to dest: %" PRIx64 ". index: %" PRId64 ", term: %" PRId64 + sInfo("vgId:%d, replicated sync barrier to dest:%" PRIx64 ". index:%" PRId64 ", term:%" PRId64 ", repl mgr: rs(%d) [%" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pDestId->addr, index, term, pMgr->restored, pMgr->startIndex, pMgr->matchIndex, pMgr->endIndex); @@ -885,7 +885,7 @@ int32_t syncLogReplMgrReplicateAttempt(SSyncLogReplMgr* pMgr, SSyncNode* pNode) syncLogReplMgrRetryOnNeed(pMgr, pNode); SSyncLogBuffer* pBuf = pNode->pLogBuf; - sTrace("vgId:%d, replicated %d msgs to peer: %" PRIx64 ". indexes: %" PRId64 "..., terms: ...%" PRId64 + sTrace("vgId:%d, replicated %d msgs to peer:%" PRIx64 ". indexes:%" PRId64 "..., terms: ...%" PRId64 ", mgr: (rs:%d) [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, count, pDestId->addr, firstIndex, term, pMgr->restored, pMgr->startIndex, pMgr->matchIndex, @@ -1028,7 +1028,7 @@ int32_t syncLogBufferRollback(SSyncLogBuffer* pBuf, SSyncNode* pNode, SyncIndex return 0; } - sInfo("vgId:%d, rollback sync log buffer. toindex: %" PRId64 ", buffer: [%" PRId64 " %" PRId64 " %" PRId64 + sInfo("vgId:%d, rollback sync log buffer. toindex:%" PRId64 ", buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, toIndex, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -1119,11 +1119,11 @@ int32_t syncLogReplMgrReplicateOneTo(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy pEntry = syncLogBufferGetOneEntry(pBuf, pNode, index, &inBuf); if (pEntry == NULL) { - sError("vgId:%d, failed to get raft entry for index: %" PRId64 "", pNode->vgId, index); + sError("vgId:%d, failed to get raft entry for index:%" PRId64 "", pNode->vgId, index); if (terrno == TSDB_CODE_WAL_LOG_NOT_EXIST) { SSyncLogReplMgr* pMgr = syncNodeGetLogReplMgr(pNode, pDestId); if (pMgr) { - sInfo("vgId:%d, reset sync log repl mgr of peer: %" PRIx64 " since %s. index: %" PRId64, pNode->vgId, + sInfo("vgId:%d, reset sync log repl mgr of peer:%" PRIx64 " since %s. index:%" PRId64, pNode->vgId, pDestId->addr, terrstr(), index); (void)syncLogReplMgrReset(pMgr); } @@ -1134,7 +1134,7 @@ int32_t syncLogReplMgrReplicateOneTo(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy prevLogTerm = syncLogReplMgrGetPrevLogTerm(pMgr, pNode, index); if (prevLogTerm < 0) { - sError("vgId:%d, failed to get prev log term since %s. index: %" PRId64 "", pNode->vgId, terrstr(), index); + sError("vgId:%d, failed to get prev log term since %s. index:%" PRId64 "", pNode->vgId, terrstr(), index); goto _err; } if (pTerm) *pTerm = pEntry->term; @@ -1147,7 +1147,7 @@ int32_t syncLogReplMgrReplicateOneTo(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy (void)syncNodeSendAppendEntries(pNode, pDestId, &msgOut); - sTrace("vgId:%d, replicate one msg index: %" PRId64 " term: %" PRId64 " prevterm: %" PRId64 " to dest: 0x%016" PRIx64, + sTrace("vgId:%d, replicate one msg index:%" PRId64 " term:%" PRId64 " prevterm:%" PRId64 " to dest: 0x%016" PRIx64, pNode->vgId, pEntry->index, pEntry->term, prevLogTerm, pDestId->addr); if (!inBuf) { diff --git a/source/libs/sync/src/syncRaftEntry.c b/source/libs/sync/src/syncRaftEntry.c index 988a86cc67..623f1b77a4 100644 --- a/source/libs/sync/src/syncRaftEntry.c +++ b/source/libs/sync/src/syncRaftEntry.c @@ -91,7 +91,7 @@ SSyncRaftEntry* syncEntryBuildNoop(SyncTerm term, SyncIndex index, int32_t vgId) void syncEntryDestroy(SSyncRaftEntry* pEntry) { if (pEntry != NULL) { - sTrace("free entry: %p", pEntry); + sTrace("free entry:%p", pEntry); taosMemoryFree(pEntry); } } diff --git a/source/libs/sync/src/syncSnapshot.c b/source/libs/sync/src/syncSnapshot.c index e61bcc9ffc..18f263cc95 100644 --- a/source/libs/sync/src/syncSnapshot.c +++ b/source/libs/sync/src/syncSnapshot.c @@ -510,16 +510,8 @@ SyncIndex syncNodeGetSnapBeginIndex(SSyncNode *ths) { SSyncLogStoreData *pData = ths->pLogStore->data; SWal *pWal = pData->pWal; - bool isEmpty = ths->pLogStore->syncLogIsEmpty(ths->pLogStore); int64_t walCommitVer = walGetCommittedVer(pWal); - - if (!isEmpty && ths->commitIndex != walCommitVer) { - sNError(ths, "commit not same, wal-commit:%" PRId64 ", commit:%" PRId64 ", ignore", walCommitVer, - ths->commitIndex); - snapStart = walCommitVer + 1; - } else { - snapStart = ths->commitIndex + 1; - } + snapStart = TMAX(ths->commitIndex, walCommitVer) + 1; sNInfo(ths, "snapshot begin index is %" PRId64, snapStart); } diff --git a/source/libs/sync/src/syncUtil.c b/source/libs/sync/src/syncUtil.c index 6a50572cba..97641b8f41 100644 --- a/source/libs/sync/src/syncUtil.c +++ b/source/libs/sync/src/syncUtil.c @@ -43,7 +43,7 @@ void syncUtilNodeInfo2EpSet(const SNodeInfo* pInfo, SEpSet* pEpSet) { bool syncUtilNodeInfo2RaftId(const SNodeInfo* pInfo, SyncGroupId vgId, SRaftId* raftId) { uint32_t ipv4 = taosGetIpv4FromFqdn(pInfo->nodeFqdn); if (ipv4 == 0xFFFFFFFF || ipv4 == 1) { - sError("failed to resolve ipv4 addr, fqdn: %s", pInfo->nodeFqdn); + sError("failed to resolve ipv4 addr, fqdn:%s", pInfo->nodeFqdn); terrno = TSDB_CODE_TSC_INVALID_FQDN; return false; } diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 1a99db5f99..111742a6f4 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -671,7 +671,7 @@ static SCliConn* cliCreateConn(SCliThrd* pThrd) { conn->stream = (uv_stream_t*)taosMemoryMalloc(sizeof(uv_tcp_t)); uv_tcp_init(pThrd->loop, (uv_tcp_t*)(conn->stream)); conn->stream->data = conn; - transSetConnOption((uv_tcp_t*)conn->stream); + // transSetConnOption((uv_tcp_t*)conn->stream); uv_timer_t* timer = taosArrayGetSize(pThrd->timerList) > 0 ? *(uv_timer_t**)taosArrayPop(pThrd->timerList) : NULL; if (timer == NULL) { @@ -778,7 +778,7 @@ static void cliSendCb(uv_write_t* req, int status) { SCliMsg* pMsg = !transQueueEmpty(&pConn->cliMsgs) ? transQueueGet(&pConn->cliMsgs, 0) : NULL; if (pMsg != NULL) { int64_t cost = taosGetTimestampUs() - pMsg->st; - if (cost > 1000) { + if (cost > 1000 * 20) { tWarn("%s conn %p send cost:%dus, send exception", CONN_GET_INST_LABEL(pConn), pConn, (int)cost); } } @@ -800,9 +800,12 @@ static void cliSendCb(uv_write_t* req, int status) { } void cliSend(SCliConn* pConn) { - bool empty = transQueueEmpty(&pConn->cliMsgs); - ASSERTS(empty == false, "trans-cli get invalid msg"); - if (empty == true) { + SCliThrd* pThrd = pConn->hostThrd; + STrans* pTransInst = pThrd->pTransInst; + + if (transQueueEmpty(&pConn->cliMsgs)) { + tError("%s conn %p not msg to send", pTransInst->label, pConn); + cliHandleExcept(pConn); return; } @@ -812,9 +815,6 @@ void cliSend(SCliConn* pConn) { STransConnCtx* pCtx = pCliMsg->ctx; - SCliThrd* pThrd = pConn->hostThrd; - STrans* pTransInst = pThrd->pTransInst; - STransMsg* pMsg = (STransMsg*)(&pCliMsg->msg); if (pMsg->pCont == 0) { pMsg->pCont = (void*)rpcMallocCont(0); @@ -1045,6 +1045,12 @@ static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn)); if (v == NULL) { addr = taosGetIpv4FromFqdn(fqdn); + if (addr == 0xffffffff) { + terrno = TAOS_SYSTEM_ERROR(errno); + tError("failed to get ip from fqdn:%s since %s", fqdn, terrstr()); + return addr; + } + taosHashPut(cache, fqdn, strlen(fqdn), &addr, sizeof(addr)); } else { addr = *v; @@ -1061,9 +1067,10 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { STransConnCtx* pCtx = pMsg->ctx; cliMayCvtFqdnToIp(&pCtx->epSet, &pThrd->cvtAddr); + STraceId* trace = &pMsg->msg.info.traceId; if (!EPSET_IS_VALID(&pCtx->epSet)) { - tError("invalid epset"); + tGError("%s, msg %s sent with invalid epset", pTransInst->label, TMSG_INFO(pMsg->msg.msgType)); destroyCmsg(pMsg); return; } @@ -1116,15 +1123,45 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { conn->ip = strdup(EPSET_GET_INUSE_IP(&pCtx->epSet)); conn->port = EPSET_GET_INUSE_PORT(&pCtx->epSet); + uint32_t ipaddr = cliGetIpFromFqdnCache(pThrd->fqdn2ipCache, conn->ip); + if (ipaddr == 0xffffffff) { + uv_timer_stop(conn->timer); + conn->timer->data = NULL; + taosArrayPush(pThrd->timerList, &conn->timer); + conn->timer = NULL; + + cliHandleExcept(conn); + return; + } + struct sockaddr_in addr; addr.sin_family = AF_INET; - addr.sin_addr.s_addr = cliGetIpFromFqdnCache(pThrd->fqdn2ipCache, conn->ip); + addr.sin_addr.s_addr = ipaddr; addr.sin_port = (uint16_t)htons((uint16_t)conn->port); - STraceId* trace = &(pMsg->msg.info.traceId); tGTrace("%s conn %p try to connect to %s:%d", pTransInst->label, conn, conn->ip, conn->port); + int32_t fd = taosCreateSocketWithTimeout(TRANS_CONN_TIMEOUT * 4); + if (fd == -1) { + tGError("%s conn %p failed to create socket, reason:%s", transLabel(pTransInst), conn, + tstrerror(TAOS_SYSTEM_ERROR(errno))); + cliHandleExcept(conn); + errno = 0; + return; + } + int ret = uv_tcp_open((uv_tcp_t*)conn->stream, fd); + if (ret != 0) { + tGError("%s conn %p failed to set stream, reason:%s", transLabel(pTransInst), conn, uv_err_name(ret)); + cliHandleExcept(conn); + return; + } + ret = transSetConnOption((uv_tcp_t*)conn->stream); + if (ret != 0) { + tGError("%s conn %p failed to set socket opt, reason:%s", transLabel(pTransInst), conn, uv_err_name(ret)); + cliHandleExcept(conn); + return; + } - int ret = uv_tcp_connect(&conn->connReq, (uv_tcp_t*)(conn->stream), (const struct sockaddr*)&addr, cliConnCb); + ret = uv_tcp_connect(&conn->connReq, (uv_tcp_t*)(conn->stream), (const struct sockaddr*)&addr, cliConnCb); if (ret != 0) { tGError("%s conn %p failed to connect to %s:%d, reason:%s", pTransInst->label, conn, conn->ip, conn->port, uv_err_name(ret)); @@ -1139,7 +1176,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { } uv_timer_start(conn->timer, cliConnTimeout, TRANS_CONN_TIMEOUT, 0); } - STraceId* trace = &pMsg->msg.info.traceId; tGTrace("%s conn %p ready", pTransInst->label, conn); } static void cliAsyncCb(uv_async_t* handle) { @@ -1275,7 +1311,11 @@ void* transInitClient(uint32_t ip, uint32_t port, char* label, int numOfThreads, for (int i = 0; i < cli->numOfThreads; i++) { SCliThrd* pThrd = createThrdObj(shandle); - int err = taosThreadCreate(&pThrd->thread, NULL, cliWorkThread, (void*)(pThrd)); + if (pThrd == NULL) { + return NULL; + } + + int err = taosThreadCreate(&pThrd->thread, NULL, cliWorkThread, (void*)(pThrd)); if (err == 0) { tDebug("success to create tranport-cli thread:%d", i); } @@ -1332,9 +1372,23 @@ static SCliThrd* createThrdObj(void* trans) { taosThreadMutexInit(&pThrd->msgMtx, NULL); pThrd->loop = (uv_loop_t*)taosMemoryMalloc(sizeof(uv_loop_t)); - uv_loop_init(pThrd->loop); - + int err = uv_loop_init(pThrd->loop); + if (err != 0) { + tError("failed to init uv_loop, reason:%s", uv_err_name(err)); + taosMemoryFree(pThrd->loop); + taosThreadMutexDestroy(&pThrd->msgMtx); + taosMemoryFree(pThrd); + return NULL; + } pThrd->asyncPool = transAsyncPoolCreate(pThrd->loop, 8, pThrd, cliAsyncCb); + if (pThrd->asyncPool == NULL) { + tError("failed to init async pool"); + uv_loop_close(pThrd->loop); + taosMemoryFree(pThrd->loop); + taosThreadMutexDestroy(&pThrd->msgMtx); + taosMemoryFree(pThrd); + return NULL; + } pThrd->prepare = taosMemoryCalloc(1, sizeof(uv_prepare_t)); uv_prepare_init(pThrd->loop, pThrd->prepare); diff --git a/source/libs/transport/src/transComm.c b/source/libs/transport/src/transComm.c index 1161ed7c00..4c107a88f1 100644 --- a/source/libs/transport/src/transComm.c +++ b/source/libs/transport/src/transComm.c @@ -205,6 +205,10 @@ bool transReadComplete(SConnBuffer* connBuf) { } int transSetConnOption(uv_tcp_t* stream) { +#if defined(WINDOWS) || defined(DARWIN) +#else + uv_tcp_keepalive(stream, 1, 20); +#endif return uv_tcp_nodelay(stream, 1); // int ret = uv_tcp_keepalive(stream, 5, 60); } @@ -214,24 +218,37 @@ SAsyncPool* transAsyncPoolCreate(uv_loop_t* loop, int sz, void* arg, AsyncCB cb) pool->nAsync = sz; pool->asyncs = taosMemoryCalloc(1, sizeof(uv_async_t) * pool->nAsync); - for (int i = 0; i < pool->nAsync; i++) { + int i = 0, err = 0; + for (i = 0; i < pool->nAsync; i++) { + uv_async_t* async = &(pool->asyncs[i]); + SAsyncItem* item = taosMemoryCalloc(1, sizeof(SAsyncItem)); item->pThrd = arg; QUEUE_INIT(&item->qmsg); taosThreadMutexInit(&item->mtx, NULL); - uv_async_t* async = &(pool->asyncs[i]); - uv_async_init(loop, async, cb); async->data = item; + err = uv_async_init(loop, async, cb); + if (err != 0) { + tError("failed to init async, reason:%s", uv_err_name(err)); + break; + } } + + if (i != pool->nAsync) { + transAsyncPoolDestroy(pool); + pool = NULL; + } + return pool; } void transAsyncPoolDestroy(SAsyncPool* pool) { for (int i = 0; i < pool->nAsync; i++) { uv_async_t* async = &(pool->asyncs[i]); - SAsyncItem* item = async->data; + if (item == NULL) continue; + taosThreadMutexDestroy(&item->mtx); taosMemoryFree(item); } diff --git a/source/os/src/osSocket.c b/source/os/src/osSocket.c index 715c2632e0..ddb8eca0eb 100644 --- a/source/os/src/osSocket.c +++ b/source/os/src/osSocket.c @@ -55,7 +55,7 @@ typedef struct TdSocket { #endif int refId; SocketFd fd; -} * TdSocketPtr, TdSocket; +} *TdSocketPtr, TdSocket; typedef struct TdSocketServer { #if SOCKET_WITH_LOCK @@ -63,7 +63,7 @@ typedef struct TdSocketServer { #endif int refId; SocketFd fd; -} * TdSocketServerPtr, TdSocketServer; +} *TdSocketServerPtr, TdSocketServer; typedef struct TdEpoll { #if SOCKET_WITH_LOCK @@ -71,7 +71,7 @@ typedef struct TdEpoll { #endif int refId; EpollFd fd; -} * TdEpollPtr, TdEpoll; +} *TdEpollPtr, TdEpoll; #if 0 int32_t taosSendto(TdSocketPtr pSocket, void *buf, int len, unsigned int flags, const struct sockaddr *dest_addr, @@ -944,7 +944,7 @@ uint32_t taosGetIpv4FromFqdn(const char *fqdn) { iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); if (iResult != 0) { // printf("WSAStartup failed: %d\n", iResult); - return 1; + return 0xFFFFFFFF; } #endif struct addrinfo hints = {0}; @@ -1005,7 +1005,7 @@ int32_t taosGetFqdn(char *fqdn) { // immediately // hints.ai_family = AF_INET; strcpy(fqdn, hostname); - strcpy(fqdn+strlen(hostname), ".local"); + strcpy(fqdn + strlen(hostname), ".local"); #else // __APPLE__ struct addrinfo hints = {0}; struct addrinfo *result = NULL; @@ -1060,7 +1060,7 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) { #if defined(WINDOWS) SOCKET fd; #else - int fd; + int fd; #endif if ((fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) { return -1; @@ -1071,11 +1071,12 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) { return -1; } #elif defined(_TD_DARWIN_64) - uint32_t conn_timeout_ms = timeout * 1000; - if (0 != setsockopt(fd, IPPROTO_TCP, TCP_CONNECTIONTIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { - taosCloseSocketNoCheck1(fd); - return -1; - } + // invalid config + // uint32_t conn_timeout_ms = timeout * 1000; + // if (0 != setsockopt(fd, IPPROTO_TCP, TCP_CONNECTIONTIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { + // taosCloseSocketNoCheck1(fd); + // return -1; + //} #else // Linux like systems uint32_t conn_timeout_ms = timeout * 1000; if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { diff --git a/source/util/src/terror.c b/source/util/src/terror.c index bab3edc870..d63687c8d7 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -289,6 +289,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_STREAM_NOT_EXIST, "Stream not exist") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_STREAM_OPTION, "Invalid stream option") TAOS_DEFINE_ERROR(TSDB_CODE_MND_STREAM_MUST_BE_DELETED, "Stream must be dropped first") TAOS_DEFINE_ERROR(TSDB_CODE_MND_MULTI_REPLICA_SOURCE_DB, "Stream temporarily does not support source db having replica > 1") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_STREAMS, "Too many streams") // mnode-sma TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_ALREADY_EXIST, "SMA already exists") diff --git a/source/util/src/tpagedbuf.c b/source/util/src/tpagedbuf.c index 7c60862c56..3cecfdff9c 100644 --- a/source/util/src/tpagedbuf.c +++ b/source/util/src/tpagedbuf.c @@ -5,11 +5,11 @@ #include "thash.h" #include "tlog.h" -#define GET_PAYLOAD_DATA(_p) ((char*)(_p)->pData + POINTER_BYTES) -#define BUF_PAGE_IN_MEM(_p) ((_p)->pData != NULL) +#define GET_PAYLOAD_DATA(_p) ((char*)(_p)->pData + POINTER_BYTES) +#define BUF_PAGE_IN_MEM(_p) ((_p)->pData != NULL) #define CLEAR_BUF_PAGE_IN_MEM_FLAG(_p) ((_p)->pData = NULL) -#define HAS_DATA_IN_DISK(_p) ((_p)->offset >= 0) -#define NO_IN_MEM_AVAILABLE_PAGES(_b) (listNEles((_b)->lruList) >= (_b)->inMemPages) +#define HAS_DATA_IN_DISK(_p) ((_p)->offset >= 0) +#define NO_IN_MEM_AVAILABLE_PAGES(_b) (listNEles((_b)->lruList) >= (_b)->inMemPages) typedef struct SPageDiskInfo { int64_t offset; @@ -17,7 +17,7 @@ typedef struct SPageDiskInfo { } SPageDiskInfo, SFreeListItem; struct SPageInfo { - SListNode* pn; // point to list node struct. it is NULL when the page is evicted from the in-memory buffer + SListNode* pn; // point to list node struct. it is NULL when the page is evicted from the in-memory buffer void* pData; int64_t offset; int32_t pageId; @@ -52,10 +52,13 @@ struct SDiskbasedBuf { }; static int32_t createDiskFile(SDiskbasedBuf* pBuf) { - if (pBuf->path == NULL) { // prepare the file name when needed it + if (pBuf->path == NULL) { // prepare the file name when needed it char path[PATH_MAX] = {0}; taosGetTmpfilePath(pBuf->prefix, "paged-buf", path); pBuf->path = taosMemoryStrDup(path); + if (pBuf->path == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } pBuf->pFile = @@ -126,6 +129,30 @@ static uint64_t allocateNewPositionInFile(SDiskbasedBuf* pBuf, size_t size) { static FORCE_INLINE size_t getAllocPageSize(int32_t pageSize) { return pageSize + POINTER_BYTES + sizeof(SFilePage); } +static int32_t doFlushBufPageImpl(SDiskbasedBuf* pBuf, int64_t offset, const char* pData, int32_t size) { + int32_t ret = taosLSeekFile(pBuf->pFile, offset, SEEK_SET); + if (ret == -1) { + terrno = TAOS_SYSTEM_ERROR(errno); + return terrno; + } + + ret = (int32_t)taosWriteFile(pBuf->pFile, pData, size); + if (ret != size) { + terrno = TAOS_SYSTEM_ERROR(errno); + return terrno; + } + + // extend the file + if (pBuf->fileSize < offset + size) { + pBuf->fileSize = offset + size; + } + + pBuf->statis.flushBytes += size; + pBuf->statis.flushPages += 1; + + return TSDB_CODE_SUCCESS; +} + static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { if (pg->pData == NULL || pg->used) { uError("invalid params in paged buffer process when flushing buf to disk, %s", pBuf->id); @@ -134,12 +161,15 @@ static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { } int32_t size = pBuf->pageSize; - char* t = NULL; + int64_t offset = pg->offset; + + char* t = NULL; if ((!HAS_DATA_IN_DISK(pg)) || pg->dirty) { void* payload = GET_PAYLOAD_DATA(pg); t = doCompressData(payload, pBuf->pageSize, &size, pBuf); if (size < 0) { uError("failed to compress data when flushing data to disk, %s", pBuf->id); + terrno = TSDB_CODE_INVALID_PARA; return NULL; } } @@ -147,59 +177,29 @@ static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { // this page is flushed to disk for the first time if (pg->dirty) { if (!HAS_DATA_IN_DISK(pg)) { - pg->offset = allocateNewPositionInFile(pBuf, size); + offset = allocateNewPositionInFile(pBuf, size); pBuf->nextPos += size; - int32_t ret = taosLSeekFile(pBuf->pFile, pg->offset, SEEK_SET); - if (ret == -1) { - terrno = TAOS_SYSTEM_ERROR(errno); + int32_t code = doFlushBufPageImpl(pBuf, offset, t, size); + if (code != TSDB_CODE_SUCCESS) { return NULL; } - - ret = (int32_t)taosWriteFile(pBuf->pFile, t, size); - if (ret != size) { - terrno = TAOS_SYSTEM_ERROR(errno); - return NULL; - } - - // extend the file size - if (pBuf->fileSize < pg->offset + size) { - pBuf->fileSize = pg->offset + size; - } - - pBuf->statis.flushBytes += size; - pBuf->statis.flushPages += 1; } else { // length becomes greater, current space is not enough, allocate new place, otherwise, do nothing if (pg->length < size) { // 1. add current space to free list - SPageDiskInfo dinfo = {.length = pg->length, .offset = pg->offset}; + SPageDiskInfo dinfo = {.length = pg->length, .offset = offset}; taosArrayPush(pBuf->pFree, &dinfo); // 2. allocate new position, and update the info - pg->offset = allocateNewPositionInFile(pBuf, size); + offset = allocateNewPositionInFile(pBuf, size); pBuf->nextPos += size; } - // 3. write to disk. - int32_t ret = taosLSeekFile(pBuf->pFile, pg->offset, SEEK_SET); - if (ret == -1) { - terrno = TAOS_SYSTEM_ERROR(errno); + int32_t code = doFlushBufPageImpl(pBuf, offset, t, size); + if (code != TSDB_CODE_SUCCESS) { return NULL; } - - ret = (int32_t)taosWriteFile(pBuf->pFile, t, size); - if (ret != size) { - terrno = TAOS_SYSTEM_ERROR(errno); - return NULL; - } - - if (pBuf->fileSize < pg->offset + size) { - pBuf->fileSize = pg->offset + size; - } - - pBuf->statis.flushBytes += size; - pBuf->statis.flushPages += 1; } } else { // NOTE: the size may be -1, the this recycle page has not been flushed to disk yet. size = pg->length; @@ -209,9 +209,10 @@ static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { memset(pDataBuf, 0, getAllocPageSize(pBuf->pageSize)); #ifdef BUF_PAGE_DEBUG - uDebug("page_flush %p, pageId:%d, offset:%d", pDataBuf, pg->pageId, pg->offset); + uDebug("page_flush %p, pageId:%d, offset:%d", pDataBuf, pg->pageId, offset); #endif + pg->offset = offset; pg->length = size; // on disk size return pDataBuf; } @@ -236,7 +237,7 @@ static char* flushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { // load file block data in disk static int32_t loadPageFromDisk(SDiskbasedBuf* pBuf, SPageInfo* pg) { if (pg->offset < 0 || pg->length <= 0) { - uError("failed to load buf page from disk, offset:%"PRId64", length:%d, %s", pg->offset, pg->length, pBuf->id); + uError("failed to load buf page from disk, offset:%" PRId64 ", length:%d, %s", pg->offset, pg->length, pBuf->id); return TSDB_CODE_INVALID_PARA; } @@ -303,6 +304,7 @@ static SListNode* getEldestUnrefedPage(SDiskbasedBuf* pBuf) { static char* evictBufPage(SDiskbasedBuf* pBuf) { SListNode* pn = getEldestUnrefedPage(pBuf); if (pn == NULL) { // no available buffer pages now, return. + terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } @@ -382,14 +384,14 @@ int32_t createDiskbasedBuf(SDiskbasedBuf** pBuf, int32_t pagesize, int32_t inMem goto _error; } - pPBuf->prefix = (char*) dir; + pPBuf->prefix = (char*)dir; pPBuf->emptyDummyIdList = taosArrayInit(1, sizeof(int32_t)); // qDebug("QInfo:0x%"PRIx64" create resBuf for output, page size:%d, inmem buf pages:%d, file:%s", qId, // pPBuf->pageSize, pPBuf->inMemPages, pPBuf->path); return TSDB_CODE_SUCCESS; - _error: +_error: destroyDiskbasedBuf(pPBuf); return TSDB_CODE_OUT_OF_MEMORY; } @@ -399,11 +401,12 @@ static char* doExtractPage(SDiskbasedBuf* pBuf) { if (NO_IN_MEM_AVAILABLE_PAGES(pBuf)) { availablePage = evictBufPage(pBuf); if (availablePage == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - uWarn("no available buf pages, current:%d, max:%d", listNEles(pBuf->lruList), pBuf->inMemPages) + uWarn("no available buf pages, current:%d, max:%d, reason: %s, %s", listNEles(pBuf->lruList), pBuf->inMemPages, + terrstr(), pBuf->id) } } else { - availablePage = taosMemoryCalloc(1, getAllocPageSize(pBuf->pageSize)); // add extract bytes in case of zipped buffer increased. + availablePage = + taosMemoryCalloc(1, getAllocPageSize(pBuf->pageSize)); // add extract bytes in case of zipped buffer increased. if (availablePage == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; } @@ -551,9 +554,7 @@ void releaseBufPageInfo(SDiskbasedBuf* pBuf, SPageInfo* pi) { size_t getTotalBufSize(const SDiskbasedBuf* pBuf) { return (size_t)pBuf->totalBufSize; } -SArray* getDataBufPagesIdList(SDiskbasedBuf* pBuf) { - return pBuf->pIdList; -} +SArray* getDataBufPagesIdList(SDiskbasedBuf* pBuf) { return pBuf->pIdList; } void destroyDiskbasedBuf(SDiskbasedBuf* pBuf) { if (pBuf == NULL) { @@ -567,7 +568,7 @@ void destroyDiskbasedBuf(SDiskbasedBuf* pBuf) { needRemoveFile = true; uDebug( "Paged buffer closed, total:%.2f Kb (%d Pages), inmem size:%.2f Kb (%d Pages), file size:%.2f Kb, page " - "size:%.2f Kb, %s\n", + "size:%.2f Kb, %s", pBuf->totalBufSize / 1024.0, pBuf->numOfPages, listNEles(pBuf->lruList) * pBuf->pageSize / 1024.0, listNEles(pBuf->lruList), pBuf->fileSize / 1024.0, pBuf->pageSize / 1024.0f, pBuf->id); @@ -584,8 +585,7 @@ void destroyDiskbasedBuf(SDiskbasedBuf* pBuf) { ps->releasePages, ps->flushBytes / 1024.0f, ps->flushPages, ps->loadBytes / 1024.0f, ps->loadPages); } else { uDebug( - "Get/Release pages:%d/%d, flushToDisk:%.2f Kb (%d Pages), loadFromDisk:%.2f Kb (%d Pages), avgPageSize:%.2f " - "Kb", + "Get/Release pages:%d/%d, flushToDisk:%.2f Kb (%d Pages), loadFromDisk:%.2f Kb (%d Pages), avgPgSize:%.2f Kb", ps->getPages, ps->releasePages, ps->flushBytes / 1024.0f, ps->flushPages, ps->loadBytes / 1024.0f, ps->loadPages, ps->loadBytes / (1024.0 * ps->loadPages)); } @@ -628,9 +628,7 @@ SPageInfo* getLastPageInfo(SArray* pList) { return pPgInfo; } -int32_t getPageId(const SPageInfo* pPgInfo) { - return pPgInfo->pageId; -} +int32_t getPageId(const SPageInfo* pPgInfo) { return pPgInfo->pageId; } int32_t getBufPageSize(const SDiskbasedBuf* pBuf) { return pBuf->pageSize; } @@ -686,7 +684,7 @@ void dBufPrintStatis(const SDiskbasedBuf* pBuf) { ps->getPages, ps->releasePages, ps->flushBytes / 1024.0f, ps->flushPages, ps->loadBytes / 1024.0f, ps->loadPages, ps->loadBytes / (1024.0 * ps->loadPages)); } else { - //printf("no page loaded\n"); + // printf("no page loaded\n"); } } diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 3b4f61daee..827ffe183c 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -180,6 +180,7 @@ ,,y,script,./test.sh -f tsim/query/sys_tbname.sim ,,y,script,./test.sh -f tsim/query/groupby.sim ,,y,script,./test.sh -f tsim/query/event.sim +,,y,script,./test.sh -f tsim/query/forceFill.sim ,,y,script,./test.sh -f tsim/qnode/basic1.sim ,,y,script,./test.sh -f tsim/snode/basic1.sim ,,y,script,./test.sh -f tsim/mnode/basic1.sim @@ -1054,6 +1055,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/odbc.py ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 4 diff --git a/tests/script/tsim/compute/block_dist.sim b/tests/script/tsim/compute/block_dist.sim index 2d0a4e8902..4fdcf63e34 100644 --- a/tests/script/tsim/compute/block_dist.sim +++ b/tests/script/tsim/compute/block_dist.sim @@ -91,6 +91,10 @@ print ============== TD-5998 sql_error select _block_dist() from (select * from $nt) sql_error select _block_dist() from (select * from $mt) +print ============== TD-22140 & TD-22165 +sql_error show table distributed information_schema.ins_databases +sql_error show table distributed performance_schema.perf_apps + print =============== clear sql drop database $db sql select * from information_schema.ins_databases diff --git a/tests/script/tsim/parser/regressiontest.sim b/tests/script/tsim/parser/regressiontest.sim index 3ce2b47b44..1d84ae88cb 100644 --- a/tests/script/tsim/parser/regressiontest.sim +++ b/tests/script/tsim/parser/regressiontest.sim @@ -31,13 +31,8 @@ sql insert into $tb values ( $ts , $x ) $x = $x + 1 endw -print ================== restart server to commit data into disk -system sh/exec.sh -n dnode1 -s stop -x SIGINT -system sh/exec.sh -n dnode1 -s start -print ================== server restart completed -sql connect +sql flush database $db -sql use $db sql delete from $tb where ts=1537146000000 sql delete from $tb where ts=1537146409500 @@ -63,7 +58,6 @@ if $rows != 8198 then return -1 endi -print ===========================> TD-22077 && TD-21877 sql drop database if exists $db -x step1 sql create database $db vgroups 1; @@ -88,6 +82,8 @@ endw sql flush database $db +print ===========================> TD-22077 && TD-21877 + sql insert into t1 values('2018-09-17 09:00:26', 26); sql insert into t2 values('2018-09-17 09:00:25', 25); @@ -97,4 +93,33 @@ sql flush database reg_db0; sql delete from st1 where ts<='2018-9-17 09:00:26'; sql select * from st1; +sql drop table t1 +sql drop table t2 + +print =========================================>TD-22196 +sql create table t1 using st1 tags(1); + +$i = 0 +$ts = 1674977959000 +$rowNum = 200 + +$x = 0 +while $x < $rowNum +$xs = $x * $delta +$ts = $ts0 + $xs +sql insert into t1 values ( $ts , $x ) +$x = $x + 1 +$ts = $ts + 1000 +endw + +sql flush database $db +sql select min(c),max(c) from t1 +if $data00 != 0 then + return -1 +endi + +if $data01 != 199 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/query/forceFill.sim b/tests/script/tsim/query/forceFill.sim new file mode 100644 index 0000000000..37eb85baaa --- /dev/null +++ b/tests/script/tsim/query/forceFill.sim @@ -0,0 +1,367 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sql connect + +sql drop database if exists db1; +sql create database db1 vgroups 10; +sql use db1; +sql create stable sta (ts timestamp, f1 double, f2 binary(200)) tags(t1 int); +sql create table tba1 using sta tags(1); +sql insert into tba1 values ('2022-04-26 15:15:01', 1.0, "a"); +sql insert into tba1 values ('2022-04-26 15:15:02', 2.0, "b"); +sql insert into tba1 values ('2022-04-26 15:15:04', 4.0, "b"); +sql insert into tba1 values ('2022-04-26 15:15:05', 5.0, "b"); + +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(value_f, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(value, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(null); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(null_f); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(value, 8.8); +if $rows != 0 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(value_f, 8.8); +if $rows != 5 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 8.800000000 then + return -1 +endi +if $data20 != 8.800000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(null); +if $rows != 0 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(null_f); +if $rows != 5 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != NULL then + return -1 +endi +if $data20 != NULL then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != NULL then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:16:00' and ts <= '2022-04-26 19:15:59' interval(1s) fill(value_f, 8.8); +if $rows != 14400 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:16:00' and ts <= '2022-04-26 19:15:59' interval(1s) fill(null_f); +if $rows != 14400 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(value_f, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(value, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(null); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(null_f); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(value, 8.8); +if $rows != 5 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 8.800000000 then + return -1 +endi +if $data20 != 8.800000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(value_f, 8.8); +if $rows != 5 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 8.800000000 then + return -1 +endi +if $data20 != 8.800000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(null); +if $rows != 5 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != NULL then + return -1 +endi +if $data20 != NULL then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(null_f); +if $rows != 5 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != NULL then + return -1 +endi +if $data20 != NULL then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:16:00','2022-04-26 19:15:59') every(1s) fill(value_f, 8.8); +if $rows != 14400 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:16:00','2022-04-26 19:15:59') every(1s) fill(null_f); +if $rows != 14400 then + return -1 +endi +if $data00 != NULL then + return -1 +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/drop_stream.sim b/tests/script/tsim/stream/drop_stream.sim index 1a474bd9ae..7ff9632a3e 100644 --- a/tests/script/tsim/stream/drop_stream.sim +++ b/tests/script/tsim/stream/drop_stream.sim @@ -55,62 +55,62 @@ sql create stream stb_asin_stream trigger at_once into output_asin_stb as select sql create stream ctb_asin_stream trigger at_once into output_asin_ctb as select ts, asin(c1), asin(c2), c3 from scalar_ct1; sql create stream tb_asin_stream trigger at_once into output_asin_tb as select ts, asin(c1), asin(c2), c3 from scalar_tb; sql create stream stb_atan_stream trigger at_once into output_atan_stb as select ts, atan(c1), atan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; -sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; -sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; -sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; -sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; -sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; -sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; -sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; -sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; -sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; -sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; -sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; -sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; -sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; -sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; -sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; -sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; -sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; -sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; -sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; -sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; -sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; -sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; -sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; -sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; -sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; -sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; -sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; -sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; -sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; -sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; -sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; -sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; -sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; -sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; -sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; -sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; -sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; -sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; -sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; -sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; +# sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; +# sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; +# sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; +# sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; +# sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; +# sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; +# sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; +# sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; +# sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; +# sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; +# sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; +# sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; +# sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; +# sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; +# sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; +# sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; +# sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; +# sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; +# sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; +# sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; +# sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; +# sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; +# sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; +# sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; +# sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; +# sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; +# sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; +# sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; +# sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; +# sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; +# sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; +# sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; +# sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; +# sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; +# sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; +# sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; +# sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; +# sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; +# sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; sql insert into scalar_ct1 values (1656668180503, 100, 100.1, "beijing", "taos", "Taos"); sql insert into scalar_ct1 values (1656668180503+1s, -50, -50.1, "tianjin", "taosdata", "Taosdata"); sql insert into scalar_ct1 values (1656668180503+2s, 0, Null, "hebei", "TDengine", Null); @@ -146,62 +146,62 @@ sql create stream stb_asin_stream trigger at_once into output_asin_stb as select sql create stream ctb_asin_stream trigger at_once into output_asin_ctb as select ts, asin(c1), asin(c2), c3 from scalar_ct1; sql create stream tb_asin_stream trigger at_once into output_asin_tb as select ts, asin(c1), asin(c2), c3 from scalar_tb; sql create stream stb_atan_stream trigger at_once into output_atan_stb as select ts, atan(c1), atan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; -sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; -sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; -sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; -sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; -sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; -sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; -sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; -sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; -sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; -sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; -sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; -sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; -sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; -sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; -sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; -sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; -sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; -sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; -sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; -sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; -sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; -sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; -sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; -sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; -sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; -sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; -sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; -sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; -sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; -sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; -sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; -sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; -sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; -sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; -sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; -sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; -sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; -sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; -sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; -sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; +# sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; +# sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; +# sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; +# sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; +# sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; +# sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; +# sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; +# sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; +# sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; +# sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; +# sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; +# sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; +# sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; +# sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; +# sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; +# sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; +# sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; +# sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; +# sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; +# sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; +# sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; +# sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; +# sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; +# sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; +# sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; +# sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; +# sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; +# sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; +# sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; +# sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; +# sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; +# sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; +# sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; +# sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; +# sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; +# sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; +# sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; +# sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; +# sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; sql insert into scalar_ct1 values (1656668180503, 100, 100.1, "beijing", "taos", "Taos"); sql insert into scalar_ct1 values (1656668180503+1s, -50, -50.1, "tianjin", "taosdata", "Taosdata"); sql insert into scalar_ct1 values (1656668180503+2s, 0, Null, "hebei", "TDengine", Null); @@ -273,4 +273,4 @@ print ========== step7 system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT -system sh/exec.sh -n dnode4 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode4 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/fillIntervalValue.sim b/tests/script/tsim/stream/fillIntervalValue.sim index fe4ec759eb..2cd419397f 100644 --- a/tests/script/tsim/stream/fillIntervalValue.sim +++ b/tests/script/tsim/stream/fillIntervalValue.sim @@ -14,6 +14,7 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));; sql create stream streams1 trigger at_once into streamt as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(value, 100); +sql create stream streams1a trigger at_once into streamta as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(value_f, 100); sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa'); sleep 100 sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa'); @@ -77,6 +78,69 @@ if $data71 != 1 then goto loop0 endi + +print "force fill vaule" + +$loop_count = 0 + +loop0a: +sleep 200 +sql select * from streamta order by ts; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 8 then + print =====rows=$rows + goto loop0a +endi + +if $data01 != 1 then + print =====data01=$data01 + goto loop0a +endi + +if $data11 != 1 then + print =====data11=$data11 + goto loop0a +endi + +if $data21 != 1 then + print =====data21=$data21 + goto loop0a +endi + +if $data31 != 100 then + print =====data31=$data31 + goto loop0a +endi + +if $data41 != 1 then + print =====data41=$data41 + goto loop0a +endi + +if $data51 != 100 then + print =====data01=$data01 + goto loop0a +endi + +if $data61 != 100 then + print =====data61=$data61 + goto loop0a +endi + +if $data71 != 1 then + print =====data71=$data71 + goto loop0a +endi + + + + + sql drop stream if exists streams2; sql drop database if exists test2; sql create database test2 vgroups 1; @@ -408,6 +472,7 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams4 trigger at_once into streamt4 as select _wstart ts, count(*) c1, concat(tbname, 'aaa') as pname, timezone() from st where ts > 1648791000000 and ts < 1648793000000 partition by tbname interval(10s) fill(NULL); +sql create stream streams4a trigger at_once into streamt4a as select _wstart ts, count(*) c1, concat(tbname, 'aaa') as pname, timezone() from st where ts > 1648791000000 and ts < 1648793000000 partition by tbname interval(10s) fill(NULL_F); sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa'); sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa'); sql insert into t1 values(1648791273000,1,2,3,1.0,'aaa'); @@ -512,32 +577,104 @@ if $data[12][3] == NULL then goto loop4 endi +print "force fill null" +$loop_count = 0 +loop4a: +sleep 200 +sql select * from streamt4a order by pname, ts; +print ===> $data[0][0] , $data[0][1] , $data[0][2] , $data[0][3] +print ===> $data[1][0] , $data[1][1] , $data[1][2] , $data[1][3] +print ===> $data[2][0] , $data[2][1] , $data[2][2] , $data[2][3] +print ===> $data[3][0] , $data[3][1] , $data[3][2] , $data[3][3] +print ===> $data[4][0] , $data[4][1] , $data[4][2] , $data[4][3] +print ===> $data[5][0] , $data[5][1] , $data[5][2] , $data[5][3] +print ===> $data[6][0] , $data[6][1] , $data[6][2] , $data[6][3] +print ===> $data[7][0] , $data[7][1] , $data[7][2] , $data[7][3] +print ===> $data[8][0] , $data[8][1] , $data[8][2] , $data[8][3] +print ===> $data[9][0] , $data[9][1] , $data[9][2] , $data[9][3] +print ===> $data[10][0] , $data[10][1] , $data[10][2] , $data[10][3] +print ===> $data[11][0] , $data[11][1] , $data[11][2] , $data[11][3] +print ===> $data[12][0] , $data[12][1] , $data[12][2] , $data[12][3] +print ===> $data[13][0] , $data[13][1] , $data[13][2] , $data[13][3] +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi +if $rows != 14 then + print =====rows=$rows + goto loop4a +endi +if $data11 != NULL then + print =====data11=$data11 + goto loop4a +endi +if $data12 != t1aaa then + print =====data12=$data12 + goto loop4a +endi +if $data13 == NULL then + print =====data13=$data13 + goto loop4a +endi +if $data32 != t1aaa then + print =====data32=$data32 + goto loop4a +endi +if $data42 != t1aaa then + print =====data42=$data42 + goto loop4a +endi +if $data52 != t1aaa then + print =====data52=$data52 + goto loop4a +endi +if $data81 != NULL then + print =====data81=$data81 + goto loop4a +endi +if $data82 != t2aaa then + print =====data82=$data82 + goto loop4a +endi +if $data83 == NULL then + print =====data83=$data83 + goto loop4a +endi +if $data[10][2] != t2aaa then + print =====data[10][2]=$data[10][2] + goto loop4a +endi +if $data[11][2] != t2aaa then + print =====data[11][2]=$data[11][2] + goto loop4a +endi +if $data[12][2] != t2aaa then + print =====data[12][2]=$data[12][2] + goto loop4a +endi - - - - - - - +if $data[12][3] == NULL then + print =====data[12][3]=$data[12][3] + goto loop4a +endi @@ -584,4 +721,4 @@ print ============loop_all=$loop_all system sh/stop_dnodes.sh -#goto looptest \ No newline at end of file +#goto looptest diff --git a/tests/system-test/2-query/case_when.py b/tests/system-test/2-query/case_when.py index cfe0399553..eebbcc3fa3 100755 --- a/tests/system-test/2-query/case_when.py +++ b/tests/system-test/2-query/case_when.py @@ -111,6 +111,17 @@ class TDTestCase: sql2 = "select (case when sum(q_smallint)=0 then null else sum(q_smallint) end) from %s.stable_1_1 limit 100;" %database self.constant_check(database,sql1,sql2,0) + #TD-20257 + sql1 = "select tbname,first(ts),q_int,q_smallint,q_bigint,case when q_int <0 then 1 else 0 end from %s.stable_1 where tbname = 'stable_1_1' and ts < now partition by tbname state_window(case when q_int <0 then 1 else 0 end);" %database + sql2 = "select tbname,first(ts),q_int,q_smallint,q_bigint,case when q_int <0 then 1 else 0 end from %s.stable_1_1 where ts < now partition by tbname state_window(case when q_int <0 then 1 else 0 end);" %database + self.constant_check(database,sql1,sql2,0) + self.constant_check(database,sql1,sql2,1) + self.constant_check(database,sql1,sql2,2) + self.constant_check(database,sql1,sql2,3) + self.constant_check(database,sql1,sql2,4) + self.constant_check(database,sql1,sql2,5) + + #TD-20260 sql1 = "select _wstart,avg(q_int),min(q_smallint) from %s.stable_1 where tbname = 'stable_1_1' and ts < now state_window(case when q_smallint <0 then 1 else 0 end);" %database sql2 = "select _wstart,avg(q_int),min(q_smallint) from %s.stable_1_1 where ts < now state_window(case when q_smallint <0 then 1 else 0 end);" %database self.constant_check(database,sql1,sql2,0) diff --git a/tests/system-test/2-query/max_min_data.py b/tests/system-test/2-query/max_min_data.py new file mode 100755 index 0000000000..e3dff5da78 --- /dev/null +++ b/tests/system-test/2-query/max_min_data.py @@ -0,0 +1,159 @@ +################################################################### +# 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': 131 ,"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 = "max_min" + + def dropandcreateDB_random(self,database,n): + ts = 1630000000000 + num_random = 5 + 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) + + for i in range(num_random): + 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.query("select count(*) from %s.stable_1;" %database) + tdSql.checkData(0,0,num_random*n) + tdSql.query("select count(*) from %s.stable_1_1;"%database) + tdSql.checkData(0,0,n) + + + def TD_22219_max(self,database): + + sql3 = "select count(*) from (select max(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + sql1 = "select max(q_int) from %s.stable_1_1 ;" %database + sql2 = "select max(q_int) from %s.stable_1 where tbname = 'stable_1_1' ;" %database + self.constant_check(database,sql1,sql2,0) + + sql3 = "select count(*) from (select max(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + def TD_22219_min(self,database): + + sql3 = "select count(*) from (select min(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + sql1 = "select min(q_int) from %s.stable_1_1 ;" %database + sql2 = "select min(q_int) from %s.stable_1 where tbname = 'stable_1_1' ;" %database + self.constant_check(database,sql1,sql2,0) + + sql3 = "select count(*) from (select min(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + def constant_check(self,database,sql1,sql2,column): + #column =0 代表0列, column = n代表n-1列 + tdLog.info("\n=============sql1:(%s)___sql2:(%s) ====================\n" %(sql1,sql2)) + + tdSql.query(sql1) + sql1_value = tdSql.getData(0,column) + tdSql.query(sql2) + sql2_value = tdSql.getData(0,column) + self.value_check(sql1_value,sql2_value) + + tdSql.execute(" flush database %s;" %database) + + time.sleep(3) + + tdSql.query(sql1) + sql1_flush_value = tdSql.getData(0,column) + tdSql.query(sql2) + sql2_flush_value = tdSql.getData(0,column) + self.value_check(sql1_flush_value,sql2_flush_value) + + self.value_check(sql1_value,sql1_flush_value) + self.value_check(sql2_value,sql2_flush_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}") + 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, 2000) + + self.TD_22219_max("%s" %self.db) + + self.dropandcreateDB_random("%s" %self.db, 2000) + + self.TD_22219_min("%s" %self.db) + + 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())