diff --git a/docs/en/12-taos-sql/05-insert.md b/docs/en/12-taos-sql/05-insert.md index 462e7fc0ae..32227a2214 100644 --- a/docs/en/12-taos-sql/05-insert.md +++ b/docs/en/12-taos-sql/05-insert.md @@ -1,7 +1,7 @@ --- title: Insert sidebar_label: Insert -description: This document describes how to insert data into TDengine. +description: This document describes the SQL commands and syntax for inserting data into TDengine. --- ## Syntax diff --git a/docs/en/12-taos-sql/13-tmq.md b/docs/en/12-taos-sql/13-tmq.md index d14b6da2d3..16dc9efd62 100644 --- a/docs/en/12-taos-sql/13-tmq.md +++ b/docs/en/12-taos-sql/13-tmq.md @@ -1,5 +1,5 @@ --- -title: Data Subscription +title: Data Subscription SQL Reference sidebar_label: Data Subscription description: This document describes the SQL statements related to the data subscription component of TDengine. --- diff --git a/docs/en/12-taos-sql/14-stream.md b/docs/en/12-taos-sql/14-stream.md index e1bf18c854..337660a36c 100644 --- a/docs/en/12-taos-sql/14-stream.md +++ b/docs/en/12-taos-sql/14-stream.md @@ -1,5 +1,5 @@ --- -title: Stream Processing +title: Stream Processing SQL Reference sidebar_label: Stream Processing description: This document describes the SQL statements related to the stream processing component of TDengine. --- @@ -148,7 +148,7 @@ T = latest event time - watermark The window closing time for each batch of data that arrives at the system is updated using the preceding formula, and all windows are closed whose closing time is less than T. If the triggering method is WINDOW_CLOSE or MAX_DELAY, the aggregate result for the window is pushed. -Stream processing strategy for expired data +## Stream processing strategy for expired data The data in expired windows is tagged as expired. TDengine stream processing provides two methods for handling such data: 1. Drop the data. This is the default and often only handling method for most stream processing engines. @@ -157,6 +157,14 @@ The data in expired windows is tagged as expired. TDengine stream processing pro In both of these methods, configuring the watermark is essential for obtaining accurate results (if expired data is dropped) and avoiding repeated triggers that affect system performance (if expired data is recalculated). +## Stream processing strategy for modifying data + +TDengine provides two ways to handle modified data, which are specified by the IGNORE UPDATE option: + +1. Check whether the data has been modified, i.e. IGNORE UPDATE 0, and recalculate the corresponding window if the data has been modified. + +2. Do not check whether the data has been modified, and calculate all the data as incremental data, i.e. IGNORE UPDATE 1, the default configuration. + ## Supported functions All [scalar functions](../function/#scalar-functions) are available in stream processing. All [Aggregate functions](../function/#aggregate-functions) and [Selection functions](../function/#selection-functions) are available in stream processing, except the followings: diff --git a/docs/en/12-taos-sql/26-udf.md b/docs/en/12-taos-sql/26-udf.md index f86b535927..dec9ca217d 100644 --- a/docs/en/12-taos-sql/26-udf.md +++ b/docs/en/12-taos-sql/26-udf.md @@ -1,5 +1,5 @@ --- -title: User-Defined Functions (UDF) +title: User-Defined Functions (UDF) SQL Reference sidebar_label: User-Defined Functions description: This document describes the SQL statements related to user-defined functions (UDF) in TDengine. --- diff --git a/docs/en/14-reference/07-tdinsight/index.md b/docs/en/14-reference/07-tdinsight/index.md index cada05d738..1bc983262e 100644 --- a/docs/en/14-reference/07-tdinsight/index.md +++ b/docs/en/14-reference/07-tdinsight/index.md @@ -1,5 +1,5 @@ --- -title: TDinsight - Grafana-based Zero-Dependency Monitoring Solution for TDengine +title: TDinsight sidebar_label: TDinsight description: This document describes TDinsight, a monitoring solution for TDengine. --- diff --git a/docs/en/25-application/01-telegraf.md b/docs/en/25-application/01-telegraf.md index a6db826fa3..f8784e9ab9 100644 --- a/docs/en/25-application/01-telegraf.md +++ b/docs/en/25-application/01-telegraf.md @@ -1,5 +1,5 @@ --- -title: Quickly Build IT DevOps Visualization System with TDengine + Telegraf + Grafana +title: IT Visualization with TDengine + Telegraf + Grafana sidebar_label: TDengine + Telegraf + Grafana description: This document describes how to create an IT visualization system by integrating TDengine with Telegraf and Grafana. --- diff --git a/docs/examples/rust/nativeexample/examples/query.rs b/docs/examples/rust/nativeexample/examples/query.rs new file mode 100644 index 0000000000..dfe55e8749 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/query.rs @@ -0,0 +1,66 @@ +use taos::*; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let dsn = "taos://localhost:6030"; + let builder = TaosBuilder::from_dsn(dsn)?; + + let taos = builder.build()?; + + // ANCHOR: create_db_and_table + let db = "power"; + // create database + taos.exec_many([ + format!("DROP DATABASE IF EXISTS `{db}`"), + format!("CREATE DATABASE `{db}`"), + format!("USE `{db}`"), + ]) + .await?; + + // create table + taos.exec_many([ + // create super table + "CREATE TABLE `meters` (`ts` TIMESTAMP, `current` FLOAT, `voltage` INT, `phase` FLOAT) \ + TAGS (`groupid` INT, `location` BINARY(24))", + ]).await?; + // ANCHOR_END: create_db_and_table + + // ANCHOR: insert_data + let inserted = taos.exec("INSERT INTO " + + "power.d1001 USING power.meters TAGS(2,'California.SanFrancisco') " + + "VALUES " + + "(NOW + 1a, 10.30000, 219, 0.31000) " + + "(NOW + 2a, 12.60000, 218, 0.33000) " + + "(NOW + 3a, 12.30000, 221, 0.31000) " + + "power.d1002 USING power.meters TAGS(3, 'California.SanFrancisco') " + + "VALUES " + + "(NOW + 1a, 10.30000, 218, 0.25000) ").await?; + + println!("inserted: {} rows", inserted); + // ANCHOR_END: insert_data + + // ANCHOR: query_data + let mut result = taos.query("SELECT * FROM power.meters").await?; + + for field in result.fields() { + println!("got field: {}", field.name()); + } + + let mut rows = result.rows(); + let mut nrows = 0; + while let Some(row) = rows.try_next().await? { + for (col, (name, value)) in row.enumerate() { + println!( + "[{}] got value in col {} (named `{:>8}`): {}", + nrows, col, name, value + ); + } + nrows += 1; + } + // ANCHOR_END: query_data + + // ANCHOR: query_with_req_id + let result = taos.query_with_req_id("SELECT * FROM power.meters", 0).await?; + // ANCHOR_END: query_with_req_id + +} diff --git a/docs/examples/rust/nativeexample/examples/schemaless.rs b/docs/examples/rust/nativeexample/examples/schemaless.rs new file mode 100644 index 0000000000..44ce0fe694 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/schemaless.rs @@ -0,0 +1,80 @@ +use taos_query::common::SchemalessPrecision; +use taos_query::common::SchemalessProtocol; +use taos_query::common::SmlDataBuilder; + +use crate::AsyncQueryable; +use crate::AsyncTBuilder; +use crate::TaosBuilder; + +async fn put() -> anyhow::Result<()> { + std::env::set_var("RUST_LOG", "taos=debug"); + pretty_env_logger::init(); + let dsn = + std::env::var("TDENGINE_ClOUD_DSN").unwrap_or("http://localhost:6041".to_string()); + log::debug!("dsn: {:?}", &dsn); + + let client = TaosBuilder::from_dsn(dsn)?.build().await?; + + let db = "power"; + + client.exec(format!("drop database if exists {db}")).await?; + + client + .exec(format!("create database if not exists {db}")) + .await?; + + // should specify database before insert + client.exec(format!("use {db}")).await?; + + // SchemalessProtocol::Line + let data = [ + "meters,groupid=2,location=California.SanFrancisco current=10.3000002f64,voltage=219i32,phase=0.31f64 1626006833639000000", + ] + .map(String::from) + .to_vec(); + + let sml_data = SmlDataBuilder::default() + .protocol(SchemalessProtocol::Line) + .precision(SchemalessPrecision::Millisecond) + .data(data.clone()) + .ttl(1000) + .req_id(100u64) + .build()?; + assert_eq!(client.put(&sml_data).await?, ()); + + // SchemalessProtocol::Telnet + let data = [ + "meters.current 1648432611249 10.3 location=California.SanFrancisco group=2", + ] + .map(String::from) + .to_vec(); + + let sml_data = SmlDataBuilder::default() + .protocol(SchemalessProtocol::Telnet) + .precision(SchemalessPrecision::Millisecond) + .data(data.clone()) + .ttl(1000) + .req_id(200u64) + .build()?; + assert_eq!(client.put(&sml_data).await?, ()); + + // SchemalessProtocol::Json + let data = [ + r#"[{"metric": "meters.current", "timestamp": 1681345954000, "value": 10.3, "tags": {"location": "California.SanFrancisco", "groupid": 2}}, {"metric": "meters.voltage", "timestamp": 1648432611249, "value": 219, "tags": {"location": "California.LosAngeles", "groupid": 1}}, {"metric": "meters.current", "timestamp": 1648432611250, "value": 12.6, "tags": {"location": "California.SanFrancisco", "groupid": 2}}, {"metric": "meters.voltage", "timestamp": 1648432611250, "value": 221, "tags": {"location": "California.LosAngeles", "groupid": 1}}]"# + ] + .map(String::from) + .to_vec(); + + let sml_data = SmlDataBuilder::default() + .protocol(SchemalessProtocol::Json) + .precision(SchemalessPrecision::Millisecond) + .data(data.clone()) + .ttl(1000) + .req_id(300u64) + .build()?; + assert_eq!(client.put(&sml_data).await?, ()); + + client.exec(format!("drop database if exists {db}")).await?; + + Ok(()) +} diff --git a/docs/examples/rust/nativeexample/examples/stmt.rs b/docs/examples/rust/nativeexample/examples/stmt.rs new file mode 100644 index 0000000000..0194eccdf1 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/stmt.rs @@ -0,0 +1,37 @@ +use taos::*; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let taos = TaosBuilder::from_dsn("taos://")?.build().await?; + + taos.exec("DROP DATABASE IF EXISTS power").await?; + taos.create_database("power").await?; + taos.use_database("power").await?; + taos.exec("CREATE STABLE IF NOT EXISTS meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (location BINARY(64), groupId INT)").await?; + + let mut stmt = Stmt::init(&taos).await?; + stmt.prepare("INSERT INTO ? USING meters TAGS(?, ?) VALUES(?, ?, ?, ?)").await?; + + const NUM_TABLES: usize = 10; + const NUM_ROWS: usize = 10; + for i in 0..NUM_TABLES { + let table_name = format!("d{}", i); + let tags = vec![Value::VarChar("California.SanFransico".into()), Value::Int(2)]; + stmt.set_tbname_tags(&table_name, &tags).await?; + for j in 0..NUM_ROWS { + let values = vec![ + ColumnView::from_millis_timestamp(vec![1648432611249 + j as i64]), + ColumnView::from_floats(vec![10.3 + j as f32]), + ColumnView::from_ints(vec![219 + j as i32]), + ColumnView::from_floats(vec![0.31 + j as f32]), + ]; + stmt.bind(&values).await?; + } + stmt.add_batch().await?; + } + + // execute. + let rows = stmt.execute().await?; + assert_eq!(rows, NUM_TABLES * NUM_ROWS); + Ok(()) +} diff --git a/docs/examples/rust/nativeexample/examples/tmq.rs b/docs/examples/rust/nativeexample/examples/tmq.rs new file mode 100644 index 0000000000..764c0c1fc8 --- /dev/null +++ b/docs/examples/rust/nativeexample/examples/tmq.rs @@ -0,0 +1,166 @@ +use std::time::Duration; +use std::str::FromStr; + +use taos::*; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + pretty_env_logger::formatted_timed_builder() + .filter_level(log::LevelFilter::Info) + .init(); + use taos_query::prelude::*; + let dsn = "taos://localhost:6030".to_string(); + log::info!("dsn: {}", dsn); + let mut dsn = Dsn::from_str(&dsn)?; + + let taos = TaosBuilder::from_dsn(&dsn)?.build().await?; + + // prepare database and table + taos.exec_many([ + "drop topic if exists topic_meters", + "drop database if exists power", + "create database if not exists power WAL_RETENTION_PERIOD 86400", + "use power", + + "CREATE STABLE IF NOT EXISTS power.meters (ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS (groupId INT, location BINARY(24))", + + "create table if not exists power.d001 using power.meters tags(1,'location')", + + ]) + .await?; + + taos.exec_many([ + "drop database if exists db2", + "create database if not exists db2 wal_retention_period 3600", + "use db2", + ]) + .await?; + + // ANCHOR: create_topic + taos.exec_many([ + "CREATE TOPIC IF NOT EXISTS topic_meters AS SELECT ts, current, voltage, phase, groupid, location FROM power.meters", + ]) + .await?; + // ANCHOR_END: create_topic + + // ANCHOR: create_consumer + dsn.params.insert("group.id".to_string(), "abc".to_string()); + dsn.params.insert("auto.offset.reset".to_string(), "earliest".to_string()); + + let builder = TmqBuilder::from_dsn(&dsn)?; + let mut consumer = builder.build().await?; + // ANCHOR_END: create_consumer + + // ANCHOR: subscribe + consumer.subscribe(["topic_meters"]).await?; + // ANCHOR_END: subscribe + + // ANCHOR: consume + { + let mut stream = consumer.stream_with_timeout(Timeout::from_secs(1)); + + while let Some((offset, message)) = stream.try_next().await? { + + let topic: &str = offset.topic(); + let database = offset.database(); + let vgroup_id = offset.vgroup_id(); + log::debug!( + "topic: {}, database: {}, vgroup_id: {}", + topic, + database, + vgroup_id + ); + + match message { + MessageSet::Meta(meta) => { + log::info!("Meta"); + let raw = meta.as_raw_meta().await?; + taos.write_raw_meta(&raw).await?; + + let json = meta.as_json_meta().await?; + let sql = json.to_string(); + if let Err(err) = taos.exec(sql).await { + println!("maybe error: {}", err); + } + } + MessageSet::Data(data) => { + log::info!("Data"); + while let Some(data) = data.fetch_raw_block().await? { + log::debug!("data: {:?}", data); + } + } + MessageSet::MetaData(meta, data) => { + log::info!("MetaData"); + let raw = meta.as_raw_meta().await?; + taos.write_raw_meta(&raw).await?; + + let json = meta.as_json_meta().await?; + let sql = json.to_string(); + if let Err(err) = taos.exec(sql).await { + println!("maybe error: {}", err); + } + + while let Some(data) = data.fetch_raw_block().await? { + log::debug!("data: {:?}", data); + } + } + } + consumer.commit(offset).await?; + } + } + // ANCHOR_END: consume + + // ANCHOR: assignments + let assignments = consumer.assignments().await.unwrap(); + log::info!("assignments: {:?}", assignments); + // ANCHOR_END: assignments + + // seek offset + for topic_vec_assignment in assignments { + let topic = &topic_vec_assignment.0; + let vec_assignment = topic_vec_assignment.1; + for assignment in vec_assignment { + let vgroup_id = assignment.vgroup_id(); + let current = assignment.current_offset(); + let begin = assignment.begin(); + let end = assignment.end(); + log::debug!( + "topic: {}, vgroup_id: {}, current offset: {} begin {}, end: {}", + topic, + vgroup_id, + current, + begin, + end + ); + // ANCHOR: seek_offset + let res = consumer.offset_seek(topic, vgroup_id, end).await; + if res.is_err() { + log::error!("seek offset error: {:?}", res); + let a = consumer.assignments().await.unwrap(); + log::error!("assignments: {:?}", a); + } + // ANCHOR_END: seek_offset + } + + let topic_assignment = consumer.topic_assignment(topic).await; + log::debug!("topic assignment: {:?}", topic_assignment); + } + + // after seek offset + let assignments = consumer.assignments().await.unwrap(); + log::info!("after seek offset assignments: {:?}", assignments); + + // ANCHOR: unsubscribe + consumer.unsubscribe().await; + // ANCHOR_END: unsubscribe + + tokio::time::sleep(Duration::from_secs(1)).await; + + taos.exec_many([ + "drop database db2", + "drop topic topic_meters", + "drop database power", + ]) + .await?; + Ok(()) +} diff --git a/docs/zh/12-taos-sql/14-stream.md b/docs/zh/12-taos-sql/14-stream.md index 2ed3c9afae..125f868758 100644 --- a/docs/zh/12-taos-sql/14-stream.md +++ b/docs/zh/12-taos-sql/14-stream.md @@ -201,9 +201,9 @@ TDengine 对于过期数据提供两种处理方式,由 IGNORE EXPIRED 选项 TDengine 对于修改数据提供两种处理方式,由 IGNORE UPDATE 选项指定: -1. 检查数据是否被修改,即 IGNORE UPDATE 0:默认配置,如果被修改,则重新计算对应窗口。 +1. 检查数据是否被修改,即 IGNORE UPDATE 0,如果数据被修改,则重新计算对应窗口。 -2. 不检查数据是否被修改,全部按增量数据计算,即 IGNORE UPDATE 1。 +2. 不检查数据是否被修改,全部按增量数据计算,即 IGNORE UPDATE 1,默认配置。 ## 写入已存在的超级表 diff --git a/include/common/tdatablock.h b/include/common/tdatablock.h index 3dcaf078ef..f012889ab1 100644 --- a/include/common/tdatablock.h +++ b/include/common/tdatablock.h @@ -275,7 +275,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq2** pReq, const SSDataBlock* pData bool alreadyAddGroupId(char* ctbName); bool isAutoTableName(char* ctbName); -void buildCtbNameAddGroupId(char* ctbName, uint64_t groupId); +void buildCtbNameAddGroupId(const char* stbName, char* ctbName, uint64_t groupId); char* buildCtbNameByGroupId(const char* stbName, uint64_t groupId); int32_t buildCtbNameByGroupIdImpl(const char* stbName, uint64_t groupId, char* pBuf); diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 8591b057a1..440c099922 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -386,6 +386,7 @@ + #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 #define TK_NK_ILLEGAL 602 diff --git a/include/libs/stream/tstream.h b/include/libs/stream/tstream.h index 5f3761d7b7..138fad0ddb 100644 --- a/include/libs/stream/tstream.h +++ b/include/libs/stream/tstream.h @@ -61,7 +61,7 @@ typedef struct SStreamTask SStreamTask; typedef struct SStreamQueue SStreamQueue; typedef struct SStreamTaskSM SStreamTaskSM; -#define SSTREAM_TASK_VER 3 +#define SSTREAM_TASK_VER 4 #define SSTREAM_TASK_INCOMPATIBLE_VER 1 #define SSTREAM_TASK_NEED_CONVERT_VER 2 #define SSTREAM_TASK_SUBTABLE_CHANGED_VER 3 @@ -355,6 +355,8 @@ typedef struct SMetaHbInfo SMetaHbInfo; typedef struct SDispatchMsgInfo { SStreamDispatchReq* pData; // current dispatch data int8_t dispatchMsgType; + int64_t checkpointId;// checkpoint id msg + int32_t transId; // transId for current checkpoint int16_t msgType; // dispatch msg type int32_t retryCount; // retry send data count int64_t startTs; // dispatch start time, record total elapsed time for dispatch diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index c8fc556150..ce149921e3 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1626,6 +1626,22 @@ void changeByteEndian(char* pData){ } } +static void tmqGetRawDataRowsPrecisionFromRes(void *pRetrieve, void** rawData, int64_t *rows, int32_t *precision){ + if(*(int64_t*)pRetrieve == 0){ + *rawData = ((SRetrieveTableRsp*)pRetrieve)->data; + *rows = htobe64(((SRetrieveTableRsp*)pRetrieve)->numOfRows); + if(precision != NULL){ + *precision = ((SRetrieveTableRsp*)pRetrieve)->precision; + } + }else if(*(int64_t*)pRetrieve == 1){ + *rawData = ((SRetrieveTableRspForTmq*)pRetrieve)->data; + *rows = htobe64(((SRetrieveTableRspForTmq*)pRetrieve)->numOfRows); + if(precision != NULL){ + *precision = ((SRetrieveTableRspForTmq*)pRetrieve)->precision; + } + } +} + static void tmqBuildRspFromWrapperInner(SMqPollRspWrapper* pWrapper, SMqClientVg* pVg, int64_t* numOfRows, SMqRspObj* pRspObj) { (*numOfRows) = 0; tstrncpy(pRspObj->topic, pWrapper->topicHandle->topicName, TSDB_TOPIC_FNAME_LEN); @@ -1648,13 +1664,7 @@ static void tmqBuildRspFromWrapperInner(SMqPollRspWrapper* pWrapper, SMqClientVg void* rawData = NULL; int64_t rows = 0; // deal with compatibility - if(*(int64_t*)pRetrieve == 0){ - rawData = ((SRetrieveTableRsp*)pRetrieve)->data; - rows = htobe64(((SRetrieveTableRsp*)pRetrieve)->numOfRows); - }else if(*(int64_t*)pRetrieve == 1){ - rawData = ((SRetrieveTableRspForTmq*)pRetrieve)->data; - rows = htobe64(((SRetrieveTableRspForTmq*)pRetrieve)->numOfRows); - } + tmqGetRawDataRowsPrecisionFromRes(pRetrieve, &rawData, &rows, NULL); pVg->numOfRows += rows; (*numOfRows) += rows; @@ -2625,18 +2635,22 @@ SReqResultInfo* tmqGetNextResInfo(TAOS_RES* res, bool convertUcs4) { pRspObj->resIter++; if (pRspObj->resIter < pRspObj->rsp.blockNum) { - SRetrieveTableRspForTmq* pRetrieveTmq = - (SRetrieveTableRspForTmq*)taosArrayGetP(pRspObj->rsp.blockData, pRspObj->resIter); if (pRspObj->rsp.withSchema) { doFreeReqResultInfo(&pRspObj->resInfo); SSchemaWrapper* pSW = (SSchemaWrapper*)taosArrayGetP(pRspObj->rsp.blockSchema, pRspObj->resIter); setResSchemaInfo(&pRspObj->resInfo, pSW->pSchema, pSW->nCols); } - pRspObj->resInfo.pData = (void*)pRetrieveTmq->data; - pRspObj->resInfo.numOfRows = htobe64(pRetrieveTmq->numOfRows); + void* pRetrieve = taosArrayGetP(pRspObj->rsp.blockData, pRspObj->resIter); + void* rawData = NULL; + int64_t rows = 0; + int32_t precision = 0; + tmqGetRawDataRowsPrecisionFromRes(pRetrieve, &rawData, &rows, &precision); + + pRspObj->resInfo.pData = rawData; + pRspObj->resInfo.numOfRows = rows; pRspObj->resInfo.current = 0; - pRspObj->resInfo.precision = pRetrieveTmq->precision; + pRspObj->resInfo.precision = precision; // TODO handle the compressed case pRspObj->resInfo.totalRows += pRspObj->resInfo.numOfRows; diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 6655da67f1..4fb3308d37 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -2344,10 +2344,14 @@ _end: return TSDB_CODE_SUCCESS; } -void buildCtbNameAddGroupId(char* ctbName, uint64_t groupId){ +void buildCtbNameAddGroupId(const char* stbName, char* ctbName, uint64_t groupId){ char tmp[TSDB_TABLE_NAME_LEN] = {0}; - snprintf(tmp, TSDB_TABLE_NAME_LEN, "_%"PRIu64, groupId); - ctbName[TSDB_TABLE_NAME_LEN - strlen(tmp) - 1] = 0; // put groupId to the end + if (stbName == NULL){ + snprintf(tmp, TSDB_TABLE_NAME_LEN, "_%"PRIu64, groupId); + }else{ + snprintf(tmp, TSDB_TABLE_NAME_LEN, "_%s_%"PRIu64, stbName, groupId); + } + ctbName[TSDB_TABLE_NAME_LEN - strlen(tmp) - 1] = 0; // put stbname + groupId to the end strcat(ctbName, tmp); } @@ -2357,6 +2361,7 @@ bool isAutoTableName(char* ctbName) { return (strlen(ctbName) == 34 && ctbName[0 bool alreadyAddGroupId(char* ctbName) { size_t len = strlen(ctbName); + if (len == 0) return false; size_t _location = len - 1; while (_location > 0) { if (ctbName[_location] < '0' || ctbName[_location] > '9') { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index ff424ee558..8430c67321 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -51,8 +51,8 @@ #define ENCODESQL() \ do { \ + if (tEncodeI32(&encoder, pReq->sqlLen) < 0) return -1; \ if (pReq->sqlLen > 0 && pReq->sql != NULL) { \ - if (tEncodeI32(&encoder, pReq->sqlLen) < 0) return -1; \ if (tEncodeBinary(&encoder, pReq->sql, pReq->sqlLen) < 0) return -1; \ } \ } while (0) @@ -3025,7 +3025,7 @@ int32_t tSerializeSCreateDbReq(void *buf, int32_t bufLen, SCreateDbReq *pReq) { ENCODESQL(); - if (tEncodeI32(&encoder, pReq->withArbitrator) < 0) return -1; + if (tEncodeI8(&encoder, pReq->withArbitrator) < 0) return -1; tEndEncode(&encoder); @@ -3140,7 +3140,7 @@ int32_t tSerializeSAlterDbReq(void *buf, int32_t bufLen, SAlterDbReq *pReq) { if (tEncodeI32(&encoder, pReq->walRetentionSize) < 0) return -1; if (tEncodeI32(&encoder, pReq->keepTimeOffset) < 0) return -1; ENCODESQL(); - if (tEncodeI32(&encoder, pReq->withArbitrator) < 0) return -1; + if (tEncodeI8(&encoder, pReq->withArbitrator) < 0) return -1; tEndEncode(&encoder); int32_t tlen = encoder.pos; diff --git a/source/dnode/mnode/impl/inc/mndArbGroup.h b/source/dnode/mnode/impl/inc/mndArbGroup.h index ed852cf581..fcd11310e7 100644 --- a/source/dnode/mnode/impl/inc/mndArbGroup.h +++ b/source/dnode/mnode/impl/inc/mndArbGroup.h @@ -35,6 +35,7 @@ int32_t mndSetCreateArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup); int32_t mndSetCreateArbGroupUndoLogs(STrans *pTrans, SArbGroup *pGroup); int32_t mndSetCreateArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup); +int32_t mndSetDropArbGroupPrepareLogs(STrans *pTrans, SArbGroup *pGroup); int32_t mndSetDropArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup); bool mndUpdateArbGroupByHeartBeat(SArbGroup *pGroup, SVArbHbRspMember *pRspMember, int64_t nowMs, int32_t dnodeId, diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index a63157445b..924af2b0a7 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -160,6 +160,7 @@ typedef struct { ETrnConflct conflict; ETrnExec exec; EOperType oper; + bool changeless; int32_t code; int32_t failedTimes; void* rpcRsp; diff --git a/source/dnode/mnode/impl/inc/mndTrans.h b/source/dnode/mnode/impl/inc/mndTrans.h index 8689df98af..8c9ca87fb1 100644 --- a/source/dnode/mnode/impl/inc/mndTrans.h +++ b/source/dnode/mnode/impl/inc/mndTrans.h @@ -81,6 +81,7 @@ void mndTransSetDbName(STrans *pTrans, const char *dbname, const char *stbnam void mndTransSetArbGroupId(STrans *pTrans, int32_t groupId); void mndTransSetSerial(STrans *pTrans); void mndTransSetParallel(STrans *pTrans); +void mndTransSetChangeless(STrans *pTrans); void mndTransSetOper(STrans *pTrans, EOperType oper); int32_t mndTransCheckConflict(SMnode *pMnode, STrans *pTrans); #ifndef BUILD_NO_CALL diff --git a/source/dnode/mnode/impl/src/mndArbGroup.c b/source/dnode/mnode/impl/src/mndArbGroup.c index e056e698f3..92ab5274e4 100644 --- a/source/dnode/mnode/impl/src/mndArbGroup.c +++ b/source/dnode/mnode/impl/src/mndArbGroup.c @@ -260,6 +260,14 @@ int32_t mndSetCreateArbGroupCommitLogs(STrans *pTrans, SArbGroup *pGroup) { return 0; } +int32_t mndSetDropArbGroupPrepareLogs(STrans *pTrans, SArbGroup *pGroup) { + SSdbRaw *pRedoRaw = mndArbGroupActionEncode(pGroup); + if (pRedoRaw == NULL) return -1; + if (mndTransAppendPrepareLog(pTrans, pRedoRaw) != 0) return -1; + if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) return -1; + return 0; +} + static int32_t mndSetDropArbGroupRedoLogs(STrans *pTrans, SArbGroup *pGroup) { SSdbRaw *pRedoRaw = mndArbGroupActionEncode(pGroup); if (pRedoRaw == NULL) return -1; @@ -535,10 +543,10 @@ static int32_t mndProcessArbCheckSyncTimer(SRpcMsg *pReq) { int32_t vgId = arbGroupDup.vgId; int64_t nowMs = taosGetTimestampMs(); - bool member0IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 0, nowMs); - bool member1IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 1, nowMs); - SArbAssignedLeader* pAssignedLeader = &arbGroupDup.assignedLeader; - int32_t currentAssignedDnodeId = pAssignedLeader->dnodeId; + bool member0IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 0, nowMs); + bool member1IsTimeout = mndCheckArbMemberHbTimeout(&arbGroupDup, 1, nowMs); + SArbAssignedLeader *pAssignedLeader = &arbGroupDup.assignedLeader; + int32_t currentAssignedDnodeId = pAssignedLeader->dnodeId; // 1. has assigned && is sync => send req if (currentAssignedDnodeId != 0 && arbGroupDup.isSync == true) { @@ -667,9 +675,16 @@ static int32_t mndProcessArbUpdateGroupReq(SRpcMsg *pReq) { memcpy(newGroup.assignedLeader.token, req.assignedLeader.token, TSDB_ARB_TOKEN_SIZE); newGroup.version = req.version; - SMnode *pMnode = pReq->info.node; + SMnode *pMnode = pReq->info.node; + SArbGroup *pOldGroup = sdbAcquire(pMnode->pSdb, SDB_ARBGROUP, &newGroup.vgId); + if (!pOldGroup) { + mInfo("vgId:%d, arb skip to update arbgroup, since no obj found", newGroup.vgId); + return 0; + } + sdbRelease(pMnode->pSdb, pOldGroup); + if (mndArbGroupUpdateTrans(pMnode, &newGroup) != 0) { - mError("vgId:%d, arb failed to update arbgroup, since %s", req.vgId, terrstr()); + mError("vgId:%d, arb failed to update arbgroup, since %s", newGroup.vgId, terrstr()); ret = -1; } diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 52671f6b66..ed9333f480 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -292,16 +292,16 @@ static void storeOffsetRows(SMnode *pMnode, SMqHbReq *req, SMqConsumerObj *pCons static int32_t buildMqHbRsp(SRpcMsg *pMsg, SMqHbRsp *rsp){ int32_t tlen = tSerializeSMqHbRsp(NULL, 0, rsp); if (tlen <= 0){ - return TSDB_CODE_OUT_OF_MEMORY; + return TSDB_CODE_TMQ_INVALID_MSG; } void *buf = rpcMallocCont(tlen); if (buf == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } - if(tSerializeSMqHbRsp(buf, tlen, rsp) != 0){ + if(tSerializeSMqHbRsp(buf, tlen, rsp) <= 0){ rpcFreeCont(buf); - return TSDB_CODE_OUT_OF_MEMORY; + return TSDB_CODE_TMQ_INVALID_MSG; } pMsg->info.rsp = buf; pMsg->info.rspLen = tlen; @@ -316,7 +316,7 @@ static int32_t mndProcessMqHbReq(SRpcMsg *pMsg) { SMqConsumerObj *pConsumer = NULL; if (tDeserializeSMqHbReq(pMsg->pCont, pMsg->contLen, &req) < 0) { - code = TSDB_CODE_OUT_OF_MEMORY; + code = TSDB_CODE_TMQ_INVALID_MSG; goto end; } diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index a1f3a24661..527105a7b8 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1209,6 +1209,25 @@ static int32_t mndSetDropDbPrepareLogs(SMnode *pMnode, STrans *pTrans, SDbObj *p if (mndTransAppendPrepareLog(pTrans, pRedoRaw) != 0) return -1; if (sdbSetRawStatus(pRedoRaw, SDB_STATUS_DROPPING) != 0) return -1; + SSdb *pSdb = pMnode->pSdb; + void *pIter = NULL; + + while (1) { + SArbGroup *pArbGroup = NULL; + pIter = sdbFetch(pSdb, SDB_ARBGROUP, pIter, (void **)&pArbGroup); + if (pIter == NULL) break; + + if (pArbGroup->dbUid == pDb->uid) { + if (mndSetDropArbGroupPrepareLogs(pTrans,pArbGroup) != 0) { + sdbCancelFetch(pSdb, pIter); + sdbRelease(pSdb, pArbGroup); + return -1; + } + } + + sdbRelease(pSdb, pArbGroup); + } + return 0; } diff --git a/source/dnode/mnode/impl/src/mndDef.c b/source/dnode/mnode/impl/src/mndDef.c index 3f69c7def3..091edc6ab0 100644 --- a/source/dnode/mnode/impl/src/mndDef.c +++ b/source/dnode/mnode/impl/src/mndDef.c @@ -72,7 +72,9 @@ int32_t tEncodeSStreamObj(SEncoder *pEncoder, const SStreamObj *pObj) { if (tEncodeI32(pEncoder, innerSz) < 0) return -1; for (int32_t j = 0; j < innerSz; j++) { SStreamTask *pTask = taosArrayGetP(pArray, j); - pTask->ver = SSTREAM_TASK_VER; + if (pTask->ver < SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + pTask->ver = SSTREAM_TASK_VER; + } if (tEncodeStreamTask(pEncoder, pTask) < 0) return -1; } } diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index 7ee1b36916..79c62df766 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -1104,14 +1104,16 @@ static int32_t mndProcessCreateStbReq(SRpcMsg *pReq) { } else if (createReq.tagVer > 0 || createReq.colVer > 0) { int32_t tagDelta = createReq.tagVer - pStb->tagVer; int32_t colDelta = createReq.colVer - pStb->colVer; - int32_t verDelta = tagDelta + colDelta; mInfo("stb:%s, already exist while create, input tagVer:%d colVer:%d, exist tagVer:%d colVer:%d", createReq.name, createReq.tagVer, createReq.colVer, pStb->tagVer, pStb->colVer); if (tagDelta <= 0 && colDelta <= 0) { mInfo("stb:%s, schema version is not incremented and nothing needs to be done", createReq.name); code = 0; goto _OVER; - } else if ((tagDelta == 1 || colDelta == 1) && (verDelta == 1)) { + } else if ((tagDelta == 1 && colDelta == 0) || + (tagDelta == 0 && colDelta == 1) || + (pStb->colVer == 1 && createReq.colVer > 1) || + (pStb->tagVer == 1 && createReq.tagVer > 1)) { isAlter = true; mInfo("stb:%s, schema version is only increased by 1 number, do alter operation", createReq.name); } else { diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 60b522f6fa..ff05db417e 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -434,7 +434,9 @@ int32_t mndPersistTaskDeployReq(STrans *pTrans, SStreamTask *pTask) { SEncoder encoder; tEncoderInit(&encoder, NULL, 0); - pTask->ver = SSTREAM_TASK_VER; + if (pTask->ver < SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + pTask->ver = SSTREAM_TASK_VER; + } tEncodeStreamTask(&encoder, pTask); int32_t size = encoder.pos; @@ -2153,41 +2155,60 @@ int32_t mndProcessStreamReqCheckpoint(SRpcMsg *pReq) { SStreamObj *pStream = mndGetStreamObj(pMnode, req.streamId); if (pStream == NULL) { - mError("failed to find the stream:0x%" PRIx64 " not handle the checkpoint req", req.streamId); - terrno = TSDB_CODE_MND_STREAM_NOT_EXIST; - taosThreadMutexUnlock(&execInfo.lock); + mWarn("failed to find the stream:0x%" PRIx64 ", not handle the checkpoint req, try to acquire in buf", req.streamId); - return -1; + // not in meta-store yet, try to acquire the task in exec buffer + // the checkpoint req arrives too soon before the completion of the create stream trans. + STaskId id = {.streamId = req.streamId, .taskId = req.taskId}; + void* p = taosHashGet(execInfo.pTaskMap, &id, sizeof(id)); + if (p == NULL) { + mError("failed to find the stream:0x%" PRIx64 " in buf, not handle the checkpoint req", req.streamId); + terrno = TSDB_CODE_MND_STREAM_NOT_EXIST; + taosThreadMutexUnlock(&execInfo.lock); + return -1; + } else { + mDebug("s-task:0x%" PRIx64 "-0x%x in buf not in mnode/meta, create stream trans may not complete yet", + req.streamId, req.taskId); + } } - int32_t numOfTasks = mndGetNumOfStreamTasks(pStream); + int32_t numOfTasks = (pStream == NULL)? 0: mndGetNumOfStreamTasks(pStream); + SArray **pReqTaskList = (SArray **)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId)); if (pReqTaskList == NULL) { SArray *pList = taosArrayInit(4, sizeof(int32_t)); - doAddTaskId(pList, req.taskId, pStream->uid, numOfTasks); + doAddTaskId(pList, req.taskId, req.streamId, numOfTasks); taosHashPut(execInfo.pTransferStateStreams, &req.streamId, sizeof(int64_t), &pList, sizeof(void *)); pReqTaskList = (SArray **)taosHashGet(execInfo.pTransferStateStreams, &req.streamId, sizeof(req.streamId)); } else { - doAddTaskId(*pReqTaskList, req.taskId, pStream->uid, numOfTasks); + doAddTaskId(*pReqTaskList, req.taskId, req.streamId, numOfTasks); } int32_t total = taosArrayGetSize(*pReqTaskList); if (total == numOfTasks) { // all tasks has send the reqs int64_t checkpointId = mndStreamGenChkpId(pMnode); - mDebug("stream:0x%" PRIx64 " all tasks req, start checkpointId:%" PRId64, pStream->uid, checkpointId); + mInfo("stream:0x%" PRIx64 " all tasks req checkpoint, start checkpointId:%" PRId64, req.streamId, checkpointId); - // TODO:handle error - int32_t code = mndProcessStreamCheckpointTrans(pMnode, pStream, checkpointId, 0, false); + if (pStream != NULL) { // TODO:handle error + int32_t code = mndProcessStreamCheckpointTrans(pMnode, pStream, checkpointId, 0, false); + } else { + // todo: wait for the create stream trans completed, and launch the checkpoint trans + // SStreamObj *pStream = mndGetStreamObj(pMnode, req.streamId); + // sleep(500ms) + } // remove this entry taosHashRemove(execInfo.pTransferStateStreams, &req.streamId, sizeof(int64_t)); int32_t numOfStreams = taosHashGetSize(execInfo.pTransferStateStreams); - mDebug("stream:0x%" PRIx64 " removed, remain streams:%d fill-history not completed", pStream->uid, numOfStreams); + mDebug("stream:0x%" PRIx64 " removed, remain streams:%d fill-history not completed", req.streamId, numOfStreams); + } + + if (pStream != NULL) { + mndReleaseStream(pMnode, pStream); } - mndReleaseStream(pMnode, pStream); taosThreadMutexUnlock(&execInfo.lock); { diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index 3af372a432..0e4f4210fb 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -739,6 +739,8 @@ void mndTransSetSerial(STrans *pTrans) { pTrans->exec = TRN_EXEC_SERIAL; } void mndTransSetParallel(STrans *pTrans) { pTrans->exec = TRN_EXEC_PARALLEL; } +void mndTransSetChangeless(STrans *pTrans) { pTrans->changeless = true; } + void mndTransSetOper(STrans *pTrans, EOperType oper) { pTrans->oper = oper; } static int32_t mndTransSync(SMnode *pMnode, STrans *pTrans) { @@ -862,7 +864,7 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans) { return -1; } - if (taosArrayGetSize(pTrans->commitActions) <= 0) { + if (!pTrans->changeless && taosArrayGetSize(pTrans->commitActions) <= 0) { terrno = TSDB_CODE_MND_TRANS_CLOG_IS_NULL; mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr()); return -1; diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index 571f17fab6..2ee9af0486 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -2342,24 +2342,7 @@ int32_t mndAddVgroupBalanceToTrans(SMnode *pMnode, SVgObj *pVgroup, STrans *pTra return -1; } - if (mndAddAlterVnodeConfirmAction(pMnode, pTrans, pDb, pVgroup) != 0) { - mError("trans:%d, vgid:%d failed to be balanced to dnode:%d", pTrans->id, vgid, dnodeId); - return -1; - } - mndReleaseDb(pMnode, pDb); - - SSdbRaw *pRaw = mndVgroupActionEncode(pVgroup); - if (pRaw == NULL) { - mError("trans:%d, vgid:%d failed to encode action to dnode:%d", pTrans->id, vgid, dnodeId); - return -1; - } - if (mndTransAppendCommitlog(pTrans, pRaw) != 0) { - sdbFreeRaw(pRaw); - mError("trans:%d, vgid:%d failed to append commit log dnode:%d", pTrans->id, vgid, dnodeId); - return -1; - } - (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); } else { mInfo("trans:%d, vgid:%d cant be balanced to dnode:%d, exist:%d, online:%d", pTrans->id, vgid, dnodeId, exist, online); diff --git a/source/dnode/vnode/src/meta/metaSnapshot.c b/source/dnode/vnode/src/meta/metaSnapshot.c index e86ed3b657..5850e794fa 100644 --- a/source/dnode/vnode/src/meta/metaSnapshot.c +++ b/source/dnode/vnode/src/meta/metaSnapshot.c @@ -79,6 +79,7 @@ int32_t metaSnapRead(SMetaSnapReader* pReader, uint8_t** ppData) { int32_t nKey = 0; int32_t nData = 0; STbDbKey key; + SMetaInfo info; *ppData = NULL; for (;;) { @@ -91,7 +92,8 @@ int32_t metaSnapRead(SMetaSnapReader* pReader, uint8_t** ppData) { goto _exit; } - if (key.version < pReader->sver) { + if (key.version < pReader->sver // + || metaGetInfo(pReader->pMeta, key.uid, &info, NULL) == TSDB_CODE_NOT_FOUND) { tdbTbcMoveToNext(pReader->pTbc); continue; } diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index ffebd783ac..ccfc8cc7c9 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -101,10 +101,7 @@ int32_t tqInitialize(STQ* pTq) { return -1; } - if (streamMetaLoadAllTasks(pTq->pStreamMeta) < 0) { - return -1; - } - + /*int32_t code = */streamMetaLoadAllTasks(pTq->pStreamMeta); return 0; } diff --git a/source/dnode/vnode/src/tq/tqSink.c b/source/dnode/vnode/src/tq/tqSink.c index 5374b9aa78..1e0ae7a854 100644 --- a/source/dnode/vnode/src/tq/tqSink.c +++ b/source/dnode/vnode/src/tq/tqSink.c @@ -71,8 +71,8 @@ int32_t tqBuildDeleteReq(STQ* pTq, const char* stbFullName, const SSDataBlock* p if (varTbName != NULL && varTbName != (void*)-1) { name = taosMemoryCalloc(1, TSDB_TABLE_NAME_LEN); memcpy(name, varDataVal(varTbName), varDataLen(varTbName)); - if (newSubTableRule && !isAutoTableName(name) && !alreadyAddGroupId(name) && groupId != 0) { - buildCtbNameAddGroupId(name, groupId); + if (newSubTableRule && !isAutoTableName(name) && !alreadyAddGroupId(name) && groupId != 0 && stbFullName) { + buildCtbNameAddGroupId(stbFullName, name, groupId); } } else if (stbFullName) { name = buildCtbNameByGroupId(stbFullName, groupId); @@ -182,10 +182,10 @@ void setCreateTableMsgTableName(SVCreateTbReq* pCreateTableReq, SSDataBlock* pDa int64_t gid, bool newSubTableRule) { if (pDataBlock->info.parTbName[0]) { if (newSubTableRule && !isAutoTableName(pDataBlock->info.parTbName) && - !alreadyAddGroupId(pDataBlock->info.parTbName) && gid != 0) { + !alreadyAddGroupId(pDataBlock->info.parTbName) && gid != 0 && stbFullName) { pCreateTableReq->name = taosMemoryCalloc(1, TSDB_TABLE_NAME_LEN); strcpy(pCreateTableReq->name, pDataBlock->info.parTbName); - buildCtbNameAddGroupId(pCreateTableReq->name, gid); + buildCtbNameAddGroupId(stbFullName, pCreateTableReq->name, gid); // tqDebug("gen name from:%s", pDataBlock->info.parTbName); } else { pCreateTableReq->name = taosStrdup(pDataBlock->info.parTbName); @@ -671,10 +671,14 @@ int32_t setDstTableDataUid(SVnode* pVnode, SStreamTask* pTask, SSDataBlock* pDat memset(dstTableName, 0, TSDB_TABLE_NAME_LEN); buildCtbNameByGroupIdImpl(stbFullName, groupId, dstTableName); } else { - if (pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && pTask->subtableWithoutMd5 != 1 && - !isAutoTableName(dstTableName) && !alreadyAddGroupId(dstTableName) && groupId != 0) { + if (pTask->subtableWithoutMd5 != 1 && !isAutoTableName(dstTableName) && + !alreadyAddGroupId(dstTableName) && groupId != 0) { tqDebug("s-task:%s append groupId:%" PRId64 " for generated dstTable:%s", id, groupId, dstTableName); - buildCtbNameAddGroupId(dstTableName, groupId); + if(pTask->ver == SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + buildCtbNameAddGroupId(NULL, dstTableName, groupId); + }else if(pTask->ver > SSTREAM_TASK_SUBTABLE_CHANGED_VER && stbFullName) { + buildCtbNameAddGroupId(stbFullName, dstTableName, groupId); + } } } diff --git a/source/dnode/vnode/src/tqCommon/tqCommon.c b/source/dnode/vnode/src/tqCommon/tqCommon.c index 1b67dce9b0..0f7f74f78b 100644 --- a/source/dnode/vnode/src/tqCommon/tqCommon.c +++ b/source/dnode/vnode/src/tqCommon/tqCommon.c @@ -850,12 +850,18 @@ int32_t tqStreamTaskProcessTaskResetReq(SStreamMeta* pMeta, SRpcMsg* pMsg) { tqDebug("s-task:%s receive task-reset msg from mnode, reset status and ready for data processing", pTask->id.idStr); + taosThreadMutexLock(&pTask->lock); + // clear flag set during do checkpoint, and open inputQ for all upstream tasks if (streamTaskGetStatus(pTask)->state == TASK_STATUS__CK) { + tqDebug("s-task:%s reset task status from checkpoint, current checkpointingId:%" PRId64 ", transId:%d", + pTask->id.idStr, pTask->chkInfo.checkpointingId, pTask->chkInfo.transId); streamTaskClearCheckInfo(pTask, true); streamTaskSetStatusReady(pTask); } + taosThreadMutexUnlock(&pTask->lock); + streamMetaReleaseTask(pMeta, pTask); return TSDB_CODE_SUCCESS; } diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index e4aa4c38c5..add2955a2b 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -45,8 +45,8 @@ static FilterCondType checkTagCond(SNode* cond); static int32_t optimizeTbnameInCond(void* metaHandle, int64_t suid, SArray* list, SNode* pTagCond, SStorageAPI* pAPI); static int32_t optimizeTbnameInCondImpl(void* metaHandle, SArray* list, SNode* pTagCond, SStorageAPI* pStoreAPI); -static int32_t getTableList(void* pVnode, SScanPhysiNode* pScanNode, SNode* pTagCond, SNode* pTagIndexCond, - STableListInfo* pListInfo, uint8_t* digest, const char* idstr, SStorageAPI* pStorageAPI); +static int32_t getTableList(void* pVnode, SScanPhysiNode* pScanNode, SNode* pTagCond, SNode* pTagIndexCond, + STableListInfo* pListInfo, uint8_t* digest, const char* idstr, SStorageAPI* pStorageAPI); static int64_t getLimit(const SNode* pLimit) { return NULL == pLimit ? -1 : ((SLimitNode*)pLimit)->limit; } static int64_t getOffset(const SNode* pLimit) { return NULL == pLimit ? -1 : ((SLimitNode*)pLimit)->offset; } @@ -642,7 +642,8 @@ int32_t getColInfoResultForGroupby(void* pVnode, SNodeList* group, STableListInf info->groupId = calcGroupId(keyBuf, len); if (initRemainGroups) { // groupId ~ table uid - taosHashPut(pTableListInfo->remainGroups, &(info->groupId), sizeof(info->groupId), &(info->uid), sizeof(info->uid)); + taosHashPut(pTableListInfo->remainGroups, &(info->groupId), sizeof(info->groupId), &(info->uid), + sizeof(info->uid)); } } @@ -858,7 +859,7 @@ static int32_t optimizeTbnameInCondImpl(void* pVnode, SArray* pExistedUidList, S } SSDataBlock* createTagValBlockForFilter(SArray* pColList, int32_t numOfTables, SArray* pUidTagList, void* pVnode, - SStorageAPI* pStorageAPI) { + SStorageAPI* pStorageAPI) { SSDataBlock* pResBlock = createDataBlock(); if (pResBlock == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; @@ -939,11 +940,12 @@ SSDataBlock* createTagValBlockForFilter(SArray* pColList, int32_t numOfTables, S return pResBlock; } -static int32_t doSetQualifiedUid(STableListInfo* pListInfo, SArray* pUidList, const SArray* pUidTagList, bool* pResultList, bool addUid) { +static int32_t doSetQualifiedUid(STableListInfo* pListInfo, SArray* pUidList, const SArray* pUidTagList, + bool* pResultList, bool addUid) { taosArrayClear(pUidList); STableKeyInfo info = {.uid = 0, .groupId = 0}; - int32_t numOfTables = taosArrayGetSize(pUidTagList); + int32_t numOfTables = taosArrayGetSize(pUidTagList); for (int32_t i = 0; i < numOfTables; ++i) { if (pResultList[i]) { uint64_t uid = ((STUidTagInfo*)taosArrayGet(pUidTagList, i))->uid; @@ -1165,7 +1167,8 @@ int32_t getTableList(void* pVnode, SScanPhysiNode* pScanNode, SNode* pTagCond, S memcpy(pPayload + sizeof(int32_t), taosArrayGet(pUidList, 0), numOfTables * sizeof(uint64_t)); } - pStorageAPI->metaFn.putCachedTableList(pVnode, pScanNode->suid, context.digest, tListLen(context.digest), pPayload, size, 1); + pStorageAPI->metaFn.putCachedTableList(pVnode, pScanNode->suid, context.digest, tListLen(context.digest), + pPayload, size, 1); digest[0] = 1; memcpy(digest + 1, context.digest, tListLen(context.digest)); } @@ -1725,7 +1728,8 @@ SColumn extractColumnFromColumnNode(SColumnNode* pColNode) { return c; } -int32_t initQueryTableDataCond(SQueryTableDataCond* pCond, const STableScanPhysiNode* pTableScanNode, const SReadHandle* readHandle) { +int32_t initQueryTableDataCond(SQueryTableDataCond* pCond, const STableScanPhysiNode* pTableScanNode, + const SReadHandle* readHandle) { pCond->order = pTableScanNode->scanSeq[0] > 0 ? TSDB_ORDER_ASC : TSDB_ORDER_DESC; pCond->numOfCols = LIST_LENGTH(pTableScanNode->scan.pScanCols); @@ -1748,8 +1752,7 @@ int32_t initQueryTableDataCond(SQueryTableDataCond* pCond, const STableScanPhysi // allowed read stt file optimization mode pCond->notLoadData = (pTableScanNode->dataRequired == FUNC_DATA_REQUIRED_NOT_LOAD) && - (pTableScanNode->scan.node.pConditions == NULL) && - (pTableScanNode->interval == 0); + (pTableScanNode->scan.node.pConditions == NULL) && (pTableScanNode->interval == 0); int32_t j = 0; for (int32_t i = 0; i < pCond->numOfCols; ++i) { @@ -1891,7 +1894,8 @@ void getNextTimeWindow(const SInterval* pInterval, STimeWindow* tw, int32_t orde int32_t factor = GET_FORWARD_DIRECTION_FACTOR(order); slidingStart = taosTimeAdd(slidingStart, factor * pInterval->sliding, pInterval->slidingUnit, pInterval->precision); tw->skey = taosTimeAdd(slidingStart, pInterval->offset, pInterval->offsetUnit, pInterval->precision); - int64_t slidingEnd = taosTimeAdd(slidingStart, pInterval->interval, pInterval->intervalUnit, pInterval->precision) - 1; + int64_t slidingEnd = + taosTimeAdd(slidingStart, pInterval->interval, pInterval->intervalUnit, pInterval->precision) - 1; tw->ekey = taosTimeAdd(slidingEnd, pInterval->offset, pInterval->offsetUnit, pInterval->precision); } @@ -2136,7 +2140,7 @@ int32_t buildGroupIdMapForAllTables(STableListInfo* pTableListInfo, SReadHandle* if (groupSort && groupByTbname) { taosArraySort(pTableListInfo->pTableList, orderbyGroupIdComparFn); pTableListInfo->numOfOuputGroups = numOfTables; - } else if (groupByTbname && pScanNode->groupOrderScan){ + } else if (groupByTbname && pScanNode->groupOrderScan) { pTableListInfo->numOfOuputGroups = numOfTables; } else if (groupByTbname && tsCountAlwaysReturnValue && ((STableScanPhysiNode*)pScanNode)->needCountEmptyTable) { pTableListInfo->numOfOuputGroups = numOfTables; @@ -2147,7 +2151,8 @@ int32_t buildGroupIdMapForAllTables(STableListInfo* pTableListInfo, SReadHandle* bool initRemainGroups = false; if (QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN == nodeType(pScanNode)) { STableScanPhysiNode* pTableScanNode = (STableScanPhysiNode*)pScanNode; - if (tsCountAlwaysReturnValue && pTableScanNode->needCountEmptyTable && !(groupSort || pScanNode->groupOrderScan)) { + if (tsCountAlwaysReturnValue && pTableScanNode->needCountEmptyTable && + !(groupSort || pScanNode->groupOrderScan)) { initRemainGroups = true; } } @@ -2271,7 +2276,7 @@ void printSpecDataBlock(SSDataBlock* pBlock, const char* flag, const char* opStr } if (qDebugFlag & DEBUG_DEBUG) { char* pBuf = NULL; - char flagBuf[64]; + char flagBuf[64]; snprintf(flagBuf, sizeof(flagBuf), "%s %s", flag, opStr); qDebug("%s", dumpBlockData(pBlock, flagBuf, &pBuf, taskIdStr)); taosMemoryFree(pBuf); @@ -2280,7 +2285,7 @@ void printSpecDataBlock(SSDataBlock* pBlock, const char* flag, const char* opStr TSKEY getStartTsKey(STimeWindow* win, const TSKEY* tsCols) { return tsCols == NULL ? win->skey : tsCols[0]; } -void updateTimeWindowInfo(SColumnInfoData* pColData, STimeWindow* pWin, int64_t delta) { +void updateTimeWindowInfo(SColumnInfoData* pColData, STimeWindow* pWin, int64_t delta) { int64_t* ts = (int64_t*)pColData->pData; int64_t duration = pWin->ekey - pWin->skey + delta; @@ -2289,13 +2294,14 @@ void updateTimeWindowInfo(SColumnInfoData* pColData, STimeWindow* pWin, int64_t ts[4] = pWin->ekey + delta; // window end key } -int32_t compKeys(const SArray* pSortGroupCols, const char* oldkeyBuf, int32_t oldKeysLen, const SSDataBlock* pBlock, int32_t rowIndex) { +int32_t compKeys(const SArray* pSortGroupCols, const char* oldkeyBuf, int32_t oldKeysLen, const SSDataBlock* pBlock, + int32_t rowIndex) { SColumnDataAgg* pColAgg = NULL; const char* isNull = oldkeyBuf; const char* p = oldkeyBuf + sizeof(int8_t) * pSortGroupCols->size; for (int32_t i = 0; i < pSortGroupCols->size; ++i) { - const SColumn* pCol = (SColumn*)TARRAY_GET_ELEM(pSortGroupCols, i); + const SColumn* pCol = (SColumn*)TARRAY_GET_ELEM(pSortGroupCols, i); const SColumnInfoData* pColInfoData = TARRAY_GET_ELEM(pBlock->pDataBlock, pCol->slotId); if (pBlock->pBlockAgg) pColAgg = pBlock->pBlockAgg[pCol->slotId]; @@ -2321,8 +2327,7 @@ int32_t compKeys(const SArray* pSortGroupCols, const char* oldkeyBuf, int32_t ol return 0; } -int32_t buildKeys(char* keyBuf, const SArray* pSortGroupCols, const SSDataBlock* pBlock, - int32_t rowIndex) { +int32_t buildKeys(char* keyBuf, const SArray* pSortGroupCols, const SSDataBlock* pBlock, int32_t rowIndex) { uint32_t colNum = pSortGroupCols->size; SColumnDataAgg* pColAgg = NULL; char* isNull = keyBuf; @@ -2370,7 +2375,7 @@ uint64_t calcGroupId(char* pData, int32_t len) { } SNodeList* makeColsNodeArrFromSortKeys(SNodeList* pSortKeys) { - SNode* node; + SNode* node; SNodeList* ret = NULL; FOREACH(node, pSortKeys) { SOrderByExprNode* pSortKey = (SOrderByExprNode*)node; @@ -2386,6 +2391,6 @@ int32_t extractKeysLen(const SArray* keys) { SColumn* pCol = (SColumn*)taosArrayGet(keys, i); len += pCol->bytes; } - len += sizeof(int8_t) * keyNum; //null flag + len += sizeof(int8_t) * keyNum; // null flag return len; } diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 589c23ed3a..628aacf3c3 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -879,7 +879,7 @@ static int32_t sysTableGetGeomText(char* iGeom, int32_t nGeom, char** output, in char* outputWKT = NULL; if (nGeom == 0) { - if (!(*output = strdup(""))) code = TSDB_CODE_OUT_OF_MEMORY; + if (!(*output = taosStrdup(""))) code = TSDB_CODE_OUT_OF_MEMORY; *nOutput = 0; return code; } diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 09963138ba..4da7ce0127 100755 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -747,16 +747,52 @@ insert_query(A) ::= INSERT INTO full_table_name(C) query_or_subquery(B). /************************************************ tags_literal *************************************************************/ tags_literal(A) ::= NK_INTEGER(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B, NULL); } +tags_literal(A) ::= NK_INTEGER(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_INTEGER(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_PLUS(B) NK_INTEGER(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_PLUS(B) NK_INTEGER NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_PLUS(B) NK_INTEGER NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_MINUS(B) NK_INTEGER(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_MINUS(B) NK_INTEGER NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_MINUS(B) NK_INTEGER NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_FLOAT(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &B, NULL); } tags_literal(A) ::= NK_PLUS(B) NK_FLOAT(C). { SToken t = B; @@ -770,29 +806,113 @@ tags_literal(A) ::= NK_MINUS(B) NK_FLOAT(C). } tags_literal(A) ::= NK_BIN(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B, NULL); } +tags_literal(A) ::= NK_BIN(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_BIN(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_PLUS(B) NK_BIN(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_PLUS(B) NK_BIN NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_PLUS(B) NK_BIN NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_MINUS(B) NK_BIN(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_MINUS(B) NK_BIN NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_MINUS(B) NK_BIN NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_HEX(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &B, NULL); } +tags_literal(A) ::= NK_HEX(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_HEX(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_PLUS(B) NK_HEX(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_PLUS(B) NK_HEX NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_PLUS(B) NK_HEX NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_MINUS(B) NK_HEX(C). { SToken t = B; t.n = (C.z + C.n) - B.z; A = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &t, NULL); } +tags_literal(A) ::= NK_MINUS(B) NK_HEX NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_MINUS(B) NK_HEX NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_STRING(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &B, NULL); } +tags_literal(A) ::= NK_STRING(B) NK_PLUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } +tags_literal(A) ::= NK_STRING(B) NK_MINUS duration_literal(C). { + SToken l = B; + SToken r = getTokenFromRawExprNode(pCxt, C); + l.n = (r.z + r.n) - l.z; + A = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, C); + } tags_literal(A) ::= NK_BOOL(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &B, NULL); } tags_literal(A) ::= NULL(B). { A = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &B, NULL); } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index d87dbdc00d..4cde47a5ad 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -143,18 +143,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 870 -#define YYNRULE 688 -#define YYNRULE_WITH_ACTION 688 +#define YYNSTATE 900 +#define YYNRULE 708 +#define YYNRULE_WITH_ACTION 708 #define YYNTOKEN 362 -#define YY_MAX_SHIFT 869 -#define YY_MIN_SHIFTREDUCE 1305 -#define YY_MAX_SHIFTREDUCE 1992 -#define YY_ERROR_ACTION 1993 -#define YY_ACCEPT_ACTION 1994 -#define YY_NO_ACTION 1995 -#define YY_MIN_REDUCE 1996 -#define YY_MAX_REDUCE 2683 +#define YY_MAX_SHIFT 899 +#define YY_MIN_SHIFTREDUCE 1345 +#define YY_MAX_SHIFTREDUCE 2052 +#define YY_ERROR_ACTION 2053 +#define YY_ACCEPT_ACTION 2054 +#define YY_NO_ACTION 2055 +#define YY_MIN_REDUCE 2056 +#define YY_MAX_REDUCE 2763 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -223,319 +223,319 @@ typedef union { *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (3127) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 2175, 771, 2186, 433, 2171, 771, 2186, 183, 2404, 304, - /* 10 */ 479, 170, 47, 45, 1914, 478, 96, 2405, 410, 2188, - /* 20 */ 424, 213, 1737, 40, 39, 139, 2237, 46, 44, 43, - /* 30 */ 42, 41, 622, 397, 1762, 1823, 2082, 1735, 107, 2325, - /* 40 */ 40, 39, 2181, 2465, 46, 44, 43, 42, 41, 770, - /* 50 */ 771, 2186, 175, 733, 148, 9, 736, 2323, 758, 687, - /* 60 */ 2125, 687, 1371, 2179, 1370, 1818, 2239, 2654, 687, 2654, - /* 70 */ 139, 19, 670, 393, 2659, 66, 2654, 627, 1743, 144, - /* 80 */ 710, 2237, 2654, 595, 2483, 2660, 209, 2660, 209, 770, - /* 90 */ 2655, 722, 2655, 722, 2660, 209, 2431, 1372, 753, 2655, - /* 100 */ 722, 2658, 495, 2301, 866, 2655, 2657, 15, 2483, 841, - /* 110 */ 840, 839, 838, 442, 228, 837, 836, 153, 831, 830, - /* 120 */ 829, 828, 827, 826, 825, 152, 819, 818, 817, 441, - /* 130 */ 440, 814, 813, 812, 189, 188, 811, 770, 2464, 463, - /* 140 */ 1958, 2502, 596, 1825, 1826, 115, 2466, 757, 2468, 2469, - /* 150 */ 752, 224, 775, 721, 1763, 91, 2177, 192, 90, 2556, - /* 160 */ 671, 2654, 1918, 420, 2552, 185, 2564, 732, 1762, 140, - /* 170 */ 731, 709, 1371, 1889, 1370, 659, 50, 2654, 62, 720, - /* 180 */ 209, 1797, 1807, 210, 2655, 722, 599, 1762, 1824, 1827, - /* 190 */ 657, 2603, 655, 275, 274, 720, 209, 1763, 597, 2318, - /* 200 */ 2655, 722, 1997, 1738, 668, 1736, 2424, 1372, 1833, 431, - /* 210 */ 1989, 430, 40, 39, 1762, 62, 46, 44, 43, 42, - /* 220 */ 41, 1743, 775, 129, 50, 89, 128, 127, 126, 125, - /* 230 */ 124, 123, 122, 121, 120, 589, 2364, 1741, 1742, 1794, - /* 240 */ 810, 1796, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, - /* 250 */ 749, 773, 772, 1817, 1819, 1820, 1821, 1822, 2, 47, - /* 260 */ 45, 430, 501, 2301, 373, 1762, 1760, 424, 467, 1737, - /* 270 */ 801, 51, 775, 529, 62, 385, 549, 1636, 1637, 531, - /* 280 */ 2301, 548, 1823, 2239, 1735, 2085, 2576, 1886, 1887, 1888, - /* 290 */ 2576, 2576, 2576, 2576, 2576, 469, 465, 509, 740, 550, - /* 300 */ 2441, 202, 40, 39, 374, 511, 46, 44, 43, 42, - /* 310 */ 41, 226, 1818, 2226, 1766, 489, 486, 1509, 19, 1852, - /* 320 */ 1544, 1545, 1635, 1638, 2445, 1743, 1988, 12, 231, 1798, - /* 330 */ 1345, 1500, 800, 799, 798, 1504, 797, 1506, 1507, 796, - /* 340 */ 793, 112, 1515, 790, 1517, 1518, 787, 784, 781, 1352, - /* 350 */ 109, 866, 396, 311, 15, 311, 439, 438, 641, 640, - /* 360 */ 639, 546, 544, 497, 375, 631, 145, 635, 222, 2447, - /* 370 */ 2450, 634, 1347, 1350, 1351, 1798, 633, 638, 403, 402, - /* 380 */ 775, 1744, 632, 3, 1853, 628, 2163, 1795, 771, 2186, - /* 390 */ 1825, 1826, 311, 2312, 2291, 53, 537, 536, 535, 534, - /* 400 */ 533, 528, 527, 526, 525, 379, 706, 1766, 55, 515, - /* 410 */ 514, 513, 512, 506, 505, 504, 584, 499, 498, 394, - /* 420 */ 37, 315, 581, 490, 1604, 1605, 1616, 1617, 1797, 1807, - /* 430 */ 1623, 733, 148, 1795, 129, 1824, 1827, 128, 127, 126, - /* 440 */ 125, 124, 123, 122, 121, 120, 1452, 2659, 311, 1765, - /* 450 */ 1738, 311, 1736, 40, 39, 835, 833, 46, 44, 43, - /* 460 */ 42, 41, 334, 1889, 1765, 2019, 36, 422, 1847, 1848, - /* 470 */ 1849, 1850, 1851, 1855, 1856, 1857, 1858, 205, 29, 46, - /* 480 */ 44, 43, 42, 41, 1741, 1742, 1794, 1454, 1796, 1799, - /* 490 */ 1800, 1801, 1802, 1803, 1804, 1805, 1806, 749, 773, 772, - /* 500 */ 1817, 1819, 1820, 1821, 1822, 2, 12, 47, 45, 712, - /* 510 */ 707, 700, 696, 62, 174, 424, 2465, 1737, 2431, 349, - /* 520 */ 2274, 671, 808, 163, 162, 805, 804, 803, 160, 754, - /* 530 */ 1823, 2239, 1735, 1767, 190, 2441, 347, 75, 409, 1889, - /* 540 */ 74, 1766, 735, 178, 2564, 2565, 2237, 146, 2569, 1747, - /* 550 */ 376, 626, 1982, 1959, 2465, 625, 395, 2483, 2305, 2445, - /* 560 */ 1818, 1996, 241, 561, 559, 556, 19, 736, 243, 2431, - /* 570 */ 200, 753, 582, 1743, 2047, 2571, 2576, 1886, 1887, 1888, - /* 580 */ 2576, 2576, 2576, 2576, 2576, 138, 137, 136, 135, 134, - /* 590 */ 133, 132, 131, 130, 711, 2483, 673, 2364, 2325, 866, - /* 600 */ 540, 2568, 15, 62, 2447, 2449, 421, 2431, 477, 753, - /* 610 */ 476, 2464, 309, 427, 2502, 775, 2322, 758, 115, 2466, - /* 620 */ 757, 2468, 2469, 752, 1911, 775, 1767, 309, 150, 245, - /* 630 */ 157, 2527, 2556, 582, 821, 2047, 420, 2552, 1825, 1826, - /* 640 */ 475, 63, 808, 163, 162, 805, 804, 803, 160, 2464, - /* 650 */ 2233, 2234, 2502, 1886, 1887, 1888, 115, 2466, 757, 2468, - /* 660 */ 2469, 752, 233, 775, 648, 771, 2186, 1407, 192, 2425, - /* 670 */ 2556, 1374, 1375, 428, 420, 2552, 1797, 1807, 686, 660, - /* 680 */ 113, 173, 522, 1824, 1827, 483, 521, 539, 232, 2188, - /* 690 */ 311, 85, 84, 482, 520, 276, 221, 151, 1738, 823, - /* 700 */ 1736, 1717, 2604, 579, 204, 2178, 580, 2039, 1408, 474, - /* 710 */ 472, 651, 1891, 1892, 1893, 1894, 1895, 278, 645, 643, - /* 720 */ 372, 277, 1947, 461, 430, 273, 458, 454, 450, 447, - /* 730 */ 475, 161, 1741, 1742, 1794, 775, 1796, 1799, 1800, 1801, - /* 740 */ 1802, 1803, 1804, 1805, 1806, 749, 773, 772, 1817, 1819, - /* 750 */ 1820, 1821, 1822, 2, 47, 45, 1828, 2465, 771, 2186, - /* 760 */ 1767, 176, 424, 2008, 1737, 2258, 71, 2571, 1716, 70, - /* 770 */ 754, 587, 2049, 2018, 580, 2039, 1352, 1823, 484, 1735, - /* 780 */ 311, 703, 702, 1945, 1946, 1948, 1949, 1950, 2239, 2465, - /* 790 */ 2173, 99, 2017, 2567, 382, 419, 576, 408, 2483, 661, - /* 800 */ 1350, 1351, 754, 2237, 2611, 574, 54, 1818, 570, 566, - /* 810 */ 2431, 60, 753, 1794, 641, 640, 639, 771, 2186, 684, - /* 820 */ 1743, 631, 145, 635, 2239, 1737, 2431, 634, 2169, 1854, - /* 830 */ 2483, 429, 633, 638, 403, 402, 2239, 503, 632, 2237, - /* 840 */ 1735, 628, 2431, 434, 753, 2431, 866, 733, 148, 48, - /* 850 */ 435, 2237, 2464, 2232, 2234, 2502, 771, 2186, 2190, 115, - /* 860 */ 2466, 757, 2468, 2469, 752, 2016, 775, 2465, 12, 1720, - /* 870 */ 10, 2674, 742, 2556, 2528, 1464, 516, 420, 2552, 715, - /* 880 */ 751, 1743, 771, 2186, 2464, 1825, 1826, 2502, 637, 636, - /* 890 */ 1463, 115, 2466, 757, 2468, 2469, 752, 728, 775, 1723, - /* 900 */ 1726, 824, 517, 2674, 2147, 2556, 1910, 866, 2483, 420, - /* 910 */ 2552, 34, 771, 2186, 149, 733, 148, 2527, 2431, 2659, - /* 920 */ 2431, 1859, 753, 1797, 1807, 524, 523, 2654, 1468, 1762, - /* 930 */ 1824, 1827, 518, 40, 39, 286, 1719, 46, 44, 43, - /* 940 */ 42, 41, 33, 1467, 1900, 1738, 2658, 1736, 40, 39, - /* 950 */ 2655, 2656, 46, 44, 43, 42, 41, 551, 203, 118, - /* 960 */ 2564, 2565, 2464, 146, 2569, 2502, 1722, 1725, 279, 365, - /* 970 */ 2466, 757, 2468, 2469, 752, 750, 775, 741, 2521, 1741, - /* 980 */ 1742, 1794, 2015, 1796, 1799, 1800, 1801, 1802, 1803, 1804, - /* 990 */ 1805, 1806, 749, 773, 772, 1817, 1819, 1820, 1821, 1822, - /* 1000 */ 2, 47, 45, 2465, 2014, 433, 1738, 2658, 1736, 424, - /* 1010 */ 553, 1737, 748, 173, 771, 2186, 754, 2571, 2624, 771, - /* 1020 */ 2186, 2188, 771, 2186, 1823, 2162, 1735, 179, 2564, 2565, - /* 1030 */ 436, 146, 2569, 1930, 598, 2431, 2465, 2617, 173, 2183, - /* 1040 */ 1741, 1742, 281, 2566, 2483, 2161, 2188, 1685, 1686, 754, - /* 1050 */ 2392, 698, 190, 744, 1818, 2528, 2431, 2431, 753, 35, - /* 1060 */ 771, 2186, 43, 42, 41, 40, 39, 1743, 2013, 46, - /* 1070 */ 44, 43, 42, 41, 771, 2186, 2306, 2483, 40, 39, - /* 1080 */ 289, 2373, 46, 44, 43, 42, 41, 319, 320, 2431, - /* 1090 */ 1798, 753, 318, 866, 739, 810, 48, 2126, 2464, 96, - /* 1100 */ 2012, 2502, 771, 2186, 305, 115, 2466, 757, 2468, 2469, - /* 1110 */ 752, 2011, 775, 2465, 2010, 771, 2186, 2674, 183, 2556, - /* 1120 */ 1994, 2431, 323, 420, 2552, 2182, 754, 771, 2186, 771, - /* 1130 */ 2186, 2464, 1825, 1826, 2502, 768, 280, 2007, 115, 2466, - /* 1140 */ 757, 2468, 2469, 752, 725, 775, 1939, 769, 1795, 330, - /* 1150 */ 2674, 2006, 2556, 2431, 2483, 802, 420, 2552, 2230, 771, - /* 1160 */ 2186, 1940, 618, 617, 2431, 2239, 2431, 2431, 753, 1354, - /* 1170 */ 1797, 1807, 620, 619, 729, 1761, 2239, 1824, 1827, 437, - /* 1180 */ 766, 808, 163, 162, 805, 804, 803, 160, 14, 13, - /* 1190 */ 2431, 2238, 1738, 806, 1736, 173, 2230, 401, 400, 2005, - /* 1200 */ 445, 2004, 1938, 2189, 2431, 444, 2395, 2003, 2464, 2002, - /* 1210 */ 1766, 2502, 747, 2001, 2000, 180, 2466, 757, 2468, 2469, - /* 1220 */ 752, 807, 775, 1999, 2230, 1762, 1741, 1742, 1794, 666, - /* 1230 */ 1796, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 749, - /* 1240 */ 773, 772, 1817, 1819, 1820, 1821, 1822, 2, 47, 45, - /* 1250 */ 2465, 687, 2431, 172, 2431, 100, 424, 452, 1737, 2654, - /* 1260 */ 2431, 343, 2431, 754, 2216, 2647, 2431, 2431, 77, 399, - /* 1270 */ 398, 1823, 624, 1735, 723, 2675, 2431, 2660, 209, 215, - /* 1280 */ 687, 141, 2655, 722, 2024, 861, 1664, 2284, 2654, 2465, - /* 1290 */ 704, 2483, 721, 87, 626, 1866, 629, 161, 625, 2164, - /* 1300 */ 2654, 1818, 754, 2431, 2588, 753, 2660, 209, 161, 630, - /* 1310 */ 724, 2655, 722, 2069, 1743, 694, 439, 438, 720, 209, - /* 1320 */ 1449, 88, 266, 2655, 722, 264, 1751, 2067, 268, 493, - /* 1330 */ 2483, 267, 154, 1447, 270, 642, 2058, 269, 672, 1823, - /* 1340 */ 866, 1744, 2431, 15, 753, 2464, 2056, 2465, 2502, 644, - /* 1350 */ 1991, 1992, 115, 2466, 757, 2468, 2469, 752, 646, 775, - /* 1360 */ 754, 663, 272, 662, 2674, 271, 2556, 290, 649, 1818, - /* 1370 */ 420, 2552, 1680, 49, 14, 13, 2009, 2452, 1844, 1825, - /* 1380 */ 1826, 297, 1743, 1683, 2464, 161, 734, 2502, 2483, 687, - /* 1390 */ 1934, 115, 2466, 757, 2468, 2469, 752, 2654, 775, 1746, - /* 1400 */ 2431, 49, 753, 2674, 1745, 2556, 329, 328, 746, 420, - /* 1410 */ 2552, 101, 143, 815, 816, 2660, 209, 1797, 1807, 726, - /* 1420 */ 2655, 722, 2484, 193, 1824, 1827, 40, 39, 64, 1767, - /* 1430 */ 46, 44, 43, 42, 41, 2454, 49, 1426, 1424, 1738, - /* 1440 */ 73, 1736, 2464, 2123, 1795, 2502, 2122, 2040, 1944, 115, - /* 1450 */ 2466, 757, 2468, 2469, 752, 49, 775, 317, 76, 2310, - /* 1460 */ 738, 2531, 159, 2556, 161, 779, 2607, 420, 2552, 159, - /* 1470 */ 161, 2050, 701, 1741, 1742, 1794, 1943, 1796, 1799, 1800, - /* 1480 */ 1801, 1802, 1803, 1804, 1805, 1806, 749, 773, 772, 1817, - /* 1490 */ 1819, 1820, 1821, 1822, 2, 378, 377, 2465, 295, 142, - /* 1500 */ 415, 159, 708, 1860, 411, 1727, 760, 1752, 443, 1747, - /* 1510 */ 754, 1808, 2311, 2046, 2227, 342, 680, 2608, 1823, 2618, - /* 1520 */ 1715, 716, 717, 859, 307, 302, 310, 2148, 5, 451, - /* 1530 */ 1633, 391, 321, 763, 446, 459, 2465, 325, 2483, 1494, - /* 1540 */ 1522, 1755, 1757, 460, 1526, 1533, 1770, 471, 1818, 754, - /* 1550 */ 2431, 470, 753, 216, 261, 773, 772, 1817, 1819, 1820, - /* 1560 */ 1821, 1822, 217, 473, 219, 1657, 337, 1749, 1760, 487, - /* 1570 */ 184, 1761, 1748, 494, 1531, 230, 164, 2483, 500, 616, - /* 1580 */ 612, 608, 604, 496, 260, 542, 502, 507, 519, 2431, - /* 1590 */ 2303, 753, 2464, 530, 2465, 2502, 532, 538, 541, 115, - /* 1600 */ 2466, 757, 2468, 2469, 752, 543, 775, 754, 554, 555, - /* 1610 */ 552, 2529, 236, 2556, 235, 557, 558, 420, 2552, 238, - /* 1620 */ 560, 562, 1768, 577, 4, 97, 585, 1763, 258, 578, - /* 1630 */ 590, 2464, 586, 588, 2502, 2483, 246, 93, 115, 2466, - /* 1640 */ 757, 2468, 2469, 752, 1769, 775, 249, 2431, 591, 753, - /* 1650 */ 743, 1771, 2556, 592, 252, 594, 420, 2552, 254, 1772, - /* 1660 */ 2319, 600, 621, 94, 95, 737, 259, 623, 2465, 2176, - /* 1670 */ 117, 263, 2172, 265, 652, 653, 166, 167, 369, 2174, - /* 1680 */ 2170, 754, 665, 98, 338, 168, 1728, 169, 1718, 2464, - /* 1690 */ 667, 1764, 2502, 155, 282, 248, 116, 2466, 757, 2468, - /* 1700 */ 2469, 752, 2365, 775, 257, 250, 2382, 2379, 2378, 2483, - /* 1710 */ 2556, 255, 593, 675, 2555, 2552, 687, 674, 1721, 1724, - /* 1720 */ 1729, 2431, 287, 753, 2654, 679, 682, 691, 681, 705, - /* 1730 */ 247, 2623, 761, 292, 773, 772, 1817, 1819, 1820, 1821, - /* 1740 */ 1822, 285, 2660, 209, 8, 2465, 676, 2655, 722, 2622, - /* 1750 */ 294, 2595, 714, 692, 690, 182, 296, 689, 754, 301, - /* 1760 */ 719, 2575, 298, 2464, 299, 300, 2502, 718, 416, 2465, - /* 1770 */ 116, 2466, 757, 2468, 2469, 752, 2677, 775, 1765, 730, - /* 1780 */ 727, 2572, 754, 1908, 2556, 1906, 2483, 147, 745, 2552, - /* 1790 */ 196, 2465, 303, 61, 312, 2537, 156, 339, 2431, 759, - /* 1800 */ 753, 2333, 211, 2332, 754, 1, 2331, 340, 764, 2653, - /* 1810 */ 2483, 426, 158, 2187, 765, 341, 2423, 106, 108, 344, - /* 1820 */ 306, 1329, 2431, 332, 753, 777, 2422, 860, 863, 2465, - /* 1830 */ 165, 368, 2483, 865, 2231, 52, 389, 346, 348, 390, - /* 1840 */ 755, 2403, 754, 2502, 2431, 356, 753, 116, 2466, 757, - /* 1850 */ 2468, 2469, 752, 367, 775, 357, 2402, 2401, 82, 2396, - /* 1860 */ 448, 2556, 449, 1708, 2464, 384, 2552, 2502, 1709, 214, - /* 1870 */ 2483, 177, 2466, 757, 2468, 2469, 752, 453, 775, 2394, - /* 1880 */ 455, 456, 2431, 457, 753, 1707, 2464, 392, 2391, 2502, - /* 1890 */ 2393, 462, 2390, 116, 2466, 757, 2468, 2469, 752, 464, - /* 1900 */ 775, 2389, 2465, 466, 2388, 468, 1696, 2556, 2369, 218, - /* 1910 */ 2368, 220, 2553, 83, 1660, 754, 1659, 2346, 688, 2614, - /* 1920 */ 2345, 2344, 480, 481, 2464, 2343, 2342, 2502, 2293, 485, - /* 1930 */ 2290, 177, 2466, 757, 2468, 2469, 752, 488, 775, 2289, - /* 1940 */ 1603, 2283, 491, 2483, 492, 2280, 223, 2279, 86, 2278, - /* 1950 */ 2277, 2282, 2281, 2276, 2275, 2431, 225, 753, 2273, 2272, - /* 1960 */ 2465, 2271, 227, 2270, 508, 2268, 510, 2267, 2266, 2265, - /* 1970 */ 2288, 2264, 2263, 754, 2262, 2286, 2269, 413, 2261, 2615, - /* 1980 */ 2260, 2259, 2257, 2465, 2256, 2255, 2254, 2253, 2252, 229, - /* 1990 */ 2251, 92, 2250, 2249, 2248, 2247, 754, 2464, 2287, 2285, - /* 2000 */ 2502, 2483, 2246, 2245, 366, 2466, 757, 2468, 2469, 752, - /* 2010 */ 2244, 775, 234, 2431, 2243, 753, 545, 2242, 2465, 1609, - /* 2020 */ 547, 2241, 2240, 1465, 2483, 2088, 1469, 380, 1461, 381, - /* 2030 */ 2087, 754, 1353, 253, 2340, 414, 2431, 2086, 753, 2084, - /* 2040 */ 2081, 2080, 2073, 563, 2060, 567, 2035, 2034, 237, 565, - /* 2050 */ 571, 564, 2367, 569, 239, 2464, 191, 573, 2502, 2483, - /* 2060 */ 568, 240, 366, 2466, 757, 2468, 2469, 752, 575, 775, - /* 2070 */ 572, 2431, 242, 753, 2363, 2451, 2353, 201, 2464, 244, - /* 2080 */ 79, 2502, 583, 2341, 256, 359, 2466, 757, 2468, 2469, - /* 2090 */ 752, 80, 775, 251, 2317, 2165, 1400, 2083, 2079, 601, - /* 2100 */ 603, 2465, 605, 607, 602, 2077, 606, 2075, 609, 611, - /* 2110 */ 610, 2072, 613, 2464, 751, 614, 2502, 2055, 2053, 615, - /* 2120 */ 180, 2466, 757, 2468, 2469, 752, 2054, 775, 2052, 2031, - /* 2130 */ 2167, 72, 1537, 262, 2166, 2070, 713, 1538, 2465, 647, - /* 2140 */ 1451, 1450, 2483, 1448, 2068, 1446, 1445, 832, 2059, 1444, - /* 2150 */ 1443, 754, 1442, 834, 2431, 1437, 753, 2057, 1439, 1438, - /* 2160 */ 1436, 404, 407, 405, 406, 2030, 2029, 2028, 650, 654, - /* 2170 */ 2027, 2026, 658, 656, 119, 1690, 2465, 1694, 2366, 2483, - /* 2180 */ 2676, 2362, 1692, 1689, 1666, 28, 67, 2352, 2339, 754, - /* 2190 */ 1668, 2431, 284, 753, 677, 56, 2464, 2659, 669, 2502, - /* 2200 */ 2338, 17, 20, 365, 2466, 757, 2468, 2469, 752, 1961, - /* 2210 */ 775, 693, 2522, 423, 2465, 1901, 869, 2483, 21, 412, - /* 2220 */ 23, 65, 22, 30, 697, 6, 57, 754, 678, 2431, - /* 2230 */ 7, 753, 336, 2464, 291, 195, 2502, 1645, 32, 1670, - /* 2240 */ 366, 2466, 757, 2468, 2469, 752, 288, 775, 199, 207, - /* 2250 */ 206, 425, 2465, 1644, 171, 2483, 683, 857, 853, 849, - /* 2260 */ 845, 1935, 333, 685, 699, 754, 695, 2431, 293, 753, - /* 2270 */ 1942, 2464, 1929, 2452, 2502, 1903, 24, 1976, 366, 2466, - /* 2280 */ 757, 2468, 2469, 752, 1899, 775, 181, 1975, 417, 1980, - /* 2290 */ 194, 31, 1979, 2483, 1981, 308, 418, 81, 2465, 208, - /* 2300 */ 59, 1982, 186, 114, 1883, 2431, 326, 753, 2337, 664, - /* 2310 */ 2316, 754, 2502, 103, 1882, 102, 361, 2466, 757, 2468, - /* 2320 */ 2469, 752, 25, 775, 1835, 1834, 13, 1753, 11, 1845, - /* 2330 */ 58, 1810, 38, 187, 1809, 16, 26, 197, 767, 2483, - /* 2340 */ 1779, 1787, 27, 762, 316, 18, 198, 2464, 2315, 1937, - /* 2350 */ 2502, 2431, 322, 753, 351, 2466, 757, 2468, 2469, 752, - /* 2360 */ 104, 775, 327, 69, 756, 109, 778, 105, 2507, 2506, - /* 2370 */ 2465, 1812, 774, 68, 776, 432, 324, 1523, 1520, 780, - /* 2380 */ 782, 783, 314, 754, 1519, 786, 785, 1516, 788, 313, - /* 2390 */ 789, 791, 792, 2464, 1510, 1508, 2502, 2465, 794, 795, - /* 2400 */ 350, 2466, 757, 2468, 2469, 752, 110, 775, 283, 1514, - /* 2410 */ 754, 2483, 331, 111, 1532, 1528, 78, 1398, 1513, 1512, - /* 2420 */ 1433, 1511, 1430, 2431, 809, 753, 1429, 820, 2465, 1428, - /* 2430 */ 1459, 1427, 1425, 1423, 1422, 1421, 1458, 822, 2483, 212, - /* 2440 */ 1419, 754, 1418, 1416, 1417, 1415, 1414, 1413, 1455, 1453, - /* 2450 */ 2431, 1410, 753, 1409, 1406, 1405, 1404, 1403, 2078, 842, - /* 2460 */ 2076, 844, 843, 846, 847, 2464, 848, 2465, 2502, 2483, - /* 2470 */ 2074, 2071, 352, 2466, 757, 2468, 2469, 752, 850, 775, - /* 2480 */ 754, 2431, 851, 753, 852, 854, 855, 856, 2051, 858, - /* 2490 */ 1342, 2025, 2464, 868, 1330, 2502, 862, 335, 864, 358, - /* 2500 */ 2466, 757, 2468, 2469, 752, 1739, 775, 345, 2483, 1995, - /* 2510 */ 867, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, - /* 2520 */ 2431, 1995, 753, 2464, 1995, 1995, 2502, 1995, 1995, 1995, - /* 2530 */ 362, 2466, 757, 2468, 2469, 752, 1995, 775, 1995, 1995, - /* 2540 */ 1995, 1995, 2465, 1995, 1995, 1995, 1995, 1995, 1995, 1995, - /* 2550 */ 1995, 1995, 1995, 1995, 1995, 754, 1995, 1995, 1995, 1995, - /* 2560 */ 1995, 1995, 2464, 1995, 2465, 2502, 1995, 1995, 1995, 353, - /* 2570 */ 2466, 757, 2468, 2469, 752, 1995, 775, 754, 1995, 2465, - /* 2580 */ 1995, 1995, 1995, 2483, 1995, 1995, 1995, 1995, 1995, 1995, - /* 2590 */ 1995, 1995, 754, 1995, 1995, 2431, 1995, 753, 1995, 1995, - /* 2600 */ 1995, 1995, 2465, 1995, 1995, 2483, 1995, 1995, 1995, 1995, - /* 2610 */ 1995, 1995, 1995, 1995, 1995, 754, 1995, 2431, 1995, 753, - /* 2620 */ 2483, 1995, 1995, 2465, 1995, 1995, 1995, 1995, 1995, 1995, - /* 2630 */ 1995, 1995, 2431, 1995, 753, 1995, 754, 2464, 1995, 1995, - /* 2640 */ 2502, 1995, 1995, 2483, 363, 2466, 757, 2468, 2469, 752, - /* 2650 */ 1995, 775, 1995, 1995, 1995, 2431, 1995, 753, 1995, 2464, - /* 2660 */ 1995, 1995, 2502, 1995, 2483, 1995, 354, 2466, 757, 2468, - /* 2670 */ 2469, 752, 1995, 775, 2464, 1995, 2431, 2502, 753, 1995, - /* 2680 */ 1995, 364, 2466, 757, 2468, 2469, 752, 1995, 775, 1995, - /* 2690 */ 1995, 1995, 1995, 1995, 1995, 1995, 1995, 2464, 1995, 1995, - /* 2700 */ 2502, 1995, 1995, 1995, 355, 2466, 757, 2468, 2469, 752, - /* 2710 */ 1995, 775, 1995, 1995, 1995, 1995, 1995, 1995, 2464, 1995, - /* 2720 */ 2465, 2502, 1995, 1995, 1995, 370, 2466, 757, 2468, 2469, - /* 2730 */ 752, 1995, 775, 754, 1995, 1995, 2465, 1995, 1995, 1995, - /* 2740 */ 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 754, - /* 2750 */ 1995, 1995, 1995, 1995, 1995, 2465, 1995, 1995, 1995, 1995, - /* 2760 */ 1995, 2483, 1995, 1995, 1995, 1995, 1995, 1995, 754, 1995, - /* 2770 */ 1995, 1995, 1995, 2431, 1995, 753, 1995, 2483, 1995, 1995, - /* 2780 */ 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 2431, - /* 2790 */ 1995, 753, 1995, 1995, 2465, 1995, 2483, 1995, 1995, 1995, - /* 2800 */ 1995, 1995, 1995, 1995, 1995, 1995, 1995, 754, 2431, 1995, - /* 2810 */ 753, 1995, 1995, 1995, 1995, 2464, 1995, 1995, 2502, 1995, - /* 2820 */ 1995, 1995, 371, 2466, 757, 2468, 2469, 752, 1995, 775, - /* 2830 */ 1995, 2464, 1995, 2465, 2502, 2483, 1995, 1995, 2477, 2466, - /* 2840 */ 757, 2468, 2469, 752, 1995, 775, 754, 2431, 1995, 753, - /* 2850 */ 2464, 1995, 1995, 2502, 1995, 1995, 1995, 2476, 2466, 757, - /* 2860 */ 2468, 2469, 752, 1995, 775, 2465, 1995, 1995, 1995, 1995, - /* 2870 */ 1995, 1995, 1995, 1995, 2483, 1995, 1995, 1995, 754, 1995, - /* 2880 */ 1995, 1995, 1995, 1995, 1995, 1995, 2431, 1995, 753, 2464, - /* 2890 */ 1995, 1995, 2502, 1995, 1995, 1995, 2475, 2466, 757, 2468, - /* 2900 */ 2469, 752, 1995, 775, 1995, 1995, 2483, 1995, 1995, 1995, - /* 2910 */ 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 2431, 1995, - /* 2920 */ 753, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 2464, 1995, - /* 2930 */ 1995, 2502, 1995, 1995, 1995, 386, 2466, 757, 2468, 2469, - /* 2940 */ 752, 1995, 775, 2465, 1995, 1995, 1995, 1995, 1995, 1995, - /* 2950 */ 1995, 1995, 1995, 1995, 1995, 1995, 754, 1995, 1995, 1995, - /* 2960 */ 2464, 1995, 1995, 2502, 1995, 1995, 1995, 387, 2466, 757, - /* 2970 */ 2468, 2469, 752, 1995, 775, 1995, 1995, 1995, 1995, 1995, - /* 2980 */ 1995, 2465, 1995, 1995, 2483, 1995, 1995, 1995, 1995, 1995, - /* 2990 */ 1995, 1995, 1995, 1995, 754, 1995, 2431, 1995, 753, 1995, - /* 3000 */ 1995, 1995, 2465, 1995, 1995, 1995, 1995, 1995, 1995, 1995, - /* 3010 */ 1995, 1995, 1995, 1995, 1995, 754, 1995, 2465, 1995, 1995, - /* 3020 */ 1995, 1995, 2483, 1995, 1995, 1995, 1995, 1995, 1995, 1995, - /* 3030 */ 754, 1995, 1995, 1995, 2431, 1995, 753, 1995, 2464, 1995, - /* 3040 */ 1995, 2502, 1995, 2483, 1995, 383, 2466, 757, 2468, 2469, - /* 3050 */ 752, 1995, 775, 1995, 1995, 2431, 1995, 753, 2483, 1995, - /* 3060 */ 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, 1995, - /* 3070 */ 2431, 1995, 753, 1995, 1995, 1995, 2464, 1995, 1995, 2502, - /* 3080 */ 1995, 1995, 1995, 388, 2466, 757, 2468, 2469, 752, 1995, - /* 3090 */ 775, 1995, 1995, 1995, 1995, 1995, 1995, 755, 1995, 1995, - /* 3100 */ 2502, 1995, 1995, 1995, 361, 2466, 757, 2468, 2469, 752, - /* 3110 */ 1995, 775, 2464, 1995, 1995, 2502, 1995, 1995, 1995, 360, - /* 3120 */ 2466, 757, 2468, 2469, 752, 1995, 775, + /* 0 */ 2235, 801, 2246, 463, 2231, 801, 2246, 183, 2464, 304, + /* 10 */ 509, 170, 47, 45, 1974, 508, 96, 2465, 430, 2248, + /* 20 */ 444, 213, 1797, 40, 39, 139, 2297, 46, 44, 43, + /* 30 */ 42, 41, 652, 417, 1822, 1883, 2142, 1795, 107, 2385, + /* 40 */ 40, 39, 2241, 2545, 46, 44, 43, 42, 41, 800, + /* 50 */ 801, 2246, 175, 763, 148, 9, 766, 2383, 788, 717, + /* 60 */ 2185, 717, 1411, 2239, 1410, 1878, 2299, 2734, 717, 2734, + /* 70 */ 139, 19, 700, 413, 2739, 66, 2734, 657, 1803, 144, + /* 80 */ 740, 2297, 2734, 625, 2563, 2740, 209, 2740, 209, 800, + /* 90 */ 2735, 752, 2735, 752, 2740, 209, 2511, 1412, 783, 2735, + /* 100 */ 752, 2738, 525, 2361, 896, 2735, 2737, 15, 2563, 871, + /* 110 */ 870, 869, 868, 472, 228, 867, 866, 153, 861, 860, + /* 120 */ 859, 858, 857, 856, 855, 152, 849, 848, 847, 471, + /* 130 */ 470, 844, 843, 842, 189, 188, 841, 800, 2544, 493, + /* 140 */ 2018, 2582, 626, 1885, 1886, 115, 2546, 787, 2548, 2549, + /* 150 */ 782, 224, 805, 751, 1823, 91, 2237, 192, 90, 2636, + /* 160 */ 701, 2734, 1978, 440, 2632, 185, 2644, 762, 1822, 140, + /* 170 */ 761, 739, 1411, 1949, 1410, 689, 50, 2734, 62, 750, + /* 180 */ 209, 1857, 1867, 210, 2735, 752, 629, 1822, 1884, 1887, + /* 190 */ 687, 2683, 685, 275, 274, 750, 209, 1823, 627, 2378, + /* 200 */ 2735, 752, 2057, 1798, 698, 1796, 2504, 1412, 1893, 461, + /* 210 */ 2049, 450, 40, 39, 1822, 62, 46, 44, 43, 42, + /* 220 */ 41, 1803, 805, 129, 50, 89, 128, 127, 126, 125, + /* 230 */ 124, 123, 122, 121, 120, 619, 2424, 1801, 1802, 1854, + /* 240 */ 840, 1856, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, + /* 250 */ 779, 803, 802, 1877, 1879, 1880, 1881, 1882, 2, 47, + /* 260 */ 45, 450, 531, 2361, 393, 1822, 1820, 444, 497, 1797, + /* 270 */ 831, 51, 805, 559, 62, 405, 579, 1676, 1677, 561, + /* 280 */ 2361, 578, 1883, 2299, 1795, 2145, 2656, 1946, 1947, 1948, + /* 290 */ 2656, 2656, 2656, 2656, 2656, 499, 495, 539, 770, 580, + /* 300 */ 2521, 202, 40, 39, 394, 541, 46, 44, 43, 42, + /* 310 */ 41, 226, 1878, 2286, 1826, 519, 516, 1549, 19, 1912, + /* 320 */ 1584, 1585, 1675, 1678, 2525, 1803, 2048, 12, 231, 1858, + /* 330 */ 1385, 1540, 830, 829, 828, 1544, 827, 1546, 1547, 826, + /* 340 */ 823, 112, 1555, 820, 1557, 1558, 817, 814, 811, 1392, + /* 350 */ 109, 896, 416, 311, 15, 311, 469, 468, 671, 670, + /* 360 */ 669, 576, 574, 527, 395, 661, 145, 665, 222, 2527, + /* 370 */ 2530, 664, 1387, 1390, 1391, 1858, 663, 668, 423, 422, + /* 380 */ 805, 1804, 662, 3, 1913, 658, 2223, 1855, 801, 2246, + /* 390 */ 1885, 1886, 311, 2372, 2351, 53, 567, 566, 565, 564, + /* 400 */ 563, 558, 557, 556, 555, 399, 736, 1826, 55, 545, + /* 410 */ 544, 543, 542, 536, 535, 534, 614, 529, 528, 414, + /* 420 */ 37, 315, 611, 520, 1644, 1645, 1656, 1657, 1857, 1867, + /* 430 */ 1663, 763, 148, 1855, 129, 1884, 1887, 128, 127, 126, + /* 440 */ 125, 124, 123, 122, 121, 120, 1492, 2739, 311, 1825, + /* 450 */ 1798, 311, 1796, 40, 39, 865, 863, 46, 44, 43, + /* 460 */ 42, 41, 354, 1949, 1825, 2079, 36, 442, 1907, 1908, + /* 470 */ 1909, 1910, 1911, 1915, 1916, 1917, 1918, 205, 29, 46, + /* 480 */ 44, 43, 42, 41, 1801, 1802, 1854, 1494, 1856, 1859, + /* 490 */ 1860, 1861, 1862, 1863, 1864, 1865, 1866, 779, 803, 802, + /* 500 */ 1877, 1879, 1880, 1881, 1882, 2, 12, 47, 45, 742, + /* 510 */ 737, 730, 726, 62, 174, 444, 2545, 1797, 2511, 369, + /* 520 */ 2334, 701, 838, 163, 162, 835, 834, 833, 160, 784, + /* 530 */ 1883, 2299, 1795, 1827, 190, 2521, 367, 75, 429, 1949, + /* 540 */ 74, 1826, 765, 178, 2644, 2645, 2297, 146, 2649, 1807, + /* 550 */ 396, 656, 2042, 2019, 2545, 655, 415, 2563, 2365, 2525, + /* 560 */ 1878, 2056, 241, 591, 589, 586, 19, 766, 243, 2511, + /* 570 */ 200, 783, 612, 1803, 2107, 2651, 2656, 1946, 1947, 1948, + /* 580 */ 2656, 2656, 2656, 2656, 2656, 138, 137, 136, 135, 134, + /* 590 */ 133, 132, 131, 130, 741, 2563, 703, 2424, 2385, 896, + /* 600 */ 570, 2648, 15, 62, 2527, 2529, 441, 2511, 507, 783, + /* 610 */ 506, 2544, 309, 447, 2582, 805, 2382, 788, 115, 2546, + /* 620 */ 787, 2548, 2549, 782, 1971, 805, 1827, 309, 150, 245, + /* 630 */ 157, 2607, 2636, 612, 851, 2107, 440, 2632, 1885, 1886, + /* 640 */ 505, 63, 838, 163, 162, 835, 834, 833, 160, 2544, + /* 650 */ 2293, 2294, 2582, 1946, 1947, 1948, 115, 2546, 787, 2548, + /* 660 */ 2549, 782, 233, 805, 678, 801, 2246, 1447, 192, 2505, + /* 670 */ 2636, 1414, 1415, 448, 440, 2632, 1857, 1867, 716, 690, + /* 680 */ 113, 173, 552, 1884, 1887, 513, 551, 569, 232, 2248, + /* 690 */ 311, 85, 84, 512, 550, 276, 221, 151, 1798, 853, + /* 700 */ 1796, 456, 2684, 609, 204, 2238, 610, 2099, 1448, 504, + /* 710 */ 502, 681, 1951, 1952, 1953, 1954, 1955, 278, 675, 673, + /* 720 */ 392, 277, 2007, 491, 450, 273, 488, 484, 480, 477, + /* 730 */ 505, 161, 1801, 1802, 1854, 805, 1856, 1859, 1860, 1861, + /* 740 */ 1862, 1863, 1864, 1865, 1866, 779, 803, 802, 1877, 1879, + /* 750 */ 1880, 1881, 1882, 2, 47, 45, 1888, 2545, 801, 2246, + /* 760 */ 1827, 176, 444, 2068, 1797, 2318, 71, 2651, 459, 70, + /* 770 */ 784, 617, 2109, 2078, 610, 2099, 1392, 1883, 514, 1795, + /* 780 */ 311, 733, 732, 2005, 2006, 2008, 2009, 2010, 2299, 2545, + /* 790 */ 2233, 99, 2077, 2647, 402, 439, 606, 428, 2563, 691, + /* 800 */ 1390, 1391, 784, 2297, 2691, 604, 54, 1878, 600, 596, + /* 810 */ 2511, 60, 783, 1854, 671, 670, 669, 801, 2246, 714, + /* 820 */ 1803, 661, 145, 665, 2299, 1797, 2511, 664, 2229, 1914, + /* 830 */ 2563, 449, 663, 668, 423, 422, 2299, 533, 662, 2297, + /* 840 */ 1795, 658, 2511, 464, 783, 2511, 896, 763, 148, 48, + /* 850 */ 465, 2297, 2544, 2292, 2294, 2582, 801, 2246, 2250, 115, + /* 860 */ 2546, 787, 2548, 2549, 782, 2076, 805, 2545, 12, 1766, + /* 870 */ 10, 2754, 772, 2636, 2608, 1504, 546, 440, 2632, 745, + /* 880 */ 781, 1803, 801, 2246, 2544, 1885, 1886, 2582, 667, 666, + /* 890 */ 1503, 115, 2546, 787, 2548, 2549, 782, 758, 805, 455, + /* 900 */ 454, 854, 547, 2754, 2207, 2636, 1970, 896, 2563, 440, + /* 910 */ 2632, 34, 801, 2246, 149, 763, 148, 2607, 2511, 2739, + /* 920 */ 2511, 1919, 783, 1857, 1867, 554, 553, 2734, 1508, 1822, + /* 930 */ 1884, 1887, 548, 40, 39, 286, 1765, 46, 44, 43, + /* 940 */ 42, 41, 33, 1507, 1960, 1798, 2738, 1796, 40, 39, + /* 950 */ 2735, 2736, 46, 44, 43, 42, 41, 581, 203, 118, + /* 960 */ 2644, 2645, 2544, 146, 2649, 2582, 458, 457, 279, 385, + /* 970 */ 2546, 787, 2548, 2549, 782, 780, 805, 771, 2601, 1801, + /* 980 */ 1802, 1854, 2075, 1856, 1859, 1860, 1861, 1862, 1863, 1864, + /* 990 */ 1865, 1866, 779, 803, 802, 1877, 1879, 1880, 1881, 1882, + /* 1000 */ 2, 47, 45, 2545, 2074, 463, 1798, 2738, 1796, 444, + /* 1010 */ 583, 1797, 778, 173, 801, 2246, 784, 2651, 2704, 801, + /* 1020 */ 2246, 2248, 801, 2246, 1883, 2222, 1795, 179, 2644, 2645, + /* 1030 */ 466, 146, 2649, 1990, 628, 2511, 2545, 2697, 173, 2243, + /* 1040 */ 1801, 1802, 281, 2646, 2563, 2221, 2248, 1725, 1726, 784, + /* 1050 */ 2452, 728, 190, 774, 1878, 2608, 2511, 2511, 783, 35, + /* 1060 */ 801, 2246, 43, 42, 41, 40, 39, 1803, 2073, 46, + /* 1070 */ 44, 43, 42, 41, 801, 2246, 2366, 2563, 40, 39, + /* 1080 */ 289, 2433, 46, 44, 43, 42, 41, 319, 320, 2511, + /* 1090 */ 1858, 783, 318, 896, 769, 840, 48, 2186, 2544, 96, + /* 1100 */ 2072, 2582, 801, 2246, 305, 115, 2546, 787, 2548, 2549, + /* 1110 */ 782, 2071, 805, 2545, 2070, 801, 2246, 2754, 183, 2636, + /* 1120 */ 2054, 2511, 323, 440, 2632, 2242, 784, 801, 2246, 801, + /* 1130 */ 2246, 2544, 1885, 1886, 2582, 798, 280, 2067, 115, 2546, + /* 1140 */ 787, 2548, 2549, 782, 755, 805, 1999, 799, 1855, 350, + /* 1150 */ 2754, 2066, 2636, 2511, 2563, 832, 440, 2632, 2290, 801, + /* 1160 */ 2246, 2000, 648, 647, 2511, 2299, 2511, 2511, 783, 1394, + /* 1170 */ 1857, 1867, 650, 649, 759, 1821, 2299, 1884, 1887, 467, + /* 1180 */ 796, 838, 163, 162, 835, 834, 833, 160, 14, 13, + /* 1190 */ 2511, 2298, 1798, 836, 1796, 173, 2290, 421, 420, 2065, + /* 1200 */ 475, 2064, 1998, 2249, 2511, 474, 2455, 2063, 2544, 2062, + /* 1210 */ 1826, 2582, 777, 2061, 2060, 180, 2546, 787, 2548, 2549, + /* 1220 */ 782, 837, 805, 2059, 2290, 1822, 1801, 1802, 1854, 696, + /* 1230 */ 1856, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 779, + /* 1240 */ 803, 802, 1877, 1879, 1880, 1881, 1882, 2, 47, 45, + /* 1250 */ 2545, 717, 2511, 172, 2511, 100, 444, 482, 1797, 2734, + /* 1260 */ 2511, 363, 2511, 784, 2276, 2727, 2511, 2511, 77, 419, + /* 1270 */ 418, 1883, 654, 1795, 753, 2755, 2511, 2740, 209, 215, + /* 1280 */ 717, 141, 2735, 752, 2084, 891, 1704, 2344, 2734, 2545, + /* 1290 */ 734, 2563, 751, 87, 656, 1926, 659, 161, 655, 2224, + /* 1300 */ 2734, 1878, 784, 2511, 2668, 783, 2740, 209, 161, 660, + /* 1310 */ 754, 2735, 752, 2129, 1803, 724, 469, 468, 750, 209, + /* 1320 */ 1489, 88, 266, 2735, 752, 264, 1811, 2127, 268, 523, + /* 1330 */ 2563, 267, 154, 1487, 270, 672, 2118, 269, 702, 1883, + /* 1340 */ 896, 1804, 2511, 15, 783, 2544, 2116, 2545, 2582, 674, + /* 1350 */ 2051, 2052, 115, 2546, 787, 2548, 2549, 782, 676, 805, + /* 1360 */ 784, 693, 272, 692, 2754, 271, 2636, 290, 679, 1878, + /* 1370 */ 440, 2632, 1720, 49, 14, 13, 2069, 2532, 1904, 1885, + /* 1380 */ 1886, 297, 1803, 1723, 2544, 161, 2110, 2582, 2563, 717, + /* 1390 */ 1994, 115, 2546, 787, 2548, 2549, 782, 2734, 805, 1806, + /* 1400 */ 2511, 49, 783, 2754, 1805, 2636, 329, 328, 776, 440, + /* 1410 */ 2632, 101, 143, 331, 330, 2740, 209, 1857, 1867, 756, + /* 1420 */ 2735, 752, 764, 193, 1884, 1887, 40, 39, 64, 1827, + /* 1430 */ 46, 44, 43, 42, 41, 2534, 49, 2183, 889, 1798, + /* 1440 */ 2564, 1796, 2544, 2182, 1855, 2582, 333, 332, 2004, 115, + /* 1450 */ 2546, 787, 2548, 2549, 782, 49, 805, 317, 76, 2370, + /* 1460 */ 768, 2611, 159, 2636, 161, 335, 334, 440, 2632, 337, + /* 1470 */ 336, 339, 338, 1801, 1802, 1854, 2003, 1856, 1859, 1860, + /* 1480 */ 1861, 1862, 1863, 1864, 1865, 1866, 779, 803, 802, 1877, + /* 1490 */ 1879, 1880, 1881, 1882, 2, 398, 397, 2545, 295, 341, + /* 1500 */ 340, 343, 342, 1920, 845, 451, 2100, 1812, 73, 1807, + /* 1510 */ 784, 1868, 345, 344, 347, 346, 349, 348, 1883, 846, + /* 1520 */ 460, 809, 2687, 159, 731, 435, 431, 738, 1466, 790, + /* 1530 */ 1673, 473, 321, 793, 161, 2371, 2545, 325, 2563, 1534, + /* 1540 */ 2106, 1815, 1817, 1464, 142, 159, 2287, 710, 1878, 784, + /* 1550 */ 2511, 2688, 783, 2698, 261, 803, 802, 1877, 1879, 1880, + /* 1560 */ 1881, 1882, 746, 747, 302, 307, 2208, 1809, 310, 476, + /* 1570 */ 184, 5, 1808, 481, 411, 489, 490, 2563, 1830, 646, + /* 1580 */ 642, 638, 634, 362, 260, 501, 216, 500, 217, 2511, + /* 1590 */ 503, 783, 2544, 1697, 2545, 2582, 1562, 219, 1566, 115, + /* 1600 */ 2546, 787, 2548, 2549, 782, 357, 805, 784, 1820, 1573, + /* 1610 */ 517, 2609, 1821, 2636, 230, 524, 526, 440, 2632, 1571, + /* 1620 */ 164, 530, 532, 572, 537, 97, 549, 2363, 258, 560, + /* 1630 */ 562, 2544, 568, 571, 2582, 2563, 584, 573, 115, 2546, + /* 1640 */ 787, 2548, 2549, 782, 585, 805, 582, 2511, 235, 783, + /* 1650 */ 773, 236, 2636, 587, 588, 238, 440, 2632, 590, 1828, + /* 1660 */ 607, 4, 592, 608, 615, 767, 616, 1823, 2545, 618, + /* 1670 */ 1829, 1831, 246, 620, 93, 622, 621, 249, 1832, 252, + /* 1680 */ 624, 784, 651, 630, 254, 653, 1788, 117, 1764, 2544, + /* 1690 */ 2379, 94, 2582, 95, 259, 248, 116, 2546, 787, 2548, + /* 1700 */ 2549, 782, 682, 805, 257, 250, 2236, 683, 389, 2563, + /* 1710 */ 2636, 255, 623, 2442, 2635, 2632, 717, 263, 453, 452, + /* 1720 */ 1789, 2511, 2232, 783, 2734, 265, 166, 167, 2234, 2230, + /* 1730 */ 247, 168, 169, 2439, 803, 802, 1877, 1879, 1880, 1881, + /* 1740 */ 1882, 98, 2740, 209, 282, 2545, 695, 2735, 752, 2438, + /* 1750 */ 1824, 705, 704, 709, 287, 712, 735, 791, 784, 8, + /* 1760 */ 711, 721, 744, 2544, 2703, 722, 2582, 697, 358, 2545, + /* 1770 */ 116, 2546, 787, 2548, 2549, 782, 2702, 805, 292, 285, + /* 1780 */ 155, 294, 784, 2425, 2636, 2675, 2563, 296, 775, 2632, + /* 1790 */ 720, 2545, 706, 719, 301, 2733, 749, 748, 2511, 2757, + /* 1800 */ 783, 760, 757, 1825, 784, 436, 147, 1968, 1966, 196, + /* 1810 */ 2563, 312, 61, 359, 2652, 789, 156, 2393, 2392, 360, + /* 1820 */ 2391, 794, 2511, 446, 783, 795, 158, 182, 2617, 2545, + /* 1830 */ 106, 2503, 2563, 2247, 2502, 361, 108, 2498, 2497, 299, + /* 1840 */ 785, 300, 784, 2582, 2511, 298, 783, 116, 2546, 787, + /* 1850 */ 2548, 2549, 782, 2655, 805, 303, 2489, 1, 211, 2488, + /* 1860 */ 352, 2636, 2480, 2479, 2544, 404, 2632, 2582, 2495, 306, + /* 1870 */ 2563, 177, 2546, 787, 2548, 2549, 782, 1369, 805, 890, + /* 1880 */ 2494, 807, 2511, 2486, 783, 2485, 2544, 2474, 2473, 2582, + /* 1890 */ 2492, 2491, 2483, 116, 2546, 787, 2548, 2549, 782, 2482, + /* 1900 */ 805, 893, 2545, 2471, 364, 409, 165, 2636, 895, 388, + /* 1910 */ 376, 366, 2633, 368, 2470, 784, 2468, 2467, 718, 2694, + /* 1920 */ 387, 2291, 2463, 52, 2544, 377, 2462, 2582, 2461, 82, + /* 1930 */ 2456, 177, 2546, 787, 2548, 2549, 782, 478, 805, 479, + /* 1940 */ 1748, 1749, 214, 2563, 410, 483, 2454, 485, 486, 487, + /* 1950 */ 1747, 2453, 412, 2451, 492, 2511, 2450, 783, 494, 2449, + /* 1960 */ 2545, 496, 2448, 1736, 498, 2429, 218, 2428, 220, 1700, + /* 1970 */ 83, 1699, 2406, 784, 2405, 2404, 510, 433, 511, 2695, + /* 1980 */ 2403, 2402, 2353, 2545, 515, 1643, 2350, 518, 2349, 2343, + /* 1990 */ 2340, 521, 522, 223, 2339, 2338, 784, 2544, 2337, 2342, + /* 2000 */ 2582, 2563, 86, 2341, 386, 2546, 787, 2548, 2549, 782, + /* 2010 */ 225, 805, 2336, 2511, 2335, 783, 2333, 2332, 2545, 2331, + /* 2020 */ 227, 538, 2330, 540, 2563, 2328, 2327, 2326, 2325, 2348, + /* 2030 */ 2324, 784, 229, 2311, 2310, 434, 2511, 2323, 783, 2322, + /* 2040 */ 2346, 2329, 2321, 2320, 2319, 2317, 2316, 2315, 2314, 2313, + /* 2050 */ 2312, 92, 2309, 2308, 2307, 2544, 2347, 2345, 2582, 2563, + /* 2060 */ 2306, 2305, 386, 2546, 787, 2548, 2549, 782, 2304, 805, + /* 2070 */ 2303, 2511, 234, 783, 2302, 2301, 575, 1649, 2544, 2300, + /* 2080 */ 577, 2582, 2148, 237, 1505, 379, 2546, 787, 2548, 2549, + /* 2090 */ 782, 1509, 805, 2147, 2146, 2144, 239, 2141, 2140, 2133, + /* 2100 */ 240, 2545, 1501, 593, 597, 2120, 2095, 2094, 400, 401, + /* 2110 */ 601, 2427, 2423, 2544, 781, 594, 2582, 605, 595, 2413, + /* 2120 */ 180, 2546, 787, 2548, 2549, 782, 599, 805, 598, 602, + /* 2130 */ 603, 242, 79, 191, 2531, 1393, 743, 2401, 2545, 244, + /* 2140 */ 201, 613, 2563, 80, 2400, 251, 253, 2377, 2225, 2143, + /* 2150 */ 2139, 784, 631, 256, 2511, 1440, 783, 2137, 633, 632, + /* 2160 */ 635, 636, 637, 2135, 639, 640, 641, 2132, 643, 644, + /* 2170 */ 645, 2115, 2113, 2114, 2112, 2091, 2545, 1578, 1577, 2563, + /* 2180 */ 2756, 2227, 2226, 1491, 1477, 262, 72, 862, 1490, 784, + /* 2190 */ 1488, 2511, 1486, 783, 864, 1485, 2544, 1484, 699, 2582, + /* 2200 */ 2130, 1483, 1482, 385, 2546, 787, 2548, 2549, 782, 424, + /* 2210 */ 805, 2128, 2602, 443, 2545, 1479, 899, 2563, 425, 2119, + /* 2220 */ 1478, 1476, 677, 426, 2117, 427, 680, 784, 2090, 2511, + /* 2230 */ 2089, 783, 356, 2544, 2088, 684, 2582, 688, 119, 686, + /* 2240 */ 386, 2546, 787, 2548, 2549, 782, 2087, 805, 199, 2086, + /* 2250 */ 1730, 445, 2545, 1732, 1729, 2563, 2426, 887, 883, 879, + /* 2260 */ 875, 1710, 353, 2422, 56, 784, 28, 2511, 1706, 783, + /* 2270 */ 284, 2544, 57, 67, 2582, 1708, 1734, 2412, 386, 2546, + /* 2280 */ 787, 2548, 2549, 782, 707, 805, 2399, 2398, 2739, 17, + /* 2290 */ 20, 723, 30, 2563, 2021, 291, 708, 432, 2545, 1995, + /* 2300 */ 1685, 725, 6, 114, 21, 2511, 326, 783, 288, 694, + /* 2310 */ 727, 784, 2582, 1684, 7, 171, 381, 2546, 787, 2548, + /* 2320 */ 2549, 782, 713, 805, 715, 729, 22, 195, 293, 206, + /* 2330 */ 2532, 2002, 181, 194, 31, 32, 207, 1989, 797, 2563, + /* 2340 */ 81, 1963, 208, 1961, 1959, 65, 2041, 2544, 2042, 24, + /* 2350 */ 2582, 2511, 2036, 783, 371, 2546, 787, 2548, 2549, 782, + /* 2360 */ 2035, 805, 437, 2040, 2039, 438, 308, 1943, 59, 1942, + /* 2370 */ 2545, 186, 2397, 2376, 102, 103, 23, 25, 1895, 1894, + /* 2380 */ 13, 1813, 314, 784, 1870, 38, 187, 1869, 197, 313, + /* 2390 */ 16, 26, 1847, 2544, 792, 11, 2582, 2545, 1839, 58, + /* 2400 */ 370, 2546, 787, 2548, 2549, 782, 27, 805, 283, 316, + /* 2410 */ 784, 2563, 198, 1905, 18, 1997, 322, 69, 2375, 786, + /* 2420 */ 105, 104, 109, 2511, 324, 783, 327, 2587, 2545, 1872, + /* 2430 */ 808, 2586, 462, 812, 815, 806, 804, 68, 2563, 1563, + /* 2440 */ 1560, 784, 1559, 810, 818, 813, 821, 816, 824, 1556, + /* 2450 */ 2511, 1550, 783, 819, 822, 351, 1548, 825, 110, 111, + /* 2460 */ 1572, 1568, 1473, 1438, 1470, 2544, 1499, 2545, 2582, 2563, + /* 2470 */ 78, 839, 372, 2546, 787, 2548, 2549, 782, 1469, 805, + /* 2480 */ 784, 2511, 1554, 783, 1553, 1552, 1551, 1468, 1467, 1465, + /* 2490 */ 1463, 1462, 2544, 1461, 1498, 2582, 212, 1459, 1458, 378, + /* 2500 */ 2546, 787, 2548, 2549, 782, 850, 805, 852, 2563, 1457, + /* 2510 */ 1456, 1455, 1454, 1453, 1495, 1493, 1450, 1449, 1446, 1445, + /* 2520 */ 2511, 1444, 783, 2544, 1443, 2138, 2582, 872, 873, 2136, + /* 2530 */ 382, 2546, 787, 2548, 2549, 782, 874, 805, 876, 878, + /* 2540 */ 877, 2134, 2545, 880, 881, 882, 2131, 884, 2111, 885, + /* 2550 */ 886, 888, 1382, 2085, 1370, 784, 892, 355, 894, 2055, + /* 2560 */ 1799, 365, 2544, 897, 2545, 2582, 2055, 898, 2055, 373, + /* 2570 */ 2546, 787, 2548, 2549, 782, 2055, 805, 784, 2055, 2545, + /* 2580 */ 2055, 2055, 2055, 2563, 2055, 2055, 2055, 2055, 2055, 2055, + /* 2590 */ 2055, 2055, 784, 2055, 2055, 2511, 2055, 783, 2055, 2055, + /* 2600 */ 2055, 2055, 2545, 2055, 2055, 2563, 2055, 2055, 2055, 2055, + /* 2610 */ 2055, 2055, 2055, 2055, 2055, 784, 2055, 2511, 2055, 783, + /* 2620 */ 2563, 2055, 2055, 2545, 2055, 2055, 2055, 2055, 2055, 2055, + /* 2630 */ 2055, 2055, 2511, 2055, 783, 2055, 784, 2544, 2055, 2055, + /* 2640 */ 2582, 2055, 2055, 2563, 383, 2546, 787, 2548, 2549, 782, + /* 2650 */ 2055, 805, 2055, 2055, 2055, 2511, 2055, 783, 2055, 2544, + /* 2660 */ 2055, 2055, 2582, 2055, 2563, 2055, 374, 2546, 787, 2548, + /* 2670 */ 2549, 782, 2055, 805, 2544, 2055, 2511, 2582, 783, 2055, + /* 2680 */ 2055, 384, 2546, 787, 2548, 2549, 782, 2055, 805, 2055, + /* 2690 */ 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2544, 2055, 2055, + /* 2700 */ 2582, 2055, 2055, 2055, 375, 2546, 787, 2548, 2549, 782, + /* 2710 */ 2055, 805, 2055, 2055, 2055, 2055, 2055, 2055, 2544, 2055, + /* 2720 */ 2545, 2582, 2055, 2055, 2055, 390, 2546, 787, 2548, 2549, + /* 2730 */ 782, 2055, 805, 784, 2055, 2055, 2545, 2055, 2055, 2055, + /* 2740 */ 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 784, + /* 2750 */ 2055, 2055, 2055, 2055, 2055, 2545, 2055, 2055, 2055, 2055, + /* 2760 */ 2055, 2563, 2055, 2055, 2055, 2055, 2055, 2055, 784, 2055, + /* 2770 */ 2055, 2055, 2055, 2511, 2055, 783, 2055, 2563, 2055, 2055, + /* 2780 */ 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2511, + /* 2790 */ 2055, 783, 2055, 2055, 2545, 2055, 2563, 2055, 2055, 2055, + /* 2800 */ 2055, 2055, 2055, 2055, 2055, 2055, 2055, 784, 2511, 2055, + /* 2810 */ 783, 2055, 2055, 2055, 2055, 2544, 2055, 2055, 2582, 2055, + /* 2820 */ 2055, 2055, 391, 2546, 787, 2548, 2549, 782, 2055, 805, + /* 2830 */ 2055, 2544, 2055, 2545, 2582, 2563, 2055, 2055, 2557, 2546, + /* 2840 */ 787, 2548, 2549, 782, 2055, 805, 784, 2511, 2055, 783, + /* 2850 */ 2544, 2055, 2055, 2582, 2055, 2055, 2055, 2556, 2546, 787, + /* 2860 */ 2548, 2549, 782, 2055, 805, 2545, 2055, 2055, 2055, 2055, + /* 2870 */ 2055, 2055, 2055, 2055, 2563, 2055, 2055, 2055, 784, 2055, + /* 2880 */ 2055, 2055, 2055, 2055, 2055, 2055, 2511, 2055, 783, 2544, + /* 2890 */ 2055, 2055, 2582, 2055, 2055, 2055, 2555, 2546, 787, 2548, + /* 2900 */ 2549, 782, 2055, 805, 2055, 2055, 2563, 2055, 2055, 2055, + /* 2910 */ 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2511, 2055, + /* 2920 */ 783, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2544, 2055, + /* 2930 */ 2055, 2582, 2055, 2055, 2055, 406, 2546, 787, 2548, 2549, + /* 2940 */ 782, 2055, 805, 2545, 2055, 2055, 2055, 2055, 2055, 2055, + /* 2950 */ 2055, 2055, 2055, 2055, 2055, 2055, 784, 2055, 2055, 2055, + /* 2960 */ 2544, 2055, 2055, 2582, 2055, 2055, 2055, 407, 2546, 787, + /* 2970 */ 2548, 2549, 782, 2055, 805, 2055, 2055, 2055, 2055, 2055, + /* 2980 */ 2055, 2545, 2055, 2055, 2563, 2055, 2055, 2055, 2055, 2055, + /* 2990 */ 2055, 2055, 2055, 2055, 784, 2055, 2511, 2055, 783, 2055, + /* 3000 */ 2055, 2055, 2545, 2055, 2055, 2055, 2055, 2055, 2055, 2055, + /* 3010 */ 2055, 2055, 2055, 2055, 2055, 784, 2055, 2545, 2055, 2055, + /* 3020 */ 2055, 2055, 2563, 2055, 2055, 2055, 2055, 2055, 2055, 2055, + /* 3030 */ 784, 2055, 2055, 2055, 2511, 2055, 783, 2055, 2544, 2055, + /* 3040 */ 2055, 2582, 2055, 2563, 2055, 403, 2546, 787, 2548, 2549, + /* 3050 */ 782, 2055, 805, 2055, 2055, 2511, 2055, 783, 2563, 2055, + /* 3060 */ 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, 2055, + /* 3070 */ 2511, 2055, 783, 2055, 2055, 2055, 2544, 2055, 2055, 2582, + /* 3080 */ 2055, 2055, 2055, 408, 2546, 787, 2548, 2549, 782, 2055, + /* 3090 */ 805, 2055, 2055, 2055, 2055, 2055, 2055, 785, 2055, 2055, + /* 3100 */ 2582, 2055, 2055, 2055, 381, 2546, 787, 2548, 2549, 782, + /* 3110 */ 2055, 805, 2544, 2055, 2055, 2582, 2055, 2055, 2055, 380, + /* 3120 */ 2546, 787, 2548, 2549, 782, 2055, 805, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 407, 377, 378, 398, 407, 377, 378, 495, 442, 497, @@ -676,125 +676,125 @@ static const YYCODETYPE yy_lookahead[] = { /* 1350 */ 143, 144, 467, 468, 469, 470, 471, 472, 22, 474, /* 1360 */ 378, 219, 110, 221, 479, 113, 481, 65, 22, 65, /* 1370 */ 485, 486, 108, 33, 1, 2, 366, 49, 237, 143, - /* 1380 */ 144, 510, 78, 108, 460, 33, 496, 463, 406, 493, + /* 1380 */ 144, 510, 78, 108, 460, 33, 0, 463, 406, 493, /* 1390 */ 108, 467, 468, 469, 470, 471, 472, 501, 474, 37, /* 1400 */ 418, 33, 420, 479, 37, 481, 12, 13, 104, 485, - /* 1410 */ 486, 109, 381, 13, 13, 519, 520, 181, 182, 308, - /* 1420 */ 524, 525, 406, 33, 188, 189, 8, 9, 33, 239, - /* 1430 */ 12, 13, 14, 15, 16, 107, 33, 37, 37, 203, - /* 1440 */ 33, 205, 460, 394, 239, 463, 394, 376, 108, 467, + /* 1410 */ 486, 109, 381, 12, 13, 519, 520, 181, 182, 308, + /* 1420 */ 524, 525, 496, 33, 188, 189, 8, 9, 33, 239, + /* 1430 */ 12, 13, 14, 15, 16, 107, 33, 394, 52, 203, + /* 1440 */ 406, 205, 460, 394, 239, 463, 12, 13, 108, 467, /* 1450 */ 468, 469, 470, 471, 472, 33, 474, 33, 33, 431, - /* 1460 */ 108, 479, 33, 481, 33, 33, 431, 485, 486, 33, - /* 1470 */ 33, 0, 516, 237, 238, 239, 108, 241, 242, 243, + /* 1460 */ 108, 479, 33, 481, 33, 12, 13, 485, 486, 12, + /* 1470 */ 13, 12, 13, 237, 238, 239, 108, 241, 242, 243, /* 1480 */ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - /* 1490 */ 254, 255, 256, 257, 258, 12, 13, 365, 108, 33, - /* 1500 */ 516, 33, 516, 108, 441, 22, 516, 203, 381, 205, - /* 1510 */ 378, 108, 431, 378, 417, 108, 449, 431, 35, 431, - /* 1520 */ 37, 500, 500, 52, 521, 487, 503, 396, 287, 51, - /* 1530 */ 108, 462, 108, 108, 443, 42, 365, 108, 406, 108, - /* 1540 */ 108, 237, 238, 461, 108, 108, 20, 454, 65, 378, - /* 1550 */ 418, 218, 420, 459, 35, 251, 252, 253, 254, 255, - /* 1560 */ 256, 257, 386, 454, 386, 201, 445, 205, 20, 377, - /* 1570 */ 51, 20, 205, 378, 108, 45, 108, 406, 378, 60, - /* 1580 */ 61, 62, 63, 427, 65, 180, 427, 424, 377, 418, - /* 1590 */ 377, 420, 460, 378, 365, 463, 427, 424, 424, 467, - /* 1600 */ 468, 469, 470, 471, 472, 424, 474, 378, 105, 390, - /* 1610 */ 103, 479, 377, 481, 389, 102, 388, 485, 486, 377, - /* 1620 */ 377, 377, 20, 370, 50, 106, 370, 20, 109, 374, - /* 1630 */ 420, 460, 374, 454, 463, 406, 386, 386, 467, 468, - /* 1640 */ 469, 470, 471, 472, 20, 474, 386, 418, 379, 420, - /* 1650 */ 479, 20, 481, 444, 386, 379, 485, 486, 386, 20, - /* 1660 */ 434, 377, 370, 386, 386, 442, 386, 406, 365, 406, - /* 1670 */ 377, 406, 406, 406, 368, 368, 406, 406, 370, 406, - /* 1680 */ 406, 378, 222, 107, 454, 406, 203, 406, 205, 460, - /* 1690 */ 458, 20, 463, 456, 384, 176, 467, 468, 469, 470, - /* 1700 */ 471, 472, 453, 474, 185, 186, 418, 418, 418, 406, - /* 1710 */ 481, 192, 193, 209, 485, 486, 493, 208, 235, 236, - /* 1720 */ 237, 418, 384, 420, 501, 420, 377, 418, 443, 295, - /* 1730 */ 211, 509, 294, 436, 251, 252, 253, 254, 255, 256, - /* 1740 */ 257, 450, 519, 520, 303, 365, 451, 524, 525, 509, - /* 1750 */ 436, 512, 194, 305, 304, 509, 511, 288, 378, 443, - /* 1760 */ 283, 499, 508, 460, 507, 506, 463, 282, 312, 365, - /* 1770 */ 467, 468, 469, 470, 471, 472, 529, 474, 20, 309, - /* 1780 */ 307, 466, 378, 117, 481, 285, 406, 378, 485, 486, - /* 1790 */ 379, 365, 498, 107, 384, 484, 384, 436, 418, 418, - /* 1800 */ 420, 418, 502, 418, 378, 504, 418, 436, 186, 523, - /* 1810 */ 406, 418, 384, 378, 432, 402, 418, 384, 107, 377, - /* 1820 */ 522, 22, 418, 384, 420, 410, 418, 38, 367, 365, - /* 1830 */ 371, 455, 406, 370, 418, 446, 437, 385, 363, 437, - /* 1840 */ 460, 0, 378, 463, 418, 400, 420, 467, 468, 469, - /* 1850 */ 470, 471, 472, 400, 474, 400, 0, 0, 45, 0, - /* 1860 */ 37, 481, 228, 37, 460, 485, 486, 463, 37, 37, - /* 1870 */ 406, 467, 468, 469, 470, 471, 472, 228, 474, 0, - /* 1880 */ 37, 37, 418, 228, 420, 37, 460, 228, 0, 463, - /* 1890 */ 0, 37, 0, 467, 468, 469, 470, 471, 472, 37, - /* 1900 */ 474, 0, 365, 22, 0, 37, 223, 481, 0, 211, - /* 1910 */ 0, 211, 486, 212, 205, 378, 203, 0, 514, 515, - /* 1920 */ 0, 0, 199, 198, 460, 0, 0, 463, 148, 49, - /* 1930 */ 0, 467, 468, 469, 470, 471, 472, 37, 474, 0, - /* 1940 */ 49, 0, 37, 406, 51, 0, 49, 0, 45, 0, - /* 1950 */ 0, 0, 0, 0, 0, 418, 49, 420, 0, 0, - /* 1960 */ 365, 0, 166, 0, 37, 0, 166, 0, 0, 0, - /* 1970 */ 0, 0, 0, 378, 0, 0, 0, 440, 0, 515, - /* 1980 */ 0, 0, 0, 365, 0, 0, 0, 0, 0, 49, - /* 1990 */ 0, 45, 0, 0, 0, 0, 378, 460, 0, 0, - /* 2000 */ 463, 406, 0, 0, 467, 468, 469, 470, 471, 472, - /* 2010 */ 0, 474, 148, 418, 0, 420, 147, 0, 365, 22, - /* 2020 */ 146, 0, 0, 22, 406, 0, 22, 50, 37, 50, - /* 2030 */ 0, 378, 14, 194, 0, 440, 418, 0, 420, 0, - /* 2040 */ 0, 0, 0, 37, 0, 37, 0, 0, 65, 42, - /* 2050 */ 37, 51, 0, 42, 65, 460, 33, 42, 463, 406, - /* 2060 */ 51, 65, 467, 468, 469, 470, 471, 472, 37, 474, - /* 2070 */ 51, 418, 45, 420, 0, 49, 0, 49, 460, 43, - /* 2080 */ 42, 463, 49, 0, 49, 467, 468, 469, 470, 471, - /* 2090 */ 472, 42, 474, 42, 0, 0, 72, 0, 0, 37, - /* 2100 */ 42, 365, 37, 42, 51, 0, 51, 0, 37, 42, - /* 2110 */ 51, 0, 37, 460, 378, 51, 463, 0, 0, 42, - /* 2120 */ 467, 468, 469, 470, 471, 472, 0, 474, 0, 0, - /* 2130 */ 0, 115, 22, 113, 0, 0, 518, 37, 365, 53, - /* 2140 */ 37, 37, 406, 37, 0, 37, 37, 33, 0, 37, - /* 2150 */ 37, 378, 37, 33, 418, 22, 420, 0, 37, 37, - /* 2160 */ 37, 22, 22, 22, 22, 0, 0, 0, 37, 37, - /* 2170 */ 0, 0, 22, 37, 20, 37, 365, 108, 0, 406, - /* 2180 */ 527, 0, 37, 37, 37, 107, 107, 0, 0, 378, - /* 2190 */ 22, 418, 49, 420, 22, 183, 460, 3, 1, 463, - /* 2200 */ 0, 289, 33, 467, 468, 469, 470, 471, 472, 108, - /* 2210 */ 474, 37, 476, 440, 365, 78, 19, 406, 33, 37, - /* 2220 */ 289, 3, 33, 107, 105, 50, 183, 378, 183, 418, - /* 2230 */ 50, 420, 35, 460, 107, 33, 463, 183, 33, 210, - /* 2240 */ 467, 468, 469, 470, 471, 472, 186, 474, 51, 33, - /* 2250 */ 49, 440, 365, 183, 206, 406, 190, 60, 61, 62, - /* 2260 */ 63, 108, 65, 190, 103, 378, 107, 418, 108, 420, - /* 2270 */ 108, 460, 108, 49, 463, 37, 33, 37, 467, 468, - /* 2280 */ 469, 470, 471, 472, 108, 474, 107, 37, 37, 37, - /* 2290 */ 107, 107, 37, 406, 108, 49, 37, 107, 365, 107, - /* 2300 */ 33, 108, 49, 106, 108, 418, 109, 420, 0, 460, - /* 2310 */ 0, 378, 463, 42, 108, 107, 467, 468, 469, 470, - /* 2320 */ 471, 472, 33, 474, 105, 105, 2, 22, 260, 237, - /* 2330 */ 273, 108, 107, 49, 108, 107, 107, 49, 141, 406, - /* 2340 */ 108, 22, 107, 187, 108, 289, 107, 460, 0, 108, - /* 2350 */ 463, 418, 107, 420, 467, 468, 469, 470, 471, 472, - /* 2360 */ 42, 474, 49, 107, 240, 116, 37, 107, 107, 107, - /* 2370 */ 365, 108, 107, 107, 117, 37, 185, 108, 108, 107, - /* 2380 */ 37, 107, 185, 378, 108, 107, 37, 108, 37, 192, - /* 2390 */ 107, 37, 107, 460, 108, 108, 463, 365, 37, 107, - /* 2400 */ 467, 468, 469, 470, 471, 472, 107, 474, 211, 128, - /* 2410 */ 378, 406, 33, 107, 37, 22, 107, 72, 128, 128, - /* 2420 */ 37, 128, 37, 418, 71, 420, 37, 101, 365, 37, - /* 2430 */ 78, 37, 37, 37, 37, 37, 78, 101, 406, 33, - /* 2440 */ 37, 378, 37, 22, 37, 37, 37, 37, 78, 37, - /* 2450 */ 418, 37, 420, 37, 37, 37, 22, 37, 0, 37, - /* 2460 */ 0, 42, 51, 37, 51, 460, 42, 365, 463, 406, - /* 2470 */ 0, 0, 467, 468, 469, 470, 471, 472, 37, 474, - /* 2480 */ 378, 418, 51, 420, 42, 37, 51, 42, 0, 37, - /* 2490 */ 37, 0, 460, 20, 22, 463, 33, 22, 21, 467, - /* 2500 */ 468, 469, 470, 471, 472, 22, 474, 22, 406, 530, - /* 2510 */ 21, 530, 530, 530, 530, 530, 530, 530, 530, 530, - /* 2520 */ 418, 530, 420, 460, 530, 530, 463, 530, 530, 530, - /* 2530 */ 467, 468, 469, 470, 471, 472, 530, 474, 530, 530, - /* 2540 */ 530, 530, 365, 530, 530, 530, 530, 530, 530, 530, - /* 2550 */ 530, 530, 530, 530, 530, 378, 530, 530, 530, 530, - /* 2560 */ 530, 530, 460, 530, 365, 463, 530, 530, 530, 467, + /* 1490 */ 254, 255, 256, 257, 258, 12, 13, 365, 108, 12, + /* 1500 */ 13, 12, 13, 108, 13, 22, 376, 203, 33, 205, + /* 1510 */ 378, 108, 12, 13, 12, 13, 12, 13, 35, 13, + /* 1520 */ 37, 33, 431, 33, 516, 516, 441, 516, 37, 516, + /* 1530 */ 108, 381, 108, 108, 33, 431, 365, 108, 406, 108, + /* 1540 */ 378, 237, 238, 37, 33, 33, 417, 449, 65, 378, + /* 1550 */ 418, 431, 420, 431, 35, 251, 252, 253, 254, 255, + /* 1560 */ 256, 257, 500, 500, 487, 521, 396, 205, 503, 443, + /* 1570 */ 51, 287, 205, 51, 462, 42, 461, 406, 20, 60, + /* 1580 */ 61, 62, 63, 108, 65, 454, 459, 218, 386, 418, + /* 1590 */ 454, 420, 460, 201, 365, 463, 108, 386, 108, 467, + /* 1600 */ 468, 469, 470, 471, 472, 445, 474, 378, 20, 108, + /* 1610 */ 377, 479, 20, 481, 45, 378, 427, 485, 486, 108, + /* 1620 */ 108, 378, 427, 180, 424, 106, 377, 377, 109, 378, + /* 1630 */ 427, 460, 424, 424, 463, 406, 105, 424, 467, 468, + /* 1640 */ 469, 470, 471, 472, 390, 474, 103, 418, 389, 420, + /* 1650 */ 479, 377, 481, 102, 388, 377, 485, 486, 377, 20, + /* 1660 */ 370, 50, 377, 374, 370, 442, 374, 20, 365, 454, + /* 1670 */ 20, 20, 386, 420, 386, 444, 379, 386, 20, 386, + /* 1680 */ 379, 378, 370, 377, 386, 406, 203, 377, 205, 460, + /* 1690 */ 434, 386, 463, 386, 386, 176, 467, 468, 469, 470, + /* 1700 */ 471, 472, 368, 474, 185, 186, 406, 368, 370, 406, + /* 1710 */ 481, 192, 193, 418, 485, 486, 493, 406, 235, 236, + /* 1720 */ 237, 418, 406, 420, 501, 406, 406, 406, 406, 406, + /* 1730 */ 211, 406, 406, 418, 251, 252, 253, 254, 255, 256, + /* 1740 */ 257, 107, 519, 520, 384, 365, 222, 524, 525, 418, + /* 1750 */ 20, 209, 208, 420, 384, 377, 295, 294, 378, 303, + /* 1760 */ 443, 418, 194, 460, 509, 305, 463, 458, 454, 365, + /* 1770 */ 467, 468, 469, 470, 471, 472, 509, 474, 436, 450, + /* 1780 */ 456, 436, 378, 453, 481, 512, 406, 511, 485, 486, + /* 1790 */ 304, 365, 451, 288, 443, 523, 283, 282, 418, 529, + /* 1800 */ 420, 309, 307, 20, 378, 312, 378, 117, 285, 379, + /* 1810 */ 406, 384, 107, 436, 466, 418, 384, 418, 418, 436, + /* 1820 */ 418, 186, 418, 418, 420, 432, 384, 509, 484, 365, + /* 1830 */ 384, 418, 406, 378, 418, 402, 107, 418, 418, 507, + /* 1840 */ 460, 506, 378, 463, 418, 508, 420, 467, 468, 469, + /* 1850 */ 470, 471, 472, 499, 474, 498, 418, 504, 502, 418, + /* 1860 */ 384, 481, 418, 418, 460, 485, 486, 463, 418, 522, + /* 1870 */ 406, 467, 468, 469, 470, 471, 472, 22, 474, 38, + /* 1880 */ 418, 410, 418, 418, 420, 418, 460, 418, 418, 463, + /* 1890 */ 418, 418, 418, 467, 468, 469, 470, 471, 472, 418, + /* 1900 */ 474, 367, 365, 418, 377, 437, 371, 481, 370, 455, + /* 1910 */ 400, 385, 486, 363, 418, 378, 418, 418, 514, 515, + /* 1920 */ 400, 418, 0, 446, 460, 400, 0, 463, 0, 45, + /* 1930 */ 0, 467, 468, 469, 470, 471, 472, 37, 474, 228, + /* 1940 */ 37, 37, 37, 406, 437, 228, 0, 37, 37, 228, + /* 1950 */ 37, 0, 228, 0, 37, 418, 0, 420, 37, 0, + /* 1960 */ 365, 22, 0, 223, 37, 0, 211, 0, 211, 205, + /* 1970 */ 212, 203, 0, 378, 0, 0, 199, 440, 198, 515, + /* 1980 */ 0, 0, 148, 365, 49, 49, 0, 37, 0, 0, + /* 1990 */ 0, 37, 51, 49, 0, 0, 378, 460, 0, 0, + /* 2000 */ 463, 406, 45, 0, 467, 468, 469, 470, 471, 472, + /* 2010 */ 49, 474, 0, 418, 0, 420, 0, 0, 365, 0, + /* 2020 */ 166, 37, 0, 166, 406, 0, 0, 0, 0, 0, + /* 2030 */ 0, 378, 49, 0, 0, 440, 418, 0, 420, 0, + /* 2040 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 2050 */ 0, 45, 0, 0, 0, 460, 0, 0, 463, 406, + /* 2060 */ 0, 0, 467, 468, 469, 470, 471, 472, 0, 474, + /* 2070 */ 0, 418, 148, 420, 0, 0, 147, 22, 460, 0, + /* 2080 */ 146, 463, 0, 65, 22, 467, 468, 469, 470, 471, + /* 2090 */ 472, 22, 474, 0, 0, 0, 65, 0, 0, 0, + /* 2100 */ 65, 365, 37, 37, 37, 0, 0, 0, 50, 50, + /* 2110 */ 37, 0, 0, 460, 378, 51, 463, 37, 42, 0, + /* 2120 */ 467, 468, 469, 470, 471, 472, 42, 474, 51, 51, + /* 2130 */ 42, 45, 42, 33, 49, 14, 518, 0, 365, 43, + /* 2140 */ 49, 49, 406, 42, 0, 42, 194, 0, 0, 0, + /* 2150 */ 0, 378, 37, 49, 418, 72, 420, 0, 42, 51, + /* 2160 */ 37, 51, 42, 0, 37, 51, 42, 0, 37, 51, + /* 2170 */ 42, 0, 0, 0, 0, 0, 365, 37, 22, 406, + /* 2180 */ 527, 0, 0, 37, 22, 113, 115, 33, 37, 378, + /* 2190 */ 37, 418, 37, 420, 33, 37, 460, 37, 1, 463, + /* 2200 */ 0, 37, 37, 467, 468, 469, 470, 471, 472, 22, + /* 2210 */ 474, 0, 476, 440, 365, 37, 19, 406, 22, 0, + /* 2220 */ 37, 37, 53, 22, 0, 22, 37, 378, 0, 418, + /* 2230 */ 0, 420, 35, 460, 0, 37, 463, 22, 20, 37, + /* 2240 */ 467, 468, 469, 470, 471, 472, 0, 474, 51, 0, + /* 2250 */ 37, 440, 365, 37, 37, 406, 0, 60, 61, 62, + /* 2260 */ 63, 210, 65, 0, 183, 378, 107, 418, 37, 420, + /* 2270 */ 49, 460, 183, 107, 463, 22, 108, 0, 467, 468, + /* 2280 */ 469, 470, 471, 472, 22, 474, 0, 0, 3, 289, + /* 2290 */ 33, 37, 107, 406, 108, 107, 183, 37, 365, 108, + /* 2300 */ 183, 107, 50, 106, 33, 418, 109, 420, 186, 460, + /* 2310 */ 105, 378, 463, 183, 50, 206, 467, 468, 469, 470, + /* 2320 */ 471, 472, 190, 474, 190, 103, 33, 33, 108, 49, + /* 2330 */ 49, 108, 107, 107, 107, 33, 33, 108, 141, 406, + /* 2340 */ 107, 37, 107, 78, 108, 3, 108, 460, 108, 33, + /* 2350 */ 463, 418, 37, 420, 467, 468, 469, 470, 471, 472, + /* 2360 */ 37, 474, 37, 37, 37, 37, 49, 108, 33, 108, + /* 2370 */ 365, 49, 0, 0, 107, 42, 289, 33, 105, 105, + /* 2380 */ 2, 22, 185, 378, 108, 107, 49, 108, 49, 192, + /* 2390 */ 107, 107, 22, 460, 187, 260, 463, 365, 108, 273, + /* 2400 */ 467, 468, 469, 470, 471, 472, 107, 474, 211, 108, + /* 2410 */ 378, 406, 107, 237, 289, 108, 107, 107, 0, 240, + /* 2420 */ 107, 42, 116, 418, 185, 420, 49, 107, 365, 108, + /* 2430 */ 37, 107, 37, 37, 37, 117, 107, 107, 406, 108, + /* 2440 */ 108, 378, 108, 107, 37, 107, 37, 107, 37, 108, + /* 2450 */ 418, 108, 420, 107, 107, 33, 108, 107, 107, 107, + /* 2460 */ 37, 22, 37, 72, 37, 460, 78, 365, 463, 406, + /* 2470 */ 107, 71, 467, 468, 469, 470, 471, 472, 37, 474, + /* 2480 */ 378, 418, 128, 420, 128, 128, 128, 37, 37, 37, + /* 2490 */ 37, 37, 460, 37, 78, 463, 33, 37, 37, 467, + /* 2500 */ 468, 469, 470, 471, 472, 101, 474, 101, 406, 37, + /* 2510 */ 22, 37, 37, 37, 78, 37, 37, 37, 37, 37, + /* 2520 */ 418, 22, 420, 460, 37, 0, 463, 37, 51, 0, + /* 2530 */ 467, 468, 469, 470, 471, 472, 42, 474, 37, 42, + /* 2540 */ 51, 0, 365, 37, 51, 42, 0, 37, 0, 51, + /* 2550 */ 42, 37, 37, 0, 22, 378, 33, 22, 21, 530, + /* 2560 */ 22, 22, 460, 21, 365, 463, 530, 20, 530, 467, /* 2570 */ 468, 469, 470, 471, 472, 530, 474, 378, 530, 365, /* 2580 */ 530, 530, 530, 406, 530, 530, 530, 530, 530, 530, /* 2590 */ 530, 530, 378, 530, 530, 418, 530, 420, 530, 530, @@ -888,9 +888,9 @@ static const YYCODETYPE yy_lookahead[] = { /* 3470 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, /* 3480 */ 362, 362, 362, 362, 362, 362, 362, 362, 362, }; -#define YY_SHIFT_COUNT (869) +#define YY_SHIFT_COUNT (899) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2491) +#define YY_SHIFT_MAX (2553) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 496, 0, 247, 0, 495, 495, 495, 495, 495, 495, /* 10 */ 495, 495, 495, 495, 495, 495, 742, 989, 989, 1236, @@ -913,74 +913,77 @@ static const unsigned short int yy_shift_ofst[] = { /* 180 */ 15, 485, 219, 435, 42, 379, 148, 194, 344, 344, /* 190 */ 387, 753, 521, 1124, 1124, 1124, 628, 909, 1124, 152, /* 200 */ 1190, 1155, 415, 1079, 1190, 1190, 1205, 866, 866, 1004, - /* 210 */ 350, 620, 621, 1241, 1478, 1493, 1526, 1333, 116, 1526, - /* 220 */ 116, 1364, 1548, 1551, 1530, 1551, 1530, 1405, 1548, 1551, - /* 230 */ 1548, 1530, 1405, 1405, 1405, 1503, 1507, 1548, 1513, 1548, - /* 240 */ 1548, 1548, 1602, 1574, 1602, 1574, 1526, 116, 116, 1607, - /* 250 */ 116, 1624, 1631, 116, 1624, 116, 1639, 116, 116, 1548, - /* 260 */ 116, 1602, 14, 14, 14, 14, 14, 14, 14, 14, - /* 270 */ 14, 14, 14, 1548, 428, 428, 1602, 143, 143, 143, - /* 280 */ 1460, 1576, 1526, 170, 1671, 1504, 1509, 1607, 170, 1241, - /* 290 */ 1548, 143, 1434, 1438, 1434, 1438, 1441, 1558, 1434, 1448, - /* 300 */ 1450, 1469, 1241, 1477, 1485, 1456, 1470, 1473, 1551, 1758, - /* 310 */ 1666, 1500, 1624, 170, 170, 1686, 1438, 143, 143, 143, - /* 320 */ 143, 1438, 143, 1622, 170, 153, 170, 1551, 143, 143, - /* 330 */ 1711, 143, 1548, 170, 1799, 1789, 1602, 3127, 3127, 3127, - /* 340 */ 3127, 3127, 3127, 3127, 3127, 3127, 36, 1519, 561, 660, - /* 350 */ 445, 32, 925, 940, 1057, 1070, 386, 1045, 1418, 1418, - /* 360 */ 1418, 1418, 1418, 1418, 1418, 1418, 1418, 506, 579, 154, - /* 370 */ 467, 467, 70, 49, 520, 513, 745, 664, 731, 765, - /* 380 */ 853, 906, 831, 1048, 1187, 649, 1048, 1048, 1048, 950, - /* 390 */ 950, 1206, 1050, 698, 1287, 1248, 1151, 1299, 1212, 1218, - /* 400 */ 1224, 1252, 1283, 1296, 1313, 1327, 1336, 1346, 1142, 1264, - /* 410 */ 1275, 1302, 1282, 1340, 1368, 1390, 1207, 1111, 864, 1352, - /* 420 */ 1373, 1395, 1141, 1403, 1328, 1422, 1424, 1425, 1429, 1431, - /* 430 */ 1394, 1407, 1432, 1436, 1437, 1466, 1468, 234, 1362, 1367, - /* 440 */ 1400, 1401, 630, 1471, 1841, 1856, 1857, 1813, 1859, 1823, - /* 450 */ 1634, 1826, 1831, 1832, 1649, 1879, 1843, 1844, 1655, 1848, - /* 460 */ 1890, 1659, 1888, 1854, 1892, 1862, 1901, 1881, 1904, 1868, - /* 470 */ 1683, 1908, 1698, 1910, 1700, 1701, 1709, 1713, 1917, 1920, - /* 480 */ 1921, 1723, 1725, 1925, 1926, 1780, 1880, 1891, 1930, 1900, - /* 490 */ 1939, 1941, 1905, 1893, 1945, 1897, 1947, 1903, 1949, 1950, - /* 500 */ 1951, 1907, 1952, 1953, 1954, 1958, 1959, 1961, 1796, 1927, - /* 510 */ 1963, 1800, 1965, 1967, 1968, 1969, 1970, 1971, 1972, 1974, - /* 520 */ 1975, 1976, 1978, 1980, 1981, 1982, 1984, 1985, 1986, 1987, - /* 530 */ 1988, 1940, 1990, 1946, 1992, 1993, 1994, 1995, 1998, 1999, - /* 540 */ 2002, 2003, 1997, 2010, 1864, 2014, 1869, 2017, 1874, 2021, - /* 550 */ 2022, 2001, 1977, 2004, 1979, 2025, 1983, 1991, 2030, 1989, - /* 560 */ 2037, 1996, 2039, 2040, 2006, 2000, 2007, 2041, 2008, 2009, - /* 570 */ 2011, 2042, 2013, 2019, 2015, 2044, 2031, 2046, 2027, 2038, - /* 580 */ 2023, 2026, 2028, 2018, 2033, 2047, 2036, 2049, 2052, 2074, - /* 590 */ 2076, 2083, 2051, 1839, 2034, 2026, 2035, 2094, 2095, 2024, - /* 600 */ 2097, 2098, 2062, 2053, 2058, 2105, 2065, 2055, 2061, 2107, - /* 610 */ 2071, 2059, 2067, 2111, 2075, 2064, 2077, 2117, 2118, 2126, - /* 620 */ 2128, 2129, 2130, 2016, 2020, 2100, 2110, 2134, 2103, 2104, - /* 630 */ 2106, 2108, 2109, 2112, 2113, 2115, 2114, 2120, 2121, 2122, - /* 640 */ 2133, 2123, 2135, 2139, 2144, 2141, 2148, 2142, 2086, 2157, - /* 650 */ 2140, 2131, 2165, 2166, 2167, 2132, 2170, 2136, 2171, 2150, - /* 660 */ 2154, 2138, 2145, 2146, 2069, 2078, 2178, 2012, 2079, 2029, - /* 670 */ 2026, 2143, 2181, 2043, 2147, 2168, 2187, 2048, 2172, 2045, - /* 680 */ 2060, 2188, 2200, 2054, 2066, 2070, 2073, 2194, 2169, 1912, - /* 690 */ 2116, 2101, 2127, 2153, 2174, 2182, 2159, 2175, 2119, 2180, - /* 700 */ 2161, 2160, 2185, 2189, 2162, 2179, 2183, 2184, 2164, 2202, - /* 710 */ 2201, 2224, 2190, 2205, 1931, 2137, 2176, 2216, 2192, 2238, - /* 720 */ 2186, 2193, 2218, 2243, 2056, 2240, 2250, 2251, 2252, 2255, - /* 730 */ 2259, 2196, 2206, 2246, 2057, 2267, 2253, 2308, 2310, 2208, - /* 740 */ 2271, 2289, 2219, 2068, 2220, 2324, 2305, 2092, 2223, 2225, - /* 750 */ 2226, 2284, 2228, 2229, 2288, 2232, 2319, 2124, 2235, 2236, - /* 760 */ 2241, 2239, 2245, 2156, 2256, 2348, 2318, 2191, 2260, 2249, - /* 770 */ 2026, 2313, 2261, 2262, 2263, 2265, 2266, 2257, 2269, 2329, - /* 780 */ 2338, 2272, 2270, 2343, 2274, 2276, 2349, 2278, 2279, 2351, - /* 790 */ 2283, 2286, 2354, 2285, 2287, 2361, 2292, 2281, 2290, 2291, - /* 800 */ 2293, 2299, 2379, 2306, 2377, 2309, 2379, 2379, 2393, 2345, - /* 810 */ 2353, 2383, 2385, 2389, 2392, 2394, 2395, 2396, 2397, 2398, - /* 820 */ 2352, 2326, 2358, 2336, 2406, 2403, 2405, 2407, 2421, 2408, - /* 830 */ 2409, 2410, 2370, 2114, 2412, 2120, 2414, 2416, 2417, 2418, - /* 840 */ 2434, 2420, 2458, 2422, 2411, 2419, 2460, 2426, 2413, 2424, - /* 850 */ 2470, 2441, 2431, 2442, 2471, 2448, 2435, 2445, 2488, 2452, - /* 860 */ 2453, 2491, 2472, 2463, 2475, 2477, 2483, 2485, 2489, 2473, + /* 210 */ 350, 620, 621, 1284, 1522, 1533, 1558, 1369, 116, 1558, + /* 220 */ 116, 1392, 1588, 1592, 1569, 1592, 1569, 1443, 1588, 1592, + /* 230 */ 1588, 1569, 1443, 1443, 1443, 1531, 1543, 1588, 1551, 1588, + /* 240 */ 1588, 1588, 1639, 1611, 1639, 1611, 1558, 116, 116, 1647, + /* 250 */ 116, 1650, 1651, 116, 1650, 116, 1658, 116, 116, 1588, + /* 260 */ 116, 1639, 14, 14, 14, 14, 14, 14, 14, 14, + /* 270 */ 14, 14, 14, 1588, 428, 428, 1639, 143, 143, 143, + /* 280 */ 1524, 1634, 1558, 170, 1730, 1542, 1544, 1647, 170, 1284, + /* 290 */ 1588, 143, 1461, 1463, 1461, 1463, 1456, 1568, 1461, 1460, + /* 300 */ 1486, 1505, 1284, 1513, 1515, 1493, 1492, 1495, 1592, 1783, + /* 310 */ 1690, 1523, 1650, 170, 170, 1705, 1463, 143, 143, 143, + /* 320 */ 143, 1463, 143, 1635, 170, 153, 170, 1592, 143, 143, + /* 330 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + /* 340 */ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, + /* 350 */ 1729, 143, 1588, 170, 1855, 1841, 1639, 3127, 3127, 3127, + /* 360 */ 3127, 3127, 3127, 3127, 3127, 3127, 36, 1519, 561, 660, + /* 370 */ 445, 32, 925, 940, 1057, 1070, 386, 1045, 1418, 1418, + /* 380 */ 1418, 1418, 1418, 1418, 1418, 1418, 1418, 506, 579, 154, + /* 390 */ 467, 467, 70, 49, 520, 513, 745, 664, 731, 765, + /* 400 */ 853, 906, 831, 1048, 1187, 649, 1048, 1048, 1048, 950, + /* 410 */ 950, 1206, 1050, 698, 1287, 1248, 1151, 1299, 1212, 1218, + /* 420 */ 1224, 1252, 1283, 1296, 1313, 1327, 1336, 1346, 1142, 1264, + /* 430 */ 1275, 1302, 1282, 1340, 1368, 1390, 1207, 1111, 864, 1352, + /* 440 */ 1373, 1395, 1141, 1403, 1328, 1422, 1424, 1425, 1429, 1431, + /* 450 */ 1394, 1401, 1434, 1453, 1457, 1459, 1487, 1489, 1500, 1502, + /* 460 */ 1504, 1475, 1488, 1490, 1501, 1511, 1512, 234, 1362, 1367, + /* 470 */ 1491, 1506, 630, 1386, 1922, 1926, 1928, 1884, 1930, 1900, + /* 480 */ 1711, 1903, 1904, 1905, 1717, 1946, 1910, 1911, 1721, 1913, + /* 490 */ 1951, 1724, 1953, 1917, 1956, 1921, 1959, 1939, 1962, 1927, + /* 500 */ 1740, 1965, 1755, 1967, 1757, 1758, 1764, 1768, 1972, 1974, + /* 510 */ 1975, 1777, 1780, 1980, 1981, 1834, 1935, 1936, 1986, 1950, + /* 520 */ 1988, 1989, 1954, 1941, 1990, 1944, 1994, 1957, 1995, 1998, + /* 530 */ 1999, 1961, 2003, 2012, 2014, 2016, 2017, 2019, 1854, 1984, + /* 540 */ 2022, 1857, 2025, 2026, 2027, 2028, 2029, 2030, 2037, 2039, + /* 550 */ 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, + /* 560 */ 2050, 1983, 2033, 2006, 2034, 2052, 2053, 2054, 2056, 2057, + /* 570 */ 2060, 2061, 2055, 2068, 1924, 2070, 1929, 2074, 1934, 2075, + /* 580 */ 2079, 2062, 2058, 2069, 2059, 2082, 2018, 2065, 2093, 2031, + /* 590 */ 2094, 2035, 2095, 2097, 2066, 2064, 2076, 2098, 2067, 2077, + /* 600 */ 2084, 2099, 2073, 2078, 2088, 2105, 2080, 2106, 2086, 2090, + /* 610 */ 2100, 2085, 2091, 2121, 2092, 2107, 2096, 2101, 2111, 2112, + /* 620 */ 2119, 2137, 2103, 1952, 2144, 2085, 2104, 2147, 2148, 2083, + /* 630 */ 2149, 2150, 2115, 2108, 2116, 2157, 2123, 2110, 2120, 2163, + /* 640 */ 2127, 2114, 2124, 2167, 2131, 2118, 2128, 2171, 2172, 2173, + /* 650 */ 2174, 2175, 2181, 2071, 2072, 2140, 2156, 2182, 2146, 2151, + /* 660 */ 2153, 2155, 2158, 2160, 2164, 2165, 2154, 2161, 2178, 2183, + /* 670 */ 2162, 2184, 2200, 2187, 2211, 2196, 2219, 2201, 2169, 2224, + /* 680 */ 2203, 2189, 2228, 2230, 2234, 2198, 2246, 2202, 2249, 2215, + /* 690 */ 2218, 2213, 2216, 2217, 2168, 2159, 2256, 2081, 2166, 2051, + /* 700 */ 2085, 2221, 2263, 2089, 2231, 2253, 2277, 2109, 2262, 2113, + /* 710 */ 2122, 2286, 2287, 2117, 2132, 2130, 2134, 2285, 2257, 2000, + /* 720 */ 2185, 2186, 2188, 2191, 2254, 2260, 2194, 2252, 2205, 2264, + /* 730 */ 2222, 2220, 2271, 2293, 2223, 2225, 2226, 2227, 2229, 2294, + /* 740 */ 2280, 2281, 2233, 2302, 2087, 2265, 2236, 2303, 2235, 2304, + /* 750 */ 2238, 2240, 2342, 2316, 2125, 2315, 2323, 2325, 2326, 2327, + /* 760 */ 2328, 2259, 2261, 2317, 2126, 2335, 2322, 2372, 2373, 2267, + /* 770 */ 2333, 2344, 2273, 2135, 2274, 2378, 2359, 2176, 2276, 2278, + /* 780 */ 2279, 2337, 2283, 2284, 2339, 2290, 2370, 2179, 2299, 2301, + /* 790 */ 2307, 2305, 2309, 2207, 2310, 2418, 2379, 2239, 2313, 2306, + /* 800 */ 2085, 2377, 2320, 2324, 2321, 2329, 2330, 2318, 2331, 2393, + /* 810 */ 2395, 2336, 2332, 2396, 2338, 2334, 2397, 2340, 2341, 2407, + /* 820 */ 2346, 2343, 2409, 2347, 2348, 2411, 2350, 2354, 2356, 2357, + /* 830 */ 2358, 2351, 2422, 2352, 2423, 2363, 2422, 2422, 2439, 2391, + /* 840 */ 2400, 2425, 2427, 2441, 2450, 2451, 2452, 2453, 2454, 2456, + /* 850 */ 2388, 2404, 2416, 2406, 2463, 2460, 2461, 2472, 2488, 2474, + /* 860 */ 2475, 2476, 2436, 2154, 2478, 2161, 2479, 2480, 2481, 2482, + /* 870 */ 2499, 2487, 2525, 2490, 2477, 2494, 2529, 2501, 2489, 2497, + /* 880 */ 2541, 2506, 2493, 2503, 2546, 2510, 2498, 2508, 2548, 2514, + /* 890 */ 2515, 2553, 2532, 2523, 2535, 2537, 2538, 2539, 2542, 2547, }; -#define YY_REDUCE_COUNT (345) +#define YY_REDUCE_COUNT (365) #define YY_REDUCE_MIN (-488) #define YY_REDUCE_MAX (2652) static const short yy_reduce_ofst[] = { @@ -1002,112 +1005,117 @@ static const short yy_reduce_ofst[] = { /* 150 */ 575, -346, 508, 64, 713, 679, -123, 437, 759, 789, /* 160 */ 740, 770, 778, 806, 862, 916, -407, -403, 383, 421, /* 170 */ 451, 528, 605, 451, 510, 702, 1010, 606, 623, 623, - /* 180 */ 576, 773, 871, 890, 1031, 623, 1016, 1016, 1049, 1052, - /* 190 */ 1028, 1071, 1035, 956, 984, 986, 1063, 1016, 990, 1127, - /* 200 */ 1081, 1135, 1097, 1067, 1086, 1088, 1016, 1021, 1022, 1003, - /* 210 */ 1038, 1023, 1131, 1091, 1069, 1082, 1093, 1094, 1176, 1109, - /* 220 */ 1178, 1121, 1192, 1195, 1156, 1200, 1159, 1163, 1211, 1215, - /* 230 */ 1213, 1169, 1173, 1174, 1181, 1219, 1225, 1235, 1228, 1242, - /* 240 */ 1243, 1244, 1253, 1255, 1256, 1258, 1179, 1250, 1251, 1210, - /* 250 */ 1260, 1269, 1209, 1268, 1276, 1272, 1226, 1277, 1278, 1284, - /* 260 */ 1280, 1292, 1261, 1263, 1265, 1266, 1267, 1270, 1271, 1273, - /* 270 */ 1274, 1279, 1281, 1293, 1306, 1307, 1308, 1288, 1289, 1290, - /* 280 */ 1232, 1237, 1230, 1310, 1249, 1295, 1291, 1305, 1338, 1285, - /* 290 */ 1349, 1309, 1222, 1297, 1240, 1314, 1239, 1245, 1246, 1254, - /* 300 */ 1257, 1259, 1316, 1262, 1294, 1247, 1286, 1298, 1409, 1315, - /* 310 */ 1301, 1300, 1411, 1410, 1412, 1311, 1361, 1381, 1383, 1385, - /* 320 */ 1388, 1371, 1393, 1382, 1428, 1413, 1433, 1435, 1398, 1408, - /* 330 */ 1415, 1416, 1442, 1439, 1461, 1459, 1463, 1389, 1376, 1399, - /* 340 */ 1402, 1445, 1453, 1455, 1452, 1475, + /* 180 */ 576, 773, 871, 926, 1031, 623, 1034, 1034, 1043, 1049, + /* 190 */ 1028, 1130, 1091, 1008, 1009, 1011, 1085, 1034, 1013, 1150, + /* 200 */ 1104, 1162, 1129, 1098, 1120, 1122, 1034, 1062, 1063, 1044, + /* 210 */ 1077, 1065, 1170, 1126, 1112, 1115, 1131, 1127, 1202, 1136, + /* 220 */ 1211, 1160, 1233, 1237, 1189, 1243, 1195, 1200, 1249, 1251, + /* 230 */ 1250, 1203, 1208, 1209, 1213, 1254, 1259, 1274, 1266, 1278, + /* 240 */ 1281, 1285, 1290, 1289, 1294, 1292, 1215, 1286, 1288, 1253, + /* 250 */ 1291, 1297, 1231, 1293, 1301, 1298, 1256, 1305, 1307, 1306, + /* 260 */ 1308, 1312, 1279, 1300, 1311, 1316, 1319, 1320, 1321, 1322, + /* 270 */ 1323, 1325, 1326, 1310, 1334, 1339, 1338, 1295, 1315, 1331, + /* 280 */ 1309, 1324, 1314, 1360, 1330, 1341, 1329, 1333, 1370, 1317, + /* 290 */ 1378, 1343, 1255, 1342, 1267, 1345, 1273, 1276, 1318, 1337, + /* 300 */ 1332, 1335, 1351, 1354, 1357, 1270, 1272, 1347, 1428, 1348, + /* 310 */ 1353, 1356, 1430, 1427, 1432, 1344, 1377, 1397, 1399, 1400, + /* 320 */ 1402, 1383, 1405, 1393, 1442, 1433, 1446, 1455, 1413, 1416, + /* 330 */ 1419, 1420, 1438, 1441, 1444, 1445, 1450, 1462, 1465, 1467, + /* 340 */ 1469, 1470, 1472, 1473, 1474, 1481, 1485, 1496, 1498, 1499, + /* 350 */ 1471, 1503, 1527, 1476, 1534, 1535, 1538, 1477, 1454, 1468, + /* 360 */ 1507, 1510, 1520, 1525, 1526, 1550, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 10 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 20 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 30 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 40 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 50 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 60 */ 2334, 1993, 1993, 2297, 1993, 1993, 1993, 1993, 1993, 1993, - /* 70 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 2304, 1993, 1993, - /* 80 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 90 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 2092, 1993, 1993, - /* 100 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 110 */ 1993, 1993, 1993, 1993, 2090, 2558, 1993, 1993, 2587, 1993, - /* 120 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 130 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 140 */ 2570, 1993, 1993, 2064, 2064, 1993, 2570, 2570, 2570, 2530, - /* 150 */ 2530, 2090, 1993, 1993, 2092, 2372, 1993, 1993, 1993, 1993, - /* 160 */ 1993, 1993, 1993, 1993, 2215, 2023, 1993, 1993, 1993, 1993, - /* 170 */ 2239, 1993, 1993, 1993, 2360, 1993, 1993, 2616, 2562, 2563, - /* 180 */ 2678, 1993, 2619, 2581, 1993, 2576, 1993, 1993, 1993, 1993, - /* 190 */ 2309, 1993, 2606, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 200 */ 1993, 1993, 2168, 2354, 1993, 1993, 1993, 1993, 1993, 2662, - /* 210 */ 2560, 2600, 1993, 2610, 1993, 2397, 1993, 2386, 2092, 1993, - /* 220 */ 2092, 2347, 2292, 1993, 2302, 1993, 2302, 2299, 1993, 1993, - /* 230 */ 1993, 2302, 2299, 2299, 2299, 2157, 2153, 1993, 2151, 1993, - /* 240 */ 1993, 1993, 1993, 2048, 1993, 2048, 1993, 2092, 2092, 1993, - /* 250 */ 2092, 1993, 1993, 2092, 1993, 2092, 1993, 2092, 2092, 1993, - /* 260 */ 2092, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 270 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 280 */ 2384, 2370, 1993, 2090, 1993, 2358, 2356, 1993, 2090, 2610, - /* 290 */ 1993, 1993, 2632, 2627, 2632, 2627, 2646, 2642, 2632, 2651, - /* 300 */ 2648, 2612, 2610, 2593, 2589, 2681, 2668, 2664, 1993, 1993, - /* 310 */ 2598, 2596, 1993, 2090, 2090, 1993, 2627, 1993, 1993, 1993, - /* 320 */ 1993, 2627, 1993, 1993, 2090, 1993, 2090, 1993, 1993, 1993, - /* 330 */ 2184, 1993, 1993, 2090, 1993, 2032, 1993, 2349, 2375, 2330, - /* 340 */ 2330, 2218, 2218, 2218, 2093, 1998, 1993, 1993, 1993, 1993, - /* 350 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 2645, 2644, - /* 360 */ 2482, 1993, 2534, 2533, 2532, 2523, 2481, 2180, 1993, 1993, - /* 370 */ 2480, 2479, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 380 */ 1993, 1993, 1993, 2473, 1993, 1993, 2474, 2472, 2471, 2321, - /* 390 */ 2320, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 400 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 410 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 2665, 2669, 1993, - /* 420 */ 2559, 1993, 1993, 1993, 2453, 1993, 1993, 1993, 1993, 1993, - /* 430 */ 2421, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 440 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 450 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 460 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 470 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 480 */ 1993, 1993, 1993, 1993, 1993, 2298, 1993, 1993, 1993, 1993, - /* 490 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 500 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 510 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 520 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 530 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 540 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 2313, 1993, - /* 550 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 560 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 570 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 580 */ 2037, 2460, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 590 */ 1993, 1993, 1993, 1993, 1993, 2463, 1993, 1993, 1993, 1993, - /* 600 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 610 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 620 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 630 */ 1993, 1993, 1993, 1993, 1993, 1993, 2132, 2131, 1993, 1993, - /* 640 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 650 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 660 */ 1993, 1993, 1993, 1993, 2464, 1993, 1993, 1993, 1993, 1993, - /* 670 */ 2455, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 680 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 2661, 2613, 1993, - /* 690 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 700 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 710 */ 1993, 2453, 1993, 2643, 1993, 1993, 1993, 1993, 1993, 1993, - /* 720 */ 1993, 2659, 1993, 2663, 1993, 1993, 1993, 1993, 1993, 1993, - /* 730 */ 1993, 2569, 2565, 1993, 1993, 2561, 1993, 1993, 1993, 1993, - /* 740 */ 1993, 2520, 1993, 1993, 1993, 2554, 1993, 1993, 1993, 1993, - /* 750 */ 1993, 1993, 1993, 1993, 1993, 2464, 1993, 2467, 1993, 1993, - /* 760 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 770 */ 2452, 1993, 2505, 2504, 1993, 1993, 1993, 1993, 1993, 1993, - /* 780 */ 1993, 2212, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 790 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 2196, 2194, 2193, - /* 800 */ 2192, 1993, 2225, 1993, 1993, 1993, 2221, 2220, 1993, 1993, - /* 810 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 820 */ 1993, 1993, 1993, 1993, 2111, 1993, 1993, 1993, 1993, 1993, - /* 830 */ 1993, 1993, 1993, 2103, 1993, 2102, 1993, 1993, 1993, 1993, - /* 840 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 850 */ 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, 1993, - /* 860 */ 1993, 1993, 1993, 2022, 1993, 1993, 1993, 1993, 1993, 1993, + /* 0 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 10 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 20 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 30 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 40 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 50 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 60 */ 2394, 2053, 2053, 2357, 2053, 2053, 2053, 2053, 2053, 2053, + /* 70 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2364, 2053, 2053, + /* 80 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 90 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2152, 2053, 2053, + /* 100 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 110 */ 2053, 2053, 2053, 2053, 2150, 2638, 2053, 2053, 2667, 2053, + /* 120 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 130 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 140 */ 2650, 2053, 2053, 2124, 2124, 2053, 2650, 2650, 2650, 2610, + /* 150 */ 2610, 2150, 2053, 2053, 2152, 2432, 2053, 2053, 2053, 2053, + /* 160 */ 2053, 2053, 2053, 2053, 2275, 2083, 2053, 2053, 2053, 2053, + /* 170 */ 2299, 2053, 2053, 2053, 2420, 2053, 2053, 2696, 2642, 2643, + /* 180 */ 2758, 2053, 2699, 2661, 2053, 2656, 2053, 2053, 2053, 2053, + /* 190 */ 2369, 2053, 2686, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 200 */ 2053, 2053, 2228, 2414, 2053, 2053, 2053, 2053, 2053, 2742, + /* 210 */ 2640, 2680, 2053, 2690, 2053, 2457, 2053, 2446, 2152, 2053, + /* 220 */ 2152, 2407, 2352, 2053, 2362, 2053, 2362, 2359, 2053, 2053, + /* 230 */ 2053, 2362, 2359, 2359, 2359, 2217, 2213, 2053, 2211, 2053, + /* 240 */ 2053, 2053, 2053, 2108, 2053, 2108, 2053, 2152, 2152, 2053, + /* 250 */ 2152, 2053, 2053, 2152, 2053, 2152, 2053, 2152, 2152, 2053, + /* 260 */ 2152, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 270 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 280 */ 2444, 2430, 2053, 2150, 2053, 2418, 2416, 2053, 2150, 2690, + /* 290 */ 2053, 2053, 2712, 2707, 2712, 2707, 2726, 2722, 2712, 2731, + /* 300 */ 2728, 2692, 2690, 2673, 2669, 2761, 2748, 2744, 2053, 2053, + /* 310 */ 2678, 2676, 2053, 2150, 2150, 2053, 2707, 2053, 2053, 2053, + /* 320 */ 2053, 2707, 2053, 2053, 2150, 2053, 2150, 2053, 2053, 2053, + /* 330 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 340 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 350 */ 2244, 2053, 2053, 2150, 2053, 2092, 2053, 2409, 2435, 2390, + /* 360 */ 2390, 2278, 2278, 2278, 2153, 2058, 2053, 2053, 2053, 2053, + /* 370 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2725, 2724, + /* 380 */ 2562, 2053, 2614, 2613, 2612, 2603, 2561, 2240, 2053, 2053, + /* 390 */ 2560, 2559, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 400 */ 2053, 2053, 2053, 2553, 2053, 2053, 2554, 2552, 2551, 2381, + /* 410 */ 2380, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 420 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 430 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2745, 2749, 2053, + /* 440 */ 2639, 2053, 2053, 2053, 2533, 2053, 2053, 2053, 2053, 2053, + /* 450 */ 2501, 2496, 2487, 2478, 2493, 2484, 2472, 2490, 2481, 2469, + /* 460 */ 2466, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 470 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 480 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 490 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 500 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 510 */ 2053, 2053, 2053, 2053, 2053, 2358, 2053, 2053, 2053, 2053, + /* 520 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 530 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 540 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 550 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 560 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 570 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2373, 2053, + /* 580 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 590 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 600 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 610 */ 2097, 2540, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 620 */ 2053, 2053, 2053, 2053, 2053, 2543, 2053, 2053, 2053, 2053, + /* 630 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 640 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 650 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 660 */ 2053, 2053, 2053, 2053, 2053, 2053, 2192, 2191, 2053, 2053, + /* 670 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 680 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 690 */ 2053, 2053, 2053, 2053, 2544, 2053, 2053, 2053, 2053, 2053, + /* 700 */ 2535, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 710 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2741, 2693, 2053, + /* 720 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 730 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 740 */ 2053, 2533, 2053, 2723, 2053, 2053, 2053, 2053, 2053, 2053, + /* 750 */ 2053, 2739, 2053, 2743, 2053, 2053, 2053, 2053, 2053, 2053, + /* 760 */ 2053, 2649, 2645, 2053, 2053, 2641, 2053, 2053, 2053, 2053, + /* 770 */ 2053, 2600, 2053, 2053, 2053, 2634, 2053, 2053, 2053, 2053, + /* 780 */ 2053, 2053, 2053, 2053, 2053, 2544, 2053, 2547, 2053, 2053, + /* 790 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 800 */ 2532, 2053, 2585, 2584, 2053, 2053, 2053, 2053, 2053, 2053, + /* 810 */ 2053, 2272, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 820 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2256, 2254, 2253, + /* 830 */ 2252, 2053, 2285, 2053, 2053, 2053, 2281, 2280, 2053, 2053, + /* 840 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 850 */ 2053, 2053, 2053, 2053, 2171, 2053, 2053, 2053, 2053, 2053, + /* 860 */ 2053, 2053, 2053, 2163, 2053, 2162, 2053, 2053, 2053, 2053, + /* 870 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 880 */ 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, 2053, + /* 890 */ 2053, 2053, 2053, 2082, 2053, 2053, 2053, 2053, 2053, 2053, }; /********** End of lemon-generated parsing tables *****************************/ @@ -2524,283 +2532,303 @@ static const char *const yyRuleName[] = { /* 408 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", /* 409 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery", /* 410 */ "tags_literal ::= NK_INTEGER", - /* 411 */ "tags_literal ::= NK_PLUS NK_INTEGER", - /* 412 */ "tags_literal ::= NK_MINUS NK_INTEGER", - /* 413 */ "tags_literal ::= NK_FLOAT", - /* 414 */ "tags_literal ::= NK_PLUS NK_FLOAT", - /* 415 */ "tags_literal ::= NK_MINUS NK_FLOAT", - /* 416 */ "tags_literal ::= NK_BIN", - /* 417 */ "tags_literal ::= NK_PLUS NK_BIN", - /* 418 */ "tags_literal ::= NK_MINUS NK_BIN", - /* 419 */ "tags_literal ::= NK_HEX", - /* 420 */ "tags_literal ::= NK_PLUS NK_HEX", - /* 421 */ "tags_literal ::= NK_MINUS NK_HEX", - /* 422 */ "tags_literal ::= NK_STRING", - /* 423 */ "tags_literal ::= NK_BOOL", - /* 424 */ "tags_literal ::= NULL", - /* 425 */ "tags_literal ::= literal_func", - /* 426 */ "tags_literal ::= literal_func NK_PLUS duration_literal", - /* 427 */ "tags_literal ::= literal_func NK_MINUS duration_literal", - /* 428 */ "tags_literal_list ::= tags_literal", - /* 429 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", - /* 430 */ "literal ::= NK_INTEGER", - /* 431 */ "literal ::= NK_FLOAT", - /* 432 */ "literal ::= NK_STRING", - /* 433 */ "literal ::= NK_BOOL", - /* 434 */ "literal ::= TIMESTAMP NK_STRING", - /* 435 */ "literal ::= duration_literal", - /* 436 */ "literal ::= NULL", - /* 437 */ "literal ::= NK_QUESTION", - /* 438 */ "duration_literal ::= NK_VARIABLE", - /* 439 */ "signed ::= NK_INTEGER", - /* 440 */ "signed ::= NK_PLUS NK_INTEGER", - /* 441 */ "signed ::= NK_MINUS NK_INTEGER", - /* 442 */ "signed ::= NK_FLOAT", - /* 443 */ "signed ::= NK_PLUS NK_FLOAT", - /* 444 */ "signed ::= NK_MINUS NK_FLOAT", - /* 445 */ "signed_literal ::= signed", - /* 446 */ "signed_literal ::= NK_STRING", - /* 447 */ "signed_literal ::= NK_BOOL", - /* 448 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 449 */ "signed_literal ::= duration_literal", - /* 450 */ "signed_literal ::= NULL", - /* 451 */ "signed_literal ::= literal_func", - /* 452 */ "signed_literal ::= NK_QUESTION", - /* 453 */ "literal_list ::= signed_literal", - /* 454 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 455 */ "db_name ::= NK_ID", - /* 456 */ "table_name ::= NK_ID", - /* 457 */ "column_name ::= NK_ID", - /* 458 */ "function_name ::= NK_ID", - /* 459 */ "view_name ::= NK_ID", - /* 460 */ "table_alias ::= NK_ID", - /* 461 */ "column_alias ::= NK_ID", - /* 462 */ "column_alias ::= NK_ALIAS", - /* 463 */ "user_name ::= NK_ID", - /* 464 */ "topic_name ::= NK_ID", - /* 465 */ "stream_name ::= NK_ID", - /* 466 */ "cgroup_name ::= NK_ID", - /* 467 */ "index_name ::= NK_ID", - /* 468 */ "expr_or_subquery ::= expression", - /* 469 */ "expression ::= literal", - /* 470 */ "expression ::= pseudo_column", - /* 471 */ "expression ::= column_reference", - /* 472 */ "expression ::= function_expression", - /* 473 */ "expression ::= case_when_expression", - /* 474 */ "expression ::= NK_LP expression NK_RP", - /* 475 */ "expression ::= NK_PLUS expr_or_subquery", - /* 476 */ "expression ::= NK_MINUS expr_or_subquery", - /* 477 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 478 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 479 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 480 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 481 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 482 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 483 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 484 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 485 */ "expression_list ::= expr_or_subquery", - /* 486 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 487 */ "column_reference ::= column_name", - /* 488 */ "column_reference ::= table_name NK_DOT column_name", - /* 489 */ "column_reference ::= NK_ALIAS", - /* 490 */ "column_reference ::= table_name NK_DOT NK_ALIAS", - /* 491 */ "pseudo_column ::= ROWTS", - /* 492 */ "pseudo_column ::= TBNAME", - /* 493 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 494 */ "pseudo_column ::= QSTART", - /* 495 */ "pseudo_column ::= QEND", - /* 496 */ "pseudo_column ::= QDURATION", - /* 497 */ "pseudo_column ::= WSTART", - /* 498 */ "pseudo_column ::= WEND", - /* 499 */ "pseudo_column ::= WDURATION", - /* 500 */ "pseudo_column ::= IROWTS", - /* 501 */ "pseudo_column ::= ISFILLED", - /* 502 */ "pseudo_column ::= QTAGS", - /* 503 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 504 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 505 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 506 */ "function_expression ::= literal_func", - /* 507 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 508 */ "literal_func ::= NOW", - /* 509 */ "literal_func ::= TODAY", - /* 510 */ "noarg_func ::= NOW", - /* 511 */ "noarg_func ::= TODAY", - /* 512 */ "noarg_func ::= TIMEZONE", - /* 513 */ "noarg_func ::= DATABASE", - /* 514 */ "noarg_func ::= CLIENT_VERSION", - /* 515 */ "noarg_func ::= SERVER_VERSION", - /* 516 */ "noarg_func ::= SERVER_STATUS", - /* 517 */ "noarg_func ::= CURRENT_USER", - /* 518 */ "noarg_func ::= USER", - /* 519 */ "star_func ::= COUNT", - /* 520 */ "star_func ::= FIRST", - /* 521 */ "star_func ::= LAST", - /* 522 */ "star_func ::= LAST_ROW", - /* 523 */ "star_func_para_list ::= NK_STAR", - /* 524 */ "star_func_para_list ::= other_para_list", - /* 525 */ "other_para_list ::= star_func_para", - /* 526 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 527 */ "star_func_para ::= expr_or_subquery", - /* 528 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 529 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 530 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 531 */ "when_then_list ::= when_then_expr", - /* 532 */ "when_then_list ::= when_then_list when_then_expr", - /* 533 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 534 */ "case_when_else_opt ::=", - /* 535 */ "case_when_else_opt ::= ELSE common_expression", - /* 536 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 537 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 538 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 539 */ "predicate ::= expr_or_subquery IS NULL", - /* 540 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 541 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 542 */ "compare_op ::= NK_LT", - /* 543 */ "compare_op ::= NK_GT", - /* 544 */ "compare_op ::= NK_LE", - /* 545 */ "compare_op ::= NK_GE", - /* 546 */ "compare_op ::= NK_NE", - /* 547 */ "compare_op ::= NK_EQ", - /* 548 */ "compare_op ::= LIKE", - /* 549 */ "compare_op ::= NOT LIKE", - /* 550 */ "compare_op ::= MATCH", - /* 551 */ "compare_op ::= NMATCH", - /* 552 */ "compare_op ::= CONTAINS", - /* 553 */ "in_op ::= IN", - /* 554 */ "in_op ::= NOT IN", - /* 555 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 556 */ "boolean_value_expression ::= boolean_primary", - /* 557 */ "boolean_value_expression ::= NOT boolean_primary", - /* 558 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 559 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 560 */ "boolean_primary ::= predicate", - /* 561 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 562 */ "common_expression ::= expr_or_subquery", - /* 563 */ "common_expression ::= boolean_value_expression", - /* 564 */ "from_clause_opt ::=", - /* 565 */ "from_clause_opt ::= FROM table_reference_list", - /* 566 */ "table_reference_list ::= table_reference", - /* 567 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 568 */ "table_reference ::= table_primary", - /* 569 */ "table_reference ::= joined_table", - /* 570 */ "table_primary ::= table_name alias_opt", - /* 571 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 572 */ "table_primary ::= subquery alias_opt", - /* 573 */ "table_primary ::= parenthesized_joined_table", - /* 574 */ "alias_opt ::=", - /* 575 */ "alias_opt ::= table_alias", - /* 576 */ "alias_opt ::= AS table_alias", - /* 577 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 578 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 579 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", - /* 580 */ "join_type ::=", - /* 581 */ "join_type ::= INNER", - /* 582 */ "join_type ::= LEFT", - /* 583 */ "join_type ::= RIGHT", - /* 584 */ "join_type ::= FULL", - /* 585 */ "join_subtype ::=", - /* 586 */ "join_subtype ::= OUTER", - /* 587 */ "join_subtype ::= SEMI", - /* 588 */ "join_subtype ::= ANTI", - /* 589 */ "join_subtype ::= ASOF", - /* 590 */ "join_subtype ::= WINDOW", - /* 591 */ "join_on_clause_opt ::=", - /* 592 */ "join_on_clause_opt ::= ON search_condition", - /* 593 */ "window_offset_clause_opt ::=", - /* 594 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", - /* 595 */ "window_offset_literal ::= NK_VARIABLE", - /* 596 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", - /* 597 */ "jlimit_clause_opt ::=", - /* 598 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", - /* 599 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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", - /* 600 */ "hint_list ::=", - /* 601 */ "hint_list ::= NK_HINT", - /* 602 */ "tag_mode_opt ::=", - /* 603 */ "tag_mode_opt ::= TAGS", - /* 604 */ "set_quantifier_opt ::=", - /* 605 */ "set_quantifier_opt ::= DISTINCT", - /* 606 */ "set_quantifier_opt ::= ALL", - /* 607 */ "select_list ::= select_item", - /* 608 */ "select_list ::= select_list NK_COMMA select_item", - /* 609 */ "select_item ::= NK_STAR", - /* 610 */ "select_item ::= common_expression", - /* 611 */ "select_item ::= common_expression column_alias", - /* 612 */ "select_item ::= common_expression AS column_alias", - /* 613 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 614 */ "where_clause_opt ::=", - /* 615 */ "where_clause_opt ::= WHERE search_condition", - /* 616 */ "partition_by_clause_opt ::=", - /* 617 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 618 */ "partition_list ::= partition_item", - /* 619 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 620 */ "partition_item ::= expr_or_subquery", - /* 621 */ "partition_item ::= expr_or_subquery column_alias", - /* 622 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 623 */ "twindow_clause_opt ::=", - /* 624 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", - /* 625 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 626 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 627 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", - /* 628 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 629 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", - /* 630 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", - /* 631 */ "sliding_opt ::=", - /* 632 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", - /* 633 */ "interval_sliding_duration_literal ::= NK_VARIABLE", - /* 634 */ "interval_sliding_duration_literal ::= NK_STRING", - /* 635 */ "interval_sliding_duration_literal ::= NK_INTEGER", - /* 636 */ "fill_opt ::=", - /* 637 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 638 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", - /* 639 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", - /* 640 */ "fill_mode ::= NONE", - /* 641 */ "fill_mode ::= PREV", - /* 642 */ "fill_mode ::= NULL", - /* 643 */ "fill_mode ::= NULL_F", - /* 644 */ "fill_mode ::= LINEAR", - /* 645 */ "fill_mode ::= NEXT", - /* 646 */ "group_by_clause_opt ::=", - /* 647 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 648 */ "group_by_list ::= expr_or_subquery", - /* 649 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 650 */ "having_clause_opt ::=", - /* 651 */ "having_clause_opt ::= HAVING search_condition", - /* 652 */ "range_opt ::=", - /* 653 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 654 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", - /* 655 */ "every_opt ::=", - /* 656 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 657 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 658 */ "query_simple ::= query_specification", - /* 659 */ "query_simple ::= union_query_expression", - /* 660 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 661 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 662 */ "query_simple_or_subquery ::= query_simple", - /* 663 */ "query_simple_or_subquery ::= subquery", - /* 664 */ "query_or_subquery ::= query_expression", - /* 665 */ "query_or_subquery ::= subquery", - /* 666 */ "order_by_clause_opt ::=", - /* 667 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 668 */ "slimit_clause_opt ::=", - /* 669 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 670 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 671 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 672 */ "limit_clause_opt ::=", - /* 673 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 674 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 675 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 676 */ "subquery ::= NK_LP query_expression NK_RP", - /* 677 */ "subquery ::= NK_LP subquery NK_RP", - /* 678 */ "search_condition ::= common_expression", - /* 679 */ "sort_specification_list ::= sort_specification", - /* 680 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 681 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 682 */ "ordering_specification_opt ::=", - /* 683 */ "ordering_specification_opt ::= ASC", - /* 684 */ "ordering_specification_opt ::= DESC", - /* 685 */ "null_ordering_opt ::=", - /* 686 */ "null_ordering_opt ::= NULLS FIRST", - /* 687 */ "null_ordering_opt ::= NULLS LAST", + /* 411 */ "tags_literal ::= NK_INTEGER NK_PLUS duration_literal", + /* 412 */ "tags_literal ::= NK_INTEGER NK_MINUS duration_literal", + /* 413 */ "tags_literal ::= NK_PLUS NK_INTEGER", + /* 414 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal", + /* 415 */ "tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal", + /* 416 */ "tags_literal ::= NK_MINUS NK_INTEGER", + /* 417 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal", + /* 418 */ "tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal", + /* 419 */ "tags_literal ::= NK_FLOAT", + /* 420 */ "tags_literal ::= NK_PLUS NK_FLOAT", + /* 421 */ "tags_literal ::= NK_MINUS NK_FLOAT", + /* 422 */ "tags_literal ::= NK_BIN", + /* 423 */ "tags_literal ::= NK_BIN NK_PLUS duration_literal", + /* 424 */ "tags_literal ::= NK_BIN NK_MINUS duration_literal", + /* 425 */ "tags_literal ::= NK_PLUS NK_BIN", + /* 426 */ "tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal", + /* 427 */ "tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal", + /* 428 */ "tags_literal ::= NK_MINUS NK_BIN", + /* 429 */ "tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal", + /* 430 */ "tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal", + /* 431 */ "tags_literal ::= NK_HEX", + /* 432 */ "tags_literal ::= NK_HEX NK_PLUS duration_literal", + /* 433 */ "tags_literal ::= NK_HEX NK_MINUS duration_literal", + /* 434 */ "tags_literal ::= NK_PLUS NK_HEX", + /* 435 */ "tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal", + /* 436 */ "tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal", + /* 437 */ "tags_literal ::= NK_MINUS NK_HEX", + /* 438 */ "tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal", + /* 439 */ "tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal", + /* 440 */ "tags_literal ::= NK_STRING", + /* 441 */ "tags_literal ::= NK_STRING NK_PLUS duration_literal", + /* 442 */ "tags_literal ::= NK_STRING NK_MINUS duration_literal", + /* 443 */ "tags_literal ::= NK_BOOL", + /* 444 */ "tags_literal ::= NULL", + /* 445 */ "tags_literal ::= literal_func", + /* 446 */ "tags_literal ::= literal_func NK_PLUS duration_literal", + /* 447 */ "tags_literal ::= literal_func NK_MINUS duration_literal", + /* 448 */ "tags_literal_list ::= tags_literal", + /* 449 */ "tags_literal_list ::= tags_literal_list NK_COMMA tags_literal", + /* 450 */ "literal ::= NK_INTEGER", + /* 451 */ "literal ::= NK_FLOAT", + /* 452 */ "literal ::= NK_STRING", + /* 453 */ "literal ::= NK_BOOL", + /* 454 */ "literal ::= TIMESTAMP NK_STRING", + /* 455 */ "literal ::= duration_literal", + /* 456 */ "literal ::= NULL", + /* 457 */ "literal ::= NK_QUESTION", + /* 458 */ "duration_literal ::= NK_VARIABLE", + /* 459 */ "signed ::= NK_INTEGER", + /* 460 */ "signed ::= NK_PLUS NK_INTEGER", + /* 461 */ "signed ::= NK_MINUS NK_INTEGER", + /* 462 */ "signed ::= NK_FLOAT", + /* 463 */ "signed ::= NK_PLUS NK_FLOAT", + /* 464 */ "signed ::= NK_MINUS NK_FLOAT", + /* 465 */ "signed_literal ::= signed", + /* 466 */ "signed_literal ::= NK_STRING", + /* 467 */ "signed_literal ::= NK_BOOL", + /* 468 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 469 */ "signed_literal ::= duration_literal", + /* 470 */ "signed_literal ::= NULL", + /* 471 */ "signed_literal ::= literal_func", + /* 472 */ "signed_literal ::= NK_QUESTION", + /* 473 */ "literal_list ::= signed_literal", + /* 474 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 475 */ "db_name ::= NK_ID", + /* 476 */ "table_name ::= NK_ID", + /* 477 */ "column_name ::= NK_ID", + /* 478 */ "function_name ::= NK_ID", + /* 479 */ "view_name ::= NK_ID", + /* 480 */ "table_alias ::= NK_ID", + /* 481 */ "column_alias ::= NK_ID", + /* 482 */ "column_alias ::= NK_ALIAS", + /* 483 */ "user_name ::= NK_ID", + /* 484 */ "topic_name ::= NK_ID", + /* 485 */ "stream_name ::= NK_ID", + /* 486 */ "cgroup_name ::= NK_ID", + /* 487 */ "index_name ::= NK_ID", + /* 488 */ "expr_or_subquery ::= expression", + /* 489 */ "expression ::= literal", + /* 490 */ "expression ::= pseudo_column", + /* 491 */ "expression ::= column_reference", + /* 492 */ "expression ::= function_expression", + /* 493 */ "expression ::= case_when_expression", + /* 494 */ "expression ::= NK_LP expression NK_RP", + /* 495 */ "expression ::= NK_PLUS expr_or_subquery", + /* 496 */ "expression ::= NK_MINUS expr_or_subquery", + /* 497 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 498 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 499 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 500 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 501 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 502 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 503 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 504 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 505 */ "expression_list ::= expr_or_subquery", + /* 506 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 507 */ "column_reference ::= column_name", + /* 508 */ "column_reference ::= table_name NK_DOT column_name", + /* 509 */ "column_reference ::= NK_ALIAS", + /* 510 */ "column_reference ::= table_name NK_DOT NK_ALIAS", + /* 511 */ "pseudo_column ::= ROWTS", + /* 512 */ "pseudo_column ::= TBNAME", + /* 513 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 514 */ "pseudo_column ::= QSTART", + /* 515 */ "pseudo_column ::= QEND", + /* 516 */ "pseudo_column ::= QDURATION", + /* 517 */ "pseudo_column ::= WSTART", + /* 518 */ "pseudo_column ::= WEND", + /* 519 */ "pseudo_column ::= WDURATION", + /* 520 */ "pseudo_column ::= IROWTS", + /* 521 */ "pseudo_column ::= ISFILLED", + /* 522 */ "pseudo_column ::= QTAGS", + /* 523 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 524 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 525 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 526 */ "function_expression ::= literal_func", + /* 527 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 528 */ "literal_func ::= NOW", + /* 529 */ "literal_func ::= TODAY", + /* 530 */ "noarg_func ::= NOW", + /* 531 */ "noarg_func ::= TODAY", + /* 532 */ "noarg_func ::= TIMEZONE", + /* 533 */ "noarg_func ::= DATABASE", + /* 534 */ "noarg_func ::= CLIENT_VERSION", + /* 535 */ "noarg_func ::= SERVER_VERSION", + /* 536 */ "noarg_func ::= SERVER_STATUS", + /* 537 */ "noarg_func ::= CURRENT_USER", + /* 538 */ "noarg_func ::= USER", + /* 539 */ "star_func ::= COUNT", + /* 540 */ "star_func ::= FIRST", + /* 541 */ "star_func ::= LAST", + /* 542 */ "star_func ::= LAST_ROW", + /* 543 */ "star_func_para_list ::= NK_STAR", + /* 544 */ "star_func_para_list ::= other_para_list", + /* 545 */ "other_para_list ::= star_func_para", + /* 546 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 547 */ "star_func_para ::= expr_or_subquery", + /* 548 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 549 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 550 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 551 */ "when_then_list ::= when_then_expr", + /* 552 */ "when_then_list ::= when_then_list when_then_expr", + /* 553 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 554 */ "case_when_else_opt ::=", + /* 555 */ "case_when_else_opt ::= ELSE common_expression", + /* 556 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 557 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 558 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 559 */ "predicate ::= expr_or_subquery IS NULL", + /* 560 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 561 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 562 */ "compare_op ::= NK_LT", + /* 563 */ "compare_op ::= NK_GT", + /* 564 */ "compare_op ::= NK_LE", + /* 565 */ "compare_op ::= NK_GE", + /* 566 */ "compare_op ::= NK_NE", + /* 567 */ "compare_op ::= NK_EQ", + /* 568 */ "compare_op ::= LIKE", + /* 569 */ "compare_op ::= NOT LIKE", + /* 570 */ "compare_op ::= MATCH", + /* 571 */ "compare_op ::= NMATCH", + /* 572 */ "compare_op ::= CONTAINS", + /* 573 */ "in_op ::= IN", + /* 574 */ "in_op ::= NOT IN", + /* 575 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 576 */ "boolean_value_expression ::= boolean_primary", + /* 577 */ "boolean_value_expression ::= NOT boolean_primary", + /* 578 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 579 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 580 */ "boolean_primary ::= predicate", + /* 581 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 582 */ "common_expression ::= expr_or_subquery", + /* 583 */ "common_expression ::= boolean_value_expression", + /* 584 */ "from_clause_opt ::=", + /* 585 */ "from_clause_opt ::= FROM table_reference_list", + /* 586 */ "table_reference_list ::= table_reference", + /* 587 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 588 */ "table_reference ::= table_primary", + /* 589 */ "table_reference ::= joined_table", + /* 590 */ "table_primary ::= table_name alias_opt", + /* 591 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 592 */ "table_primary ::= subquery alias_opt", + /* 593 */ "table_primary ::= parenthesized_joined_table", + /* 594 */ "alias_opt ::=", + /* 595 */ "alias_opt ::= table_alias", + /* 596 */ "alias_opt ::= AS table_alias", + /* 597 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 598 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 599 */ "joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt", + /* 600 */ "join_type ::=", + /* 601 */ "join_type ::= INNER", + /* 602 */ "join_type ::= LEFT", + /* 603 */ "join_type ::= RIGHT", + /* 604 */ "join_type ::= FULL", + /* 605 */ "join_subtype ::=", + /* 606 */ "join_subtype ::= OUTER", + /* 607 */ "join_subtype ::= SEMI", + /* 608 */ "join_subtype ::= ANTI", + /* 609 */ "join_subtype ::= ASOF", + /* 610 */ "join_subtype ::= WINDOW", + /* 611 */ "join_on_clause_opt ::=", + /* 612 */ "join_on_clause_opt ::= ON search_condition", + /* 613 */ "window_offset_clause_opt ::=", + /* 614 */ "window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP", + /* 615 */ "window_offset_literal ::= NK_VARIABLE", + /* 616 */ "window_offset_literal ::= NK_MINUS NK_VARIABLE", + /* 617 */ "jlimit_clause_opt ::=", + /* 618 */ "jlimit_clause_opt ::= JLIMIT NK_INTEGER", + /* 619 */ "query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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", + /* 620 */ "hint_list ::=", + /* 621 */ "hint_list ::= NK_HINT", + /* 622 */ "tag_mode_opt ::=", + /* 623 */ "tag_mode_opt ::= TAGS", + /* 624 */ "set_quantifier_opt ::=", + /* 625 */ "set_quantifier_opt ::= DISTINCT", + /* 626 */ "set_quantifier_opt ::= ALL", + /* 627 */ "select_list ::= select_item", + /* 628 */ "select_list ::= select_list NK_COMMA select_item", + /* 629 */ "select_item ::= NK_STAR", + /* 630 */ "select_item ::= common_expression", + /* 631 */ "select_item ::= common_expression column_alias", + /* 632 */ "select_item ::= common_expression AS column_alias", + /* 633 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 634 */ "where_clause_opt ::=", + /* 635 */ "where_clause_opt ::= WHERE search_condition", + /* 636 */ "partition_by_clause_opt ::=", + /* 637 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 638 */ "partition_list ::= partition_item", + /* 639 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 640 */ "partition_item ::= expr_or_subquery", + /* 641 */ "partition_item ::= expr_or_subquery column_alias", + /* 642 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 643 */ "twindow_clause_opt ::=", + /* 644 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP", + /* 645 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 646 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 647 */ "twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt", + /* 648 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 649 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP", + /* 650 */ "twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", + /* 651 */ "sliding_opt ::=", + /* 652 */ "sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP", + /* 653 */ "interval_sliding_duration_literal ::= NK_VARIABLE", + /* 654 */ "interval_sliding_duration_literal ::= NK_STRING", + /* 655 */ "interval_sliding_duration_literal ::= NK_INTEGER", + /* 656 */ "fill_opt ::=", + /* 657 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 658 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP", + /* 659 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP", + /* 660 */ "fill_mode ::= NONE", + /* 661 */ "fill_mode ::= PREV", + /* 662 */ "fill_mode ::= NULL", + /* 663 */ "fill_mode ::= NULL_F", + /* 664 */ "fill_mode ::= LINEAR", + /* 665 */ "fill_mode ::= NEXT", + /* 666 */ "group_by_clause_opt ::=", + /* 667 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 668 */ "group_by_list ::= expr_or_subquery", + /* 669 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 670 */ "having_clause_opt ::=", + /* 671 */ "having_clause_opt ::= HAVING search_condition", + /* 672 */ "range_opt ::=", + /* 673 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 674 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_RP", + /* 675 */ "every_opt ::=", + /* 676 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 677 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 678 */ "query_simple ::= query_specification", + /* 679 */ "query_simple ::= union_query_expression", + /* 680 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 681 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 682 */ "query_simple_or_subquery ::= query_simple", + /* 683 */ "query_simple_or_subquery ::= subquery", + /* 684 */ "query_or_subquery ::= query_expression", + /* 685 */ "query_or_subquery ::= subquery", + /* 686 */ "order_by_clause_opt ::=", + /* 687 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 688 */ "slimit_clause_opt ::=", + /* 689 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 690 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 691 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 692 */ "limit_clause_opt ::=", + /* 693 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 694 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 695 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 696 */ "subquery ::= NK_LP query_expression NK_RP", + /* 697 */ "subquery ::= NK_LP subquery NK_RP", + /* 698 */ "search_condition ::= common_expression", + /* 699 */ "sort_specification_list ::= sort_specification", + /* 700 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 701 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 702 */ "ordering_specification_opt ::=", + /* 703 */ "ordering_specification_opt ::= ASC", + /* 704 */ "ordering_specification_opt ::= DESC", + /* 705 */ "null_ordering_opt ::=", + /* 706 */ "null_ordering_opt ::= NULLS FIRST", + /* 707 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3864,283 +3892,303 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 447, /* (408) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ 447, /* (409) insert_query ::= INSERT INTO full_table_name query_or_subquery */ 408, /* (410) tags_literal ::= NK_INTEGER */ - 408, /* (411) tags_literal ::= NK_PLUS NK_INTEGER */ - 408, /* (412) tags_literal ::= NK_MINUS NK_INTEGER */ - 408, /* (413) tags_literal ::= NK_FLOAT */ - 408, /* (414) tags_literal ::= NK_PLUS NK_FLOAT */ - 408, /* (415) tags_literal ::= NK_MINUS NK_FLOAT */ - 408, /* (416) tags_literal ::= NK_BIN */ - 408, /* (417) tags_literal ::= NK_PLUS NK_BIN */ - 408, /* (418) tags_literal ::= NK_MINUS NK_BIN */ - 408, /* (419) tags_literal ::= NK_HEX */ - 408, /* (420) tags_literal ::= NK_PLUS NK_HEX */ - 408, /* (421) tags_literal ::= NK_MINUS NK_HEX */ - 408, /* (422) tags_literal ::= NK_STRING */ - 408, /* (423) tags_literal ::= NK_BOOL */ - 408, /* (424) tags_literal ::= NULL */ - 408, /* (425) tags_literal ::= literal_func */ - 408, /* (426) tags_literal ::= literal_func NK_PLUS duration_literal */ - 408, /* (427) tags_literal ::= literal_func NK_MINUS duration_literal */ - 411, /* (428) tags_literal_list ::= tags_literal */ - 411, /* (429) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - 365, /* (430) literal ::= NK_INTEGER */ - 365, /* (431) literal ::= NK_FLOAT */ - 365, /* (432) literal ::= NK_STRING */ - 365, /* (433) literal ::= NK_BOOL */ - 365, /* (434) literal ::= TIMESTAMP NK_STRING */ - 365, /* (435) literal ::= duration_literal */ - 365, /* (436) literal ::= NULL */ - 365, /* (437) literal ::= NK_QUESTION */ - 418, /* (438) duration_literal ::= NK_VARIABLE */ - 394, /* (439) signed ::= NK_INTEGER */ - 394, /* (440) signed ::= NK_PLUS NK_INTEGER */ - 394, /* (441) signed ::= NK_MINUS NK_INTEGER */ - 394, /* (442) signed ::= NK_FLOAT */ - 394, /* (443) signed ::= NK_PLUS NK_FLOAT */ - 394, /* (444) signed ::= NK_MINUS NK_FLOAT */ - 464, /* (445) signed_literal ::= signed */ - 464, /* (446) signed_literal ::= NK_STRING */ - 464, /* (447) signed_literal ::= NK_BOOL */ - 464, /* (448) signed_literal ::= TIMESTAMP NK_STRING */ - 464, /* (449) signed_literal ::= duration_literal */ - 464, /* (450) signed_literal ::= NULL */ - 464, /* (451) signed_literal ::= literal_func */ - 464, /* (452) signed_literal ::= NK_QUESTION */ - 465, /* (453) literal_list ::= signed_literal */ - 465, /* (454) literal_list ::= literal_list NK_COMMA signed_literal */ - 377, /* (455) db_name ::= NK_ID */ - 378, /* (456) table_name ::= NK_ID */ - 406, /* (457) column_name ::= NK_ID */ - 420, /* (458) function_name ::= NK_ID */ - 453, /* (459) view_name ::= NK_ID */ - 466, /* (460) table_alias ::= NK_ID */ - 431, /* (461) column_alias ::= NK_ID */ - 431, /* (462) column_alias ::= NK_ALIAS */ - 370, /* (463) user_name ::= NK_ID */ - 379, /* (464) topic_name ::= NK_ID */ - 454, /* (465) stream_name ::= NK_ID */ - 444, /* (466) cgroup_name ::= NK_ID */ - 434, /* (467) index_name ::= NK_ID */ - 467, /* (468) expr_or_subquery ::= expression */ - 460, /* (469) expression ::= literal */ - 460, /* (470) expression ::= pseudo_column */ - 460, /* (471) expression ::= column_reference */ - 460, /* (472) expression ::= function_expression */ - 460, /* (473) expression ::= case_when_expression */ - 460, /* (474) expression ::= NK_LP expression NK_RP */ - 460, /* (475) expression ::= NK_PLUS expr_or_subquery */ - 460, /* (476) expression ::= NK_MINUS expr_or_subquery */ - 460, /* (477) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - 460, /* (478) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - 460, /* (479) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - 460, /* (480) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - 460, /* (481) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - 460, /* (482) expression ::= column_reference NK_ARROW NK_STRING */ - 460, /* (483) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - 460, /* (484) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - 440, /* (485) expression_list ::= expr_or_subquery */ - 440, /* (486) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - 469, /* (487) column_reference ::= column_name */ - 469, /* (488) column_reference ::= table_name NK_DOT column_name */ - 469, /* (489) column_reference ::= NK_ALIAS */ - 469, /* (490) column_reference ::= table_name NK_DOT NK_ALIAS */ - 468, /* (491) pseudo_column ::= ROWTS */ - 468, /* (492) pseudo_column ::= TBNAME */ - 468, /* (493) pseudo_column ::= table_name NK_DOT TBNAME */ - 468, /* (494) pseudo_column ::= QSTART */ - 468, /* (495) pseudo_column ::= QEND */ - 468, /* (496) pseudo_column ::= QDURATION */ - 468, /* (497) pseudo_column ::= WSTART */ - 468, /* (498) pseudo_column ::= WEND */ - 468, /* (499) pseudo_column ::= WDURATION */ - 468, /* (500) pseudo_column ::= IROWTS */ - 468, /* (501) pseudo_column ::= ISFILLED */ - 468, /* (502) pseudo_column ::= QTAGS */ - 470, /* (503) function_expression ::= function_name NK_LP expression_list NK_RP */ - 470, /* (504) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - 470, /* (505) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - 470, /* (506) function_expression ::= literal_func */ - 463, /* (507) literal_func ::= noarg_func NK_LP NK_RP */ - 463, /* (508) literal_func ::= NOW */ - 463, /* (509) literal_func ::= TODAY */ - 474, /* (510) noarg_func ::= NOW */ - 474, /* (511) noarg_func ::= TODAY */ - 474, /* (512) noarg_func ::= TIMEZONE */ - 474, /* (513) noarg_func ::= DATABASE */ - 474, /* (514) noarg_func ::= CLIENT_VERSION */ - 474, /* (515) noarg_func ::= SERVER_VERSION */ - 474, /* (516) noarg_func ::= SERVER_STATUS */ - 474, /* (517) noarg_func ::= CURRENT_USER */ - 474, /* (518) noarg_func ::= USER */ - 472, /* (519) star_func ::= COUNT */ - 472, /* (520) star_func ::= FIRST */ - 472, /* (521) star_func ::= LAST */ - 472, /* (522) star_func ::= LAST_ROW */ - 473, /* (523) star_func_para_list ::= NK_STAR */ - 473, /* (524) star_func_para_list ::= other_para_list */ - 475, /* (525) other_para_list ::= star_func_para */ - 475, /* (526) other_para_list ::= other_para_list NK_COMMA star_func_para */ - 476, /* (527) star_func_para ::= expr_or_subquery */ - 476, /* (528) star_func_para ::= table_name NK_DOT NK_STAR */ - 471, /* (529) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - 471, /* (530) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - 477, /* (531) when_then_list ::= when_then_expr */ - 477, /* (532) when_then_list ::= when_then_list when_then_expr */ - 480, /* (533) when_then_expr ::= WHEN common_expression THEN common_expression */ - 478, /* (534) case_when_else_opt ::= */ - 478, /* (535) case_when_else_opt ::= ELSE common_expression */ - 481, /* (536) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - 481, /* (537) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - 481, /* (538) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - 481, /* (539) predicate ::= expr_or_subquery IS NULL */ - 481, /* (540) predicate ::= expr_or_subquery IS NOT NULL */ - 481, /* (541) predicate ::= expr_or_subquery in_op in_predicate_value */ - 482, /* (542) compare_op ::= NK_LT */ - 482, /* (543) compare_op ::= NK_GT */ - 482, /* (544) compare_op ::= NK_LE */ - 482, /* (545) compare_op ::= NK_GE */ - 482, /* (546) compare_op ::= NK_NE */ - 482, /* (547) compare_op ::= NK_EQ */ - 482, /* (548) compare_op ::= LIKE */ - 482, /* (549) compare_op ::= NOT LIKE */ - 482, /* (550) compare_op ::= MATCH */ - 482, /* (551) compare_op ::= NMATCH */ - 482, /* (552) compare_op ::= CONTAINS */ - 483, /* (553) in_op ::= IN */ - 483, /* (554) in_op ::= NOT IN */ - 484, /* (555) in_predicate_value ::= NK_LP literal_list NK_RP */ - 485, /* (556) boolean_value_expression ::= boolean_primary */ - 485, /* (557) boolean_value_expression ::= NOT boolean_primary */ - 485, /* (558) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - 485, /* (559) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - 486, /* (560) boolean_primary ::= predicate */ - 486, /* (561) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - 479, /* (562) common_expression ::= expr_or_subquery */ - 479, /* (563) common_expression ::= boolean_value_expression */ - 487, /* (564) from_clause_opt ::= */ - 487, /* (565) from_clause_opt ::= FROM table_reference_list */ - 488, /* (566) table_reference_list ::= table_reference */ - 488, /* (567) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - 489, /* (568) table_reference ::= table_primary */ - 489, /* (569) table_reference ::= joined_table */ - 490, /* (570) table_primary ::= table_name alias_opt */ - 490, /* (571) table_primary ::= db_name NK_DOT table_name alias_opt */ - 490, /* (572) table_primary ::= subquery alias_opt */ - 490, /* (573) table_primary ::= parenthesized_joined_table */ - 492, /* (574) alias_opt ::= */ - 492, /* (575) alias_opt ::= table_alias */ - 492, /* (576) alias_opt ::= AS table_alias */ - 494, /* (577) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - 494, /* (578) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - 491, /* (579) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 495, /* (580) join_type ::= */ - 495, /* (581) join_type ::= INNER */ - 495, /* (582) join_type ::= LEFT */ - 495, /* (583) join_type ::= RIGHT */ - 495, /* (584) join_type ::= FULL */ - 496, /* (585) join_subtype ::= */ - 496, /* (586) join_subtype ::= OUTER */ - 496, /* (587) join_subtype ::= SEMI */ - 496, /* (588) join_subtype ::= ANTI */ - 496, /* (589) join_subtype ::= ASOF */ - 496, /* (590) join_subtype ::= WINDOW */ - 497, /* (591) join_on_clause_opt ::= */ - 497, /* (592) join_on_clause_opt ::= ON search_condition */ - 498, /* (593) window_offset_clause_opt ::= */ - 498, /* (594) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - 500, /* (595) window_offset_literal ::= NK_VARIABLE */ - 500, /* (596) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 499, /* (597) jlimit_clause_opt ::= */ - 499, /* (598) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - 501, /* (599) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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 */ - 502, /* (600) hint_list ::= */ - 502, /* (601) hint_list ::= NK_HINT */ - 504, /* (602) tag_mode_opt ::= */ - 504, /* (603) tag_mode_opt ::= TAGS */ - 503, /* (604) set_quantifier_opt ::= */ - 503, /* (605) set_quantifier_opt ::= DISTINCT */ - 503, /* (606) set_quantifier_opt ::= ALL */ - 505, /* (607) select_list ::= select_item */ - 505, /* (608) select_list ::= select_list NK_COMMA select_item */ - 513, /* (609) select_item ::= NK_STAR */ - 513, /* (610) select_item ::= common_expression */ - 513, /* (611) select_item ::= common_expression column_alias */ - 513, /* (612) select_item ::= common_expression AS column_alias */ - 513, /* (613) select_item ::= table_name NK_DOT NK_STAR */ - 443, /* (614) where_clause_opt ::= */ - 443, /* (615) where_clause_opt ::= WHERE search_condition */ - 506, /* (616) partition_by_clause_opt ::= */ - 506, /* (617) partition_by_clause_opt ::= PARTITION BY partition_list */ - 514, /* (618) partition_list ::= partition_item */ - 514, /* (619) partition_list ::= partition_list NK_COMMA partition_item */ - 515, /* (620) partition_item ::= expr_or_subquery */ - 515, /* (621) partition_item ::= expr_or_subquery column_alias */ - 515, /* (622) partition_item ::= expr_or_subquery AS column_alias */ - 510, /* (623) twindow_clause_opt ::= */ - 510, /* (624) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - 510, /* (625) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - 510, /* (626) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 510, /* (627) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - 510, /* (628) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - 510, /* (629) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - 510, /* (630) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 436, /* (631) sliding_opt ::= */ - 436, /* (632) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - 516, /* (633) interval_sliding_duration_literal ::= NK_VARIABLE */ - 516, /* (634) interval_sliding_duration_literal ::= NK_STRING */ - 516, /* (635) interval_sliding_duration_literal ::= NK_INTEGER */ - 509, /* (636) fill_opt ::= */ - 509, /* (637) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - 509, /* (638) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - 509, /* (639) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - 517, /* (640) fill_mode ::= NONE */ - 517, /* (641) fill_mode ::= PREV */ - 517, /* (642) fill_mode ::= NULL */ - 517, /* (643) fill_mode ::= NULL_F */ - 517, /* (644) fill_mode ::= LINEAR */ - 517, /* (645) fill_mode ::= NEXT */ - 511, /* (646) group_by_clause_opt ::= */ - 511, /* (647) group_by_clause_opt ::= GROUP BY group_by_list */ - 518, /* (648) group_by_list ::= expr_or_subquery */ - 518, /* (649) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 512, /* (650) having_clause_opt ::= */ - 512, /* (651) having_clause_opt ::= HAVING search_condition */ - 507, /* (652) range_opt ::= */ - 507, /* (653) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - 507, /* (654) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 508, /* (655) every_opt ::= */ - 508, /* (656) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - 519, /* (657) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - 520, /* (658) query_simple ::= query_specification */ - 520, /* (659) query_simple ::= union_query_expression */ - 524, /* (660) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - 524, /* (661) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - 525, /* (662) query_simple_or_subquery ::= query_simple */ - 525, /* (663) query_simple_or_subquery ::= subquery */ - 442, /* (664) query_or_subquery ::= query_expression */ - 442, /* (665) query_or_subquery ::= subquery */ - 521, /* (666) order_by_clause_opt ::= */ - 521, /* (667) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 522, /* (668) slimit_clause_opt ::= */ - 522, /* (669) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - 522, /* (670) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - 522, /* (671) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 523, /* (672) limit_clause_opt ::= */ - 523, /* (673) limit_clause_opt ::= LIMIT NK_INTEGER */ - 523, /* (674) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - 523, /* (675) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 493, /* (676) subquery ::= NK_LP query_expression NK_RP */ - 493, /* (677) subquery ::= NK_LP subquery NK_RP */ - 380, /* (678) search_condition ::= common_expression */ - 526, /* (679) sort_specification_list ::= sort_specification */ - 526, /* (680) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - 527, /* (681) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 528, /* (682) ordering_specification_opt ::= */ - 528, /* (683) ordering_specification_opt ::= ASC */ - 528, /* (684) ordering_specification_opt ::= DESC */ - 529, /* (685) null_ordering_opt ::= */ - 529, /* (686) null_ordering_opt ::= NULLS FIRST */ - 529, /* (687) null_ordering_opt ::= NULLS LAST */ + 408, /* (411) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + 408, /* (412) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + 408, /* (413) tags_literal ::= NK_PLUS NK_INTEGER */ + 408, /* (414) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + 408, /* (415) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + 408, /* (416) tags_literal ::= NK_MINUS NK_INTEGER */ + 408, /* (417) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + 408, /* (418) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + 408, /* (419) tags_literal ::= NK_FLOAT */ + 408, /* (420) tags_literal ::= NK_PLUS NK_FLOAT */ + 408, /* (421) tags_literal ::= NK_MINUS NK_FLOAT */ + 408, /* (422) tags_literal ::= NK_BIN */ + 408, /* (423) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + 408, /* (424) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + 408, /* (425) tags_literal ::= NK_PLUS NK_BIN */ + 408, /* (426) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + 408, /* (427) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + 408, /* (428) tags_literal ::= NK_MINUS NK_BIN */ + 408, /* (429) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + 408, /* (430) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + 408, /* (431) tags_literal ::= NK_HEX */ + 408, /* (432) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + 408, /* (433) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + 408, /* (434) tags_literal ::= NK_PLUS NK_HEX */ + 408, /* (435) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + 408, /* (436) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + 408, /* (437) tags_literal ::= NK_MINUS NK_HEX */ + 408, /* (438) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + 408, /* (439) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + 408, /* (440) tags_literal ::= NK_STRING */ + 408, /* (441) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + 408, /* (442) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + 408, /* (443) tags_literal ::= NK_BOOL */ + 408, /* (444) tags_literal ::= NULL */ + 408, /* (445) tags_literal ::= literal_func */ + 408, /* (446) tags_literal ::= literal_func NK_PLUS duration_literal */ + 408, /* (447) tags_literal ::= literal_func NK_MINUS duration_literal */ + 411, /* (448) tags_literal_list ::= tags_literal */ + 411, /* (449) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + 365, /* (450) literal ::= NK_INTEGER */ + 365, /* (451) literal ::= NK_FLOAT */ + 365, /* (452) literal ::= NK_STRING */ + 365, /* (453) literal ::= NK_BOOL */ + 365, /* (454) literal ::= TIMESTAMP NK_STRING */ + 365, /* (455) literal ::= duration_literal */ + 365, /* (456) literal ::= NULL */ + 365, /* (457) literal ::= NK_QUESTION */ + 418, /* (458) duration_literal ::= NK_VARIABLE */ + 394, /* (459) signed ::= NK_INTEGER */ + 394, /* (460) signed ::= NK_PLUS NK_INTEGER */ + 394, /* (461) signed ::= NK_MINUS NK_INTEGER */ + 394, /* (462) signed ::= NK_FLOAT */ + 394, /* (463) signed ::= NK_PLUS NK_FLOAT */ + 394, /* (464) signed ::= NK_MINUS NK_FLOAT */ + 464, /* (465) signed_literal ::= signed */ + 464, /* (466) signed_literal ::= NK_STRING */ + 464, /* (467) signed_literal ::= NK_BOOL */ + 464, /* (468) signed_literal ::= TIMESTAMP NK_STRING */ + 464, /* (469) signed_literal ::= duration_literal */ + 464, /* (470) signed_literal ::= NULL */ + 464, /* (471) signed_literal ::= literal_func */ + 464, /* (472) signed_literal ::= NK_QUESTION */ + 465, /* (473) literal_list ::= signed_literal */ + 465, /* (474) literal_list ::= literal_list NK_COMMA signed_literal */ + 377, /* (475) db_name ::= NK_ID */ + 378, /* (476) table_name ::= NK_ID */ + 406, /* (477) column_name ::= NK_ID */ + 420, /* (478) function_name ::= NK_ID */ + 453, /* (479) view_name ::= NK_ID */ + 466, /* (480) table_alias ::= NK_ID */ + 431, /* (481) column_alias ::= NK_ID */ + 431, /* (482) column_alias ::= NK_ALIAS */ + 370, /* (483) user_name ::= NK_ID */ + 379, /* (484) topic_name ::= NK_ID */ + 454, /* (485) stream_name ::= NK_ID */ + 444, /* (486) cgroup_name ::= NK_ID */ + 434, /* (487) index_name ::= NK_ID */ + 467, /* (488) expr_or_subquery ::= expression */ + 460, /* (489) expression ::= literal */ + 460, /* (490) expression ::= pseudo_column */ + 460, /* (491) expression ::= column_reference */ + 460, /* (492) expression ::= function_expression */ + 460, /* (493) expression ::= case_when_expression */ + 460, /* (494) expression ::= NK_LP expression NK_RP */ + 460, /* (495) expression ::= NK_PLUS expr_or_subquery */ + 460, /* (496) expression ::= NK_MINUS expr_or_subquery */ + 460, /* (497) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + 460, /* (498) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + 460, /* (499) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + 460, /* (500) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + 460, /* (501) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + 460, /* (502) expression ::= column_reference NK_ARROW NK_STRING */ + 460, /* (503) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + 460, /* (504) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + 440, /* (505) expression_list ::= expr_or_subquery */ + 440, /* (506) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + 469, /* (507) column_reference ::= column_name */ + 469, /* (508) column_reference ::= table_name NK_DOT column_name */ + 469, /* (509) column_reference ::= NK_ALIAS */ + 469, /* (510) column_reference ::= table_name NK_DOT NK_ALIAS */ + 468, /* (511) pseudo_column ::= ROWTS */ + 468, /* (512) pseudo_column ::= TBNAME */ + 468, /* (513) pseudo_column ::= table_name NK_DOT TBNAME */ + 468, /* (514) pseudo_column ::= QSTART */ + 468, /* (515) pseudo_column ::= QEND */ + 468, /* (516) pseudo_column ::= QDURATION */ + 468, /* (517) pseudo_column ::= WSTART */ + 468, /* (518) pseudo_column ::= WEND */ + 468, /* (519) pseudo_column ::= WDURATION */ + 468, /* (520) pseudo_column ::= IROWTS */ + 468, /* (521) pseudo_column ::= ISFILLED */ + 468, /* (522) pseudo_column ::= QTAGS */ + 470, /* (523) function_expression ::= function_name NK_LP expression_list NK_RP */ + 470, /* (524) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + 470, /* (525) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + 470, /* (526) function_expression ::= literal_func */ + 463, /* (527) literal_func ::= noarg_func NK_LP NK_RP */ + 463, /* (528) literal_func ::= NOW */ + 463, /* (529) literal_func ::= TODAY */ + 474, /* (530) noarg_func ::= NOW */ + 474, /* (531) noarg_func ::= TODAY */ + 474, /* (532) noarg_func ::= TIMEZONE */ + 474, /* (533) noarg_func ::= DATABASE */ + 474, /* (534) noarg_func ::= CLIENT_VERSION */ + 474, /* (535) noarg_func ::= SERVER_VERSION */ + 474, /* (536) noarg_func ::= SERVER_STATUS */ + 474, /* (537) noarg_func ::= CURRENT_USER */ + 474, /* (538) noarg_func ::= USER */ + 472, /* (539) star_func ::= COUNT */ + 472, /* (540) star_func ::= FIRST */ + 472, /* (541) star_func ::= LAST */ + 472, /* (542) star_func ::= LAST_ROW */ + 473, /* (543) star_func_para_list ::= NK_STAR */ + 473, /* (544) star_func_para_list ::= other_para_list */ + 475, /* (545) other_para_list ::= star_func_para */ + 475, /* (546) other_para_list ::= other_para_list NK_COMMA star_func_para */ + 476, /* (547) star_func_para ::= expr_or_subquery */ + 476, /* (548) star_func_para ::= table_name NK_DOT NK_STAR */ + 471, /* (549) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + 471, /* (550) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + 477, /* (551) when_then_list ::= when_then_expr */ + 477, /* (552) when_then_list ::= when_then_list when_then_expr */ + 480, /* (553) when_then_expr ::= WHEN common_expression THEN common_expression */ + 478, /* (554) case_when_else_opt ::= */ + 478, /* (555) case_when_else_opt ::= ELSE common_expression */ + 481, /* (556) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + 481, /* (557) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + 481, /* (558) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + 481, /* (559) predicate ::= expr_or_subquery IS NULL */ + 481, /* (560) predicate ::= expr_or_subquery IS NOT NULL */ + 481, /* (561) predicate ::= expr_or_subquery in_op in_predicate_value */ + 482, /* (562) compare_op ::= NK_LT */ + 482, /* (563) compare_op ::= NK_GT */ + 482, /* (564) compare_op ::= NK_LE */ + 482, /* (565) compare_op ::= NK_GE */ + 482, /* (566) compare_op ::= NK_NE */ + 482, /* (567) compare_op ::= NK_EQ */ + 482, /* (568) compare_op ::= LIKE */ + 482, /* (569) compare_op ::= NOT LIKE */ + 482, /* (570) compare_op ::= MATCH */ + 482, /* (571) compare_op ::= NMATCH */ + 482, /* (572) compare_op ::= CONTAINS */ + 483, /* (573) in_op ::= IN */ + 483, /* (574) in_op ::= NOT IN */ + 484, /* (575) in_predicate_value ::= NK_LP literal_list NK_RP */ + 485, /* (576) boolean_value_expression ::= boolean_primary */ + 485, /* (577) boolean_value_expression ::= NOT boolean_primary */ + 485, /* (578) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + 485, /* (579) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + 486, /* (580) boolean_primary ::= predicate */ + 486, /* (581) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + 479, /* (582) common_expression ::= expr_or_subquery */ + 479, /* (583) common_expression ::= boolean_value_expression */ + 487, /* (584) from_clause_opt ::= */ + 487, /* (585) from_clause_opt ::= FROM table_reference_list */ + 488, /* (586) table_reference_list ::= table_reference */ + 488, /* (587) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + 489, /* (588) table_reference ::= table_primary */ + 489, /* (589) table_reference ::= joined_table */ + 490, /* (590) table_primary ::= table_name alias_opt */ + 490, /* (591) table_primary ::= db_name NK_DOT table_name alias_opt */ + 490, /* (592) table_primary ::= subquery alias_opt */ + 490, /* (593) table_primary ::= parenthesized_joined_table */ + 492, /* (594) alias_opt ::= */ + 492, /* (595) alias_opt ::= table_alias */ + 492, /* (596) alias_opt ::= AS table_alias */ + 494, /* (597) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + 494, /* (598) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + 491, /* (599) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 495, /* (600) join_type ::= */ + 495, /* (601) join_type ::= INNER */ + 495, /* (602) join_type ::= LEFT */ + 495, /* (603) join_type ::= RIGHT */ + 495, /* (604) join_type ::= FULL */ + 496, /* (605) join_subtype ::= */ + 496, /* (606) join_subtype ::= OUTER */ + 496, /* (607) join_subtype ::= SEMI */ + 496, /* (608) join_subtype ::= ANTI */ + 496, /* (609) join_subtype ::= ASOF */ + 496, /* (610) join_subtype ::= WINDOW */ + 497, /* (611) join_on_clause_opt ::= */ + 497, /* (612) join_on_clause_opt ::= ON search_condition */ + 498, /* (613) window_offset_clause_opt ::= */ + 498, /* (614) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + 500, /* (615) window_offset_literal ::= NK_VARIABLE */ + 500, /* (616) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 499, /* (617) jlimit_clause_opt ::= */ + 499, /* (618) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + 501, /* (619) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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 */ + 502, /* (620) hint_list ::= */ + 502, /* (621) hint_list ::= NK_HINT */ + 504, /* (622) tag_mode_opt ::= */ + 504, /* (623) tag_mode_opt ::= TAGS */ + 503, /* (624) set_quantifier_opt ::= */ + 503, /* (625) set_quantifier_opt ::= DISTINCT */ + 503, /* (626) set_quantifier_opt ::= ALL */ + 505, /* (627) select_list ::= select_item */ + 505, /* (628) select_list ::= select_list NK_COMMA select_item */ + 513, /* (629) select_item ::= NK_STAR */ + 513, /* (630) select_item ::= common_expression */ + 513, /* (631) select_item ::= common_expression column_alias */ + 513, /* (632) select_item ::= common_expression AS column_alias */ + 513, /* (633) select_item ::= table_name NK_DOT NK_STAR */ + 443, /* (634) where_clause_opt ::= */ + 443, /* (635) where_clause_opt ::= WHERE search_condition */ + 506, /* (636) partition_by_clause_opt ::= */ + 506, /* (637) partition_by_clause_opt ::= PARTITION BY partition_list */ + 514, /* (638) partition_list ::= partition_item */ + 514, /* (639) partition_list ::= partition_list NK_COMMA partition_item */ + 515, /* (640) partition_item ::= expr_or_subquery */ + 515, /* (641) partition_item ::= expr_or_subquery column_alias */ + 515, /* (642) partition_item ::= expr_or_subquery AS column_alias */ + 510, /* (643) twindow_clause_opt ::= */ + 510, /* (644) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + 510, /* (645) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + 510, /* (646) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 510, /* (647) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + 510, /* (648) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + 510, /* (649) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + 510, /* (650) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 436, /* (651) sliding_opt ::= */ + 436, /* (652) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + 516, /* (653) interval_sliding_duration_literal ::= NK_VARIABLE */ + 516, /* (654) interval_sliding_duration_literal ::= NK_STRING */ + 516, /* (655) interval_sliding_duration_literal ::= NK_INTEGER */ + 509, /* (656) fill_opt ::= */ + 509, /* (657) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + 509, /* (658) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + 509, /* (659) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + 517, /* (660) fill_mode ::= NONE */ + 517, /* (661) fill_mode ::= PREV */ + 517, /* (662) fill_mode ::= NULL */ + 517, /* (663) fill_mode ::= NULL_F */ + 517, /* (664) fill_mode ::= LINEAR */ + 517, /* (665) fill_mode ::= NEXT */ + 511, /* (666) group_by_clause_opt ::= */ + 511, /* (667) group_by_clause_opt ::= GROUP BY group_by_list */ + 518, /* (668) group_by_list ::= expr_or_subquery */ + 518, /* (669) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 512, /* (670) having_clause_opt ::= */ + 512, /* (671) having_clause_opt ::= HAVING search_condition */ + 507, /* (672) range_opt ::= */ + 507, /* (673) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + 507, /* (674) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 508, /* (675) every_opt ::= */ + 508, /* (676) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + 519, /* (677) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + 520, /* (678) query_simple ::= query_specification */ + 520, /* (679) query_simple ::= union_query_expression */ + 524, /* (680) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + 524, /* (681) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + 525, /* (682) query_simple_or_subquery ::= query_simple */ + 525, /* (683) query_simple_or_subquery ::= subquery */ + 442, /* (684) query_or_subquery ::= query_expression */ + 442, /* (685) query_or_subquery ::= subquery */ + 521, /* (686) order_by_clause_opt ::= */ + 521, /* (687) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 522, /* (688) slimit_clause_opt ::= */ + 522, /* (689) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + 522, /* (690) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + 522, /* (691) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 523, /* (692) limit_clause_opt ::= */ + 523, /* (693) limit_clause_opt ::= LIMIT NK_INTEGER */ + 523, /* (694) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + 523, /* (695) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 493, /* (696) subquery ::= NK_LP query_expression NK_RP */ + 493, /* (697) subquery ::= NK_LP subquery NK_RP */ + 380, /* (698) search_condition ::= common_expression */ + 526, /* (699) sort_specification_list ::= sort_specification */ + 526, /* (700) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + 527, /* (701) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 528, /* (702) ordering_specification_opt ::= */ + 528, /* (703) ordering_specification_opt ::= ASC */ + 528, /* (704) ordering_specification_opt ::= DESC */ + 529, /* (705) null_ordering_opt ::= */ + 529, /* (706) null_ordering_opt ::= NULLS FIRST */ + 529, /* (707) null_ordering_opt ::= NULLS LAST */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -4557,283 +4605,303 @@ static const signed char yyRuleInfoNRhs[] = { -7, /* (408) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -4, /* (409) insert_query ::= INSERT INTO full_table_name query_or_subquery */ -1, /* (410) tags_literal ::= NK_INTEGER */ - -2, /* (411) tags_literal ::= NK_PLUS NK_INTEGER */ - -2, /* (412) tags_literal ::= NK_MINUS NK_INTEGER */ - -1, /* (413) tags_literal ::= NK_FLOAT */ - -2, /* (414) tags_literal ::= NK_PLUS NK_FLOAT */ - -2, /* (415) tags_literal ::= NK_MINUS NK_FLOAT */ - -1, /* (416) tags_literal ::= NK_BIN */ - -2, /* (417) tags_literal ::= NK_PLUS NK_BIN */ - -2, /* (418) tags_literal ::= NK_MINUS NK_BIN */ - -1, /* (419) tags_literal ::= NK_HEX */ - -2, /* (420) tags_literal ::= NK_PLUS NK_HEX */ - -2, /* (421) tags_literal ::= NK_MINUS NK_HEX */ - -1, /* (422) tags_literal ::= NK_STRING */ - -1, /* (423) tags_literal ::= NK_BOOL */ - -1, /* (424) tags_literal ::= NULL */ - -1, /* (425) tags_literal ::= literal_func */ - -3, /* (426) tags_literal ::= literal_func NK_PLUS duration_literal */ - -3, /* (427) tags_literal ::= literal_func NK_MINUS duration_literal */ - -1, /* (428) tags_literal_list ::= tags_literal */ - -3, /* (429) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ - -1, /* (430) literal ::= NK_INTEGER */ - -1, /* (431) literal ::= NK_FLOAT */ - -1, /* (432) literal ::= NK_STRING */ - -1, /* (433) literal ::= NK_BOOL */ - -2, /* (434) literal ::= TIMESTAMP NK_STRING */ - -1, /* (435) literal ::= duration_literal */ - -1, /* (436) literal ::= NULL */ - -1, /* (437) literal ::= NK_QUESTION */ - -1, /* (438) duration_literal ::= NK_VARIABLE */ - -1, /* (439) signed ::= NK_INTEGER */ - -2, /* (440) signed ::= NK_PLUS NK_INTEGER */ - -2, /* (441) signed ::= NK_MINUS NK_INTEGER */ - -1, /* (442) signed ::= NK_FLOAT */ - -2, /* (443) signed ::= NK_PLUS NK_FLOAT */ - -2, /* (444) signed ::= NK_MINUS NK_FLOAT */ - -1, /* (445) signed_literal ::= signed */ - -1, /* (446) signed_literal ::= NK_STRING */ - -1, /* (447) signed_literal ::= NK_BOOL */ - -2, /* (448) signed_literal ::= TIMESTAMP NK_STRING */ - -1, /* (449) signed_literal ::= duration_literal */ - -1, /* (450) signed_literal ::= NULL */ - -1, /* (451) signed_literal ::= literal_func */ - -1, /* (452) signed_literal ::= NK_QUESTION */ - -1, /* (453) literal_list ::= signed_literal */ - -3, /* (454) literal_list ::= literal_list NK_COMMA signed_literal */ - -1, /* (455) db_name ::= NK_ID */ - -1, /* (456) table_name ::= NK_ID */ - -1, /* (457) column_name ::= NK_ID */ - -1, /* (458) function_name ::= NK_ID */ - -1, /* (459) view_name ::= NK_ID */ - -1, /* (460) table_alias ::= NK_ID */ - -1, /* (461) column_alias ::= NK_ID */ - -1, /* (462) column_alias ::= NK_ALIAS */ - -1, /* (463) user_name ::= NK_ID */ - -1, /* (464) topic_name ::= NK_ID */ - -1, /* (465) stream_name ::= NK_ID */ - -1, /* (466) cgroup_name ::= NK_ID */ - -1, /* (467) index_name ::= NK_ID */ - -1, /* (468) expr_or_subquery ::= expression */ - -1, /* (469) expression ::= literal */ - -1, /* (470) expression ::= pseudo_column */ - -1, /* (471) expression ::= column_reference */ - -1, /* (472) expression ::= function_expression */ - -1, /* (473) expression ::= case_when_expression */ - -3, /* (474) expression ::= NK_LP expression NK_RP */ - -2, /* (475) expression ::= NK_PLUS expr_or_subquery */ - -2, /* (476) expression ::= NK_MINUS expr_or_subquery */ - -3, /* (477) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - -3, /* (478) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - -3, /* (479) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - -3, /* (480) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - -3, /* (481) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - -3, /* (482) expression ::= column_reference NK_ARROW NK_STRING */ - -3, /* (483) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - -3, /* (484) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - -1, /* (485) expression_list ::= expr_or_subquery */ - -3, /* (486) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - -1, /* (487) column_reference ::= column_name */ - -3, /* (488) column_reference ::= table_name NK_DOT column_name */ - -1, /* (489) column_reference ::= NK_ALIAS */ - -3, /* (490) column_reference ::= table_name NK_DOT NK_ALIAS */ - -1, /* (491) pseudo_column ::= ROWTS */ - -1, /* (492) pseudo_column ::= TBNAME */ - -3, /* (493) pseudo_column ::= table_name NK_DOT TBNAME */ - -1, /* (494) pseudo_column ::= QSTART */ - -1, /* (495) pseudo_column ::= QEND */ - -1, /* (496) pseudo_column ::= QDURATION */ - -1, /* (497) pseudo_column ::= WSTART */ - -1, /* (498) pseudo_column ::= WEND */ - -1, /* (499) pseudo_column ::= WDURATION */ - -1, /* (500) pseudo_column ::= IROWTS */ - -1, /* (501) pseudo_column ::= ISFILLED */ - -1, /* (502) pseudo_column ::= QTAGS */ - -4, /* (503) function_expression ::= function_name NK_LP expression_list NK_RP */ - -4, /* (504) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - -6, /* (505) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - -1, /* (506) function_expression ::= literal_func */ - -3, /* (507) literal_func ::= noarg_func NK_LP NK_RP */ - -1, /* (508) literal_func ::= NOW */ - -1, /* (509) literal_func ::= TODAY */ - -1, /* (510) noarg_func ::= NOW */ - -1, /* (511) noarg_func ::= TODAY */ - -1, /* (512) noarg_func ::= TIMEZONE */ - -1, /* (513) noarg_func ::= DATABASE */ - -1, /* (514) noarg_func ::= CLIENT_VERSION */ - -1, /* (515) noarg_func ::= SERVER_VERSION */ - -1, /* (516) noarg_func ::= SERVER_STATUS */ - -1, /* (517) noarg_func ::= CURRENT_USER */ - -1, /* (518) noarg_func ::= USER */ - -1, /* (519) star_func ::= COUNT */ - -1, /* (520) star_func ::= FIRST */ - -1, /* (521) star_func ::= LAST */ - -1, /* (522) star_func ::= LAST_ROW */ - -1, /* (523) star_func_para_list ::= NK_STAR */ - -1, /* (524) star_func_para_list ::= other_para_list */ - -1, /* (525) other_para_list ::= star_func_para */ - -3, /* (526) other_para_list ::= other_para_list NK_COMMA star_func_para */ - -1, /* (527) star_func_para ::= expr_or_subquery */ - -3, /* (528) star_func_para ::= table_name NK_DOT NK_STAR */ - -4, /* (529) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - -5, /* (530) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - -1, /* (531) when_then_list ::= when_then_expr */ - -2, /* (532) when_then_list ::= when_then_list when_then_expr */ - -4, /* (533) when_then_expr ::= WHEN common_expression THEN common_expression */ - 0, /* (534) case_when_else_opt ::= */ - -2, /* (535) case_when_else_opt ::= ELSE common_expression */ - -3, /* (536) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - -5, /* (537) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - -6, /* (538) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - -3, /* (539) predicate ::= expr_or_subquery IS NULL */ - -4, /* (540) predicate ::= expr_or_subquery IS NOT NULL */ - -3, /* (541) predicate ::= expr_or_subquery in_op in_predicate_value */ - -1, /* (542) compare_op ::= NK_LT */ - -1, /* (543) compare_op ::= NK_GT */ - -1, /* (544) compare_op ::= NK_LE */ - -1, /* (545) compare_op ::= NK_GE */ - -1, /* (546) compare_op ::= NK_NE */ - -1, /* (547) compare_op ::= NK_EQ */ - -1, /* (548) compare_op ::= LIKE */ - -2, /* (549) compare_op ::= NOT LIKE */ - -1, /* (550) compare_op ::= MATCH */ - -1, /* (551) compare_op ::= NMATCH */ - -1, /* (552) compare_op ::= CONTAINS */ - -1, /* (553) in_op ::= IN */ - -2, /* (554) in_op ::= NOT IN */ - -3, /* (555) in_predicate_value ::= NK_LP literal_list NK_RP */ - -1, /* (556) boolean_value_expression ::= boolean_primary */ - -2, /* (557) boolean_value_expression ::= NOT boolean_primary */ - -3, /* (558) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - -3, /* (559) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - -1, /* (560) boolean_primary ::= predicate */ - -3, /* (561) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - -1, /* (562) common_expression ::= expr_or_subquery */ - -1, /* (563) common_expression ::= boolean_value_expression */ - 0, /* (564) from_clause_opt ::= */ - -2, /* (565) from_clause_opt ::= FROM table_reference_list */ - -1, /* (566) table_reference_list ::= table_reference */ - -3, /* (567) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - -1, /* (568) table_reference ::= table_primary */ - -1, /* (569) table_reference ::= joined_table */ - -2, /* (570) table_primary ::= table_name alias_opt */ - -4, /* (571) table_primary ::= db_name NK_DOT table_name alias_opt */ - -2, /* (572) table_primary ::= subquery alias_opt */ - -1, /* (573) table_primary ::= parenthesized_joined_table */ - 0, /* (574) alias_opt ::= */ - -1, /* (575) alias_opt ::= table_alias */ - -2, /* (576) alias_opt ::= AS table_alias */ - -3, /* (577) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - -3, /* (578) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - -8, /* (579) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ - 0, /* (580) join_type ::= */ - -1, /* (581) join_type ::= INNER */ - -1, /* (582) join_type ::= LEFT */ - -1, /* (583) join_type ::= RIGHT */ - -1, /* (584) join_type ::= FULL */ - 0, /* (585) join_subtype ::= */ - -1, /* (586) join_subtype ::= OUTER */ - -1, /* (587) join_subtype ::= SEMI */ - -1, /* (588) join_subtype ::= ANTI */ - -1, /* (589) join_subtype ::= ASOF */ - -1, /* (590) join_subtype ::= WINDOW */ - 0, /* (591) join_on_clause_opt ::= */ - -2, /* (592) join_on_clause_opt ::= ON search_condition */ - 0, /* (593) window_offset_clause_opt ::= */ - -6, /* (594) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ - -1, /* (595) window_offset_literal ::= NK_VARIABLE */ - -2, /* (596) window_offset_literal ::= NK_MINUS NK_VARIABLE */ - 0, /* (597) jlimit_clause_opt ::= */ - -2, /* (598) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - -14, /* (599) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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, /* (600) hint_list ::= */ - -1, /* (601) hint_list ::= NK_HINT */ - 0, /* (602) tag_mode_opt ::= */ - -1, /* (603) tag_mode_opt ::= TAGS */ - 0, /* (604) set_quantifier_opt ::= */ - -1, /* (605) set_quantifier_opt ::= DISTINCT */ - -1, /* (606) set_quantifier_opt ::= ALL */ - -1, /* (607) select_list ::= select_item */ - -3, /* (608) select_list ::= select_list NK_COMMA select_item */ - -1, /* (609) select_item ::= NK_STAR */ - -1, /* (610) select_item ::= common_expression */ - -2, /* (611) select_item ::= common_expression column_alias */ - -3, /* (612) select_item ::= common_expression AS column_alias */ - -3, /* (613) select_item ::= table_name NK_DOT NK_STAR */ - 0, /* (614) where_clause_opt ::= */ - -2, /* (615) where_clause_opt ::= WHERE search_condition */ - 0, /* (616) partition_by_clause_opt ::= */ - -3, /* (617) partition_by_clause_opt ::= PARTITION BY partition_list */ - -1, /* (618) partition_list ::= partition_item */ - -3, /* (619) partition_list ::= partition_list NK_COMMA partition_item */ - -1, /* (620) partition_item ::= expr_or_subquery */ - -2, /* (621) partition_item ::= expr_or_subquery column_alias */ - -3, /* (622) partition_item ::= expr_or_subquery AS column_alias */ - 0, /* (623) twindow_clause_opt ::= */ - -6, /* (624) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ - -4, /* (625) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - -6, /* (626) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -8, /* (627) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ - -7, /* (628) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - -4, /* (629) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ - -6, /* (630) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - 0, /* (631) sliding_opt ::= */ - -4, /* (632) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ - -1, /* (633) interval_sliding_duration_literal ::= NK_VARIABLE */ - -1, /* (634) interval_sliding_duration_literal ::= NK_STRING */ - -1, /* (635) interval_sliding_duration_literal ::= NK_INTEGER */ - 0, /* (636) fill_opt ::= */ - -4, /* (637) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - -6, /* (638) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ - -6, /* (639) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ - -1, /* (640) fill_mode ::= NONE */ - -1, /* (641) fill_mode ::= PREV */ - -1, /* (642) fill_mode ::= NULL */ - -1, /* (643) fill_mode ::= NULL_F */ - -1, /* (644) fill_mode ::= LINEAR */ - -1, /* (645) fill_mode ::= NEXT */ - 0, /* (646) group_by_clause_opt ::= */ - -3, /* (647) group_by_clause_opt ::= GROUP BY group_by_list */ - -1, /* (648) group_by_list ::= expr_or_subquery */ - -3, /* (649) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - 0, /* (650) having_clause_opt ::= */ - -2, /* (651) having_clause_opt ::= HAVING search_condition */ - 0, /* (652) range_opt ::= */ - -6, /* (653) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - -4, /* (654) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ - 0, /* (655) every_opt ::= */ - -4, /* (656) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - -4, /* (657) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - -1, /* (658) query_simple ::= query_specification */ - -1, /* (659) query_simple ::= union_query_expression */ - -4, /* (660) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - -3, /* (661) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - -1, /* (662) query_simple_or_subquery ::= query_simple */ - -1, /* (663) query_simple_or_subquery ::= subquery */ - -1, /* (664) query_or_subquery ::= query_expression */ - -1, /* (665) query_or_subquery ::= subquery */ - 0, /* (666) order_by_clause_opt ::= */ - -3, /* (667) order_by_clause_opt ::= ORDER BY sort_specification_list */ - 0, /* (668) slimit_clause_opt ::= */ - -2, /* (669) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - -4, /* (670) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - -4, /* (671) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - 0, /* (672) limit_clause_opt ::= */ - -2, /* (673) limit_clause_opt ::= LIMIT NK_INTEGER */ - -4, /* (674) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - -4, /* (675) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - -3, /* (676) subquery ::= NK_LP query_expression NK_RP */ - -3, /* (677) subquery ::= NK_LP subquery NK_RP */ - -1, /* (678) search_condition ::= common_expression */ - -1, /* (679) sort_specification_list ::= sort_specification */ - -3, /* (680) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - -3, /* (681) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - 0, /* (682) ordering_specification_opt ::= */ - -1, /* (683) ordering_specification_opt ::= ASC */ - -1, /* (684) ordering_specification_opt ::= DESC */ - 0, /* (685) null_ordering_opt ::= */ - -2, /* (686) null_ordering_opt ::= NULLS FIRST */ - -2, /* (687) null_ordering_opt ::= NULLS LAST */ + -3, /* (411) tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + -3, /* (412) tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ + -2, /* (413) tags_literal ::= NK_PLUS NK_INTEGER */ + -4, /* (414) tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (415) tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ + -2, /* (416) tags_literal ::= NK_MINUS NK_INTEGER */ + -4, /* (417) tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ + -4, /* (418) tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ + -1, /* (419) tags_literal ::= NK_FLOAT */ + -2, /* (420) tags_literal ::= NK_PLUS NK_FLOAT */ + -2, /* (421) tags_literal ::= NK_MINUS NK_FLOAT */ + -1, /* (422) tags_literal ::= NK_BIN */ + -3, /* (423) tags_literal ::= NK_BIN NK_PLUS duration_literal */ + -3, /* (424) tags_literal ::= NK_BIN NK_MINUS duration_literal */ + -2, /* (425) tags_literal ::= NK_PLUS NK_BIN */ + -4, /* (426) tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ + -4, /* (427) tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ + -2, /* (428) tags_literal ::= NK_MINUS NK_BIN */ + -4, /* (429) tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ + -4, /* (430) tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ + -1, /* (431) tags_literal ::= NK_HEX */ + -3, /* (432) tags_literal ::= NK_HEX NK_PLUS duration_literal */ + -3, /* (433) tags_literal ::= NK_HEX NK_MINUS duration_literal */ + -2, /* (434) tags_literal ::= NK_PLUS NK_HEX */ + -4, /* (435) tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ + -4, /* (436) tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ + -2, /* (437) tags_literal ::= NK_MINUS NK_HEX */ + -4, /* (438) tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ + -4, /* (439) tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ + -1, /* (440) tags_literal ::= NK_STRING */ + -3, /* (441) tags_literal ::= NK_STRING NK_PLUS duration_literal */ + -3, /* (442) tags_literal ::= NK_STRING NK_MINUS duration_literal */ + -1, /* (443) tags_literal ::= NK_BOOL */ + -1, /* (444) tags_literal ::= NULL */ + -1, /* (445) tags_literal ::= literal_func */ + -3, /* (446) tags_literal ::= literal_func NK_PLUS duration_literal */ + -3, /* (447) tags_literal ::= literal_func NK_MINUS duration_literal */ + -1, /* (448) tags_literal_list ::= tags_literal */ + -3, /* (449) tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ + -1, /* (450) literal ::= NK_INTEGER */ + -1, /* (451) literal ::= NK_FLOAT */ + -1, /* (452) literal ::= NK_STRING */ + -1, /* (453) literal ::= NK_BOOL */ + -2, /* (454) literal ::= TIMESTAMP NK_STRING */ + -1, /* (455) literal ::= duration_literal */ + -1, /* (456) literal ::= NULL */ + -1, /* (457) literal ::= NK_QUESTION */ + -1, /* (458) duration_literal ::= NK_VARIABLE */ + -1, /* (459) signed ::= NK_INTEGER */ + -2, /* (460) signed ::= NK_PLUS NK_INTEGER */ + -2, /* (461) signed ::= NK_MINUS NK_INTEGER */ + -1, /* (462) signed ::= NK_FLOAT */ + -2, /* (463) signed ::= NK_PLUS NK_FLOAT */ + -2, /* (464) signed ::= NK_MINUS NK_FLOAT */ + -1, /* (465) signed_literal ::= signed */ + -1, /* (466) signed_literal ::= NK_STRING */ + -1, /* (467) signed_literal ::= NK_BOOL */ + -2, /* (468) signed_literal ::= TIMESTAMP NK_STRING */ + -1, /* (469) signed_literal ::= duration_literal */ + -1, /* (470) signed_literal ::= NULL */ + -1, /* (471) signed_literal ::= literal_func */ + -1, /* (472) signed_literal ::= NK_QUESTION */ + -1, /* (473) literal_list ::= signed_literal */ + -3, /* (474) literal_list ::= literal_list NK_COMMA signed_literal */ + -1, /* (475) db_name ::= NK_ID */ + -1, /* (476) table_name ::= NK_ID */ + -1, /* (477) column_name ::= NK_ID */ + -1, /* (478) function_name ::= NK_ID */ + -1, /* (479) view_name ::= NK_ID */ + -1, /* (480) table_alias ::= NK_ID */ + -1, /* (481) column_alias ::= NK_ID */ + -1, /* (482) column_alias ::= NK_ALIAS */ + -1, /* (483) user_name ::= NK_ID */ + -1, /* (484) topic_name ::= NK_ID */ + -1, /* (485) stream_name ::= NK_ID */ + -1, /* (486) cgroup_name ::= NK_ID */ + -1, /* (487) index_name ::= NK_ID */ + -1, /* (488) expr_or_subquery ::= expression */ + -1, /* (489) expression ::= literal */ + -1, /* (490) expression ::= pseudo_column */ + -1, /* (491) expression ::= column_reference */ + -1, /* (492) expression ::= function_expression */ + -1, /* (493) expression ::= case_when_expression */ + -3, /* (494) expression ::= NK_LP expression NK_RP */ + -2, /* (495) expression ::= NK_PLUS expr_or_subquery */ + -2, /* (496) expression ::= NK_MINUS expr_or_subquery */ + -3, /* (497) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + -3, /* (498) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + -3, /* (499) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + -3, /* (500) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + -3, /* (501) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + -3, /* (502) expression ::= column_reference NK_ARROW NK_STRING */ + -3, /* (503) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + -3, /* (504) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + -1, /* (505) expression_list ::= expr_or_subquery */ + -3, /* (506) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + -1, /* (507) column_reference ::= column_name */ + -3, /* (508) column_reference ::= table_name NK_DOT column_name */ + -1, /* (509) column_reference ::= NK_ALIAS */ + -3, /* (510) column_reference ::= table_name NK_DOT NK_ALIAS */ + -1, /* (511) pseudo_column ::= ROWTS */ + -1, /* (512) pseudo_column ::= TBNAME */ + -3, /* (513) pseudo_column ::= table_name NK_DOT TBNAME */ + -1, /* (514) pseudo_column ::= QSTART */ + -1, /* (515) pseudo_column ::= QEND */ + -1, /* (516) pseudo_column ::= QDURATION */ + -1, /* (517) pseudo_column ::= WSTART */ + -1, /* (518) pseudo_column ::= WEND */ + -1, /* (519) pseudo_column ::= WDURATION */ + -1, /* (520) pseudo_column ::= IROWTS */ + -1, /* (521) pseudo_column ::= ISFILLED */ + -1, /* (522) pseudo_column ::= QTAGS */ + -4, /* (523) function_expression ::= function_name NK_LP expression_list NK_RP */ + -4, /* (524) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + -6, /* (525) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + -1, /* (526) function_expression ::= literal_func */ + -3, /* (527) literal_func ::= noarg_func NK_LP NK_RP */ + -1, /* (528) literal_func ::= NOW */ + -1, /* (529) literal_func ::= TODAY */ + -1, /* (530) noarg_func ::= NOW */ + -1, /* (531) noarg_func ::= TODAY */ + -1, /* (532) noarg_func ::= TIMEZONE */ + -1, /* (533) noarg_func ::= DATABASE */ + -1, /* (534) noarg_func ::= CLIENT_VERSION */ + -1, /* (535) noarg_func ::= SERVER_VERSION */ + -1, /* (536) noarg_func ::= SERVER_STATUS */ + -1, /* (537) noarg_func ::= CURRENT_USER */ + -1, /* (538) noarg_func ::= USER */ + -1, /* (539) star_func ::= COUNT */ + -1, /* (540) star_func ::= FIRST */ + -1, /* (541) star_func ::= LAST */ + -1, /* (542) star_func ::= LAST_ROW */ + -1, /* (543) star_func_para_list ::= NK_STAR */ + -1, /* (544) star_func_para_list ::= other_para_list */ + -1, /* (545) other_para_list ::= star_func_para */ + -3, /* (546) other_para_list ::= other_para_list NK_COMMA star_func_para */ + -1, /* (547) star_func_para ::= expr_or_subquery */ + -3, /* (548) star_func_para ::= table_name NK_DOT NK_STAR */ + -4, /* (549) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + -5, /* (550) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + -1, /* (551) when_then_list ::= when_then_expr */ + -2, /* (552) when_then_list ::= when_then_list when_then_expr */ + -4, /* (553) when_then_expr ::= WHEN common_expression THEN common_expression */ + 0, /* (554) case_when_else_opt ::= */ + -2, /* (555) case_when_else_opt ::= ELSE common_expression */ + -3, /* (556) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + -5, /* (557) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + -6, /* (558) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + -3, /* (559) predicate ::= expr_or_subquery IS NULL */ + -4, /* (560) predicate ::= expr_or_subquery IS NOT NULL */ + -3, /* (561) predicate ::= expr_or_subquery in_op in_predicate_value */ + -1, /* (562) compare_op ::= NK_LT */ + -1, /* (563) compare_op ::= NK_GT */ + -1, /* (564) compare_op ::= NK_LE */ + -1, /* (565) compare_op ::= NK_GE */ + -1, /* (566) compare_op ::= NK_NE */ + -1, /* (567) compare_op ::= NK_EQ */ + -1, /* (568) compare_op ::= LIKE */ + -2, /* (569) compare_op ::= NOT LIKE */ + -1, /* (570) compare_op ::= MATCH */ + -1, /* (571) compare_op ::= NMATCH */ + -1, /* (572) compare_op ::= CONTAINS */ + -1, /* (573) in_op ::= IN */ + -2, /* (574) in_op ::= NOT IN */ + -3, /* (575) in_predicate_value ::= NK_LP literal_list NK_RP */ + -1, /* (576) boolean_value_expression ::= boolean_primary */ + -2, /* (577) boolean_value_expression ::= NOT boolean_primary */ + -3, /* (578) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + -3, /* (579) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + -1, /* (580) boolean_primary ::= predicate */ + -3, /* (581) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + -1, /* (582) common_expression ::= expr_or_subquery */ + -1, /* (583) common_expression ::= boolean_value_expression */ + 0, /* (584) from_clause_opt ::= */ + -2, /* (585) from_clause_opt ::= FROM table_reference_list */ + -1, /* (586) table_reference_list ::= table_reference */ + -3, /* (587) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + -1, /* (588) table_reference ::= table_primary */ + -1, /* (589) table_reference ::= joined_table */ + -2, /* (590) table_primary ::= table_name alias_opt */ + -4, /* (591) table_primary ::= db_name NK_DOT table_name alias_opt */ + -2, /* (592) table_primary ::= subquery alias_opt */ + -1, /* (593) table_primary ::= parenthesized_joined_table */ + 0, /* (594) alias_opt ::= */ + -1, /* (595) alias_opt ::= table_alias */ + -2, /* (596) alias_opt ::= AS table_alias */ + -3, /* (597) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + -3, /* (598) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + -8, /* (599) joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + 0, /* (600) join_type ::= */ + -1, /* (601) join_type ::= INNER */ + -1, /* (602) join_type ::= LEFT */ + -1, /* (603) join_type ::= RIGHT */ + -1, /* (604) join_type ::= FULL */ + 0, /* (605) join_subtype ::= */ + -1, /* (606) join_subtype ::= OUTER */ + -1, /* (607) join_subtype ::= SEMI */ + -1, /* (608) join_subtype ::= ANTI */ + -1, /* (609) join_subtype ::= ASOF */ + -1, /* (610) join_subtype ::= WINDOW */ + 0, /* (611) join_on_clause_opt ::= */ + -2, /* (612) join_on_clause_opt ::= ON search_condition */ + 0, /* (613) window_offset_clause_opt ::= */ + -6, /* (614) window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + -1, /* (615) window_offset_literal ::= NK_VARIABLE */ + -2, /* (616) window_offset_literal ::= NK_MINUS NK_VARIABLE */ + 0, /* (617) jlimit_clause_opt ::= */ + -2, /* (618) jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + -14, /* (619) query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_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, /* (620) hint_list ::= */ + -1, /* (621) hint_list ::= NK_HINT */ + 0, /* (622) tag_mode_opt ::= */ + -1, /* (623) tag_mode_opt ::= TAGS */ + 0, /* (624) set_quantifier_opt ::= */ + -1, /* (625) set_quantifier_opt ::= DISTINCT */ + -1, /* (626) set_quantifier_opt ::= ALL */ + -1, /* (627) select_list ::= select_item */ + -3, /* (628) select_list ::= select_list NK_COMMA select_item */ + -1, /* (629) select_item ::= NK_STAR */ + -1, /* (630) select_item ::= common_expression */ + -2, /* (631) select_item ::= common_expression column_alias */ + -3, /* (632) select_item ::= common_expression AS column_alias */ + -3, /* (633) select_item ::= table_name NK_DOT NK_STAR */ + 0, /* (634) where_clause_opt ::= */ + -2, /* (635) where_clause_opt ::= WHERE search_condition */ + 0, /* (636) partition_by_clause_opt ::= */ + -3, /* (637) partition_by_clause_opt ::= PARTITION BY partition_list */ + -1, /* (638) partition_list ::= partition_item */ + -3, /* (639) partition_list ::= partition_list NK_COMMA partition_item */ + -1, /* (640) partition_item ::= expr_or_subquery */ + -2, /* (641) partition_item ::= expr_or_subquery column_alias */ + -3, /* (642) partition_item ::= expr_or_subquery AS column_alias */ + 0, /* (643) twindow_clause_opt ::= */ + -6, /* (644) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + -4, /* (645) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + -6, /* (646) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -8, /* (647) twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + -7, /* (648) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + -4, /* (649) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + -6, /* (650) twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + 0, /* (651) sliding_opt ::= */ + -4, /* (652) sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ + -1, /* (653) interval_sliding_duration_literal ::= NK_VARIABLE */ + -1, /* (654) interval_sliding_duration_literal ::= NK_STRING */ + -1, /* (655) interval_sliding_duration_literal ::= NK_INTEGER */ + 0, /* (656) fill_opt ::= */ + -4, /* (657) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + -6, /* (658) fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + -6, /* (659) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + -1, /* (660) fill_mode ::= NONE */ + -1, /* (661) fill_mode ::= PREV */ + -1, /* (662) fill_mode ::= NULL */ + -1, /* (663) fill_mode ::= NULL_F */ + -1, /* (664) fill_mode ::= LINEAR */ + -1, /* (665) fill_mode ::= NEXT */ + 0, /* (666) group_by_clause_opt ::= */ + -3, /* (667) group_by_clause_opt ::= GROUP BY group_by_list */ + -1, /* (668) group_by_list ::= expr_or_subquery */ + -3, /* (669) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + 0, /* (670) having_clause_opt ::= */ + -2, /* (671) having_clause_opt ::= HAVING search_condition */ + 0, /* (672) range_opt ::= */ + -6, /* (673) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + -4, /* (674) range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + 0, /* (675) every_opt ::= */ + -4, /* (676) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + -4, /* (677) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + -1, /* (678) query_simple ::= query_specification */ + -1, /* (679) query_simple ::= union_query_expression */ + -4, /* (680) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + -3, /* (681) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + -1, /* (682) query_simple_or_subquery ::= query_simple */ + -1, /* (683) query_simple_or_subquery ::= subquery */ + -1, /* (684) query_or_subquery ::= query_expression */ + -1, /* (685) query_or_subquery ::= subquery */ + 0, /* (686) order_by_clause_opt ::= */ + -3, /* (687) order_by_clause_opt ::= ORDER BY sort_specification_list */ + 0, /* (688) slimit_clause_opt ::= */ + -2, /* (689) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + -4, /* (690) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + -4, /* (691) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + 0, /* (692) limit_clause_opt ::= */ + -2, /* (693) limit_clause_opt ::= LIMIT NK_INTEGER */ + -4, /* (694) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + -4, /* (695) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + -3, /* (696) subquery ::= NK_LP query_expression NK_RP */ + -3, /* (697) subquery ::= NK_LP subquery NK_RP */ + -1, /* (698) search_condition ::= common_expression */ + -1, /* (699) sort_specification_list ::= sort_specification */ + -3, /* (700) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + -3, /* (701) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + 0, /* (702) ordering_specification_opt ::= */ + -1, /* (703) ordering_specification_opt ::= ASC */ + -1, /* (704) ordering_specification_opt ::= DESC */ + 0, /* (705) null_ordering_opt ::= */ + -2, /* (706) null_ordering_opt ::= NULLS FIRST */ + -2, /* (707) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -4989,15 +5057,15 @@ static YYACTIONTYPE yy_reduce( case 308: /* tag_list_opt ::= */ yytestcase(yyruleno==308); case 374: /* col_list_opt ::= */ yytestcase(yyruleno==374); case 376: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==376); - case 616: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==616); - case 646: /* group_by_clause_opt ::= */ yytestcase(yyruleno==646); - case 666: /* order_by_clause_opt ::= */ yytestcase(yyruleno==666); + case 636: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==636); + case 666: /* group_by_clause_opt ::= */ yytestcase(yyruleno==666); + case 686: /* order_by_clause_opt ::= */ yytestcase(yyruleno==686); { yymsp[1].minor.yy444 = NULL; } break; case 28: /* white_list_opt ::= white_list */ case 220: /* tags_def_opt ::= tags_def */ yytestcase(yyruleno==220); case 377: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==377); - case 524: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==524); + case 544: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==544); { yylhsminor.yy444 = yymsp[0].minor.yy444; } yymsp[0].minor.yy444 = yylhsminor.yy444; break; @@ -5082,27 +5150,27 @@ static YYACTIONTYPE yy_reduce( case 161: /* end_opt ::= */ yytestcase(yyruleno==161); case 303: /* like_pattern_opt ::= */ yytestcase(yyruleno==303); case 388: /* subtable_opt ::= */ yytestcase(yyruleno==388); - case 534: /* case_when_else_opt ::= */ yytestcase(yyruleno==534); - case 564: /* from_clause_opt ::= */ yytestcase(yyruleno==564); - case 591: /* join_on_clause_opt ::= */ yytestcase(yyruleno==591); - case 593: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==593); - case 597: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==597); - case 614: /* where_clause_opt ::= */ yytestcase(yyruleno==614); - case 623: /* twindow_clause_opt ::= */ yytestcase(yyruleno==623); - case 631: /* sliding_opt ::= */ yytestcase(yyruleno==631); - case 636: /* fill_opt ::= */ yytestcase(yyruleno==636); - case 650: /* having_clause_opt ::= */ yytestcase(yyruleno==650); - case 652: /* range_opt ::= */ yytestcase(yyruleno==652); - case 655: /* every_opt ::= */ yytestcase(yyruleno==655); - case 668: /* slimit_clause_opt ::= */ yytestcase(yyruleno==668); - case 672: /* limit_clause_opt ::= */ yytestcase(yyruleno==672); + case 554: /* case_when_else_opt ::= */ yytestcase(yyruleno==554); + case 584: /* from_clause_opt ::= */ yytestcase(yyruleno==584); + case 611: /* join_on_clause_opt ::= */ yytestcase(yyruleno==611); + case 613: /* window_offset_clause_opt ::= */ yytestcase(yyruleno==613); + case 617: /* jlimit_clause_opt ::= */ yytestcase(yyruleno==617); + case 634: /* where_clause_opt ::= */ yytestcase(yyruleno==634); + case 643: /* twindow_clause_opt ::= */ yytestcase(yyruleno==643); + case 651: /* sliding_opt ::= */ yytestcase(yyruleno==651); + case 656: /* fill_opt ::= */ yytestcase(yyruleno==656); + case 670: /* having_clause_opt ::= */ yytestcase(yyruleno==670); + case 672: /* range_opt ::= */ yytestcase(yyruleno==672); + case 675: /* every_opt ::= */ yytestcase(yyruleno==675); + case 688: /* slimit_clause_opt ::= */ yytestcase(yyruleno==688); + case 692: /* limit_clause_opt ::= */ yytestcase(yyruleno==692); { yymsp[1].minor.yy1032 = NULL; } break; case 53: /* with_opt ::= WITH search_condition */ - case 565: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==565); - case 592: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==592); - case 615: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==615); - case 651: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==651); + case 585: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==585); + case 612: /* join_on_clause_opt ::= ON search_condition */ yytestcase(yyruleno==612); + case 635: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==635); + case 671: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==671); { yymsp[-1].minor.yy1032 = yymsp[0].minor.yy1032; } break; case 54: /* cmd ::= CREATE DNODE dnode_endpoint */ @@ -5145,32 +5213,32 @@ static YYACTIONTYPE yy_reduce( case 331: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==331); case 332: /* sma_func_name ::= LAST */ yytestcase(yyruleno==332); case 333: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==333); - case 455: /* db_name ::= NK_ID */ yytestcase(yyruleno==455); - case 456: /* table_name ::= NK_ID */ yytestcase(yyruleno==456); - case 457: /* column_name ::= NK_ID */ yytestcase(yyruleno==457); - case 458: /* function_name ::= NK_ID */ yytestcase(yyruleno==458); - case 459: /* view_name ::= NK_ID */ yytestcase(yyruleno==459); - case 460: /* table_alias ::= NK_ID */ yytestcase(yyruleno==460); - case 461: /* column_alias ::= NK_ID */ yytestcase(yyruleno==461); - case 462: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==462); - case 463: /* user_name ::= NK_ID */ yytestcase(yyruleno==463); - case 464: /* topic_name ::= NK_ID */ yytestcase(yyruleno==464); - case 465: /* stream_name ::= NK_ID */ yytestcase(yyruleno==465); - case 466: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==466); - case 467: /* index_name ::= NK_ID */ yytestcase(yyruleno==467); - case 510: /* noarg_func ::= NOW */ yytestcase(yyruleno==510); - case 511: /* noarg_func ::= TODAY */ yytestcase(yyruleno==511); - case 512: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==512); - case 513: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==513); - case 514: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==514); - case 515: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==515); - case 516: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==516); - case 517: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==517); - case 518: /* noarg_func ::= USER */ yytestcase(yyruleno==518); - case 519: /* star_func ::= COUNT */ yytestcase(yyruleno==519); - case 520: /* star_func ::= FIRST */ yytestcase(yyruleno==520); - case 521: /* star_func ::= LAST */ yytestcase(yyruleno==521); - case 522: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==522); + case 475: /* db_name ::= NK_ID */ yytestcase(yyruleno==475); + case 476: /* table_name ::= NK_ID */ yytestcase(yyruleno==476); + case 477: /* column_name ::= NK_ID */ yytestcase(yyruleno==477); + case 478: /* function_name ::= NK_ID */ yytestcase(yyruleno==478); + case 479: /* view_name ::= NK_ID */ yytestcase(yyruleno==479); + case 480: /* table_alias ::= NK_ID */ yytestcase(yyruleno==480); + case 481: /* column_alias ::= NK_ID */ yytestcase(yyruleno==481); + case 482: /* column_alias ::= NK_ALIAS */ yytestcase(yyruleno==482); + case 483: /* user_name ::= NK_ID */ yytestcase(yyruleno==483); + case 484: /* topic_name ::= NK_ID */ yytestcase(yyruleno==484); + case 485: /* stream_name ::= NK_ID */ yytestcase(yyruleno==485); + case 486: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==486); + case 487: /* index_name ::= NK_ID */ yytestcase(yyruleno==487); + case 530: /* noarg_func ::= NOW */ yytestcase(yyruleno==530); + case 531: /* noarg_func ::= TODAY */ yytestcase(yyruleno==531); + case 532: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==532); + case 533: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==533); + case 534: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==534); + case 535: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==535); + case 536: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==536); + case 537: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==537); + case 538: /* noarg_func ::= USER */ yytestcase(yyruleno==538); + case 539: /* star_func ::= COUNT */ yytestcase(yyruleno==539); + case 540: /* star_func ::= FIRST */ yytestcase(yyruleno==540); + case 541: /* star_func ::= LAST */ yytestcase(yyruleno==541); + case 542: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==542); { yylhsminor.yy729 = yymsp[0].minor.yy0; } yymsp[0].minor.yy729 = yylhsminor.yy729; break; @@ -5181,16 +5249,16 @@ static YYACTIONTYPE yy_reduce( case 358: /* agg_func_opt ::= */ yytestcase(yyruleno==358); case 364: /* or_replace_opt ::= */ yytestcase(yyruleno==364); case 390: /* ignore_opt ::= */ yytestcase(yyruleno==390); - case 602: /* tag_mode_opt ::= */ yytestcase(yyruleno==602); - case 604: /* set_quantifier_opt ::= */ yytestcase(yyruleno==604); + case 622: /* tag_mode_opt ::= */ yytestcase(yyruleno==622); + case 624: /* set_quantifier_opt ::= */ yytestcase(yyruleno==624); { yymsp[1].minor.yy957 = false; } break; case 69: /* force_opt ::= FORCE */ case 70: /* unsafe_opt ::= UNSAFE */ yytestcase(yyruleno==70); case 352: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==352); case 359: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==359); - case 603: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==603); - case 605: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==605); + case 623: /* tag_mode_opt ::= TAGS */ yytestcase(yyruleno==623); + case 625: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==625); { yymsp[0].minor.yy957 = true; } break; case 71: /* cmd ::= ALTER CLUSTER NK_STRING */ @@ -5483,13 +5551,13 @@ static YYACTIONTYPE yy_reduce( case 241: /* col_name_list ::= col_name */ yytestcase(yyruleno==241); case 309: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==309); case 326: /* func_list ::= func */ yytestcase(yyruleno==326); - case 428: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==428); - case 453: /* literal_list ::= signed_literal */ yytestcase(yyruleno==453); - case 525: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==525); - case 531: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==531); - case 607: /* select_list ::= select_item */ yytestcase(yyruleno==607); - case 618: /* partition_list ::= partition_item */ yytestcase(yyruleno==618); - case 679: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==679); + case 448: /* tags_literal_list ::= tags_literal */ yytestcase(yyruleno==448); + case 473: /* literal_list ::= signed_literal */ yytestcase(yyruleno==473); + case 545: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==545); + case 551: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==551); + case 627: /* select_list ::= select_item */ yytestcase(yyruleno==627); + case 638: /* partition_list ::= partition_item */ yytestcase(yyruleno==638); + case 699: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==699); { yylhsminor.yy444 = createNodeList(pCxt, yymsp[0].minor.yy1032); } yymsp[0].minor.yy444 = yylhsminor.yy444; break; @@ -5500,12 +5568,12 @@ static YYACTIONTYPE yy_reduce( case 242: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==242); case 310: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==310); case 327: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==327); - case 429: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==429); - case 454: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==454); - case 526: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==526); - case 608: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==608); - case 619: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==619); - case 680: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==680); + case 449: /* tags_literal_list ::= tags_literal_list NK_COMMA tags_literal */ yytestcase(yyruleno==449); + case 474: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==474); + case 546: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==546); + case 628: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==628); + case 639: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==639); + case 700: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==700); { yylhsminor.yy444 = addNodeToList(pCxt, yymsp[-2].minor.yy444, yymsp[0].minor.yy1032); } yymsp[-2].minor.yy444 = yylhsminor.yy444; break; @@ -5596,7 +5664,7 @@ static YYACTIONTYPE yy_reduce( yymsp[-5].minor.yy1032 = yylhsminor.yy1032; break; case 183: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ - case 532: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==532); + case 552: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==552); { yylhsminor.yy444 = addNodeToList(pCxt, yymsp[-1].minor.yy444, yymsp[0].minor.yy1032); } yymsp[-1].minor.yy444 = yylhsminor.yy444; break; @@ -5744,12 +5812,12 @@ static YYACTIONTYPE yy_reduce( { yymsp[-1].minor.yy505.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy505.val = yymsp[0].minor.yy0; } break; case 234: /* duration_list ::= duration_literal */ - case 485: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==485); + case 505: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==505); { yylhsminor.yy444 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy1032)); } yymsp[0].minor.yy444 = yylhsminor.yy444; break; case 235: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 486: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==486); + case 506: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==506); { yylhsminor.yy444 = addNodeToList(pCxt, yymsp[-2].minor.yy444, releaseRawExprNode(pCxt, yymsp[0].minor.yy1032)); } yymsp[-2].minor.yy444 = yylhsminor.yy444; break; @@ -6010,7 +6078,7 @@ static YYACTIONTYPE yy_reduce( yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; case 329: /* sma_func_name ::= function_name */ - case 575: /* alias_opt ::= table_alias */ yytestcase(yyruleno==575); + case 595: /* alias_opt ::= table_alias */ yytestcase(yyruleno==595); { yylhsminor.yy729 = yymsp[0].minor.yy729; } yymsp[0].minor.yy729 = yylhsminor.yy729; break; @@ -6146,8 +6214,8 @@ static YYACTIONTYPE yy_reduce( yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; case 389: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 632: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==632); - case 656: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==656); + case 652: /* sliding_opt ::= SLIDING NK_LP interval_sliding_duration_literal NK_RP */ yytestcase(yyruleno==652); + case 676: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==676); { yymsp[-3].minor.yy1032 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032); } break; case 392: /* cmd ::= KILL CONNECTION NK_INTEGER */ @@ -6190,17 +6258,33 @@ static YYACTIONTYPE yy_reduce( { yymsp[-3].minor.yy1032 = createInsertStmt(pCxt, yymsp[-1].minor.yy1032, NULL, yymsp[0].minor.yy1032); } break; case 410: /* tags_literal ::= NK_INTEGER */ - case 416: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==416); - case 419: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==419); + case 422: /* tags_literal ::= NK_BIN */ yytestcase(yyruleno==422); + case 431: /* tags_literal ::= NK_HEX */ yytestcase(yyruleno==431); { yylhsminor.yy1032 = createRawValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 411: /* tags_literal ::= NK_PLUS NK_INTEGER */ - case 412: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==412); - case 417: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==417); - case 418: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==418); - case 420: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==420); - case 421: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==421); + case 411: /* tags_literal ::= NK_INTEGER NK_PLUS duration_literal */ + case 412: /* tags_literal ::= NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==412); + case 423: /* tags_literal ::= NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==423); + case 424: /* tags_literal ::= NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==424); + case 432: /* tags_literal ::= NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==432); + case 433: /* tags_literal ::= NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==433); + case 441: /* tags_literal ::= NK_STRING NK_PLUS duration_literal */ yytestcase(yyruleno==441); + case 442: /* tags_literal ::= NK_STRING NK_MINUS duration_literal */ yytestcase(yyruleno==442); +{ + SToken l = yymsp[-2].minor.yy0; + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); + l.n = (r.z + r.n) - l.z; + yylhsminor.yy1032 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy1032); + } + yymsp[-2].minor.yy1032 = yylhsminor.yy1032; + break; + case 413: /* tags_literal ::= NK_PLUS NK_INTEGER */ + case 416: /* tags_literal ::= NK_MINUS NK_INTEGER */ yytestcase(yyruleno==416); + case 425: /* tags_literal ::= NK_PLUS NK_BIN */ yytestcase(yyruleno==425); + case 428: /* tags_literal ::= NK_MINUS NK_BIN */ yytestcase(yyruleno==428); + case 434: /* tags_literal ::= NK_PLUS NK_HEX */ yytestcase(yyruleno==434); + case 437: /* tags_literal ::= NK_MINUS NK_HEX */ yytestcase(yyruleno==437); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -6208,12 +6292,32 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 413: /* tags_literal ::= NK_FLOAT */ + case 414: /* tags_literal ::= NK_PLUS NK_INTEGER NK_PLUS duration_literal */ + case 415: /* tags_literal ::= NK_PLUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==415); + case 417: /* tags_literal ::= NK_MINUS NK_INTEGER NK_PLUS duration_literal */ yytestcase(yyruleno==417); + case 418: /* tags_literal ::= NK_MINUS NK_INTEGER NK_MINUS duration_literal */ yytestcase(yyruleno==418); + case 426: /* tags_literal ::= NK_PLUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==426); + case 427: /* tags_literal ::= NK_PLUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==427); + case 429: /* tags_literal ::= NK_MINUS NK_BIN NK_PLUS duration_literal */ yytestcase(yyruleno==429); + case 430: /* tags_literal ::= NK_MINUS NK_BIN NK_MINUS duration_literal */ yytestcase(yyruleno==430); + case 435: /* tags_literal ::= NK_PLUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==435); + case 436: /* tags_literal ::= NK_PLUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==436); + case 438: /* tags_literal ::= NK_MINUS NK_HEX NK_PLUS duration_literal */ yytestcase(yyruleno==438); + case 439: /* tags_literal ::= NK_MINUS NK_HEX NK_MINUS duration_literal */ yytestcase(yyruleno==439); +{ + SToken l = yymsp[-3].minor.yy0; + SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); + l.n = (r.z + r.n) - l.z; + yylhsminor.yy1032 = createRawValueNodeExt(pCxt, TSDB_DATA_TYPE_BINARY, &l, NULL, yymsp[0].minor.yy1032); + } + yymsp[-3].minor.yy1032 = yylhsminor.yy1032; + break; + case 419: /* tags_literal ::= NK_FLOAT */ { yylhsminor.yy1032 = createRawValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 414: /* tags_literal ::= NK_PLUS NK_FLOAT */ - case 415: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==415); + case 420: /* tags_literal ::= NK_PLUS NK_FLOAT */ + case 421: /* tags_literal ::= NK_MINUS NK_FLOAT */ yytestcase(yyruleno==421); { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -6221,24 +6325,24 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 422: /* tags_literal ::= NK_STRING */ + case 440: /* tags_literal ::= NK_STRING */ { yylhsminor.yy1032 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 423: /* tags_literal ::= NK_BOOL */ + case 443: /* tags_literal ::= NK_BOOL */ { yylhsminor.yy1032 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 424: /* tags_literal ::= NULL */ + case 444: /* tags_literal ::= NULL */ { yylhsminor.yy1032 = createRawValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 425: /* tags_literal ::= literal_func */ + case 445: /* tags_literal ::= literal_func */ { yylhsminor.yy1032 = createRawValueNode(pCxt, TSDB_DATA_TYPE_BINARY, NULL, yymsp[0].minor.yy1032); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 426: /* tags_literal ::= literal_func NK_PLUS duration_literal */ - case 427: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==427); + case 446: /* tags_literal ::= literal_func NK_PLUS duration_literal */ + case 447: /* tags_literal ::= literal_func NK_MINUS duration_literal */ yytestcase(yyruleno==447); { SToken l = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken r = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6247,72 +6351,72 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 430: /* literal ::= NK_INTEGER */ + case 450: /* literal ::= NK_INTEGER */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 431: /* literal ::= NK_FLOAT */ + case 451: /* literal ::= NK_FLOAT */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 432: /* literal ::= NK_STRING */ + case 452: /* literal ::= NK_STRING */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 433: /* literal ::= NK_BOOL */ + case 453: /* literal ::= NK_BOOL */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 434: /* literal ::= TIMESTAMP NK_STRING */ + case 454: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 435: /* literal ::= duration_literal */ - case 445: /* signed_literal ::= signed */ yytestcase(yyruleno==445); - case 468: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==468); - case 469: /* expression ::= literal */ yytestcase(yyruleno==469); - case 471: /* expression ::= column_reference */ yytestcase(yyruleno==471); - case 472: /* expression ::= function_expression */ yytestcase(yyruleno==472); - case 473: /* expression ::= case_when_expression */ yytestcase(yyruleno==473); - case 506: /* function_expression ::= literal_func */ yytestcase(yyruleno==506); - case 556: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==556); - case 560: /* boolean_primary ::= predicate */ yytestcase(yyruleno==560); - case 562: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==562); - case 563: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==563); - case 566: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==566); - case 568: /* table_reference ::= table_primary */ yytestcase(yyruleno==568); - case 569: /* table_reference ::= joined_table */ yytestcase(yyruleno==569); - case 573: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==573); - case 658: /* query_simple ::= query_specification */ yytestcase(yyruleno==658); - case 659: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==659); - case 662: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==662); - case 664: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==664); + case 455: /* literal ::= duration_literal */ + case 465: /* signed_literal ::= signed */ yytestcase(yyruleno==465); + case 488: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==488); + case 489: /* expression ::= literal */ yytestcase(yyruleno==489); + case 491: /* expression ::= column_reference */ yytestcase(yyruleno==491); + case 492: /* expression ::= function_expression */ yytestcase(yyruleno==492); + case 493: /* expression ::= case_when_expression */ yytestcase(yyruleno==493); + case 526: /* function_expression ::= literal_func */ yytestcase(yyruleno==526); + case 576: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==576); + case 580: /* boolean_primary ::= predicate */ yytestcase(yyruleno==580); + case 582: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==582); + case 583: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==583); + case 586: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==586); + case 588: /* table_reference ::= table_primary */ yytestcase(yyruleno==588); + case 589: /* table_reference ::= joined_table */ yytestcase(yyruleno==589); + case 593: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==593); + case 678: /* query_simple ::= query_specification */ yytestcase(yyruleno==678); + case 679: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==679); + case 682: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==682); + case 684: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==684); { yylhsminor.yy1032 = yymsp[0].minor.yy1032; } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 436: /* literal ::= NULL */ + case 456: /* literal ::= NULL */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 437: /* literal ::= NK_QUESTION */ + case 457: /* literal ::= NK_QUESTION */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 438: /* duration_literal ::= NK_VARIABLE */ - case 633: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==633); - case 634: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==634); - case 635: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==635); + case 458: /* duration_literal ::= NK_VARIABLE */ + case 653: /* interval_sliding_duration_literal ::= NK_VARIABLE */ yytestcase(yyruleno==653); + case 654: /* interval_sliding_duration_literal ::= NK_STRING */ yytestcase(yyruleno==654); + case 655: /* interval_sliding_duration_literal ::= NK_INTEGER */ yytestcase(yyruleno==655); { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 439: /* signed ::= NK_INTEGER */ + case 459: /* signed ::= NK_INTEGER */ { yylhsminor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 440: /* signed ::= NK_PLUS NK_INTEGER */ + case 460: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 441: /* signed ::= NK_MINUS NK_INTEGER */ + case 461: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -6320,14 +6424,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 442: /* signed ::= NK_FLOAT */ + case 462: /* signed ::= NK_FLOAT */ { yylhsminor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 443: /* signed ::= NK_PLUS NK_FLOAT */ + case 463: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 444: /* signed ::= NK_MINUS NK_FLOAT */ + case 464: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -6335,61 +6439,61 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 446: /* signed_literal ::= NK_STRING */ + case 466: /* signed_literal ::= NK_STRING */ { yylhsminor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 447: /* signed_literal ::= NK_BOOL */ + case 467: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 448: /* signed_literal ::= TIMESTAMP NK_STRING */ + case 468: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 449: /* signed_literal ::= duration_literal */ - case 451: /* signed_literal ::= literal_func */ yytestcase(yyruleno==451); - case 527: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==527); - case 610: /* select_item ::= common_expression */ yytestcase(yyruleno==610); - case 620: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==620); - case 663: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==663); - case 665: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==665); - case 678: /* search_condition ::= common_expression */ yytestcase(yyruleno==678); + case 469: /* signed_literal ::= duration_literal */ + case 471: /* signed_literal ::= literal_func */ yytestcase(yyruleno==471); + case 547: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==547); + case 630: /* select_item ::= common_expression */ yytestcase(yyruleno==630); + case 640: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==640); + case 683: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==683); + case 685: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==685); + case 698: /* search_condition ::= common_expression */ yytestcase(yyruleno==698); { yylhsminor.yy1032 = releaseRawExprNode(pCxt, yymsp[0].minor.yy1032); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 450: /* signed_literal ::= NULL */ + case 470: /* signed_literal ::= NULL */ { yylhsminor.yy1032 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 452: /* signed_literal ::= NK_QUESTION */ + case 472: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy1032 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 470: /* expression ::= pseudo_column */ + case 490: /* expression ::= pseudo_column */ { yylhsminor.yy1032 = yymsp[0].minor.yy1032; setRawExprNodeIsPseudoColumn(pCxt, yylhsminor.yy1032, true); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 474: /* expression ::= NK_LP expression NK_RP */ - case 561: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==561); - case 677: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==677); + case 494: /* expression ::= NK_LP expression NK_RP */ + case 581: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==581); + case 697: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==697); { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032)); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 475: /* expression ::= NK_PLUS expr_or_subquery */ + case 495: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy1032)); } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 476: /* expression ::= NK_MINUS expr_or_subquery */ + case 496: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy1032), NULL)); } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 477: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 497: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6397,7 +6501,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 478: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 498: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6405,7 +6509,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 479: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 499: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6413,7 +6517,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 480: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 500: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6421,7 +6525,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 481: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 501: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6429,14 +6533,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 482: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 502: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1032), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 483: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 503: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6444,7 +6548,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 484: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 504: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6452,80 +6556,80 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 487: /* column_reference ::= column_name */ + case 507: /* column_reference ::= column_name */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy729, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy729)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 488: /* column_reference ::= table_name NK_DOT column_name */ + case 508: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy729, &yymsp[0].minor.yy729, createColumnNode(pCxt, &yymsp[-2].minor.yy729, &yymsp[0].minor.yy729)); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 489: /* column_reference ::= NK_ALIAS */ + case 509: /* column_reference ::= NK_ALIAS */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 490: /* column_reference ::= table_name NK_DOT NK_ALIAS */ + case 510: /* column_reference ::= table_name NK_DOT NK_ALIAS */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy729, &yymsp[0].minor.yy0, createColumnNode(pCxt, &yymsp[-2].minor.yy729, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 491: /* pseudo_column ::= ROWTS */ - case 492: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==492); - case 494: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==494); - case 495: /* pseudo_column ::= QEND */ yytestcase(yyruleno==495); - case 496: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==496); - case 497: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==497); - case 498: /* pseudo_column ::= WEND */ yytestcase(yyruleno==498); - case 499: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==499); - case 500: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==500); - case 501: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==501); - case 502: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==502); - case 508: /* literal_func ::= NOW */ yytestcase(yyruleno==508); - case 509: /* literal_func ::= TODAY */ yytestcase(yyruleno==509); + case 511: /* pseudo_column ::= ROWTS */ + case 512: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==512); + case 514: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==514); + case 515: /* pseudo_column ::= QEND */ yytestcase(yyruleno==515); + case 516: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==516); + case 517: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==517); + case 518: /* pseudo_column ::= WEND */ yytestcase(yyruleno==518); + case 519: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==519); + case 520: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==520); + case 521: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==521); + case 522: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==522); + case 528: /* literal_func ::= NOW */ yytestcase(yyruleno==528); + case 529: /* literal_func ::= TODAY */ yytestcase(yyruleno==529); { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 493: /* pseudo_column ::= table_name NK_DOT TBNAME */ + case 513: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy729, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy729)))); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 503: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 504: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==504); + case 523: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 524: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==524); { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy729, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy729, yymsp[-1].minor.yy444)); } yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; - case 505: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 525: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), yymsp[-1].minor.yy384)); } yymsp[-5].minor.yy1032 = yylhsminor.yy1032; break; - case 507: /* literal_func ::= noarg_func NK_LP NK_RP */ + case 527: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy729, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy729, NULL)); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 523: /* star_func_para_list ::= NK_STAR */ + case 543: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy444 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy444 = yylhsminor.yy444; break; - case 528: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 613: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==613); + case 548: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 633: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==633); { yylhsminor.yy1032 = createColumnNode(pCxt, &yymsp[-2].minor.yy729, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 529: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ + case 549: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy444, yymsp[-1].minor.yy1032)); } yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; - case 530: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + case 550: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), yymsp[-2].minor.yy444, yymsp[-1].minor.yy1032)); } yymsp[-4].minor.yy1032 = yylhsminor.yy1032; break; - case 533: /* when_then_expr ::= WHEN common_expression THEN common_expression */ + case 553: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy1032 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1032), releaseRawExprNode(pCxt, yymsp[0].minor.yy1032)); } break; - case 535: /* case_when_else_opt ::= ELSE common_expression */ + case 555: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy1032 = releaseRawExprNode(pCxt, yymsp[0].minor.yy1032); } break; - case 536: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 541: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==541); + case 556: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 561: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==561); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6533,7 +6637,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 537: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 557: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6541,7 +6645,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy1032 = yylhsminor.yy1032; break; - case 538: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 558: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6549,71 +6653,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-5].minor.yy1032 = yylhsminor.yy1032; break; - case 539: /* predicate ::= expr_or_subquery IS NULL */ + case 559: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1032), NULL)); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 540: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 560: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy1032); yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), NULL)); } yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; - case 542: /* compare_op ::= NK_LT */ + case 562: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy900 = OP_TYPE_LOWER_THAN; } break; - case 543: /* compare_op ::= NK_GT */ + case 563: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy900 = OP_TYPE_GREATER_THAN; } break; - case 544: /* compare_op ::= NK_LE */ + case 564: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy900 = OP_TYPE_LOWER_EQUAL; } break; - case 545: /* compare_op ::= NK_GE */ + case 565: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy900 = OP_TYPE_GREATER_EQUAL; } break; - case 546: /* compare_op ::= NK_NE */ + case 566: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy900 = OP_TYPE_NOT_EQUAL; } break; - case 547: /* compare_op ::= NK_EQ */ + case 567: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy900 = OP_TYPE_EQUAL; } break; - case 548: /* compare_op ::= LIKE */ + case 568: /* compare_op ::= LIKE */ { yymsp[0].minor.yy900 = OP_TYPE_LIKE; } break; - case 549: /* compare_op ::= NOT LIKE */ + case 569: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy900 = OP_TYPE_NOT_LIKE; } break; - case 550: /* compare_op ::= MATCH */ + case 570: /* compare_op ::= MATCH */ { yymsp[0].minor.yy900 = OP_TYPE_MATCH; } break; - case 551: /* compare_op ::= NMATCH */ + case 571: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy900 = OP_TYPE_NMATCH; } break; - case 552: /* compare_op ::= CONTAINS */ + case 572: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy900 = OP_TYPE_JSON_CONTAINS; } break; - case 553: /* in_op ::= IN */ + case 573: /* in_op ::= IN */ { yymsp[0].minor.yy900 = OP_TYPE_IN; } break; - case 554: /* in_op ::= NOT IN */ + case 574: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy900 = OP_TYPE_NOT_IN; } break; - case 555: /* in_predicate_value ::= NK_LP literal_list NK_RP */ + case 575: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy444)); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 557: /* boolean_value_expression ::= NOT boolean_primary */ + case 577: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy1032), NULL)); } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 558: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 578: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6621,7 +6725,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 559: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 579: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy1032); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy1032); @@ -6629,33 +6733,33 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 567: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ + case 587: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy1032 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, JOIN_STYPE_NONE, yymsp[-2].minor.yy1032, yymsp[0].minor.yy1032, NULL); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 570: /* table_primary ::= table_name alias_opt */ + case 590: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy1032 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy729, &yymsp[0].minor.yy729); } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 571: /* table_primary ::= db_name NK_DOT table_name alias_opt */ + case 591: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy1032 = createRealTableNode(pCxt, &yymsp[-3].minor.yy729, &yymsp[-1].minor.yy729, &yymsp[0].minor.yy729); } yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; - case 572: /* table_primary ::= subquery alias_opt */ + case 592: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy1032 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032), &yymsp[0].minor.yy729); } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 574: /* alias_opt ::= */ + case 594: /* alias_opt ::= */ { yymsp[1].minor.yy729 = nil_token; } break; - case 576: /* alias_opt ::= AS table_alias */ + case 596: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy729 = yymsp[0].minor.yy729; } break; - case 577: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 578: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==578); + case 597: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 598: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==598); { yymsp[-2].minor.yy1032 = yymsp[-1].minor.yy1032; } break; - case 579: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ + case 599: /* joined_table ::= table_reference join_type join_subtype JOIN table_reference join_on_clause_opt window_offset_clause_opt jlimit_clause_opt */ { yylhsminor.yy1032 = createJoinTableNode(pCxt, yymsp[-6].minor.yy992, yymsp[-5].minor.yy134, yymsp[-7].minor.yy1032, yymsp[-3].minor.yy1032, yymsp[-2].minor.yy1032); yylhsminor.yy1032 = addWindowOffsetClause(pCxt, yylhsminor.yy1032, yymsp[-1].minor.yy1032); @@ -6663,47 +6767,47 @@ static YYACTIONTYPE yy_reduce( } yymsp[-7].minor.yy1032 = yylhsminor.yy1032; break; - case 580: /* join_type ::= */ + case 600: /* join_type ::= */ { yymsp[1].minor.yy992 = JOIN_TYPE_INNER; } break; - case 581: /* join_type ::= INNER */ + case 601: /* join_type ::= INNER */ { yymsp[0].minor.yy992 = JOIN_TYPE_INNER; } break; - case 582: /* join_type ::= LEFT */ + case 602: /* join_type ::= LEFT */ { yymsp[0].minor.yy992 = JOIN_TYPE_LEFT; } break; - case 583: /* join_type ::= RIGHT */ + case 603: /* join_type ::= RIGHT */ { yymsp[0].minor.yy992 = JOIN_TYPE_RIGHT; } break; - case 584: /* join_type ::= FULL */ + case 604: /* join_type ::= FULL */ { yymsp[0].minor.yy992 = JOIN_TYPE_FULL; } break; - case 585: /* join_subtype ::= */ + case 605: /* join_subtype ::= */ { yymsp[1].minor.yy134 = JOIN_STYPE_NONE; } break; - case 586: /* join_subtype ::= OUTER */ + case 606: /* join_subtype ::= OUTER */ { yymsp[0].minor.yy134 = JOIN_STYPE_OUTER; } break; - case 587: /* join_subtype ::= SEMI */ + case 607: /* join_subtype ::= SEMI */ { yymsp[0].minor.yy134 = JOIN_STYPE_SEMI; } break; - case 588: /* join_subtype ::= ANTI */ + case 608: /* join_subtype ::= ANTI */ { yymsp[0].minor.yy134 = JOIN_STYPE_ANTI; } break; - case 589: /* join_subtype ::= ASOF */ + case 609: /* join_subtype ::= ASOF */ { yymsp[0].minor.yy134 = JOIN_STYPE_ASOF; } break; - case 590: /* join_subtype ::= WINDOW */ + case 610: /* join_subtype ::= WINDOW */ { yymsp[0].minor.yy134 = JOIN_STYPE_WIN; } break; - case 594: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ + case 614: /* window_offset_clause_opt ::= WINDOW_OFFSET NK_LP window_offset_literal NK_COMMA window_offset_literal NK_RP */ { yymsp[-5].minor.yy1032 = createWindowOffsetNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032)); } break; - case 595: /* window_offset_literal ::= NK_VARIABLE */ + case 615: /* window_offset_literal ::= NK_VARIABLE */ { yylhsminor.yy1032 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createTimeOffsetValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 596: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ + case 616: /* window_offset_literal ::= NK_MINUS NK_VARIABLE */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; @@ -6711,12 +6815,12 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 598: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ - case 669: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==669); - case 673: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==673); + case 618: /* jlimit_clause_opt ::= JLIMIT NK_INTEGER */ + case 689: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ yytestcase(yyruleno==689); + case 693: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==693); { yymsp[-1].minor.yy1032 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 599: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 619: /* query_specification ::= SELECT hint_list set_quantifier_opt tag_mode_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { yymsp[-13].minor.yy1032 = createSelectStmt(pCxt, yymsp[-11].minor.yy957, yymsp[-9].minor.yy444, yymsp[-8].minor.yy1032, yymsp[-12].minor.yy444); yymsp[-13].minor.yy1032 = setSelectStmtTagMode(pCxt, yymsp[-13].minor.yy1032, yymsp[-10].minor.yy957); @@ -6730,98 +6834,98 @@ static YYACTIONTYPE yy_reduce( yymsp[-13].minor.yy1032 = addFillClause(pCxt, yymsp[-13].minor.yy1032, yymsp[-3].minor.yy1032); } break; - case 600: /* hint_list ::= */ + case 620: /* hint_list ::= */ { yymsp[1].minor.yy444 = createHintNodeList(pCxt, NULL); } break; - case 601: /* hint_list ::= NK_HINT */ + case 621: /* hint_list ::= NK_HINT */ { yylhsminor.yy444 = createHintNodeList(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy444 = yylhsminor.yy444; break; - case 606: /* set_quantifier_opt ::= ALL */ + case 626: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy957 = false; } break; - case 609: /* select_item ::= NK_STAR */ + case 629: /* select_item ::= NK_STAR */ { yylhsminor.yy1032 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy1032 = yylhsminor.yy1032; break; - case 611: /* select_item ::= common_expression column_alias */ - case 621: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==621); + case 631: /* select_item ::= common_expression column_alias */ + case 641: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==641); { yylhsminor.yy1032 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032), &yymsp[0].minor.yy729); } yymsp[-1].minor.yy1032 = yylhsminor.yy1032; break; - case 612: /* select_item ::= common_expression AS column_alias */ - case 622: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==622); + case 632: /* select_item ::= common_expression AS column_alias */ + case 642: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==642); { yylhsminor.yy1032 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1032), &yymsp[0].minor.yy729); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 617: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 647: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==647); - case 667: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==667); + case 637: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 667: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==667); + case 687: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==687); { yymsp[-2].minor.yy444 = yymsp[0].minor.yy444; } break; - case 624: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ + case 644: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA interval_sliding_duration_literal NK_RP */ { yymsp[-5].minor.yy1032 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032)); } break; - case 625: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + case 645: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy1032 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032)); } break; - case 626: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + case 646: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy1032 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), NULL, yymsp[-1].minor.yy1032, yymsp[0].minor.yy1032); } break; - case 627: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ + case 647: /* twindow_clause_opt ::= INTERVAL NK_LP interval_sliding_duration_literal NK_COMMA interval_sliding_duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy1032 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy1032), releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), yymsp[-1].minor.yy1032, yymsp[0].minor.yy1032); } break; - case 628: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + case 648: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ { yymsp[-6].minor.yy1032 = createEventWindowNode(pCxt, yymsp[-3].minor.yy1032, yymsp[0].minor.yy1032); } break; - case 629: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ + case 649: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy1032 = createCountWindowNode(pCxt, &yymsp[-1].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 630: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + case 650: /* twindow_clause_opt ::= COUNT_WINDOW NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy1032 = createCountWindowNode(pCxt, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0); } break; - case 637: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + case 657: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy1032 = createFillNode(pCxt, yymsp[-1].minor.yy574, NULL); } break; - case 638: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ + case 658: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy1032 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy444)); } break; - case 639: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ + case 659: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA expression_list NK_RP */ { yymsp[-5].minor.yy1032 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy444)); } break; - case 640: /* fill_mode ::= NONE */ + case 660: /* fill_mode ::= NONE */ { yymsp[0].minor.yy574 = FILL_MODE_NONE; } break; - case 641: /* fill_mode ::= PREV */ + case 661: /* fill_mode ::= PREV */ { yymsp[0].minor.yy574 = FILL_MODE_PREV; } break; - case 642: /* fill_mode ::= NULL */ + case 662: /* fill_mode ::= NULL */ { yymsp[0].minor.yy574 = FILL_MODE_NULL; } break; - case 643: /* fill_mode ::= NULL_F */ + case 663: /* fill_mode ::= NULL_F */ { yymsp[0].minor.yy574 = FILL_MODE_NULL_F; } break; - case 644: /* fill_mode ::= LINEAR */ + case 664: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy574 = FILL_MODE_LINEAR; } break; - case 645: /* fill_mode ::= NEXT */ + case 665: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy574 = FILL_MODE_NEXT; } break; - case 648: /* group_by_list ::= expr_or_subquery */ + case 668: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy444 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy1032))); } yymsp[0].minor.yy444 = yylhsminor.yy444; break; - case 649: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + case 669: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy444 = addNodeToList(pCxt, yymsp[-2].minor.yy444, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy1032))); } yymsp[-2].minor.yy444 = yylhsminor.yy444; break; - case 653: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + case 673: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy1032 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy1032), releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032)); } break; - case 654: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ + case 674: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy1032 = createInterpTimePoint(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy1032)); } break; - case 657: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 677: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy1032 = addOrderByClause(pCxt, yymsp[-3].minor.yy1032, yymsp[-2].minor.yy444); yylhsminor.yy1032 = addSlimitClause(pCxt, yylhsminor.yy1032, yymsp[-1].minor.yy1032); @@ -6829,46 +6933,46 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; - case 660: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + case 680: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy1032 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy1032, yymsp[0].minor.yy1032); } yymsp[-3].minor.yy1032 = yylhsminor.yy1032; break; - case 661: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + case 681: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy1032 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy1032, yymsp[0].minor.yy1032); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 670: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 674: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==674); + case 690: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 694: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==694); { yymsp[-3].minor.yy1032 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 671: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 675: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==675); + case 691: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 695: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==695); { yymsp[-3].minor.yy1032 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 676: /* subquery ::= NK_LP query_expression NK_RP */ + case 696: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy1032 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy1032); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 681: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + case 701: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy1032 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy1032), yymsp[-1].minor.yy478, yymsp[0].minor.yy617); } yymsp[-2].minor.yy1032 = yylhsminor.yy1032; break; - case 682: /* ordering_specification_opt ::= */ + case 702: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy478 = ORDER_ASC; } break; - case 683: /* ordering_specification_opt ::= ASC */ + case 703: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy478 = ORDER_ASC; } break; - case 684: /* ordering_specification_opt ::= DESC */ + case 704: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy478 = ORDER_DESC; } break; - case 685: /* null_ordering_opt ::= */ + case 705: /* null_ordering_opt ::= */ { yymsp[1].minor.yy617 = NULL_ORDER_DEFAULT; } break; - case 686: /* null_ordering_opt ::= NULLS FIRST */ + case 706: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy617 = NULL_ORDER_FIRST; } break; - case 687: /* null_ordering_opt ::= NULLS LAST */ + case 707: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy617 = NULL_ORDER_LAST; } break; default: diff --git a/source/libs/scheduler/src/schRemote.c b/source/libs/scheduler/src/schRemote.c index aa33d6f2fc..079fd7d29d 100644 --- a/source/libs/scheduler/src/schRemote.c +++ b/source/libs/scheduler/src/schRemote.c @@ -486,6 +486,7 @@ int32_t schHandleNotifyCallback(void *param, SDataBuf *pMsg, int32_t code) { SSchTaskCallbackParam *pParam = (SSchTaskCallbackParam *)param; qDebug("QID:0x%" PRIx64 ",TID:0x%" PRIx64 " task notify rsp received, code:0x%x", pParam->queryId, pParam->taskId, code); + rpcReleaseHandle(pMsg->handle, TAOS_CONN_CLIENT); if (pMsg) { taosMemoryFree(pMsg->pData); taosMemoryFree(pMsg->pEpSet); @@ -526,6 +527,7 @@ int32_t schHandleHbCallback(void *param, SDataBuf *pMsg, int32_t code) { if (code) { qError("hb rsp error:%s", tstrerror(code)); + rpcReleaseHandle(pMsg->handle, TAOS_CONN_CLIENT); SCH_ERR_JRET(code); } @@ -1181,7 +1183,7 @@ int32_t schBuildAndSendMsg(SSchJob *pJob, SSchTask *pTask, SQueryNodeAddr *addr, qMsg.queryId = pJob->queryId; qMsg.taskId = pTask->taskId; qMsg.refId = pJob->refId; - qMsg.execId = pTask->execId; + qMsg.execId = *(int32_t*)param; msgSize = tSerializeSTaskDropReq(NULL, 0, &qMsg); if (msgSize < 0) { diff --git a/source/libs/scheduler/src/schTask.c b/source/libs/scheduler/src/schTask.c index d96c01fc76..97c3c7d276 100644 --- a/source/libs/scheduler/src/schTask.c +++ b/source/libs/scheduler/src/schTask.c @@ -371,14 +371,13 @@ int32_t schChkUpdateRedirectCtx(SSchJob *pJob, SSchTask *pTask, SEpSet *pEpSet, pCtx->roundTotal = pEpSet->numOfEps; } - if (pCtx->roundTimes >= pCtx->roundTotal) { int64_t nowTs = taosGetTimestampMs(); int64_t lastTime = nowTs - pCtx->startTs; if (lastTime > tsMaxRetryWaitTime) { SCH_TASK_DLOG("task no more redirect retry since timeout, now:%" PRId64 ", start:%" PRId64 ", max:%d, total:%d", nowTs, pCtx->startTs, tsMaxRetryWaitTime, pCtx->totalTimes); - pJob->noMoreRetry = true; + pJob->noMoreRetry = true; SCH_ERR_RET(SCH_GET_REDIRECT_CODE(pJob, rspCode)); } @@ -418,7 +417,7 @@ void schResetTaskForRetry(SSchJob *pJob, SSchTask *pTask) { taosMemoryFreeClear(pTask->msg); pTask->msgLen = 0; pTask->lastMsgType = 0; - pTask->childReady = 0; + pTask->childReady = 0; memset(&pTask->succeedAddr, 0, sizeof(pTask->succeedAddr)); } @@ -505,11 +504,11 @@ int32_t schHandleTaskSetRetry(SSchJob *pJob, SSchTask *pTask, SDataBuf *pData, i pLevel->taskExecDoneNum = 0; pLevel->taskLaunchedNum = 0; } - + SCH_RESET_JOB_LEVEL_IDX(pJob); - + code = schDoTaskRedirect(pJob, pTask, pData, rspCode); - + taosMemoryFreeClear(pData->pData); taosMemoryFreeClear(pData->pEpSet); @@ -627,7 +626,7 @@ int32_t schTaskCheckSetRetry(SSchJob *pJob, SSchTask *pTask, int32_t errCode, bo pTask->maxRetryTimes); return TSDB_CODE_SUCCESS; } - + if (TSDB_CODE_SCH_TIMEOUT_ERROR == errCode) { pTask->maxExecTimes++; pTask->maxRetryTimes++; @@ -862,7 +861,9 @@ void schDropTaskOnExecNode(SSchJob *pJob, SSchTask *pTask) { while (nodeInfo) { if (nodeInfo->handle) { SCH_SET_TASK_HANDLE(pTask, nodeInfo->handle); - schBuildAndSendMsg(pJob, pTask, &nodeInfo->addr, TDMT_SCH_DROP_TASK, NULL); + void *pExecId = taosHashGetKey(nodeInfo, NULL); + schBuildAndSendMsg(pJob, pTask, &nodeInfo->addr, TDMT_SCH_DROP_TASK, pExecId); + SCH_TASK_DLOG("start to drop task's %dth execNode", i); } else { SCH_TASK_DLOG("no need to drop task %dth execNode", i); @@ -901,7 +902,6 @@ int32_t schNotifyTaskOnExecNode(SSchJob *pJob, SSchTask *pTask, ETaskNotifyType return TSDB_CODE_SUCCESS; } - int32_t schProcessOnTaskStatusRsp(SQueryNodeEpId *pEpId, SArray *pStatusList) { int32_t taskNum = (int32_t)taosArrayGetSize(pStatusList); SSchTask *pTask = NULL; @@ -1269,7 +1269,7 @@ int32_t schNotifyTaskInHashList(SSchJob *pJob, SHashObj *list, ETaskNotifyType t int32_t code = TSDB_CODE_SUCCESS; SCH_ERR_RET(schNotifyTaskOnExecNode(pJob, pCurrTask, type)); - + void *pIter = taosHashIterate(list, NULL); while (pIter) { SSchTask *pTask = *(SSchTask **)pIter; @@ -1277,7 +1277,7 @@ int32_t schNotifyTaskInHashList(SSchJob *pJob, SHashObj *list, ETaskNotifyType t SCH_LOCK_TASK(pTask); code = schNotifyTaskOnExecNode(pJob, pTask, type); SCH_UNLOCK_TASK(pTask); - + if (TSDB_CODE_SUCCESS != code) { break; } @@ -1289,7 +1289,6 @@ int32_t schNotifyTaskInHashList(SSchJob *pJob, SHashObj *list, ETaskNotifyType t SCH_RET(code); } - int32_t schExecRemoteFetch(SSchJob *pJob, SSchTask *pTask) { SCH_RET(schBuildAndSendMsg(pJob, pJob->fetchTask, &pJob->resNode, SCH_FETCH_TYPE(pJob->fetchTask), NULL)); } diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index f58c72eded..7f52c5d2f0 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -278,6 +278,7 @@ void streamTaskClearCheckInfo(SStreamTask* pTask, bool clearChkpReadyMsg) { pTask->chkInfo.numOfNotReady = 0; pTask->chkInfo.transId = 0; pTask->chkInfo.dispatchCheckpointTrigger = false; + pTask->chkInfo.downstreamAlignNum = 0; streamTaskOpenAllUpstreamInput(pTask); // open inputQ for all upstream tasks if (clearChkpReadyMsg) { diff --git a/source/libs/stream/src/streamDispatch.c b/source/libs/stream/src/streamDispatch.c index 0af664f1e1..baf5ebf8cb 100644 --- a/source/libs/stream/src/streamDispatch.c +++ b/source/libs/stream/src/streamDispatch.c @@ -321,6 +321,8 @@ void clearBufferedDispatchMsg(SStreamTask* pTask) { destroyDispatchMsg(pMsgInfo->pData, getNumOfDispatchBranch(pTask)); } + pMsgInfo->checkpointId = -1; + pMsgInfo->transId = -1; pMsgInfo->pData = NULL; pMsgInfo->dispatchMsgType = 0; } @@ -332,6 +334,12 @@ static int32_t doBuildDispatchMsg(SStreamTask* pTask, const SStreamDataBlock* pD pTask->msgInfo.dispatchMsgType = pData->type; + if (pData->type == STREAM_INPUT__CHECKPOINT_TRIGGER) { + SSDataBlock* p = taosArrayGet(pData->blocks, 0); + pTask->msgInfo.checkpointId = p->info.version; + pTask->msgInfo.transId = p->info.window.ekey; + } + if (pTask->outputInfo.type == TASK_OUTPUT__FIXED_DISPATCH) { SStreamDispatchReq* pReq = taosMemoryCalloc(1, sizeof(SStreamDispatchReq)); @@ -580,12 +588,15 @@ int32_t streamSearchAndAddBlock(SStreamTask* pTask, SStreamDispatchReq* pReqs, S } else { char ctbName[TSDB_TABLE_FNAME_LEN] = {0}; if (pDataBlock->info.parTbName[0]) { - if(pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER && - pTask->subtableWithoutMd5 != 1 && + if(pTask->subtableWithoutMd5 != 1 && !isAutoTableName(pDataBlock->info.parTbName) && !alreadyAddGroupId(pDataBlock->info.parTbName) && groupId != 0){ - buildCtbNameAddGroupId(pDataBlock->info.parTbName, groupId); + if(pTask->ver == SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + buildCtbNameAddGroupId(NULL, pDataBlock->info.parTbName, groupId); + }else if(pTask->ver > SSTREAM_TASK_SUBTABLE_CHANGED_VER) { + buildCtbNameAddGroupId(pTask->outputInfo.shuffleDispatcher.stbFullName, pDataBlock->info.parTbName, groupId); + } } } else { buildCtbNameByGroupIdImpl(pTask->outputInfo.shuffleDispatcher.stbFullName, groupId, pDataBlock->info.parTbName); @@ -947,9 +958,21 @@ void streamClearChkptReadyMsg(SStreamTask* pTask) { // this message has been sent successfully, let's try next one. static int32_t handleDispatchSuccessRsp(SStreamTask* pTask, int32_t downstreamId) { stDebug("s-task:%s destroy dispatch msg:%p", pTask->id.idStr, pTask->msgInfo.pData); + bool delayDispatch = (pTask->msgInfo.dispatchMsgType == STREAM_INPUT__CHECKPOINT_TRIGGER); if (delayDispatch) { - pTask->chkInfo.dispatchCheckpointTrigger = true; + taosThreadMutexLock(&pTask->lock); + // we only set the dispatch msg info for current checkpoint trans + if (streamTaskGetStatus(pTask)->state == TASK_STATUS__CK && pTask->chkInfo.checkpointingId == pTask->msgInfo.checkpointId) { + ASSERT(pTask->chkInfo.transId == pTask->msgInfo.transId); + pTask->chkInfo.dispatchCheckpointTrigger = true; + stDebug("s-task:%s checkpoint-trigger msg rsp for checkpointId:%" PRId64 " transId:%d confirmed", + pTask->id.idStr, pTask->msgInfo.checkpointId, pTask->msgInfo.transId); + } else { + stWarn("s-task:%s checkpoint-trigger msg rsp for checkpointId:%" PRId64 " transId:%d discard, since expired", + pTask->id.idStr, pTask->msgInfo.checkpointId, pTask->msgInfo.transId); + } + taosThreadMutexUnlock(&pTask->lock); } clearBufferedDispatchMsg(pTask); diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 5f6440c06d..aae3594905 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -542,7 +542,6 @@ int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask) { void* buf = NULL; int32_t len; int32_t code; - pTask->ver = SSTREAM_TASK_VER; tEncodeSize(tEncodeStreamTask, pTask, len, code); if (code < 0) { return -1; @@ -552,6 +551,9 @@ int32_t streamMetaSaveTask(SStreamMeta* pMeta, SStreamTask* pTask) { return -1; } + if (pTask->ver < SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + pTask->ver = SSTREAM_TASK_VER; + } SEncoder encoder = {0}; tEncoderInit(&encoder, buf, len); tEncodeStreamTask(&encoder, pTask); @@ -648,14 +650,17 @@ SStreamTask* streamMetaAcquireOneTask(SStreamTask* pTask) { } void streamMetaReleaseTask(SStreamMeta* UNUSED_PARAM(pMeta), SStreamTask* pTask) { + int32_t taskId = pTask->id.taskId; int32_t ref = atomic_sub_fetch_32(&pTask->refCnt, 1); + + // not safe to use the pTask->id.idStr, since pTask may be released by other threads when print logs. if (ref > 0) { - stTrace("s-task:%s release task, ref:%d", pTask->id.idStr, ref); + stTrace("s-task:0x%x release task, ref:%d", taskId, ref); } else if (ref == 0) { - stTrace("s-task:%s all refs are gone, free it", pTask->id.idStr); + stTrace("s-task:0x%x all refs are gone, free it", taskId); tFreeStreamTask(pTask); } else if (ref < 0) { - stError("task ref is invalid, ref:%d, %s", ref, pTask->id.idStr); + stError("task ref is invalid, ref:%d, 0x%x", ref, taskId); } } @@ -824,13 +829,6 @@ int64_t streamMetaGetLatestCheckpointId(SStreamMeta* pMeta) { return chkpId; } -static void doClear(void* pKey, void* pVal, TBC* pCur, SArray* pRecycleList) { - tdbFree(pKey); - tdbFree(pVal); - tdbTbcClose(pCur); - taosArrayDestroy(pRecycleList); -} - int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { TBC* pCur = NULL; void* pKey = NULL; @@ -847,10 +845,11 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { int32_t vgId = pMeta->vgId; stInfo("vgId:%d load stream tasks from meta files", vgId); - if (tdbTbcOpen(pMeta->pTaskDb, &pCur, NULL) < 0) { - stError("vgId:%d failed to open stream meta, code:%s", vgId, tstrerror(terrno)); + int32_t code = tdbTbcOpen(pMeta->pTaskDb, &pCur, NULL); + if (code != TSDB_CODE_SUCCESS) { + stError("vgId:%d failed to open stream meta, code:%s, not load any stream tasks", vgId, tstrerror(terrno)); taosArrayDestroy(pRecycleList); - return -1; + return TSDB_CODE_SUCCESS; } tdbTbcMoveToFirst(pCur); @@ -859,20 +858,18 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { if (pTask == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; stError("vgId:%d failed to load stream task from meta-files, code:%s", vgId, tstrerror(terrno)); - doClear(pKey, pVal, pCur, pRecycleList); - return -1; + break; } tDecoderInit(&decoder, (uint8_t*)pVal, vLen); if (tDecodeStreamTask(&decoder, pTask) < 0) { tDecoderClear(&decoder); - doClear(pKey, pVal, pCur, pRecycleList); tFreeStreamTask(pTask); stError( "vgId:%d stream read incompatible data, rm %s/vnode/vnode*/tq/stream if taosd cannot start, and rebuild " "stream manually", vgId, tsDataDir); - return -1; + break; } tDecoderClear(&decoder); @@ -892,10 +889,11 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { STaskId id = {.streamId = pTask->id.streamId, .taskId = pTask->id.taskId}; void* p = taosHashGet(pMeta->pTasksMap, &id, sizeof(id)); if (p == NULL) { - if (pMeta->expandFunc(pMeta->ahandle, pTask, pTask->chkInfo.checkpointVer + 1) < 0) { - doClear(pKey, pVal, pCur, pRecycleList); + code = pMeta->expandFunc(pMeta->ahandle, pTask, pTask->chkInfo.checkpointVer + 1); + if (code < 0) { + stError("failed to expand s-task:0x%"PRIx64", code:%s, continue", id.taskId, tstrerror(terrno)); tFreeStreamTask(pTask); - return -1; + continue; } taosArrayPush(pMeta->pTaskList, &pTask->id); @@ -907,9 +905,10 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { } if (taosHashPut(pMeta->pTasksMap, &id, sizeof(id), &pTask, POINTER_BYTES) < 0) { - doClear(pKey, pVal, pCur, pRecycleList); + stError("s-task:0x%x failed to put into hashTable, code:%s, continue", pTask->id.taskId, tstrerror(terrno)); + taosArrayPop(pMeta->pTaskList); tFreeStreamTask(pTask); - return -1; + continue; } if (pTask->info.fillHistory == 0) { @@ -925,10 +924,9 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { tdbFree(pKey); tdbFree(pVal); + if (tdbTbcClose(pCur) < 0) { - stError("vgId:%d failed to close meta-file cursor", vgId); - taosArrayDestroy(pRecycleList); - return -1; + stError("vgId:%d failed to close meta-file cursor, code:%s, continue", vgId, tstrerror(terrno)); } if (taosArrayGetSize(pRecycleList) > 0) { @@ -942,8 +940,9 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) { ASSERT(pMeta->numOfStreamTasks <= numOfTasks && pMeta->numOfPausedTasks <= numOfTasks); stDebug("vgId:%d load %d tasks into meta from disk completed, streamTask:%d, paused:%d", pMeta->vgId, numOfTasks, pMeta->numOfStreamTasks, pMeta->numOfPausedTasks); + taosArrayDestroy(pRecycleList); - return 0; + return TSDB_CODE_SUCCESS; } int32_t tEncodeStreamHbMsg(SEncoder* pEncoder, const SStreamHbMsg* pReq) { diff --git a/source/libs/stream/src/streamTask.c b/source/libs/stream/src/streamTask.c index 4ca784a32f..c7a1a00a46 100644 --- a/source/libs/stream/src/streamTask.c +++ b/source/libs/stream/src/streamTask.c @@ -216,7 +216,7 @@ int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask) { if (tStartDecode(pDecoder) < 0) return -1; if (tDecodeI64(pDecoder, &pTask->ver) < 0) return -1; - if (pTask->ver <= SSTREAM_TASK_INCOMPATIBLE_VER) return -1; + if (pTask->ver <= SSTREAM_TASK_INCOMPATIBLE_VER || pTask->ver > SSTREAM_TASK_VER) return -1; if (tDecodeI64(pDecoder, &pTask->id.streamId) < 0) return -1; if (tDecodeI32(pDecoder, &pTask->id.taskId) < 0) return -1; @@ -287,7 +287,9 @@ int32_t tDecodeStreamTask(SDecoder* pDecoder, SStreamTask* pTask) { if (tDecodeCStrTo(pDecoder, pTask->outputInfo.shuffleDispatcher.stbFullName) < 0) return -1; } if (tDecodeI64(pDecoder, &pTask->info.triggerParam) < 0) return -1; - if (tDecodeI8(pDecoder, &pTask->subtableWithoutMd5) < 0) return -1; + if (pTask->ver >= SSTREAM_TASK_SUBTABLE_CHANGED_VER){ + if (tDecodeI8(pDecoder, &pTask->subtableWithoutMd5) < 0) return -1; + } if (tDecodeCStrTo(pDecoder, pTask->reserve) < 0) return -1; tEndDecode(pDecoder); diff --git a/source/libs/stream/src/streamTaskSm.c b/source/libs/stream/src/streamTaskSm.c index 6aa215586a..cfa94209f6 100644 --- a/source/libs/stream/src/streamTaskSm.c +++ b/source/libs/stream/src/streamTaskSm.c @@ -543,8 +543,6 @@ void streamTaskSetStatusReady(SStreamTask* pTask) { return; } - taosThreadMutexLock(&pTask->lock); - pSM->prev.state = pSM->current; pSM->prev.evt = 0; @@ -552,8 +550,6 @@ void streamTaskSetStatusReady(SStreamTask* pTask) { pSM->startTs = taosGetTimestampMs(); pSM->pActiveTrans = NULL; taosArrayClear(pSM->pWaitingEventList); - - taosThreadMutexUnlock(&pTask->lock); } STaskStateTrans createStateTransform(ETaskStatus current, ETaskStatus next, EStreamTaskEvent event, __state_trans_fn fn, diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index d40fff447f..3543ed574c 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -866,9 +866,14 @@ int32_t syncLogReplRecover(SSyncLogReplMgr* pMgr, SSyncNode* pNode, SyncAppendEn SyncTerm term = -1; SyncIndex firstVer = pNode->pLogStore->syncLogBeginIndex(pNode->pLogStore); SyncIndex index = TMIN(pMsg->matchIndex, pNode->pLogBuf->matchIndex); + errno = 0; if (pMsg->matchIndex < pNode->pLogBuf->matchIndex) { term = syncLogReplGetPrevLogTerm(pMgr, pNode, index + 1); + if (term < 0 && (errno == ENFILE || errno == EMFILE)) { + sError("vgId:%d, failed to get prev log term since %s. index:%" PRId64, pNode->vgId, terrstr(), index + 1); + return -1; + } if ((index + 1 < firstVer) || (term < 0) || (term != pMsg->lastMatchTerm && (index + 1 == firstVer || index == firstVer))) { ASSERT(term >= 0 || terrno == TSDB_CODE_WAL_LOG_NOT_EXIST); diff --git a/source/libs/transport/inc/transComm.h b/source/libs/transport/inc/transComm.h index c010e31320..da6d71e07b 100644 --- a/source/libs/transport/inc/transComm.h +++ b/source/libs/transport/inc/transComm.h @@ -19,16 +19,12 @@ extern "C" { #endif #include -#include "os.h" -#include "taoserror.h" #include "theap.h" -#include "tmisce.h" #include "tmsg.h" #include "transLog.h" #include "transportInt.h" #include "trpc.h" #include "ttrace.h" -#include "tutil.h" typedef bool (*FilteFunc)(void* arg); @@ -115,9 +111,12 @@ typedef SRpcConnInfo STransHandleInfo; // ref mgt handle typedef struct SExHandle { - void* handle; - int64_t refId; - void* pThrd; + void* handle; + int64_t refId; + void* pThrd; + queue q; + int8_t inited; + SRWLatch latch; } SExHandle; typedef struct { diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index ac45f1eef6..062609baac 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -92,6 +92,7 @@ typedef struct SCliMsg { int64_t refId; uint64_t st; int sent; //(0: no send, 1: alread sent) + queue seqq; } SCliMsg; typedef struct SCliThrd { @@ -121,11 +122,7 @@ typedef struct SCliThrd { SHashObj* batchCache; SCliMsg* stopMsg; - - bool quit; - - int newConnCount; - SHashObj* msgCount; + bool quit; } SCliThrd; typedef struct SCliObj { @@ -262,10 +259,8 @@ static void cliWalkCb(uv_handle_t* handle, void* arg); } \ if (i == sz) { \ pMsg = NULL; \ - tDebug("msg not found, %" PRIu64 "", ahandle); \ } else { \ pMsg = transQueueRm(&conn->cliMsgs, i); \ - tDebug("msg found, %" PRIu64 "", ahandle); \ } \ } while (0) @@ -343,6 +338,34 @@ bool cliMaySendCachedMsg(SCliConn* conn) { _RETURN: return false; } +bool cliConnSendSeqMsg(int64_t refId, SCliConn* conn) { + if (refId == 0) return false; + SExHandle* exh = transAcquireExHandle(transGetRefMgt(), refId); + if (exh == NULL) { + tDebug("release conn %p, refId: %" PRId64 "", conn, refId); + return false; + } + taosWLockLatch(&exh->latch); + if (exh->handle == NULL) exh->handle = conn; + exh->inited = 1; + if (!QUEUE_IS_EMPTY(&exh->q)) { + queue* h = QUEUE_HEAD(&exh->q); + QUEUE_REMOVE(h); + taosWUnLockLatch(&exh->latch); + SCliMsg* t = QUEUE_DATA(h, SCliMsg, seqq); + transCtxMerge(&conn->ctx, &t->ctx->appCtx); + transQueuePush(&conn->cliMsgs, t); + tDebug("pop from conn %p, refId: %" PRId64 "", conn, refId); + transReleaseExHandle(transGetRefMgt(), refId); + cliSend(conn); + return true; + } + taosWUnLockLatch(&exh->latch); + tDebug("empty conn %p, refId: %" PRId64 "", conn, refId); + transReleaseExHandle(transGetRefMgt(), refId); + return false; +} + void cliHandleResp(SCliConn* conn) { SCliThrd* pThrd = conn->hostThrd; STrans* pTransInst = pThrd->pTransInst; @@ -439,8 +462,14 @@ void cliHandleResp(SCliConn* conn) { return; } } + int64_t refId = (pMsg == NULL ? 0 : (int64_t)(pMsg->msg.info.handle)); + tDebug("conn %p msg refId: %" PRId64 "", conn, refId); destroyCmsg(pMsg); + if (cliConnSendSeqMsg(refId, conn)) { + return; + } + if (cliMaySendCachedMsg(conn) == true) { return; } @@ -451,6 +480,21 @@ void cliHandleResp(SCliConn* conn) { uv_read_start((uv_stream_t*)conn->stream, cliAllocRecvBufferCb, cliRecvCb); } +static void cliDestroyMsgInExhandle(int64_t refId) { + if (refId == 0) return; + SExHandle* exh = transAcquireExHandle(transGetRefMgt(), refId); + if (exh) { + taosWLockLatch(&exh->latch); + while (!QUEUE_IS_EMPTY(&exh->q)) { + queue* h = QUEUE_HEAD(&exh->q); + QUEUE_REMOVE(h); + SCliMsg* t = QUEUE_DATA(h, SCliMsg, seqq); + destroyCmsg(t); + } + taosWUnLockLatch(&exh->latch); + transReleaseExHandle(transGetRefMgt(), refId); + } +} void cliHandleExceptImpl(SCliConn* pConn, int32_t code) { if (transQueueEmpty(&pConn->cliMsgs)) { @@ -510,6 +554,8 @@ void cliHandleExceptImpl(SCliConn* pConn, int32_t code) { } if (pMsg == NULL || (pMsg && pMsg->type != Release)) { + int64_t refId = (pMsg == NULL ? 0 : (int64_t)(pMsg->msg.info.handle)); + cliDestroyMsgInExhandle(refId); if (cliAppCb(pConn, &transMsg, pMsg) != 0) { return; } @@ -585,11 +631,12 @@ void* destroyConnPool(SCliThrd* pThrd) { static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) { void* pool = pThrd->pool; STrans* pTranInst = pThrd->pTransInst; - SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key) + 1); + size_t klen = strlen(key); + SConnList* plist = taosHashGet((SHashObj*)pool, key, klen); if (plist == NULL) { SConnList list = {0}; - taosHashPut((SHashObj*)pool, key, strlen(key) + 1, (void*)&list, sizeof(list)); - plist = taosHashGet(pool, key, strlen(key) + 1); + taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list)); + plist = taosHashGet(pool, key, klen); SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList)); QUEUE_INIT(&nList->msgQ); @@ -624,11 +671,12 @@ static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) { static SCliConn* getConnFromPool2(SCliThrd* pThrd, char* key, SCliMsg** pMsg) { void* pool = pThrd->pool; STrans* pTransInst = pThrd->pTransInst; - SConnList* plist = taosHashGet((SHashObj*)pool, key, strlen(key) + 1); + size_t klen = strlen(key); + SConnList* plist = taosHashGet((SHashObj*)pool, key, klen); if (plist == NULL) { SConnList list = {0}; - taosHashPut((SHashObj*)pool, key, strlen(key) + 1, (void*)&list, sizeof(list)); - plist = taosHashGet(pool, key, strlen(key) + 1); + taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list)); + plist = taosHashGet(pool, key, klen); SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList)); QUEUE_INIT(&nList->msgQ); @@ -676,7 +724,7 @@ static SCliConn* getConnFromPool2(SCliThrd* pThrd, char* key, SCliMsg** pMsg) { } list->numOfConn++; } - tTrace("%s numOfConn: %d, limit: %d", pTransInst->label, list->numOfConn, pTransInst->connLimitNum); + tDebug("%s numOfConn: %d, limit: %d, dst:%s", pTransInst->label, list->numOfConn, pTransInst->connLimitNum, key); return NULL; } @@ -714,7 +762,7 @@ static void addConnToPool(void* pool, SCliConn* conn) { cliDestroyConnMsgs(conn, false); if (conn->list == NULL) { - conn->list = taosHashGet((SHashObj*)pool, conn->dstAddr, strlen(conn->dstAddr) + 1); + conn->list = taosHashGet((SHashObj*)pool, conn->dstAddr, strlen(conn->dstAddr)); } SConnList* pList = conn->list; @@ -740,13 +788,13 @@ static void addConnToPool(void* pool, SCliConn* conn) { QUEUE_PUSH(&conn->list->conns, &conn->q); conn->list->size += 1; - if (conn->list->size >= 20) { + if (conn->list->size >= 10) { STaskArg* arg = taosMemoryCalloc(1, sizeof(STaskArg)); arg->param1 = conn; arg->param2 = thrd; STrans* pTransInst = thrd->pTransInst; - conn->task = transDQSched(thrd->timeoutQueue, doCloseIdleConn, arg, CONN_PERSIST_TIME(pTransInst->idleTime)); + conn->task = transDQSched(thrd->timeoutQueue, doCloseIdleConn, arg, 10 * CONN_PERSIST_TIME(pTransInst->idleTime)); } } static int32_t allocConnRef(SCliConn* conn, bool update) { @@ -759,8 +807,10 @@ static int32_t allocConnRef(SCliConn* conn, bool update) { exh->handle = conn; exh->pThrd = conn->hostThrd; exh->refId = transAddExHandle(transGetRefMgt(), exh); - conn->refId = exh->refId; + QUEUE_INIT(&exh->q); + taosInitRWLatch(&exh->latch); + conn->refId = exh->refId; if (conn->refId == -1) { taosMemoryFree(exh); } @@ -777,9 +827,11 @@ static int32_t specifyConnRef(SCliConn* conn, bool update, int64_t handle) { if (exh == NULL) { return -1; } + taosWLockLatch(&exh->latch); exh->handle = conn; exh->pThrd = conn->hostThrd; conn->refId = exh->refId; + taosWUnLockLatch(&exh->latch); transReleaseExHandle(transGetRefMgt(), handle); return 0; @@ -880,7 +932,6 @@ static void cliDestroyConn(SCliConn* conn, bool clear) { } conn->list = NULL; - pThrd->newConnCount--; transReleaseExHandle(transGetRefMgt(), conn->refId); transRemoveExHandle(transGetRefMgt(), conn->refId); @@ -1188,7 +1239,6 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) { addr.sin_port = (uint16_t)htons(pList->port); tTrace("%s conn %p try to connect to %s", pTransInst->label, conn, pList->dst); - pThrd->newConnCount++; int32_t fd = taosCreateSocketWithTimeout(TRANS_CONN_TIMEOUT * 10); if (fd == -1) { tError("%s conn %p failed to create socket, reason:%s", transLabel(pTransInst), conn, @@ -1279,7 +1329,7 @@ static void cliHandleFastFail(SCliConn* pConn, int status) { if (pMsg != NULL && REQUEST_NO_RESP(&pMsg->msg) && (pTransInst->failFastFp != NULL && pTransInst->failFastFp(pMsg->msg.msgType))) { - SFailFastItem* item = taosHashGet(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr) + 1); + SFailFastItem* item = taosHashGet(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr)); int64_t cTimestamp = taosGetTimestampMs(); if (item != NULL) { int32_t elapse = cTimestamp - item->timestamp; @@ -1291,7 +1341,7 @@ static void cliHandleFastFail(SCliConn* pConn, int status) { } } else { SFailFastItem item = {.count = 1, .timestamp = cTimestamp}; - taosHashPut(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr) + 1, &item, sizeof(SFailFastItem)); + taosHashPut(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr), &item, sizeof(SFailFastItem)); } } } else { @@ -1390,7 +1440,10 @@ static void cliHandleRelease(SCliMsg* pMsg, SCliThrd* pThrd) { return; } + taosRLockLatch(&exh->latch); SCliConn* conn = exh->handle; + taosRUnLockLatch(&exh->latch); + transReleaseExHandle(transGetRefMgt(), refId); tDebug("%s conn %p start to release to inst", CONN_GET_INST_LABEL(conn), conn); @@ -1423,7 +1476,9 @@ SCliConn* cliGetConn(SCliMsg** pMsg, SCliThrd* pThrd, bool* ignore, char* addr) *ignore = true; return NULL; } else { + taosRLockLatch(&exh->latch); conn = exh->handle; + taosRUnLockLatch(&exh->latch); if (conn == NULL) { conn = getConnFromPool2(pThrd, addr, pMsg); if (conn != NULL) specifyConnRef(conn, true, refId); @@ -1437,7 +1492,7 @@ SCliConn* cliGetConn(SCliMsg** pMsg, SCliThrd* pThrd, bool* ignore, char* addr) if (conn != NULL) { tTrace("%s conn %p get from conn pool:%p", CONN_GET_INST_LABEL(conn), conn, pThrd->pool); } else { - tTrace("%s not found conn in conn pool:%p", ((STrans*)pThrd->pTransInst)->label, pThrd->pool); + tTrace("%s not found conn in conn pool:%p, dst:%s", ((STrans*)pThrd->pTransInst)->label, pThrd->pool, addr); } return conn; } @@ -1471,7 +1526,8 @@ FORCE_INLINE int32_t cliBuildExceptResp(SCliMsg* pMsg, STransMsg* pResp) { } static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) { uint32_t addr = 0; - uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn) + 1); + size_t len = strlen(fqdn); + uint32_t* v = taosHashGet(cache, fqdn, len); if (v == NULL) { addr = taosGetIpv4FromFqdn(fqdn); if (addr == 0xffffffff) { @@ -1480,7 +1536,7 @@ static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) return addr; } - taosHashPut(cache, fqdn, strlen(fqdn) + 1, &addr, sizeof(addr)); + taosHashPut(cache, fqdn, len, &addr, sizeof(addr)); } else { addr = *v; } @@ -1490,13 +1546,14 @@ static FORCE_INLINE void cliUpdateFqdnCache(SHashObj* cache, char* fqdn) { // impl later uint32_t addr = taosGetIpv4FromFqdn(fqdn); if (addr != 0xffffffff) { - uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn) + 1); + size_t len = strlen(fqdn); + uint32_t* v = taosHashGet(cache, fqdn, len); if (addr != *v) { char old[64] = {0}, new[64] = {0}; tinet_ntoa(old, *v); tinet_ntoa(new, addr); tWarn("update ip of fqdn:%s, old: %s, new: %s", fqdn, old, new); - taosHashPut(cache, fqdn, strlen(fqdn) + 1, &addr, sizeof(addr)); + taosHashPut(cache, fqdn, len, &addr, sizeof(addr)); } } return; @@ -1537,21 +1594,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { return; } - if (rpcDebugFlag & DEBUG_TRACE) { - if (tmsgIsValid(pMsg->msg.msgType)) { - char buf[128] = {0}; - sprintf(buf, "%s", TMSG_INFO(pMsg->msg.msgType)); - int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); - if (NULL == 0) { - int localCount = 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } else { - int localCount = *count + 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } - } - } - char* fqdn = EPSET_GET_INUSE_IP(&pMsg->ctx->epSet); uint16_t port = EPSET_GET_INUSE_PORT(&pMsg->ctx->epSet); char addr[TSDB_FQDN_LEN + 64] = {0}; @@ -1609,7 +1651,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { addr.sin_port = (uint16_t)htons(port); tGTrace("%s conn %p try to connect to %s", pTransInst->label, conn, conn->dstAddr); - pThrd->newConnCount++; int32_t fd = taosCreateSocketWithTimeout(TRANS_CONN_TIMEOUT * 10); if (fd == -1) { tGError("%s conn %p failed to create socket, reason:%s", transLabel(pTransInst), conn, @@ -1704,9 +1745,8 @@ static void cliBatchDealReq(queue* wq, SCliThrd* pThrd) { uint32_t port = EPSET_GET_INUSE_PORT(&pCtx->epSet); char key[TSDB_FQDN_LEN + 64] = {0}; CONN_CONSTRUCT_HASH_KEY(key, ip, port); - - // SCliBatch** ppBatch = taosHashGet(pThrd->batchCache, key, sizeof(key)); - SCliBatchList** ppBatchList = taosHashGet(pThrd->batchCache, key, sizeof(key)); + size_t klen = strlen(key); + SCliBatchList** ppBatchList = taosHashGet(pThrd->batchCache, key, klen); if (ppBatchList == NULL || *ppBatchList == NULL) { SCliBatchList* pBatchList = taosMemoryCalloc(1, sizeof(SCliBatchList)); QUEUE_INIT(&pBatchList->wq); @@ -1730,7 +1770,7 @@ static void cliBatchDealReq(queue* wq, SCliThrd* pThrd) { QUEUE_PUSH(&pBatchList->wq, &pBatch->listq); - taosHashPut(pThrd->batchCache, key, sizeof(key), &pBatchList, sizeof(void*)); + taosHashPut(pThrd->batchCache, key, klen, &pBatchList, sizeof(void*)); } else { if (QUEUE_IS_EMPTY(&(*ppBatchList)->wq)) { SCliBatch* pBatch = taosMemoryCalloc(1, sizeof(SCliBatch)); @@ -1800,21 +1840,6 @@ static void cliAsyncCb(uv_async_t* handle) { QUEUE_MOVE(&item->qmsg, &wq); taosThreadMutexUnlock(&item->mtx); - if (rpcDebugFlag & DEBUG_TRACE) { - void* pIter = taosHashIterate(pThrd->msgCount, NULL); - while (pIter != NULL) { - int* count = pIter; - size_t len = 0; - char* key = taosHashGetKey(pIter, &len); - if (*count != 0) { - tDebug("key: %s count: %d", key, *count); - } - - pIter = taosHashIterate(pThrd->msgCount, pIter); - } - tDebug("all conn count: %d", pThrd->newConnCount); - } - int8_t supportBatch = pTransInst->supportBatch; if (supportBatch == 0) { cliNoBatchDealReq(&wq, pThrd); @@ -1885,9 +1910,10 @@ void cliIteraConnMsgs(SCliConn* conn) { bool cliRecvReleaseReq(SCliConn* conn, STransMsgHead* pHead) { if (pHead->release == 1 && (pHead->msgLen) == sizeof(*pHead)) { uint64_t ahandle = pHead->ahandle; - tDebug("ahandle = %" PRIu64 "", ahandle); SCliMsg* pMsg = NULL; CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle); + tDebug("%s conn %p receive release request, refId:%" PRId64 ", may ignore", CONN_GET_INST_LABEL(conn), conn, + conn->refId); transClearBuffer(&conn->readBuf); transFreeMsg(transContFromHead((char*)pHead)); @@ -1896,6 +1922,9 @@ bool cliRecvReleaseReq(SCliConn* conn, STransMsgHead* pHead) { SCliMsg* cliMsg = transQueueGet(&conn->cliMsgs, i); if (cliMsg->type == Release) { ASSERTS(pMsg == NULL, "trans-cli recv invaid release-req"); + tDebug("%s conn %p receive release request, refId:%" PRId64 ", ignore msg", CONN_GET_INST_LABEL(conn), conn, + conn->refId); + cliDestroyConn(conn, true); return true; } } @@ -1971,8 +2000,9 @@ static FORCE_INLINE void destroyCmsgWrapper(void* arg, void* param) { if (pMsg == NULL) { return; } - if (param != NULL) { - SCliThrd* pThrd = param; + + SCliThrd* pThrd = param; + if (pMsg->msg.info.notFreeAhandle == 0 && pThrd != NULL) { if (pThrd->destroyAhandleFp) (*pThrd->destroyAhandleFp)(pMsg->msg.info.ahandle); } destroyCmsg(pMsg); @@ -1984,12 +2014,9 @@ static FORCE_INLINE void destroyCmsgAndAhandle(void* param) { SCliMsg* pMsg = arg->param1; SCliThrd* pThrd = arg->param2; - tDebug("destroy Ahandle A"); - if (pThrd != NULL && pThrd->destroyAhandleFp != NULL) { - tDebug("destroy Ahandle B"); + if (pMsg->msg.info.notFreeAhandle == 0 && pThrd != NULL && pThrd->destroyAhandleFp != NULL) { pThrd->destroyAhandleFp(pMsg->ctx->ahandle); } - tDebug("destroy Ahandle C"); transDestroyConnCtx(pMsg->ctx); transFreeMsg(pMsg->msg.pCont); @@ -2013,11 +2040,9 @@ static SCliThrd* createThrdObj(void* trans) { taosMemoryFree(pThrd); return NULL; } - if (pTransInst->supportBatch) { - pThrd->asyncPool = transAsyncPoolCreate(pThrd->loop, 4, pThrd, cliAsyncCb); - } else { - pThrd->asyncPool = transAsyncPoolCreate(pThrd->loop, 8, pThrd, cliAsyncCb); - } + int32_t nSync = pTransInst->supportBatch ? 4 : 8; + pThrd->asyncPool = transAsyncPoolCreate(pThrd->loop, nSync, pThrd, cliAsyncCb); + if (pThrd->asyncPool == NULL) { tError("failed to init async pool"); uv_loop_close(pThrd->loop); @@ -2058,8 +2083,6 @@ static SCliThrd* createThrdObj(void* trans) { pThrd->quit = false; - pThrd->newConnCount = 0; - pThrd->msgCount = taosHashInit(8, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_NO_LOCK); return pThrd; } static void destroyThrdObj(SCliThrd* pThrd) { @@ -2105,7 +2128,6 @@ static void destroyThrdObj(SCliThrd* pThrd) { pIter = (void**)taosHashIterate(pThrd->batchCache, pIter); } taosHashCleanup(pThrd->batchCache); - taosHashCleanup(pThrd->msgCount); taosMemoryFree(pThrd); } @@ -2124,14 +2146,7 @@ void cliSendQuit(SCliThrd* thrd) { void cliWalkCb(uv_handle_t* handle, void* arg) { if (!uv_is_closing(handle)) { if (uv_handle_get_type(handle) == UV_TIMER) { - // SCliConn* pConn = handle->data; - // if (pConn != NULL && pConn->timer != NULL) { - // SCliThrd* pThrd = pConn->hostThrd; - // uv_timer_stop((uv_timer_t*)handle); - // handle->data = NULL; - // taosArrayPush(pThrd->timerList, &pConn->timer); - // pConn->timer = NULL; - // } + // do nothing } else { uv_read_stop((uv_stream_t*)handle); } @@ -2166,18 +2181,23 @@ static void doCloseIdleConn(void* param) { cliDestroyConn(conn, true); taosMemoryFree(arg); } +static void cliSchedMsgToDebug(SCliMsg* pMsg, char* label) { + if (!(rpcDebugFlag & DEBUG_DEBUG)) { + return; + } + STransConnCtx* pCtx = pMsg->ctx; + STraceId* trace = &pMsg->msg.info.traceId; + char tbuf[512] = {0}; + EPSET_TO_STR(&pCtx->epSet, tbuf); + tGDebug("%s retry on next node,use:%s, step: %d,timeout:%" PRId64 "", label, tbuf, pCtx->retryStep, + pCtx->retryNextInterval); + return; +} static void cliSchedMsgToNextNode(SCliMsg* pMsg, SCliThrd* pThrd) { STrans* pTransInst = pThrd->pTransInst; STransConnCtx* pCtx = pMsg->ctx; - - if (rpcDebugFlag & DEBUG_DEBUG) { - STraceId* trace = &pMsg->msg.info.traceId; - char tbuf[512] = {0}; - EPSET_TO_STR(&pCtx->epSet, tbuf); - tGDebug("%s retry on next node,use:%s, step: %d,timeout:%" PRId64 "", transLabel(pThrd->pTransInst), tbuf, - pCtx->retryStep, pCtx->retryNextInterval); - } + cliSchedMsgToDebug(pMsg, transLabel(pThrd->pTransInst)); STaskArg* arg = taosMemoryMalloc(sizeof(STaskArg)); arg->param1 = pMsg; @@ -2186,12 +2206,6 @@ static void cliSchedMsgToNextNode(SCliMsg* pMsg, SCliThrd* pThrd) { transDQSched(pThrd->delayQueue, doDelayTask, arg, pCtx->retryNextInterval); } -FORCE_INLINE void cliCompareAndSwap(int8_t* val, int8_t exp, int8_t newVal) { - if (*val != exp) { - *val = newVal; - } -} - FORCE_INLINE bool cliTryExtractEpSet(STransMsg* pResp, SEpSet* dst) { if ((pResp == NULL || pResp->info.hasEpSet == 0)) { return false; @@ -2411,20 +2425,6 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { tGTrace("%s conn %p extract epset from msg", CONN_GET_INST_LABEL(pConn), pConn); } } - if (rpcDebugFlag & DEBUG_TRACE) { - if (tmsgIsValid(pResp->msgType - 1)) { - char buf[128] = {0}; - sprintf(buf, "%s", TMSG_INFO(pResp->msgType - 1)); - int* count = taosHashGet(pThrd->msgCount, buf, sizeof(buf)); - if (NULL == 0) { - int localCount = 0; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } else { - int localCount = *count - 1; - taosHashPut(pThrd->msgCount, buf, sizeof(buf), &localCount, sizeof(localCount)); - } - } - } if (pCtx->pSem || pCtx->syncMsgRef != 0) { tGTrace("%s conn %p(sync) handle resp", CONN_GET_INST_LABEL(pConn), pConn); if (pCtx->pSem) { @@ -2547,21 +2547,7 @@ int transReleaseCliHandle(void* handle) { } return 0; } - -int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransCtx* ctx) { - STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)shandle); - if (pTransInst == NULL) { - transFreeMsg(pReq->pCont); - return TSDB_CODE_RPC_BROKEN_LINK; - } - - SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle); - if (pThrd == NULL) { - transFreeMsg(pReq->pCont); - transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); - return TSDB_CODE_RPC_BROKEN_LINK; - } - +static SCliMsg* transInitMsg(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransCtx* ctx) { TRACE_SET_MSGID(&pReq->info.traceId, tGenIdPI64()); STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx)); epsetAssign(&pCtx->epSet, pEpSet); @@ -2578,12 +2564,48 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran cliMsg->st = taosGetTimestampUs(); cliMsg->type = Normal; cliMsg->refId = (int64_t)shandle; + QUEUE_INIT(&cliMsg->seqq); + return cliMsg; +} + +int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransCtx* ctx) { + STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)shandle); + if (pTransInst == NULL) { + transFreeMsg(pReq->pCont); + return TSDB_CODE_RPC_BROKEN_LINK; + } + + int64_t handle = (int64_t)pReq->info.handle; + SCliThrd* pThrd = transGetWorkThrd(pTransInst, handle); + if (pThrd == NULL) { + transFreeMsg(pReq->pCont); + transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); + return TSDB_CODE_RPC_BROKEN_LINK; + } + if (handle != 0) { + SExHandle* exh = transAcquireExHandle(transGetRefMgt(), handle); + if (exh != NULL) { + taosWLockLatch(&exh->latch); + if (exh->handle == NULL && exh->inited != 0) { + SCliMsg* pCliMsg = transInitMsg(shandle, pEpSet, pReq, ctx); + QUEUE_PUSH(&exh->q, &pCliMsg->seqq); + taosWUnLockLatch(&exh->latch); + tDebug("msg refId: %" PRId64 "", handle); + transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); + return 0; + } + exh->inited = 1; + taosWUnLockLatch(&exh->latch); + transReleaseExHandle(transGetRefMgt(), handle); + } + } + SCliMsg* pCliMsg = transInitMsg(shandle, pEpSet, pReq, ctx); STraceId* trace = &pReq->info.traceId; tGDebug("%s send request at thread:%08" PRId64 ", dst:%s:%d, app:%p", transLabel(pTransInst), pThrd->pid, - EPSET_GET_INUSE_IP(&pCtx->epSet), EPSET_GET_INUSE_PORT(&pCtx->epSet), pReq->info.ahandle); - if (0 != transAsyncSend(pThrd->asyncPool, &(cliMsg->q))) { - destroyCmsg(cliMsg); + EPSET_GET_INUSE_IP(pEpSet), EPSET_GET_INUSE_PORT(pEpSet), pReq->info.ahandle); + if (0 != transAsyncSend(pThrd->asyncPool, &(pCliMsg->q))) { + destroyCmsg(pCliMsg); transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); return TSDB_CODE_RPC_BROKEN_LINK; } @@ -2769,6 +2791,8 @@ int transSetDefaultAddr(void* shandle, const char* ip, const char* fqdn) { int64_t transAllocHandle() { SExHandle* exh = taosMemoryCalloc(1, sizeof(SExHandle)); exh->refId = transAddExHandle(transGetRefMgt(), exh); + QUEUE_INIT(&exh->q); + taosInitRWLatch(&exh->latch); tDebug("pre alloc refId %" PRId64 "", exh->refId); return exh->refId; diff --git a/source/libs/transport/src/transSvr.c b/source/libs/transport/src/transSvr.c index f47a688e6f..21ad5be869 100644 --- a/source/libs/transport/src/transSvr.c +++ b/source/libs/transport/src/transSvr.c @@ -761,9 +761,12 @@ static bool uvRecvReleaseReq(SSvrConn* pConn, STransMsgHead* pHead) { tTrace("conn %p received release request", pConn); STraceId traceId = pHead->traceId; - pConn->status = ConnRelease; transClearBuffer(&pConn->readBuf); transFreeMsg(transContFromHead((char*)pHead)); + if (pConn->status != ConnAcquire) { + return true; + } + pConn->status = ConnRelease; STransMsg tmsg = {.code = 0, .info.handle = (void*)pConn, .info.traceId = traceId, .info.ahandle = (void*)0x9527}; SSvrMsg* srvMsg = taosMemoryCalloc(1, sizeof(SSvrMsg)); @@ -1090,6 +1093,7 @@ static FORCE_INLINE SSvrConn* createConn(void* hThrd) { STrans* pTransInst = pThrd->pTransInst; pConn->refId = exh->refId; + QUEUE_INIT(&exh->q); transRefSrvHandle(pConn); tTrace("%s handle %p, conn %p created, refId:%" PRId64, transLabel(pTransInst), exh, pConn, pConn->refId); return pConn; @@ -1121,6 +1125,7 @@ static int reallocConnRef(SSvrConn* conn) { exh->handle = conn; exh->pThrd = conn->hostThrd; exh->refId = transAddExHandle(transGetRefMgt(), exh); + QUEUE_INIT(&exh->q); transAcquireExHandle(transGetRefMgt(), exh->refId); conn->refId = exh->refId; diff --git a/source/util/src/tworker.c b/source/util/src/tworker.c index 138d4bc1f4..0712010458 100644 --- a/source/util/src/tworker.c +++ b/source/util/src/tworker.c @@ -19,7 +19,7 @@ #include "tgeosctx.h" #include "tlog.h" -#define QUEUE_THRESHOLD 1000 * 1000 +#define QUEUE_THRESHOLD (1000 * 1000) typedef void *(*ThreadFp)(void *param); diff --git a/source/util/test/tbaseCodecTest.cpp b/source/util/test/tbaseCodecTest.cpp index 4c56979885..63bbfcaa68 100644 --- a/source/util/test/tbaseCodecTest.cpp +++ b/source/util/test/tbaseCodecTest.cpp @@ -17,11 +17,6 @@ using namespace std; #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wsign-compare" -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - static void checkBase58Codec(uint8_t *pRaw, int32_t rawLen, int32_t index) { int64_t start = taosGetTimestampUs(); char *pEnc = base58_encode((const uint8_t *)pRaw, rawLen); diff --git a/tests/script/tsim/parser/columnValue_bool.sim b/tests/script/tsim/parser/columnValue_bool.sim index db89db4256..97d074a6f9 100644 --- a/tests/script/tsim/parser/columnValue_bool.sim +++ b/tests/script/tsim/parser/columnValue_bool.sim @@ -936,6 +936,9 @@ sql_error alter table st_bool_i1 set tag tagname="123abc" sql alter table st_bool_i2 set tag tagname="123" sql_error alter table st_bool_i3 set tag tagname=abc sql_error alter table st_bool_i4 set tag tagname="abc" +sql_error alter table st_bool_i4 set tag tagname=now +sql_error alter table st_bool_i4 set tag tagname=now()+1d +sql_error alter table st_bool_i4 set tag tagname=1+1d sql_error alter table st_bool_i5 set tag tagname=" " sql_error alter table st_bool_i6 set tag tagname='' diff --git a/tests/script/tsim/parser/columnValue_int.sim b/tests/script/tsim/parser/columnValue_int.sim index f03a576ae3..f022c33363 100644 --- a/tests/script/tsim/parser/columnValue_int.sim +++ b/tests/script/tsim/parser/columnValue_int.sim @@ -913,6 +913,8 @@ sql_error alter table st_int_e19 set tag tagname=123abc sql_error alter table st_int_e20 set tag tagname="123abc" sql_error alter table st_int_e22 set tag tagname=abc sql_error alter table st_int_e23 set tag tagname="abc" +sql_error alter table st_int_e25 set tag tagname=1+1d +sql_error alter table st_int_e25 set tag tagname="1"+1d sql_error alter table st_int_e24 set tag tagname=" " sql_error alter table st_int_e25 set tag tagname='' sql alter table st_int_e26_1 set tag tagname='123' diff --git a/tests/script/tsim/parser/columnValue_timestamp.sim b/tests/script/tsim/parser/columnValue_timestamp.sim index 1f457dbd7c..4334230a05 100644 --- a/tests/script/tsim/parser/columnValue_timestamp.sim +++ b/tests/script/tsim/parser/columnValue_timestamp.sim @@ -132,6 +132,77 @@ sql show tags from st_timestamp_22 if $data05 != -1 then return -1 endi +sql create table st_timestamp_23 using mt_timestamp tags (1+ 1d ) +sql show tags from st_timestamp_23 +if $data05 != 86400001 then + return -1 +endi +sql create table st_timestamp_24 using mt_timestamp tags (-0 + 1d) +sql show tags from st_timestamp_24 +if $data05 != 86400000 then + return -1 +endi +sql create table st_timestamp_25 using mt_timestamp tags ("-0" -1s) +sql show tags from st_timestamp_25 +if $data05 != -1000 then + return -1 +endi +sql create table st_timestamp_26 using mt_timestamp tags (0b01 -1a) +sql show tags from st_timestamp_26 +if $data05 != 0 then + return -1 +endi +sql create table st_timestamp_27 using mt_timestamp tags (0b01 -1s) +sql show tags from st_timestamp_27 +if $data05 != -999 then + return -1 +endi +sql create table st_timestamp_28 using mt_timestamp tags ("0x01" +1u) +sql show tags from st_timestamp_28 +if $data05 != 1 then + return -1 +endi +sql create table st_timestamp_29 using mt_timestamp tags (0x01 +1b) +sql show tags from st_timestamp_29 +if $data05 != 1 then + return -1 +endi +sql create table st_timestamp_30 using mt_timestamp tags (-0b00 -0a) +sql show tags from st_timestamp_30 +if $data05 != 0 then + return -1 +endi +sql create table st_timestamp_31 using mt_timestamp tags ("-0x00" +1u) +sql show tags from st_timestamp_31 +if $data05 != 0 then + return -1 +endi +sql create table st_timestamp_32 using mt_timestamp tags (-0x00 +1b) +sql show tags from st_timestamp_32 +if $data05 != 0 then + return -1 +endi +sql create table st_timestamp_33 using mt_timestamp tags (now +1b) +sql show tags from st_timestamp_33 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_34 using mt_timestamp tags ("now()" +1b) +sql show tags from st_timestamp_34 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_35 using mt_timestamp tags (today() +1d) +sql show tags from st_timestamp_35 +if $data05 < 1711883186000 then + return -1 +endi +sql create table st_timestamp_36 using mt_timestamp tags ("today()" +1d) +sql show tags from st_timestamp_36 +if $data05 < 1711883186000 then + return -1 +endi + ## case 01: insert values for test column values sql insert into st_timestamp_0 values(now,NULL) @@ -249,6 +320,76 @@ sql select ts, cast(c as bigint) from st_timestamp_22 if $data01 != -1 then return -1 endi +sql insert into st_timestamp_23 values(now,1+ 1d ) +sql select ts, cast(c as bigint) from st_timestamp_23 +if $data01 != 86400001 then + return -1 +endi +sql insert into st_timestamp_24 values(now,-0 + 1d) +sql select ts, cast(c as bigint) from st_timestamp_24 +if $data01 != 86400000 then + return -1 +endi +sql insert into st_timestamp_25 values(now,"-0" -1s) +sql select ts, cast(c as bigint) from st_timestamp_25 +if $data01 != -1000 then + return -1 +endi +sql insert into st_timestamp_26 values(now,0b01 -1a) +sql select ts, cast(c as bigint) from st_timestamp_26 +if $data01 != 0 then + return -1 +endi +sql insert into st_timestamp_27 values(now,+0b01 -1s) +sql select ts, cast(c as bigint) from st_timestamp_27 +if $data01 != -999 then + return -1 +endi +sql insert into st_timestamp_28 values(now,"+0x01" +1u) +sql select ts, cast(c as bigint) from st_timestamp_28 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_29 values(now,0x01 +1b) +sql select ts, cast(c as bigint) from st_timestamp_29 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_30 values(now,-0b00 -0a) +sql show tags from st_timestamp_30 +if $data05 != 0 then + return -1 +endi +sql insert into st_timestamp_31 values(now,"-0x00" +1u) +sql show tags from st_timestamp_31 +if $data05 != 0 then + return -1 +endi +sql insert into st_timestamp_32 values (now,-0x00 +1b) +sql show tags from st_timestamp_32 +if $data05 != 0 then + return -1 +endi +sql insert into st_timestamp_33 values(now,now +1b) +sql select ts, cast(c as bigint) from st_timestamp_33 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_34 values(now,"now()" +1b) +sql select ts, cast(c as bigint) from st_timestamp_34 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_35 values(now,today() +1d) +sql select ts, cast(c as bigint) from st_timestamp_35 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_36 values(now,"today()" +1d) +sql select ts, cast(c as bigint) from st_timestamp_36 +if $data01 < 1711883186000 then + return -1 +endi ## case 02: dynamic create table for test tag values sql insert into st_timestamp_100 using mt_timestamp tags(NULL) values(now, NULL) @@ -450,6 +591,136 @@ sql select ts, cast(c as bigint) from st_timestamp_1022 if $data01 != -1 then return -1 endi +sql insert into st_timestamp_1023 using mt_timestamp tags(+1+1d) values(now,+1+ 1d ) +sql show tags from st_timestamp_1023 +if $data05 != 86400001 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1023 +if $data01 != 86400001 then + return -1 +endi +sql insert into st_timestamp_1024 using mt_timestamp tags(-0+1d) values(now,-0 + 1d) +sql show tags from st_timestamp_1024 +if $data05 != 86400000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1024 +if $data01 != 86400000 then + return -1 +endi +sql insert into st_timestamp_1025 using mt_timestamp tags("-0" -1s) values(now,"-0" -1s) +sql show tags from st_timestamp_1025 +if $data05 != -1000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1025 +if $data01 != -1000 then + return -1 +endi +sql insert into st_timestamp_1026 using mt_timestamp tags(+0b01-1a) values(now,+0b01 -1a) +sql show tags from st_timestamp_1026 +if $data05 != 0 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1026 +if $data01 != 0 then + return -1 +endi +sql insert into st_timestamp_1027 using mt_timestamp tags(0b01-1s) values(now,0b01 -1s) +sql show tags from st_timestamp_1027 +if $data05 != -999 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1027 +if $data01 != -999 then + return -1 +endi +sql insert into st_timestamp_1028 using mt_timestamp tags("0x01" + 1u) values(now,"0x01" +1u) +sql show tags from st_timestamp_1028 +if $data05 != 1 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1028 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_1029 using mt_timestamp tags(+0x01 +1b) values(now,+0x01 +1b) +sql show tags from st_timestamp_1029 +if $data05 != 1 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1029 +if $data01 != 1 then + return -1 +endi +sql insert into st_timestamp_1030 using mt_timestamp tags (-0b00 -0a) values(now,-0b00 -0a) +sql show tags from st_timestamp_1030 +if $data05 != 0 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1030 +if $data01 != 0 then + return -1 +endi +sql insert into st_timestamp_1031 using mt_timestamp tags ("-0x00" +1u) values(now,"-0x00" +1u) +sql show tags from st_timestamp_1031 +if $data05 != 0 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1031 +if $data01 != 0 then + return -1 +endi +sql insert into st_timestamp_1032 using mt_timestamp tags (-0x00 +1b) values(now,-0x00 +1b) +sql show tags from st_timestamp_1032 +if $data05 != 0 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1032 +if $data01 != 0 then + return -1 +endi +sql insert into st_timestamp_1033 using mt_timestamp tags(now+1b) values(now,now +1b) +sql show tags from st_timestamp_1033 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1033 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1034 using mt_timestamp tags("now" +1b) values(now,"now()" +1b) +sql show tags from st_timestamp_1034 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1034 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1035 using mt_timestamp tags(today() + 1d) values(now,today() +1d) +sql show tags from st_timestamp_1035 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1035 +if $data01 < 1711883186000 then + return -1 +endi +sql insert into st_timestamp_1036 using mt_timestamp tags("today" +1d) values(now,"today()" +1d) +sql show tags from st_timestamp_1036 +if $data05 < 1711883186000 then + return -1 +endi +sql select ts, cast(c as bigint) from st_timestamp_1036 +if $data01 < 1711883186000 then + return -1 +endi + + + + ### case 03: alter tag values sql alter table st_timestamp_0 set tag tagname=NULL @@ -567,12 +838,85 @@ sql show tags from st_timestamp_22 if $data05 != -1 then return -1 endi +sql alter table st_timestamp_23 set tag tagname=1+ 1d +sql show tags from st_timestamp_23 +if $data05 != 86400001 then + return -1 +endi +sql alter table st_timestamp_24 set tag tagname=-0 + 1d +sql show tags from st_timestamp_24 +if $data05 != 86400000 then + return -1 +endi +sql alter table st_timestamp_25 set tag tagname="-0" -1s +sql show tags from st_timestamp_25 +if $data05 != -1000 then + return -1 +endi +sql alter table st_timestamp_26 set tag tagname=+0b01 -1a +sql show tags from st_timestamp_26 +if $data05 != 0 then + return -1 +endi +sql alter table st_timestamp_27 set tag tagname=0b01 -1s +sql show tags from st_timestamp_27 +if $data05 != -999 then + return -1 +endi +sql alter table st_timestamp_28 set tag tagname="0x01" +1u +sql show tags from st_timestamp_28 +if $data05 != 1 then + return -1 +endi +sql alter table st_timestamp_29 set tag tagname=0x01 +1b +sql show tags from st_timestamp_29 +if $data05 != 1 then + return -1 +endi +sql alter table st_timestamp_30 set tag tagname==-0b00 -0a +sql show tags from st_timestamp_30 +if $data05 != 0 then + return -1 +endi +sql alter table st_timestamp_31 set tag tagname="-0x00" +1u +sql show tags from st_timestamp_31 +if $data05 != 0 then + return -1 +endi +sql alter table st_timestamp_32 set tag tagname=-0x00 +1b +sql show tags from st_timestamp_32 +if $data05 != 0 then + return -1 +endi +sql alter table st_timestamp_33 set tag tagname=now +1b +sql show tags from st_timestamp_33 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_34 set tag tagname="now()" +1b +sql show tags from st_timestamp_34 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_35 set tag tagname=today( ) +1d +sql show tags from st_timestamp_35 +if $data05 < 1711883186000 then + return -1 +endi +sql alter table st_timestamp_36 set tag tagname="today()" +1d +sql show tags from st_timestamp_36 +if $data05 < 1711883186000 then + return -1 +endi ## case 04: illegal input sql_error create table st_timestamp_e0 using mt_timestamp tags (123abc) sql_error create table st_timestamp_e0 using mt_timestamp tags ("123abc") sql_error create table st_timestamp_e0 using mt_timestamp tags (abc) sql_error create table st_timestamp_e0 using mt_timestamp tags ("abc") +sql_error create table st_timestamp_e0 using mt_timestamp tags (now()+1d+1s) +sql_error create table st_timestamp_e0 using mt_timestamp tags (1+1y) +sql_error create table st_timestamp_e0 using mt_timestamp tags (0x01+1b+1a) sql_error create table st_timestamp_e0 using mt_timestamp tags (" ") sql_error create table st_timestamp_e0 using mt_timestamp tags ('') sql_error create table st_timestamp_104 using mt_timestamp tags ("-123.1") @@ -590,5 +934,7 @@ sql_error create table st_timestamp_115 using mt_timestamp tags (922337203685477 sql create table st_timestamp_116 using mt_timestamp tags (-9223372036854775808) sql_error create table st_timestamp_117 using mt_timestamp tags (-9223372036854775809) sql_error insert into st_timestamp_118 using mt_timestamp tags(9223372036854775807) values(9223372036854775807, 9223372036854775807) +sql_error insert into st_timestamp_119 using mt_timestamp tags(1+1s-1s) values(now, now) +sql_error insert into st_timestamp_120 using mt_timestamp tags(1-1s) values(now, now-1s+1d) system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/columnValue_varbinary.sim b/tests/script/tsim/parser/columnValue_varbinary.sim index 1db1054646..eb437f7597 100644 --- a/tests/script/tsim/parser/columnValue_varbinary.sim +++ b/tests/script/tsim/parser/columnValue_varbinary.sim @@ -299,6 +299,8 @@ sql_error create table st_varbinary_1012 using mt_varbinary tags(tRue) sql_error create table st_varbinary_1013 using mt_varbinary tags(FalsE) sql_error create table st_varbinary_1014 using mt_varbinary tags(noW) sql_error create table st_varbinary_1015 using mt_varbinary tags(toDay) +sql_error create table st_varbinary_1016 using mt_varbinary tags(now()+1s) +sql_error create table st_varbinary_1017 using mt_varbinary tags(1+1s) sql_error insert into st_varbinary_106 using mt_varbinary tags(+0123) values(now, NULL); sql_error insert into st_varbinary_107 using mt_varbinary tags(-01.23) values(now, NULL); sql_error insert into st_varbinary_108 using mt_varbinary tags(+0x01) values(now, NULL); @@ -309,6 +311,8 @@ sql_error insert into st_varbinary_1012 using mt_varbinary tags(tRue) values(no sql_error insert into st_varbinary_1013 using mt_varbinary tags(FalsE) values(now, NULL); sql_error insert into st_varbinary_1014 using mt_varbinary tags(noW) values(now, NULL); sql_error insert into st_varbinary_1015 using mt_varbinary tags(toDay) values(now, NULL); +sql_error insert into st_varbinary_1016 using mt_varbinary tags(now()+1s) values(now, NULL); +sql_error insert into st_varbinary_1017 using mt_varbinary tags(1+1s) values(now, NULL); sql_error insert into st_varbinary_106 using mt_varbinary tags(NULL) values(now(), +0123) sql_error insert into st_varbinary_107 using mt_varbinary tags(NULL) values(now(), -01.23) sql_error insert into st_varbinary_108 using mt_varbinary tags(NULL) values(now(), +0x01) @@ -319,5 +323,7 @@ sql_error insert into st_varbinary_1012 using mt_varbinary tags(NULL) values(no sql_error insert into st_varbinary_1013 using mt_varbinary tags(NULL) values(now(), FalsE) sql_error insert into st_varbinary_1014 using mt_varbinary tags(NULL) values(now(), noW) sql_error insert into st_varbinary_1015 using mt_varbinary tags(NULL) values(now(), toDay) +sql_error insert into st_varbinary_1016 using mt_varbinary tags(NULL) values(now(), now()+1s) +sql_error insert into st_varbinary_1017 using mt_varbinary tags(NULL) values(now(), 1+1s) system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/columnValue_varchar.sim b/tests/script/tsim/parser/columnValue_varchar.sim index 5edfe5ed24..b705f3069a 100644 --- a/tests/script/tsim/parser/columnValue_varchar.sim +++ b/tests/script/tsim/parser/columnValue_varchar.sim @@ -410,6 +410,17 @@ endi # case 04: illegal input +sql_error create table st_varchar_100 using mt_varchar tags(now+1d) +sql_error create table st_varchar_101 using mt_varchar tags(toDay+1d) +sql_error create table st_varchar_102 using mt_varchar tags(1+1b) +sql_error create table st_varchar_103 using mt_varchar tags(0x01+1d) +sql_error create table st_varchar_104 using mt_varchar tags(0b01+1s) +sql_error insert into st_varchar_1100 using mt_varchar tags('now') values(now(),now+1d) +sql_error insert into st_varchar_1101 using mt_varchar tags('now') values(now(),toDay+1d) +sql_error insert into st_varchar_1102 using mt_varchar tags('now') values(now(),1+1b) +sql_error insert into st_varchar_1103 using mt_varchar tags('now') values(now(),0x01+1d) +sql_error insert into st_varchar_1104 using mt_varchar tags('now') values(now(),0b01+1s) +sql_error alter table st_varchar_15 set tag tagname=now()+1d system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/system-test/7-tmq/tmq_ts4563.py b/tests/system-test/7-tmq/tmq_ts4563.py index fc1cc259ce..13f510ffe6 100644 --- a/tests/system-test/7-tmq/tmq_ts4563.py +++ b/tests/system-test/7-tmq/tmq_ts4563.py @@ -29,9 +29,11 @@ class TDTestCase: tdSql.execute(f'use db_stmt') tdSql.query("select ts,k from st") - tdSql.checkRows(2) + tdSql.checkRows(self.expected_affected_rows) tdSql.execute(f'create topic t_unorder_data as select ts,k from st') + tdSql.execute(f'create topic t_unorder_data_none as select i,k from st') + consumer_dict = { "group.id": "g1", "td.connect.user": "root", @@ -41,7 +43,7 @@ class TDTestCase: consumer = Consumer(consumer_dict) try: - consumer.subscribe(["t_unorder_data"]) + consumer.subscribe(["t_unorder_data", "t_unorder_data_none"]) except TmqError: tdLog.exit(f"subscribe error") @@ -51,18 +53,15 @@ class TDTestCase: res = consumer.poll(1) print(res) if not res: - if cnt == 0: + if cnt == 0 or cnt != 2*self.expected_affected_rows: tdLog.exit("consume error") break val = res.value() if val is None: continue for block in val: + print(block.fetchall(),len(block.fetchall())) cnt += len(block.fetchall()) - - if cnt != 2: - tdLog.exit("consume error") - finally: consumer.close() @@ -110,20 +109,32 @@ class TDTestCase: params = new_multi_binds(2) params[0].timestamp((1626861392589, 1626861392590)) params[1].int([3, None]) - + # print(type(stmt)) tdLog.debug("bind_param_batch start") stmt.bind_param_batch(params) + tdLog.debug("bind_param_batch end") stmt.execute() tdLog.debug("execute end") + conn.execute("flush database %s" % dbname) + + params1 = new_multi_binds(2) + params1[0].timestamp((1626861392587,1626861392586)) + params1[1].int([None,3]) + stmt.bind_param_batch(params1) + stmt.execute() + end = datetime.now() print("elapsed time: ", end - start) - assert stmt.affected_rows == 2 + print(stmt.affected_rows) + self.expected_affected_rows = 4 + if stmt.affected_rows != self.expected_affected_rows : + tdLog.exit("affected_rows error") tdLog.debug("close start") stmt.close() - + # conn.execute("drop database if exists %s" % dbname) conn.close() diff --git a/tests/system-test/8-stream/stream_basic.py b/tests/system-test/8-stream/stream_basic.py index 3ebc255114..ff16bee787 100644 --- a/tests/system-test/8-stream/stream_basic.py +++ b/tests/system-test/8-stream/stream_basic.py @@ -78,14 +78,55 @@ class TDTestCase: tdLog.info(cmd) os.system(cmd) + def case1(self): + + tdSql.execute(f'create database if not exists d1 vgroups 1') + tdSql.execute(f'use d1') + tdSql.execute(f'create table st(ts timestamp, i int) tags(t int)') + tdSql.execute(f'insert into t1 using st tags(1) values(now, 1) (now+1s, 2)') + tdSql.execute(f'insert into t2 using st tags(2) values(now, 1) (now+1s, 2)') + tdSql.execute(f'insert into t3 using st tags(3) values(now, 1) (now+1s, 2)') + + tdSql.execute("create stream stream1 fill_history 1 into sta subtable(concat('new-', tname)) AS SELECT " + "_wstart, count(*), avg(i) FROM st PARTITION BY tbname tname INTERVAL(1m)", show=True) + + tdSql.execute("create stream stream2 fill_history 1 into stb subtable(concat('new-', tname)) AS SELECT " + "_wstart, count(*), avg(i) FROM st PARTITION BY tbname tname INTERVAL(1m)", show=True) + + time.sleep(2) + tdSql.query("select * from sta") + tdSql.checkRows(3) + tdSql.query("select tbname from sta order by tbname") + if not tdSql.getData(0, 0).startswith('new-t1_1.d1.sta_'): + tdLog.exit("error1") + + if not tdSql.getData(1, 0).startswith('new-t2_1.d1.sta_'): + tdLog.exit("error2") + + if not tdSql.getData(2, 0).startswith('new-t3_1.d1.sta_'): + tdLog.exit("error3") + + tdSql.query("select * from stb") + tdSql.checkRows(3) + tdSql.query("select tbname from stb order by tbname") + if not tdSql.getData(0, 0).startswith('new-t1_1.d1.stb_'): + tdLog.exit("error4") + + if not tdSql.getData(1, 0).startswith('new-t2_1.d1.stb_'): + tdLog.exit("error5") + + if not tdSql.getData(2, 0).startswith('new-t3_1.d1.stb_'): + tdLog.exit("error6") + # run def run(self): + self.case1() # gen data random.seed(int(time.time())) self.taosBenchmark(" -d db -t 2 -v 2 -n 1000000 -y") # create stream tdSql.execute("use db") - tdSql.execute("create stream stream1 fill_history 1 into sta as select count(*) as cnt from meters interval(10a);",show=True) + tdSql.execute("create stream stream3 fill_history 1 into sta as select count(*) as cnt from meters interval(10a);",show=True) sql = "select count(*) from sta" # loop wait max 60s to check count is ok tdLog.info("loop wait result ...") diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a1c5405253..188abb4b58 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -18,7 +18,7 @@ IF (TD_WEBSOCKET) COMMAND git clean -f -d BUILD_COMMAND COMMAND cargo update - COMMAND RUSTFLAGS=-Ctarget-feature=-crt-static cargo build --release -p taos-ws-sys --features native-tls + COMMAND RUSTFLAGS=-Ctarget-feature=-crt-static cargo build --release -p taos-ws-sys --features rustls INSTALL_COMMAND COMMAND cp target/release/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include @@ -37,7 +37,7 @@ IF (TD_WEBSOCKET) COMMAND git clean -f -d BUILD_COMMAND COMMAND cargo update - COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored + COMMAND cargo build --release -p taos-ws-sys --features rustls INSTALL_COMMAND COMMAND cp target/release/taosws.dll ${CMAKE_BINARY_DIR}/build/lib COMMAND cp target/release/taosws.dll.lib ${CMAKE_BINARY_DIR}/build/lib/taosws.lib @@ -57,7 +57,7 @@ IF (TD_WEBSOCKET) COMMAND git clean -f -d BUILD_COMMAND COMMAND cargo update - COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored + COMMAND cargo build --release -p taos-ws-sys --features rustls INSTALL_COMMAND COMMAND cp target/release/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include