TDengine/source/libs/parser/src/sql.c

7659 lines
366 KiB
C
Raw Normal View History

/* This file is automatically generated by Lemon from input grammar
** source file "sql.y". */
/*
** 2000-05-29
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser. The "lemon" program inserts text
** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar. Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
/************ Begin %include sections from the grammar ************************/
#line 11 "sql.y"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdbool.h>
2022-06-01 06:39:40 +00:00
#define ALLOW_FORBID_FUNC
#include "functionMgt.h"
#include "nodes.h"
2022-03-10 07:36:06 +00:00
#include "parToken.h"
#include "ttokendef.h"
2022-03-10 07:36:06 +00:00
#include "parAst.h"
2022-06-01 06:39:40 +00:00
#define YYSTACKDEPTH 0
#line 46 "sql.c"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols.
***************** Begin token definitions *************************************/
#ifndef TK_OR
#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_WITH 48
#define TK_DNODE 49
#define TK_PORT 50
#define TK_DNODES 51
#define TK_RESTORE 52
#define TK_NK_IPTOKEN 53
#define TK_FORCE 54
#define TK_UNSAFE 55
#define TK_LOCAL 56
#define TK_QNODE 57
#define TK_BNODE 58
#define TK_SNODE 59
#define TK_MNODE 60
#define TK_VNODE 61
#define TK_DATABASE 62
#define TK_USE 63
#define TK_FLUSH 64
#define TK_TRIM 65
#define TK_COMPACT 66
#define TK_IF 67
#define TK_NOT 68
#define TK_EXISTS 69
#define TK_BUFFER 70
#define TK_CACHEMODEL 71
#define TK_CACHESIZE 72
#define TK_COMP 73
#define TK_DURATION 74
#define TK_NK_VARIABLE 75
#define TK_MAXROWS 76
#define TK_MINROWS 77
#define TK_KEEP 78
#define TK_PAGES 79
#define TK_PAGESIZE 80
#define TK_TSDB_PAGESIZE 81
#define TK_PRECISION 82
#define TK_REPLICA 83
#define TK_VGROUPS 84
#define TK_SINGLE_STABLE 85
#define TK_RETENTIONS 86
#define TK_SCHEMALESS 87
#define TK_WAL_LEVEL 88
#define TK_WAL_FSYNC_PERIOD 89
#define TK_WAL_RETENTION_PERIOD 90
#define TK_WAL_RETENTION_SIZE 91
#define TK_WAL_ROLL_PERIOD 92
#define TK_WAL_SEGMENT_SIZE 93
#define TK_STT_TRIGGER 94
#define TK_TABLE_PREFIX 95
#define TK_TABLE_SUFFIX 96
#define TK_NK_COLON 97
#define TK_MAX_SPEED 98
#define TK_START 99
#define TK_TIMESTAMP 100
#define TK_END 101
#define TK_TABLE 102
#define TK_NK_LP 103
#define TK_NK_RP 104
#define TK_STABLE 105
#define TK_ADD 106
#define TK_COLUMN 107
#define TK_MODIFY 108
#define TK_RENAME 109
#define TK_TAG 110
#define TK_SET 111
#define TK_NK_EQ 112
#define TK_USING 113
#define TK_TAGS 114
#define TK_BOOL 115
#define TK_TINYINT 116
#define TK_SMALLINT 117
#define TK_INT 118
#define TK_INTEGER 119
#define TK_BIGINT 120
#define TK_FLOAT 121
#define TK_DOUBLE 122
#define TK_BINARY 123
#define TK_NCHAR 124
#define TK_UNSIGNED 125
#define TK_JSON 126
#define TK_VARCHAR 127
#define TK_MEDIUMBLOB 128
#define TK_BLOB 129
#define TK_VARBINARY 130
#define TK_GEOMETRY 131
#define TK_DECIMAL 132
#define TK_COMMENT 133
#define TK_MAX_DELAY 134
#define TK_WATERMARK 135
#define TK_ROLLUP 136
#define TK_TTL 137
#define TK_SMA 138
#define TK_DELETE_MARK 139
#define TK_FIRST 140
#define TK_LAST 141
#define TK_SHOW 142
#define TK_PRIVILEGES 143
#define TK_DATABASES 144
#define TK_TABLES 145
#define TK_STABLES 146
#define TK_MNODES 147
#define TK_QNODES 148
#define TK_FUNCTIONS 149
#define TK_INDEXES 150
#define TK_ACCOUNTS 151
#define TK_APPS 152
#define TK_CONNECTIONS 153
#define TK_LICENCES 154
#define TK_GRANTS 155
#define TK_QUERIES 156
#define TK_SCORES 157
#define TK_TOPICS 158
#define TK_VARIABLES 159
#define TK_CLUSTER 160
#define TK_BNODES 161
#define TK_SNODES 162
#define TK_TRANSACTIONS 163
#define TK_DISTRIBUTED 164
#define TK_CONSUMERS 165
#define TK_SUBSCRIPTIONS 166
#define TK_VNODES 167
#define TK_ALIVE 168
#define TK_LIKE 169
#define TK_TBNAME 170
#define TK_QTAGS 171
#define TK_AS 172
#define TK_INDEX 173
#define TK_FUNCTION 174
#define TK_INTERVAL 175
#define TK_COUNT 176
#define TK_LAST_ROW 177
#define TK_META 178
#define TK_ONLY 179
#define TK_TOPIC 180
#define TK_CONSUMER 181
#define TK_GROUP 182
#define TK_DESC 183
#define TK_DESCRIBE 184
#define TK_RESET 185
#define TK_QUERY 186
#define TK_CACHE 187
#define TK_EXPLAIN 188
#define TK_ANALYZE 189
#define TK_VERBOSE 190
#define TK_NK_BOOL 191
#define TK_RATIO 192
#define TK_NK_FLOAT 193
#define TK_OUTPUTTYPE 194
#define TK_AGGREGATE 195
#define TK_BUFSIZE 196
#define TK_LANGUAGE 197
#define TK_REPLACE 198
#define TK_STREAM 199
#define TK_INTO 200
#define TK_PAUSE 201
#define TK_RESUME 202
#define TK_TRIGGER 203
#define TK_AT_ONCE 204
#define TK_WINDOW_CLOSE 205
#define TK_IGNORE 206
#define TK_EXPIRED 207
#define TK_FILL_HISTORY 208
#define TK_UPDATE 209
#define TK_SUBTABLE 210
#define TK_UNTREATED 211
#define TK_KILL 212
#define TK_CONNECTION 213
#define TK_TRANSACTION 214
#define TK_BALANCE 215
#define TK_VGROUP 216
#define TK_LEADER 217
#define TK_MERGE 218
#define TK_REDISTRIBUTE 219
#define TK_SPLIT 220
#define TK_DELETE 221
#define TK_INSERT 222
#define TK_NULL 223
#define TK_NK_QUESTION 224
#define TK_NK_ARROW 225
#define TK_ROWTS 226
#define TK_QSTART 227
#define TK_QEND 228
#define TK_QDURATION 229
#define TK_WSTART 230
#define TK_WEND 231
#define TK_WDURATION 232
#define TK_IROWTS 233
#define TK_ISFILLED 234
#define TK_CAST 235
#define TK_NOW 236
#define TK_TODAY 237
#define TK_TIMEZONE 238
#define TK_CLIENT_VERSION 239
#define TK_SERVER_VERSION 240
#define TK_SERVER_STATUS 241
#define TK_CURRENT_USER 242
#define TK_CASE 243
#define TK_WHEN 244
#define TK_THEN 245
#define TK_ELSE 246
#define TK_BETWEEN 247
#define TK_IS 248
#define TK_NK_LT 249
#define TK_NK_GT 250
#define TK_NK_LE 251
#define TK_NK_GE 252
#define TK_NK_NE 253
#define TK_MATCH 254
#define TK_NMATCH 255
#define TK_CONTAINS 256
#define TK_IN 257
#define TK_JOIN 258
#define TK_INNER 259
#define TK_SELECT 260
#define TK_DISTINCT 261
#define TK_WHERE 262
#define TK_PARTITION 263
#define TK_BY 264
#define TK_SESSION 265
#define TK_STATE_WINDOW 266
#define TK_EVENT_WINDOW 267
#define TK_SLIDING 268
#define TK_FILL 269
#define TK_VALUE 270
#define TK_VALUE_F 271
#define TK_NONE 272
#define TK_PREV 273
#define TK_NULL_F 274
#define TK_LINEAR 275
#define TK_NEXT 276
#define TK_HAVING 277
#define TK_RANGE 278
#define TK_EVERY 279
#define TK_ORDER 280
#define TK_SLIMIT 281
#define TK_SOFFSET 282
#define TK_LIMIT 283
#define TK_OFFSET 284
#define TK_ASC 285
#define TK_NULLS 286
#define TK_ABORT 287
#define TK_AFTER 288
#define TK_ATTACH 289
#define TK_BEFORE 290
#define TK_BEGIN 291
#define TK_BITAND 292
#define TK_BITNOT 293
#define TK_BITOR 294
#define TK_BLOCKS 295
#define TK_CHANGE 296
#define TK_COMMA 297
#define TK_CONCAT 298
#define TK_CONFLICT 299
#define TK_COPY 300
#define TK_DEFERRED 301
#define TK_DELIMITERS 302
#define TK_DETACH 303
#define TK_DIVIDE 304
#define TK_DOT 305
#define TK_EACH 306
#define TK_FAIL 307
#define TK_FILE 308
#define TK_FOR 309
#define TK_GLOB 310
#define TK_ID 311
#define TK_IMMEDIATE 312
#define TK_IMPORT 313
#define TK_INITIALLY 314
#define TK_INSTEAD 315
#define TK_ISNULL 316
#define TK_KEY 317
#define TK_MODULES 318
#define TK_NK_BITNOT 319
#define TK_NK_SEMI 320
#define TK_NOTNULL 321
#define TK_OF 322
#define TK_PLUS 323
#define TK_PRIVILEGE 324
#define TK_RAISE 325
#define TK_RESTRICT 326
#define TK_ROW 327
#define TK_SEMI 328
#define TK_STAR 329
#define TK_STATEMENT 330
#define TK_STRICT 331
#define TK_STRING 332
#define TK_TIMES 333
#define TK_VALUES 334
#define TK_VARIABLE 335
#define TK_VIEW 336
#define TK_WAL 337
#endif
/**************** End token definitions ***************************************/
/* The next sections is a series of control #defines.
** various aspects of the generated parser.
** YYCODETYPE is the data type used to store the integer codes
** that represent terminal and non-terminal symbols.
** "unsigned char" is used if there are fewer than
** 256 symbols. Larger types otherwise.
** YYNOCODE is a number of type YYCODETYPE that is not used for
** any terminal or nonterminal symbol.
** YYFALLBACK If defined, this indicates that one or more tokens
** (also known as: "terminal symbols") have fall-back
** values which should be used if the original symbol
** would not parse. This permits keywords to sometimes
** be used as identifiers, for example.
** YYACTIONTYPE is the data type used for "action codes" - numbers
** that indicate what to do in response to the next
** token.
2022-03-10 07:36:06 +00:00
** ParseTOKENTYPE is the data type used for minor type for terminal
** symbols. Background: A "minor type" is a semantic
** value associated with a terminal or non-terminal
** symbols. For example, for an "ID" terminal symbol,
** the minor type might be the name of the identifier.
** Each non-terminal can have a different minor type.
** Terminal symbols all have the same minor type, though.
** This macros defines the minor type for terminal
** symbols.
** YYMINORTYPE is the data type used for all minor types.
** This is typically a union of many types, one of
2022-03-10 07:36:06 +00:00
** which is ParseTOKENTYPE. The entry in the union
** for terminal symbols is called "yy0".
** YYSTACKDEPTH is the maximum depth of the parser's stack. If
2022-03-28 09:08:48 +00:00
** zero the stack is dynamically sized using realloc()
2022-03-10 07:36:06 +00:00
** ParseARG_SDECL A static variable declaration for the %extra_argument
** ParseARG_PDECL A parameter declaration for the %extra_argument
** ParseARG_PARAM Code to pass %extra_argument as a subroutine parameter
** ParseARG_STORE Code to store %extra_argument into yypParser
** ParseARG_FETCH Code to extract %extra_argument from yypParser
** ParseCTX_* As ParseARG_ except for %extra_context
** YYERRORSYMBOL is the code number of the error symbol. If not
** defined, then do no error processing.
** YYNSTATE the combined number of states.
** YYNRULE the number of rules in the grammar
** YYNTOKEN Number of terminal symbols
** YY_MAX_SHIFT Maximum value for shift actions
** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
** YY_ERROR_ACTION The yy_action[] code for syntax error
** YY_ACCEPT_ACTION The yy_action[] code for accept
** YY_NO_ACTION The yy_action[] code for no-op
** YY_MIN_REDUCE Minimum value for reduce actions
** YY_MAX_REDUCE Maximum value for reduce actions
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
2022-03-21 06:00:30 +00:00
#define YYCODETYPE unsigned short int
2023-06-30 11:36:39 +00:00
#define YYNOCODE 487
#define YYACTIONTYPE unsigned short int
2022-03-10 07:36:06 +00:00
#define ParseTOKENTYPE SToken
typedef union {
int yyinit;
2022-03-10 07:36:06 +00:00
ParseTOKENTYPE yy0;
2023-06-30 11:36:39 +00:00
EJoinType yy140;
SDataType yy310;
STokenPair yy347;
EOperatorType yy354;
SAlterOption yy365;
SToken yy371;
ENullOrder yy399;
int32_t yy416;
SNode* yy452;
int8_t yy475;
bool yy667;
EOrder yy690;
int64_t yy729;
SNodeList* yy812;
EFillMode yy844;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
2022-03-10 07:36:06 +00:00
#define ParseARG_SDECL SAstCreateContext* pCxt ;
#define ParseARG_PDECL , SAstCreateContext* pCxt
#define ParseARG_PARAM ,pCxt
#define ParseARG_FETCH SAstCreateContext* pCxt =yypParser->pCxt ;
#define ParseARG_STORE yypParser->pCxt =pCxt ;
#define ParseCTX_SDECL
#define ParseCTX_PDECL
#define ParseCTX_PARAM
#define ParseCTX_FETCH
#define ParseCTX_STORE
2022-04-22 10:23:37 +00:00
#define YYFALLBACK 1
#define YYNSTATE 802
#define YYNRULE 600
#define YYNRULE_WITH_ACTION 600
2023-06-30 08:57:29 +00:00
#define YYNTOKEN 338
#define YY_MAX_SHIFT 801
#define YY_MIN_SHIFTREDUCE 1182
#define YY_MAX_SHIFTREDUCE 1781
#define YY_ERROR_ACTION 1782
#define YY_ACCEPT_ACTION 1783
#define YY_NO_ACTION 1784
#define YY_MIN_REDUCE 1785
#define YY_MAX_REDUCE 2384
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage. For production
** code the yytestcase() macro should be turned off. But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif
/* Next are the tables used to determine what action to take based on the
** current state and lookahead token. These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.
**
** Suppose the action integer is N. Then the action is determined as
** follows
**
** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead
** token onto the stack and goto state N.
**
** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then
** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE.
**
** N == YY_ERROR_ACTION A syntax error has occurred.
**
** N == YY_ACCEPT_ACTION The parser accepts its input.
**
** N == YY_NO_ACTION No such action. Denotes unused
** slots in the yy_action[] table.
**
** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
** and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
** (A) N = yy_action[ yy_shift_ofst[S] + X ]
** (B) N = yy_default[S]
**
** The (A) formula is preferred. The B formula is used instead if
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.
**
** The following are the tables generated in this section:
**
** yy_action[] A single table containing all actions.
** yy_lookahead[] A table containing the lookahead for each entry in
** yy_action. Used to detect hash collisions.
** yy_shift_ofst[] For each state, the offset into yy_action for
** shifting terminals.
** yy_reduce_ofst[] For each state, the offset into yy_action for
** shifting non-terminals after a reduce.
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
2023-06-30 11:36:39 +00:00
#define YY_ACTTAB_COUNT (2858)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 2128, 2195, 2173, 2084, 221, 692, 1962, 2156, 539, 1951,
/* 10 */ 1828, 672, 48, 46, 1708, 394, 2181, 1215, 2081, 679,
/* 20 */ 401, 2360, 1557, 41, 40, 135, 2177, 47, 45, 44,
/* 30 */ 43, 42, 576, 1638, 453, 1555, 2173, 541, 1584, 2213,
/* 40 */ 41, 40, 1783, 538, 47, 45, 44, 43, 42, 254,
/* 50 */ 1953, 2163, 1947, 708, 632, 533, 1217, 2355, 1220, 1221,
/* 60 */ 2177, 181, 1633, 531, 2179, 398, 527, 523, 19, 1240,
/* 70 */ 66, 1239, 2361, 188, 702, 1563, 30, 2356, 658, 348,
/* 80 */ 691, 369, 2067, 361, 140, 692, 1962, 2194, 1582, 2230,
/* 90 */ 669, 144, 112, 2196, 712, 2198, 2199, 707, 2179, 702,
/* 100 */ 798, 168, 1241, 15, 185, 135, 2283, 103, 702, 1903,
/* 110 */ 397, 2279, 581, 499, 2084, 416, 48, 46, 692, 1962,
/* 120 */ 415, 691, 1771, 190, 401, 264, 1557, 1667, 1373, 2082,
/* 130 */ 679, 2309, 1955, 1582, 38, 306, 1748, 1638, 193, 1555,
/* 140 */ 1640, 1641, 1808, 1364, 737, 736, 735, 1368, 734, 1370,
/* 150 */ 1371, 733, 730, 1807, 1379, 727, 1381, 1382, 724, 721,
/* 160 */ 718, 184, 632, 51, 657, 2355, 1633, 2355, 94, 62,
/* 170 */ 1613, 1623, 19, 2002, 212, 211, 1639, 1642, 677, 1563,
/* 180 */ 2361, 188, 656, 188, 1668, 2356, 658, 2356, 658, 2298,
/* 190 */ 288, 1558, 2163, 1556, 286, 2291, 668, 498, 136, 667,
/* 200 */ 169, 2355, 1797, 2163, 798, 41, 40, 15, 2195, 47,
/* 210 */ 45, 44, 43, 42, 62, 2295, 656, 188, 709, 1317,
/* 220 */ 435, 2356, 658, 1561, 1562, 1785, 1612, 1615, 1616, 1617,
/* 230 */ 1618, 1619, 1620, 1621, 1622, 704, 700, 1631, 1632, 1634,
/* 240 */ 1635, 1636, 1637, 2, 1640, 1641, 2213, 437, 433, 134,
/* 250 */ 133, 132, 131, 130, 129, 128, 127, 126, 2163, 1319,
/* 260 */ 708, 1786, 37, 399, 1662, 1663, 1664, 1665, 1666, 1670,
/* 270 */ 1671, 1672, 1673, 536, 1613, 1623, 537, 1821, 553, 1582,
/* 280 */ 1639, 1642, 125, 1466, 1467, 124, 123, 122, 121, 120,
/* 290 */ 119, 118, 117, 116, 2194, 1558, 2230, 1556, 647, 112,
/* 300 */ 2196, 712, 2198, 2199, 707, 652, 702, 2046, 395, 147,
/* 310 */ 1582, 151, 2254, 2283, 1583, 2195, 166, 397, 2279, 1240,
/* 320 */ 191, 1239, 669, 144, 1964, 672, 191, 1561, 1562, 1705,
/* 330 */ 1612, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 704,
/* 340 */ 700, 1631, 1632, 1634, 1635, 1636, 1637, 2, 12, 48,
/* 350 */ 46, 747, 1241, 2213, 2015, 410, 409, 401, 2184, 1557,
/* 360 */ 2360, 367, 62, 2355, 181, 2163, 1584, 708, 617, 2013,
/* 370 */ 1638, 191, 1555, 594, 593, 592, 692, 1962, 1564, 2359,
/* 380 */ 584, 141, 588, 2356, 2358, 2068, 587, 651, 653, 648,
/* 390 */ 641, 586, 591, 377, 376, 146, 56, 585, 2254, 1633,
/* 400 */ 252, 2194, 631, 2230, 251, 19, 112, 2196, 712, 2198,
/* 410 */ 2199, 707, 1563, 702, 2186, 2213, 297, 298, 185, 544,
/* 420 */ 2283, 296, 537, 1821, 397, 2279, 187, 2291, 2292, 2195,
/* 430 */ 142, 2296, 1223, 657, 1408, 1409, 2355, 798, 1581, 709,
/* 440 */ 15, 1830, 41, 40, 1274, 2310, 47, 45, 44, 43,
/* 450 */ 42, 656, 188, 48, 46, 1643, 2356, 658, 223, 2195,
/* 460 */ 1614, 401, 539, 1557, 1828, 93, 477, 2213, 356, 709,
/* 470 */ 650, 381, 166, 610, 1638, 476, 1555, 1640, 1641, 2163,
/* 480 */ 1965, 708, 2360, 125, 1275, 2355, 124, 123, 122, 121,
/* 490 */ 120, 119, 118, 117, 116, 2015, 62, 2213, 1806, 669,
/* 500 */ 144, 2359, 382, 1633, 12, 2356, 2357, 1613, 1623, 2163,
/* 510 */ 2013, 708, 109, 1639, 1642, 2194, 1563, 2230, 288, 191,
/* 520 */ 112, 2196, 712, 2198, 2199, 707, 60, 702, 1558, 145,
/* 530 */ 1556, 580, 2375, 629, 2283, 579, 1567, 1954, 397, 2279,
/* 540 */ 1712, 798, 692, 1962, 49, 2194, 1582, 2230, 2163, 2195,
/* 550 */ 170, 2196, 712, 2198, 2199, 707, 12, 702, 10, 709,
/* 560 */ 1561, 1562, 451, 1612, 1615, 1616, 1617, 1618, 1619, 1620,
/* 570 */ 1621, 1622, 704, 700, 1631, 1632, 1634, 1635, 1636, 1637,
/* 580 */ 2, 1640, 1641, 445, 1328, 444, 1704, 2213, 41, 40,
/* 590 */ 633, 2320, 47, 45, 44, 43, 42, 1327, 2298, 2163,
/* 600 */ 1585, 708, 671, 186, 2291, 2292, 165, 142, 2296, 1563,
/* 610 */ 1805, 1613, 1623, 692, 1962, 443, 406, 1639, 1642, 2008,
/* 620 */ 2010, 41, 40, 404, 2294, 47, 45, 44, 43, 42,
/* 630 */ 2298, 163, 1558, 452, 1556, 2194, 678, 2230, 383, 1964,
/* 640 */ 112, 2196, 712, 2198, 2199, 707, 2013, 702, 253, 691,
/* 650 */ 447, 2195, 2258, 191, 2283, 446, 2293, 2157, 397, 2279,
/* 660 */ 2163, 709, 508, 2317, 1561, 1562, 154, 1612, 1615, 1616,
/* 670 */ 1617, 1618, 1619, 1620, 1621, 1622, 704, 700, 1631, 1632,
/* 680 */ 1634, 1635, 1636, 1637, 2, 48, 46, 1939, 551, 2213,
/* 690 */ 2077, 459, 2063, 401, 757, 1557, 1614, 632, 669, 144,
/* 700 */ 2355, 2163, 2015, 708, 632, 1938, 1638, 2355, 1555, 391,
/* 710 */ 47, 45, 44, 43, 42, 2361, 188, 2013, 1528, 1529,
/* 720 */ 2356, 658, 2361, 188, 465, 2063, 55, 2356, 658, 14,
/* 730 */ 13, 1736, 51, 692, 1962, 1633, 1949, 2194, 202, 2230,
/* 740 */ 599, 678, 112, 2196, 712, 2198, 2199, 707, 1563, 702,
/* 750 */ 692, 1962, 266, 467, 2375, 609, 2283, 1864, 41, 40,
/* 760 */ 397, 2279, 47, 45, 44, 43, 42, 2195, 1804, 250,
/* 770 */ 482, 205, 747, 798, 692, 1962, 49, 706, 644, 643,
/* 780 */ 1734, 1735, 1737, 1738, 1739, 602, 492, 2063, 2359, 48,
/* 790 */ 46, 1937, 596, 676, 483, 2077, 1778, 401, 249, 1557,
/* 800 */ 404, 1583, 189, 2291, 2292, 2213, 142, 2296, 166, 694,
/* 810 */ 1638, 2255, 1555, 1640, 1641, 1848, 1964, 2163, 2163, 708,
/* 820 */ 745, 156, 155, 742, 741, 740, 153, 594, 593, 592,
/* 830 */ 2009, 2010, 1681, 210, 584, 141, 588, 595, 70, 1633,
/* 840 */ 587, 69, 52, 1613, 1623, 586, 591, 377, 376, 1639,
/* 850 */ 1642, 585, 1563, 2194, 1747, 2230, 1243, 1244, 342, 2196,
/* 860 */ 712, 2198, 2199, 707, 1558, 702, 1556, 2249, 41, 40,
/* 870 */ 1803, 1945, 47, 45, 44, 43, 42, 798, 572, 571,
/* 880 */ 15, 2195, 745, 156, 155, 742, 741, 740, 153, 1802,
/* 890 */ 615, 709, 207, 2330, 1801, 1966, 1561, 1562, 1777, 1612,
/* 900 */ 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 704, 700,
/* 910 */ 1631, 1632, 1634, 1635, 1636, 1637, 2, 1640, 1641, 2213,
/* 920 */ 2163, 1483, 1484, 608, 745, 156, 155, 742, 741, 740,
/* 930 */ 153, 2163, 86, 708, 2015, 85, 606, 632, 604, 2163,
/* 940 */ 2355, 396, 692, 1962, 2163, 692, 1962, 1613, 1623, 2013,
/* 950 */ 738, 692, 1962, 1639, 1642, 2361, 188, 1482, 1485, 259,
/* 960 */ 2356, 658, 552, 739, 1724, 1959, 2006, 2194, 1558, 2230,
/* 970 */ 1556, 255, 112, 2196, 712, 2198, 2199, 707, 9, 702,
/* 980 */ 590, 589, 34, 2149, 2375, 1332, 2283, 678, 41, 40,
/* 990 */ 397, 2279, 47, 45, 44, 43, 42, 1800, 1331, 191,
/* 1000 */ 1561, 1562, 1861, 1612, 1615, 1616, 1617, 1618, 1619, 1620,
/* 1010 */ 1621, 1622, 704, 700, 1631, 1632, 1634, 1635, 1636, 1637,
/* 1020 */ 2, 1648, 352, 167, 1580, 692, 1962, 1582, 327, 692,
/* 1030 */ 1962, 490, 423, 90, 506, 574, 573, 505, 2173, 687,
/* 1040 */ 407, 2077, 324, 73, 2146, 263, 72, 2163, 166, 675,
/* 1050 */ 371, 2015, 2182, 473, 673, 507, 1964, 349, 405, 1957,
/* 1060 */ 475, 703, 2177, 510, 1799, 660, 2013, 1796, 219, 518,
/* 1070 */ 516, 513, 775, 774, 773, 772, 413, 1940, 771, 770,
/* 1080 */ 148, 765, 764, 763, 762, 761, 760, 759, 158, 755,
/* 1090 */ 754, 753, 412, 411, 750, 749, 748, 176, 175, 1585,
/* 1100 */ 2179, 632, 692, 1962, 2355, 1585, 370, 237, 62, 374,
/* 1110 */ 702, 44, 43, 42, 2163, 692, 1962, 2163, 461, 2361,
/* 1120 */ 188, 149, 301, 173, 2356, 658, 692, 1962, 262, 692,
/* 1130 */ 1962, 570, 566, 562, 558, 689, 236, 1795, 664, 696,
/* 1140 */ 1669, 2255, 769, 767, 1794, 1793, 690, 111, 503, 307,
/* 1150 */ 1792, 497, 496, 495, 494, 489, 488, 487, 486, 485,
/* 1160 */ 481, 480, 479, 478, 351, 470, 469, 468, 661, 463,
/* 1170 */ 462, 457, 692, 1962, 2303, 1701, 91, 1614, 375, 234,
/* 1180 */ 373, 372, 1839, 578, 90, 1791, 1790, 2163, 81, 80,
/* 1190 */ 450, 2195, 408, 200, 2163, 2163, 1789, 2015, 1701, 743,
/* 1200 */ 2163, 709, 2006, 639, 597, 580, 442, 440, 1788, 579,
/* 1210 */ 1958, 744, 2014, 320, 2006, 1904, 1992, 350, 35, 54,
/* 1220 */ 431, 3, 2195, 429, 425, 421, 418, 443, 1674, 2213,
/* 1230 */ 758, 454, 709, 1924, 2348, 2163, 2163, 1220, 1221, 154,
/* 1240 */ 83, 2163, 137, 708, 455, 74, 2163, 233, 227, 582,
/* 1250 */ 242, 203, 2195, 240, 232, 549, 244, 265, 2163, 243,
/* 1260 */ 2213, 430, 709, 246, 2302, 191, 245, 248, 154, 583,
/* 1270 */ 247, 1315, 2163, 225, 708, 1837, 50, 2194, 612, 2230,
/* 1280 */ 611, 50, 112, 2196, 712, 2198, 2199, 707, 699, 702,
/* 1290 */ 2213, 1313, 1780, 1781, 2375, 84, 2283, 600, 1798, 1523,
/* 1300 */ 397, 2279, 2163, 645, 708, 1566, 270, 154, 2194, 108,
/* 1310 */ 2230, 2323, 283, 112, 2196, 712, 2198, 2199, 707, 105,
/* 1320 */ 702, 50, 294, 1565, 1557, 2375, 71, 2283, 1526, 152,
/* 1330 */ 154, 397, 2279, 14, 13, 64, 1733, 1555, 2194, 50,
/* 1340 */ 2230, 1732, 2195, 112, 2196, 712, 2198, 2199, 707, 50,
/* 1350 */ 702, 1831, 709, 410, 409, 2375, 277, 2283, 36, 716,
/* 1360 */ 139, 397, 2279, 1571, 41, 40, 272, 674, 47, 45,
/* 1370 */ 44, 43, 42, 2195, 1638, 1902, 1564, 1563, 665, 152,
/* 1380 */ 2213, 1480, 299, 709, 154, 751, 684, 1901, 2214, 303,
/* 1390 */ 1358, 752, 2163, 138, 708, 1675, 384, 152, 2072, 1624,
/* 1400 */ 414, 793, 798, 1633, 1822, 1827, 662, 1293, 2003, 319,
/* 1410 */ 2195, 2213, 2313, 1291, 670, 285, 1563, 282, 422, 1386,
/* 1420 */ 709, 1, 417, 2163, 5, 708, 365, 1588, 2194, 438,
/* 1430 */ 2230, 1504, 196, 112, 2196, 712, 2198, 2199, 707, 1390,
/* 1440 */ 702, 698, 439, 1659, 1397, 2256, 441, 2283, 2213, 195,
/* 1450 */ 198, 397, 2279, 1395, 314, 1581, 458, 157, 209, 2194,
/* 1460 */ 2163, 2230, 708, 1569, 112, 2196, 712, 2198, 2199, 707,
/* 1470 */ 1585, 702, 464, 460, 471, 501, 695, 2073, 2283, 466,
/* 1480 */ 1580, 1568, 397, 2279, 484, 493, 491, 2065, 500, 502,
/* 1490 */ 511, 512, 509, 1558, 213, 1556, 2194, 214, 2230, 2195,
/* 1500 */ 514, 113, 2196, 712, 2198, 2199, 707, 515, 702, 709,
/* 1510 */ 1586, 216, 534, 517, 519, 2283, 4, 535, 542, 2282,
/* 1520 */ 2279, 543, 545, 1583, 224, 1561, 1562, 226, 1587, 546,
/* 1530 */ 547, 1589, 1572, 548, 1567, 229, 550, 2213, 231, 88,
/* 1540 */ 89, 554, 235, 575, 355, 577, 1952, 114, 2195, 2163,
/* 1550 */ 239, 708, 1948, 614, 616, 92, 150, 620, 709, 315,
/* 1560 */ 256, 621, 619, 2137, 1575, 1577, 241, 159, 160, 1950,
/* 1570 */ 258, 260, 1946, 161, 2195, 162, 2134, 700, 1631, 1632,
/* 1580 */ 1634, 1635, 1636, 1637, 706, 2194, 2213, 2230, 627, 1511,
/* 1590 */ 113, 2196, 712, 2198, 2199, 707, 2133, 702, 2163, 646,
/* 1600 */ 708, 624, 636, 8, 2283, 2314, 2329, 682, 697, 2279,
/* 1610 */ 642, 2324, 2213, 387, 626, 2328, 649, 625, 268, 271,
/* 1620 */ 2305, 655, 276, 637, 2163, 2195, 708, 634, 635, 281,
/* 1630 */ 2378, 388, 1701, 663, 710, 709, 2230, 666, 2195, 113,
/* 1640 */ 2196, 712, 2198, 2199, 707, 143, 702, 1584, 709, 289,
/* 1650 */ 178, 1590, 278, 2283, 2078, 316, 98, 360, 2279, 2299,
/* 1660 */ 2194, 317, 2230, 2213, 680, 342, 2196, 712, 2198, 2199,
/* 1670 */ 707, 705, 702, 693, 2248, 2163, 2213, 708, 681, 685,
/* 1680 */ 2092, 279, 174, 686, 2091, 280, 100, 2195, 2163, 318,
/* 1690 */ 708, 2090, 393, 102, 61, 2264, 104, 709, 2354, 1963,
/* 1700 */ 714, 2007, 1925, 794, 2195, 284, 795, 321, 797, 2155,
/* 1710 */ 357, 2194, 310, 2230, 709, 358, 171, 2196, 712, 2198,
/* 1720 */ 2199, 707, 53, 702, 2194, 2213, 2230, 325, 323, 113,
/* 1730 */ 2196, 712, 2198, 2199, 707, 345, 702, 2163, 2154, 708,
/* 1740 */ 330, 344, 2213, 2283, 334, 2153, 78, 385, 2280, 2150,
/* 1750 */ 419, 420, 1548, 2195, 2163, 1549, 708, 194, 424, 2148,
/* 1760 */ 426, 427, 428, 709, 2147, 366, 2145, 659, 2376, 432,
/* 1770 */ 2144, 2143, 434, 2194, 436, 2230, 1539, 2195, 170, 2196,
/* 1780 */ 712, 2198, 2199, 707, 2124, 702, 197, 709, 2123, 199,
/* 1790 */ 2194, 2213, 2230, 1507, 79, 343, 2196, 712, 2198, 2199,
/* 1800 */ 707, 1506, 702, 2163, 2195, 708, 2105, 2104, 2103, 448,
/* 1810 */ 449, 2102, 2101, 2056, 709, 2213, 1457, 2055, 456, 2321,
/* 1820 */ 386, 368, 2052, 201, 2195, 2051, 2050, 2163, 82, 708,
/* 1830 */ 2049, 2054, 204, 2053, 709, 2048, 2047, 2045, 2044, 2194,
/* 1840 */ 206, 2230, 2213, 2043, 336, 2196, 712, 2198, 2199, 707,
/* 1850 */ 2042, 702, 474, 472, 2163, 2058, 708, 2041, 2040, 2039,
/* 1860 */ 2038, 2037, 2213, 2194, 2036, 2230, 2035, 392, 343, 2196,
/* 1870 */ 712, 2198, 2199, 707, 2163, 702, 708, 353, 1459, 208,
/* 1880 */ 2026, 87, 2025, 2024, 2023, 2057, 2022, 654, 2034, 2033,
/* 1890 */ 2194, 2195, 2230, 2032, 2031, 171, 2196, 712, 2198, 2199,
/* 1900 */ 707, 709, 702, 2030, 2029, 2028, 2027, 2021, 2020, 2019,
/* 1910 */ 2194, 2018, 2230, 2017, 2016, 343, 2196, 712, 2198, 2199,
/* 1920 */ 707, 2195, 702, 504, 354, 1867, 1325, 215, 1866, 2213,
/* 1930 */ 217, 709, 1329, 1865, 400, 218, 1863, 1333, 1860, 521,
/* 1940 */ 522, 2163, 1859, 708, 525, 1852, 529, 2377, 1841, 1817,
/* 1950 */ 1816, 520, 524, 1222, 528, 532, 182, 526, 2122, 2213,
/* 1960 */ 530, 76, 2112, 77, 402, 220, 222, 2100, 2099, 228,
/* 1970 */ 2076, 2163, 230, 708, 2183, 1941, 183, 2194, 540, 2230,
/* 1980 */ 2195, 1862, 343, 2196, 712, 2198, 2199, 707, 618, 702,
/* 1990 */ 709, 1858, 555, 556, 557, 1856, 559, 1854, 561, 563,
/* 2000 */ 560, 1267, 564, 1851, 565, 568, 801, 2194, 567, 2230,
/* 2010 */ 569, 1836, 343, 2196, 712, 2198, 2199, 707, 2213, 702,
/* 2020 */ 313, 1834, 1835, 1833, 1813, 1943, 1401, 1402, 1942, 1316,
/* 2030 */ 2163, 1314, 708, 1312, 1311, 1310, 180, 1309, 1303, 1849,
/* 2040 */ 1308, 378, 1840, 1305, 791, 787, 783, 779, 1304, 311,
/* 2050 */ 766, 238, 63, 2195, 768, 1302, 379, 1838, 380, 1812,
/* 2060 */ 598, 601, 603, 709, 1811, 605, 613, 1810, 2230, 607,
/* 2070 */ 115, 338, 2196, 712, 2198, 2199, 707, 2121, 702, 1533,
/* 2080 */ 1535, 1532, 1537, 29, 2195, 67, 1513, 1515, 2111, 110,
/* 2090 */ 1517, 2213, 304, 164, 709, 622, 2098, 2097, 2360, 20,
/* 2100 */ 6, 7, 21, 2163, 31, 708, 57, 623, 17, 275,
/* 2110 */ 22, 261, 274, 33, 640, 1492, 1750, 267, 638, 2195,
/* 2120 */ 65, 172, 2213, 24, 628, 688, 1491, 2184, 1765, 709,
/* 2130 */ 630, 23, 287, 269, 2163, 1731, 708, 1723, 273, 2194,
/* 2140 */ 32, 2230, 1770, 95, 328, 2196, 712, 2198, 2199, 707,
/* 2150 */ 1764, 702, 1771, 389, 1769, 1768, 2195, 2213, 58, 390,
/* 2160 */ 291, 177, 18, 2096, 1698, 1697, 709, 290, 2075, 2163,
/* 2170 */ 2194, 708, 2230, 59, 96, 326, 2196, 712, 2198, 2199,
/* 2180 */ 707, 2195, 702, 97, 292, 25, 257, 293, 1729, 295,
/* 2190 */ 300, 709, 68, 2074, 2213, 99, 305, 101, 26, 1650,
/* 2200 */ 1649, 13, 1573, 105, 2233, 2194, 2163, 2230, 708, 1660,
/* 2210 */ 329, 2196, 712, 2198, 2199, 707, 683, 702, 2195, 2213,
/* 2220 */ 1628, 11, 302, 179, 701, 192, 1626, 1605, 709, 39,
/* 2230 */ 16, 2163, 1625, 708, 27, 715, 1597, 28, 403, 713,
/* 2240 */ 1387, 717, 2194, 2195, 2230, 1384, 719, 335, 2196, 712,
/* 2250 */ 2198, 2199, 707, 709, 702, 720, 2213, 711, 722, 1383,
/* 2260 */ 723, 725, 1380, 726, 728, 1374, 1372, 2194, 2163, 2230,
/* 2270 */ 708, 731, 339, 2196, 712, 2198, 2199, 707, 729, 702,
/* 2280 */ 732, 2213, 106, 308, 1378, 1396, 107, 75, 1392, 1377,
/* 2290 */ 1376, 1375, 746, 2163, 1265, 708, 1297, 1296, 1295, 1294,
/* 2300 */ 1292, 756, 1290, 1289, 2194, 1288, 2230, 1323, 1283, 331,
/* 2310 */ 2196, 712, 2198, 2199, 707, 2195, 702, 309, 1286, 1285,
/* 2320 */ 1284, 1320, 1282, 1281, 1280, 709, 1318, 1277, 1276, 2194,
/* 2330 */ 2195, 2230, 1273, 1272, 340, 2196, 712, 2198, 2199, 707,
/* 2340 */ 709, 702, 1271, 1270, 1857, 776, 778, 1855, 2195, 777,
/* 2350 */ 780, 781, 782, 2213, 1853, 785, 784, 786, 709, 1850,
/* 2360 */ 788, 789, 790, 1832, 792, 2163, 1809, 708, 2213, 1212,
/* 2370 */ 312, 796, 1784, 1559, 322, 1784, 799, 800, 1784, 1784,
/* 2380 */ 2163, 1784, 708, 1784, 1784, 1784, 2213, 1784, 1784, 1784,
/* 2390 */ 1784, 1784, 1784, 1784, 1784, 2195, 1784, 1784, 2163, 1784,
/* 2400 */ 708, 2194, 1784, 2230, 1784, 709, 332, 2196, 712, 2198,
/* 2410 */ 2199, 707, 1784, 702, 1784, 1784, 2194, 2195, 2230, 1784,
/* 2420 */ 1784, 341, 2196, 712, 2198, 2199, 707, 709, 702, 1784,
/* 2430 */ 1784, 1784, 1784, 2213, 2194, 1784, 2230, 1784, 1784, 333,
/* 2440 */ 2196, 712, 2198, 2199, 707, 2163, 702, 708, 1784, 1784,
/* 2450 */ 1784, 1784, 1784, 1784, 1784, 2213, 1784, 1784, 1784, 1784,
/* 2460 */ 1784, 1784, 1784, 1784, 2195, 1784, 1784, 2163, 1784, 708,
/* 2470 */ 1784, 1784, 1784, 1784, 709, 1784, 1784, 1784, 1784, 1784,
/* 2480 */ 1784, 2194, 1784, 2230, 1784, 1784, 346, 2196, 712, 2198,
/* 2490 */ 2199, 707, 1784, 702, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2500 */ 1784, 1784, 2213, 2194, 1784, 2230, 1784, 1784, 347, 2196,
/* 2510 */ 712, 2198, 2199, 707, 2163, 702, 708, 1784, 1784, 1784,
/* 2520 */ 1784, 1784, 1784, 2195, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2530 */ 1784, 1784, 1784, 709, 1784, 1784, 2195, 1784, 1784, 1784,
/* 2540 */ 1784, 1784, 1784, 1784, 1784, 1784, 709, 1784, 1784, 1784,
/* 2550 */ 2194, 1784, 2230, 2195, 1784, 2207, 2196, 712, 2198, 2199,
/* 2560 */ 707, 2213, 702, 709, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2570 */ 1784, 1784, 1784, 2163, 2213, 708, 1784, 1784, 1784, 1784,
/* 2580 */ 1784, 1784, 1784, 1784, 1784, 2195, 2163, 1784, 708, 1784,
/* 2590 */ 1784, 2213, 1784, 1784, 1784, 709, 1784, 1784, 1784, 1784,
/* 2600 */ 1784, 1784, 1784, 2163, 1784, 708, 1784, 1784, 1784, 2194,
/* 2610 */ 1784, 2230, 1784, 1784, 2206, 2196, 712, 2198, 2199, 707,
/* 2620 */ 1784, 702, 2194, 2213, 2230, 1784, 1784, 2205, 2196, 712,
/* 2630 */ 2198, 2199, 707, 1784, 702, 2163, 1784, 708, 1784, 2194,
/* 2640 */ 1784, 2230, 1784, 1784, 362, 2196, 712, 2198, 2199, 707,
/* 2650 */ 1784, 702, 2195, 1784, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2660 */ 1784, 1784, 709, 1784, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2670 */ 1784, 2194, 2195, 2230, 1784, 1784, 363, 2196, 712, 2198,
/* 2680 */ 2199, 707, 709, 702, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2690 */ 2213, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2700 */ 1784, 1784, 2163, 1784, 708, 1784, 1784, 1784, 1784, 1784,
/* 2710 */ 2213, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2720 */ 1784, 1784, 2163, 1784, 708, 1784, 1784, 1784, 1784, 1784,
/* 2730 */ 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 2194, 1784,
/* 2740 */ 2230, 1784, 2195, 359, 2196, 712, 2198, 2199, 707, 1784,
/* 2750 */ 702, 1784, 709, 1784, 1784, 1784, 1784, 1784, 2194, 2195,
/* 2760 */ 2230, 1784, 1784, 364, 2196, 712, 2198, 2199, 707, 709,
/* 2770 */ 702, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2780 */ 2213, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2790 */ 1784, 1784, 2163, 1784, 708, 1784, 1784, 2213, 1784, 1784,
/* 2800 */ 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 2163,
/* 2810 */ 1784, 708, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784,
/* 2820 */ 1784, 1784, 1784, 1784, 1784, 1784, 1784, 1784, 710, 1784,
/* 2830 */ 2230, 1784, 1784, 338, 2196, 712, 2198, 2199, 707, 1784,
/* 2840 */ 702, 1784, 1784, 1784, 1784, 2194, 1784, 2230, 1784, 1784,
/* 2850 */ 337, 2196, 712, 2198, 2199, 707, 1784, 702,
};
static const YYCODETYPE yy_lookahead[] = {
2023-06-30 11:36:39 +00:00
/* 0 */ 375, 341, 367, 393, 346, 350, 351, 411, 350, 380,
/* 10 */ 352, 351, 12, 13, 14, 405, 381, 4, 408, 409,
/* 20 */ 20, 3, 22, 8, 9, 370, 391, 12, 13, 14,
/* 30 */ 15, 16, 377, 33, 350, 35, 367, 14, 20, 379,
/* 40 */ 8, 9, 338, 20, 12, 13, 14, 15, 16, 424,
/* 50 */ 381, 391, 380, 393, 458, 49, 43, 461, 45, 46,
/* 60 */ 391, 379, 62, 57, 429, 430, 60, 61, 68, 20,
/* 70 */ 4, 22, 476, 477, 439, 75, 44, 481, 482, 395,
/* 80 */ 20, 399, 400, 68, 35, 350, 351, 427, 20, 429,
/* 90 */ 350, 351, 432, 433, 434, 435, 436, 437, 429, 439,
/* 100 */ 100, 360, 53, 103, 444, 370, 446, 357, 439, 368,
/* 110 */ 450, 451, 377, 84, 393, 411, 12, 13, 350, 351,
/* 120 */ 416, 20, 104, 463, 20, 62, 22, 112, 100, 408,
/* 130 */ 409, 471, 382, 20, 447, 448, 104, 33, 370, 35,
/* 140 */ 140, 141, 341, 115, 116, 117, 118, 119, 120, 121,
/* 150 */ 122, 123, 124, 341, 126, 127, 128, 129, 130, 131,
/* 160 */ 132, 378, 458, 103, 458, 461, 62, 461, 105, 103,
/* 170 */ 170, 171, 68, 390, 145, 146, 176, 177, 20, 75,
2023-06-30 11:36:39 +00:00
/* 180 */ 476, 477, 476, 477, 169, 481, 482, 481, 482, 431,
/* 190 */ 172, 191, 391, 193, 454, 455, 456, 168, 458, 459,
/* 200 */ 340, 461, 342, 391, 100, 8, 9, 103, 341, 12,
/* 210 */ 13, 14, 15, 16, 103, 457, 476, 477, 351, 35,
/* 220 */ 186, 481, 482, 223, 224, 0, 226, 227, 228, 229,
2023-05-13 12:02:48 +00:00
/* 230 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
2023-06-30 11:36:39 +00:00
/* 240 */ 240, 241, 242, 243, 140, 141, 379, 213, 214, 24,
/* 250 */ 25, 26, 27, 28, 29, 30, 31, 32, 391, 75,
/* 260 */ 393, 0, 247, 248, 249, 250, 251, 252, 253, 254,
/* 270 */ 255, 256, 257, 345, 170, 171, 348, 349, 67, 20,
2023-06-30 11:36:39 +00:00
/* 280 */ 176, 177, 21, 170, 171, 24, 25, 26, 27, 28,
/* 290 */ 29, 30, 31, 32, 427, 191, 429, 193, 175, 432,
/* 300 */ 433, 434, 435, 436, 437, 20, 439, 0, 371, 442,
2023-06-30 11:36:39 +00:00
/* 310 */ 20, 444, 445, 446, 20, 341, 379, 450, 451, 20,
/* 320 */ 260, 22, 350, 351, 387, 351, 260, 223, 224, 4,
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
/* 330 */ 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
2023-06-30 08:57:29 +00:00
/* 340 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 12,
/* 350 */ 13, 67, 53, 379, 379, 12, 13, 20, 47, 22,
/* 360 */ 458, 386, 103, 461, 379, 391, 20, 393, 114, 394,
2023-06-30 11:36:39 +00:00
/* 370 */ 33, 260, 35, 70, 71, 72, 350, 351, 35, 477,
/* 380 */ 77, 78, 79, 481, 482, 400, 83, 351, 265, 266,
/* 390 */ 267, 88, 89, 90, 91, 442, 370, 94, 445, 62,
2023-06-30 11:36:39 +00:00
/* 400 */ 135, 427, 48, 429, 139, 68, 432, 433, 434, 435,
/* 410 */ 436, 437, 75, 439, 103, 379, 134, 135, 444, 345,
2023-06-30 11:36:39 +00:00
/* 420 */ 446, 139, 348, 349, 450, 451, 454, 455, 456, 341,
/* 430 */ 458, 459, 14, 458, 140, 141, 461, 100, 20, 351,
/* 440 */ 103, 353, 8, 9, 35, 471, 12, 13, 14, 15,
2023-06-30 11:36:39 +00:00
/* 450 */ 16, 476, 477, 12, 13, 14, 481, 482, 346, 341,
/* 460 */ 170, 20, 350, 22, 352, 200, 159, 379, 203, 351,
/* 470 */ 434, 206, 379, 208, 33, 168, 35, 140, 141, 391,
/* 480 */ 387, 393, 458, 21, 75, 461, 24, 25, 26, 27,
2023-06-30 11:36:39 +00:00
/* 490 */ 28, 29, 30, 31, 32, 379, 103, 379, 341, 350,
/* 500 */ 351, 477, 386, 62, 244, 481, 482, 170, 171, 391,
2023-06-30 11:36:39 +00:00
/* 510 */ 394, 393, 357, 176, 177, 427, 75, 429, 172, 260,
/* 520 */ 432, 433, 434, 435, 436, 437, 172, 439, 191, 374,
/* 530 */ 193, 133, 444, 179, 446, 137, 193, 382, 450, 451,
/* 540 */ 14, 100, 350, 351, 103, 427, 20, 429, 391, 341,
/* 550 */ 432, 433, 434, 435, 436, 437, 244, 439, 246, 351,
/* 560 */ 223, 224, 370, 226, 227, 228, 229, 230, 231, 232,
2023-06-30 08:57:29 +00:00
/* 570 */ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
2023-06-30 11:36:39 +00:00
/* 580 */ 243, 140, 141, 190, 22, 192, 261, 379, 8, 9,
/* 590 */ 472, 473, 12, 13, 14, 15, 16, 35, 431, 391,
/* 600 */ 20, 393, 453, 454, 455, 456, 172, 458, 459, 75,
2023-06-30 11:36:39 +00:00
/* 610 */ 341, 170, 171, 350, 351, 222, 389, 176, 177, 392,
/* 620 */ 393, 8, 9, 371, 457, 12, 13, 14, 15, 16,
/* 630 */ 431, 379, 191, 370, 193, 427, 350, 429, 386, 387,
/* 640 */ 432, 433, 434, 435, 436, 437, 394, 439, 134, 20,
/* 650 */ 411, 341, 444, 260, 446, 416, 457, 411, 450, 451,
/* 660 */ 391, 351, 100, 353, 223, 224, 44, 226, 227, 228,
2023-06-30 08:57:29 +00:00
/* 670 */ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
2023-06-30 11:36:39 +00:00
/* 680 */ 239, 240, 241, 242, 243, 12, 13, 0, 402, 379,
/* 690 */ 404, 350, 351, 20, 75, 22, 170, 458, 350, 351,
/* 700 */ 461, 391, 379, 393, 458, 0, 33, 461, 35, 386,
/* 710 */ 12, 13, 14, 15, 16, 476, 477, 394, 204, 205,
/* 720 */ 481, 482, 476, 477, 350, 351, 104, 481, 482, 1,
/* 730 */ 2, 223, 103, 350, 351, 62, 380, 427, 397, 429,
2023-06-30 11:36:39 +00:00
/* 740 */ 4, 350, 432, 433, 434, 435, 436, 437, 75, 439,
/* 750 */ 350, 351, 172, 370, 444, 19, 446, 0, 8, 9,
/* 760 */ 450, 451, 12, 13, 14, 15, 16, 341, 341, 33,
/* 770 */ 370, 397, 67, 100, 350, 351, 103, 351, 270, 271,
/* 780 */ 272, 273, 274, 275, 276, 49, 350, 351, 3, 12,
2023-06-30 11:36:39 +00:00
/* 790 */ 13, 0, 56, 402, 370, 404, 183, 20, 62, 22,
/* 800 */ 371, 20, 454, 455, 456, 379, 458, 459, 379, 443,
/* 810 */ 33, 445, 35, 140, 141, 0, 387, 391, 391, 393,
2023-06-30 11:36:39 +00:00
/* 820 */ 133, 134, 135, 136, 137, 138, 139, 70, 71, 72,
/* 830 */ 392, 393, 104, 397, 77, 78, 79, 22, 102, 62,
/* 840 */ 83, 105, 103, 170, 171, 88, 89, 90, 91, 176,
/* 850 */ 177, 94, 75, 427, 104, 429, 54, 55, 432, 433,
2023-06-30 11:36:39 +00:00
/* 860 */ 434, 435, 436, 437, 191, 439, 193, 441, 8, 9,
/* 870 */ 341, 380, 12, 13, 14, 15, 16, 100, 355, 356,
/* 880 */ 103, 341, 133, 134, 135, 136, 137, 138, 139, 341,
/* 890 */ 411, 351, 62, 353, 341, 380, 223, 224, 285, 226,
2023-06-30 08:57:29 +00:00
/* 900 */ 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
2023-06-30 11:36:39 +00:00
/* 910 */ 237, 238, 239, 240, 241, 242, 243, 140, 141, 379,
/* 920 */ 391, 140, 141, 21, 133, 134, 135, 136, 137, 138,
/* 930 */ 139, 391, 102, 393, 379, 105, 34, 458, 36, 391,
/* 940 */ 461, 386, 350, 351, 391, 350, 351, 170, 171, 394,
/* 950 */ 114, 350, 351, 176, 177, 476, 477, 176, 177, 380,
/* 960 */ 481, 482, 370, 388, 104, 370, 391, 427, 191, 429,
2023-06-30 11:36:39 +00:00
/* 970 */ 193, 370, 432, 433, 434, 435, 436, 437, 39, 439,
/* 980 */ 364, 365, 2, 0, 444, 22, 446, 350, 8, 9,
/* 990 */ 450, 451, 12, 13, 14, 15, 16, 341, 35, 260,
2023-06-30 08:57:29 +00:00
/* 1000 */ 223, 224, 0, 226, 227, 228, 229, 230, 231, 232,
/* 1010 */ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
2023-06-30 11:36:39 +00:00
/* 1020 */ 243, 14, 18, 18, 20, 350, 351, 20, 23, 350,
/* 1030 */ 351, 27, 49, 359, 30, 355, 356, 33, 367, 402,
/* 1040 */ 371, 404, 37, 38, 0, 370, 41, 391, 379, 370,
/* 1050 */ 376, 379, 381, 49, 411, 51, 387, 52, 386, 385,
/* 1060 */ 56, 380, 391, 100, 341, 280, 394, 341, 63, 64,
/* 1070 */ 65, 66, 70, 71, 72, 73, 74, 0, 76, 77,
2023-06-30 08:57:29 +00:00
/* 1080 */ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
/* 1090 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 20,
/* 1100 */ 429, 458, 350, 351, 461, 20, 102, 33, 103, 37,
/* 1110 */ 439, 14, 15, 16, 391, 350, 351, 391, 114, 476,
/* 1120 */ 477, 44, 370, 49, 481, 482, 350, 351, 417, 350,
/* 1130 */ 351, 57, 58, 59, 60, 370, 62, 341, 44, 443,
/* 1140 */ 169, 445, 364, 365, 341, 341, 370, 142, 144, 370,
/* 1150 */ 341, 147, 148, 149, 150, 151, 152, 153, 154, 155,
/* 1160 */ 156, 157, 158, 159, 160, 161, 162, 163, 44, 165,
/* 1170 */ 166, 167, 350, 351, 258, 259, 102, 170, 106, 105,
/* 1180 */ 108, 109, 0, 111, 359, 341, 341, 391, 183, 184,
/* 1190 */ 185, 341, 370, 188, 391, 391, 341, 379, 259, 388,
/* 1200 */ 391, 351, 391, 353, 22, 133, 201, 202, 341, 137,
/* 1210 */ 385, 388, 394, 372, 391, 368, 375, 212, 247, 42,
/* 1220 */ 215, 44, 341, 218, 219, 220, 221, 222, 257, 379,
/* 1230 */ 366, 22, 351, 369, 353, 391, 391, 45, 46, 44,
/* 1240 */ 42, 391, 44, 393, 35, 114, 391, 173, 174, 13,
/* 1250 */ 107, 172, 341, 110, 180, 181, 107, 172, 391, 110,
/* 1260 */ 379, 217, 351, 107, 353, 260, 110, 107, 44, 13,
/* 1270 */ 110, 35, 391, 199, 393, 0, 44, 427, 207, 429,
/* 1280 */ 209, 44, 432, 433, 434, 435, 436, 437, 68, 439,
/* 1290 */ 379, 35, 140, 141, 444, 164, 446, 22, 342, 104,
/* 1300 */ 450, 451, 391, 474, 393, 35, 44, 44, 427, 103,
/* 1310 */ 429, 401, 485, 432, 433, 434, 435, 436, 437, 113,
/* 1320 */ 439, 44, 44, 35, 22, 444, 44, 446, 104, 44,
/* 1330 */ 44, 450, 451, 1, 2, 44, 104, 35, 427, 44,
/* 1340 */ 429, 104, 341, 432, 433, 434, 435, 436, 437, 44,
/* 1350 */ 439, 0, 351, 12, 13, 444, 468, 446, 2, 44,
/* 1360 */ 354, 450, 451, 22, 8, 9, 104, 104, 12, 13,
/* 1370 */ 14, 15, 16, 341, 33, 367, 35, 75, 284, 44,
/* 1380 */ 379, 104, 104, 351, 44, 13, 104, 367, 379, 104,
/* 1390 */ 104, 13, 391, 44, 393, 104, 410, 44, 401, 104,
/* 1400 */ 354, 50, 100, 62, 349, 351, 282, 35, 390, 104,
/* 1410 */ 341, 379, 401, 35, 460, 478, 75, 452, 49, 104,
/* 1420 */ 351, 462, 412, 391, 262, 393, 428, 20, 427, 206,
/* 1430 */ 429, 189, 359, 432, 433, 434, 435, 436, 437, 104,
/* 1440 */ 439, 100, 421, 223, 104, 444, 421, 446, 379, 426,
/* 1450 */ 359, 450, 451, 104, 414, 20, 351, 104, 42, 427,
/* 1460 */ 391, 429, 393, 193, 432, 433, 434, 435, 436, 437,
/* 1470 */ 20, 439, 351, 398, 396, 169, 444, 401, 446, 398,
/* 1480 */ 20, 193, 450, 451, 350, 398, 351, 350, 396, 396,
/* 1490 */ 101, 363, 99, 191, 362, 193, 427, 350, 429, 341,
/* 1500 */ 98, 432, 433, 434, 435, 436, 437, 361, 439, 351,
/* 1510 */ 20, 350, 343, 350, 350, 446, 48, 347, 343, 450,
/* 1520 */ 451, 347, 421, 20, 359, 223, 224, 359, 20, 393,
/* 1530 */ 352, 20, 191, 413, 193, 359, 352, 379, 359, 359,
/* 1540 */ 359, 350, 359, 343, 343, 379, 379, 350, 341, 391,
/* 1550 */ 379, 393, 379, 210, 425, 103, 423, 197, 351, 421,
/* 1560 */ 357, 420, 196, 391, 223, 224, 379, 379, 379, 379,
/* 1570 */ 419, 357, 379, 379, 341, 379, 391, 236, 237, 238,
/* 1580 */ 239, 240, 241, 242, 351, 427, 379, 429, 350, 195,
/* 1590 */ 432, 433, 434, 435, 436, 437, 391, 439, 391, 269,
/* 1600 */ 393, 393, 391, 277, 446, 401, 467, 268, 450, 451,
/* 1610 */ 391, 401, 379, 391, 412, 467, 391, 418, 406, 406,
/* 1620 */ 470, 182, 469, 279, 391, 341, 393, 263, 278, 412,
/* 1630 */ 486, 286, 259, 281, 427, 351, 429, 283, 341, 432,
/* 1640 */ 433, 434, 435, 436, 437, 351, 439, 20, 351, 357,
/* 1650 */ 352, 20, 466, 446, 404, 406, 357, 450, 451, 431,
/* 1660 */ 427, 406, 429, 379, 391, 432, 433, 434, 435, 436,
/* 1670 */ 437, 438, 439, 440, 441, 391, 379, 393, 391, 174,
/* 1680 */ 391, 465, 467, 403, 391, 464, 357, 341, 391, 375,
/* 1690 */ 393, 391, 391, 357, 103, 449, 103, 351, 480, 351,
/* 1700 */ 383, 391, 369, 36, 341, 479, 344, 350, 343, 0,
/* 1710 */ 407, 427, 357, 429, 351, 407, 432, 433, 434, 435,
/* 1720 */ 436, 437, 415, 439, 427, 379, 429, 339, 358, 432,
/* 1730 */ 433, 434, 435, 436, 437, 422, 439, 391, 0, 393,
/* 1740 */ 373, 373, 379, 446, 373, 0, 42, 384, 451, 0,
/* 1750 */ 35, 216, 35, 341, 391, 35, 393, 35, 216, 0,
/* 1760 */ 35, 35, 216, 351, 0, 216, 0, 483, 484, 35,
/* 1770 */ 0, 0, 22, 427, 35, 429, 211, 341, 432, 433,
/* 1780 */ 434, 435, 436, 437, 0, 439, 199, 351, 0, 199,
/* 1790 */ 427, 379, 429, 193, 200, 432, 433, 434, 435, 436,
/* 1800 */ 437, 191, 439, 391, 341, 393, 0, 0, 0, 187,
/* 1810 */ 186, 0, 0, 0, 351, 379, 47, 0, 39, 473,
/* 1820 */ 384, 49, 0, 47, 341, 0, 0, 391, 42, 393,
/* 1830 */ 0, 0, 47, 0, 351, 0, 0, 0, 0, 427,
/* 1840 */ 159, 429, 379, 0, 432, 433, 434, 435, 436, 437,
/* 1850 */ 0, 439, 159, 35, 391, 0, 393, 0, 0, 0,
2023-06-30 11:36:39 +00:00
/* 1860 */ 0, 0, 379, 427, 0, 429, 0, 384, 432, 433,
/* 1870 */ 434, 435, 436, 437, 391, 439, 393, 48, 22, 47,
/* 1880 */ 0, 42, 0, 0, 0, 0, 0, 475, 0, 0,
/* 1890 */ 427, 341, 429, 0, 0, 432, 433, 434, 435, 436,
/* 1900 */ 437, 351, 439, 0, 0, 0, 0, 0, 0, 0,
/* 1910 */ 427, 0, 429, 0, 0, 432, 433, 434, 435, 436,
/* 1920 */ 437, 341, 439, 143, 48, 0, 35, 62, 0, 379,
/* 1930 */ 62, 351, 22, 0, 384, 62, 0, 22, 0, 49,
/* 1940 */ 39, 391, 0, 393, 49, 0, 49, 484, 0, 0,
/* 1950 */ 0, 35, 35, 14, 35, 35, 44, 39, 0, 379,
/* 1960 */ 39, 39, 0, 39, 384, 42, 40, 0, 0, 39,
/* 1970 */ 0, 391, 182, 393, 47, 0, 47, 427, 47, 429,
2023-06-30 11:36:39 +00:00
/* 1980 */ 341, 0, 432, 433, 434, 435, 436, 437, 1, 439,
/* 1990 */ 351, 0, 35, 49, 39, 0, 35, 0, 39, 35,
/* 2000 */ 49, 69, 49, 0, 39, 49, 19, 427, 35, 429,
/* 2010 */ 39, 0, 432, 433, 434, 435, 436, 437, 379, 439,
/* 2020 */ 33, 0, 0, 0, 0, 0, 22, 35, 0, 35,
/* 2030 */ 391, 35, 393, 35, 35, 35, 49, 35, 22, 0,
/* 2040 */ 35, 22, 0, 35, 57, 58, 59, 60, 35, 62,
/* 2050 */ 44, 110, 112, 341, 44, 35, 22, 0, 22, 0,
/* 2060 */ 51, 35, 35, 351, 0, 35, 427, 0, 429, 22,
/* 2070 */ 20, 432, 433, 434, 435, 436, 437, 0, 439, 35,
/* 2080 */ 35, 35, 104, 103, 341, 103, 35, 22, 0, 102,
/* 2090 */ 198, 379, 105, 194, 351, 22, 0, 0, 3, 44,
/* 2100 */ 48, 48, 44, 391, 103, 393, 172, 172, 264, 47,
/* 2110 */ 44, 174, 44, 44, 99, 172, 104, 103, 101, 341,
/* 2120 */ 3, 103, 379, 44, 178, 138, 172, 47, 35, 351,
/* 2130 */ 178, 264, 47, 104, 391, 104, 393, 104, 103, 427,
/* 2140 */ 103, 429, 104, 103, 432, 433, 434, 435, 436, 437,
/* 2150 */ 35, 439, 104, 35, 35, 35, 341, 379, 258, 35,
/* 2160 */ 173, 47, 264, 0, 104, 104, 351, 180, 0, 391,
/* 2170 */ 427, 393, 429, 44, 103, 432, 433, 434, 435, 436,
/* 2180 */ 437, 341, 439, 39, 47, 103, 199, 104, 104, 103,
/* 2190 */ 103, 351, 103, 0, 379, 39, 47, 103, 44, 101,
/* 2200 */ 101, 2, 22, 113, 103, 427, 391, 429, 393, 223,
/* 2210 */ 432, 433, 434, 435, 436, 437, 175, 439, 341, 379,
/* 2220 */ 104, 245, 173, 47, 103, 47, 104, 22, 351, 103,
/* 2230 */ 103, 391, 104, 393, 103, 35, 104, 103, 35, 114,
/* 2240 */ 104, 103, 427, 341, 429, 104, 35, 432, 433, 434,
/* 2250 */ 435, 436, 437, 351, 439, 103, 379, 225, 35, 104,
/* 2260 */ 103, 35, 104, 103, 35, 104, 104, 427, 391, 429,
/* 2270 */ 393, 35, 432, 433, 434, 435, 436, 437, 103, 439,
/* 2280 */ 103, 379, 103, 44, 125, 35, 103, 103, 22, 125,
/* 2290 */ 125, 125, 68, 391, 69, 393, 35, 35, 35, 35,
/* 2300 */ 35, 97, 35, 35, 427, 35, 429, 75, 22, 432,
/* 2310 */ 433, 434, 435, 436, 437, 341, 439, 44, 35, 35,
/* 2320 */ 35, 75, 35, 35, 35, 351, 35, 35, 35, 427,
/* 2330 */ 341, 429, 35, 35, 432, 433, 434, 435, 436, 437,
/* 2340 */ 351, 439, 22, 35, 0, 35, 39, 0, 341, 49,
/* 2350 */ 35, 49, 39, 379, 0, 49, 35, 39, 351, 0,
/* 2360 */ 35, 49, 39, 0, 35, 391, 0, 393, 379, 35,
/* 2370 */ 22, 21, 487, 22, 22, 487, 21, 20, 487, 487,
2023-06-30 11:36:39 +00:00
/* 2380 */ 391, 487, 393, 487, 487, 487, 379, 487, 487, 487,
/* 2390 */ 487, 487, 487, 487, 487, 341, 487, 487, 391, 487,
/* 2400 */ 393, 427, 487, 429, 487, 351, 432, 433, 434, 435,
/* 2410 */ 436, 437, 487, 439, 487, 487, 427, 341, 429, 487,
/* 2420 */ 487, 432, 433, 434, 435, 436, 437, 351, 439, 487,
/* 2430 */ 487, 487, 487, 379, 427, 487, 429, 487, 487, 432,
/* 2440 */ 433, 434, 435, 436, 437, 391, 439, 393, 487, 487,
/* 2450 */ 487, 487, 487, 487, 487, 379, 487, 487, 487, 487,
/* 2460 */ 487, 487, 487, 487, 341, 487, 487, 391, 487, 393,
/* 2470 */ 487, 487, 487, 487, 351, 487, 487, 487, 487, 487,
/* 2480 */ 487, 427, 487, 429, 487, 487, 432, 433, 434, 435,
/* 2490 */ 436, 437, 487, 439, 487, 487, 487, 487, 487, 487,
/* 2500 */ 487, 487, 379, 427, 487, 429, 487, 487, 432, 433,
/* 2510 */ 434, 435, 436, 437, 391, 439, 393, 487, 487, 487,
/* 2520 */ 487, 487, 487, 341, 487, 487, 487, 487, 487, 487,
/* 2530 */ 487, 487, 487, 351, 487, 487, 341, 487, 487, 487,
/* 2540 */ 487, 487, 487, 487, 487, 487, 351, 487, 487, 487,
/* 2550 */ 427, 487, 429, 341, 487, 432, 433, 434, 435, 436,
/* 2560 */ 437, 379, 439, 351, 487, 487, 487, 487, 487, 487,
/* 2570 */ 487, 487, 487, 391, 379, 393, 487, 487, 487, 487,
/* 2580 */ 487, 487, 487, 487, 487, 341, 391, 487, 393, 487,
/* 2590 */ 487, 379, 487, 487, 487, 351, 487, 487, 487, 487,
/* 2600 */ 487, 487, 487, 391, 487, 393, 487, 487, 487, 427,
/* 2610 */ 487, 429, 487, 487, 432, 433, 434, 435, 436, 437,
/* 2620 */ 487, 439, 427, 379, 429, 487, 487, 432, 433, 434,
/* 2630 */ 435, 436, 437, 487, 439, 391, 487, 393, 487, 427,
/* 2640 */ 487, 429, 487, 487, 432, 433, 434, 435, 436, 437,
/* 2650 */ 487, 439, 341, 487, 487, 487, 487, 487, 487, 487,
/* 2660 */ 487, 487, 351, 487, 487, 487, 487, 487, 487, 487,
/* 2670 */ 487, 427, 341, 429, 487, 487, 432, 433, 434, 435,
/* 2680 */ 436, 437, 351, 439, 487, 487, 487, 487, 487, 487,
/* 2690 */ 379, 487, 487, 487, 487, 487, 487, 487, 487, 487,
/* 2700 */ 487, 487, 391, 487, 393, 487, 487, 487, 487, 487,
/* 2710 */ 379, 487, 487, 487, 487, 487, 487, 487, 487, 487,
/* 2720 */ 487, 487, 391, 487, 393, 487, 487, 487, 487, 487,
/* 2730 */ 487, 487, 487, 487, 487, 487, 487, 487, 427, 487,
/* 2740 */ 429, 487, 341, 432, 433, 434, 435, 436, 437, 487,
/* 2750 */ 439, 487, 351, 487, 487, 487, 487, 487, 427, 341,
/* 2760 */ 429, 487, 487, 432, 433, 434, 435, 436, 437, 351,
/* 2770 */ 439, 487, 487, 487, 487, 487, 487, 487, 487, 487,
/* 2780 */ 379, 487, 487, 487, 487, 487, 487, 487, 487, 487,
/* 2790 */ 487, 487, 391, 487, 393, 487, 487, 379, 487, 487,
/* 2800 */ 487, 487, 487, 487, 487, 487, 487, 487, 487, 391,
/* 2810 */ 487, 393, 487, 487, 487, 487, 487, 487, 487, 487,
/* 2820 */ 487, 487, 487, 487, 487, 487, 487, 487, 427, 487,
/* 2830 */ 429, 487, 487, 432, 433, 434, 435, 436, 437, 487,
/* 2840 */ 439, 487, 487, 487, 487, 427, 487, 429, 487, 487,
/* 2850 */ 432, 433, 434, 435, 436, 437, 487, 439, 338, 338,
2023-06-30 08:57:29 +00:00
/* 2860 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2870 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2880 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2890 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2900 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2910 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2920 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2930 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2940 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2950 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2960 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2970 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2980 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 2990 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3000 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3010 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3020 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3030 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3040 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3050 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3060 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3070 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3080 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3090 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3100 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3110 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3120 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3130 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3140 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3150 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3160 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3170 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
/* 3180 */ 338, 338, 338, 338, 338, 338, 338, 338, 338, 338,
2023-06-30 11:36:39 +00:00
/* 3190 */ 338, 338, 338, 338, 338, 338,
};
#define YY_SHIFT_COUNT (801)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (2366)
static const unsigned short int yy_shift_ofst[] = {
2023-06-30 08:57:29 +00:00
/* 0 */ 1005, 0, 104, 0, 337, 337, 337, 337, 337, 337,
/* 10 */ 337, 337, 337, 337, 337, 337, 441, 673, 673, 777,
/* 20 */ 673, 673, 673, 673, 673, 673, 673, 673, 673, 673,
/* 30 */ 673, 673, 673, 673, 673, 673, 673, 673, 673, 673,
/* 40 */ 673, 673, 673, 673, 673, 673, 673, 673, 673, 673,
/* 50 */ 673, 60, 259, 393, 629, 111, 739, 111, 629, 629,
2023-06-30 11:36:39 +00:00
/* 60 */ 111, 1341, 111, 1341, 1341, 66, 111, 68, 781, 101,
/* 70 */ 101, 781, 13, 13, 113, 294, 23, 23, 101, 101,
/* 80 */ 101, 101, 101, 101, 101, 101, 101, 101, 158, 101,
/* 90 */ 101, 211, 68, 101, 101, 285, 68, 101, 158, 101,
/* 100 */ 158, 68, 101, 101, 68, 101, 68, 68, 68, 101,
/* 110 */ 284, 1004, 15, 15, 303, 462, 1302, 1302, 1302, 1302,
2023-06-30 11:36:39 +00:00
/* 120 */ 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302,
/* 130 */ 1302, 1302, 1302, 1302, 1302, 1072, 18, 113, 294, 802,
/* 140 */ 802, 184, 346, 346, 346, 705, 312, 312, 184, 211,
/* 150 */ 254, 260, 68, 534, 68, 534, 534, 836, 619, 28,
2023-06-30 11:36:39 +00:00
/* 160 */ 28, 28, 28, 28, 28, 28, 28, 1987, 757, 261,
/* 170 */ 580, 613, 508, 49, 123, 343, 343, 526, 354, 1007,
/* 180 */ 299, 1079, 1192, 418, 398, 1085, 916, 939, 785, 916,
/* 190 */ 1177, 325, 290, 1162, 1369, 1407, 1223, 211, 1407, 211,
/* 200 */ 1242, 1435, 1416, 1450, 1435, 1416, 1306, 1460, 1435, 1460,
/* 210 */ 1416, 1306, 1306, 1389, 1393, 1460, 1402, 1460, 1460, 1460,
/* 220 */ 1490, 1468, 1490, 1468, 1407, 211, 1503, 211, 1508, 1511,
/* 230 */ 211, 1508, 211, 211, 211, 1460, 211, 1490, 68, 68,
/* 240 */ 68, 68, 68, 68, 68, 68, 68, 68, 68, 1460,
/* 250 */ 1490, 534, 534, 534, 1343, 1452, 1407, 284, 1360, 1366,
/* 260 */ 1503, 284, 1394, 1162, 1460, 1450, 1450, 534, 1330, 1339,
/* 270 */ 534, 1330, 1339, 534, 534, 68, 1326, 1439, 1330, 1344,
/* 280 */ 1350, 1364, 1162, 1345, 1354, 1352, 1373, 1435, 1627, 1508,
/* 290 */ 284, 284, 1631, 1339, 534, 534, 534, 534, 534, 1339,
/* 300 */ 534, 1505, 284, 836, 284, 1435, 1591, 1593, 534, 619,
/* 310 */ 1460, 284, 1667, 1490, 2858, 2858, 2858, 2858, 2858, 2858,
/* 320 */ 2858, 2858, 2858, 1002, 1074, 225, 32, 736, 750, 860,
/* 330 */ 687, 980, 1356, 434, 791, 197, 197, 197, 197, 197,
/* 340 */ 197, 197, 197, 197, 749, 265, 698, 698, 29, 6,
/* 350 */ 34, 307, 830, 562, 963, 902, 514, 282, 282, 1097,
/* 360 */ 728, 971, 1097, 1097, 1097, 983, 1044, 622, 1209, 1198,
/* 370 */ 1131, 1077, 1143, 1149, 1156, 1160, 1236, 1256, 815, 1182,
/* 380 */ 1275, 1071, 1195, 1224, 63, 1232, 1237, 1262, 1152, 1124,
/* 390 */ 1094, 1263, 1277, 1278, 1282, 1285, 1286, 1332, 1291, 1220,
/* 400 */ 1295, 311, 1305, 1315, 1335, 1340, 1349, 1353, 1206, 1270,
/* 410 */ 1288, 1372, 1378, 409, 1351, 1709, 1738, 1745, 1704, 1749,
/* 420 */ 1715, 1535, 1717, 1720, 1722, 1542, 1759, 1725, 1726, 1546,
/* 430 */ 1764, 1549, 1766, 1734, 1770, 1750, 1771, 1739, 1565, 1784,
/* 440 */ 1587, 1788, 1590, 1594, 1600, 1610, 1806, 1807, 1808, 1622,
/* 450 */ 1624, 1811, 1812, 1769, 1813, 1817, 1772, 1779, 1822, 1776,
/* 460 */ 1825, 1786, 1826, 1830, 1831, 1785, 1833, 1835, 1836, 1837,
/* 470 */ 1838, 1843, 1681, 1818, 1850, 1693, 1855, 1857, 1858, 1859,
/* 480 */ 1860, 1861, 1864, 1866, 1888, 1889, 1893, 1894, 1903, 1904,
/* 490 */ 1905, 1906, 1832, 1880, 1839, 1882, 1883, 1884, 1885, 1886,
/* 500 */ 1907, 1856, 1908, 1909, 1911, 1780, 1913, 1914, 1910, 1829,
/* 510 */ 1915, 1876, 1925, 1865, 1891, 1928, 1868, 1933, 1873, 1936,
/* 520 */ 1938, 1916, 1890, 1901, 1942, 1917, 1895, 1918, 1945, 1919,
/* 530 */ 1897, 1921, 1948, 1920, 1949, 1923, 1922, 1912, 1927, 1929,
/* 540 */ 1939, 1931, 1950, 1926, 1924, 1958, 1962, 1967, 1930, 1790,
/* 550 */ 1968, 1970, 1975, 1932, 1981, 1991, 1957, 1944, 1955, 1995,
/* 560 */ 1961, 1951, 1959, 1997, 1964, 1953, 1965, 2003, 1973, 1956,
/* 570 */ 1971, 2011, 2021, 2022, 2023, 2024, 2025, 1940, 1941, 1992,
/* 580 */ 2004, 2028, 1994, 1996, 1998, 1999, 2000, 2002, 2005, 2006,
/* 590 */ 2010, 2008, 2013, 2016, 2020, 2039, 2019, 2042, 2034, 2009,
/* 600 */ 2057, 2036, 2026, 2059, 2027, 2064, 2030, 2067, 2047, 2050,
/* 610 */ 2044, 2045, 2046, 1978, 1980, 2077, 1934, 1982, 1892, 2051,
/* 620 */ 2065, 2088, 1899, 2073, 1935, 1937, 2096, 2097, 1943, 1946,
/* 630 */ 1954, 1952, 2095, 2055, 1844, 2001, 2012, 2014, 2052, 2017,
/* 640 */ 2053, 2015, 2029, 2058, 2066, 2031, 2018, 2035, 2037, 2033,
/* 650 */ 2068, 2062, 2080, 2040, 2069, 1867, 2038, 2048, 2117, 2079,
/* 660 */ 1898, 2093, 2115, 2118, 2119, 2120, 2124, 2060, 2061, 2085,
/* 670 */ 1900, 2129, 2114, 2163, 2168, 2071, 2144, 1927, 2137, 2082,
/* 680 */ 2083, 2084, 2086, 2087, 2041, 2089, 2193, 2156, 2049, 2094,
/* 690 */ 2090, 1927, 2149, 2154, 2098, 1976, 2099, 2199, 2180, 1986,
/* 700 */ 2101, 2116, 2121, 2122, 2126, 2128, 2176, 2127, 2131, 2178,
/* 710 */ 2132, 2205, 2032, 2134, 2125, 2136, 2200, 2203, 2138, 2141,
/* 720 */ 2211, 2152, 2155, 2223, 2157, 2158, 2226, 2160, 2161, 2229,
/* 730 */ 2175, 2162, 2236, 2177, 2159, 2164, 2165, 2166, 2179, 2239,
/* 740 */ 2183, 2250, 2184, 2239, 2239, 2266, 2225, 2224, 2261, 2262,
/* 750 */ 2263, 2264, 2265, 2267, 2268, 2270, 2232, 2204, 2273, 2283,
/* 760 */ 2284, 2285, 2286, 2287, 2288, 2289, 2246, 2006, 2291, 2010,
/* 770 */ 2292, 2293, 2297, 2298, 2320, 2308, 2344, 2310, 2300, 2307,
/* 780 */ 2347, 2315, 2302, 2313, 2354, 2321, 2306, 2318, 2359, 2325,
/* 790 */ 2312, 2323, 2363, 2329, 2334, 2366, 2348, 2350, 2351, 2352,
/* 800 */ 2355, 2357,
};
#define YY_REDUCE_COUNT (322)
2023-06-30 11:36:39 +00:00
#define YY_REDUCE_MIN (-404)
#define YY_REDUCE_MAX (2418)
static const short yy_reduce_ofst[] = {
2023-06-30 11:36:39 +00:00
/* 0 */ -296, -340, -133, -26, 88, 310, 540, 850, 881, 911,
/* 10 */ 208, 1001, 1032, 1069, 1158, 1207, 1233, 118, 1284, 1297,
/* 20 */ 1346, 1363, 1436, 1412, 1463, 1483, 426, 1550, 1580, 1639,
/* 30 */ 1712, 1743, 1778, 1815, 1840, 1877, 1902, 1974, 1989, 2007,
/* 40 */ 2054, 2076, 2123, 2182, 2195, 2212, 2244, 2311, 2331, 2401,
/* 50 */ 2418, -260, -25, 239, 149, -404, 246, 479, -28, 348,
/* 60 */ 643, -365, -294, -331, 671, -98, 24, 252, -390, -345,
/* 70 */ -265, -279, -72, 74, -318, 227, -342, 112, -232, 26,
/* 80 */ 192, 263, 341, 374, 383, 400, 424, 436, 286, 592,
/* 90 */ 595, 674, 116, 601, 675, 36, 323, 679, 391, 752,
/* 100 */ 637, -63, 765, 776, 555, 779, 429, 672, 669, 822,
/* 110 */ 155, -316, -313, -313, -259, -140, -199, -188, 157, 269,
/* 120 */ 427, 529, 548, 553, 656, 723, 726, 796, 803, 804,
/* 130 */ 809, 844, 845, 855, 867, -217, -242, -15, 438, 523,
/* 140 */ 680, 616, -242, 167, 199, -250, 366, 696, 778, 825,
/* 150 */ -375, -47, 93, 575, 818, 811, 823, 841, 864, -371,
/* 160 */ -328, 356, 491, 515, 579, 681, 515, 711, 847, 956,
/* 170 */ 910, 827, 829, 1006, 888, 1008, 1020, 1009, 986, 1009,
/* 180 */ 1046, 997, 1055, 1054, 1018, 1011, 954, 954, 937, 954,
/* 190 */ 965, 959, 1009, 1010, 998, 1021, 1023, 1073, 1025, 1091,
/* 200 */ 1040, 1105, 1075, 1076, 1121, 1081, 1078, 1134, 1135, 1137,
/* 210 */ 1087, 1092, 1093, 1128, 1132, 1147, 1146, 1161, 1163, 1164,
/* 220 */ 1169, 1170, 1175, 1174, 1101, 1165, 1136, 1168, 1178, 1120,
/* 230 */ 1176, 1184, 1179, 1180, 1181, 1191, 1183, 1200, 1166, 1167,
/* 240 */ 1171, 1173, 1187, 1188, 1189, 1190, 1193, 1194, 1196, 1197,
/* 250 */ 1201, 1172, 1185, 1205, 1129, 1133, 1138, 1203, 1141, 1151,
/* 260 */ 1208, 1214, 1199, 1202, 1238, 1204, 1210, 1211, 1139, 1212,
/* 270 */ 1219, 1148, 1213, 1222, 1225, 1009, 1150, 1153, 1215, 1186,
/* 280 */ 1216, 1221, 1217, 1144, 1218, 1226, 954, 1294, 1228, 1298,
/* 290 */ 1292, 1299, 1250, 1249, 1273, 1287, 1289, 1293, 1300, 1255,
/* 300 */ 1301, 1280, 1329, 1314, 1336, 1348, 1246, 1317, 1310, 1333,
/* 310 */ 1357, 1355, 1362, 1365, 1307, 1313, 1303, 1308, 1367, 1368,
/* 320 */ 1371, 1370, 1388,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 10 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 20 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 30 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 40 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 50 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 60 */ 2093, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 70 */ 1782, 1782, 1782, 1782, 2066, 1782, 1782, 1782, 1782, 1782,
/* 80 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 90 */ 1782, 1871, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 100 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 110 */ 1869, 2059, 2285, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 120 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 130 */ 1782, 1782, 1782, 1782, 1782, 1782, 2297, 1782, 1782, 1845,
/* 140 */ 1845, 1782, 2297, 2297, 2297, 1869, 2257, 2257, 1782, 1871,
/* 150 */ 2127, 1782, 1782, 1782, 1782, 1782, 1782, 1991, 1782, 1782,
/* 160 */ 1782, 1782, 1782, 2015, 1782, 1782, 1782, 2119, 1782, 1782,
/* 170 */ 2322, 2379, 1782, 1782, 2325, 1782, 1782, 1782, 1782, 1782,
/* 180 */ 1782, 2071, 1782, 1782, 1944, 2312, 2289, 2303, 2363, 2290,
/* 190 */ 2287, 2306, 1782, 2316, 1782, 1782, 2141, 1871, 1782, 1871,
/* 200 */ 2106, 1782, 2064, 1782, 1782, 2064, 2061, 1782, 1782, 1782,
/* 210 */ 2064, 2061, 2061, 1933, 1929, 1782, 1927, 1782, 1782, 1782,
/* 220 */ 1782, 1829, 1782, 1829, 1782, 1871, 1782, 1871, 1782, 1782,
/* 230 */ 1871, 1782, 1871, 1871, 1871, 1782, 1871, 1782, 1782, 1782,
/* 240 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 250 */ 1782, 1782, 1782, 1782, 2139, 2125, 1782, 1869, 2117, 2115,
/* 260 */ 1782, 1869, 2113, 2316, 1782, 1782, 1782, 1782, 2333, 2331,
/* 270 */ 1782, 2333, 2331, 1782, 1782, 1782, 2347, 2343, 2333, 2352,
/* 280 */ 2349, 2318, 2316, 2382, 2369, 2365, 2303, 1782, 1782, 1782,
/* 290 */ 1869, 1869, 1782, 2331, 1782, 1782, 1782, 1782, 1782, 2331,
/* 300 */ 1782, 1782, 1869, 1782, 1869, 1782, 1782, 1960, 1782, 1782,
/* 310 */ 1782, 1869, 1814, 1782, 2108, 2130, 2089, 2089, 1994, 1994,
/* 320 */ 1994, 1872, 1787, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 330 */ 1782, 1782, 1782, 1782, 1782, 2346, 2345, 2212, 1782, 2261,
/* 340 */ 2260, 2259, 2250, 2211, 1956, 1782, 2210, 2209, 1782, 1782,
/* 350 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 2080, 2079, 2203,
/* 360 */ 1782, 1782, 2204, 2202, 2201, 1782, 1782, 1782, 1782, 1782,
/* 370 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 380 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 2366,
/* 390 */ 2370, 1782, 1782, 1782, 1782, 1782, 1782, 2286, 1782, 1782,
/* 400 */ 1782, 2185, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 410 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 420 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 430 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 440 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 450 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 460 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 470 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 480 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 490 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 500 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 510 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 520 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 530 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1819, 2190, 1782,
/* 540 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 550 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 560 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 570 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 580 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1910,
/* 590 */ 1909, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 600 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 610 */ 1782, 1782, 1782, 2194, 1782, 1782, 1782, 1782, 1782, 1782,
/* 620 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 630 */ 1782, 1782, 2362, 2319, 1782, 1782, 1782, 1782, 1782, 1782,
/* 640 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 650 */ 1782, 1782, 2185, 1782, 2344, 1782, 1782, 2360, 1782, 2364,
/* 660 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 2296, 2292, 1782,
/* 670 */ 1782, 2288, 1782, 1782, 1782, 1782, 1782, 2193, 1782, 1782,
/* 680 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 690 */ 1782, 2184, 1782, 2247, 1782, 1782, 1782, 2281, 1782, 1782,
/* 700 */ 2232, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 710 */ 2194, 1782, 2197, 1782, 1782, 1782, 1782, 1782, 1988, 1782,
/* 720 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 730 */ 1782, 1782, 1782, 1782, 1972, 1970, 1969, 1968, 1782, 2001,
/* 740 */ 1782, 1782, 1782, 1997, 1996, 1782, 1782, 1782, 1782, 1782,
/* 750 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1890, 1782,
/* 760 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1882, 1782, 1881,
/* 770 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 780 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 790 */ 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782, 1782,
/* 800 */ 1782, 1782,
};
/********** End of lemon-generated parsing tables *****************************/
/* The next table maps tokens (terminal symbols) into fallback tokens.
** If a construct like the following:
**
** %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
2022-04-22 10:23:37 +00:00
0, /* $ => nothing */
0, /* OR => nothing */
0, /* AND => nothing */
0, /* UNION => nothing */
0, /* ALL => nothing */
0, /* MINUS => nothing */
0, /* EXCEPT => nothing */
0, /* INTERSECT => nothing */
0, /* NK_BITAND => nothing */
0, /* NK_BITOR => nothing */
0, /* NK_LSHIFT => nothing */
0, /* NK_RSHIFT => nothing */
0, /* NK_PLUS => nothing */
0, /* NK_MINUS => nothing */
0, /* NK_STAR => nothing */
0, /* NK_SLASH => nothing */
0, /* NK_REM => nothing */
0, /* NK_CONCAT => nothing */
0, /* CREATE => nothing */
0, /* ACCOUNT => nothing */
0, /* NK_ID => nothing */
0, /* PASS => nothing */
0, /* NK_STRING => nothing */
0, /* ALTER => nothing */
0, /* PPS => nothing */
0, /* TSERIES => nothing */
0, /* STORAGE => nothing */
0, /* STREAMS => nothing */
0, /* QTIME => nothing */
0, /* DBS => nothing */
0, /* USERS => nothing */
0, /* CONNS => nothing */
0, /* STATE => nothing */
0, /* USER => nothing */
2022-06-22 08:35:14 +00:00
0, /* ENABLE => nothing */
0, /* NK_INTEGER => nothing */
0, /* SYSINFO => nothing */
2022-04-22 10:23:37 +00:00
0, /* DROP => nothing */
0, /* GRANT => nothing */
0, /* ON => nothing */
0, /* TO => nothing */
0, /* REVOKE => nothing */
0, /* FROM => nothing */
0, /* SUBSCRIBE => nothing */
0, /* NK_COMMA => nothing */
0, /* READ => nothing */
0, /* WRITE => nothing */
0, /* NK_DOT => nothing */
2023-03-28 10:43:58 +00:00
0, /* WITH => nothing */
2022-04-22 10:23:37 +00:00
0, /* DNODE => nothing */
0, /* PORT => nothing */
0, /* DNODES => nothing */
2023-05-09 11:19:14 +00:00
0, /* RESTORE => nothing */
0, /* NK_IPTOKEN => nothing */
0, /* FORCE => nothing */
2023-05-16 01:50:10 +00:00
0, /* UNSAFE => nothing */
2022-04-22 10:23:37 +00:00
0, /* LOCAL => nothing */
0, /* QNODE => nothing */
0, /* BNODE => nothing */
0, /* SNODE => nothing */
0, /* MNODE => nothing */
2023-05-09 11:19:14 +00:00
0, /* VNODE => nothing */
2022-04-22 10:23:37 +00:00
0, /* DATABASE => nothing */
0, /* USE => nothing */
2022-07-06 05:53:47 +00:00
0, /* FLUSH => nothing */
2022-07-11 02:53:06 +00:00
0, /* TRIM => nothing */
2022-12-27 03:11:02 +00:00
0, /* COMPACT => nothing */
2022-04-22 10:23:37 +00:00
0, /* IF => nothing */
0, /* NOT => nothing */
0, /* EXISTS => nothing */
2022-04-27 10:18:37 +00:00
0, /* BUFFER => nothing */
0, /* CACHEMODEL => nothing */
0, /* CACHESIZE => nothing */
2022-04-22 10:23:37 +00:00
0, /* COMP => nothing */
2022-06-15 05:49:29 +00:00
0, /* DURATION => nothing */
2022-04-22 10:23:37 +00:00
0, /* NK_VARIABLE => nothing */
0, /* MAXROWS => nothing */
0, /* MINROWS => nothing */
0, /* KEEP => nothing */
2022-04-27 10:18:37 +00:00
0, /* PAGES => nothing */
0, /* PAGESIZE => nothing */
2022-09-13 06:19:50 +00:00
0, /* TSDB_PAGESIZE => nothing */
2022-04-22 10:23:37 +00:00
0, /* PRECISION => nothing */
0, /* REPLICA => nothing */
0, /* VGROUPS => nothing */
0, /* SINGLE_STABLE => nothing */
0, /* RETENTIONS => nothing */
2022-05-25 13:20:11 +00:00
0, /* SCHEMALESS => nothing */
2022-07-27 03:55:19 +00:00
0, /* WAL_LEVEL => nothing */
0, /* WAL_FSYNC_PERIOD => nothing */
2022-07-25 13:09:06 +00:00
0, /* WAL_RETENTION_PERIOD => nothing */
0, /* WAL_RETENTION_SIZE => nothing */
0, /* WAL_ROLL_PERIOD => nothing */
0, /* WAL_SEGMENT_SIZE => nothing */
2022-09-13 06:19:50 +00:00
0, /* STT_TRIGGER => nothing */
0, /* TABLE_PREFIX => nothing */
0, /* TABLE_SUFFIX => nothing */
2022-04-22 10:23:37 +00:00
0, /* NK_COLON => nothing */
0, /* MAX_SPEED => nothing */
0, /* START => nothing */
0, /* TIMESTAMP => nothing */
2023-06-30 08:57:29 +00:00
287, /* END => ABORT */
2022-04-22 10:23:37 +00:00
0, /* TABLE => nothing */
0, /* NK_LP => nothing */
0, /* NK_RP => nothing */
0, /* STABLE => nothing */
0, /* ADD => nothing */
0, /* COLUMN => nothing */
0, /* MODIFY => nothing */
0, /* RENAME => nothing */
0, /* TAG => nothing */
0, /* SET => nothing */
0, /* NK_EQ => nothing */
0, /* USING => nothing */
0, /* TAGS => nothing */
0, /* BOOL => nothing */
0, /* TINYINT => nothing */
0, /* SMALLINT => nothing */
0, /* INT => nothing */
0, /* INTEGER => nothing */
0, /* BIGINT => nothing */
0, /* FLOAT => nothing */
0, /* DOUBLE => nothing */
0, /* BINARY => nothing */
0, /* NCHAR => nothing */
0, /* UNSIGNED => nothing */
0, /* JSON => nothing */
0, /* VARCHAR => nothing */
0, /* MEDIUMBLOB => nothing */
0, /* BLOB => nothing */
0, /* VARBINARY => nothing */
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
0, /* GEOMETRY => nothing */
2022-04-22 10:23:37 +00:00
0, /* DECIMAL => nothing */
2023-04-04 10:04:10 +00:00
0, /* COMMENT => nothing */
2022-06-17 09:27:42 +00:00
0, /* MAX_DELAY => nothing */
0, /* WATERMARK => nothing */
2022-04-27 10:18:37 +00:00
0, /* ROLLUP => nothing */
0, /* TTL => nothing */
0, /* SMA => nothing */
2022-12-06 08:07:11 +00:00
0, /* DELETE_MARK => nothing */
2022-06-17 09:27:42 +00:00
0, /* FIRST => nothing */
0, /* LAST => nothing */
2022-04-22 10:23:37 +00:00
0, /* SHOW => nothing */
0, /* PRIVILEGES => nothing */
2022-04-22 10:23:37 +00:00
0, /* DATABASES => nothing */
0, /* TABLES => nothing */
0, /* STABLES => nothing */
0, /* MNODES => nothing */
0, /* QNODES => nothing */
0, /* FUNCTIONS => nothing */
0, /* INDEXES => nothing */
0, /* ACCOUNTS => nothing */
0, /* APPS => nothing */
0, /* CONNECTIONS => nothing */
2022-08-11 07:37:26 +00:00
0, /* LICENCES => nothing */
2022-04-22 10:23:37 +00:00
0, /* GRANTS => nothing */
0, /* QUERIES => nothing */
0, /* SCORES => nothing */
0, /* TOPICS => nothing */
0, /* VARIABLES => nothing */
0, /* CLUSTER => nothing */
2022-04-22 10:23:37 +00:00
0, /* BNODES => nothing */
0, /* SNODES => nothing */
0, /* TRANSACTIONS => nothing */
0, /* DISTRIBUTED => nothing */
0, /* CONSUMERS => nothing */
0, /* SUBSCRIPTIONS => nothing */
0, /* VNODES => nothing */
0, /* ALIVE => nothing */
2022-04-22 10:23:37 +00:00
0, /* LIKE => nothing */
2022-11-10 09:22:13 +00:00
0, /* TBNAME => nothing */
0, /* QTAGS => nothing */
0, /* AS => nothing */
2022-04-22 10:23:37 +00:00
0, /* INDEX => nothing */
0, /* FUNCTION => nothing */
0, /* INTERVAL => nothing */
0, /* COUNT => nothing */
0, /* LAST_ROW => nothing */
2022-06-22 08:35:14 +00:00
0, /* META => nothing */
2023-06-30 08:57:29 +00:00
0, /* ONLY => nothing */
2023-06-30 11:36:39 +00:00
0, /* TOPIC => nothing */
0, /* CONSUMER => nothing */
0, /* GROUP => nothing */
2022-04-22 10:23:37 +00:00
0, /* DESC => nothing */
0, /* DESCRIBE => nothing */
0, /* RESET => nothing */
0, /* QUERY => nothing */
2022-04-27 10:18:37 +00:00
0, /* CACHE => nothing */
2022-04-22 10:23:37 +00:00
0, /* EXPLAIN => nothing */
0, /* ANALYZE => nothing */
0, /* VERBOSE => nothing */
0, /* NK_BOOL => nothing */
0, /* RATIO => nothing */
2022-06-17 09:27:42 +00:00
0, /* NK_FLOAT => nothing */
2022-04-22 10:23:37 +00:00
0, /* OUTPUTTYPE => nothing */
0, /* AGGREGATE => nothing */
0, /* BUFSIZE => nothing */
0, /* LANGUAGE => nothing */
0, /* REPLACE => nothing */
2022-04-22 10:23:37 +00:00
0, /* STREAM => nothing */
0, /* INTO => nothing */
0, /* PAUSE => nothing */
0, /* RESUME => nothing */
2022-04-22 10:23:37 +00:00
0, /* TRIGGER => nothing */
0, /* AT_ONCE => nothing */
0, /* WINDOW_CLOSE => nothing */
0, /* IGNORE => nothing */
0, /* EXPIRED => nothing */
0, /* FILL_HISTORY => nothing */
0, /* UPDATE => nothing */
0, /* SUBTABLE => nothing */
0, /* UNTREATED => nothing */
2022-04-22 10:23:37 +00:00
0, /* KILL => nothing */
0, /* CONNECTION => nothing */
0, /* TRANSACTION => nothing */
2022-06-07 03:53:32 +00:00
0, /* BALANCE => nothing */
2022-04-22 10:23:37 +00:00
0, /* VGROUP => nothing */
0, /* LEADER => nothing */
2022-06-07 03:53:32 +00:00
0, /* MERGE => nothing */
2022-04-22 10:23:37 +00:00
0, /* REDISTRIBUTE => nothing */
0, /* SPLIT => nothing */
2022-06-04 11:54:55 +00:00
0, /* DELETE => nothing */
2022-07-05 13:12:10 +00:00
0, /* INSERT => nothing */
2022-04-22 10:23:37 +00:00
0, /* NULL => nothing */
0, /* NK_QUESTION => nothing */
0, /* NK_ARROW => nothing */
0, /* ROWTS => nothing */
0, /* QSTART => nothing */
0, /* QEND => nothing */
0, /* QDURATION => nothing */
0, /* WSTART => nothing */
0, /* WEND => nothing */
2022-04-22 10:23:37 +00:00
0, /* WDURATION => nothing */
0, /* IROWTS => nothing */
0, /* ISFILLED => nothing */
2022-04-22 10:23:37 +00:00
0, /* CAST => nothing */
0, /* NOW => nothing */
0, /* TODAY => nothing */
0, /* TIMEZONE => nothing */
0, /* CLIENT_VERSION => nothing */
0, /* SERVER_VERSION => nothing */
0, /* SERVER_STATUS => nothing */
0, /* CURRENT_USER => nothing */
2022-09-22 11:20:21 +00:00
0, /* CASE => nothing */
0, /* WHEN => nothing */
0, /* THEN => nothing */
0, /* ELSE => nothing */
2022-04-22 10:23:37 +00:00
0, /* BETWEEN => nothing */
0, /* IS => nothing */
0, /* NK_LT => nothing */
0, /* NK_GT => nothing */
0, /* NK_LE => nothing */
0, /* NK_GE => nothing */
0, /* NK_NE => nothing */
0, /* MATCH => nothing */
0, /* NMATCH => nothing */
0, /* CONTAINS => nothing */
2022-07-27 03:55:19 +00:00
0, /* IN => nothing */
2022-04-22 10:23:37 +00:00
0, /* JOIN => nothing */
0, /* INNER => nothing */
0, /* SELECT => nothing */
0, /* DISTINCT => nothing */
0, /* WHERE => nothing */
0, /* PARTITION => nothing */
0, /* BY => nothing */
0, /* SESSION => nothing */
0, /* STATE_WINDOW => nothing */
2022-12-08 01:36:37 +00:00
0, /* EVENT_WINDOW => nothing */
2022-04-22 10:23:37 +00:00
0, /* SLIDING => nothing */
0, /* FILL => nothing */
0, /* VALUE => nothing */
2023-02-03 07:37:04 +00:00
0, /* VALUE_F => nothing */
2022-04-22 10:23:37 +00:00
0, /* NONE => nothing */
0, /* PREV => nothing */
2023-02-03 07:37:04 +00:00
0, /* NULL_F => nothing */
2022-04-22 10:23:37 +00:00
0, /* LINEAR => nothing */
0, /* NEXT => nothing */
0, /* HAVING => nothing */
2022-06-19 11:39:12 +00:00
0, /* RANGE => nothing */
0, /* EVERY => nothing */
2022-04-22 10:23:37 +00:00
0, /* ORDER => nothing */
0, /* SLIMIT => nothing */
0, /* SOFFSET => nothing */
0, /* LIMIT => nothing */
0, /* OFFSET => nothing */
0, /* ASC => nothing */
0, /* NULLS => nothing */
2022-08-11 12:26:40 +00:00
0, /* ABORT => nothing */
2023-06-30 08:57:29 +00:00
287, /* AFTER => ABORT */
287, /* ATTACH => ABORT */
287, /* BEFORE => ABORT */
287, /* BEGIN => ABORT */
287, /* BITAND => ABORT */
287, /* BITNOT => ABORT */
287, /* BITOR => ABORT */
287, /* BLOCKS => ABORT */
287, /* CHANGE => ABORT */
287, /* COMMA => ABORT */
287, /* CONCAT => ABORT */
287, /* CONFLICT => ABORT */
287, /* COPY => ABORT */
287, /* DEFERRED => ABORT */
287, /* DELIMITERS => ABORT */
287, /* DETACH => ABORT */
287, /* DIVIDE => ABORT */
287, /* DOT => ABORT */
287, /* EACH => ABORT */
287, /* FAIL => ABORT */
287, /* FILE => ABORT */
287, /* FOR => ABORT */
287, /* GLOB => ABORT */
287, /* ID => ABORT */
287, /* IMMEDIATE => ABORT */
287, /* IMPORT => ABORT */
287, /* INITIALLY => ABORT */
287, /* INSTEAD => ABORT */
287, /* ISNULL => ABORT */
287, /* KEY => ABORT */
287, /* MODULES => ABORT */
287, /* NK_BITNOT => ABORT */
287, /* NK_SEMI => ABORT */
287, /* NOTNULL => ABORT */
287, /* OF => ABORT */
287, /* PLUS => ABORT */
287, /* PRIVILEGE => ABORT */
287, /* RAISE => ABORT */
287, /* RESTRICT => ABORT */
287, /* ROW => ABORT */
287, /* SEMI => ABORT */
287, /* STAR => ABORT */
287, /* STATEMENT => ABORT */
287, /* STRICT => ABORT */
287, /* STRING => ABORT */
287, /* TIMES => ABORT */
287, /* VALUES => ABORT */
287, /* VARIABLE => ABORT */
287, /* VIEW => ABORT */
287, /* WAL => ABORT */
};
#endif /* YYFALLBACK */
/* The following structure represents a single element of the
** parser's stack. Information stored includes:
**
** + The state number for the parser at this level of the stack.
**
** + The value of the token stored at this level of the stack.
** (In other words, the "major" token.)
**
** + The semantic value stored at this level of the stack. This is
** the information used by the action routines in the grammar.
** It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */
YYCODETYPE major; /* The major token value. This is the code
** number for the token at this stack level */
YYMINORTYPE minor; /* The user-supplied minor token value. This
** is the value of the token */
};
typedef struct yyStackEntry yyStackEntry;
/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
yyStackEntry *yytos; /* Pointer to top element of the stack */
#ifdef YYTRACKMAXSTACKDEPTH
int yyhwm; /* High-water mark of the stack */
#endif
#ifndef YYNOERRORRECOVERY
int yyerrcnt; /* Shifts left before out of the error */
#endif
2022-03-10 07:36:06 +00:00
ParseARG_SDECL /* A place to hold %extra_argument */
ParseCTX_SDECL /* A place to hold %extra_context */
#if YYSTACKDEPTH<=0
int yystksz; /* Current side of the stack */
yyStackEntry *yystack; /* The parser's stack */
yyStackEntry yystk0; /* First stack entry */
#else
yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
yyStackEntry *yystackEnd; /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;
#include <assert.h>
#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */
#ifndef NDEBUG
/*
** Turn parser tracing on by giving a stream to which to write the trace
** and a prompt to preface each trace message. Tracing is turned off
** by making either argument NULL
**
** Inputs:
** <ul>
** <li> A FILE* to which trace output should be written.
** If NULL, then tracing is turned off.
** <li> A prefix string written at the beginning of every
** line of trace output. If NULL, then tracing is
** turned off.
** </ul>
**
** Outputs:
** None.
*/
2022-03-10 07:36:06 +00:00
void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
yyTraceFILE = TraceFILE;
yyTracePrompt = zTracePrompt;
if( yyTraceFILE==0 ) yyTracePrompt = 0;
else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */
#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required. The following table supplies these names */
static const char *const yyTokenName[] = {
/* 0 */ "$",
/* 1 */ "OR",
/* 2 */ "AND",
/* 3 */ "UNION",
/* 4 */ "ALL",
/* 5 */ "MINUS",
/* 6 */ "EXCEPT",
/* 7 */ "INTERSECT",
/* 8 */ "NK_BITAND",
/* 9 */ "NK_BITOR",
/* 10 */ "NK_LSHIFT",
/* 11 */ "NK_RSHIFT",
/* 12 */ "NK_PLUS",
/* 13 */ "NK_MINUS",
/* 14 */ "NK_STAR",
/* 15 */ "NK_SLASH",
/* 16 */ "NK_REM",
/* 17 */ "NK_CONCAT",
/* 18 */ "CREATE",
/* 19 */ "ACCOUNT",
/* 20 */ "NK_ID",
/* 21 */ "PASS",
/* 22 */ "NK_STRING",
/* 23 */ "ALTER",
/* 24 */ "PPS",
/* 25 */ "TSERIES",
/* 26 */ "STORAGE",
/* 27 */ "STREAMS",
/* 28 */ "QTIME",
/* 29 */ "DBS",
/* 30 */ "USERS",
/* 31 */ "CONNS",
/* 32 */ "STATE",
/* 33 */ "USER",
2022-06-22 08:35:14 +00:00
/* 34 */ "ENABLE",
/* 35 */ "NK_INTEGER",
/* 36 */ "SYSINFO",
/* 37 */ "DROP",
/* 38 */ "GRANT",
/* 39 */ "ON",
/* 40 */ "TO",
/* 41 */ "REVOKE",
/* 42 */ "FROM",
/* 43 */ "SUBSCRIBE",
/* 44 */ "NK_COMMA",
/* 45 */ "READ",
/* 46 */ "WRITE",
/* 47 */ "NK_DOT",
2023-03-28 10:43:58 +00:00
/* 48 */ "WITH",
/* 49 */ "DNODE",
/* 50 */ "PORT",
/* 51 */ "DNODES",
2023-05-09 11:19:14 +00:00
/* 52 */ "RESTORE",
/* 53 */ "NK_IPTOKEN",
/* 54 */ "FORCE",
2023-05-16 01:50:10 +00:00
/* 55 */ "UNSAFE",
/* 56 */ "LOCAL",
/* 57 */ "QNODE",
/* 58 */ "BNODE",
/* 59 */ "SNODE",
/* 60 */ "MNODE",
/* 61 */ "VNODE",
/* 62 */ "DATABASE",
/* 63 */ "USE",
/* 64 */ "FLUSH",
/* 65 */ "TRIM",
/* 66 */ "COMPACT",
/* 67 */ "IF",
/* 68 */ "NOT",
/* 69 */ "EXISTS",
/* 70 */ "BUFFER",
/* 71 */ "CACHEMODEL",
/* 72 */ "CACHESIZE",
/* 73 */ "COMP",
/* 74 */ "DURATION",
/* 75 */ "NK_VARIABLE",
/* 76 */ "MAXROWS",
/* 77 */ "MINROWS",
/* 78 */ "KEEP",
/* 79 */ "PAGES",
/* 80 */ "PAGESIZE",
/* 81 */ "TSDB_PAGESIZE",
/* 82 */ "PRECISION",
/* 83 */ "REPLICA",
/* 84 */ "VGROUPS",
/* 85 */ "SINGLE_STABLE",
/* 86 */ "RETENTIONS",
/* 87 */ "SCHEMALESS",
/* 88 */ "WAL_LEVEL",
/* 89 */ "WAL_FSYNC_PERIOD",
/* 90 */ "WAL_RETENTION_PERIOD",
/* 91 */ "WAL_RETENTION_SIZE",
/* 92 */ "WAL_ROLL_PERIOD",
/* 93 */ "WAL_SEGMENT_SIZE",
/* 94 */ "STT_TRIGGER",
/* 95 */ "TABLE_PREFIX",
/* 96 */ "TABLE_SUFFIX",
/* 97 */ "NK_COLON",
/* 98 */ "MAX_SPEED",
/* 99 */ "START",
/* 100 */ "TIMESTAMP",
/* 101 */ "END",
/* 102 */ "TABLE",
/* 103 */ "NK_LP",
/* 104 */ "NK_RP",
/* 105 */ "STABLE",
/* 106 */ "ADD",
/* 107 */ "COLUMN",
/* 108 */ "MODIFY",
/* 109 */ "RENAME",
/* 110 */ "TAG",
/* 111 */ "SET",
/* 112 */ "NK_EQ",
/* 113 */ "USING",
/* 114 */ "TAGS",
/* 115 */ "BOOL",
/* 116 */ "TINYINT",
/* 117 */ "SMALLINT",
/* 118 */ "INT",
/* 119 */ "INTEGER",
/* 120 */ "BIGINT",
/* 121 */ "FLOAT",
/* 122 */ "DOUBLE",
/* 123 */ "BINARY",
/* 124 */ "NCHAR",
/* 125 */ "UNSIGNED",
/* 126 */ "JSON",
/* 127 */ "VARCHAR",
/* 128 */ "MEDIUMBLOB",
/* 129 */ "BLOB",
/* 130 */ "VARBINARY",
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
/* 131 */ "GEOMETRY",
/* 132 */ "DECIMAL",
/* 133 */ "COMMENT",
/* 134 */ "MAX_DELAY",
/* 135 */ "WATERMARK",
/* 136 */ "ROLLUP",
/* 137 */ "TTL",
/* 138 */ "SMA",
/* 139 */ "DELETE_MARK",
/* 140 */ "FIRST",
/* 141 */ "LAST",
/* 142 */ "SHOW",
/* 143 */ "PRIVILEGES",
/* 144 */ "DATABASES",
/* 145 */ "TABLES",
/* 146 */ "STABLES",
/* 147 */ "MNODES",
/* 148 */ "QNODES",
/* 149 */ "FUNCTIONS",
/* 150 */ "INDEXES",
/* 151 */ "ACCOUNTS",
/* 152 */ "APPS",
/* 153 */ "CONNECTIONS",
/* 154 */ "LICENCES",
/* 155 */ "GRANTS",
/* 156 */ "QUERIES",
/* 157 */ "SCORES",
/* 158 */ "TOPICS",
/* 159 */ "VARIABLES",
/* 160 */ "CLUSTER",
/* 161 */ "BNODES",
/* 162 */ "SNODES",
/* 163 */ "TRANSACTIONS",
/* 164 */ "DISTRIBUTED",
/* 165 */ "CONSUMERS",
/* 166 */ "SUBSCRIPTIONS",
/* 167 */ "VNODES",
/* 168 */ "ALIVE",
/* 169 */ "LIKE",
/* 170 */ "TBNAME",
/* 171 */ "QTAGS",
/* 172 */ "AS",
/* 173 */ "INDEX",
/* 174 */ "FUNCTION",
/* 175 */ "INTERVAL",
/* 176 */ "COUNT",
/* 177 */ "LAST_ROW",
2023-06-30 11:36:39 +00:00
/* 178 */ "META",
/* 179 */ "ONLY",
/* 180 */ "TOPIC",
2023-06-30 08:57:29 +00:00
/* 181 */ "CONSUMER",
/* 182 */ "GROUP",
/* 183 */ "DESC",
/* 184 */ "DESCRIBE",
/* 185 */ "RESET",
/* 186 */ "QUERY",
/* 187 */ "CACHE",
/* 188 */ "EXPLAIN",
/* 189 */ "ANALYZE",
/* 190 */ "VERBOSE",
/* 191 */ "NK_BOOL",
/* 192 */ "RATIO",
/* 193 */ "NK_FLOAT",
/* 194 */ "OUTPUTTYPE",
/* 195 */ "AGGREGATE",
/* 196 */ "BUFSIZE",
/* 197 */ "LANGUAGE",
/* 198 */ "REPLACE",
/* 199 */ "STREAM",
/* 200 */ "INTO",
/* 201 */ "PAUSE",
/* 202 */ "RESUME",
/* 203 */ "TRIGGER",
/* 204 */ "AT_ONCE",
/* 205 */ "WINDOW_CLOSE",
/* 206 */ "IGNORE",
/* 207 */ "EXPIRED",
/* 208 */ "FILL_HISTORY",
/* 209 */ "UPDATE",
/* 210 */ "SUBTABLE",
/* 211 */ "UNTREATED",
/* 212 */ "KILL",
/* 213 */ "CONNECTION",
/* 214 */ "TRANSACTION",
/* 215 */ "BALANCE",
/* 216 */ "VGROUP",
/* 217 */ "LEADER",
/* 218 */ "MERGE",
/* 219 */ "REDISTRIBUTE",
/* 220 */ "SPLIT",
/* 221 */ "DELETE",
/* 222 */ "INSERT",
/* 223 */ "NULL",
/* 224 */ "NK_QUESTION",
/* 225 */ "NK_ARROW",
/* 226 */ "ROWTS",
/* 227 */ "QSTART",
/* 228 */ "QEND",
/* 229 */ "QDURATION",
/* 230 */ "WSTART",
/* 231 */ "WEND",
/* 232 */ "WDURATION",
/* 233 */ "IROWTS",
/* 234 */ "ISFILLED",
/* 235 */ "CAST",
/* 236 */ "NOW",
/* 237 */ "TODAY",
/* 238 */ "TIMEZONE",
/* 239 */ "CLIENT_VERSION",
/* 240 */ "SERVER_VERSION",
/* 241 */ "SERVER_STATUS",
/* 242 */ "CURRENT_USER",
/* 243 */ "CASE",
/* 244 */ "WHEN",
/* 245 */ "THEN",
/* 246 */ "ELSE",
/* 247 */ "BETWEEN",
/* 248 */ "IS",
/* 249 */ "NK_LT",
/* 250 */ "NK_GT",
/* 251 */ "NK_LE",
/* 252 */ "NK_GE",
/* 253 */ "NK_NE",
/* 254 */ "MATCH",
/* 255 */ "NMATCH",
/* 256 */ "CONTAINS",
/* 257 */ "IN",
/* 258 */ "JOIN",
/* 259 */ "INNER",
/* 260 */ "SELECT",
/* 261 */ "DISTINCT",
/* 262 */ "WHERE",
/* 263 */ "PARTITION",
/* 264 */ "BY",
/* 265 */ "SESSION",
/* 266 */ "STATE_WINDOW",
/* 267 */ "EVENT_WINDOW",
/* 268 */ "SLIDING",
/* 269 */ "FILL",
/* 270 */ "VALUE",
/* 271 */ "VALUE_F",
/* 272 */ "NONE",
/* 273 */ "PREV",
/* 274 */ "NULL_F",
/* 275 */ "LINEAR",
/* 276 */ "NEXT",
/* 277 */ "HAVING",
/* 278 */ "RANGE",
/* 279 */ "EVERY",
/* 280 */ "ORDER",
/* 281 */ "SLIMIT",
/* 282 */ "SOFFSET",
/* 283 */ "LIMIT",
/* 284 */ "OFFSET",
/* 285 */ "ASC",
/* 286 */ "NULLS",
/* 287 */ "ABORT",
/* 288 */ "AFTER",
/* 289 */ "ATTACH",
/* 290 */ "BEFORE",
/* 291 */ "BEGIN",
/* 292 */ "BITAND",
/* 293 */ "BITNOT",
/* 294 */ "BITOR",
/* 295 */ "BLOCKS",
/* 296 */ "CHANGE",
/* 297 */ "COMMA",
/* 298 */ "CONCAT",
/* 299 */ "CONFLICT",
/* 300 */ "COPY",
/* 301 */ "DEFERRED",
/* 302 */ "DELIMITERS",
/* 303 */ "DETACH",
/* 304 */ "DIVIDE",
/* 305 */ "DOT",
/* 306 */ "EACH",
/* 307 */ "FAIL",
/* 308 */ "FILE",
/* 309 */ "FOR",
/* 310 */ "GLOB",
/* 311 */ "ID",
/* 312 */ "IMMEDIATE",
/* 313 */ "IMPORT",
/* 314 */ "INITIALLY",
/* 315 */ "INSTEAD",
/* 316 */ "ISNULL",
/* 317 */ "KEY",
/* 318 */ "MODULES",
/* 319 */ "NK_BITNOT",
/* 320 */ "NK_SEMI",
/* 321 */ "NOTNULL",
/* 322 */ "OF",
/* 323 */ "PLUS",
/* 324 */ "PRIVILEGE",
/* 325 */ "RAISE",
/* 326 */ "RESTRICT",
/* 327 */ "ROW",
/* 328 */ "SEMI",
/* 329 */ "STAR",
/* 330 */ "STATEMENT",
/* 331 */ "STRICT",
/* 332 */ "STRING",
/* 333 */ "TIMES",
/* 334 */ "VALUES",
/* 335 */ "VARIABLE",
/* 336 */ "VIEW",
/* 337 */ "WAL",
/* 338 */ "cmd",
/* 339 */ "account_options",
/* 340 */ "alter_account_options",
/* 341 */ "literal",
/* 342 */ "alter_account_option",
/* 343 */ "user_name",
/* 344 */ "sysinfo_opt",
/* 345 */ "privileges",
/* 346 */ "priv_level",
/* 347 */ "with_opt",
/* 348 */ "priv_type_list",
/* 349 */ "priv_type",
/* 350 */ "db_name",
/* 351 */ "table_name",
/* 352 */ "topic_name",
/* 353 */ "search_condition",
/* 354 */ "dnode_endpoint",
/* 355 */ "force_opt",
/* 356 */ "unsafe_opt",
/* 357 */ "not_exists_opt",
/* 358 */ "db_options",
/* 359 */ "exists_opt",
/* 360 */ "alter_db_options",
/* 361 */ "speed_opt",
/* 362 */ "start_opt",
/* 363 */ "end_opt",
/* 364 */ "integer_list",
/* 365 */ "variable_list",
/* 366 */ "retention_list",
/* 367 */ "signed",
/* 368 */ "alter_db_option",
/* 369 */ "retention",
/* 370 */ "full_table_name",
/* 371 */ "column_def_list",
/* 372 */ "tags_def_opt",
/* 373 */ "table_options",
/* 374 */ "multi_create_clause",
/* 375 */ "tags_def",
/* 376 */ "multi_drop_clause",
/* 377 */ "alter_table_clause",
/* 378 */ "alter_table_options",
/* 379 */ "column_name",
/* 380 */ "type_name",
/* 381 */ "signed_literal",
/* 382 */ "create_subtable_clause",
/* 383 */ "specific_cols_opt",
/* 384 */ "expression_list",
/* 385 */ "drop_table_clause",
/* 386 */ "col_name_list",
/* 387 */ "column_def",
/* 388 */ "duration_list",
/* 389 */ "rollup_func_list",
/* 390 */ "alter_table_option",
/* 391 */ "duration_literal",
/* 392 */ "rollup_func_name",
/* 393 */ "function_name",
/* 394 */ "col_name",
/* 395 */ "db_name_cond_opt",
/* 396 */ "like_pattern_opt",
/* 397 */ "table_name_cond",
/* 398 */ "from_db_opt",
/* 399 */ "tag_list_opt",
/* 400 */ "tag_item",
/* 401 */ "column_alias",
/* 402 */ "full_index_name",
/* 403 */ "index_options",
/* 404 */ "index_name",
/* 405 */ "func_list",
/* 406 */ "sliding_opt",
/* 407 */ "sma_stream_opt",
/* 408 */ "func",
/* 409 */ "sma_func_name",
2023-06-30 11:36:39 +00:00
/* 410 */ "with_meta",
/* 411 */ "query_or_subquery",
/* 412 */ "where_clause_opt",
/* 413 */ "cgroup_name",
/* 414 */ "analyze_opt",
/* 415 */ "explain_options",
/* 416 */ "insert_query",
/* 417 */ "or_replace_opt",
/* 418 */ "agg_func_opt",
/* 419 */ "bufsize_opt",
/* 420 */ "language_opt",
/* 421 */ "stream_name",
/* 422 */ "stream_options",
/* 423 */ "col_list_opt",
/* 424 */ "tag_def_or_ref_opt",
/* 425 */ "subtable_opt",
/* 426 */ "ignore_opt",
/* 427 */ "expression",
/* 428 */ "dnode_list",
/* 429 */ "literal_func",
/* 430 */ "literal_list",
/* 431 */ "table_alias",
/* 432 */ "expr_or_subquery",
/* 433 */ "pseudo_column",
/* 434 */ "column_reference",
/* 435 */ "function_expression",
/* 436 */ "case_when_expression",
/* 437 */ "star_func",
/* 438 */ "star_func_para_list",
/* 439 */ "noarg_func",
/* 440 */ "other_para_list",
/* 441 */ "star_func_para",
/* 442 */ "when_then_list",
/* 443 */ "case_when_else_opt",
/* 444 */ "common_expression",
/* 445 */ "when_then_expr",
/* 446 */ "predicate",
/* 447 */ "compare_op",
/* 448 */ "in_op",
/* 449 */ "in_predicate_value",
/* 450 */ "boolean_value_expression",
/* 451 */ "boolean_primary",
/* 452 */ "from_clause_opt",
/* 453 */ "table_reference_list",
/* 454 */ "table_reference",
/* 455 */ "table_primary",
/* 456 */ "joined_table",
/* 457 */ "alias_opt",
/* 458 */ "subquery",
/* 459 */ "parenthesized_joined_table",
/* 460 */ "join_type",
/* 461 */ "query_specification",
/* 462 */ "set_quantifier_opt",
/* 463 */ "select_list",
/* 464 */ "partition_by_clause_opt",
/* 465 */ "range_opt",
/* 466 */ "every_opt",
/* 467 */ "fill_opt",
/* 468 */ "twindow_clause_opt",
/* 469 */ "group_by_clause_opt",
/* 470 */ "having_clause_opt",
/* 471 */ "select_item",
/* 472 */ "partition_list",
/* 473 */ "partition_item",
/* 474 */ "fill_mode",
/* 475 */ "group_by_list",
/* 476 */ "query_expression",
/* 477 */ "query_simple",
/* 478 */ "order_by_clause_opt",
/* 479 */ "slimit_clause_opt",
/* 480 */ "limit_clause_opt",
/* 481 */ "union_query_expression",
/* 482 */ "query_simple_or_subquery",
/* 483 */ "sort_specification_list",
/* 484 */ "sort_specification",
/* 485 */ "ordering_specification_opt",
/* 486 */ "null_ordering_opt",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
/* 0 */ "cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options",
/* 1 */ "cmd ::= ALTER ACCOUNT NK_ID alter_account_options",
/* 2 */ "account_options ::=",
/* 3 */ "account_options ::= account_options PPS literal",
/* 4 */ "account_options ::= account_options TSERIES literal",
/* 5 */ "account_options ::= account_options STORAGE literal",
/* 6 */ "account_options ::= account_options STREAMS literal",
/* 7 */ "account_options ::= account_options QTIME literal",
/* 8 */ "account_options ::= account_options DBS literal",
/* 9 */ "account_options ::= account_options USERS literal",
/* 10 */ "account_options ::= account_options CONNS literal",
/* 11 */ "account_options ::= account_options STATE literal",
/* 12 */ "alter_account_options ::= alter_account_option",
/* 13 */ "alter_account_options ::= alter_account_options alter_account_option",
/* 14 */ "alter_account_option ::= PASS literal",
/* 15 */ "alter_account_option ::= PPS literal",
/* 16 */ "alter_account_option ::= TSERIES literal",
/* 17 */ "alter_account_option ::= STORAGE literal",
/* 18 */ "alter_account_option ::= STREAMS literal",
/* 19 */ "alter_account_option ::= QTIME literal",
/* 20 */ "alter_account_option ::= DBS literal",
/* 21 */ "alter_account_option ::= USERS literal",
/* 22 */ "alter_account_option ::= CONNS literal",
/* 23 */ "alter_account_option ::= STATE literal",
2022-06-22 08:35:14 +00:00
/* 24 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt",
/* 25 */ "cmd ::= ALTER USER user_name PASS NK_STRING",
2022-06-22 08:35:14 +00:00
/* 26 */ "cmd ::= ALTER USER user_name ENABLE NK_INTEGER",
/* 27 */ "cmd ::= ALTER USER user_name SYSINFO NK_INTEGER",
/* 28 */ "cmd ::= DROP USER user_name",
/* 29 */ "sysinfo_opt ::=",
/* 30 */ "sysinfo_opt ::= SYSINFO NK_INTEGER",
2023-03-28 10:43:58 +00:00
/* 31 */ "cmd ::= GRANT privileges ON priv_level with_opt TO user_name",
/* 32 */ "cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name",
2022-06-22 08:35:14 +00:00
/* 33 */ "privileges ::= ALL",
/* 34 */ "privileges ::= priv_type_list",
/* 35 */ "privileges ::= SUBSCRIBE",
/* 36 */ "priv_type_list ::= priv_type",
/* 37 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type",
/* 38 */ "priv_type ::= READ",
/* 39 */ "priv_type ::= WRITE",
/* 40 */ "priv_level ::= NK_STAR NK_DOT NK_STAR",
/* 41 */ "priv_level ::= db_name NK_DOT NK_STAR",
2023-03-28 10:43:58 +00:00
/* 42 */ "priv_level ::= db_name NK_DOT table_name",
/* 43 */ "priv_level ::= topic_name",
/* 44 */ "with_opt ::=",
/* 45 */ "with_opt ::= WITH search_condition",
/* 46 */ "cmd ::= CREATE DNODE dnode_endpoint",
/* 47 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER",
/* 48 */ "cmd ::= DROP DNODE NK_INTEGER force_opt",
/* 49 */ "cmd ::= DROP DNODE dnode_endpoint force_opt",
2023-05-16 01:50:10 +00:00
/* 50 */ "cmd ::= DROP DNODE NK_INTEGER unsafe_opt",
/* 51 */ "cmd ::= DROP DNODE dnode_endpoint unsafe_opt",
/* 52 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING",
/* 53 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING",
/* 54 */ "cmd ::= ALTER ALL DNODES NK_STRING",
/* 55 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING",
/* 56 */ "cmd ::= RESTORE DNODE NK_INTEGER",
/* 57 */ "dnode_endpoint ::= NK_STRING",
/* 58 */ "dnode_endpoint ::= NK_ID",
/* 59 */ "dnode_endpoint ::= NK_IPTOKEN",
/* 60 */ "force_opt ::=",
/* 61 */ "force_opt ::= FORCE",
/* 62 */ "unsafe_opt ::= UNSAFE",
/* 63 */ "cmd ::= ALTER LOCAL NK_STRING",
/* 64 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING",
/* 65 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER",
/* 66 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER",
/* 67 */ "cmd ::= RESTORE QNODE ON DNODE NK_INTEGER",
/* 68 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER",
/* 69 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER",
/* 70 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER",
/* 71 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER",
/* 72 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER",
/* 73 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER",
/* 74 */ "cmd ::= RESTORE MNODE ON DNODE NK_INTEGER",
/* 75 */ "cmd ::= RESTORE VNODE ON DNODE NK_INTEGER",
/* 76 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options",
/* 77 */ "cmd ::= DROP DATABASE exists_opt db_name",
/* 78 */ "cmd ::= USE db_name",
/* 79 */ "cmd ::= ALTER DATABASE db_name alter_db_options",
/* 80 */ "cmd ::= FLUSH DATABASE db_name",
/* 81 */ "cmd ::= TRIM DATABASE db_name speed_opt",
/* 82 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt",
/* 83 */ "not_exists_opt ::= IF NOT EXISTS",
/* 84 */ "not_exists_opt ::=",
/* 85 */ "exists_opt ::= IF EXISTS",
/* 86 */ "exists_opt ::=",
/* 87 */ "db_options ::=",
/* 88 */ "db_options ::= db_options BUFFER NK_INTEGER",
/* 89 */ "db_options ::= db_options CACHEMODEL NK_STRING",
/* 90 */ "db_options ::= db_options CACHESIZE NK_INTEGER",
/* 91 */ "db_options ::= db_options COMP NK_INTEGER",
/* 92 */ "db_options ::= db_options DURATION NK_INTEGER",
/* 93 */ "db_options ::= db_options DURATION NK_VARIABLE",
/* 94 */ "db_options ::= db_options MAXROWS NK_INTEGER",
/* 95 */ "db_options ::= db_options MINROWS NK_INTEGER",
/* 96 */ "db_options ::= db_options KEEP integer_list",
/* 97 */ "db_options ::= db_options KEEP variable_list",
/* 98 */ "db_options ::= db_options PAGES NK_INTEGER",
/* 99 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
/* 100 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER",
/* 101 */ "db_options ::= db_options PRECISION NK_STRING",
/* 102 */ "db_options ::= db_options REPLICA NK_INTEGER",
/* 103 */ "db_options ::= db_options VGROUPS NK_INTEGER",
/* 104 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
/* 105 */ "db_options ::= db_options RETENTIONS retention_list",
/* 106 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
/* 107 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER",
/* 108 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER",
/* 109 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER",
/* 110 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
/* 111 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER",
/* 112 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
/* 113 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER",
/* 114 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER",
/* 115 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER",
/* 116 */ "db_options ::= db_options TABLE_PREFIX signed",
/* 117 */ "db_options ::= db_options TABLE_SUFFIX signed",
/* 118 */ "alter_db_options ::= alter_db_option",
/* 119 */ "alter_db_options ::= alter_db_options alter_db_option",
/* 120 */ "alter_db_option ::= BUFFER NK_INTEGER",
/* 121 */ "alter_db_option ::= CACHEMODEL NK_STRING",
/* 122 */ "alter_db_option ::= CACHESIZE NK_INTEGER",
/* 123 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER",
/* 124 */ "alter_db_option ::= KEEP integer_list",
/* 125 */ "alter_db_option ::= KEEP variable_list",
/* 126 */ "alter_db_option ::= PAGES NK_INTEGER",
/* 127 */ "alter_db_option ::= REPLICA NK_INTEGER",
/* 128 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER",
/* 129 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER",
/* 130 */ "alter_db_option ::= MINROWS NK_INTEGER",
/* 131 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER",
/* 132 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
/* 133 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER",
/* 134 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
/* 135 */ "integer_list ::= NK_INTEGER",
/* 136 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
/* 137 */ "variable_list ::= NK_VARIABLE",
/* 138 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
/* 139 */ "retention_list ::= retention",
/* 140 */ "retention_list ::= retention_list NK_COMMA retention",
/* 141 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
/* 142 */ "speed_opt ::=",
/* 143 */ "speed_opt ::= MAX_SPEED NK_INTEGER",
/* 144 */ "start_opt ::=",
/* 145 */ "start_opt ::= START WITH NK_INTEGER",
/* 146 */ "start_opt ::= START WITH NK_STRING",
/* 147 */ "start_opt ::= START WITH TIMESTAMP NK_STRING",
/* 148 */ "end_opt ::=",
/* 149 */ "end_opt ::= END WITH NK_INTEGER",
/* 150 */ "end_opt ::= END WITH NK_STRING",
/* 151 */ "end_opt ::= END WITH TIMESTAMP NK_STRING",
/* 152 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
/* 153 */ "cmd ::= CREATE TABLE multi_create_clause",
/* 154 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
/* 155 */ "cmd ::= DROP TABLE multi_drop_clause",
/* 156 */ "cmd ::= DROP STABLE exists_opt full_table_name",
/* 157 */ "cmd ::= ALTER TABLE alter_table_clause",
/* 158 */ "cmd ::= ALTER STABLE alter_table_clause",
/* 159 */ "alter_table_clause ::= full_table_name alter_table_options",
/* 160 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
/* 161 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
/* 162 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
/* 163 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
/* 164 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
/* 165 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
/* 166 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
/* 167 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
/* 168 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
/* 169 */ "multi_create_clause ::= create_subtable_clause",
/* 170 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
/* 171 */ "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",
/* 172 */ "multi_drop_clause ::= drop_table_clause",
/* 173 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause",
/* 174 */ "drop_table_clause ::= exists_opt full_table_name",
/* 175 */ "specific_cols_opt ::=",
/* 176 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP",
/* 177 */ "full_table_name ::= table_name",
/* 178 */ "full_table_name ::= db_name NK_DOT table_name",
/* 179 */ "column_def_list ::= column_def",
/* 180 */ "column_def_list ::= column_def_list NK_COMMA column_def",
/* 181 */ "column_def ::= column_name type_name",
/* 182 */ "type_name ::= BOOL",
/* 183 */ "type_name ::= TINYINT",
/* 184 */ "type_name ::= SMALLINT",
/* 185 */ "type_name ::= INT",
/* 186 */ "type_name ::= INTEGER",
/* 187 */ "type_name ::= BIGINT",
/* 188 */ "type_name ::= FLOAT",
/* 189 */ "type_name ::= DOUBLE",
/* 190 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
/* 191 */ "type_name ::= TIMESTAMP",
/* 192 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
/* 193 */ "type_name ::= TINYINT UNSIGNED",
/* 194 */ "type_name ::= SMALLINT UNSIGNED",
/* 195 */ "type_name ::= INT UNSIGNED",
/* 196 */ "type_name ::= BIGINT UNSIGNED",
/* 197 */ "type_name ::= JSON",
/* 198 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
/* 199 */ "type_name ::= MEDIUMBLOB",
/* 200 */ "type_name ::= BLOB",
/* 201 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
/* 202 */ "type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP",
/* 203 */ "type_name ::= DECIMAL",
/* 204 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
/* 205 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
/* 206 */ "tags_def_opt ::=",
/* 207 */ "tags_def_opt ::= tags_def",
/* 208 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
/* 209 */ "table_options ::=",
/* 210 */ "table_options ::= table_options COMMENT NK_STRING",
/* 211 */ "table_options ::= table_options MAX_DELAY duration_list",
/* 212 */ "table_options ::= table_options WATERMARK duration_list",
/* 213 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
/* 214 */ "table_options ::= table_options TTL NK_INTEGER",
/* 215 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
/* 216 */ "table_options ::= table_options DELETE_MARK duration_list",
/* 217 */ "alter_table_options ::= alter_table_option",
/* 218 */ "alter_table_options ::= alter_table_options alter_table_option",
/* 219 */ "alter_table_option ::= COMMENT NK_STRING",
/* 220 */ "alter_table_option ::= TTL NK_INTEGER",
/* 221 */ "duration_list ::= duration_literal",
/* 222 */ "duration_list ::= duration_list NK_COMMA duration_literal",
/* 223 */ "rollup_func_list ::= rollup_func_name",
/* 224 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
/* 225 */ "rollup_func_name ::= function_name",
/* 226 */ "rollup_func_name ::= FIRST",
/* 227 */ "rollup_func_name ::= LAST",
/* 228 */ "col_name_list ::= col_name",
/* 229 */ "col_name_list ::= col_name_list NK_COMMA col_name",
/* 230 */ "col_name ::= column_name",
/* 231 */ "cmd ::= SHOW DNODES",
/* 232 */ "cmd ::= SHOW USERS",
/* 233 */ "cmd ::= SHOW USER PRIVILEGES",
/* 234 */ "cmd ::= SHOW DATABASES",
/* 235 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt",
/* 236 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
/* 237 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
/* 238 */ "cmd ::= SHOW MNODES",
/* 239 */ "cmd ::= SHOW QNODES",
/* 240 */ "cmd ::= SHOW FUNCTIONS",
/* 241 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
/* 242 */ "cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name",
/* 243 */ "cmd ::= SHOW STREAMS",
/* 244 */ "cmd ::= SHOW ACCOUNTS",
/* 245 */ "cmd ::= SHOW APPS",
/* 246 */ "cmd ::= SHOW CONNECTIONS",
/* 247 */ "cmd ::= SHOW LICENCES",
/* 248 */ "cmd ::= SHOW GRANTS",
/* 249 */ "cmd ::= SHOW CREATE DATABASE db_name",
/* 250 */ "cmd ::= SHOW CREATE TABLE full_table_name",
/* 251 */ "cmd ::= SHOW CREATE STABLE full_table_name",
/* 252 */ "cmd ::= SHOW QUERIES",
/* 253 */ "cmd ::= SHOW SCORES",
/* 254 */ "cmd ::= SHOW TOPICS",
/* 255 */ "cmd ::= SHOW VARIABLES",
/* 256 */ "cmd ::= SHOW CLUSTER VARIABLES",
/* 257 */ "cmd ::= SHOW LOCAL VARIABLES",
/* 258 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt",
/* 259 */ "cmd ::= SHOW BNODES",
/* 260 */ "cmd ::= SHOW SNODES",
/* 261 */ "cmd ::= SHOW CLUSTER",
/* 262 */ "cmd ::= SHOW TRANSACTIONS",
/* 263 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
/* 264 */ "cmd ::= SHOW CONSUMERS",
/* 265 */ "cmd ::= SHOW SUBSCRIPTIONS",
/* 266 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt",
/* 267 */ "cmd ::= SHOW TAGS FROM db_name NK_DOT table_name",
/* 268 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt",
/* 269 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name",
/* 270 */ "cmd ::= SHOW VNODES ON DNODE NK_INTEGER",
/* 271 */ "cmd ::= SHOW VNODES ON DNODE NK_STRING",
/* 272 */ "cmd ::= SHOW db_name_cond_opt ALIVE",
/* 273 */ "cmd ::= SHOW CLUSTER ALIVE",
/* 274 */ "db_name_cond_opt ::=",
/* 275 */ "db_name_cond_opt ::= db_name NK_DOT",
/* 276 */ "like_pattern_opt ::=",
/* 277 */ "like_pattern_opt ::= LIKE NK_STRING",
/* 278 */ "table_name_cond ::= table_name",
/* 279 */ "from_db_opt ::=",
/* 280 */ "from_db_opt ::= FROM db_name",
/* 281 */ "tag_list_opt ::=",
/* 282 */ "tag_list_opt ::= tag_item",
/* 283 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item",
/* 284 */ "tag_item ::= TBNAME",
/* 285 */ "tag_item ::= QTAGS",
/* 286 */ "tag_item ::= column_name",
/* 287 */ "tag_item ::= column_name column_alias",
/* 288 */ "tag_item ::= column_name AS column_alias",
/* 289 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options",
/* 290 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP",
/* 291 */ "cmd ::= DROP INDEX exists_opt full_index_name",
/* 292 */ "full_index_name ::= index_name",
/* 293 */ "full_index_name ::= db_name NK_DOT index_name",
/* 294 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt",
/* 295 */ "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",
/* 296 */ "func_list ::= func",
/* 297 */ "func_list ::= func_list NK_COMMA func",
/* 298 */ "func ::= sma_func_name NK_LP expression_list NK_RP",
/* 299 */ "sma_func_name ::= function_name",
/* 300 */ "sma_func_name ::= COUNT",
/* 301 */ "sma_func_name ::= FIRST",
/* 302 */ "sma_func_name ::= LAST",
/* 303 */ "sma_func_name ::= LAST_ROW",
/* 304 */ "sma_stream_opt ::=",
/* 305 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal",
/* 306 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal",
/* 307 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal",
/* 308 */ "with_meta ::= AS",
/* 309 */ "with_meta ::= WITH META AS",
/* 310 */ "with_meta ::= ONLY META AS",
/* 311 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery",
/* 312 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name",
/* 313 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt",
/* 314 */ "cmd ::= DROP TOPIC exists_opt topic_name",
/* 315 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
/* 316 */ "cmd ::= DESC full_table_name",
/* 317 */ "cmd ::= DESCRIBE full_table_name",
/* 318 */ "cmd ::= RESET QUERY CACHE",
/* 319 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery",
/* 320 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query",
/* 321 */ "analyze_opt ::=",
/* 322 */ "analyze_opt ::= ANALYZE",
/* 323 */ "explain_options ::=",
/* 324 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
/* 325 */ "explain_options ::= explain_options RATIO NK_FLOAT",
/* 326 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt",
/* 327 */ "cmd ::= DROP FUNCTION exists_opt function_name",
/* 328 */ "agg_func_opt ::=",
/* 329 */ "agg_func_opt ::= AGGREGATE",
/* 330 */ "bufsize_opt ::=",
/* 331 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
/* 332 */ "language_opt ::=",
/* 333 */ "language_opt ::= LANGUAGE NK_STRING",
/* 334 */ "or_replace_opt ::=",
/* 335 */ "or_replace_opt ::= OR REPLACE",
/* 336 */ "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",
/* 337 */ "cmd ::= DROP STREAM exists_opt stream_name",
/* 338 */ "cmd ::= PAUSE STREAM exists_opt stream_name",
/* 339 */ "cmd ::= RESUME STREAM exists_opt ignore_opt stream_name",
/* 340 */ "col_list_opt ::=",
/* 341 */ "col_list_opt ::= NK_LP col_name_list NK_RP",
/* 342 */ "tag_def_or_ref_opt ::=",
/* 343 */ "tag_def_or_ref_opt ::= tags_def",
/* 344 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP",
/* 345 */ "stream_options ::=",
/* 346 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
/* 347 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
/* 348 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
/* 349 */ "stream_options ::= stream_options WATERMARK duration_literal",
/* 350 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER",
/* 351 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER",
/* 352 */ "stream_options ::= stream_options DELETE_MARK duration_literal",
/* 353 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER",
/* 354 */ "subtable_opt ::=",
/* 355 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP",
/* 356 */ "ignore_opt ::=",
/* 357 */ "ignore_opt ::= IGNORE UNTREATED",
/* 358 */ "cmd ::= KILL CONNECTION NK_INTEGER",
/* 359 */ "cmd ::= KILL QUERY NK_STRING",
/* 360 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
/* 361 */ "cmd ::= BALANCE VGROUP",
/* 362 */ "cmd ::= BALANCE VGROUP LEADER",
/* 363 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
/* 364 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
/* 365 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
/* 366 */ "dnode_list ::= DNODE NK_INTEGER",
/* 367 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
/* 368 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
/* 369 */ "cmd ::= query_or_subquery",
/* 370 */ "cmd ::= insert_query",
/* 371 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery",
/* 372 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery",
/* 373 */ "literal ::= NK_INTEGER",
/* 374 */ "literal ::= NK_FLOAT",
/* 375 */ "literal ::= NK_STRING",
/* 376 */ "literal ::= NK_BOOL",
/* 377 */ "literal ::= TIMESTAMP NK_STRING",
/* 378 */ "literal ::= duration_literal",
/* 379 */ "literal ::= NULL",
/* 380 */ "literal ::= NK_QUESTION",
/* 381 */ "duration_literal ::= NK_VARIABLE",
/* 382 */ "signed ::= NK_INTEGER",
/* 383 */ "signed ::= NK_PLUS NK_INTEGER",
/* 384 */ "signed ::= NK_MINUS NK_INTEGER",
/* 385 */ "signed ::= NK_FLOAT",
/* 386 */ "signed ::= NK_PLUS NK_FLOAT",
/* 387 */ "signed ::= NK_MINUS NK_FLOAT",
/* 388 */ "signed_literal ::= signed",
/* 389 */ "signed_literal ::= NK_STRING",
/* 390 */ "signed_literal ::= NK_BOOL",
/* 391 */ "signed_literal ::= TIMESTAMP NK_STRING",
/* 392 */ "signed_literal ::= duration_literal",
/* 393 */ "signed_literal ::= NULL",
/* 394 */ "signed_literal ::= literal_func",
/* 395 */ "signed_literal ::= NK_QUESTION",
/* 396 */ "literal_list ::= signed_literal",
/* 397 */ "literal_list ::= literal_list NK_COMMA signed_literal",
/* 398 */ "db_name ::= NK_ID",
/* 399 */ "table_name ::= NK_ID",
/* 400 */ "column_name ::= NK_ID",
/* 401 */ "function_name ::= NK_ID",
/* 402 */ "table_alias ::= NK_ID",
/* 403 */ "column_alias ::= NK_ID",
/* 404 */ "user_name ::= NK_ID",
/* 405 */ "topic_name ::= NK_ID",
/* 406 */ "stream_name ::= NK_ID",
/* 407 */ "cgroup_name ::= NK_ID",
/* 408 */ "index_name ::= NK_ID",
/* 409 */ "expr_or_subquery ::= expression",
/* 410 */ "expression ::= literal",
/* 411 */ "expression ::= pseudo_column",
/* 412 */ "expression ::= column_reference",
/* 413 */ "expression ::= function_expression",
/* 414 */ "expression ::= case_when_expression",
/* 415 */ "expression ::= NK_LP expression NK_RP",
/* 416 */ "expression ::= NK_PLUS expr_or_subquery",
/* 417 */ "expression ::= NK_MINUS expr_or_subquery",
/* 418 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
/* 419 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
/* 420 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
/* 421 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
/* 422 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
/* 423 */ "expression ::= column_reference NK_ARROW NK_STRING",
/* 424 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
/* 425 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
/* 426 */ "expression_list ::= expr_or_subquery",
/* 427 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
/* 428 */ "column_reference ::= column_name",
/* 429 */ "column_reference ::= table_name NK_DOT column_name",
/* 430 */ "pseudo_column ::= ROWTS",
/* 431 */ "pseudo_column ::= TBNAME",
/* 432 */ "pseudo_column ::= table_name NK_DOT TBNAME",
/* 433 */ "pseudo_column ::= QSTART",
/* 434 */ "pseudo_column ::= QEND",
/* 435 */ "pseudo_column ::= QDURATION",
/* 436 */ "pseudo_column ::= WSTART",
/* 437 */ "pseudo_column ::= WEND",
/* 438 */ "pseudo_column ::= WDURATION",
/* 439 */ "pseudo_column ::= IROWTS",
/* 440 */ "pseudo_column ::= ISFILLED",
/* 441 */ "pseudo_column ::= QTAGS",
/* 442 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
/* 443 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
/* 444 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
/* 445 */ "function_expression ::= literal_func",
/* 446 */ "literal_func ::= noarg_func NK_LP NK_RP",
/* 447 */ "literal_func ::= NOW",
/* 448 */ "noarg_func ::= NOW",
/* 449 */ "noarg_func ::= TODAY",
/* 450 */ "noarg_func ::= TIMEZONE",
/* 451 */ "noarg_func ::= DATABASE",
/* 452 */ "noarg_func ::= CLIENT_VERSION",
/* 453 */ "noarg_func ::= SERVER_VERSION",
/* 454 */ "noarg_func ::= SERVER_STATUS",
/* 455 */ "noarg_func ::= CURRENT_USER",
/* 456 */ "noarg_func ::= USER",
/* 457 */ "star_func ::= COUNT",
/* 458 */ "star_func ::= FIRST",
/* 459 */ "star_func ::= LAST",
/* 460 */ "star_func ::= LAST_ROW",
/* 461 */ "star_func_para_list ::= NK_STAR",
/* 462 */ "star_func_para_list ::= other_para_list",
/* 463 */ "other_para_list ::= star_func_para",
/* 464 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
/* 465 */ "star_func_para ::= expr_or_subquery",
/* 466 */ "star_func_para ::= table_name NK_DOT NK_STAR",
/* 467 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
/* 468 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
/* 469 */ "when_then_list ::= when_then_expr",
/* 470 */ "when_then_list ::= when_then_list when_then_expr",
/* 471 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
/* 472 */ "case_when_else_opt ::=",
/* 473 */ "case_when_else_opt ::= ELSE common_expression",
/* 474 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
/* 475 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
/* 476 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
/* 477 */ "predicate ::= expr_or_subquery IS NULL",
/* 478 */ "predicate ::= expr_or_subquery IS NOT NULL",
/* 479 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
/* 480 */ "compare_op ::= NK_LT",
/* 481 */ "compare_op ::= NK_GT",
/* 482 */ "compare_op ::= NK_LE",
/* 483 */ "compare_op ::= NK_GE",
/* 484 */ "compare_op ::= NK_NE",
/* 485 */ "compare_op ::= NK_EQ",
/* 486 */ "compare_op ::= LIKE",
/* 487 */ "compare_op ::= NOT LIKE",
/* 488 */ "compare_op ::= MATCH",
/* 489 */ "compare_op ::= NMATCH",
/* 490 */ "compare_op ::= CONTAINS",
/* 491 */ "in_op ::= IN",
/* 492 */ "in_op ::= NOT IN",
/* 493 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
/* 494 */ "boolean_value_expression ::= boolean_primary",
/* 495 */ "boolean_value_expression ::= NOT boolean_primary",
/* 496 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
/* 497 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
/* 498 */ "boolean_primary ::= predicate",
/* 499 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
/* 500 */ "common_expression ::= expr_or_subquery",
/* 501 */ "common_expression ::= boolean_value_expression",
/* 502 */ "from_clause_opt ::=",
/* 503 */ "from_clause_opt ::= FROM table_reference_list",
/* 504 */ "table_reference_list ::= table_reference",
/* 505 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
/* 506 */ "table_reference ::= table_primary",
/* 507 */ "table_reference ::= joined_table",
/* 508 */ "table_primary ::= table_name alias_opt",
/* 509 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
/* 510 */ "table_primary ::= subquery alias_opt",
/* 511 */ "table_primary ::= parenthesized_joined_table",
/* 512 */ "alias_opt ::=",
/* 513 */ "alias_opt ::= table_alias",
/* 514 */ "alias_opt ::= AS table_alias",
/* 515 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
/* 516 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
/* 517 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
/* 518 */ "join_type ::=",
/* 519 */ "join_type ::= INNER",
/* 520 */ "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",
/* 521 */ "set_quantifier_opt ::=",
/* 522 */ "set_quantifier_opt ::= DISTINCT",
/* 523 */ "set_quantifier_opt ::= ALL",
/* 524 */ "select_list ::= select_item",
/* 525 */ "select_list ::= select_list NK_COMMA select_item",
/* 526 */ "select_item ::= NK_STAR",
/* 527 */ "select_item ::= common_expression",
/* 528 */ "select_item ::= common_expression column_alias",
/* 529 */ "select_item ::= common_expression AS column_alias",
/* 530 */ "select_item ::= table_name NK_DOT NK_STAR",
/* 531 */ "where_clause_opt ::=",
/* 532 */ "where_clause_opt ::= WHERE search_condition",
/* 533 */ "partition_by_clause_opt ::=",
/* 534 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
/* 535 */ "partition_list ::= partition_item",
/* 536 */ "partition_list ::= partition_list NK_COMMA partition_item",
/* 537 */ "partition_item ::= expr_or_subquery",
/* 538 */ "partition_item ::= expr_or_subquery column_alias",
/* 539 */ "partition_item ::= expr_or_subquery AS column_alias",
/* 540 */ "twindow_clause_opt ::=",
/* 541 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
/* 542 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
/* 543 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
/* 544 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
/* 545 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition",
/* 546 */ "sliding_opt ::=",
/* 547 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
/* 548 */ "fill_opt ::=",
/* 549 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
/* 550 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP",
/* 551 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP",
/* 552 */ "fill_mode ::= NONE",
/* 553 */ "fill_mode ::= PREV",
/* 554 */ "fill_mode ::= NULL",
/* 555 */ "fill_mode ::= NULL_F",
/* 556 */ "fill_mode ::= LINEAR",
/* 557 */ "fill_mode ::= NEXT",
/* 558 */ "group_by_clause_opt ::=",
/* 559 */ "group_by_clause_opt ::= GROUP BY group_by_list",
/* 560 */ "group_by_list ::= expr_or_subquery",
/* 561 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
/* 562 */ "having_clause_opt ::=",
/* 563 */ "having_clause_opt ::= HAVING search_condition",
/* 564 */ "range_opt ::=",
/* 565 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
/* 566 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP",
/* 567 */ "every_opt ::=",
/* 568 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
/* 569 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
/* 570 */ "query_simple ::= query_specification",
/* 571 */ "query_simple ::= union_query_expression",
/* 572 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
/* 573 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
/* 574 */ "query_simple_or_subquery ::= query_simple",
/* 575 */ "query_simple_or_subquery ::= subquery",
/* 576 */ "query_or_subquery ::= query_expression",
/* 577 */ "query_or_subquery ::= subquery",
/* 578 */ "order_by_clause_opt ::=",
/* 579 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
/* 580 */ "slimit_clause_opt ::=",
/* 581 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
/* 582 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
/* 583 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 584 */ "limit_clause_opt ::=",
/* 585 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
/* 586 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
/* 587 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 588 */ "subquery ::= NK_LP query_expression NK_RP",
/* 589 */ "subquery ::= NK_LP subquery NK_RP",
/* 590 */ "search_condition ::= common_expression",
/* 591 */ "sort_specification_list ::= sort_specification",
/* 592 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
/* 593 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
/* 594 */ "ordering_specification_opt ::=",
/* 595 */ "ordering_specification_opt ::= ASC",
/* 596 */ "ordering_specification_opt ::= DESC",
/* 597 */ "null_ordering_opt ::=",
/* 598 */ "null_ordering_opt ::= NULLS FIRST",
/* 599 */ "null_ordering_opt ::= NULLS LAST",
};
#endif /* NDEBUG */
#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack. Return the number
** of errors. Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
int newSize;
int idx;
yyStackEntry *pNew;
newSize = p->yystksz*2 + 100;
idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
if( p->yystack==&p->yystk0 ){
2022-03-28 09:08:48 +00:00
pNew = malloc(newSize*sizeof(pNew[0]));
if( pNew ) pNew[0] = p->yystk0;
}else{
2022-03-28 09:08:48 +00:00
pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
}
if( pNew ){
p->yystack = pNew;
p->yytos = &p->yystack[idx];
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
yyTracePrompt, p->yystksz, newSize);
}
#endif
p->yystksz = newSize;
}
return pNew==0;
}
#endif
/* Datatype of the argument to the memory allocated passed as the
2022-03-10 07:36:06 +00:00
** second argument to ParseAlloc() below. This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif
/* Initialize a new parser that has already been allocated.
*/
2022-03-10 07:36:06 +00:00
void ParseInit(void *yypRawParser ParseCTX_PDECL){
yyParser *yypParser = (yyParser*)yypRawParser;
2022-03-10 07:36:06 +00:00
ParseCTX_STORE
#ifdef YYTRACKMAXSTACKDEPTH
yypParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
yypParser->yytos = NULL;
yypParser->yystack = NULL;
yypParser->yystksz = 0;
if( yyGrowStack(yypParser) ){
yypParser->yystack = &yypParser->yystk0;
yypParser->yystksz = 1;
}
#endif
#ifndef YYNOERRORRECOVERY
yypParser->yyerrcnt = -1;
#endif
yypParser->yytos = yypParser->yystack;
yypParser->yystack[0].stateno = 0;
yypParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
#endif
}
2022-03-10 07:36:06 +00:00
#ifndef Parse_ENGINEALWAYSONSTACK
/*
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser. This pointer is used in subsequent calls
2022-03-10 07:36:06 +00:00
** to Parse and ParseFree.
*/
2022-03-10 07:36:06 +00:00
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
yyParser *yypParser;
yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
if( yypParser ){
2022-03-10 07:36:06 +00:00
ParseCTX_STORE
ParseInit(yypParser ParseCTX_PARAM);
}
return (void*)yypParser;
}
2022-03-10 07:36:06 +00:00
#endif /* Parse_ENGINEALWAYSONSTACK */
/* The following function deletes the "minor type" or semantic value
** associated with a symbol. The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted. The code used to do the
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
yyParser *yypParser, /* The parser */
YYCODETYPE yymajor, /* Type code for object to destroy */
YYMINORTYPE *yypminor /* The object to be destroyed */
){
2022-03-10 07:36:06 +00:00
ParseARG_FETCH
ParseCTX_FETCH
switch( yymajor ){
/* Here is inserted the actions which take place when a
** terminal or non-terminal is destroyed. This can happen
** when the symbol is popped from the stack during a
** reduce or during error processing or when a parser is
** being destroyed before it is finished parsing.
**
** Note: during a reduce, the only symbols destroyed are those
** which appear on the RHS of the rule, but which are *not* used
** inside the C code.
*/
/********* Begin destructor definitions ***************************************/
/* Default NON-TERMINAL Destructor */
2023-06-30 08:57:29 +00:00
case 338: /* cmd */
case 341: /* literal */
case 347: /* with_opt */
case 353: /* search_condition */
case 358: /* db_options */
case 360: /* alter_db_options */
case 362: /* start_opt */
case 363: /* end_opt */
case 367: /* signed */
case 369: /* retention */
case 370: /* full_table_name */
case 373: /* table_options */
case 377: /* alter_table_clause */
case 378: /* alter_table_options */
case 381: /* signed_literal */
case 382: /* create_subtable_clause */
case 385: /* drop_table_clause */
case 387: /* column_def */
case 391: /* duration_literal */
case 392: /* rollup_func_name */
case 394: /* col_name */
case 395: /* db_name_cond_opt */
case 396: /* like_pattern_opt */
case 397: /* table_name_cond */
case 398: /* from_db_opt */
case 400: /* tag_item */
case 402: /* full_index_name */
case 403: /* index_options */
case 406: /* sliding_opt */
case 407: /* sma_stream_opt */
case 408: /* func */
2023-06-30 11:36:39 +00:00
case 411: /* query_or_subquery */
case 412: /* where_clause_opt */
case 415: /* explain_options */
case 416: /* insert_query */
case 422: /* stream_options */
case 425: /* subtable_opt */
case 427: /* expression */
case 429: /* literal_func */
case 432: /* expr_or_subquery */
case 433: /* pseudo_column */
case 434: /* column_reference */
case 435: /* function_expression */
case 436: /* case_when_expression */
case 441: /* star_func_para */
case 443: /* case_when_else_opt */
case 444: /* common_expression */
case 445: /* when_then_expr */
case 446: /* predicate */
case 449: /* in_predicate_value */
case 450: /* boolean_value_expression */
case 451: /* boolean_primary */
case 452: /* from_clause_opt */
case 453: /* table_reference_list */
case 454: /* table_reference */
case 455: /* table_primary */
case 456: /* joined_table */
case 458: /* subquery */
case 459: /* parenthesized_joined_table */
case 461: /* query_specification */
case 465: /* range_opt */
case 466: /* every_opt */
case 467: /* fill_opt */
case 468: /* twindow_clause_opt */
case 470: /* having_clause_opt */
case 471: /* select_item */
case 473: /* partition_item */
case 476: /* query_expression */
case 477: /* query_simple */
case 479: /* slimit_clause_opt */
case 480: /* limit_clause_opt */
case 481: /* union_query_expression */
case 482: /* query_simple_or_subquery */
case 484: /* sort_specification */
2022-06-22 08:35:14 +00:00
{
#line 7 "sql.y"
2023-06-30 11:36:39 +00:00
nodesDestroyNode((yypminor->yy452));
#line 3119 "sql.c"
2022-06-22 08:35:14 +00:00
}
break;
2023-06-30 08:57:29 +00:00
case 339: /* account_options */
case 340: /* alter_account_options */
case 342: /* alter_account_option */
case 361: /* speed_opt */
2023-06-30 11:36:39 +00:00
case 410: /* with_meta */
case 419: /* bufsize_opt */
{
#line 54 "sql.y"
2022-06-22 08:35:14 +00:00
#line 3131 "sql.c"
}
break;
2023-06-30 08:57:29 +00:00
case 343: /* user_name */
case 350: /* db_name */
case 351: /* table_name */
case 352: /* topic_name */
case 354: /* dnode_endpoint */
case 379: /* column_name */
case 393: /* function_name */
case 401: /* column_alias */
case 404: /* index_name */
case 409: /* sma_func_name */
2023-06-30 11:36:39 +00:00
case 413: /* cgroup_name */
case 420: /* language_opt */
case 421: /* stream_name */
case 431: /* table_alias */
case 437: /* star_func */
case 439: /* noarg_func */
case 457: /* alias_opt */
{
#line 742 "sql.y"
#line 3154 "sql.c"
}
break;
2023-06-30 08:57:29 +00:00
case 344: /* sysinfo_opt */
{
#line 92 "sql.y"
2022-03-05 23:12:08 +00:00
#line 3161 "sql.c"
}
break;
2023-06-30 08:57:29 +00:00
case 345: /* privileges */
case 348: /* priv_type_list */
case 349: /* priv_type */
2023-03-28 10:43:58 +00:00
{
#line 101 "sql.y"
2023-03-28 10:43:58 +00:00
#line 3170 "sql.c"
2023-03-28 10:43:58 +00:00
}
break;
2023-06-30 08:57:29 +00:00
case 346: /* priv_level */
{
#line 117 "sql.y"
#line 3177 "sql.c"
}
break;
2023-06-30 08:57:29 +00:00
case 355: /* force_opt */
case 356: /* unsafe_opt */
case 357: /* not_exists_opt */
case 359: /* exists_opt */
2023-06-30 11:36:39 +00:00
case 414: /* analyze_opt */
case 417: /* or_replace_opt */
case 418: /* agg_func_opt */
case 426: /* ignore_opt */
case 462: /* set_quantifier_opt */
{
#line 146 "sql.y"
#line 3192 "sql.c"
}
break;
2023-06-30 08:57:29 +00:00
case 364: /* integer_list */
case 365: /* variable_list */
case 366: /* retention_list */
case 371: /* column_def_list */
case 372: /* tags_def_opt */
case 374: /* multi_create_clause */
case 375: /* tags_def */
case 376: /* multi_drop_clause */
case 383: /* specific_cols_opt */
case 384: /* expression_list */
case 386: /* col_name_list */
case 388: /* duration_list */
case 389: /* rollup_func_list */
case 399: /* tag_list_opt */
case 405: /* func_list */
2023-06-30 11:36:39 +00:00
case 423: /* col_list_opt */
case 424: /* tag_def_or_ref_opt */
case 428: /* dnode_list */
case 430: /* literal_list */
case 438: /* star_func_para_list */
case 440: /* other_para_list */
case 442: /* when_then_list */
case 463: /* select_list */
case 464: /* partition_by_clause_opt */
case 469: /* group_by_clause_opt */
case 472: /* partition_list */
case 475: /* group_by_list */
case 478: /* order_by_clause_opt */
case 483: /* sort_specification_list */
{
#line 270 "sql.y"
2023-06-30 11:36:39 +00:00
nodesDestroyList((yypminor->yy812));
#line 3227 "sql.c"
}
break;
2023-06-30 08:57:29 +00:00
case 368: /* alter_db_option */
case 390: /* alter_table_option */
{
#line 243 "sql.y"
2022-03-31 11:38:17 +00:00
#line 3235 "sql.c"
}
break;
2023-06-30 08:57:29 +00:00
case 380: /* type_name */
{
#line 364 "sql.y"
2022-03-05 23:12:08 +00:00
#line 3242 "sql.c"
}
break;
2023-06-30 11:36:39 +00:00
case 447: /* compare_op */
case 448: /* in_op */
{
#line 930 "sql.y"
2022-03-05 23:12:08 +00:00
#line 3250 "sql.c"
}
break;
2023-06-30 11:36:39 +00:00
case 460: /* join_type */
{
#line 1006 "sql.y"
2022-03-05 23:12:08 +00:00
#line 3257 "sql.c"
}
break;
2023-06-30 11:36:39 +00:00
case 474: /* fill_mode */
{
#line 1081 "sql.y"
2022-03-05 23:12:08 +00:00
#line 3264 "sql.c"
}
break;
2023-06-30 11:36:39 +00:00
case 485: /* ordering_specification_opt */
{
#line 1166 "sql.y"
2022-03-05 23:12:08 +00:00
#line 3271 "sql.c"
}
break;
2023-06-30 11:36:39 +00:00
case 486: /* null_ordering_opt */
{
#line 1172 "sql.y"
2022-03-05 23:12:08 +00:00
#line 3278 "sql.c"
}
break;
/********* End destructor definitions *****************************************/
default: break; /* If no destructor action specified: do nothing */
}
}
/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
yyStackEntry *yytos;
assert( pParser->yytos!=0 );
assert( pParser->yytos > pParser->yystack );
yytos = pParser->yytos--;
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sPopping %s\n",
yyTracePrompt,
yyTokenName[yytos->major]);
}
#endif
yy_destructor(pParser, yytos->major, &yytos->minor);
}
/*
** Clear all secondary memory allocations from the parser
*/
2022-03-10 07:36:06 +00:00
void ParseFinalize(void *p){
yyParser *pParser = (yyParser*)p;
while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
2022-03-28 09:08:48 +00:00
if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}
2022-03-10 07:36:06 +00:00
#ifndef Parse_ENGINEALWAYSONSTACK
/*
** Deallocate and destroy a parser. Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
2022-03-10 07:36:06 +00:00
void ParseFree(
void *p, /* The parser to be deleted */
void (*freeProc)(void*) /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
if( p==0 ) return;
#endif
2022-03-10 07:36:06 +00:00
ParseFinalize(p);
(*freeProc)(p);
}
2022-03-10 07:36:06 +00:00
#endif /* Parse_ENGINEALWAYSONSTACK */
/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
2022-03-10 07:36:06 +00:00
int ParseStackPeak(void *p){
yyParser *pParser = (yyParser*)p;
return pParser->yyhwm;
}
#endif
/* This array of booleans keeps track of the parser statement
** coverage. The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y. In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif
/*
** Write into out a description of every state/lookahead combination that
**
** (1) has not been used by the parser, and
** (2) is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
2022-03-10 07:36:06 +00:00
int ParseCoverage(FILE *out){
int stateno, iLookAhead, i;
int nMissed = 0;
for(stateno=0; stateno<YYNSTATE; stateno++){
i = yy_shift_ofst[stateno];
for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
if( out ){
fprintf(out,"State %d lookahead %s %s\n", stateno,
yyTokenName[iLookAhead],
yycoverage[stateno][iLookAhead] ? "ok" : "missed");
}
}
}
return nMissed;
}
#endif
/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_shift_action(
YYCODETYPE iLookAhead, /* The look-ahead token */
YYACTIONTYPE stateno /* Current state number */
){
int i;
if( stateno>YY_MAX_SHIFT ) return stateno;
assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
yycoverage[stateno][iLookAhead] = 1;
#endif
do{
i = yy_shift_ofst[stateno];
assert( i>=0 );
2023-05-09 11:19:14 +00:00
assert( i<=YY_ACTTAB_COUNT );
assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
assert( iLookAhead!=YYNOCODE );
assert( iLookAhead < YYNTOKEN );
i += iLookAhead;
2023-05-09 11:19:14 +00:00
assert( i<(int)YY_NLOOKAHEAD );
if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
YYCODETYPE iFallback; /* Fallback token */
2023-05-09 11:19:14 +00:00
assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
iFallback = yyFallback[iLookAhead];
if( iFallback!=0 ){
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
}
#endif
assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
iLookAhead = iFallback;
continue;
}
#endif
#ifdef YYWILDCARD
{
int j = i - iLookAhead + YYWILDCARD;
2023-05-09 11:19:14 +00:00
assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
yyTracePrompt, yyTokenName[iLookAhead],
yyTokenName[YYWILDCARD]);
}
#endif /* NDEBUG */
return yy_action[j];
}
}
#endif /* YYWILDCARD */
return yy_default[stateno];
}else{
assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
return yy_action[i];
}
}while(1);
}
/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_reduce_action(
YYACTIONTYPE stateno, /* Current state number */
YYCODETYPE iLookAhead /* The look-ahead token */
){
int i;
#ifdef YYERRORSYMBOL
if( stateno>YY_REDUCE_COUNT ){
return yy_default[stateno];
}
#else
assert( stateno<=YY_REDUCE_COUNT );
#endif
i = yy_reduce_ofst[stateno];
assert( iLookAhead!=YYNOCODE );
i += iLookAhead;
#ifdef YYERRORSYMBOL
if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
return yy_default[stateno];
}
#else
assert( i>=0 && i<YY_ACTTAB_COUNT );
assert( yy_lookahead[i]==iLookAhead );
#endif
return yy_action[i];
}
/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
2022-03-10 07:36:06 +00:00
ParseARG_FETCH
ParseCTX_FETCH
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
}
#endif
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
/* Here code is inserted which will execute if the parser
** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
/******** End %stack_overflow code ********************************************/
2022-03-10 07:36:06 +00:00
ParseARG_STORE /* Suppress warning about unused %extra_argument var */
ParseCTX_STORE
}
/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
if( yyTraceFILE ){
if( yyNewState<YYNSTATE ){
fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
yyNewState);
}else{
fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
yyNewState - YY_MIN_REDUCE);
}
}
}
#else
# define yyTraceShift(X,Y,Z)
#endif
/*
** Perform a shift action.
*/
static void yy_shift(
yyParser *yypParser, /* The parser to be shifted */
YYACTIONTYPE yyNewState, /* The new state to shift in */
YYCODETYPE yyMajor, /* The major token to shift in */
2022-03-10 07:36:06 +00:00
ParseTOKENTYPE yyMinor /* The minor token to shift in */
){
yyStackEntry *yytos;
yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
yypParser->yyhwm++;
assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
}
#endif
#if YYSTACKDEPTH>0
if( yypParser->yytos>yypParser->yystackEnd ){
yypParser->yytos--;
yyStackOverflow(yypParser);
return;
}
#else
if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
if( yyGrowStack(yypParser) ){
yypParser->yytos--;
yyStackOverflow(yypParser);
return;
}
}
#endif
if( yyNewState > YY_MAX_SHIFT ){
yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
}
yytos = yypParser->yytos;
yytos->stateno = yyNewState;
yytos->major = yyMajor;
yytos->minor.yy0 = yyMinor;
yyTraceShift(yypParser, yyNewState, "Shift");
}
2023-05-09 11:19:14 +00:00
/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
** of that rule */
static const YYCODETYPE yyRuleInfoLhs[] = {
2023-06-30 08:57:29 +00:00
338, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
338, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
339, /* (2) account_options ::= */
339, /* (3) account_options ::= account_options PPS literal */
339, /* (4) account_options ::= account_options TSERIES literal */
339, /* (5) account_options ::= account_options STORAGE literal */
339, /* (6) account_options ::= account_options STREAMS literal */
339, /* (7) account_options ::= account_options QTIME literal */
339, /* (8) account_options ::= account_options DBS literal */
339, /* (9) account_options ::= account_options USERS literal */
339, /* (10) account_options ::= account_options CONNS literal */
339, /* (11) account_options ::= account_options STATE literal */
340, /* (12) alter_account_options ::= alter_account_option */
340, /* (13) alter_account_options ::= alter_account_options alter_account_option */
342, /* (14) alter_account_option ::= PASS literal */
342, /* (15) alter_account_option ::= PPS literal */
342, /* (16) alter_account_option ::= TSERIES literal */
342, /* (17) alter_account_option ::= STORAGE literal */
342, /* (18) alter_account_option ::= STREAMS literal */
342, /* (19) alter_account_option ::= QTIME literal */
342, /* (20) alter_account_option ::= DBS literal */
342, /* (21) alter_account_option ::= USERS literal */
342, /* (22) alter_account_option ::= CONNS literal */
342, /* (23) alter_account_option ::= STATE literal */
338, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
338, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
338, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
338, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
338, /* (28) cmd ::= DROP USER user_name */
344, /* (29) sysinfo_opt ::= */
344, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
338, /* (31) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
338, /* (32) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
345, /* (33) privileges ::= ALL */
345, /* (34) privileges ::= priv_type_list */
345, /* (35) privileges ::= SUBSCRIBE */
348, /* (36) priv_type_list ::= priv_type */
348, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */
349, /* (38) priv_type ::= READ */
349, /* (39) priv_type ::= WRITE */
346, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */
346, /* (41) priv_level ::= db_name NK_DOT NK_STAR */
346, /* (42) priv_level ::= db_name NK_DOT table_name */
346, /* (43) priv_level ::= topic_name */
347, /* (44) with_opt ::= */
347, /* (45) with_opt ::= WITH search_condition */
338, /* (46) cmd ::= CREATE DNODE dnode_endpoint */
338, /* (47) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
338, /* (48) cmd ::= DROP DNODE NK_INTEGER force_opt */
338, /* (49) cmd ::= DROP DNODE dnode_endpoint force_opt */
338, /* (50) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */
338, /* (51) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */
338, /* (52) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
338, /* (53) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
338, /* (54) cmd ::= ALTER ALL DNODES NK_STRING */
338, /* (55) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
338, /* (56) cmd ::= RESTORE DNODE NK_INTEGER */
354, /* (57) dnode_endpoint ::= NK_STRING */
354, /* (58) dnode_endpoint ::= NK_ID */
354, /* (59) dnode_endpoint ::= NK_IPTOKEN */
355, /* (60) force_opt ::= */
355, /* (61) force_opt ::= FORCE */
356, /* (62) unsafe_opt ::= UNSAFE */
338, /* (63) cmd ::= ALTER LOCAL NK_STRING */
338, /* (64) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
338, /* (65) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
338, /* (66) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
338, /* (67) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */
338, /* (68) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
338, /* (69) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
338, /* (70) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
338, /* (71) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
338, /* (72) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
338, /* (73) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
338, /* (74) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */
338, /* (75) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */
338, /* (76) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
338, /* (77) cmd ::= DROP DATABASE exists_opt db_name */
338, /* (78) cmd ::= USE db_name */
338, /* (79) cmd ::= ALTER DATABASE db_name alter_db_options */
338, /* (80) cmd ::= FLUSH DATABASE db_name */
338, /* (81) cmd ::= TRIM DATABASE db_name speed_opt */
338, /* (82) cmd ::= COMPACT DATABASE db_name start_opt end_opt */
357, /* (83) not_exists_opt ::= IF NOT EXISTS */
357, /* (84) not_exists_opt ::= */
359, /* (85) exists_opt ::= IF EXISTS */
359, /* (86) exists_opt ::= */
358, /* (87) db_options ::= */
358, /* (88) db_options ::= db_options BUFFER NK_INTEGER */
358, /* (89) db_options ::= db_options CACHEMODEL NK_STRING */
358, /* (90) db_options ::= db_options CACHESIZE NK_INTEGER */
358, /* (91) db_options ::= db_options COMP NK_INTEGER */
358, /* (92) db_options ::= db_options DURATION NK_INTEGER */
358, /* (93) db_options ::= db_options DURATION NK_VARIABLE */
358, /* (94) db_options ::= db_options MAXROWS NK_INTEGER */
358, /* (95) db_options ::= db_options MINROWS NK_INTEGER */
358, /* (96) db_options ::= db_options KEEP integer_list */
358, /* (97) db_options ::= db_options KEEP variable_list */
358, /* (98) db_options ::= db_options PAGES NK_INTEGER */
358, /* (99) db_options ::= db_options PAGESIZE NK_INTEGER */
358, /* (100) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
358, /* (101) db_options ::= db_options PRECISION NK_STRING */
358, /* (102) db_options ::= db_options REPLICA NK_INTEGER */
358, /* (103) db_options ::= db_options VGROUPS NK_INTEGER */
358, /* (104) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
358, /* (105) db_options ::= db_options RETENTIONS retention_list */
358, /* (106) db_options ::= db_options SCHEMALESS NK_INTEGER */
358, /* (107) db_options ::= db_options WAL_LEVEL NK_INTEGER */
358, /* (108) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
358, /* (109) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
358, /* (110) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
358, /* (111) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
358, /* (112) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
358, /* (113) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
358, /* (114) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
358, /* (115) db_options ::= db_options STT_TRIGGER NK_INTEGER */
358, /* (116) db_options ::= db_options TABLE_PREFIX signed */
358, /* (117) db_options ::= db_options TABLE_SUFFIX signed */
360, /* (118) alter_db_options ::= alter_db_option */
360, /* (119) alter_db_options ::= alter_db_options alter_db_option */
368, /* (120) alter_db_option ::= BUFFER NK_INTEGER */
368, /* (121) alter_db_option ::= CACHEMODEL NK_STRING */
368, /* (122) alter_db_option ::= CACHESIZE NK_INTEGER */
368, /* (123) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
368, /* (124) alter_db_option ::= KEEP integer_list */
368, /* (125) alter_db_option ::= KEEP variable_list */
368, /* (126) alter_db_option ::= PAGES NK_INTEGER */
368, /* (127) alter_db_option ::= REPLICA NK_INTEGER */
368, /* (128) alter_db_option ::= WAL_LEVEL NK_INTEGER */
368, /* (129) alter_db_option ::= STT_TRIGGER NK_INTEGER */
368, /* (130) alter_db_option ::= MINROWS NK_INTEGER */
368, /* (131) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
368, /* (132) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
368, /* (133) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
368, /* (134) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
364, /* (135) integer_list ::= NK_INTEGER */
364, /* (136) integer_list ::= integer_list NK_COMMA NK_INTEGER */
365, /* (137) variable_list ::= NK_VARIABLE */
365, /* (138) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
366, /* (139) retention_list ::= retention */
366, /* (140) retention_list ::= retention_list NK_COMMA retention */
369, /* (141) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
361, /* (142) speed_opt ::= */
361, /* (143) speed_opt ::= MAX_SPEED NK_INTEGER */
362, /* (144) start_opt ::= */
362, /* (145) start_opt ::= START WITH NK_INTEGER */
362, /* (146) start_opt ::= START WITH NK_STRING */
362, /* (147) start_opt ::= START WITH TIMESTAMP NK_STRING */
363, /* (148) end_opt ::= */
363, /* (149) end_opt ::= END WITH NK_INTEGER */
363, /* (150) end_opt ::= END WITH NK_STRING */
363, /* (151) end_opt ::= END WITH TIMESTAMP NK_STRING */
338, /* (152) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
338, /* (153) cmd ::= CREATE TABLE multi_create_clause */
338, /* (154) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
338, /* (155) cmd ::= DROP TABLE multi_drop_clause */
338, /* (156) cmd ::= DROP STABLE exists_opt full_table_name */
338, /* (157) cmd ::= ALTER TABLE alter_table_clause */
338, /* (158) cmd ::= ALTER STABLE alter_table_clause */
377, /* (159) alter_table_clause ::= full_table_name alter_table_options */
377, /* (160) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
377, /* (161) alter_table_clause ::= full_table_name DROP COLUMN column_name */
377, /* (162) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
377, /* (163) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
377, /* (164) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
377, /* (165) alter_table_clause ::= full_table_name DROP TAG column_name */
377, /* (166) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
377, /* (167) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
377, /* (168) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
374, /* (169) multi_create_clause ::= create_subtable_clause */
374, /* (170) multi_create_clause ::= multi_create_clause create_subtable_clause */
382, /* (171) 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 */
376, /* (172) multi_drop_clause ::= drop_table_clause */
376, /* (173) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */
385, /* (174) drop_table_clause ::= exists_opt full_table_name */
383, /* (175) specific_cols_opt ::= */
383, /* (176) specific_cols_opt ::= NK_LP col_name_list NK_RP */
370, /* (177) full_table_name ::= table_name */
370, /* (178) full_table_name ::= db_name NK_DOT table_name */
371, /* (179) column_def_list ::= column_def */
371, /* (180) column_def_list ::= column_def_list NK_COMMA column_def */
387, /* (181) column_def ::= column_name type_name */
380, /* (182) type_name ::= BOOL */
380, /* (183) type_name ::= TINYINT */
380, /* (184) type_name ::= SMALLINT */
380, /* (185) type_name ::= INT */
380, /* (186) type_name ::= INTEGER */
380, /* (187) type_name ::= BIGINT */
380, /* (188) type_name ::= FLOAT */
380, /* (189) type_name ::= DOUBLE */
380, /* (190) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
380, /* (191) type_name ::= TIMESTAMP */
380, /* (192) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
380, /* (193) type_name ::= TINYINT UNSIGNED */
380, /* (194) type_name ::= SMALLINT UNSIGNED */
380, /* (195) type_name ::= INT UNSIGNED */
380, /* (196) type_name ::= BIGINT UNSIGNED */
380, /* (197) type_name ::= JSON */
380, /* (198) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
380, /* (199) type_name ::= MEDIUMBLOB */
380, /* (200) type_name ::= BLOB */
380, /* (201) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
380, /* (202) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */
380, /* (203) type_name ::= DECIMAL */
380, /* (204) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
380, /* (205) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
372, /* (206) tags_def_opt ::= */
372, /* (207) tags_def_opt ::= tags_def */
375, /* (208) tags_def ::= TAGS NK_LP column_def_list NK_RP */
373, /* (209) table_options ::= */
373, /* (210) table_options ::= table_options COMMENT NK_STRING */
373, /* (211) table_options ::= table_options MAX_DELAY duration_list */
373, /* (212) table_options ::= table_options WATERMARK duration_list */
373, /* (213) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
373, /* (214) table_options ::= table_options TTL NK_INTEGER */
373, /* (215) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
373, /* (216) table_options ::= table_options DELETE_MARK duration_list */
378, /* (217) alter_table_options ::= alter_table_option */
378, /* (218) alter_table_options ::= alter_table_options alter_table_option */
390, /* (219) alter_table_option ::= COMMENT NK_STRING */
390, /* (220) alter_table_option ::= TTL NK_INTEGER */
388, /* (221) duration_list ::= duration_literal */
388, /* (222) duration_list ::= duration_list NK_COMMA duration_literal */
389, /* (223) rollup_func_list ::= rollup_func_name */
389, /* (224) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
392, /* (225) rollup_func_name ::= function_name */
392, /* (226) rollup_func_name ::= FIRST */
392, /* (227) rollup_func_name ::= LAST */
386, /* (228) col_name_list ::= col_name */
386, /* (229) col_name_list ::= col_name_list NK_COMMA col_name */
394, /* (230) col_name ::= column_name */
338, /* (231) cmd ::= SHOW DNODES */
338, /* (232) cmd ::= SHOW USERS */
338, /* (233) cmd ::= SHOW USER PRIVILEGES */
338, /* (234) cmd ::= SHOW DATABASES */
338, /* (235) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
338, /* (236) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
338, /* (237) cmd ::= SHOW db_name_cond_opt VGROUPS */
338, /* (238) cmd ::= SHOW MNODES */
338, /* (239) cmd ::= SHOW QNODES */
338, /* (240) cmd ::= SHOW FUNCTIONS */
338, /* (241) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
338, /* (242) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */
338, /* (243) cmd ::= SHOW STREAMS */
338, /* (244) cmd ::= SHOW ACCOUNTS */
338, /* (245) cmd ::= SHOW APPS */
338, /* (246) cmd ::= SHOW CONNECTIONS */
338, /* (247) cmd ::= SHOW LICENCES */
338, /* (248) cmd ::= SHOW GRANTS */
338, /* (249) cmd ::= SHOW CREATE DATABASE db_name */
338, /* (250) cmd ::= SHOW CREATE TABLE full_table_name */
338, /* (251) cmd ::= SHOW CREATE STABLE full_table_name */
338, /* (252) cmd ::= SHOW QUERIES */
338, /* (253) cmd ::= SHOW SCORES */
338, /* (254) cmd ::= SHOW TOPICS */
338, /* (255) cmd ::= SHOW VARIABLES */
338, /* (256) cmd ::= SHOW CLUSTER VARIABLES */
338, /* (257) cmd ::= SHOW LOCAL VARIABLES */
338, /* (258) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
338, /* (259) cmd ::= SHOW BNODES */
338, /* (260) cmd ::= SHOW SNODES */
338, /* (261) cmd ::= SHOW CLUSTER */
338, /* (262) cmd ::= SHOW TRANSACTIONS */
338, /* (263) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
338, /* (264) cmd ::= SHOW CONSUMERS */
338, /* (265) cmd ::= SHOW SUBSCRIPTIONS */
338, /* (266) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
338, /* (267) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */
338, /* (268) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
338, /* (269) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */
338, /* (270) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */
338, /* (271) cmd ::= SHOW VNODES ON DNODE NK_STRING */
338, /* (272) cmd ::= SHOW db_name_cond_opt ALIVE */
338, /* (273) cmd ::= SHOW CLUSTER ALIVE */
395, /* (274) db_name_cond_opt ::= */
395, /* (275) db_name_cond_opt ::= db_name NK_DOT */
396, /* (276) like_pattern_opt ::= */
396, /* (277) like_pattern_opt ::= LIKE NK_STRING */
397, /* (278) table_name_cond ::= table_name */
398, /* (279) from_db_opt ::= */
398, /* (280) from_db_opt ::= FROM db_name */
399, /* (281) tag_list_opt ::= */
399, /* (282) tag_list_opt ::= tag_item */
399, /* (283) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */
400, /* (284) tag_item ::= TBNAME */
400, /* (285) tag_item ::= QTAGS */
400, /* (286) tag_item ::= column_name */
400, /* (287) tag_item ::= column_name column_alias */
400, /* (288) tag_item ::= column_name AS column_alias */
338, /* (289) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */
338, /* (290) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */
338, /* (291) cmd ::= DROP INDEX exists_opt full_index_name */
402, /* (292) full_index_name ::= index_name */
402, /* (293) full_index_name ::= db_name NK_DOT index_name */
403, /* (294) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
403, /* (295) 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 */
405, /* (296) func_list ::= func */
405, /* (297) func_list ::= func_list NK_COMMA func */
408, /* (298) func ::= sma_func_name NK_LP expression_list NK_RP */
409, /* (299) sma_func_name ::= function_name */
409, /* (300) sma_func_name ::= COUNT */
409, /* (301) sma_func_name ::= FIRST */
409, /* (302) sma_func_name ::= LAST */
409, /* (303) sma_func_name ::= LAST_ROW */
407, /* (304) sma_stream_opt ::= */
407, /* (305) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
407, /* (306) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
407, /* (307) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
410, /* (308) with_meta ::= AS */
410, /* (309) with_meta ::= WITH META AS */
410, /* (310) with_meta ::= ONLY META AS */
338, /* (311) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
338, /* (312) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */
338, /* (313) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */
338, /* (314) cmd ::= DROP TOPIC exists_opt topic_name */
338, /* (315) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
338, /* (316) cmd ::= DESC full_table_name */
338, /* (317) cmd ::= DESCRIBE full_table_name */
338, /* (318) cmd ::= RESET QUERY CACHE */
338, /* (319) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
338, /* (320) cmd ::= EXPLAIN analyze_opt explain_options insert_query */
414, /* (321) analyze_opt ::= */
414, /* (322) analyze_opt ::= ANALYZE */
415, /* (323) explain_options ::= */
415, /* (324) explain_options ::= explain_options VERBOSE NK_BOOL */
415, /* (325) explain_options ::= explain_options RATIO NK_FLOAT */
338, /* (326) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
338, /* (327) cmd ::= DROP FUNCTION exists_opt function_name */
418, /* (328) agg_func_opt ::= */
418, /* (329) agg_func_opt ::= AGGREGATE */
419, /* (330) bufsize_opt ::= */
419, /* (331) bufsize_opt ::= BUFSIZE NK_INTEGER */
420, /* (332) language_opt ::= */
420, /* (333) language_opt ::= LANGUAGE NK_STRING */
417, /* (334) or_replace_opt ::= */
417, /* (335) or_replace_opt ::= OR REPLACE */
338, /* (336) 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 */
338, /* (337) cmd ::= DROP STREAM exists_opt stream_name */
338, /* (338) cmd ::= PAUSE STREAM exists_opt stream_name */
338, /* (339) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
423, /* (340) col_list_opt ::= */
423, /* (341) col_list_opt ::= NK_LP col_name_list NK_RP */
424, /* (342) tag_def_or_ref_opt ::= */
424, /* (343) tag_def_or_ref_opt ::= tags_def */
424, /* (344) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
422, /* (345) stream_options ::= */
422, /* (346) stream_options ::= stream_options TRIGGER AT_ONCE */
422, /* (347) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
422, /* (348) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
422, /* (349) stream_options ::= stream_options WATERMARK duration_literal */
422, /* (350) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
422, /* (351) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
422, /* (352) stream_options ::= stream_options DELETE_MARK duration_literal */
422, /* (353) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
425, /* (354) subtable_opt ::= */
425, /* (355) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
426, /* (356) ignore_opt ::= */
426, /* (357) ignore_opt ::= IGNORE UNTREATED */
338, /* (358) cmd ::= KILL CONNECTION NK_INTEGER */
338, /* (359) cmd ::= KILL QUERY NK_STRING */
338, /* (360) cmd ::= KILL TRANSACTION NK_INTEGER */
338, /* (361) cmd ::= BALANCE VGROUP */
338, /* (362) cmd ::= BALANCE VGROUP LEADER */
338, /* (363) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
338, /* (364) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
338, /* (365) cmd ::= SPLIT VGROUP NK_INTEGER */
428, /* (366) dnode_list ::= DNODE NK_INTEGER */
428, /* (367) dnode_list ::= dnode_list DNODE NK_INTEGER */
338, /* (368) cmd ::= DELETE FROM full_table_name where_clause_opt */
338, /* (369) cmd ::= query_or_subquery */
338, /* (370) cmd ::= insert_query */
416, /* (371) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
416, /* (372) insert_query ::= INSERT INTO full_table_name query_or_subquery */
341, /* (373) literal ::= NK_INTEGER */
341, /* (374) literal ::= NK_FLOAT */
341, /* (375) literal ::= NK_STRING */
341, /* (376) literal ::= NK_BOOL */
341, /* (377) literal ::= TIMESTAMP NK_STRING */
341, /* (378) literal ::= duration_literal */
341, /* (379) literal ::= NULL */
341, /* (380) literal ::= NK_QUESTION */
391, /* (381) duration_literal ::= NK_VARIABLE */
367, /* (382) signed ::= NK_INTEGER */
367, /* (383) signed ::= NK_PLUS NK_INTEGER */
367, /* (384) signed ::= NK_MINUS NK_INTEGER */
367, /* (385) signed ::= NK_FLOAT */
367, /* (386) signed ::= NK_PLUS NK_FLOAT */
367, /* (387) signed ::= NK_MINUS NK_FLOAT */
381, /* (388) signed_literal ::= signed */
381, /* (389) signed_literal ::= NK_STRING */
381, /* (390) signed_literal ::= NK_BOOL */
381, /* (391) signed_literal ::= TIMESTAMP NK_STRING */
381, /* (392) signed_literal ::= duration_literal */
381, /* (393) signed_literal ::= NULL */
381, /* (394) signed_literal ::= literal_func */
381, /* (395) signed_literal ::= NK_QUESTION */
430, /* (396) literal_list ::= signed_literal */
430, /* (397) literal_list ::= literal_list NK_COMMA signed_literal */
350, /* (398) db_name ::= NK_ID */
351, /* (399) table_name ::= NK_ID */
379, /* (400) column_name ::= NK_ID */
393, /* (401) function_name ::= NK_ID */
431, /* (402) table_alias ::= NK_ID */
401, /* (403) column_alias ::= NK_ID */
343, /* (404) user_name ::= NK_ID */
352, /* (405) topic_name ::= NK_ID */
421, /* (406) stream_name ::= NK_ID */
413, /* (407) cgroup_name ::= NK_ID */
404, /* (408) index_name ::= NK_ID */
432, /* (409) expr_or_subquery ::= expression */
427, /* (410) expression ::= literal */
427, /* (411) expression ::= pseudo_column */
427, /* (412) expression ::= column_reference */
427, /* (413) expression ::= function_expression */
427, /* (414) expression ::= case_when_expression */
427, /* (415) expression ::= NK_LP expression NK_RP */
427, /* (416) expression ::= NK_PLUS expr_or_subquery */
427, /* (417) expression ::= NK_MINUS expr_or_subquery */
427, /* (418) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
427, /* (419) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
427, /* (420) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
427, /* (421) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
427, /* (422) expression ::= expr_or_subquery NK_REM expr_or_subquery */
427, /* (423) expression ::= column_reference NK_ARROW NK_STRING */
427, /* (424) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
427, /* (425) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
384, /* (426) expression_list ::= expr_or_subquery */
384, /* (427) expression_list ::= expression_list NK_COMMA expr_or_subquery */
434, /* (428) column_reference ::= column_name */
434, /* (429) column_reference ::= table_name NK_DOT column_name */
433, /* (430) pseudo_column ::= ROWTS */
433, /* (431) pseudo_column ::= TBNAME */
433, /* (432) pseudo_column ::= table_name NK_DOT TBNAME */
433, /* (433) pseudo_column ::= QSTART */
433, /* (434) pseudo_column ::= QEND */
433, /* (435) pseudo_column ::= QDURATION */
433, /* (436) pseudo_column ::= WSTART */
433, /* (437) pseudo_column ::= WEND */
433, /* (438) pseudo_column ::= WDURATION */
433, /* (439) pseudo_column ::= IROWTS */
433, /* (440) pseudo_column ::= ISFILLED */
433, /* (441) pseudo_column ::= QTAGS */
435, /* (442) function_expression ::= function_name NK_LP expression_list NK_RP */
435, /* (443) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
435, /* (444) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
435, /* (445) function_expression ::= literal_func */
429, /* (446) literal_func ::= noarg_func NK_LP NK_RP */
429, /* (447) literal_func ::= NOW */
439, /* (448) noarg_func ::= NOW */
439, /* (449) noarg_func ::= TODAY */
439, /* (450) noarg_func ::= TIMEZONE */
439, /* (451) noarg_func ::= DATABASE */
439, /* (452) noarg_func ::= CLIENT_VERSION */
439, /* (453) noarg_func ::= SERVER_VERSION */
439, /* (454) noarg_func ::= SERVER_STATUS */
439, /* (455) noarg_func ::= CURRENT_USER */
439, /* (456) noarg_func ::= USER */
437, /* (457) star_func ::= COUNT */
437, /* (458) star_func ::= FIRST */
437, /* (459) star_func ::= LAST */
437, /* (460) star_func ::= LAST_ROW */
438, /* (461) star_func_para_list ::= NK_STAR */
438, /* (462) star_func_para_list ::= other_para_list */
440, /* (463) other_para_list ::= star_func_para */
440, /* (464) other_para_list ::= other_para_list NK_COMMA star_func_para */
441, /* (465) star_func_para ::= expr_or_subquery */
441, /* (466) star_func_para ::= table_name NK_DOT NK_STAR */
436, /* (467) case_when_expression ::= CASE when_then_list case_when_else_opt END */
436, /* (468) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
442, /* (469) when_then_list ::= when_then_expr */
442, /* (470) when_then_list ::= when_then_list when_then_expr */
445, /* (471) when_then_expr ::= WHEN common_expression THEN common_expression */
443, /* (472) case_when_else_opt ::= */
443, /* (473) case_when_else_opt ::= ELSE common_expression */
446, /* (474) predicate ::= expr_or_subquery compare_op expr_or_subquery */
446, /* (475) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
446, /* (476) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
446, /* (477) predicate ::= expr_or_subquery IS NULL */
446, /* (478) predicate ::= expr_or_subquery IS NOT NULL */
446, /* (479) predicate ::= expr_or_subquery in_op in_predicate_value */
447, /* (480) compare_op ::= NK_LT */
447, /* (481) compare_op ::= NK_GT */
447, /* (482) compare_op ::= NK_LE */
447, /* (483) compare_op ::= NK_GE */
447, /* (484) compare_op ::= NK_NE */
447, /* (485) compare_op ::= NK_EQ */
447, /* (486) compare_op ::= LIKE */
447, /* (487) compare_op ::= NOT LIKE */
447, /* (488) compare_op ::= MATCH */
447, /* (489) compare_op ::= NMATCH */
447, /* (490) compare_op ::= CONTAINS */
448, /* (491) in_op ::= IN */
448, /* (492) in_op ::= NOT IN */
449, /* (493) in_predicate_value ::= NK_LP literal_list NK_RP */
450, /* (494) boolean_value_expression ::= boolean_primary */
450, /* (495) boolean_value_expression ::= NOT boolean_primary */
450, /* (496) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
450, /* (497) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
451, /* (498) boolean_primary ::= predicate */
451, /* (499) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
444, /* (500) common_expression ::= expr_or_subquery */
444, /* (501) common_expression ::= boolean_value_expression */
452, /* (502) from_clause_opt ::= */
452, /* (503) from_clause_opt ::= FROM table_reference_list */
453, /* (504) table_reference_list ::= table_reference */
453, /* (505) table_reference_list ::= table_reference_list NK_COMMA table_reference */
454, /* (506) table_reference ::= table_primary */
454, /* (507) table_reference ::= joined_table */
455, /* (508) table_primary ::= table_name alias_opt */
455, /* (509) table_primary ::= db_name NK_DOT table_name alias_opt */
455, /* (510) table_primary ::= subquery alias_opt */
455, /* (511) table_primary ::= parenthesized_joined_table */
457, /* (512) alias_opt ::= */
457, /* (513) alias_opt ::= table_alias */
457, /* (514) alias_opt ::= AS table_alias */
459, /* (515) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
459, /* (516) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
456, /* (517) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
460, /* (518) join_type ::= */
460, /* (519) join_type ::= INNER */
461, /* (520) 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 */
462, /* (521) set_quantifier_opt ::= */
462, /* (522) set_quantifier_opt ::= DISTINCT */
462, /* (523) set_quantifier_opt ::= ALL */
463, /* (524) select_list ::= select_item */
463, /* (525) select_list ::= select_list NK_COMMA select_item */
471, /* (526) select_item ::= NK_STAR */
471, /* (527) select_item ::= common_expression */
471, /* (528) select_item ::= common_expression column_alias */
471, /* (529) select_item ::= common_expression AS column_alias */
471, /* (530) select_item ::= table_name NK_DOT NK_STAR */
412, /* (531) where_clause_opt ::= */
412, /* (532) where_clause_opt ::= WHERE search_condition */
464, /* (533) partition_by_clause_opt ::= */
464, /* (534) partition_by_clause_opt ::= PARTITION BY partition_list */
472, /* (535) partition_list ::= partition_item */
472, /* (536) partition_list ::= partition_list NK_COMMA partition_item */
473, /* (537) partition_item ::= expr_or_subquery */
473, /* (538) partition_item ::= expr_or_subquery column_alias */
473, /* (539) partition_item ::= expr_or_subquery AS column_alias */
468, /* (540) twindow_clause_opt ::= */
468, /* (541) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
468, /* (542) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
468, /* (543) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
468, /* (544) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
468, /* (545) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
406, /* (546) sliding_opt ::= */
406, /* (547) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
467, /* (548) fill_opt ::= */
467, /* (549) fill_opt ::= FILL NK_LP fill_mode NK_RP */
467, /* (550) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */
467, /* (551) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */
474, /* (552) fill_mode ::= NONE */
474, /* (553) fill_mode ::= PREV */
474, /* (554) fill_mode ::= NULL */
474, /* (555) fill_mode ::= NULL_F */
474, /* (556) fill_mode ::= LINEAR */
474, /* (557) fill_mode ::= NEXT */
469, /* (558) group_by_clause_opt ::= */
469, /* (559) group_by_clause_opt ::= GROUP BY group_by_list */
475, /* (560) group_by_list ::= expr_or_subquery */
475, /* (561) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
470, /* (562) having_clause_opt ::= */
470, /* (563) having_clause_opt ::= HAVING search_condition */
465, /* (564) range_opt ::= */
465, /* (565) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
465, /* (566) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */
466, /* (567) every_opt ::= */
466, /* (568) every_opt ::= EVERY NK_LP duration_literal NK_RP */
476, /* (569) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
477, /* (570) query_simple ::= query_specification */
477, /* (571) query_simple ::= union_query_expression */
481, /* (572) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
481, /* (573) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
482, /* (574) query_simple_or_subquery ::= query_simple */
482, /* (575) query_simple_or_subquery ::= subquery */
411, /* (576) query_or_subquery ::= query_expression */
411, /* (577) query_or_subquery ::= subquery */
478, /* (578) order_by_clause_opt ::= */
478, /* (579) order_by_clause_opt ::= ORDER BY sort_specification_list */
479, /* (580) slimit_clause_opt ::= */
479, /* (581) slimit_clause_opt ::= SLIMIT NK_INTEGER */
479, /* (582) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
479, /* (583) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
480, /* (584) limit_clause_opt ::= */
480, /* (585) limit_clause_opt ::= LIMIT NK_INTEGER */
480, /* (586) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
480, /* (587) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
458, /* (588) subquery ::= NK_LP query_expression NK_RP */
458, /* (589) subquery ::= NK_LP subquery NK_RP */
353, /* (590) search_condition ::= common_expression */
483, /* (591) sort_specification_list ::= sort_specification */
483, /* (592) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
484, /* (593) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
485, /* (594) ordering_specification_opt ::= */
485, /* (595) ordering_specification_opt ::= ASC */
485, /* (596) ordering_specification_opt ::= DESC */
486, /* (597) null_ordering_opt ::= */
486, /* (598) null_ordering_opt ::= NULLS FIRST */
486, /* (599) null_ordering_opt ::= NULLS LAST */
2023-05-09 11:19:14 +00:00
};
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
-6, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
-4, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
0, /* (2) account_options ::= */
-3, /* (3) account_options ::= account_options PPS literal */
-3, /* (4) account_options ::= account_options TSERIES literal */
-3, /* (5) account_options ::= account_options STORAGE literal */
-3, /* (6) account_options ::= account_options STREAMS literal */
-3, /* (7) account_options ::= account_options QTIME literal */
-3, /* (8) account_options ::= account_options DBS literal */
-3, /* (9) account_options ::= account_options USERS literal */
-3, /* (10) account_options ::= account_options CONNS literal */
-3, /* (11) account_options ::= account_options STATE literal */
-1, /* (12) alter_account_options ::= alter_account_option */
-2, /* (13) alter_account_options ::= alter_account_options alter_account_option */
-2, /* (14) alter_account_option ::= PASS literal */
-2, /* (15) alter_account_option ::= PPS literal */
-2, /* (16) alter_account_option ::= TSERIES literal */
-2, /* (17) alter_account_option ::= STORAGE literal */
-2, /* (18) alter_account_option ::= STREAMS literal */
-2, /* (19) alter_account_option ::= QTIME literal */
-2, /* (20) alter_account_option ::= DBS literal */
-2, /* (21) alter_account_option ::= USERS literal */
-2, /* (22) alter_account_option ::= CONNS literal */
-2, /* (23) alter_account_option ::= STATE literal */
-6, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
-5, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
-5, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
-5, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
-3, /* (28) cmd ::= DROP USER user_name */
0, /* (29) sysinfo_opt ::= */
-2, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
-7, /* (31) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
-7, /* (32) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
-1, /* (33) privileges ::= ALL */
-1, /* (34) privileges ::= priv_type_list */
-1, /* (35) privileges ::= SUBSCRIBE */
-1, /* (36) priv_type_list ::= priv_type */
-3, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */
-1, /* (38) priv_type ::= READ */
-1, /* (39) priv_type ::= WRITE */
-3, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */
-3, /* (41) priv_level ::= db_name NK_DOT NK_STAR */
-3, /* (42) priv_level ::= db_name NK_DOT table_name */
-1, /* (43) priv_level ::= topic_name */
0, /* (44) with_opt ::= */
-2, /* (45) with_opt ::= WITH search_condition */
-3, /* (46) cmd ::= CREATE DNODE dnode_endpoint */
-5, /* (47) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
-4, /* (48) cmd ::= DROP DNODE NK_INTEGER force_opt */
-4, /* (49) cmd ::= DROP DNODE dnode_endpoint force_opt */
2023-05-16 01:50:10 +00:00
-4, /* (50) cmd ::= DROP DNODE NK_INTEGER unsafe_opt */
-4, /* (51) cmd ::= DROP DNODE dnode_endpoint unsafe_opt */
-4, /* (52) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
-5, /* (53) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
-4, /* (54) cmd ::= ALTER ALL DNODES NK_STRING */
-5, /* (55) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
-3, /* (56) cmd ::= RESTORE DNODE NK_INTEGER */
-1, /* (57) dnode_endpoint ::= NK_STRING */
-1, /* (58) dnode_endpoint ::= NK_ID */
-1, /* (59) dnode_endpoint ::= NK_IPTOKEN */
0, /* (60) force_opt ::= */
-1, /* (61) force_opt ::= FORCE */
-1, /* (62) unsafe_opt ::= UNSAFE */
-3, /* (63) cmd ::= ALTER LOCAL NK_STRING */
-4, /* (64) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
-5, /* (65) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
-5, /* (66) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
-5, /* (67) cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */
-5, /* (68) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
-5, /* (69) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
-5, /* (70) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
-5, /* (71) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
-5, /* (72) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
-5, /* (73) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
-5, /* (74) cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */
-5, /* (75) cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */
-5, /* (76) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
-4, /* (77) cmd ::= DROP DATABASE exists_opt db_name */
-2, /* (78) cmd ::= USE db_name */
-4, /* (79) cmd ::= ALTER DATABASE db_name alter_db_options */
-3, /* (80) cmd ::= FLUSH DATABASE db_name */
-4, /* (81) cmd ::= TRIM DATABASE db_name speed_opt */
-5, /* (82) cmd ::= COMPACT DATABASE db_name start_opt end_opt */
-3, /* (83) not_exists_opt ::= IF NOT EXISTS */
0, /* (84) not_exists_opt ::= */
-2, /* (85) exists_opt ::= IF EXISTS */
0, /* (86) exists_opt ::= */
0, /* (87) db_options ::= */
-3, /* (88) db_options ::= db_options BUFFER NK_INTEGER */
-3, /* (89) db_options ::= db_options CACHEMODEL NK_STRING */
-3, /* (90) db_options ::= db_options CACHESIZE NK_INTEGER */
-3, /* (91) db_options ::= db_options COMP NK_INTEGER */
-3, /* (92) db_options ::= db_options DURATION NK_INTEGER */
-3, /* (93) db_options ::= db_options DURATION NK_VARIABLE */
-3, /* (94) db_options ::= db_options MAXROWS NK_INTEGER */
-3, /* (95) db_options ::= db_options MINROWS NK_INTEGER */
-3, /* (96) db_options ::= db_options KEEP integer_list */
-3, /* (97) db_options ::= db_options KEEP variable_list */
-3, /* (98) db_options ::= db_options PAGES NK_INTEGER */
-3, /* (99) db_options ::= db_options PAGESIZE NK_INTEGER */
-3, /* (100) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
-3, /* (101) db_options ::= db_options PRECISION NK_STRING */
-3, /* (102) db_options ::= db_options REPLICA NK_INTEGER */
-3, /* (103) db_options ::= db_options VGROUPS NK_INTEGER */
-3, /* (104) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
-3, /* (105) db_options ::= db_options RETENTIONS retention_list */
-3, /* (106) db_options ::= db_options SCHEMALESS NK_INTEGER */
-3, /* (107) db_options ::= db_options WAL_LEVEL NK_INTEGER */
-3, /* (108) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
-3, /* (109) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
-4, /* (110) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
-3, /* (111) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
-4, /* (112) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
-3, /* (113) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
-3, /* (114) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
-3, /* (115) db_options ::= db_options STT_TRIGGER NK_INTEGER */
-3, /* (116) db_options ::= db_options TABLE_PREFIX signed */
-3, /* (117) db_options ::= db_options TABLE_SUFFIX signed */
-1, /* (118) alter_db_options ::= alter_db_option */
-2, /* (119) alter_db_options ::= alter_db_options alter_db_option */
-2, /* (120) alter_db_option ::= BUFFER NK_INTEGER */
-2, /* (121) alter_db_option ::= CACHEMODEL NK_STRING */
-2, /* (122) alter_db_option ::= CACHESIZE NK_INTEGER */
-2, /* (123) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
-2, /* (124) alter_db_option ::= KEEP integer_list */
-2, /* (125) alter_db_option ::= KEEP variable_list */
-2, /* (126) alter_db_option ::= PAGES NK_INTEGER */
-2, /* (127) alter_db_option ::= REPLICA NK_INTEGER */
-2, /* (128) alter_db_option ::= WAL_LEVEL NK_INTEGER */
-2, /* (129) alter_db_option ::= STT_TRIGGER NK_INTEGER */
-2, /* (130) alter_db_option ::= MINROWS NK_INTEGER */
-2, /* (131) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
-3, /* (132) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
-2, /* (133) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
-3, /* (134) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
-1, /* (135) integer_list ::= NK_INTEGER */
-3, /* (136) integer_list ::= integer_list NK_COMMA NK_INTEGER */
-1, /* (137) variable_list ::= NK_VARIABLE */
-3, /* (138) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
-1, /* (139) retention_list ::= retention */
-3, /* (140) retention_list ::= retention_list NK_COMMA retention */
-3, /* (141) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
0, /* (142) speed_opt ::= */
-2, /* (143) speed_opt ::= MAX_SPEED NK_INTEGER */
0, /* (144) start_opt ::= */
-3, /* (145) start_opt ::= START WITH NK_INTEGER */
-3, /* (146) start_opt ::= START WITH NK_STRING */
-4, /* (147) start_opt ::= START WITH TIMESTAMP NK_STRING */
0, /* (148) end_opt ::= */
-3, /* (149) end_opt ::= END WITH NK_INTEGER */
-3, /* (150) end_opt ::= END WITH NK_STRING */
-4, /* (151) end_opt ::= END WITH TIMESTAMP NK_STRING */
-9, /* (152) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
-3, /* (153) cmd ::= CREATE TABLE multi_create_clause */
-9, /* (154) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
-3, /* (155) cmd ::= DROP TABLE multi_drop_clause */
-4, /* (156) cmd ::= DROP STABLE exists_opt full_table_name */
-3, /* (157) cmd ::= ALTER TABLE alter_table_clause */
-3, /* (158) cmd ::= ALTER STABLE alter_table_clause */
-2, /* (159) alter_table_clause ::= full_table_name alter_table_options */
-5, /* (160) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
-4, /* (161) alter_table_clause ::= full_table_name DROP COLUMN column_name */
-5, /* (162) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
-5, /* (163) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
-5, /* (164) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
-4, /* (165) alter_table_clause ::= full_table_name DROP TAG column_name */
-5, /* (166) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
-5, /* (167) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
-6, /* (168) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
-1, /* (169) multi_create_clause ::= create_subtable_clause */
-2, /* (170) multi_create_clause ::= multi_create_clause create_subtable_clause */
-10, /* (171) 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 */
-1, /* (172) multi_drop_clause ::= drop_table_clause */
-3, /* (173) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */
-2, /* (174) drop_table_clause ::= exists_opt full_table_name */
0, /* (175) specific_cols_opt ::= */
-3, /* (176) specific_cols_opt ::= NK_LP col_name_list NK_RP */
-1, /* (177) full_table_name ::= table_name */
-3, /* (178) full_table_name ::= db_name NK_DOT table_name */
-1, /* (179) column_def_list ::= column_def */
-3, /* (180) column_def_list ::= column_def_list NK_COMMA column_def */
-2, /* (181) column_def ::= column_name type_name */
-1, /* (182) type_name ::= BOOL */
-1, /* (183) type_name ::= TINYINT */
-1, /* (184) type_name ::= SMALLINT */
-1, /* (185) type_name ::= INT */
-1, /* (186) type_name ::= INTEGER */
-1, /* (187) type_name ::= BIGINT */
-1, /* (188) type_name ::= FLOAT */
-1, /* (189) type_name ::= DOUBLE */
-4, /* (190) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
-1, /* (191) type_name ::= TIMESTAMP */
-4, /* (192) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
-2, /* (193) type_name ::= TINYINT UNSIGNED */
-2, /* (194) type_name ::= SMALLINT UNSIGNED */
-2, /* (195) type_name ::= INT UNSIGNED */
-2, /* (196) type_name ::= BIGINT UNSIGNED */
-1, /* (197) type_name ::= JSON */
-4, /* (198) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
-1, /* (199) type_name ::= MEDIUMBLOB */
-1, /* (200) type_name ::= BLOB */
-4, /* (201) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
-4, /* (202) type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */
-1, /* (203) type_name ::= DECIMAL */
-4, /* (204) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
-6, /* (205) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
0, /* (206) tags_def_opt ::= */
-1, /* (207) tags_def_opt ::= tags_def */
-4, /* (208) tags_def ::= TAGS NK_LP column_def_list NK_RP */
0, /* (209) table_options ::= */
-3, /* (210) table_options ::= table_options COMMENT NK_STRING */
-3, /* (211) table_options ::= table_options MAX_DELAY duration_list */
-3, /* (212) table_options ::= table_options WATERMARK duration_list */
-5, /* (213) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
-3, /* (214) table_options ::= table_options TTL NK_INTEGER */
-5, /* (215) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
-3, /* (216) table_options ::= table_options DELETE_MARK duration_list */
-1, /* (217) alter_table_options ::= alter_table_option */
-2, /* (218) alter_table_options ::= alter_table_options alter_table_option */
-2, /* (219) alter_table_option ::= COMMENT NK_STRING */
-2, /* (220) alter_table_option ::= TTL NK_INTEGER */
-1, /* (221) duration_list ::= duration_literal */
-3, /* (222) duration_list ::= duration_list NK_COMMA duration_literal */
-1, /* (223) rollup_func_list ::= rollup_func_name */
-3, /* (224) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
-1, /* (225) rollup_func_name ::= function_name */
-1, /* (226) rollup_func_name ::= FIRST */
-1, /* (227) rollup_func_name ::= LAST */
-1, /* (228) col_name_list ::= col_name */
-3, /* (229) col_name_list ::= col_name_list NK_COMMA col_name */
-1, /* (230) col_name ::= column_name */
-2, /* (231) cmd ::= SHOW DNODES */
-2, /* (232) cmd ::= SHOW USERS */
-3, /* (233) cmd ::= SHOW USER PRIVILEGES */
-2, /* (234) cmd ::= SHOW DATABASES */
-4, /* (235) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
-4, /* (236) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
-3, /* (237) cmd ::= SHOW db_name_cond_opt VGROUPS */
-2, /* (238) cmd ::= SHOW MNODES */
-2, /* (239) cmd ::= SHOW QNODES */
-2, /* (240) cmd ::= SHOW FUNCTIONS */
-5, /* (241) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
-6, /* (242) cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */
-2, /* (243) cmd ::= SHOW STREAMS */
-2, /* (244) cmd ::= SHOW ACCOUNTS */
-2, /* (245) cmd ::= SHOW APPS */
-2, /* (246) cmd ::= SHOW CONNECTIONS */
-2, /* (247) cmd ::= SHOW LICENCES */
-2, /* (248) cmd ::= SHOW GRANTS */
-4, /* (249) cmd ::= SHOW CREATE DATABASE db_name */
-4, /* (250) cmd ::= SHOW CREATE TABLE full_table_name */
-4, /* (251) cmd ::= SHOW CREATE STABLE full_table_name */
-2, /* (252) cmd ::= SHOW QUERIES */
-2, /* (253) cmd ::= SHOW SCORES */
-2, /* (254) cmd ::= SHOW TOPICS */
-2, /* (255) cmd ::= SHOW VARIABLES */
-3, /* (256) cmd ::= SHOW CLUSTER VARIABLES */
-3, /* (257) cmd ::= SHOW LOCAL VARIABLES */
-5, /* (258) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
-2, /* (259) cmd ::= SHOW BNODES */
-2, /* (260) cmd ::= SHOW SNODES */
-2, /* (261) cmd ::= SHOW CLUSTER */
-2, /* (262) cmd ::= SHOW TRANSACTIONS */
-4, /* (263) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
-2, /* (264) cmd ::= SHOW CONSUMERS */
-2, /* (265) cmd ::= SHOW SUBSCRIPTIONS */
-5, /* (266) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
-6, /* (267) cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */
-7, /* (268) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
-8, /* (269) cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */
-5, /* (270) cmd ::= SHOW VNODES ON DNODE NK_INTEGER */
-5, /* (271) cmd ::= SHOW VNODES ON DNODE NK_STRING */
-3, /* (272) cmd ::= SHOW db_name_cond_opt ALIVE */
-3, /* (273) cmd ::= SHOW CLUSTER ALIVE */
0, /* (274) db_name_cond_opt ::= */
-2, /* (275) db_name_cond_opt ::= db_name NK_DOT */
0, /* (276) like_pattern_opt ::= */
-2, /* (277) like_pattern_opt ::= LIKE NK_STRING */
-1, /* (278) table_name_cond ::= table_name */
0, /* (279) from_db_opt ::= */
-2, /* (280) from_db_opt ::= FROM db_name */
0, /* (281) tag_list_opt ::= */
-1, /* (282) tag_list_opt ::= tag_item */
-3, /* (283) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */
-1, /* (284) tag_item ::= TBNAME */
-1, /* (285) tag_item ::= QTAGS */
-1, /* (286) tag_item ::= column_name */
-2, /* (287) tag_item ::= column_name column_alias */
-3, /* (288) tag_item ::= column_name AS column_alias */
-8, /* (289) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */
-9, /* (290) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */
-4, /* (291) cmd ::= DROP INDEX exists_opt full_index_name */
-1, /* (292) full_index_name ::= index_name */
-3, /* (293) full_index_name ::= db_name NK_DOT index_name */
-10, /* (294) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
-12, /* (295) 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 */
-1, /* (296) func_list ::= func */
-3, /* (297) func_list ::= func_list NK_COMMA func */
-4, /* (298) func ::= sma_func_name NK_LP expression_list NK_RP */
-1, /* (299) sma_func_name ::= function_name */
-1, /* (300) sma_func_name ::= COUNT */
-1, /* (301) sma_func_name ::= FIRST */
-1, /* (302) sma_func_name ::= LAST */
-1, /* (303) sma_func_name ::= LAST_ROW */
0, /* (304) sma_stream_opt ::= */
-3, /* (305) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
-3, /* (306) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
-3, /* (307) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
-1, /* (308) with_meta ::= AS */
-3, /* (309) with_meta ::= WITH META AS */
-3, /* (310) with_meta ::= ONLY META AS */
-6, /* (311) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
-7, /* (312) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */
-8, /* (313) cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */
-4, /* (314) cmd ::= DROP TOPIC exists_opt topic_name */
-7, /* (315) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
-2, /* (316) cmd ::= DESC full_table_name */
-2, /* (317) cmd ::= DESCRIBE full_table_name */
-3, /* (318) cmd ::= RESET QUERY CACHE */
-4, /* (319) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
-4, /* (320) cmd ::= EXPLAIN analyze_opt explain_options insert_query */
0, /* (321) analyze_opt ::= */
-1, /* (322) analyze_opt ::= ANALYZE */
0, /* (323) explain_options ::= */
-3, /* (324) explain_options ::= explain_options VERBOSE NK_BOOL */
-3, /* (325) explain_options ::= explain_options RATIO NK_FLOAT */
-12, /* (326) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
-4, /* (327) cmd ::= DROP FUNCTION exists_opt function_name */
0, /* (328) agg_func_opt ::= */
-1, /* (329) agg_func_opt ::= AGGREGATE */
0, /* (330) bufsize_opt ::= */
-2, /* (331) bufsize_opt ::= BUFSIZE NK_INTEGER */
0, /* (332) language_opt ::= */
-2, /* (333) language_opt ::= LANGUAGE NK_STRING */
0, /* (334) or_replace_opt ::= */
-2, /* (335) or_replace_opt ::= OR REPLACE */
-12, /* (336) 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 */
-4, /* (337) cmd ::= DROP STREAM exists_opt stream_name */
-4, /* (338) cmd ::= PAUSE STREAM exists_opt stream_name */
-5, /* (339) cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
0, /* (340) col_list_opt ::= */
-3, /* (341) col_list_opt ::= NK_LP col_name_list NK_RP */
0, /* (342) tag_def_or_ref_opt ::= */
-1, /* (343) tag_def_or_ref_opt ::= tags_def */
-4, /* (344) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
0, /* (345) stream_options ::= */
-3, /* (346) stream_options ::= stream_options TRIGGER AT_ONCE */
-3, /* (347) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
-4, /* (348) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
-3, /* (349) stream_options ::= stream_options WATERMARK duration_literal */
-4, /* (350) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
-3, /* (351) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
-3, /* (352) stream_options ::= stream_options DELETE_MARK duration_literal */
-4, /* (353) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
0, /* (354) subtable_opt ::= */
-4, /* (355) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
0, /* (356) ignore_opt ::= */
-2, /* (357) ignore_opt ::= IGNORE UNTREATED */
-3, /* (358) cmd ::= KILL CONNECTION NK_INTEGER */
-3, /* (359) cmd ::= KILL QUERY NK_STRING */
-3, /* (360) cmd ::= KILL TRANSACTION NK_INTEGER */
-2, /* (361) cmd ::= BALANCE VGROUP */
-3, /* (362) cmd ::= BALANCE VGROUP LEADER */
-4, /* (363) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
-4, /* (364) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
-3, /* (365) cmd ::= SPLIT VGROUP NK_INTEGER */
-2, /* (366) dnode_list ::= DNODE NK_INTEGER */
-3, /* (367) dnode_list ::= dnode_list DNODE NK_INTEGER */
-4, /* (368) cmd ::= DELETE FROM full_table_name where_clause_opt */
-1, /* (369) cmd ::= query_or_subquery */
-1, /* (370) cmd ::= insert_query */
-7, /* (371) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
-4, /* (372) insert_query ::= INSERT INTO full_table_name query_or_subquery */
-1, /* (373) literal ::= NK_INTEGER */
-1, /* (374) literal ::= NK_FLOAT */
-1, /* (375) literal ::= NK_STRING */
-1, /* (376) literal ::= NK_BOOL */
-2, /* (377) literal ::= TIMESTAMP NK_STRING */
-1, /* (378) literal ::= duration_literal */
-1, /* (379) literal ::= NULL */
-1, /* (380) literal ::= NK_QUESTION */
-1, /* (381) duration_literal ::= NK_VARIABLE */
-1, /* (382) signed ::= NK_INTEGER */
-2, /* (383) signed ::= NK_PLUS NK_INTEGER */
-2, /* (384) signed ::= NK_MINUS NK_INTEGER */
-1, /* (385) signed ::= NK_FLOAT */
-2, /* (386) signed ::= NK_PLUS NK_FLOAT */
-2, /* (387) signed ::= NK_MINUS NK_FLOAT */
-1, /* (388) signed_literal ::= signed */
-1, /* (389) signed_literal ::= NK_STRING */
-1, /* (390) signed_literal ::= NK_BOOL */
-2, /* (391) signed_literal ::= TIMESTAMP NK_STRING */
-1, /* (392) signed_literal ::= duration_literal */
-1, /* (393) signed_literal ::= NULL */
-1, /* (394) signed_literal ::= literal_func */
-1, /* (395) signed_literal ::= NK_QUESTION */
-1, /* (396) literal_list ::= signed_literal */
-3, /* (397) literal_list ::= literal_list NK_COMMA signed_literal */
-1, /* (398) db_name ::= NK_ID */
-1, /* (399) table_name ::= NK_ID */
-1, /* (400) column_name ::= NK_ID */
-1, /* (401) function_name ::= NK_ID */
-1, /* (402) table_alias ::= NK_ID */
-1, /* (403) column_alias ::= NK_ID */
-1, /* (404) user_name ::= NK_ID */
-1, /* (405) topic_name ::= NK_ID */
-1, /* (406) stream_name ::= NK_ID */
-1, /* (407) cgroup_name ::= NK_ID */
-1, /* (408) index_name ::= NK_ID */
-1, /* (409) expr_or_subquery ::= expression */
-1, /* (410) expression ::= literal */
-1, /* (411) expression ::= pseudo_column */
-1, /* (412) expression ::= column_reference */
-1, /* (413) expression ::= function_expression */
-1, /* (414) expression ::= case_when_expression */
-3, /* (415) expression ::= NK_LP expression NK_RP */
-2, /* (416) expression ::= NK_PLUS expr_or_subquery */
-2, /* (417) expression ::= NK_MINUS expr_or_subquery */
-3, /* (418) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
-3, /* (419) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
-3, /* (420) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
-3, /* (421) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
-3, /* (422) expression ::= expr_or_subquery NK_REM expr_or_subquery */
-3, /* (423) expression ::= column_reference NK_ARROW NK_STRING */
-3, /* (424) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
-3, /* (425) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
-1, /* (426) expression_list ::= expr_or_subquery */
-3, /* (427) expression_list ::= expression_list NK_COMMA expr_or_subquery */
-1, /* (428) column_reference ::= column_name */
-3, /* (429) column_reference ::= table_name NK_DOT column_name */
-1, /* (430) pseudo_column ::= ROWTS */
-1, /* (431) pseudo_column ::= TBNAME */
-3, /* (432) pseudo_column ::= table_name NK_DOT TBNAME */
-1, /* (433) pseudo_column ::= QSTART */
-1, /* (434) pseudo_column ::= QEND */
-1, /* (435) pseudo_column ::= QDURATION */
-1, /* (436) pseudo_column ::= WSTART */
-1, /* (437) pseudo_column ::= WEND */
-1, /* (438) pseudo_column ::= WDURATION */
-1, /* (439) pseudo_column ::= IROWTS */
-1, /* (440) pseudo_column ::= ISFILLED */
-1, /* (441) pseudo_column ::= QTAGS */
-4, /* (442) function_expression ::= function_name NK_LP expression_list NK_RP */
-4, /* (443) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
-6, /* (444) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
-1, /* (445) function_expression ::= literal_func */
-3, /* (446) literal_func ::= noarg_func NK_LP NK_RP */
-1, /* (447) literal_func ::= NOW */
-1, /* (448) noarg_func ::= NOW */
-1, /* (449) noarg_func ::= TODAY */
-1, /* (450) noarg_func ::= TIMEZONE */
-1, /* (451) noarg_func ::= DATABASE */
-1, /* (452) noarg_func ::= CLIENT_VERSION */
-1, /* (453) noarg_func ::= SERVER_VERSION */
-1, /* (454) noarg_func ::= SERVER_STATUS */
-1, /* (455) noarg_func ::= CURRENT_USER */
-1, /* (456) noarg_func ::= USER */
-1, /* (457) star_func ::= COUNT */
-1, /* (458) star_func ::= FIRST */
-1, /* (459) star_func ::= LAST */
-1, /* (460) star_func ::= LAST_ROW */
-1, /* (461) star_func_para_list ::= NK_STAR */
-1, /* (462) star_func_para_list ::= other_para_list */
-1, /* (463) other_para_list ::= star_func_para */
-3, /* (464) other_para_list ::= other_para_list NK_COMMA star_func_para */
-1, /* (465) star_func_para ::= expr_or_subquery */
-3, /* (466) star_func_para ::= table_name NK_DOT NK_STAR */
-4, /* (467) case_when_expression ::= CASE when_then_list case_when_else_opt END */
-5, /* (468) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
-1, /* (469) when_then_list ::= when_then_expr */
-2, /* (470) when_then_list ::= when_then_list when_then_expr */
-4, /* (471) when_then_expr ::= WHEN common_expression THEN common_expression */
0, /* (472) case_when_else_opt ::= */
-2, /* (473) case_when_else_opt ::= ELSE common_expression */
-3, /* (474) predicate ::= expr_or_subquery compare_op expr_or_subquery */
-5, /* (475) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
-6, /* (476) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
-3, /* (477) predicate ::= expr_or_subquery IS NULL */
-4, /* (478) predicate ::= expr_or_subquery IS NOT NULL */
-3, /* (479) predicate ::= expr_or_subquery in_op in_predicate_value */
-1, /* (480) compare_op ::= NK_LT */
-1, /* (481) compare_op ::= NK_GT */
-1, /* (482) compare_op ::= NK_LE */
-1, /* (483) compare_op ::= NK_GE */
-1, /* (484) compare_op ::= NK_NE */
-1, /* (485) compare_op ::= NK_EQ */
-1, /* (486) compare_op ::= LIKE */
-2, /* (487) compare_op ::= NOT LIKE */
-1, /* (488) compare_op ::= MATCH */
-1, /* (489) compare_op ::= NMATCH */
-1, /* (490) compare_op ::= CONTAINS */
-1, /* (491) in_op ::= IN */
-2, /* (492) in_op ::= NOT IN */
-3, /* (493) in_predicate_value ::= NK_LP literal_list NK_RP */
-1, /* (494) boolean_value_expression ::= boolean_primary */
-2, /* (495) boolean_value_expression ::= NOT boolean_primary */
-3, /* (496) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
-3, /* (497) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
-1, /* (498) boolean_primary ::= predicate */
-3, /* (499) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
-1, /* (500) common_expression ::= expr_or_subquery */
-1, /* (501) common_expression ::= boolean_value_expression */
0, /* (502) from_clause_opt ::= */
-2, /* (503) from_clause_opt ::= FROM table_reference_list */
-1, /* (504) table_reference_list ::= table_reference */
-3, /* (505) table_reference_list ::= table_reference_list NK_COMMA table_reference */
-1, /* (506) table_reference ::= table_primary */
-1, /* (507) table_reference ::= joined_table */
-2, /* (508) table_primary ::= table_name alias_opt */
-4, /* (509) table_primary ::= db_name NK_DOT table_name alias_opt */
-2, /* (510) table_primary ::= subquery alias_opt */
-1, /* (511) table_primary ::= parenthesized_joined_table */
0, /* (512) alias_opt ::= */
-1, /* (513) alias_opt ::= table_alias */
-2, /* (514) alias_opt ::= AS table_alias */
-3, /* (515) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
-3, /* (516) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
-6, /* (517) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
0, /* (518) join_type ::= */
-1, /* (519) join_type ::= INNER */
-12, /* (520) 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 */
0, /* (521) set_quantifier_opt ::= */
-1, /* (522) set_quantifier_opt ::= DISTINCT */
-1, /* (523) set_quantifier_opt ::= ALL */
-1, /* (524) select_list ::= select_item */
-3, /* (525) select_list ::= select_list NK_COMMA select_item */
-1, /* (526) select_item ::= NK_STAR */
-1, /* (527) select_item ::= common_expression */
-2, /* (528) select_item ::= common_expression column_alias */
-3, /* (529) select_item ::= common_expression AS column_alias */
-3, /* (530) select_item ::= table_name NK_DOT NK_STAR */
0, /* (531) where_clause_opt ::= */
-2, /* (532) where_clause_opt ::= WHERE search_condition */
0, /* (533) partition_by_clause_opt ::= */
-3, /* (534) partition_by_clause_opt ::= PARTITION BY partition_list */
-1, /* (535) partition_list ::= partition_item */
-3, /* (536) partition_list ::= partition_list NK_COMMA partition_item */
-1, /* (537) partition_item ::= expr_or_subquery */
-2, /* (538) partition_item ::= expr_or_subquery column_alias */
-3, /* (539) partition_item ::= expr_or_subquery AS column_alias */
0, /* (540) twindow_clause_opt ::= */
-6, /* (541) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
-4, /* (542) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
-6, /* (543) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
-8, /* (544) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
-7, /* (545) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
0, /* (546) sliding_opt ::= */
-4, /* (547) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
0, /* (548) fill_opt ::= */
-4, /* (549) fill_opt ::= FILL NK_LP fill_mode NK_RP */
-6, /* (550) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */
-6, /* (551) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */
-1, /* (552) fill_mode ::= NONE */
-1, /* (553) fill_mode ::= PREV */
-1, /* (554) fill_mode ::= NULL */
-1, /* (555) fill_mode ::= NULL_F */
-1, /* (556) fill_mode ::= LINEAR */
-1, /* (557) fill_mode ::= NEXT */
0, /* (558) group_by_clause_opt ::= */
-3, /* (559) group_by_clause_opt ::= GROUP BY group_by_list */
-1, /* (560) group_by_list ::= expr_or_subquery */
-3, /* (561) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
0, /* (562) having_clause_opt ::= */
-2, /* (563) having_clause_opt ::= HAVING search_condition */
0, /* (564) range_opt ::= */
-6, /* (565) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
-4, /* (566) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */
0, /* (567) every_opt ::= */
-4, /* (568) every_opt ::= EVERY NK_LP duration_literal NK_RP */
-4, /* (569) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
-1, /* (570) query_simple ::= query_specification */
-1, /* (571) query_simple ::= union_query_expression */
-4, /* (572) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
-3, /* (573) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
-1, /* (574) query_simple_or_subquery ::= query_simple */
-1, /* (575) query_simple_or_subquery ::= subquery */
-1, /* (576) query_or_subquery ::= query_expression */
-1, /* (577) query_or_subquery ::= subquery */
0, /* (578) order_by_clause_opt ::= */
-3, /* (579) order_by_clause_opt ::= ORDER BY sort_specification_list */
0, /* (580) slimit_clause_opt ::= */
-2, /* (581) slimit_clause_opt ::= SLIMIT NK_INTEGER */
-4, /* (582) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
-4, /* (583) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
0, /* (584) limit_clause_opt ::= */
-2, /* (585) limit_clause_opt ::= LIMIT NK_INTEGER */
-4, /* (586) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
-4, /* (587) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
-3, /* (588) subquery ::= NK_LP query_expression NK_RP */
-3, /* (589) subquery ::= NK_LP subquery NK_RP */
-1, /* (590) search_condition ::= common_expression */
-1, /* (591) sort_specification_list ::= sort_specification */
-3, /* (592) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
-3, /* (593) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
0, /* (594) ordering_specification_opt ::= */
-1, /* (595) ordering_specification_opt ::= ASC */
-1, /* (596) ordering_specification_opt ::= DESC */
0, /* (597) null_ordering_opt ::= */
-2, /* (598) null_ordering_opt ::= NULLS FIRST */
-2, /* (599) null_ordering_opt ::= NULLS LAST */
};
static void yy_accept(yyParser*); /* Forward Declaration */
/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any). The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed. As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static YYACTIONTYPE yy_reduce(
yyParser *yypParser, /* The parser */
unsigned int yyruleno, /* Number of the rule by which to reduce */
int yyLookahead, /* Lookahead token, or YYNOCODE if none */
2022-03-10 07:36:06 +00:00
ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */
ParseCTX_PDECL /* %extra_context */
){
int yygoto; /* The next state */
YYACTIONTYPE yyact; /* The next action */
yyStackEntry *yymsp; /* The top of the parser's stack */
int yysize; /* Amount to pop the stack */
2022-03-10 07:36:06 +00:00
ParseARG_FETCH
(void)yyLookahead;
(void)yyLookaheadToken;
yymsp = yypParser->yytos;
switch( yyruleno ){
/* Beginning here are the reduction cases. A typical example
** follows:
** case 0:
** #line <lineno> <grammarfile>
** { ... } // User supplied code
** #line <lineno> <thisfile>
** break;
*/
/********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor;
case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
#line 50 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
#line 4816 "sql.c"
2023-06-30 08:57:29 +00:00
yy_destructor(yypParser,339,&yymsp[0].minor);
break;
case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
#line 51 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
#line 4822 "sql.c"
2023-06-30 08:57:29 +00:00
yy_destructor(yypParser,340,&yymsp[0].minor);
break;
case 2: /* account_options ::= */
#line 55 "sql.y"
{ }
#line 4828 "sql.c"
break;
case 3: /* account_options ::= account_options PPS literal */
case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4);
case 5: /* account_options ::= account_options STORAGE literal */ yytestcase(yyruleno==5);
case 6: /* account_options ::= account_options STREAMS literal */ yytestcase(yyruleno==6);
case 7: /* account_options ::= account_options QTIME literal */ yytestcase(yyruleno==7);
case 8: /* account_options ::= account_options DBS literal */ yytestcase(yyruleno==8);
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);
2023-06-30 08:57:29 +00:00
{ yy_destructor(yypParser,339,&yymsp[-2].minor);
#line 56 "sql.y"
{ }
#line 4842 "sql.c"
2023-06-30 08:57:29 +00:00
yy_destructor(yypParser,341,&yymsp[0].minor);
}
break;
case 12: /* alter_account_options ::= alter_account_option */
2023-06-30 08:57:29 +00:00
{ yy_destructor(yypParser,342,&yymsp[0].minor);
#line 68 "sql.y"
{ }
#line 4850 "sql.c"
}
break;
case 13: /* alter_account_options ::= alter_account_options alter_account_option */
2023-06-30 08:57:29 +00:00
{ yy_destructor(yypParser,340,&yymsp[-1].minor);
#line 69 "sql.y"
{ }
#line 4857 "sql.c"
2023-06-30 08:57:29 +00:00
yy_destructor(yypParser,342,&yymsp[0].minor);
}
break;
case 14: /* alter_account_option ::= PASS literal */
case 15: /* alter_account_option ::= PPS literal */ yytestcase(yyruleno==15);
case 16: /* alter_account_option ::= TSERIES literal */ yytestcase(yyruleno==16);
case 17: /* alter_account_option ::= STORAGE literal */ yytestcase(yyruleno==17);
case 18: /* alter_account_option ::= STREAMS literal */ yytestcase(yyruleno==18);
case 19: /* alter_account_option ::= QTIME literal */ yytestcase(yyruleno==19);
case 20: /* alter_account_option ::= DBS literal */ yytestcase(yyruleno==20);
case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21);
case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22);
case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23);
#line 73 "sql.y"
{ }
#line 4873 "sql.c"
2023-06-30 08:57:29 +00:00
yy_destructor(yypParser,341,&yymsp[0].minor);
break;
2022-06-22 08:35:14 +00:00
case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
#line 85 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy371, &yymsp[-1].minor.yy0, yymsp[0].minor.yy475); }
#line 4879 "sql.c"
break;
case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
#line 86 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy371, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
#line 4884 "sql.c"
break;
2022-06-22 08:35:14 +00:00
case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
#line 87 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy371, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
#line 4889 "sql.c"
break;
2022-06-22 08:35:14 +00:00
case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
#line 88 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy371, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
#line 4894 "sql.c"
break;
2022-06-22 08:35:14 +00:00
case 28: /* cmd ::= DROP USER user_name */
#line 89 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy371); }
#line 4899 "sql.c"
break;
2022-06-22 08:35:14 +00:00
case 29: /* sysinfo_opt ::= */
#line 93 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy475 = 1; }
#line 4904 "sql.c"
break;
2022-06-22 08:35:14 +00:00
case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
#line 94 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy475 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
#line 4909 "sql.c"
break;
2023-03-28 10:43:58 +00:00
case 31: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
#line 97 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy729, &yymsp[-3].minor.yy347, &yymsp[0].minor.yy371, yymsp[-2].minor.yy452); }
#line 4914 "sql.c"
break;
2023-03-28 10:43:58 +00:00
case 32: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
#line 98 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy729, &yymsp[-3].minor.yy347, &yymsp[0].minor.yy371, yymsp[-2].minor.yy452); }
#line 4919 "sql.c"
break;
2022-06-22 08:35:14 +00:00
case 33: /* privileges ::= ALL */
#line 102 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_ALL; }
#line 4924 "sql.c"
break;
2022-06-22 08:35:14 +00:00
case 34: /* privileges ::= priv_type_list */
case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36);
#line 103 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy729 = yymsp[0].minor.yy729; }
#line 4930 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy729 = yylhsminor.yy729;
break;
case 35: /* privileges ::= SUBSCRIBE */
#line 104 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_SUBSCRIBE; }
#line 4936 "sql.c"
break;
case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
#line 109 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy729 = yymsp[-2].minor.yy729 | yymsp[0].minor.yy729; }
#line 4941 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy729 = yylhsminor.yy729;
break;
case 38: /* priv_type ::= READ */
#line 113 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_READ; }
#line 4947 "sql.c"
break;
case 39: /* priv_type ::= WRITE */
#line 114 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy729 = PRIVILEGE_TYPE_WRITE; }
#line 4952 "sql.c"
break;
case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
#line 118 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy347.first = yymsp[-2].minor.yy0; yylhsminor.yy347.second = yymsp[0].minor.yy0; }
#line 4957 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy347 = yylhsminor.yy347;
2022-06-22 08:35:14 +00:00
break;
case 41: /* priv_level ::= db_name NK_DOT NK_STAR */
#line 119 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy347.first = yymsp[-2].minor.yy371; yylhsminor.yy347.second = yymsp[0].minor.yy0; }
#line 4963 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy347 = yylhsminor.yy347;
2023-03-28 10:43:58 +00:00
break;
case 42: /* priv_level ::= db_name NK_DOT table_name */
#line 120 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy347.first = yymsp[-2].minor.yy371; yylhsminor.yy347.second = yymsp[0].minor.yy371; }
#line 4969 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy347 = yylhsminor.yy347;
2023-03-28 10:43:58 +00:00
break;
case 43: /* priv_level ::= topic_name */
#line 121 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy347.first = yymsp[0].minor.yy371; yylhsminor.yy347.second = nil_token; }
#line 4975 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy347 = yylhsminor.yy347;
2023-03-28 10:43:58 +00:00
break;
case 44: /* with_opt ::= */
2023-05-16 01:50:10 +00:00
case 144: /* start_opt ::= */ yytestcase(yyruleno==144);
case 148: /* end_opt ::= */ yytestcase(yyruleno==148);
case 276: /* like_pattern_opt ::= */ yytestcase(yyruleno==276);
case 354: /* subtable_opt ::= */ yytestcase(yyruleno==354);
case 472: /* case_when_else_opt ::= */ yytestcase(yyruleno==472);
case 502: /* from_clause_opt ::= */ yytestcase(yyruleno==502);
case 531: /* where_clause_opt ::= */ yytestcase(yyruleno==531);
case 540: /* twindow_clause_opt ::= */ yytestcase(yyruleno==540);
case 546: /* sliding_opt ::= */ yytestcase(yyruleno==546);
case 548: /* fill_opt ::= */ yytestcase(yyruleno==548);
case 562: /* having_clause_opt ::= */ yytestcase(yyruleno==562);
case 564: /* range_opt ::= */ yytestcase(yyruleno==564);
case 567: /* every_opt ::= */ yytestcase(yyruleno==567);
case 580: /* slimit_clause_opt ::= */ yytestcase(yyruleno==580);
case 584: /* limit_clause_opt ::= */ yytestcase(yyruleno==584);
#line 123 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy452 = NULL; }
#line 4996 "sql.c"
2023-03-28 10:43:58 +00:00
break;
case 45: /* with_opt ::= WITH search_condition */
case 503: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==503);
case 532: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==532);
case 563: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==563);
#line 124 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = yymsp[0].minor.yy452; }
#line 5004 "sql.c"
2023-03-28 10:43:58 +00:00
break;
case 46: /* cmd ::= CREATE DNODE dnode_endpoint */
#line 127 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy371, NULL); }
#line 5009 "sql.c"
2023-03-28 10:43:58 +00:00
break;
case 47: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
#line 128 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy0); }
#line 5014 "sql.c"
2023-03-28 10:43:58 +00:00
break;
case 48: /* cmd ::= DROP DNODE NK_INTEGER force_opt */
#line 129 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy667, false); }
#line 5019 "sql.c"
2023-03-28 10:43:58 +00:00
break;
case 49: /* cmd ::= DROP DNODE dnode_endpoint force_opt */
#line 130 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy371, yymsp[0].minor.yy667, false); }
#line 5024 "sql.c"
2023-03-28 10:43:58 +00:00
break;
2023-05-16 01:50:10 +00:00
case 50: /* cmd ::= DROP DNODE NK_INTEGER unsafe_opt */
#line 131 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, false, yymsp[0].minor.yy667); }
#line 5029 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 51: /* cmd ::= DROP DNODE dnode_endpoint unsafe_opt */
#line 132 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy371, false, yymsp[0].minor.yy667); }
#line 5034 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 52: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
#line 133 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
#line 5039 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 53: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
#line 134 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
#line 5044 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 54: /* cmd ::= ALTER ALL DNODES NK_STRING */
#line 135 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); }
#line 5049 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 55: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
#line 136 "sql.y"
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
#line 5054 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 56: /* cmd ::= RESTORE DNODE NK_INTEGER */
#line 137 "sql.y"
2023-05-09 11:19:14 +00:00
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_DNODE_STMT, &yymsp[0].minor.yy0); }
#line 5059 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 57: /* dnode_endpoint ::= NK_STRING */
case 58: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==58);
case 59: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==59);
case 300: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==300);
case 301: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==301);
case 302: /* sma_func_name ::= LAST */ yytestcase(yyruleno==302);
case 303: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==303);
case 398: /* db_name ::= NK_ID */ yytestcase(yyruleno==398);
case 399: /* table_name ::= NK_ID */ yytestcase(yyruleno==399);
case 400: /* column_name ::= NK_ID */ yytestcase(yyruleno==400);
case 401: /* function_name ::= NK_ID */ yytestcase(yyruleno==401);
case 402: /* table_alias ::= NK_ID */ yytestcase(yyruleno==402);
case 403: /* column_alias ::= NK_ID */ yytestcase(yyruleno==403);
case 404: /* user_name ::= NK_ID */ yytestcase(yyruleno==404);
case 405: /* topic_name ::= NK_ID */ yytestcase(yyruleno==405);
case 406: /* stream_name ::= NK_ID */ yytestcase(yyruleno==406);
case 407: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==407);
case 408: /* index_name ::= NK_ID */ yytestcase(yyruleno==408);
case 448: /* noarg_func ::= NOW */ yytestcase(yyruleno==448);
case 449: /* noarg_func ::= TODAY */ yytestcase(yyruleno==449);
case 450: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==450);
case 451: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==451);
case 452: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==452);
case 453: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==453);
case 454: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==454);
case 455: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==455);
case 456: /* noarg_func ::= USER */ yytestcase(yyruleno==456);
case 457: /* star_func ::= COUNT */ yytestcase(yyruleno==457);
case 458: /* star_func ::= FIRST */ yytestcase(yyruleno==458);
case 459: /* star_func ::= LAST */ yytestcase(yyruleno==459);
case 460: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==460);
#line 141 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy371 = yymsp[0].minor.yy0; }
#line 5094 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy371 = yylhsminor.yy371;
2023-05-16 01:50:10 +00:00
break;
case 60: /* force_opt ::= */
case 84: /* not_exists_opt ::= */ yytestcase(yyruleno==84);
case 86: /* exists_opt ::= */ yytestcase(yyruleno==86);
case 321: /* analyze_opt ::= */ yytestcase(yyruleno==321);
case 328: /* agg_func_opt ::= */ yytestcase(yyruleno==328);
case 334: /* or_replace_opt ::= */ yytestcase(yyruleno==334);
case 356: /* ignore_opt ::= */ yytestcase(yyruleno==356);
case 521: /* set_quantifier_opt ::= */ yytestcase(yyruleno==521);
#line 147 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy667 = false; }
#line 5107 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 61: /* force_opt ::= FORCE */
case 62: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==62);
case 322: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==322);
case 329: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==329);
case 522: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==522);
#line 148 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy667 = true; }
#line 5116 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 63: /* cmd ::= ALTER LOCAL NK_STRING */
#line 155 "sql.y"
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
#line 5121 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 64: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
#line 156 "sql.y"
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
#line 5126 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 65: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
#line 159 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
#line 5131 "sql.c"
2022-03-15 12:04:52 +00:00
break;
2023-05-16 01:50:10 +00:00
case 66: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
#line 160 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
#line 5136 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 67: /* cmd ::= RESTORE QNODE ON DNODE NK_INTEGER */
#line 161 "sql.y"
2023-05-09 11:19:14 +00:00
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_QNODE_STMT, &yymsp[0].minor.yy0); }
#line 5141 "sql.c"
2023-05-09 11:19:14 +00:00
break;
2023-05-16 01:50:10 +00:00
case 68: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
#line 164 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
#line 5146 "sql.c"
2022-03-15 12:04:52 +00:00
break;
2023-05-16 01:50:10 +00:00
case 69: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
#line 165 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
#line 5151 "sql.c"
2022-03-15 12:04:52 +00:00
break;
2023-05-16 01:50:10 +00:00
case 70: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
#line 168 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
#line 5156 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 71: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
#line 169 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
#line 5161 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 72: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
#line 172 "sql.y"
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
#line 5166 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 73: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
#line 173 "sql.y"
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
#line 5171 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 74: /* cmd ::= RESTORE MNODE ON DNODE NK_INTEGER */
#line 174 "sql.y"
2023-05-09 11:19:14 +00:00
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_MNODE_STMT, &yymsp[0].minor.yy0); }
#line 5176 "sql.c"
2023-05-09 11:19:14 +00:00
break;
2023-05-16 01:50:10 +00:00
case 75: /* cmd ::= RESTORE VNODE ON DNODE NK_INTEGER */
#line 177 "sql.y"
2023-05-09 11:19:14 +00:00
{ pCxt->pRootNode = createRestoreComponentNodeStmt(pCxt, QUERY_NODE_RESTORE_VNODE_STMT, &yymsp[0].minor.yy0); }
#line 5181 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 76: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
#line 180 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy667, &yymsp[-1].minor.yy371, yymsp[0].minor.yy452); }
#line 5186 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 77: /* cmd ::= DROP DATABASE exists_opt db_name */
#line 181 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy667, &yymsp[0].minor.yy371); }
#line 5191 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 78: /* cmd ::= USE db_name */
#line 182 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy371); }
#line 5196 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 79: /* cmd ::= ALTER DATABASE db_name alter_db_options */
#line 183 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy371, yymsp[0].minor.yy452); }
#line 5201 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 80: /* cmd ::= FLUSH DATABASE db_name */
#line 184 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy371); }
#line 5206 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 81: /* cmd ::= TRIM DATABASE db_name speed_opt */
#line 185 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy371, yymsp[0].minor.yy416); }
#line 5211 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 82: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */
#line 186 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy371, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 5216 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 83: /* not_exists_opt ::= IF NOT EXISTS */
#line 190 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy667 = true; }
#line 5221 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 85: /* exists_opt ::= IF EXISTS */
case 335: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==335);
case 357: /* ignore_opt ::= IGNORE UNTREATED */ yytestcase(yyruleno==357);
#line 195 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy667 = true; }
#line 5228 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 87: /* db_options ::= */
#line 198 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy452 = createDefaultDatabaseOptions(pCxt); }
#line 5233 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 88: /* db_options ::= db_options BUFFER NK_INTEGER */
#line 199 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
#line 5238 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 89: /* db_options ::= db_options CACHEMODEL NK_STRING */
#line 200 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
#line 5244 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 90: /* db_options ::= db_options CACHESIZE NK_INTEGER */
#line 201 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
#line 5250 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 91: /* db_options ::= db_options COMP NK_INTEGER */
#line 202 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
#line 5256 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 92: /* db_options ::= db_options DURATION NK_INTEGER */
case 93: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==93);
#line 203 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
#line 5263 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 94: /* db_options ::= db_options MAXROWS NK_INTEGER */
#line 205 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
#line 5269 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 95: /* db_options ::= db_options MINROWS NK_INTEGER */
#line 206 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
#line 5275 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 96: /* db_options ::= db_options KEEP integer_list */
case 97: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==97);
#line 207 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_KEEP, yymsp[0].minor.yy812); }
#line 5282 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 98: /* db_options ::= db_options PAGES NK_INTEGER */
#line 209 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
#line 5288 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 99: /* db_options ::= db_options PAGESIZE NK_INTEGER */
#line 210 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
#line 5294 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 100: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
#line 211 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
#line 5300 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 101: /* db_options ::= db_options PRECISION NK_STRING */
#line 212 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
#line 5306 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 102: /* db_options ::= db_options REPLICA NK_INTEGER */
#line 213 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
#line 5312 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 103: /* db_options ::= db_options VGROUPS NK_INTEGER */
#line 215 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
#line 5318 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 104: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
#line 216 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
#line 5324 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 105: /* db_options ::= db_options RETENTIONS retention_list */
#line 217 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_RETENTIONS, yymsp[0].minor.yy812); }
#line 5330 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 106: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
#line 218 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
#line 5336 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 107: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
#line 219 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
#line 5342 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 108: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
#line 220 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
#line 5348 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 109: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
#line 221 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
#line 5354 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 110: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
#line 222 "sql.y"
2022-07-25 13:09:06 +00:00
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
2023-06-30 11:36:39 +00:00
yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-3].minor.yy452, DB_OPTION_WAL_RETENTION_PERIOD, &t);
2022-07-25 13:09:06 +00:00
}
#line 5364 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2022-07-25 13:09:06 +00:00
break;
2023-05-16 01:50:10 +00:00
case 111: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
#line 227 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
#line 5370 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2022-07-25 13:09:06 +00:00
break;
2023-05-16 01:50:10 +00:00
case 112: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
#line 228 "sql.y"
2022-07-25 13:09:06 +00:00
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
2023-06-30 11:36:39 +00:00
yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-3].minor.yy452, DB_OPTION_WAL_RETENTION_SIZE, &t);
2022-07-25 13:09:06 +00:00
}
#line 5380 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 113: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
#line 233 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
#line 5386 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 114: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
#line 234 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
#line 5392 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 115: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
#line 235 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
#line 5398 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 116: /* db_options ::= db_options TABLE_PREFIX signed */
#line 236 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy452); }
#line 5404 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 117: /* db_options ::= db_options TABLE_SUFFIX signed */
#line 237 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setDatabaseOption(pCxt, yymsp[-2].minor.yy452, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy452); }
#line 5410 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 118: /* alter_db_options ::= alter_db_option */
#line 239 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterDatabaseOptions(pCxt); yylhsminor.yy452 = setAlterDatabaseOption(pCxt, yylhsminor.yy452, &yymsp[0].minor.yy365); }
#line 5416 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 119: /* alter_db_options ::= alter_db_options alter_db_option */
#line 240 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy452, &yymsp[0].minor.yy365); }
#line 5422 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 120: /* alter_db_option ::= BUFFER NK_INTEGER */
#line 244 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5428 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 121: /* alter_db_option ::= CACHEMODEL NK_STRING */
#line 245 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5433 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 122: /* alter_db_option ::= CACHESIZE NK_INTEGER */
#line 246 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5438 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 123: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
#line 247 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5443 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 124: /* alter_db_option ::= KEEP integer_list */
case 125: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==125);
#line 248 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_KEEP; yymsp[-1].minor.yy365.pList = yymsp[0].minor.yy812; }
#line 5449 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 126: /* alter_db_option ::= PAGES NK_INTEGER */
#line 250 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_PAGES; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5454 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 127: /* alter_db_option ::= REPLICA NK_INTEGER */
#line 251 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5459 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 128: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
#line 253 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_WAL; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5464 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 129: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
#line 254 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5469 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 130: /* alter_db_option ::= MINROWS NK_INTEGER */
#line 255 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5474 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 131: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
#line 256 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5479 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 132: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
#line 257 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy365.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy365.val = t;
}
#line 5488 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 133: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
#line 262 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5493 "sql.c"
break;
2023-05-16 01:50:10 +00:00
case 134: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
#line 263 "sql.y"
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy365.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy365.val = t;
}
#line 5502 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 135: /* integer_list ::= NK_INTEGER */
#line 271 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
#line 5507 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 136: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
case 367: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==367);
#line 272 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = addNodeToList(pCxt, yymsp[-2].minor.yy812, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
#line 5514 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 137: /* variable_list ::= NK_VARIABLE */
#line 276 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
#line 5520 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 138: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
#line 277 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = addNodeToList(pCxt, yymsp[-2].minor.yy812, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
#line 5526 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 139: /* retention_list ::= retention */
case 169: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==169);
case 172: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==172);
case 179: /* column_def_list ::= column_def */ yytestcase(yyruleno==179);
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 223: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==223);
case 228: /* col_name_list ::= col_name */ yytestcase(yyruleno==228);
case 282: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==282);
case 296: /* func_list ::= func */ yytestcase(yyruleno==296);
case 396: /* literal_list ::= signed_literal */ yytestcase(yyruleno==396);
case 463: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==463);
case 469: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==469);
case 524: /* select_list ::= select_item */ yytestcase(yyruleno==524);
case 535: /* partition_list ::= partition_item */ yytestcase(yyruleno==535);
case 591: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==591);
#line 281 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = createNodeList(pCxt, yymsp[0].minor.yy452); }
#line 5545 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 140: /* retention_list ::= retention_list NK_COMMA retention */
case 173: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==173);
case 180: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==180);
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 224: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==224);
case 229: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==229);
case 283: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==283);
case 297: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==297);
case 397: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==397);
case 464: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==464);
case 525: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==525);
case 536: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==536);
case 592: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==592);
#line 282 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = addNodeToList(pCxt, yymsp[-2].minor.yy812, yymsp[0].minor.yy452); }
#line 5562 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 141: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
#line 284 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
#line 5568 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 142: /* speed_opt ::= */
case 330: /* bufsize_opt ::= */ yytestcase(yyruleno==330);
#line 288 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy416 = 0; }
#line 5575 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 143: /* speed_opt ::= MAX_SPEED NK_INTEGER */
case 331: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==331);
#line 289 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy416 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
#line 5581 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 145: /* start_opt ::= START WITH NK_INTEGER */
case 149: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==149);
#line 292 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
#line 5587 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 146: /* start_opt ::= START WITH NK_STRING */
case 150: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==150);
#line 293 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
#line 5593 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 147: /* start_opt ::= START WITH TIMESTAMP NK_STRING */
case 151: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==151);
#line 294 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
#line 5599 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 152: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
case 154: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==154);
#line 303 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy667, yymsp[-5].minor.yy452, yymsp[-3].minor.yy812, yymsp[-1].minor.yy812, yymsp[0].minor.yy452); }
#line 5605 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 153: /* cmd ::= CREATE TABLE multi_create_clause */
#line 304 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy812); }
#line 5610 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 155: /* cmd ::= DROP TABLE multi_drop_clause */
#line 307 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy812); }
#line 5615 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 156: /* cmd ::= DROP STABLE exists_opt full_table_name */
#line 308 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy667, yymsp[0].minor.yy452); }
#line 5620 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 157: /* cmd ::= ALTER TABLE alter_table_clause */
case 369: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==369);
case 370: /* cmd ::= insert_query */ yytestcase(yyruleno==370);
#line 310 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = yymsp[0].minor.yy452; }
#line 5627 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 158: /* cmd ::= ALTER STABLE alter_table_clause */
#line 311 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy452); }
#line 5632 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 159: /* alter_table_clause ::= full_table_name alter_table_options */
#line 313 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 5637 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 160: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
#line 315 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy371, yymsp[0].minor.yy310); }
#line 5643 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 161: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
#line 316 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy371); }
#line 5649 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 162: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
#line 318 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy371, yymsp[0].minor.yy310); }
#line 5655 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 163: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
#line 320 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy371, &yymsp[0].minor.yy371); }
#line 5661 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 164: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
#line 322 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy371, yymsp[0].minor.yy310); }
#line 5667 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 165: /* alter_table_clause ::= full_table_name DROP TAG column_name */
#line 323 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy371); }
#line 5673 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 166: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
#line 325 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy371, yymsp[0].minor.yy310); }
#line 5679 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 167: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
#line 327 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy371, &yymsp[0].minor.yy371); }
#line 5685 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 168: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
#line 329 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy452, &yymsp[-2].minor.yy371, yymsp[0].minor.yy452); }
#line 5691 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-5].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 170: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
case 470: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==470);
#line 334 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = addNodeToList(pCxt, yymsp[-1].minor.yy812, yymsp[0].minor.yy452); }
#line 5698 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 171: /* 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 */
#line 338 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy667, yymsp[-8].minor.yy452, yymsp[-6].minor.yy452, yymsp[-5].minor.yy812, yymsp[-2].minor.yy812, yymsp[0].minor.yy452); }
#line 5704 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-9].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 174: /* drop_table_clause ::= exists_opt full_table_name */
#line 345 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createDropTableClause(pCxt, yymsp[-1].minor.yy667, yymsp[0].minor.yy452); }
#line 5710 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 175: /* specific_cols_opt ::= */
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 206: /* tags_def_opt ::= */ yytestcase(yyruleno==206);
case 281: /* tag_list_opt ::= */ yytestcase(yyruleno==281);
case 340: /* col_list_opt ::= */ yytestcase(yyruleno==340);
case 342: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==342);
case 533: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==533);
case 558: /* group_by_clause_opt ::= */ yytestcase(yyruleno==558);
case 578: /* order_by_clause_opt ::= */ yytestcase(yyruleno==578);
#line 349 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy812 = NULL; }
#line 5723 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 176: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
case 341: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==341);
#line 350 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy812 = yymsp[-1].minor.yy812; }
#line 5729 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 177: /* full_table_name ::= table_name */
#line 352 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy371, NULL); }
#line 5734 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 178: /* full_table_name ::= db_name NK_DOT table_name */
#line 353 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy371, NULL); }
#line 5740 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 181: /* column_def ::= column_name type_name */
#line 360 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy371, yymsp[0].minor.yy310, NULL); }
#line 5746 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 182: /* type_name ::= BOOL */
#line 365 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_BOOL); }
#line 5752 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 183: /* type_name ::= TINYINT */
#line 366 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_TINYINT); }
#line 5757 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 184: /* type_name ::= SMALLINT */
#line 367 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
#line 5762 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 185: /* type_name ::= INT */
case 186: /* type_name ::= INTEGER */ yytestcase(yyruleno==186);
#line 368 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_INT); }
#line 5768 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 187: /* type_name ::= BIGINT */
#line 370 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_BIGINT); }
#line 5773 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 188: /* type_name ::= FLOAT */
#line 371 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_FLOAT); }
#line 5778 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 189: /* type_name ::= DOUBLE */
#line 372 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
#line 5783 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 190: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
#line 373 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy310 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
#line 5788 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 191: /* type_name ::= TIMESTAMP */
#line 374 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
#line 5793 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 192: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
#line 375 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy310 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
#line 5798 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 193: /* type_name ::= TINYINT UNSIGNED */
#line 376 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy310 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
#line 5803 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 194: /* type_name ::= SMALLINT UNSIGNED */
#line 377 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy310 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
#line 5808 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 195: /* type_name ::= INT UNSIGNED */
#line 378 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy310 = createDataType(TSDB_DATA_TYPE_UINT); }
#line 5813 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 196: /* type_name ::= BIGINT UNSIGNED */
#line 379 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy310 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
#line 5818 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 197: /* type_name ::= JSON */
#line 380 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_JSON); }
#line 5823 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 198: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
#line 381 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy310 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
#line 5828 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 199: /* type_name ::= MEDIUMBLOB */
#line 382 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
#line 5833 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 200: /* type_name ::= BLOB */
#line 383 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_BLOB); }
#line 5838 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 201: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
#line 384 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy310 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
#line 5843 "sql.c"
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
break;
case 202: /* type_name ::= GEOMETRY NK_LP NK_INTEGER NK_RP */
#line 385 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy310 = createVarLenDataType(TSDB_DATA_TYPE_GEOMETRY, &yymsp[-1].minor.yy0); }
#line 5848 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 203: /* type_name ::= DECIMAL */
#line 386 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy310 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
#line 5853 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 204: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
#line 387 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy310 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
#line 5858 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 205: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
#line 388 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-5].minor.yy310 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
#line 5863 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 207: /* tags_def_opt ::= tags_def */
case 343: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==343);
case 462: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==462);
#line 393 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = yymsp[0].minor.yy812; }
#line 5870 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 208: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
case 344: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==344);
#line 397 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy812 = yymsp[-1].minor.yy812; }
#line 5877 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 209: /* table_options ::= */
#line 399 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy452 = createDefaultTableOptions(pCxt); }
#line 5882 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 210: /* table_options ::= table_options COMMENT NK_STRING */
#line 400 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
#line 5887 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 211: /* table_options ::= table_options MAX_DELAY duration_list */
#line 401 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy812); }
#line 5893 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 212: /* table_options ::= table_options WATERMARK duration_list */
#line 402 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy812); }
#line 5899 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 213: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
#line 403 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-4].minor.yy452, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy812); }
#line 5905 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 214: /* table_options ::= table_options TTL NK_INTEGER */
#line 404 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
#line 5911 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 215: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
#line 405 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-4].minor.yy452, TABLE_OPTION_SMA, yymsp[-1].minor.yy812); }
#line 5917 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 216: /* table_options ::= table_options DELETE_MARK duration_list */
#line 406 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-2].minor.yy452, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy812); }
#line 5923 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 217: /* alter_table_options ::= alter_table_option */
#line 408 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createAlterTableOptions(pCxt); yylhsminor.yy452 = setTableOption(pCxt, yylhsminor.yy452, yymsp[0].minor.yy365.type, &yymsp[0].minor.yy365.val); }
#line 5929 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 218: /* alter_table_options ::= alter_table_options alter_table_option */
#line 409 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setTableOption(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy365.type, &yymsp[0].minor.yy365.val); }
#line 5935 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 219: /* alter_table_option ::= COMMENT NK_STRING */
#line 413 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5941 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 220: /* alter_table_option ::= TTL NK_INTEGER */
#line 414 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy365.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy365.val = yymsp[0].minor.yy0; }
#line 5946 "sql.c"
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 221: /* duration_list ::= duration_literal */
case 426: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==426);
#line 418 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); }
#line 5952 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 222: /* duration_list ::= duration_list NK_COMMA duration_literal */
case 427: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==427);
#line 419 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = addNodeToList(pCxt, yymsp[-2].minor.yy812, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); }
#line 5959 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 225: /* rollup_func_name ::= function_name */
#line 426 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[0].minor.yy371, NULL); }
#line 5965 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 226: /* rollup_func_name ::= FIRST */
case 227: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==227);
case 285: /* tag_item ::= QTAGS */ yytestcase(yyruleno==285);
#line 427 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
#line 5973 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 230: /* col_name ::= column_name */
case 286: /* tag_item ::= column_name */ yytestcase(yyruleno==286);
#line 435 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy371); }
#line 5980 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 231: /* cmd ::= SHOW DNODES */
#line 438 "sql.y"
2023-01-31 06:25:13 +00:00
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
#line 5986 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 232: /* cmd ::= SHOW USERS */
#line 439 "sql.y"
2023-01-31 06:25:13 +00:00
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); }
#line 5991 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 233: /* cmd ::= SHOW USER PRIVILEGES */
#line 440 "sql.y"
2023-01-31 06:25:13 +00:00
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); }
#line 5996 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 234: /* cmd ::= SHOW DATABASES */
#line 441 "sql.y"
2023-01-31 06:25:13 +00:00
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
#line 6001 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 235: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
#line 442 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, OP_TYPE_LIKE); }
#line 6006 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 236: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
#line 443 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, OP_TYPE_LIKE); }
#line 6011 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 237: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
#line 444 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy452, NULL, OP_TYPE_LIKE); }
#line 6016 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 238: /* cmd ::= SHOW MNODES */
#line 445 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
#line 6021 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 239: /* cmd ::= SHOW QNODES */
#line 447 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); }
#line 6026 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 240: /* cmd ::= SHOW FUNCTIONS */
#line 448 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
#line 6031 "sql.c"
break;
Feature/3.0 geometry (#21037) * Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far. * add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling * change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh * Add a function MakePoint() and introduce a lib geometry * implement sql functions GeomFromText() and AsText() * Use GEOS *_r funcions instead for thread safety * Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT. Add geosWrapper to wrap the basic GEOS functions for TDEngine. * refactor AsText and MakePoint functions to be like GeomFromText * Show WKT when print geometry data in screen Dump hex data when dump geometry data in a file * define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues. * set number of decimals of WKT to 6 * Implement SQL function Intersects() * refactor geometry sql functions * Add geosErrMsgeHandler() to get the GEOS error detail * use threadlocal to instantiate SGeosContext call destroyGeosContext() only if the thread exists * remove SGeosContext *context param for all geometry functions since we use thread local one, so that all caller do not need to know the context. * Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance. * rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn * Add prefix "ST_" for all geometry functions * move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util, so that all unit test tools can compile * Add unit test for geometry lib, only test MakePoint so far * refactor and enhance existing cases in geomFuncTest * implement NULL type and NULL value test for geomFuncTest * add test on geomFromText() * add unit test on AsText() in geomFuncTest * combine some makePointFunction test items * add intersectsFunctionTwoColumns test refactor on callGeomFromTextWrapper functions * enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content * add more cases into intersectsFunction test * Add basic test on geometry in system test * Add ST_GeomFromText and ST_AsText function test in system test on geometry * add ST_Intersects function test in system test on geometry * support to check expectedErrno in system test on geometry * adjust geomTest unit test and geometry system test * add geometry data type and functions in doc english version * implement touchesFunction() in geometry lib refactor geometry relation functions model * separate gemFuncTest into several src files * add unit test on touchesFunction * support sql function ST_Touches() add system test on ST_Touches * add docs for ST_Touches() * Add ST_Contains() * Add ST_Covers() * Add ST_Equals() * add swapAllowed param for geomRelationFunction() read geom2 earlier intead of at doGeosRelation() * Add ST_ContainsProperly() * build on windows * Merge from 3.0 to 3.0_geometry * change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility * change '\\NULL' to 'NULL' back in shellDumpFieldToFile() * add /usr/local/include into include directory * add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 07:36:46 +00:00
case 241: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
#line 449 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy452, yymsp[-1].minor.yy452, OP_TYPE_EQUAL); }
#line 6036 "sql.c"
break;
case 242: /* cmd ::= SHOW INDEXES FROM db_name NK_DOT table_name */
#line 450 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy371), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy371), OP_TYPE_EQUAL); }
#line 6041 "sql.c"
break;
case 243: /* cmd ::= SHOW STREAMS */
#line 451 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
#line 6046 "sql.c"
2022-03-08 09:25:26 +00:00
break;
case 244: /* cmd ::= SHOW ACCOUNTS */
#line 452 "sql.y"
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
#line 6051 "sql.c"
break;
case 245: /* cmd ::= SHOW APPS */
#line 453 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); }
#line 6056 "sql.c"
break;
case 246: /* cmd ::= SHOW CONNECTIONS */
#line 454 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
#line 6061 "sql.c"
break;
case 247: /* cmd ::= SHOW LICENCES */
case 248: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==248);
#line 455 "sql.y"
2022-08-11 07:37:26 +00:00
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
#line 6067 "sql.c"
break;
case 249: /* cmd ::= SHOW CREATE DATABASE db_name */
#line 457 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy371); }
#line 6072 "sql.c"
break;
case 250: /* cmd ::= SHOW CREATE TABLE full_table_name */
#line 458 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy452); }
#line 6077 "sql.c"
break;
case 251: /* cmd ::= SHOW CREATE STABLE full_table_name */
#line 459 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy452); }
#line 6082 "sql.c"
break;
case 252: /* cmd ::= SHOW QUERIES */
#line 460 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
#line 6087 "sql.c"
break;
case 253: /* cmd ::= SHOW SCORES */
#line 461 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); }
#line 6092 "sql.c"
break;
case 254: /* cmd ::= SHOW TOPICS */
#line 462 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); }
#line 6097 "sql.c"
break;
case 255: /* cmd ::= SHOW VARIABLES */
case 256: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==256);
#line 463 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); }
#line 6103 "sql.c"
2022-03-28 09:08:48 +00:00
break;
case 257: /* cmd ::= SHOW LOCAL VARIABLES */
#line 465 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
#line 6108 "sql.c"
break;
case 258: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
#line 466 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy452); }
#line 6113 "sql.c"
break;
case 259: /* cmd ::= SHOW BNODES */
#line 467 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
#line 6118 "sql.c"
break;
case 260: /* cmd ::= SHOW SNODES */
#line 468 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); }
#line 6123 "sql.c"
break;
case 261: /* cmd ::= SHOW CLUSTER */
#line 469 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); }
#line 6128 "sql.c"
2022-04-20 09:43:02 +00:00
break;
case 262: /* cmd ::= SHOW TRANSACTIONS */
#line 470 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
#line 6133 "sql.c"
break;
case 263: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
#line 471 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy452); }
#line 6138 "sql.c"
2022-03-28 09:08:48 +00:00
break;
case 264: /* cmd ::= SHOW CONSUMERS */
#line 472 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
#line 6143 "sql.c"
2022-05-25 13:20:11 +00:00
break;
case 265: /* cmd ::= SHOW SUBSCRIPTIONS */
#line 473 "sql.y"
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
#line 6148 "sql.c"
2022-03-28 09:08:48 +00:00
break;
case 266: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
#line 474 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy452, yymsp[-1].minor.yy452, OP_TYPE_EQUAL); }
#line 6153 "sql.c"
break;
case 267: /* cmd ::= SHOW TAGS FROM db_name NK_DOT table_name */
#line 475 "sql.y"
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy371), createIdentifierValueNode(pCxt, &yymsp[0].minor.yy371), OP_TYPE_EQUAL); }
#line 6158 "sql.c"
break;
case 268: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
#line 476 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452, yymsp[-3].minor.yy812); }
#line 6163 "sql.c"
break;
case 269: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM db_name NK_DOT table_name */
#line 477 "sql.y"
{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, createIdentifierValueNode(pCxt, &yymsp[0].minor.yy371), createIdentifierValueNode(pCxt, &yymsp[-2].minor.yy371), yymsp[-4].minor.yy812); }
#line 6168 "sql.c"
break;
case 270: /* cmd ::= SHOW VNODES ON DNODE NK_INTEGER */
#line 478 "sql.y"
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
#line 6173 "sql.c"
break;
case 271: /* cmd ::= SHOW VNODES ON DNODE NK_STRING */
#line 479 "sql.y"
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); }
#line 6178 "sql.c"
break;
case 272: /* cmd ::= SHOW db_name_cond_opt ALIVE */
#line 481 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy452, QUERY_NODE_SHOW_DB_ALIVE_STMT); }
#line 6183 "sql.c"
break;
case 273: /* cmd ::= SHOW CLUSTER ALIVE */
#line 482 "sql.y"
{ pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); }
#line 6188 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 274: /* db_name_cond_opt ::= */
case 279: /* from_db_opt ::= */ yytestcase(yyruleno==279);
#line 484 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy452 = createDefaultDatabaseCondValue(pCxt); }
#line 6194 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 275: /* db_name_cond_opt ::= db_name NK_DOT */
#line 485 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy371); }
#line 6199 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 277: /* like_pattern_opt ::= LIKE NK_STRING */
#line 488 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
#line 6205 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 278: /* table_name_cond ::= table_name */
#line 490 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy371); }
#line 6210 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 280: /* from_db_opt ::= FROM db_name */
#line 493 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy371); }
#line 6216 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 284: /* tag_item ::= TBNAME */
#line 501 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
#line 6221 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 287: /* tag_item ::= column_name column_alias */
#line 504 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy371), &yymsp[0].minor.yy371); }
#line 6227 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 288: /* tag_item ::= column_name AS column_alias */
#line 505 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy371), &yymsp[0].minor.yy371); }
#line 6233 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 289: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */
#line 509 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy667, yymsp[-3].minor.yy452, yymsp[-1].minor.yy452, NULL, yymsp[0].minor.yy452); }
#line 6239 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 290: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */
#line 511 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy667, yymsp[-5].minor.yy452, yymsp[-3].minor.yy452, yymsp[-1].minor.yy812, NULL); }
#line 6244 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 291: /* cmd ::= DROP INDEX exists_opt full_index_name */
#line 512 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy667, yymsp[0].minor.yy452); }
#line 6249 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 292: /* full_index_name ::= index_name */
#line 514 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy371); }
#line 6254 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 293: /* full_index_name ::= db_name NK_DOT index_name */
#line 515 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy371); }
#line 6260 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 294: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
#line 518 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-9].minor.yy452 = createIndexOption(pCxt, yymsp[-7].minor.yy812, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 6266 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 295: /* 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 */
#line 521 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-11].minor.yy452 = createIndexOption(pCxt, yymsp[-9].minor.yy812, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 6271 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 298: /* func ::= sma_func_name NK_LP expression_list NK_RP */
#line 528 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[-3].minor.yy371, yymsp[-1].minor.yy812); }
#line 6276 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 299: /* sma_func_name ::= function_name */
case 513: /* alias_opt ::= table_alias */ yytestcase(yyruleno==513);
#line 532 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy371 = yymsp[0].minor.yy371; }
#line 6283 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy371 = yylhsminor.yy371;
2023-05-16 01:50:10 +00:00
break;
case 304: /* sma_stream_opt ::= */
case 345: /* stream_options ::= */ yytestcase(yyruleno==345);
#line 538 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy452 = createStreamOptions(pCxt); }
#line 6290 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 305: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
#line 539 "sql.y"
2023-06-30 11:36:39 +00:00
{ ((SStreamOptions*)yymsp[-2].minor.yy452)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; }
#line 6295 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 306: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
#line 540 "sql.y"
2023-06-30 11:36:39 +00:00
{ ((SStreamOptions*)yymsp[-2].minor.yy452)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; }
#line 6301 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 307: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
#line 541 "sql.y"
2023-06-30 11:36:39 +00:00
{ ((SStreamOptions*)yymsp[-2].minor.yy452)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; }
#line 6307 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 308: /* with_meta ::= AS */
#line 546 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy416 = 0; }
#line 6313 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 309: /* with_meta ::= WITH META AS */
#line 547 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy416 = 1; }
#line 6318 "sql.c"
2023-06-30 08:57:29 +00:00
break;
case 310: /* with_meta ::= ONLY META AS */
#line 548 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy416 = 2; }
#line 6323 "sql.c"
2023-06-30 08:57:29 +00:00
break;
case 311: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
#line 550 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy667, &yymsp[-2].minor.yy371, yymsp[0].minor.yy452); }
#line 6328 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 312: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta DATABASE db_name */
#line 552 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy667, &yymsp[-3].minor.yy371, &yymsp[0].minor.yy371, yymsp[-2].minor.yy416); }
#line 6333 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 313: /* cmd ::= CREATE TOPIC not_exists_opt topic_name with_meta STABLE full_table_name where_clause_opt */
#line 554 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy667, &yymsp[-4].minor.yy371, yymsp[-1].minor.yy452, yymsp[-3].minor.yy416, yymsp[0].minor.yy452); }
#line 6338 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 314: /* cmd ::= DROP TOPIC exists_opt topic_name */
#line 556 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy667, &yymsp[0].minor.yy371); }
#line 6343 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 315: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
#line 557 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy667, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy371); }
#line 6348 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 316: /* cmd ::= DESC full_table_name */
case 317: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==317);
#line 560 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy452); }
#line 6354 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 318: /* cmd ::= RESET QUERY CACHE */
#line 564 "sql.y"
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
#line 6359 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 319: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
case 320: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==320);
#line 567 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy667, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 6365 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 323: /* explain_options ::= */
#line 575 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy452 = createDefaultExplainOptions(pCxt); }
#line 6370 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 324: /* explain_options ::= explain_options VERBOSE NK_BOOL */
#line 576 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setExplainVerbose(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); }
#line 6375 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 325: /* explain_options ::= explain_options RATIO NK_FLOAT */
#line 577 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setExplainRatio(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); }
#line 6381 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 326: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
#line 582 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy667, yymsp[-9].minor.yy667, &yymsp[-6].minor.yy371, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy310, yymsp[-1].minor.yy416, &yymsp[0].minor.yy371, yymsp[-10].minor.yy667); }
#line 6387 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 327: /* cmd ::= DROP FUNCTION exists_opt function_name */
#line 583 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy667, &yymsp[0].minor.yy371); }
#line 6392 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 332: /* language_opt ::= */
#line 597 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy371 = nil_token; }
#line 6397 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 333: /* language_opt ::= LANGUAGE NK_STRING */
#line 598 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy371 = yymsp[0].minor.yy0; }
#line 6402 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 336: /* 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 */
#line 608 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy667, &yymsp[-8].minor.yy371, yymsp[-5].minor.yy452, yymsp[-7].minor.yy452, yymsp[-3].minor.yy812, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, yymsp[-4].minor.yy812); }
#line 6407 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 337: /* cmd ::= DROP STREAM exists_opt stream_name */
#line 609 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy667, &yymsp[0].minor.yy371); }
#line 6412 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 338: /* cmd ::= PAUSE STREAM exists_opt stream_name */
#line 610 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createPauseStreamStmt(pCxt, yymsp[-1].minor.yy667, &yymsp[0].minor.yy371); }
#line 6417 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 339: /* cmd ::= RESUME STREAM exists_opt ignore_opt stream_name */
#line 611 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createResumeStreamStmt(pCxt, yymsp[-2].minor.yy667, yymsp[-1].minor.yy667, &yymsp[0].minor.yy371); }
#line 6422 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 346: /* stream_options ::= stream_options TRIGGER AT_ONCE */
case 347: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==347);
#line 625 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); }
#line 6428 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 348: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
#line 627 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); }
#line 6434 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 349: /* stream_options ::= stream_options WATERMARK duration_literal */
#line 628 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); }
#line 6440 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 350: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
#line 629 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); }
#line 6446 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 351: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
#line 630 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); }
#line 6452 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 352: /* stream_options ::= stream_options DELETE_MARK duration_literal */
#line 631 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-2].minor.yy452, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); }
#line 6458 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 353: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
#line 632 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setStreamOptions(pCxt, yymsp[-3].minor.yy452, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); }
#line 6464 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 355: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
case 547: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==547);
case 568: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==568);
#line 635 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy452); }
#line 6472 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 358: /* cmd ::= KILL CONNECTION NK_INTEGER */
#line 643 "sql.y"
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
#line 6477 "sql.c"
break;
case 359: /* cmd ::= KILL QUERY NK_STRING */
#line 644 "sql.y"
2022-06-15 05:49:29 +00:00
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
#line 6482 "sql.c"
break;
case 360: /* cmd ::= KILL TRANSACTION NK_INTEGER */
#line 645 "sql.y"
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
#line 6487 "sql.c"
break;
case 361: /* cmd ::= BALANCE VGROUP */
#line 648 "sql.y"
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
#line 6492 "sql.c"
break;
case 362: /* cmd ::= BALANCE VGROUP LEADER */
#line 649 "sql.y"
2023-03-22 01:36:59 +00:00
{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt); }
#line 6497 "sql.c"
2022-06-07 03:53:32 +00:00
break;
case 363: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
#line 650 "sql.y"
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
#line 6502 "sql.c"
break;
case 364: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
#line 651 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy812); }
#line 6507 "sql.c"
break;
case 365: /* cmd ::= SPLIT VGROUP NK_INTEGER */
#line 652 "sql.y"
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
#line 6512 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 366: /* dnode_list ::= DNODE NK_INTEGER */
#line 656 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy812 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
#line 6517 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 368: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
#line 663 "sql.y"
2023-06-30 11:36:39 +00:00
{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 6522 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 371: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
#line 672 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-6].minor.yy452 = createInsertStmt(pCxt, yymsp[-4].minor.yy452, yymsp[-2].minor.yy812, yymsp[0].minor.yy452); }
#line 6527 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 372: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */
#line 673 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createInsertStmt(pCxt, yymsp[-1].minor.yy452, NULL, yymsp[0].minor.yy452); }
#line 6532 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 373: /* literal ::= NK_INTEGER */
#line 676 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
#line 6537 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 374: /* literal ::= NK_FLOAT */
#line 677 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
#line 6543 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 375: /* literal ::= NK_STRING */
#line 678 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
#line 6549 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 376: /* literal ::= NK_BOOL */
#line 679 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
#line 6555 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 377: /* literal ::= TIMESTAMP NK_STRING */
#line 680 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
#line 6561 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
break;
case 378: /* literal ::= duration_literal */
case 388: /* signed_literal ::= signed */ yytestcase(yyruleno==388);
case 409: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==409);
case 410: /* expression ::= literal */ yytestcase(yyruleno==410);
case 411: /* expression ::= pseudo_column */ yytestcase(yyruleno==411);
case 412: /* expression ::= column_reference */ yytestcase(yyruleno==412);
case 413: /* expression ::= function_expression */ yytestcase(yyruleno==413);
case 414: /* expression ::= case_when_expression */ yytestcase(yyruleno==414);
case 445: /* function_expression ::= literal_func */ yytestcase(yyruleno==445);
case 494: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==494);
case 498: /* boolean_primary ::= predicate */ yytestcase(yyruleno==498);
case 500: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==500);
case 501: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==501);
case 504: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==504);
case 506: /* table_reference ::= table_primary */ yytestcase(yyruleno==506);
case 507: /* table_reference ::= joined_table */ yytestcase(yyruleno==507);
case 511: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==511);
case 570: /* query_simple ::= query_specification */ yytestcase(yyruleno==570);
case 571: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==571);
case 574: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==574);
case 576: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==576);
#line 681 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = yymsp[0].minor.yy452; }
#line 6587 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 379: /* literal ::= NULL */
#line 682 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
#line 6593 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 380: /* literal ::= NK_QUESTION */
#line 683 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
#line 6599 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 381: /* duration_literal ::= NK_VARIABLE */
#line 685 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
#line 6605 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 382: /* signed ::= NK_INTEGER */
#line 687 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
#line 6611 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 383: /* signed ::= NK_PLUS NK_INTEGER */
#line 688 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
#line 6617 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 384: /* signed ::= NK_MINUS NK_INTEGER */
#line 689 "sql.y"
2022-03-22 06:09:15 +00:00
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
2023-06-30 11:36:39 +00:00
yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
2022-03-22 06:09:15 +00:00
}
#line 6626 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 385: /* signed ::= NK_FLOAT */
#line 694 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
#line 6632 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 386: /* signed ::= NK_PLUS NK_FLOAT */
#line 695 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
#line 6638 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 387: /* signed ::= NK_MINUS NK_FLOAT */
#line 696 "sql.y"
2022-03-22 06:09:15 +00:00
{
SToken t = yymsp[-1].minor.yy0;
t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
2023-06-30 11:36:39 +00:00
yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
2022-03-22 06:09:15 +00:00
}
#line 6647 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
break;
case 389: /* signed_literal ::= NK_STRING */
#line 703 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
#line 6653 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 390: /* signed_literal ::= NK_BOOL */
#line 704 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
#line 6659 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 391: /* signed_literal ::= TIMESTAMP NK_STRING */
#line 705 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
#line 6665 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 392: /* signed_literal ::= duration_literal */
case 394: /* signed_literal ::= literal_func */ yytestcase(yyruleno==394);
case 465: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==465);
case 527: /* select_item ::= common_expression */ yytestcase(yyruleno==527);
case 537: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==537);
case 575: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==575);
case 577: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==577);
case 590: /* search_condition ::= common_expression */ yytestcase(yyruleno==590);
#line 706 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); }
#line 6677 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 393: /* signed_literal ::= NULL */
#line 707 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
#line 6683 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 395: /* signed_literal ::= NK_QUESTION */
#line 709 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
#line 6689 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 415: /* expression ::= NK_LP expression NK_RP */
case 499: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==499);
case 589: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==589);
#line 770 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); }
#line 6697 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 416: /* expression ::= NK_PLUS expr_or_subquery */
#line 771 "sql.y"
2022-06-22 08:35:14 +00:00
{
2023-06-30 11:36:39 +00:00
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy452));
2022-06-22 08:35:14 +00:00
}
#line 6706 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2022-06-22 08:35:14 +00:00
break;
case 417: /* expression ::= NK_MINUS expr_or_subquery */
#line 775 "sql.y"
2022-06-22 08:35:14 +00:00
{
2023-06-30 11:36:39 +00:00
SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL));
2022-06-22 08:35:14 +00:00
}
#line 6715 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
break;
case 418: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
#line 779 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6725 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2022-03-22 06:09:15 +00:00
break;
case 419: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
#line 784 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6735 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 420: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
#line 789 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6745 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 421: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
#line 794 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6755 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 422: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
#line 799 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6765 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 423: /* expression ::= column_reference NK_ARROW NK_STRING */
#line 804 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)));
}
#line 6774 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 424: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
#line 808 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6784 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 425: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
#line 813 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6794 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 428: /* column_reference ::= column_name */
#line 824 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy371, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy371)); }
#line 6800 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 429: /* column_reference ::= table_name NK_DOT column_name */
#line 825 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy371, createColumnNode(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy371)); }
#line 6806 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 430: /* pseudo_column ::= ROWTS */
case 431: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==431);
case 433: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==433);
case 434: /* pseudo_column ::= QEND */ yytestcase(yyruleno==434);
case 435: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==435);
case 436: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==436);
case 437: /* pseudo_column ::= WEND */ yytestcase(yyruleno==437);
case 438: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==438);
case 439: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==439);
case 440: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==440);
case 441: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==441);
case 447: /* literal_func ::= NOW */ yytestcase(yyruleno==447);
#line 827 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
#line 6823 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
break;
case 432: /* pseudo_column ::= table_name NK_DOT TBNAME */
#line 829 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy371)))); }
#line 6829 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 442: /* function_expression ::= function_name NK_LP expression_list NK_RP */
case 443: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==443);
#line 840 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy371, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy371, yymsp[-1].minor.yy812)); }
#line 6836 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
break;
case 444: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
#line 843 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy310)); }
#line 6842 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-5].minor.yy452 = yylhsminor.yy452;
break;
case 446: /* literal_func ::= noarg_func NK_LP NK_RP */
#line 846 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy371, NULL)); }
#line 6848 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 461: /* star_func_para_list ::= NK_STAR */
#line 870 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
#line 6854 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy812 = yylhsminor.yy812;
break;
case 466: /* star_func_para ::= table_name NK_DOT NK_STAR */
case 530: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==530);
#line 879 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createColumnNode(pCxt, &yymsp[-2].minor.yy371, &yymsp[0].minor.yy0); }
#line 6861 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 467: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
#line 882 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy812, yymsp[-1].minor.yy452)); }
#line 6867 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
break;
case 468: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
#line 884 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-2].minor.yy812, yymsp[-1].minor.yy452)); }
#line 6873 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
break;
case 471: /* when_then_expr ::= WHEN common_expression THEN common_expression */
#line 891 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); }
#line 6879 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 473: /* case_when_else_opt ::= ELSE common_expression */
#line 894 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); }
#line 6884 "sql.c"
2023-06-30 11:36:39 +00:00
break;
case 474: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
case 479: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==479);
#line 897 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy354, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6894 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 475: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
#line 904 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy452), releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6904 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-4].minor.yy452 = yylhsminor.yy452;
break;
case 476: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
#line 910 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 6914 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-5].minor.yy452 = yylhsminor.yy452;
break;
case 477: /* predicate ::= expr_or_subquery IS NULL */
#line 915 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), NULL));
}
#line 6923 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 478: /* predicate ::= expr_or_subquery IS NOT NULL */
#line 919 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL));
}
#line 6932 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 480: /* compare_op ::= NK_LT */
#line 931 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_LOWER_THAN; }
#line 6938 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 481: /* compare_op ::= NK_GT */
#line 932 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_GREATER_THAN; }
#line 6943 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 482: /* compare_op ::= NK_LE */
#line 933 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_LOWER_EQUAL; }
#line 6948 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 483: /* compare_op ::= NK_GE */
#line 934 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_GREATER_EQUAL; }
#line 6953 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 484: /* compare_op ::= NK_NE */
#line 935 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_NOT_EQUAL; }
#line 6958 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 485: /* compare_op ::= NK_EQ */
#line 936 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_EQUAL; }
#line 6963 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 486: /* compare_op ::= LIKE */
#line 937 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_LIKE; }
#line 6968 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 487: /* compare_op ::= NOT LIKE */
#line 938 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy354 = OP_TYPE_NOT_LIKE; }
#line 6973 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 488: /* compare_op ::= MATCH */
#line 939 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_MATCH; }
#line 6978 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 489: /* compare_op ::= NMATCH */
#line 940 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_NMATCH; }
#line 6983 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 490: /* compare_op ::= CONTAINS */
#line 941 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_JSON_CONTAINS; }
#line 6988 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 491: /* in_op ::= IN */
#line 945 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy354 = OP_TYPE_IN; }
#line 6993 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 492: /* in_op ::= NOT IN */
#line 946 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy354 = OP_TYPE_NOT_IN; }
#line 6998 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 493: /* in_predicate_value ::= NK_LP literal_list NK_RP */
#line 948 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy812)); }
#line 7003 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 495: /* boolean_value_expression ::= NOT boolean_primary */
#line 952 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL));
}
#line 7012 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
break;
case 496: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
#line 957 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 7022 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
break;
case 497: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
#line 963 "sql.y"
{
2023-06-30 11:36:39 +00:00
SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452);
SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452);
yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452)));
}
#line 7032 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 505: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
#line 981 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, NULL); }
#line 7038 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 508: /* table_primary ::= table_name alias_opt */
#line 987 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy371, &yymsp[0].minor.yy371); }
#line 7044 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 509: /* table_primary ::= db_name NK_DOT table_name alias_opt */
#line 988 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-3].minor.yy371, &yymsp[-1].minor.yy371, &yymsp[0].minor.yy371); }
#line 7050 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 510: /* table_primary ::= subquery alias_opt */
#line 989 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy371); }
#line 7056 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 512: /* alias_opt ::= */
#line 994 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy371 = nil_token; }
#line 7062 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 514: /* alias_opt ::= AS table_alias */
#line 996 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy371 = yymsp[0].minor.yy371; }
#line 7067 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 515: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
case 516: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==516);
#line 998 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy452 = yymsp[-1].minor.yy452; }
#line 7073 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 517: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
#line 1003 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createJoinTableNode(pCxt, yymsp[-4].minor.yy140, yymsp[-5].minor.yy452, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); }
#line 7078 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-5].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 518: /* join_type ::= */
#line 1007 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy140 = JOIN_TYPE_INNER; }
#line 7084 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 519: /* join_type ::= INNER */
#line 1008 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy140 = JOIN_TYPE_INNER; }
#line 7089 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 520: /* 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 */
#line 1014 "sql.y"
{
2023-06-30 11:36:39 +00:00
yymsp[-11].minor.yy452 = createSelectStmt(pCxt, yymsp[-10].minor.yy667, yymsp[-9].minor.yy812, yymsp[-8].minor.yy452);
yymsp[-11].minor.yy452 = addWhereClause(pCxt, yymsp[-11].minor.yy452, yymsp[-7].minor.yy452);
yymsp[-11].minor.yy452 = addPartitionByClause(pCxt, yymsp[-11].minor.yy452, yymsp[-6].minor.yy812);
yymsp[-11].minor.yy452 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy452, yymsp[-2].minor.yy452);
yymsp[-11].minor.yy452 = addGroupByClause(pCxt, yymsp[-11].minor.yy452, yymsp[-1].minor.yy812);
yymsp[-11].minor.yy452 = addHavingClause(pCxt, yymsp[-11].minor.yy452, yymsp[0].minor.yy452);
yymsp[-11].minor.yy452 = addRangeClause(pCxt, yymsp[-11].minor.yy452, yymsp[-5].minor.yy452);
yymsp[-11].minor.yy452 = addEveryClause(pCxt, yymsp[-11].minor.yy452, yymsp[-4].minor.yy452);
yymsp[-11].minor.yy452 = addFillClause(pCxt, yymsp[-11].minor.yy452, yymsp[-3].minor.yy452);
}
#line 7104 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 523: /* set_quantifier_opt ::= ALL */
#line 1030 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy667 = false; }
#line 7109 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 526: /* select_item ::= NK_STAR */
#line 1037 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
#line 7114 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 528: /* select_item ::= common_expression column_alias */
case 538: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==538);
#line 1039 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy371); }
#line 7121 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-1].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 529: /* select_item ::= common_expression AS column_alias */
case 539: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==539);
#line 1040 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), &yymsp[0].minor.yy371); }
#line 7128 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 534: /* partition_by_clause_opt ::= PARTITION BY partition_list */
case 559: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==559);
case 579: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==579);
#line 1049 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-2].minor.yy812 = yymsp[0].minor.yy812; }
#line 7136 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 541: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
#line 1062 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-5].minor.yy452 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); }
#line 7141 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 542: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
#line 1063 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); }
#line 7146 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 543: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
#line 1065 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-5].minor.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 7151 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 544: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
#line 1068 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-7].minor.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy452, yymsp[0].minor.yy452); }
#line 7156 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 545: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
#line 1070 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-6].minor.yy452 = createEventWindowNode(pCxt, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); }
#line 7161 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 549: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
#line 1076 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createFillNode(pCxt, yymsp[-1].minor.yy844, NULL); }
#line 7166 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 550: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */
#line 1077 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-5].minor.yy452 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy812)); }
#line 7171 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 551: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */
#line 1078 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-5].minor.yy452 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy812)); }
#line 7176 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 552: /* fill_mode ::= NONE */
#line 1082 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy844 = FILL_MODE_NONE; }
#line 7181 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 553: /* fill_mode ::= PREV */
#line 1083 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy844 = FILL_MODE_PREV; }
#line 7186 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 554: /* fill_mode ::= NULL */
#line 1084 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy844 = FILL_MODE_NULL; }
#line 7191 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 555: /* fill_mode ::= NULL_F */
#line 1085 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy844 = FILL_MODE_NULL_F; }
#line 7196 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 556: /* fill_mode ::= LINEAR */
#line 1086 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy844 = FILL_MODE_LINEAR; }
#line 7201 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 557: /* fill_mode ::= NEXT */
#line 1087 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy844 = FILL_MODE_NEXT; }
#line 7206 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 560: /* group_by_list ::= expr_or_subquery */
#line 1096 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); }
#line 7211 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[0].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 561: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
#line 1097 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy812 = addNodeToList(pCxt, yymsp[-2].minor.yy812, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); }
#line 7217 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy812 = yylhsminor.yy812;
2023-05-16 01:50:10 +00:00
break;
case 565: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
#line 1104 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-5].minor.yy452 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); }
#line 7223 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 566: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */
#line 1106 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); }
#line 7228 "sql.c"
break;
case 569: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
#line 1113 "sql.y"
2022-09-16 07:53:27 +00:00
{
2023-06-30 11:36:39 +00:00
yylhsminor.yy452 = addOrderByClause(pCxt, yymsp[-3].minor.yy452, yymsp[-2].minor.yy812);
yylhsminor.yy452 = addSlimitClause(pCxt, yylhsminor.yy452, yymsp[-1].minor.yy452);
yylhsminor.yy452 = addLimitClause(pCxt, yylhsminor.yy452, yymsp[0].minor.yy452);
}
#line 7237 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 572: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
#line 1123 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); }
#line 7243 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-3].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 573: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
#line 1125 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); }
#line 7249 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 581: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 585: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==585);
#line 1139 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
#line 7256 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 582: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 586: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==586);
#line 1140 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
#line 7262 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 583: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 587: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==587);
#line 1141 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
#line 7268 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 588: /* subquery ::= NK_LP query_expression NK_RP */
#line 1149 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy452); }
#line 7273 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 593: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
#line 1163 "sql.y"
2023-06-30 11:36:39 +00:00
{ yylhsminor.yy452 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), yymsp[-1].minor.yy690, yymsp[0].minor.yy399); }
#line 7279 "sql.c"
2023-06-30 11:36:39 +00:00
yymsp[-2].minor.yy452 = yylhsminor.yy452;
2023-05-16 01:50:10 +00:00
break;
case 594: /* ordering_specification_opt ::= */
#line 1167 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy690 = ORDER_ASC; }
#line 7285 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 595: /* ordering_specification_opt ::= ASC */
#line 1168 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy690 = ORDER_ASC; }
#line 7290 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 596: /* ordering_specification_opt ::= DESC */
#line 1169 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[0].minor.yy690 = ORDER_DESC; }
#line 7295 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 597: /* null_ordering_opt ::= */
#line 1173 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[1].minor.yy399 = NULL_ORDER_DEFAULT; }
#line 7300 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 598: /* null_ordering_opt ::= NULLS FIRST */
#line 1174 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy399 = NULL_ORDER_FIRST; }
#line 7305 "sql.c"
2023-05-16 01:50:10 +00:00
break;
case 599: /* null_ordering_opt ::= NULLS LAST */
#line 1175 "sql.y"
2023-06-30 11:36:39 +00:00
{ yymsp[-1].minor.yy399 = NULL_ORDER_LAST; }
#line 7310 "sql.c"
2023-03-22 01:36:59 +00:00
break;
default:
break;
/********** End reduce actions ************************************************/
};
2023-05-09 11:19:14 +00:00
assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
yygoto = yyRuleInfoLhs[yyruleno];
yysize = yyRuleInfoNRhs[yyruleno];
yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
/* There are no SHIFTREDUCE actions on nonterminals because the table
** generator has simplified them to pure REDUCE actions. */
assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );
/* It is not possible for a REDUCE to be followed by an error */
assert( yyact!=YY_ERROR_ACTION );
yymsp += yysize+1;
yypParser->yytos = yymsp;
yymsp->stateno = (YYACTIONTYPE)yyact;
yymsp->major = (YYCODETYPE)yygoto;
yyTraceShift(yypParser, yyact, "... then shift");
return yyact;
}
/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
yyParser *yypParser /* The parser */
){
2022-03-10 07:36:06 +00:00
ParseARG_FETCH
ParseCTX_FETCH
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
}
#endif
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
/* Here code is inserted which will be executed whenever the
** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
2022-03-10 07:36:06 +00:00
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
#endif /* YYNOERRORRECOVERY */
/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
yyParser *yypParser, /* The parser */
int yymajor, /* The major type of the error token */
2022-03-10 07:36:06 +00:00
ParseTOKENTYPE yyminor /* The minor type of the error token */
){
2022-03-10 07:36:06 +00:00
ParseARG_FETCH
ParseCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
#line 29 "sql.y"
if (TSDB_CODE_SUCCESS == pCxt->errCode) {
if(TOKEN.z) {
pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
} else {
pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL);
}
} else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) {
pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
}
#line 7383 "sql.c"
/************ End %syntax_error code ******************************************/
2022-03-10 07:36:06 +00:00
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
/*
** The following is executed when the parser accepts
*/
static void yy_accept(
yyParser *yypParser /* The parser */
){
2022-03-10 07:36:06 +00:00
ParseARG_FETCH
ParseCTX_FETCH
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
}
#endif
#ifndef YYNOERRORRECOVERY
yypParser->yyerrcnt = -1;
#endif
assert( yypParser->yytos==yypParser->yystack );
/* Here code is inserted which will be executed whenever the
** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
2022-03-10 07:36:06 +00:00
ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
/* The main parser program.
** The first argument is a pointer to a structure obtained from
2022-03-10 07:36:06 +00:00
** "ParseAlloc" which describes the current state of the parser.
** The second argument is the major token number. The third is
** the minor token. The fourth optional argument is whatever the
** user wants (and specified in the grammar) and is available for
** use by the action routines.
**
** Inputs:
** <ul>
** <li> A pointer to the parser (an opaque structure.)
** <li> The major token number.
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
2022-03-10 07:36:06 +00:00
void Parse(
void *yyp, /* The parser */
int yymajor, /* The major token code number */
2022-03-10 07:36:06 +00:00
ParseTOKENTYPE yyminor /* The value for the token */
ParseARG_PDECL /* Optional %extra_argument parameter */
){
YYMINORTYPE yyminorunion;
YYACTIONTYPE yyact; /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
int yyendofinput; /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
int yyerrorhit = 0; /* True if yymajor has invoked an error */
#endif
yyParser *yypParser = (yyParser*)yyp; /* The parser */
2022-03-10 07:36:06 +00:00
ParseCTX_FETCH
ParseARG_STORE
assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
yyendofinput = (yymajor==0);
#endif
yyact = yypParser->yytos->stateno;
#ifndef NDEBUG
if( yyTraceFILE ){
if( yyact < YY_MIN_REDUCE ){
fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
yyTracePrompt,yyTokenName[yymajor],yyact);
}else{
fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
}
}
#endif
while(1){ /* Exit by "break" */
assert( yypParser->yytos>=yypParser->yystack );
assert( yyact==yypParser->yytos->stateno );
yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
if( yyact >= YY_MIN_REDUCE ){
unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
#ifndef NDEBUG
assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
if( yyTraceFILE ){
int yysize = yyRuleInfoNRhs[yyruleno];
if( yysize ){
fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
yyTracePrompt,
yyruleno, yyRuleName[yyruleno],
yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
yypParser->yytos[yysize].stateno);
}else{
fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
yyTracePrompt, yyruleno, yyRuleName[yyruleno],
yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
}
}
#endif /* NDEBUG */
/* Check that the stack is large enough to grow by a single entry
** if the RHS of the rule is empty. This ensures that there is room
** enough on the stack to push the LHS value */
if( yyRuleInfoNRhs[yyruleno]==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
yypParser->yyhwm++;
assert( yypParser->yyhwm ==
(int)(yypParser->yytos - yypParser->yystack));
}
#endif
#if YYSTACKDEPTH>0
if( yypParser->yytos>=yypParser->yystackEnd ){
yyStackOverflow(yypParser);
break;
}
#else
if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
if( yyGrowStack(yypParser) ){
yyStackOverflow(yypParser);
break;
}
}
#endif
}
yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor ParseCTX_PARAM);
}else if( yyact <= YY_MAX_SHIFTREDUCE ){
yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
yypParser->yyerrcnt--;
#endif
break;
}else if( yyact==YY_ACCEPT_ACTION ){
yypParser->yytos--;
yy_accept(yypParser);
return;
}else{
assert( yyact == YY_ERROR_ACTION );
yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
int yymx;
#endif
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
}
#endif
#ifdef YYERRORSYMBOL
/* A syntax error has occurred.
** The response to an error depends upon whether or not the
** grammar defines an error token "ERROR".
**
** This is what we do if the grammar does define ERROR:
**
** * Call the %syntax_error function.
**
** * Begin popping the stack until we enter a state where
** it is legal to shift the error symbol, then shift
** the error symbol.
**
** * Set the error count to three.
**
** * Begin accepting and shifting new tokens. No new error
** processing will occur until three tokens have been
** shifted successfully.
**
*/
if( yypParser->yyerrcnt<0 ){
yy_syntax_error(yypParser,yymajor,yyminor);
}
yymx = yypParser->yytos->major;
if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
if( yyTraceFILE ){
fprintf(yyTraceFILE,"%sDiscard input token %s\n",
yyTracePrompt,yyTokenName[yymajor]);
}
#endif
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
yymajor = YYNOCODE;
}else{
while( yypParser->yytos > yypParser->yystack ){
yyact = yy_find_reduce_action(yypParser->yytos->stateno,
YYERRORSYMBOL);
if( yyact<=YY_MAX_SHIFTREDUCE ) break;
yy_pop_parser_stack(yypParser);
}
if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
yypParser->yyerrcnt = -1;
#endif
yymajor = YYNOCODE;
}else if( yymx!=YYERRORSYMBOL ){
yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
}
}
yypParser->yyerrcnt = 3;
yyerrorhit = 1;
if( yymajor==YYNOCODE ) break;
yyact = yypParser->yytos->stateno;
#elif defined(YYNOERRORRECOVERY)
/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
** do any kind of error recovery. Instead, simply invoke the syntax
** error routine and continue going as if nothing had happened.
**
** Applications can set this macro (for example inside %include) if
** they intend to abandon the parse upon the first syntax error seen.
*/
yy_syntax_error(yypParser,yymajor, yyminor);
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
break;
#else /* YYERRORSYMBOL is not defined */
/* This is what we do if the grammar does not define ERROR:
**
** * Report an error message, and throw away the input token.
**
** * If the input token is $, then fail the parse.
**
** As before, subsequent error messages are suppressed until
** three input tokens have been successfully shifted.
*/
if( yypParser->yyerrcnt<=0 ){
yy_syntax_error(yypParser,yymajor, yyminor);
}
yypParser->yyerrcnt = 3;
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
if( yyendofinput ){
yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
yypParser->yyerrcnt = -1;
#endif
}
break;
#endif
}
}
#ifndef NDEBUG
if( yyTraceFILE ){
yyStackEntry *i;
char cDiv = '[';
fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
cDiv = ' ';
}
fprintf(yyTraceFILE,"]\n");
}
#endif
return;
}
/*
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
2022-03-10 07:36:06 +00:00
int ParseFallback(int iToken){
#ifdef YYFALLBACK
2023-05-09 11:19:14 +00:00
assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
return yyFallback[iToken];
#else
(void)iToken;
2023-04-23 03:20:34 +00:00
return 0;
2023-05-09 11:19:14 +00:00
#endif
}