diff --git a/docs/en/07-develop/03-insert-data/_py_kafka.mdx b/docs/en/07-develop/03-insert-data/_py_kafka.mdx index dc43a0d415..c71821dad1 100644 --- a/docs/en/07-develop/03-insert-data/_py_kafka.mdx +++ b/docs/en/07-develop/03-insert-data/_py_kafka.mdx @@ -53,8 +53,69 @@ for p in ps: In addition to python's built-in multithreading and multiprocessing library, we can also use the third-party library gunicorn. -### Examples +### examples + +
+kafka_example_perform + +`kafka_example_perform` is the entry point of the examples. ```py -{{#include docs/examples/python/kafka_example.py}} +{{#include docs/examples/python/kafka_example_perform.py}} ``` +
+ +
+kafka_example_common + +`kafka_example_common` is the common code of the examples. + +```py +{{#include docs/examples/python/kafka_example_common.py}} +``` +
+ +
+kafka_example_producer + +`kafka_example_producer` is `producer`, which is responsible for generating test data and sending it to kafka. + +```py +{{#include docs/examples/python/kafka_example_producer.py}} +``` +
+ +
+kafka_example_consumer + +`kafka_example_consumer` is `consumer`,which is responsible for consuming data from kafka and writing it to TDengine. + +```py +{{#include docs/examples/python/kafka_example_consumer.py}} +``` +
+ +### execute Python examples + +
+ execute Python examples + + 1. install and start up `kafka` + 2. install python3 and pip + 3. install `taospy` by pip + 4. install `kafka-python` by pip + 5. execute this example + + The entry point of this example is `kafka_example_perform.py`. For more information about usage, please use `--help` command. + + ``` + python3 kafka_example_perform.py --help + ``` + + For example, the following command is creating 100 sub-table and inserting 20000 data for each table and the kafka max poll is 100 and 1 thread and 1 process per thread. + + ``` + python3 kafka_example_perform.py -table-count=100 -table-items=20000 -max-poll=100 -threads=1 -processes=1 + ``` + +
diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index b2d44f1a1d..68ac0b0bb5 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -873,9 +873,9 @@ INTERP(expr) - `INTERP` is used to get the value that matches the specified time slice from a column. If no such value exists an interpolation value will be returned based on `FILL` parameter. - The input data of `INTERP` is the value of the specified column and a `where` clause can be used to filter the original data. If no `where` condition is specified then all original data is the input. - `INTERP` must be used along with `RANGE`, `EVERY`, `FILL` keywords. -- The output time range of `INTERP` is specified by `RANGE(timestamp1,timestamp2)` parameter, with timestamp1<=timestamp2. timestamp1 is the starting point of the output time range and must be specified. timestamp2 is the ending point of the output time range and must be specified. -- The number of rows in the result set of `INTERP` is determined by the parameter `EVERY`. Starting from timestamp1, one interpolation is performed for every time interval specified `EVERY` parameter. The parameter `EVERY` must be an integer, with no quotes, with a time unit of: b(nanosecond), u(microsecond), a(millisecond)), s(second), m(minute), h(hour), d(day), or w(week). For example, `EVERY(500a)` will interpolate every 500 milliseconds. -- Interpolation is performed based on `FILL` parameter. +- The output time range of `INTERP` is specified by `RANGE(timestamp1,timestamp2)` parameter, with timestamp1 < timestamp2. timestamp1 is the starting point of the output time range and must be specified. timestamp2 is the ending point of the output time range and must be specified. +- The number of rows in the result set of `INTERP` is determined by the parameter `EVERY(time_unit)`. Starting from timestamp1, one interpolation is performed for every time interval specified `time_unit` parameter. The parameter `time_unit` must be an integer, with no quotes, with a time unit of: a(millisecond)), s(second), m(minute), h(hour), d(day), or w(week). For example, `EVERY(500a)` will interpolate every 500 milliseconds. +- Interpolation is performed based on `FILL` parameter. For more information about FILL clause, see [FILL Clause](./distinguished/#fill-clause). - `INTERP` can only be used to interpolate in single timeline. So it must be used with `partition by tbname` when it's used on a STable. - Pseudocolumn `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.1.4). - Pseudocolumn `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.2.3). diff --git a/docs/examples/python/kafka_example.py b/docs/examples/python/kafka_example.py deleted file mode 100644 index 5b81706ef7..0000000000 --- a/docs/examples/python/kafka_example.py +++ /dev/null @@ -1,241 +0,0 @@ -#! encoding = utf-8 -import json -import time -from json import JSONDecodeError -from typing import Callable -import logging -from concurrent.futures import ThreadPoolExecutor, Future - -import taos -from kafka import KafkaConsumer -from kafka.consumer.fetcher import ConsumerRecord - - -class Consumer(object): - DEFAULT_CONFIGS = { - 'kafka_brokers': 'localhost:9092', - 'kafka_topic': 'python_kafka', - 'kafka_group_id': 'taos', - 'taos_host': 'localhost', - 'taos_user': 'root', - 'taos_password': 'taosdata', - 'taos_database': 'power', - 'taos_port': 6030, - 'timezone': None, - 'clean_after_testing': False, - 'bath_consume': True, - 'batch_size': 1000, - 'async_model': True, - 'workers': 10, - 'testing': False - } - - LOCATIONS = ['California.SanFrancisco', 'California.LosAngles', 'California.SanDiego', 'California.SanJose', - 'California.PaloAlto', 'California.Campbell', 'California.MountainView', 'California.Sunnyvale', - 'California.SantaClara', 'California.Cupertino'] - - CREATE_DATABASE_SQL = 'create database if not exists {} keep 365 duration 10 buffer 16 wal_level 1' - USE_DATABASE_SQL = 'use {}' - DROP_TABLE_SQL = 'drop table if exists meters' - DROP_DATABASE_SQL = 'drop database if exists {}' - CREATE_STABLE_SQL = 'create stable meters (ts timestamp, current float, voltage int, phase float) ' \ - 'tags (location binary(64), groupId int)' - CREATE_TABLE_SQL = 'create table if not exists {} using meters tags (\'{}\', {})' - INSERT_SQL_HEADER = "insert into " - INSERT_PART_SQL = 'power.{} values (\'{}\', {}, {}, {})' - - def __init__(self, **configs): - self.config: dict = self.DEFAULT_CONFIGS - self.config.update(configs) - if not self.config.get('testing'): - self.consumer = KafkaConsumer( - self.config.get('kafka_topic'), # topic - bootstrap_servers=self.config.get('kafka_brokers'), - group_id=self.config.get('kafka_group_id'), - ) - self.taos = taos.connect( - host=self.config.get('taos_host'), - user=self.config.get('taos_user'), - password=self.config.get('taos_password'), - port=self.config.get('taos_port'), - timezone=self.config.get('timezone'), - ) - if self.config.get('async_model'): - self.pool = ThreadPoolExecutor(max_workers=self.config.get('workers')) - self.tasks = [] - # tags and table mapping # key: {location}_{groupId} value: - self.tag_table_mapping = {} - i = 0 - for location in self.LOCATIONS: - for j in range(1, 11): - table_name = 'd{}'.format(i) - self._cache_table(location=location, group_id=j, table_name=table_name) - i += 1 - - def init_env(self): - # create database and table - self.taos.execute(self.DROP_DATABASE_SQL.format(self.config.get('taos_database'))) - self.taos.execute(self.CREATE_DATABASE_SQL.format(self.config.get('taos_database'))) - self.taos.execute(self.USE_DATABASE_SQL.format(self.config.get('taos_database'))) - self.taos.execute(self.DROP_TABLE_SQL) - self.taos.execute(self.CREATE_STABLE_SQL) - for tags, table_name in self.tag_table_mapping.items(): - location, group_id = _get_location_and_group(tags) - self.taos.execute(self.CREATE_TABLE_SQL.format(table_name, location, group_id)) - - def consume(self): - logging.warning('## start consumer topic-[%s]', self.config.get('kafka_topic')) - try: - if self.config.get('bath_consume'): - self._run_batch(self._to_taos_batch) - else: - self._run(self._to_taos) - except KeyboardInterrupt: - logging.warning("## caught keyboard interrupt, stopping") - finally: - self.stop() - - def stop(self): - # close consumer - if self.consumer is not None: - self.consumer.commit() - self.consumer.close() - - # multi thread - if self.config.get('async_model'): - for task in self.tasks: - while not task.done(): - pass - if self.pool is not None: - self.pool.shutdown() - - # clean data - if self.config.get('clean_after_testing'): - self.taos.execute(self.DROP_TABLE_SQL) - self.taos.execute(self.DROP_DATABASE_SQL.format(self.config.get('taos_database'))) - # close taos - if self.taos is not None: - self.taos.close() - - def _run(self, f): - for message in self.consumer: - if self.config.get('async_model'): - self.pool.submit(f(message)) - else: - f(message) - - def _run_batch(self, f): - while True: - messages = self.consumer.poll(timeout_ms=500, max_records=self.config.get('batch_size')) - if messages: - if self.config.get('async_model'): - self.pool.submit(f, messages.values()) - else: - f(list(messages.values())) - if not messages: - time.sleep(0.1) - - def _to_taos(self, message: ConsumerRecord) -> bool: - sql = self.INSERT_SQL_HEADER + self._build_sql(message.value) - if len(sql) == 0: # decode error, skip - return True - logging.info('## insert sql %s', sql) - return self.taos.execute(sql=sql) == 1 - - def _to_taos_batch(self, messages): - sql = self._build_sql_batch(messages=messages) - if len(sql) == 0: # decode error, skip - return - self.taos.execute(sql=sql) - - def _build_sql(self, msg_value: str) -> str: - try: - data = json.loads(msg_value) - except JSONDecodeError as e: - logging.error('## decode message [%s] error ', msg_value, e) - return '' - location = data.get('location') - group_id = data.get('groupId') - ts = data.get('ts') - current = data.get('current') - voltage = data.get('voltage') - phase = data.get('phase') - - table_name = self._get_table_name(location=location, group_id=group_id) - return self.INSERT_PART_SQL.format(table_name, ts, current, voltage, phase) - - def _build_sql_batch(self, messages) -> str: - sql_list = [] - for partition_messages in messages: - for message in partition_messages: - sql_list.append(self._build_sql(message.value)) - - return self.INSERT_SQL_HEADER + ' '.join(sql_list) - - def _cache_table(self, location: str, group_id: int, table_name: str): - self.tag_table_mapping[_tag_table_mapping_key(location=location, group_id=group_id)] = table_name - - def _get_table_name(self, location: str, group_id: int) -> str: - return self.tag_table_mapping.get(_tag_table_mapping_key(location=location, group_id=group_id)) - - -def _tag_table_mapping_key(location: str, group_id: int): - return '{}_{}'.format(location, group_id) - - -def _get_location_and_group(key: str) -> (str, int): - fields = key.split('_') - return fields[0], fields[1] - - -def test_to_taos(consumer: Consumer): - msg = { - 'location': 'California.SanFrancisco', - 'groupId': 1, - 'ts': '2022-12-06 15:13:38.643', - 'current': 3.41, - 'voltage': 105, - 'phase': 0.02027, - } - record = ConsumerRecord(checksum=None, headers=None, offset=1, key=None, value=json.dumps(msg), partition=1, - topic='test', serialized_key_size=None, serialized_header_size=None, - serialized_value_size=None, timestamp=time.time(), timestamp_type=None) - assert consumer._to_taos(message=record) - - -def test_to_taos_batch(consumer: Consumer): - records = [ - [ - ConsumerRecord(checksum=None, headers=None, offset=1, key=None, - value=json.dumps({'location': 'California.SanFrancisco', - 'groupId': 1, - 'ts': '2022-12-06 15:13:38.643', - 'current': 3.41, - 'voltage': 105, - 'phase': 0.02027, }), - partition=1, topic='test', serialized_key_size=None, serialized_header_size=None, - serialized_value_size=None, timestamp=time.time(), timestamp_type=None), - ConsumerRecord(checksum=None, headers=None, offset=1, key=None, - value=json.dumps({'location': 'California.LosAngles', - 'groupId': 2, - 'ts': '2022-12-06 15:13:39.643', - 'current': 3.41, - 'voltage': 102, - 'phase': 0.02027, }), - partition=1, topic='test', serialized_key_size=None, serialized_header_size=None, - serialized_value_size=None, timestamp=time.time(), timestamp_type=None), - ] - ] - - consumer._to_taos_batch(messages=records) - - -if __name__ == '__main__': - consumer = Consumer(async_model=True, testing=True) - # init env - consumer.init_env() - # consumer.consume() - # test build sql - # test build sql batch - test_to_taos(consumer) - test_to_taos_batch(consumer) diff --git a/docs/examples/python/kafka_example_common.py b/docs/examples/python/kafka_example_common.py new file mode 100644 index 0000000000..566748c94e --- /dev/null +++ b/docs/examples/python/kafka_example_common.py @@ -0,0 +1,65 @@ +#! encoding = utf-8 +import taos + +LOCATIONS = ['California.SanFrancisco', 'California.LosAngles', 'California.SanDiego', 'California.SanJose', + 'California.PaloAlto', 'California.Campbell', 'California.MountainView', 'California.Sunnyvale', + 'California.SantaClara', 'California.Cupertino'] + +CREATE_DATABASE_SQL = 'create database if not exists {} keep 365 duration 10 buffer 16 wal_level 1' +USE_DATABASE_SQL = 'use {}' +DROP_TABLE_SQL = 'drop table if exists meters' +DROP_DATABASE_SQL = 'drop database if exists {}' +CREATE_STABLE_SQL = 'create stable meters (ts timestamp, current float, voltage int, phase float) tags ' \ + '(location binary(64), groupId int)' +CREATE_TABLE_SQL = 'create table if not exists {} using meters tags (\'{}\', {})' + + +def create_database_and_tables(host, port, user, password, db, table_count): + tags_tables = _init_tags_table_names(table_count=table_count) + conn = taos.connect(host=host, port=port, user=user, password=password) + + conn.execute(DROP_DATABASE_SQL.format(db)) + conn.execute(CREATE_DATABASE_SQL.format(db)) + conn.execute(USE_DATABASE_SQL.format(db)) + conn.execute(DROP_TABLE_SQL) + conn.execute(CREATE_STABLE_SQL) + for tags in tags_tables: + location, group_id = _get_location_and_group(tags) + tables = tags_tables[tags] + for table_name in tables: + conn.execute(CREATE_TABLE_SQL.format(table_name, location, group_id)) + conn.close() + + +def clean(host, port, user, password, db): + conn = taos.connect(host=host, port=port, user=user, password=password) + conn.execute(DROP_DATABASE_SQL.format(db)) + conn.close() + + +def _init_tags_table_names(table_count): + tags_table_names = {} + group_id = 0 + for i in range(table_count): + table_name = 'd{}'.format(i) + location_idx = i % len(LOCATIONS) + location = LOCATIONS[location_idx] + if location_idx == 0: + group_id += 1 + if group_id > 10: + group_id -= 10 + key = _tag_table_mapping_key(location=location, group_id=group_id) + if key not in tags_table_names: + tags_table_names[key] = [] + tags_table_names[key].append(table_name) + + return tags_table_names + + +def _tag_table_mapping_key(location, group_id): + return '{}_{}'.format(location, group_id) + + +def _get_location_and_group(key): + fields = key.split('_') + return fields[0], fields[1] diff --git a/docs/examples/python/kafka_example_consumer.py b/docs/examples/python/kafka_example_consumer.py new file mode 100644 index 0000000000..e2d5cf535b --- /dev/null +++ b/docs/examples/python/kafka_example_consumer.py @@ -0,0 +1,231 @@ +#! encoding = utf-8 +import json +import logging +import time +from concurrent.futures import ThreadPoolExecutor, Future +from json import JSONDecodeError +from typing import Callable + +import taos +from kafka import KafkaConsumer +from kafka.consumer.fetcher import ConsumerRecord + +import kafka_example_common as common + + +class Consumer(object): + DEFAULT_CONFIGS = { + 'kafka_brokers': 'localhost:9092', # kafka broker + 'kafka_topic': 'tdengine_kafka_practices', + 'kafka_group_id': 'taos', + 'taos_host': 'localhost', # TDengine host + 'taos_port': 6030, # TDengine port + 'taos_user': 'root', # TDengine user name + 'taos_password': 'taosdata', # TDengine password + 'taos_database': 'power', # TDengine database + 'message_type': 'json', # message format, 'json' or 'line' + 'clean_after_testing': False, # if drop database after testing + 'max_poll': 1000, # poll size for batch mode + 'workers': 10, # thread count for multi-threading + 'testing': False + } + + INSERT_SQL_HEADER = "insert into " + INSERT_PART_SQL = '{} values (\'{}\', {}, {}, {})' + + def __init__(self, **configs): + self.config = self.DEFAULT_CONFIGS + self.config.update(configs) + + self.consumer = None + if not self.config.get('testing'): + self.consumer = KafkaConsumer( + self.config.get('kafka_topic'), + bootstrap_servers=self.config.get('kafka_brokers'), + group_id=self.config.get('kafka_group_id'), + ) + + self.conns = taos.connect( + host=self.config.get('taos_host'), + port=self.config.get('taos_port'), + user=self.config.get('taos_user'), + password=self.config.get('taos_password'), + db=self.config.get('taos_database'), + ) + if self.config.get('workers') > 1: + self.pool = ThreadPoolExecutor(max_workers=self.config.get('workers')) + self.tasks = [] + # tags and table mapping # key: {location}_{groupId} value: + + def consume(self): + """ + + consume data from kafka and deal. Base on `message_type`, `bath_consume`, `insert_by_table`, + there are several deal function. + :return: + """ + self.conns.execute(common.USE_DATABASE_SQL.format(self.config.get('taos_database'))) + try: + if self.config.get('message_type') == 'line': # line + self._run(self._line_to_taos) + if self.config.get('message_type') == 'json': # json + self._run(self._json_to_taos) + except KeyboardInterrupt: + logging.warning("## caught keyboard interrupt, stopping") + finally: + self.stop() + + def stop(self): + """ + + stop consuming + :return: + """ + # close consumer + if self.consumer is not None: + self.consumer.commit() + self.consumer.close() + + # multi thread + if self.config.get('workers') > 1: + if self.pool is not None: + self.pool.shutdown() + for task in self.tasks: + while not task.done(): + time.sleep(0.01) + + # clean data + if self.config.get('clean_after_testing'): + self.conns.execute(common.DROP_TABLE_SQL) + self.conns.execute(common.DROP_DATABASE_SQL.format(self.config.get('taos_database'))) + # close taos + if self.conns is not None: + self.conns.close() + + def _run(self, f): + """ + + run in batch consuming mode + :param f: + :return: + """ + i = 0 # just for test. + while True: + messages = self.consumer.poll(timeout_ms=100, max_records=self.config.get('max_poll')) + if messages: + if self.config.get('workers') > 1: + self.pool.submit(f, messages.values()) + else: + f(list(messages.values())) + if not messages: + i += 1 # just for test. + time.sleep(0.1) + if i > 3: # just for test. + logging.warning('## test over.') # just for test. + return # just for test. + + def _json_to_taos(self, messages): + """ + + convert a batch of json data to sql, and insert into TDengine + :param messages: + :return: + """ + sql = self._build_sql_from_json(messages=messages) + self.conns.execute(sql=sql) + + def _line_to_taos(self, messages): + """ + + convert a batch of lines data to sql, and insert into TDengine + :param messages: + :return: + """ + lines = [] + for partition_messages in messages: + for message in partition_messages: + lines.append(message.value.decode()) + sql = self.INSERT_SQL_HEADER + ' '.join(lines) + self.conns.execute(sql=sql) + + def _build_single_sql_from_json(self, msg_value): + try: + data = json.loads(msg_value) + except JSONDecodeError as e: + logging.error('## decode message [%s] error ', msg_value, e) + return '' + # location = data.get('location') + # group_id = data.get('groupId') + ts = data.get('ts') + current = data.get('current') + voltage = data.get('voltage') + phase = data.get('phase') + table_name = data.get('table_name') + + return self.INSERT_PART_SQL.format(table_name, ts, current, voltage, phase) + + def _build_sql_from_json(self, messages): + sql_list = [] + for partition_messages in messages: + for message in partition_messages: + sql_list.append(self._build_single_sql_from_json(message.value)) + return self.INSERT_SQL_HEADER + ' '.join(sql_list) + + +def test_json_to_taos(consumer: Consumer): + records = [ + [ + ConsumerRecord(checksum=None, headers=None, offset=1, key=None, + value=json.dumps({'table_name': 'd0', + 'ts': '2022-12-06 15:13:38.643', + 'current': 3.41, + 'voltage': 105, + 'phase': 0.02027, }), + partition=1, topic='test', serialized_key_size=None, serialized_header_size=None, + serialized_value_size=None, timestamp=time.time(), timestamp_type=None), + ConsumerRecord(checksum=None, headers=None, offset=1, key=None, + value=json.dumps({'table_name': 'd1', + 'ts': '2022-12-06 15:13:39.643', + 'current': 3.41, + 'voltage': 102, + 'phase': 0.02027, }), + partition=1, topic='test', serialized_key_size=None, serialized_header_size=None, + serialized_value_size=None, timestamp=time.time(), timestamp_type=None), + ] + ] + + consumer._json_to_taos(messages=records) + + +def test_line_to_taos(consumer: Consumer): + records = [ + [ + ConsumerRecord(checksum=None, headers=None, offset=1, key=None, + value="d0 values('2023-01-01 00:00:00.001', 3.49, 109, 0.02737)".encode('utf-8'), + partition=1, topic='test', serialized_key_size=None, serialized_header_size=None, + serialized_value_size=None, timestamp=time.time(), timestamp_type=None), + ConsumerRecord(checksum=None, headers=None, offset=1, key=None, + value="d1 values('2023-01-01 00:00:00.002', 6.19, 112, 0.09171)".encode('utf-8'), + partition=1, topic='test', serialized_key_size=None, serialized_header_size=None, + serialized_value_size=None, timestamp=time.time(), timestamp_type=None), + ] + ] + consumer._line_to_taos(messages=records) + + +def consume(kafka_brokers, kafka_topic, kafka_group_id, taos_host, taos_port, taos_user, + taos_password, taos_database, message_type, max_poll, workers): + c = Consumer(kafka_brokers=kafka_brokers, kafka_topic=kafka_topic, kafka_group_id=kafka_group_id, + taos_host=taos_host, taos_port=taos_port, taos_user=taos_user, taos_password=taos_password, + taos_database=taos_database, message_type=message_type, max_poll=max_poll, workers=workers) + c.consume() + + +if __name__ == '__main__': + consumer = Consumer(testing=True) + common.create_database_and_tables(host='localhost', port=6030, user='root', password='taosdata', db='py_kafka_test', + table_count=10) + consumer.conns.execute(common.USE_DATABASE_SQL.format('py_kafka_test')) + test_json_to_taos(consumer) + test_line_to_taos(consumer) + common.clean(host='localhost', port=6030, user='root', password='taosdata', db='py_kafka_test') diff --git a/docs/examples/python/kafka_example_perform.py b/docs/examples/python/kafka_example_perform.py new file mode 100644 index 0000000000..23ae4b48c8 --- /dev/null +++ b/docs/examples/python/kafka_example_perform.py @@ -0,0 +1,103 @@ +#! encoding=utf-8 + +import argparse +import logging +import multiprocessing +import time +from multiprocessing import pool + +import kafka_example_common as common +import kafka_example_consumer as consumer +import kafka_example_producer as producer + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('-kafka-broker', type=str, default='localhost:9092', + help='kafka borker host. default is `localhost:9200`') + parser.add_argument('-kafka-topic', type=str, default='tdengine-kafka-practices', + help='kafka topic. default is `tdengine-kafka-practices`') + parser.add_argument('-kafka-group', type=str, default='kafka_practices', + help='kafka consumer group. default is `kafka_practices`') + parser.add_argument('-taos-host', type=str, default='localhost', + help='TDengine host. default is `localhost`') + parser.add_argument('-taos-port', type=int, default=6030, help='TDengine port. default is 6030') + parser.add_argument('-taos-user', type=str, default='root', help='TDengine username, default is `root`') + parser.add_argument('-taos-password', type=str, default='taosdata', help='TDengine password, default is `taosdata`') + parser.add_argument('-taos-db', type=str, default='tdengine_kafka_practices', + help='TDengine db name, default is `tdengine_kafka_practices`') + parser.add_argument('-table-count', type=int, default=100, help='TDengine sub-table count, default is 100') + parser.add_argument('-table-items', type=int, default=1000, help='items in per sub-tables, default is 1000') + parser.add_argument('-message-type', type=str, default='line', + help='kafka message type. `line` or `json`. default is `line`') + parser.add_argument('-max-poll', type=int, default=1000, help='max poll for kafka consumer') + parser.add_argument('-threads', type=int, default=10, help='thread count for deal message') + parser.add_argument('-processes', type=int, default=1, help='process count') + + args = parser.parse_args() + total = args.table_count * args.table_items + + logging.warning("## start to prepare testing data...") + prepare_data_start = time.time() + producer.produce_total(100, args.kafka_broker, args.kafka_topic, args.message_type, total, args.table_count) + prepare_data_end = time.time() + logging.warning("## prepare testing data finished! spend-[%s]", prepare_data_end - prepare_data_start) + + logging.warning("## start to create database and tables ...") + create_db_start = time.time() + # create database and table + common.create_database_and_tables(host=args.taos_host, port=args.taos_port, user=args.taos_user, + password=args.taos_password, db=args.taos_db, table_count=args.table_count) + create_db_end = time.time() + logging.warning("## create database and tables finished! spend [%s]", create_db_end - create_db_start) + + processes = args.processes + + logging.warning("## start to consume data and insert into TDengine...") + consume_start = time.time() + if processes > 1: # multiprocess + multiprocessing.set_start_method("spawn") + pool = pool.Pool(processes) + + consume_start = time.time() + for _ in range(processes): + pool.apply_async(func=consumer.consume, args=( + args.kafka_broker, args.kafka_topic, args.kafka_group, args.taos_host, args.taos_port, args.taos_user, + args.taos_password, args.taos_db, args.message_type, args.max_poll, args.threads)) + pool.close() + pool.join() + else: + consume_start = time.time() + consumer.consume(kafka_brokers=args.kafka_broker, kafka_topic=args.kafka_topic, kafka_group_id=args.kafka_group, + taos_host=args.taos_host, taos_port=args.taos_port, taos_user=args.taos_user, + taos_password=args.taos_password, taos_database=args.taos_db, message_type=args.message_type, + max_poll=args.max_poll, workers=args.threads) + consume_end = time.time() + logging.warning("## consume data and insert into TDengine over! spend-[%s]", consume_end - consume_start) + + # print report + logging.warning( + "\n#######################\n" + " Prepare data \n" + "#######################\n" + "# data_type # %s \n" + "# total # %s \n" + "# spend # %s s\n" + "#######################\n" + " Create database \n" + "#######################\n" + "# stable # 1 \n" + "# sub-table # 100 \n" + "# spend # %s s \n" + "#######################\n" + " Consume \n" + "#######################\n" + "# data_type # %s \n" + "# threads # %s \n" + "# processes # %s \n" + "# total_count # %s \n" + "# spend # %s s\n" + "# per_second # %s \n" + "#######################\n", + args.message_type, total, prepare_data_end - prepare_data_start, create_db_end - create_db_start, + args.message_type, args.threads, processes, total, consume_end - consume_start, + total / (consume_end - consume_start)) diff --git a/docs/examples/python/kafka_example_producer.py b/docs/examples/python/kafka_example_producer.py new file mode 100644 index 0000000000..51468c7e37 --- /dev/null +++ b/docs/examples/python/kafka_example_producer.py @@ -0,0 +1,97 @@ +#! encoding = utf-8 +import json +import random +import threading +from concurrent.futures import ThreadPoolExecutor, Future +from datetime import datetime + +from kafka import KafkaProducer + +locations = ['California.SanFrancisco', 'California.LosAngles', 'California.SanDiego', 'California.SanJose', + 'California.PaloAlto', 'California.Campbell', 'California.MountainView', 'California.Sunnyvale', + 'California.SantaClara', 'California.Cupertino'] + +producers: list[KafkaProducer] = [] + +lock = threading.Lock() +start = 1640966400 + + +def produce_total(workers, broker, topic, message_type, total, table_count): + if len(producers) == 0: + lock.acquire() + if len(producers) == 0: + _init_kafka_producers(broker=broker, count=10) + lock.release() + pool = ThreadPoolExecutor(max_workers=workers) + futures = [] + for _ in range(0, workers): + futures.append(pool.submit(_produce_total, topic, message_type, int(total / workers), table_count)) + pool.shutdown() + for f in futures: + f.result() + _close_kafka_producers() + + +def _produce_total(topic, message_type, total, table_count): + producer = _get_kafka_producer() + for _ in range(total): + message = _get_fake_date(message_type=message_type, table_count=table_count) + producer.send(topic=topic, value=message.encode(encoding='utf-8')) + + +def _init_kafka_producers(broker, count): + for _ in range(count): + p = KafkaProducer(bootstrap_servers=broker, batch_size=64 * 1024, linger_ms=300, acks=0) + producers.append(p) + + +def _close_kafka_producers(): + for p in producers: + p.close() + + +def _get_kafka_producer(): + return producers[random.randint(0, len(producers) - 1)] + + +def _get_fake_date(table_count, message_type='json'): + if message_type == 'json': + return _get_json_message(table_count=table_count) + if message_type == 'line': + return _get_line_message(table_count=table_count) + return '' + + +def _get_json_message(table_count): + return json.dumps({ + 'ts': _get_timestamp(), + 'current': random.randint(0, 1000) / 100, + 'voltage': random.randint(105, 115), + 'phase': random.randint(0, 32000) / 100000, + 'location': random.choice(locations), + 'groupId': random.randint(1, 10), + 'table_name': _random_table_name(table_count) + }) + + +def _get_line_message(table_count): + return "{} values('{}', {}, {}, {})".format( + _random_table_name(table_count), # table + _get_timestamp(), # ts + random.randint(0, 1000) / 100, # current + random.randint(105, 115), # voltage + random.randint(0, 32000) / 100000, # phase + ) + + +def _random_table_name(table_count): + return 'd{}'.format(random.randint(0, table_count - 1)) + + +def _get_timestamp(): + global start + lock.acquire(blocking=True) + start += 0.001 + lock.release() + return datetime.fromtimestamp(start).strftime('%Y-%m-%d %H:%M:%S.%f')[:-3] diff --git a/docs/zh/07-develop/03-insert-data/_py_kafka.mdx b/docs/zh/07-develop/03-insert-data/_py_kafka.mdx index cd7edf557d..d656325674 100644 --- a/docs/zh/07-develop/03-insert-data/_py_kafka.mdx +++ b/docs/zh/07-develop/03-insert-data/_py_kafka.mdx @@ -55,6 +55,70 @@ for p in ps: ### 完整示例 +
+kafka_example_perform + +`kafka_example_perform` 是示例程序的入口 + ```py -{{#include docs/examples/python/kafka_example.py}} +{{#include docs/examples/python/kafka_example_perform.py}} ``` +
+ +
+kafka_example_common + +`kafka_example_common` 是示例程序的公共代码 + +```py +{{#include docs/examples/python/kafka_example_common.py}} +``` +
+ +
+kafka_example_producer + +`kafka_example_producer` 是示例程序的 producer 代码,负责生成并发送测试数据到 kafka + +```py +{{#include docs/examples/python/kafka_example_producer.py}} +``` +
+ +
+kafka_example_consumer + +`kafka_example_consumer` 是示例程序的 consumer 代码,负责从 kafka 消费数据,并写入到 TDengine + +```py +{{#include docs/examples/python/kafka_example_consumer.py}} +``` +
+ +### 执行步骤 + +
+ 执行 Python 示例程序 + + 1. 安装并启动 kafka + + 2. python 环境准备 + - 安装 python3 + - 安装 taospy + - 安装 kafka-python + + 3. 执行示例程序 + + 程序的执行入口是 `kafka_example_perform.py`,获取程序完整的执行参数,请执行 help 命令。 + + ``` + python3 kafka_example_perform.py --help + ``` + + 以下为创建 100 个子表,每个子表 20000 条数据,kafka max poll 为 100,一个进程,每个进程一个处理线程的程序执行命令 + + ``` + python3 kafka_example_perform.py -table-count=100 -table-items=20000 -max-poll=100 -threads=1 -processes=1 + ``` + +
diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md index 81fdb46f25..669d037705 100644 --- a/docs/zh/12-taos-sql/10-function.md +++ b/docs/zh/12-taos-sql/10-function.md @@ -875,9 +875,9 @@ INTERP(expr) - INTERP 用于在指定时间断面获取指定列的记录值,如果该时间断面不存在符合条件的行数据,那么会根据 FILL 参数的设定进行插值。 - INTERP 的输入数据为指定列的数据,可以通过条件语句(where 子句)来对原始列数据进行过滤,如果没有指定过滤条件则输入为全部数据。 - INTERP 需要同时与 RANGE,EVERY 和 FILL 关键字一起使用。 -- INTERP 的输出时间范围根据 RANGE(timestamp1,timestamp2)字段来指定,需满足 timestamp1<=timestamp2。其中 timestamp1(必选值)为输出时间范围的起始值,即如果 timestamp1 时刻符合插值条件则 timestamp1 为输出的第一条记录,timestamp2(必选值)为输出时间范围的结束值,即输出的最后一条记录的 timestamp 不能大于 timestamp2。 -- INTERP 根据 EVERY 字段来确定输出时间范围内的结果条数,即从 timestamp1 开始每隔固定长度的时间(EVERY 值)进行插值。 -- INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。 +- INTERP 的输出时间范围根据 RANGE(timestamp1,timestamp2)字段来指定,需满足 timestamp1 < timestamp2。其中 timestamp1(必选值)为输出时间范围的起始值,即如果 timestamp1 时刻符合插值条件则 timestamp1 为输出的第一条记录,timestamp2(必选值)为输出时间范围的结束值,即输出的最后一条记录的 timestamp 不能大于 timestamp2。 +- INTERP 根据 EVERY(time_unit) 字段来确定输出时间范围内的结果条数,即从 timestamp1 开始每隔固定长度的时间(time_unit 值)进行插值,time_unit 可取值时间单位:1a(毫秒),1s(秒),1m(分),1h(小时),1d(天),1w(周)。例如 EVERY(500a) 将对于指定数据每500毫秒间隔进行一次插值. +- INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。关于 FILL 子句如何使用请参考 [FILL 子句](./distinguished/#fill-子句) - INTERP 只能在一个时间序列内进行插值,因此当作用于超级表时必须跟 partition by tbname 一起使用。 - INTERP 可以与伪列 _irowts 一起使用,返回插值点所对应的时间戳(3.0.1.4版本以后支持)。 - INTERP 可以与伪列 _isfilled 一起使用,显示返回结果是否为原始记录或插值算法产生的数据(3.0.2.3版本以后支持)。 diff --git a/examples/JDBC/readme.md b/examples/JDBC/readme.md index c7d7875308..c5588a5b25 100644 --- a/examples/JDBC/readme.md +++ b/examples/JDBC/readme.md @@ -10,4 +10,4 @@ | 6 | taosdemo | This is an internal tool for testing Our JDBC-JNI, JDBC-RESTful, RESTful interfaces | -more detail: https://docs.taosdata.com/reference/connector/java/ \ No newline at end of file +more detail: https://docs.taosdata.com/connector/java/ diff --git a/include/common/tmsg.h b/include/common/tmsg.h index e65b07f084..7d096a408b 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -58,7 +58,7 @@ extern int32_t tMsgDict[]; #define TMSG_INFO(TYPE) \ ((TYPE) < TDMT_DND_MAX_MSG || (TYPE) < TDMT_MND_MAX_MSG || (TYPE) < TDMT_VND_MAX_MSG || (TYPE) < TDMT_SCH_MAX_MSG || \ (TYPE) < TDMT_STREAM_MAX_MSG || (TYPE) < TDMT_MON_MAX_MSG || (TYPE) < TDMT_SYNC_MAX_MSG) || \ - (TYPE) < TDMT_VND_STREAM_MSG || (TYPE) < TDMT_VND_TMQ_MSG \ + (TYPE) < TDMT_VND_STREAM_MSG || (TYPE) < TDMT_VND_TMQ_MSG || (TYPE) < TDMT_VND_TMQ_MAX_MSG \ ? tMsgInfo[tMsgDict[TMSG_SEG_CODE(TYPE)] + TMSG_SEG_SEQ(TYPE)] \ : 0 @@ -145,12 +145,14 @@ typedef enum _mgmt_table { #define TSDB_ALTER_TABLE_UPDATE_OPTIONS 9 #define TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME 10 -#define TSDB_FILL_NONE 0 -#define TSDB_FILL_NULL 1 -#define TSDB_FILL_SET_VALUE 2 -#define TSDB_FILL_LINEAR 3 -#define TSDB_FILL_PREV 4 -#define TSDB_FILL_NEXT 5 +#define TSDB_FILL_NONE 0 +#define TSDB_FILL_NULL 1 +#define TSDB_FILL_NULL_F 2 +#define TSDB_FILL_SET_VALUE 3 +#define TSDB_FILL_SET_VALUE_F 4 +#define TSDB_FILL_LINEAR 5 +#define TSDB_FILL_PREV 6 +#define TSDB_FILL_NEXT 7 #define TSDB_ALTER_USER_PASSWD 0x1 #define TSDB_ALTER_USER_SUPERUSER 0x2 diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 9c4343eaad..07649690f7 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -274,73 +274,75 @@ #define TK_SLIDING 256 #define TK_FILL 257 #define TK_VALUE 258 -#define TK_NONE 259 -#define TK_PREV 260 -#define TK_LINEAR 261 -#define TK_NEXT 262 -#define TK_HAVING 263 -#define TK_RANGE 264 -#define TK_EVERY 265 -#define TK_ORDER 266 -#define TK_SLIMIT 267 -#define TK_SOFFSET 268 -#define TK_LIMIT 269 -#define TK_OFFSET 270 -#define TK_ASC 271 -#define TK_NULLS 272 -#define TK_ABORT 273 -#define TK_AFTER 274 -#define TK_ATTACH 275 -#define TK_BEFORE 276 -#define TK_BEGIN 277 -#define TK_BITAND 278 -#define TK_BITNOT 279 -#define TK_BITOR 280 -#define TK_BLOCKS 281 -#define TK_CHANGE 282 -#define TK_COMMA 283 -#define TK_CONCAT 284 -#define TK_CONFLICT 285 -#define TK_COPY 286 -#define TK_DEFERRED 287 -#define TK_DELIMITERS 288 -#define TK_DETACH 289 -#define TK_DIVIDE 290 -#define TK_DOT 291 -#define TK_EACH 292 -#define TK_FAIL 293 -#define TK_FILE 294 -#define TK_FOR 295 -#define TK_GLOB 296 -#define TK_ID 297 -#define TK_IMMEDIATE 298 -#define TK_IMPORT 299 -#define TK_INITIALLY 300 -#define TK_INSTEAD 301 -#define TK_ISNULL 302 -#define TK_KEY 303 -#define TK_MODULES 304 -#define TK_NK_BITNOT 305 -#define TK_NK_SEMI 306 -#define TK_NOTNULL 307 -#define TK_OF 308 -#define TK_PLUS 309 -#define TK_PRIVILEGE 310 -#define TK_RAISE 311 -#define TK_REPLACE 312 -#define TK_RESTRICT 313 -#define TK_ROW 314 -#define TK_SEMI 315 -#define TK_STAR 316 -#define TK_STATEMENT 317 -#define TK_STRICT 318 -#define TK_STRING 319 -#define TK_TIMES 320 -#define TK_UPDATE 321 -#define TK_VALUES 322 -#define TK_VARIABLE 323 -#define TK_VIEW 324 -#define TK_WAL 325 +#define TK_VALUE_F 259 +#define TK_NONE 260 +#define TK_PREV 261 +#define TK_NULL_F 262 +#define TK_LINEAR 263 +#define TK_NEXT 264 +#define TK_HAVING 265 +#define TK_RANGE 266 +#define TK_EVERY 267 +#define TK_ORDER 268 +#define TK_SLIMIT 269 +#define TK_SOFFSET 270 +#define TK_LIMIT 271 +#define TK_OFFSET 272 +#define TK_ASC 273 +#define TK_NULLS 274 +#define TK_ABORT 275 +#define TK_AFTER 276 +#define TK_ATTACH 277 +#define TK_BEFORE 278 +#define TK_BEGIN 279 +#define TK_BITAND 280 +#define TK_BITNOT 281 +#define TK_BITOR 282 +#define TK_BLOCKS 283 +#define TK_CHANGE 284 +#define TK_COMMA 285 +#define TK_CONCAT 286 +#define TK_CONFLICT 287 +#define TK_COPY 288 +#define TK_DEFERRED 289 +#define TK_DELIMITERS 290 +#define TK_DETACH 291 +#define TK_DIVIDE 292 +#define TK_DOT 293 +#define TK_EACH 294 +#define TK_FAIL 295 +#define TK_FILE 296 +#define TK_FOR 297 +#define TK_GLOB 298 +#define TK_ID 299 +#define TK_IMMEDIATE 300 +#define TK_IMPORT 301 +#define TK_INITIALLY 302 +#define TK_INSTEAD 303 +#define TK_ISNULL 304 +#define TK_KEY 305 +#define TK_MODULES 306 +#define TK_NK_BITNOT 307 +#define TK_NK_SEMI 308 +#define TK_NOTNULL 309 +#define TK_OF 310 +#define TK_PLUS 311 +#define TK_PRIVILEGE 312 +#define TK_RAISE 313 +#define TK_REPLACE 314 +#define TK_RESTRICT 315 +#define TK_ROW 316 +#define TK_SEMI 317 +#define TK_STAR 318 +#define TK_STATEMENT 319 +#define TK_STRICT 320 +#define TK_STRING 321 +#define TK_TIMES 322 +#define TK_UPDATE 323 +#define TK_VALUES 324 +#define TK_VARIABLE 325 +#define TK_VIEW 326 +#define TK_WAL 327 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index e98e341f15..7b65c06b85 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -219,6 +219,7 @@ bool fmIsKeepOrderFunc(int32_t funcId); bool fmIsCumulativeFunc(int32_t funcId); bool fmIsInterpPseudoColumnFunc(int32_t funcId); bool fmIsGroupKeyFunc(int32_t funcId); +bool fmIsBlockDistFunc(int32_t funcId); void getLastCacheDataType(SDataType* pType); diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 2d14391247..1a9700907e 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -233,8 +233,10 @@ typedef struct SEventWindowNode { typedef enum EFillMode { FILL_MODE_NONE = 1, FILL_MODE_VALUE, + FILL_MODE_VALUE_F, FILL_MODE_PREV, FILL_MODE_NULL, + FILL_MODE_NULL_F, FILL_MODE_LINEAR, FILL_MODE_NEXT } EFillMode; diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 52d8a75ee0..53f25d3fe4 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -357,6 +357,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_MND_STREAM_MUST_BE_DELETED TAOS_DEF_ERROR_CODE(0, 0x03F3) #define TSDB_CODE_MND_STREAM_TASK_DROPPED TAOS_DEF_ERROR_CODE(0, 0x03F4) #define TSDB_CODE_MND_MULTI_REPLICA_SOURCE_DB TAOS_DEF_ERROR_CODE(0, 0x03F5) +#define TSDB_CODE_MND_TOO_MANY_STREAMS TAOS_DEF_ERROR_CODE(0, 0x03F6) // mnode-sma #define TSDB_CODE_MND_SMA_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0480) diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index 0c445c7fbf..a14fc650d8 100644 --- a/source/client/CMakeLists.txt +++ b/source/client/CMakeLists.txt @@ -60,6 +60,6 @@ target_link_libraries( PRIVATE os util common transport nodes parser command planner catalog scheduler function qcom ) -if(${BUILD_TEST}) +#if(${BUILD_TEST}) ADD_SUBDIRECTORY(test) -endif(${BUILD_TEST}) \ No newline at end of file +#endif(${BUILD_TEST}) \ No newline at end of file diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 2c53fe4080..f63a2ebde0 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -138,6 +138,12 @@ STscObj* taos_connect_internal(const char* ip, const char* user, const char* pas p->mgmtEp = epSet; taosThreadMutexInit(&p->qnodeMutex, NULL); p->pTransporter = openTransporter(user, secretEncrypt, tsNumOfCores / 2); + if (p->pTransporter == NULL) { + taosThreadMutexUnlock(&appInfo.mutex); + taosMemoryFreeClear(key); + taosMemoryFree(p); + return NULL; + } p->pAppHbMgr = appHbMgrInit(p, key); if (NULL == p->pAppHbMgr) { destroyAppInst(p); @@ -1386,8 +1392,6 @@ int32_t doProcessMsgFromServer(void* param) { tscError("0x%" PRIx64 " rsp msg:%s, code:%s rspLen:%d, elapsed time:%d ms, reqId:0x%" PRIx64, pRequest->self, TMSG_INFO(pMsg->msgType), tstrerror(pMsg->code), pMsg->contLen, elapsed / 1000, pRequest->requestId); } - - taosReleaseRef(clientReqRefPool, pSendInfo->requestObjRefId); } } @@ -1407,6 +1411,11 @@ int32_t doProcessMsgFromServer(void* param) { } pSendInfo->fp(pSendInfo->param, &buf, pMsg->code); + + if (pTscObj) { + taosReleaseRef(clientReqRefPool, pSendInfo->requestObjRefId); + } + rpcFreeCont(pMsg->pCont); destroySendMsgInfo(pSendInfo); @@ -1444,6 +1453,7 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) { tscError("failed to sched msg to tsc, tsc ready to quit"); rpcFreeCont(pMsg->pCont); taosMemoryFree(arg->pEpset); + destroySendMsgInfo(pMsg->info.ahandle); taosMemoryFree(arg); } } diff --git a/source/client/test/clientTests.cpp b/source/client/test/clientTests.cpp index 82202b8820..a75411a854 100644 --- a/source/client/test/clientTests.cpp +++ b/source/client/test/clientTests.cpp @@ -112,7 +112,7 @@ void createNewTable(TAOS* pConn, int32_t index) { } taos_free_result(pRes); - for(int32_t i = 0; i < 20; i += 20) { + for(int32_t i = 0; i < 2000; i += 20) { char sql[1024] = {0}; sprintf(sql, "insert into tu%d values(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)" @@ -692,6 +692,7 @@ TEST(testCase, insert_test) { taos_free_result(pRes); taos_close(pConn); } +#endif TEST(testCase, projection_query_tables) { TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); @@ -725,7 +726,7 @@ TEST(testCase, projection_query_tables) { } taos_free_result(pRes); - for (int32_t i = 0; i < 200000; ++i) { + for (int32_t i = 0; i < 2; ++i) { printf("create table :%d\n", i); createNewTable(pConn, i); } @@ -751,6 +752,7 @@ TEST(testCase, projection_query_tables) { taos_close(pConn); } +#if 0 TEST(testCase, tsbs_perf_test) { TdThread qid[20] = {0}; @@ -760,8 +762,6 @@ TEST(testCase, tsbs_perf_test) { getchar(); } -#endif - TEST(testCase, projection_query_stables) { TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); ASSERT_NE(pConn, nullptr); @@ -790,7 +790,6 @@ TEST(testCase, projection_query_stables) { taos_close(pConn); } -#if 0 TEST(testCase, agg_query_tables) { TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0); ASSERT_NE(pConn, nullptr); @@ -831,7 +830,7 @@ TEST(testCase, async_api_test) { ASSERT_NE(pConn, nullptr); taos_query(pConn, "use abc1"); -#if 0 + TAOS_RES* pRes = taos_query(pConn, "insert into tu(ts) values('2022-02-27 12:12:61')"); if (taos_errno(pRes) != 0) { printf("failed, reason:%s\n", taos_errstr(pRes)); @@ -854,7 +853,6 @@ TEST(testCase, async_api_test) { printf("%s\n", str); memset(str, 0, sizeof(str)); } -#endif taos_query_a(pConn, "select count(*) from tu", queryCallback, pConn); getchar(); diff --git a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c index 095857825d..b0810d528f 100644 --- a/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c +++ b/source/dnode/mgmt/mgmt_mnode/src/mmWorker.c @@ -49,7 +49,7 @@ static void mmProcessRpcMsg(SQueueInfo *pInfo, SRpcMsg *pMsg) { pMsg->info.node = pMgmt->pMnode; const STraceId *trace = &pMsg->info.traceId; - dGTrace("msg:%p, get from mnode queue", pMsg); + dGTrace("msg:%p, get from mnode queue, type:%s", pMsg, TMSG_INFO(pMsg->msgType)); int32_t code = mndProcessRpcMsg(pMsg); diff --git a/source/dnode/mnode/impl/inc/mndTrans.h b/source/dnode/mnode/impl/inc/mndTrans.h index 07066d2251..d6e5d322ba 100644 --- a/source/dnode/mnode/impl/inc/mndTrans.h +++ b/source/dnode/mnode/impl/inc/mndTrans.h @@ -81,7 +81,7 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans); int32_t mndTransProcessRsp(SRpcMsg *pRsp); void mndTransPullup(SMnode *pMnode); int32_t mndKillTrans(SMnode *pMnode, STrans *pTrans); -void mndTransExecute(SMnode *pMnode, STrans *pTrans); +void mndTransExecute(SMnode *pMnode, STrans *pTrans, bool isLeader); int32_t mndSetRpcInfoForDbTrans(SMnode *pMnode, SRpcMsg *pMsg, EOperType oper, const char *dbname); #ifdef __cplusplus diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 6b54a36a6f..c192ea7efd 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -31,6 +31,8 @@ #define MND_STREAM_VER_NUMBER 2 #define MND_STREAM_RESERVE_SIZE 64 +#define MND_STREAM_MAX_NUM 10 + static int32_t mndStreamActionInsert(SSdb *pSdb, SStreamObj *pStream); static int32_t mndStreamActionDelete(SSdb *pSdb, SStreamObj *pStream); static int32_t mndStreamActionUpdate(SSdb *pSdb, SStreamObj *pStream, SStreamObj *pNewStream); @@ -666,6 +668,35 @@ static int32_t mndProcessCreateStreamReq(SRpcMsg *pReq) { goto _OVER; } + { + int32_t numOfStream = 0; + + SStreamObj *pStream = NULL; + void *pIter = NULL; + + while (1) { + pIter = sdbFetch(pMnode->pSdb, SDB_STREAM, pIter, (void **)&pStream); + if (pIter == NULL) { + if (numOfStream > MND_STREAM_MAX_NUM) { + mError("too many streams, no more than 10 for each database"); + terrno = TSDB_CODE_MND_TOO_MANY_STREAMS; + goto _OVER; + } + break; + } + + if (pStream->sourceDbUid == streamObj.sourceDbUid) { + ++numOfStream; + } + sdbRelease(pMnode->pSdb, pStream); + if (numOfStream > MND_STREAM_MAX_NUM) { + mError("too many streams, no more than 10 for each database"); + terrno = TSDB_CODE_MND_TOO_MANY_STREAMS; + goto _OVER; + } + } + } + pDb = mndAcquireDb(pMnode, streamObj.sourceDb); if (pDb->cfg.replications != 1) { mError("stream source db must have only 1 replica, but %s has %d", pDb->name, pDb->cfg.replications); diff --git a/source/dnode/mnode/impl/src/mndSync.c b/source/dnode/mnode/impl/src/mndSync.c index 7dc0912403..f618b8afae 100644 --- a/source/dnode/mnode/impl/src/mndSync.c +++ b/source/dnode/mnode/impl/src/mndSync.c @@ -85,7 +85,11 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta pRaw, pMgmt->transSec, pMgmt->transSeq); if (pMeta->code == 0) { - sdbWriteWithoutFree(pMnode->pSdb, pRaw); + int32_t code = sdbWriteWithoutFree(pMnode->pSdb, pRaw); + if (code != 0) { + mError("trans:%d, failed to write to sdb since %s", transId, terrstr()); + return 0; + } sdbSetApplyInfo(pMnode->pSdb, pMeta->index, pMeta->term, pMeta->lastConfigIndex); } @@ -110,8 +114,9 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta taosThreadMutexUnlock(&pMgmt->lock); STrans *pTrans = mndAcquireTrans(pMnode, transId); if (pTrans != NULL) { - mInfo("trans:%d, execute in mnode which not leader or sync timeout", transId); - mndTransExecute(pMnode, pTrans); + mInfo("trans:%d, execute in mnode which not leader or sync timeout, createTime:%" PRId64 " saved trans:%d", + transId, pTrans->createdTime, pMgmt->transId); + mndTransExecute(pMnode, pTrans, false); mndReleaseTrans(pMnode, pTrans); // sdbWriteFile(pMnode->pSdb, SDB_WRITE_DELTA); } else { @@ -368,7 +373,7 @@ int32_t mndSyncPropose(SMnode *pMnode, SSdbRaw *pRaw, int32_t transId) { taosThreadMutexLock(&pMgmt->lock); pMgmt->errCode = 0; - if (pMgmt->transId != 0) { + if (pMgmt->transId != 0 /* && pMgmt->transId != transId*/) { mError("trans:%d, can't be proposed since trans:%d already waiting for confirm", transId, pMgmt->transId); taosThreadMutexUnlock(&pMgmt->lock); rpcFreeCont(req.pCont); diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index dfcd55bcba..6bb286cd6f 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -572,8 +572,20 @@ static void mndTransUpdateActions(SArray *pOldArray, SArray *pNewArray) { } static int32_t mndTransActionUpdate(SSdb *pSdb, STrans *pOld, STrans *pNew) { - mTrace("trans:%d, perform update action, old row:%p stage:%s, new row:%p stage:%s", pOld->id, pOld, - mndTransStr(pOld->stage), pNew, mndTransStr(pNew->stage)); + mTrace("trans:%d, perform update action, old row:%p stage:%s create:%" PRId64 ", new row:%p stage:%s create:%" PRId64, + pOld->id, pOld, mndTransStr(pOld->stage), pOld->createdTime, pNew, mndTransStr(pNew->stage), + pNew->createdTime); + + if (pOld->createdTime != pNew->createdTime) { + mError("trans:%d, failed to perform update action since createTime not match, old row:%p stage:%s create:%" PRId64 + ", new row:%p stage:%s create:%" PRId64, + pOld->id, pOld, mndTransStr(pOld->stage), pOld->createdTime, pNew, mndTransStr(pNew->stage), + pNew->createdTime); + // only occured while sync timeout + terrno = TSDB_CODE_MND_TRNAS_SYNC_TIMEOUT; + return -1; + } + mndTransUpdateActions(pOld->redoActions, pNew->redoActions); mndTransUpdateActions(pOld->undoActions, pNew->undoActions); mndTransUpdateActions(pOld->commitActions, pNew->commitActions); @@ -779,16 +791,18 @@ static int32_t mndTransSync(SMnode *pMnode, STrans *pTrans) { } (void)sdbSetRawStatus(pRaw, SDB_STATUS_READY); - mInfo("trans:%d, sync to other mnodes, stage:%s", pTrans->id, mndTransStr(pTrans->stage)); + mInfo("trans:%d, sync to other mnodes, stage:%s createTime:%" PRId64, pTrans->id, mndTransStr(pTrans->stage), + pTrans->createdTime); int32_t code = mndSyncPropose(pMnode, pRaw, pTrans->id); if (code != 0) { - mError("trans:%d, failed to sync, errno:%s code:%s", pTrans->id, terrstr(), tstrerror(code)); + mError("trans:%d, failed to sync, errno:%s code:%s createTime:%" PRId64 " saved trans:%d", pTrans->id, terrstr(), + tstrerror(code), pTrans->createdTime, pMnode->syncMgmt.transId); sdbFreeRaw(pRaw); return -1; } sdbFreeRaw(pRaw); - mInfo("trans:%d, sync finished", pTrans->id); + mInfo("trans:%d, sync finished, createTime:%" PRId64, pTrans->id, pTrans->createdTime); return 0; } @@ -891,7 +905,7 @@ int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans) { pTrans->rpcRsp = NULL; pTrans->rpcRspLen = 0; - mndTransExecute(pMnode, pNew); + mndTransExecute(pMnode, pNew, true); mndReleaseTrans(pMnode, pNew); return 0; } @@ -1054,7 +1068,7 @@ int32_t mndTransProcessRsp(SRpcMsg *pRsp) { mInfo("trans:%d, %s:%d response is received, code:0x%x, accept:0x%x retry:0x%x", transId, mndTransStr(pAction->stage), action, pRsp->code, pAction->acceptableCode, pAction->retryCode); - mndTransExecute(pMnode, pTrans); + mndTransExecute(pMnode, pTrans, true); _OVER: mndReleaseTrans(pMnode, pTrans); @@ -1483,15 +1497,17 @@ static bool mndTransPerfromFinishedStage(SMnode *pMnode, STrans *pTrans) { mError("trans:%d, failed to write sdb since %s", pTrans->id, terrstr()); } - mInfo("trans:%d, execute finished, code:0x%x, failedTimes:%d", pTrans->id, pTrans->code, pTrans->failedTimes); + mInfo("trans:%d, execute finished, code:0x%x, failedTimes:%d createTime:%" PRId64, pTrans->id, pTrans->code, + pTrans->failedTimes, pTrans->createdTime); return continueExec; } -void mndTransExecute(SMnode *pMnode, STrans *pTrans) { +void mndTransExecute(SMnode *pMnode, STrans *pTrans, bool isLeader) { bool continueExec = true; while (continueExec) { - mInfo("trans:%d, continue to execute, stage:%s", pTrans->id, mndTransStr(pTrans->stage)); + mInfo("trans:%d, continue to execute, stage:%s createTime:%" PRId64 " leader:%d", pTrans->id, + mndTransStr(pTrans->stage), pTrans->createdTime, isLeader); pTrans->lastExecTime = taosGetTimestampMs(); switch (pTrans->stage) { case TRN_STAGE_PREPARE: @@ -1501,13 +1517,23 @@ void mndTransExecute(SMnode *pMnode, STrans *pTrans) { continueExec = mndTransPerformRedoActionStage(pMnode, pTrans); break; case TRN_STAGE_COMMIT: - continueExec = mndTransPerformCommitStage(pMnode, pTrans); + if (isLeader) { + continueExec = mndTransPerformCommitStage(pMnode, pTrans); + } else { + mInfo("trans:%d, can not commit since not leader", pTrans->id); + continueExec = false; + } break; case TRN_STAGE_COMMIT_ACTION: continueExec = mndTransPerformCommitActionStage(pMnode, pTrans); break; case TRN_STAGE_ROLLBACK: - continueExec = mndTransPerformRollbackStage(pMnode, pTrans); + if (isLeader) { + continueExec = mndTransPerformRollbackStage(pMnode, pTrans); + } else { + mInfo("trans:%d, can not rollback since not leader", pTrans->id); + continueExec = false; + } break; case TRN_STAGE_UNDO_ACTION: continueExec = mndTransPerformUndoActionStage(pMnode, pTrans); @@ -1550,7 +1576,7 @@ int32_t mndKillTrans(SMnode *pMnode, STrans *pTrans) { pAction->errCode = 0; } - mndTransExecute(pMnode, pTrans); + mndTransExecute(pMnode, pTrans, true); return 0; } @@ -1608,7 +1634,7 @@ void mndTransPullup(SMnode *pMnode) { int32_t *pTransId = taosArrayGet(pArray, i); STrans *pTrans = mndAcquireTrans(pMnode, *pTransId); if (pTrans != NULL) { - mndTransExecute(pMnode, pTrans); + mndTransExecute(pMnode, pTrans, true); } mndReleaseTrans(pMnode, pTrans); } diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index 2c80b94dd0..f481100bbf 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -797,7 +797,7 @@ static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p colDataAppend(pColInfo, numOfRows, (const char *)&pVgroup->isTsma, false); pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - if (pDb->compactStartTime <= 0) { + if (pDb == NULL || pDb->compactStartTime <= 0) { colDataAppendNULL(pColInfo, numOfRows); } else { colDataAppend(pColInfo, numOfRows, (const char *)&pDb->compactStartTime, false); diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index db35a7c088..fd91d438e7 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -181,7 +181,6 @@ int32_t tsdbReaderOpen(SVnode *pVnode, SQueryTableDataCond *pCond, void *pTableL void tsdbReaderClose(STsdbReader *pReader); bool tsdbNextDataBlock(STsdbReader *pReader); -void tsdbRetrieveDataBlockInfo(const STsdbReader *pReader, int32_t *rows, uint64_t *uid, STimeWindow *pWindow); int32_t tsdbRetrieveDatablockSMA(STsdbReader *pReader, SSDataBlock *pDataBlock, bool *allHave); void tsdbReleaseDataBlock(STsdbReader *pReader); SSDataBlock *tsdbRetrieveDataBlock(STsdbReader *pTsdbReadHandle, SArray *pColumnIdList); diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index e8b8332aac..5e97e75025 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -350,6 +350,8 @@ struct STsdb { STsdbFS fs; SLRUCache *lruCache; TdThreadMutex lruMutex; + SLRUCache *biCache; + TdThreadMutex biMutex; }; struct TSDBKEY { @@ -790,6 +792,9 @@ int32_t tsdbCacheGetLastH(SLRUCache *pCache, tb_uid_t uid, SCacheRowsReader *pr, int32_t tsdbCacheGetLastrowH(SLRUCache *pCache, tb_uid_t uid, SCacheRowsReader *pr, LRUHandle **h); int32_t tsdbCacheRelease(SLRUCache *pCache, LRUHandle *h); +int32_t tsdbCacheGetBlockIdx(SLRUCache *pCache, SDataFReader *pFileReader, LRUHandle **handle); +int32_t tsdbBICacheRelease(SLRUCache *pCache, LRUHandle *h); + int32_t tsdbCacheDeleteLastrow(SLRUCache *pCache, tb_uid_t uid, TSKEY eKey); int32_t tsdbCacheDeleteLast(SLRUCache *pCache, tb_uid_t uid, TSKEY eKey); int32_t tsdbCacheDelete(SLRUCache *pCache, tb_uid_t uid, TSKEY eKey); diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index d18014c37b..c67fa4bdf1 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -15,6 +15,34 @@ #include "tsdb.h" +static int32_t tsdbOpenBICache(STsdb *pTsdb) { + int32_t code = 0; + SLRUCache *pCache = taosLRUCacheInit(5 * 1024 * 1024, -1, .5); + if (pCache == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } + + taosLRUCacheSetStrictCapacity(pCache, false); + + taosThreadMutexInit(&pTsdb->biMutex, NULL); + +_err: + pTsdb->biCache = pCache; + return code; +} + +static void tsdbCloseBICache(STsdb *pTsdb) { + SLRUCache *pCache = pTsdb->biCache; + if (pCache) { + taosLRUCacheEraseUnrefEntries(pCache); + + taosLRUCacheCleanup(pCache); + + taosThreadMutexDestroy(&pTsdb->biMutex); + } +} + int32_t tsdbOpenCache(STsdb *pTsdb) { int32_t code = 0; SLRUCache *pCache = NULL; @@ -26,6 +54,12 @@ int32_t tsdbOpenCache(STsdb *pTsdb) { goto _err; } + code = tsdbOpenBICache(pTsdb); + if (code != TSDB_CODE_SUCCESS) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _err; + } + taosLRUCacheSetStrictCapacity(pCache, false); taosThreadMutexInit(&pTsdb->lruMutex, NULL); @@ -44,6 +78,8 @@ void tsdbCloseCache(STsdb *pTsdb) { taosThreadMutexDestroy(&pTsdb->lruMutex); } + + tsdbCloseBICache(pTsdb); } static void getTableCacheKey(tb_uid_t uid, int cacheType, char *key, int *len) { @@ -1538,3 +1574,84 @@ size_t tsdbCacheGetUsage(SVnode *pVnode) { return usage; } + +static void getBICacheKey(int32_t fid, int64_t commitID, char *key, int *len) { + struct { + int32_t fid; + int64_t commitID; + } biKey = {0}; + + biKey.fid = fid; + biKey.commitID = commitID; + + *len = sizeof(biKey); + memcpy(key, &biKey, *len); +} + +static int32_t tsdbCacheLoadBlockIdx(SDataFReader *pFileReader, SArray **aBlockIdx) { + SArray *pArray = taosArrayInit(8, sizeof(SBlockIdx)); + int32_t code = tsdbReadBlockIdx(pFileReader, pArray); + + if (code != TSDB_CODE_SUCCESS) { + taosArrayDestroy(pArray); + code = TSDB_CODE_OUT_OF_MEMORY; + return code; + } + + *aBlockIdx = pArray; + + return code; +} + +static void deleteBICache(const void *key, size_t keyLen, void *value) { + SArray *pArray = (SArray *)value; + + taosArrayDestroy(pArray); +} + +int32_t tsdbCacheGetBlockIdx(SLRUCache *pCache, SDataFReader *pFileReader, LRUHandle **handle) { + int32_t code = 0; + char key[128] = {0}; + int keyLen = 0; + + getBICacheKey(pFileReader->pSet->fid, pFileReader->pSet->pHeadF->commitID, key, &keyLen); + LRUHandle *h = taosLRUCacheLookup(pCache, key, keyLen); + if (!h) { + STsdb *pTsdb = pFileReader->pTsdb; + taosThreadMutexLock(&pTsdb->biMutex); + + h = taosLRUCacheLookup(pCache, key, keyLen); + if (!h) { + SArray *pArray = NULL; + code = tsdbCacheLoadBlockIdx(pFileReader, &pArray); + // if table's empty or error, return code of -1 + if (code != TSDB_CODE_SUCCESS || pArray == NULL) { + taosThreadMutexUnlock(&pTsdb->biMutex); + + *handle = NULL; + return 0; + } + + size_t charge = pArray->capacity * pArray->elemSize + sizeof(*pArray); + _taos_lru_deleter_t deleter = deleteBICache; + LRUStatus status = taosLRUCacheInsert(pCache, key, keyLen, pArray, charge, deleter, &h, TAOS_LRU_PRIORITY_LOW); + if (status != TAOS_LRU_STATUS_OK) { + code = -1; + } + } + + taosThreadMutexUnlock(&pTsdb->biMutex); + } + + *handle = h; + + return code; +} + +int32_t tsdbBICacheRelease(SLRUCache *pCache, LRUHandle *h) { + int32_t code = 0; + + taosLRUCacheRelease(pCache, h, false); + + return code; +} diff --git a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c index 1f99444cf3..a97cd3db27 100644 --- a/source/dnode/vnode/src/tsdb/tsdbMergeTree.c +++ b/source/dnode/vnode/src/tsdb/tsdbMergeTree.c @@ -515,7 +515,7 @@ bool tLDataIterNextRow(SLDataIter *pIter, const char *idStr) { pIter->rInfo.row = tsdbRowFromBlockData(pBlockData, pIter->iRow); _exit: - return (terrno == TSDB_CODE_SUCCESS) && (pIter->pSttBlk != NULL); + return (terrno == TSDB_CODE_SUCCESS) && (pIter->pSttBlk != NULL) && (pBlockData != NULL); } SRowInfo *tLDataIterGet(SLDataIter *pIter) { return &pIter->rInfo; } diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index fc0678e3e6..6abdabe6fc 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -79,6 +79,9 @@ typedef struct SIOCostSummary { int64_t composedBlocks; double buildComposedBlockTime; double createScanInfoList; + // double getTbFromMemTime; + // double getTbFromIMemTime; + double initDelSkylineIterTime; } SIOCostSummary; typedef struct SBlockLoadSuppInfo { @@ -176,10 +179,9 @@ struct STsdbReader { SDataFReader* pFileReader; // the file reader SDelFReader* pDelFReader; // the del file reader SArray* pDelIdx; // del file block index; - // SVersionRange verRange; - SBlockInfoBuf blockInfoBuf; - int32_t step; - STsdbReader* innerReader[2]; + SBlockInfoBuf blockInfoBuf; + int32_t step; + STsdbReader* innerReader[2]; }; static SFileDataBlockInfo* getCurrentBlockInfo(SDataBlockIter* pBlockIter); @@ -220,6 +222,8 @@ static bool hasDataInFileBlock(const SBlockData* pBlockData, const SFil static void initBlockDumpInfo(STsdbReader* pReader, SDataBlockIter* pBlockIter); static int32_t getInitialDelIndex(const SArray* pDelSkyline, int32_t order); +static FORCE_INLINE STSchema* getLatestTableSchema(STsdbReader* pReader, uint64_t uid); + static bool outOfTimeWindow(int64_t ts, STimeWindow* pWindow) { return (ts > pWindow->ekey) || (ts < pWindow->skey); } static int32_t setColumnIdSlotList(SBlockLoadSuppInfo* pSupInfo, SColumnInfo* pCols, const int32_t* pSlotIdList, @@ -711,17 +715,21 @@ _end: } static int32_t doLoadBlockIndex(STsdbReader* pReader, SDataFReader* pFileReader, SArray* pIndexList) { - SArray* aBlockIdx = taosArrayInit(8, sizeof(SBlockIdx)); + // SArray* aBlockIdx = taosArrayInit(8, sizeof(SBlockIdx)); int64_t st = taosGetTimestampUs(); - int32_t code = tsdbReadBlockIdx(pFileReader, aBlockIdx); - if (code != TSDB_CODE_SUCCESS) { + // int32_t code = tsdbReadBlockIdx(pFileReader, aBlockIdx); + LRUHandle* handle = NULL; + int32_t code = tsdbCacheGetBlockIdx(pFileReader->pTsdb->biCache, pFileReader, &handle); + if (code != TSDB_CODE_SUCCESS || handle == NULL) { goto _end; } - size_t num = taosArrayGetSize(aBlockIdx); + SArray* aBlockIdx = (SArray*)taosLRUCacheValue(pFileReader->pTsdb->biCache, handle); + size_t num = taosArrayGetSize(aBlockIdx); if (num == 0) { - taosArrayDestroy(aBlockIdx); + tsdbBICacheRelease(pFileReader->pTsdb->biCache, handle); + // taosArrayDestroy(aBlockIdx); return TSDB_CODE_SUCCESS; } @@ -757,7 +765,8 @@ static int32_t doLoadBlockIndex(STsdbReader* pReader, SDataFReader* pFileReader, pReader->cost.headFileLoadTime += (et1 - st) / 1000.0; _end: - taosArrayDestroy(aBlockIdx); + // taosArrayDestroy(aBlockIdx); + tsdbBICacheRelease(pFileReader->pTsdb->biCache, handle); return code; } @@ -1070,7 +1079,7 @@ static void copyNumericCols(const SColData* pData, SFileBlockDumpInfo* pDumpInfo } } -static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanInfo* pBlockScanInfo) { +static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader) { SReaderStatus* pStatus = &pReader->status; SDataBlockIter* pBlockIter = &pStatus->blockIter; SBlockLoadSuppInfo* pSupInfo = &pReader->suppInfo; @@ -1087,6 +1096,14 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn bool asc = ASCENDING_TRAVERSE(pReader->order); int32_t step = asc ? 1 : -1; + // no data exists, return directly. + if (pBlockData->nRow == 0 || pBlockData->aTSKEY == 0) { + tsdbWarn("%p no need to copy since no data in blockData, table uid:%" PRIu64 " has been dropped, %s", pReader, + pBlockInfo->uid, pReader->idStr); + pResBlock->info.rows = 0; + return 0; + } + if ((pDumpInfo->rowIndex == 0 && asc) || (pDumpInfo->rowIndex == pBlock->nRow - 1 && (!asc))) { if (asc && pReader->window.skey <= pBlock->minKey.ts) { // pDumpInfo->rowIndex = 0; @@ -1186,14 +1203,12 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn setBlockAllDumped(pDumpInfo, ts, pReader->order); } - pBlockScanInfo->lastKey = pDumpInfo->lastKey; - double elapsedTime = (taosGetTimestampUs() - st) / 1000.0; pReader->cost.blockLoadTime += elapsedTime; int32_t unDumpedRows = asc ? pBlock->nRow - pDumpInfo->rowIndex : pDumpInfo->rowIndex + 1; tsdbDebug("%p copy file block to sdatablock, global index:%d, table index:%d, brange:%" PRId64 "-%" PRId64 - ", rows:%d, remain:%d, minVer:%" PRId64 ", maxVer:%" PRId64 ", uid:%"PRIu64" elapsed time:%.2f ms, %s", + ", rows:%d, remain:%d, minVer:%" PRId64 ", maxVer:%" PRId64 ", uid:%" PRIu64 " elapsed time:%.2f ms, %s", pReader, pBlockIter->index, pBlockInfo->tbBlockIdx, pBlock->minKey.ts, pBlock->maxKey.ts, dumpedRows, unDumpedRows, pBlock->minVer, pBlock->maxVer, pBlockInfo->uid, elapsedTime, pReader->idStr); @@ -1202,12 +1217,19 @@ static int32_t copyBlockDataToSDataBlock(STsdbReader* pReader, STableBlockScanIn static int32_t doLoadFileBlockData(STsdbReader* pReader, SDataBlockIter* pBlockIter, SBlockData* pBlockData, uint64_t uid) { + int32_t code = 0; int64_t st = taosGetTimestampUs(); tBlockDataReset(pBlockData); - TABLEID tid = {.suid = pReader->suid, .uid = uid}; - int32_t code = - tBlockDataInit(pBlockData, &tid, pReader->pSchema, &pReader->suppInfo.colId[1], pReader->suppInfo.numOfCols - 1); + STSchema* pSchema = getLatestTableSchema(pReader, uid); + if (pSchema == NULL) { + tsdbDebug("%p table uid:%" PRIu64 " has been dropped, no data existed, %s", pReader, uid, pReader->idStr); + return code; + } + + SBlockLoadSuppInfo* pSup = &pReader->suppInfo; + TABLEID tid = {.suid = pReader->suid, .uid = uid}; + code = tBlockDataInit(pBlockData, &tid, pSchema, &pSup->colId[1], pSup->numOfCols - 1); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -1633,7 +1655,7 @@ static bool fileBlockShouldLoad(STsdbReader* pReader, SFileDataBlockInfo* pBlock // log the reason why load the datablock for profile if (loadDataBlock) { tsdbDebug("%p uid:%" PRIu64 - " need to load the datablock, overlapwithneighborblock:%d, hasDup:%d, partiallyRequired:%d, " + " need to load the datablock, overlapneighbor:%d, hasDup:%d, partiallyRequired:%d, " "overlapWithKey:%d, greaterThanBuf:%d, overlapWithDel:%d, overlapWithlastBlock:%d, %s", pReader, pBlockInfo->uid, info.overlapWithNeighborBlock, info.hasDupTs, info.partiallyRequired, info.overlapWithKeyInBuf, info.moreThanCapcity, info.overlapWithDelInfo, info.overlapWithLastBlock, @@ -1731,6 +1753,19 @@ static bool tryCopyDistinctRowFromSttBlock(TSDBROW* fRow, SLastBlockReader* pLas return false; } +static FORCE_INLINE STSchema* getLatestTableSchema(STsdbReader* pReader, uint64_t uid) { + if (pReader->pSchema != NULL) { + return pReader->pSchema; + } + + pReader->pSchema = metaGetTbTSchema(pReader->pTsdb->pVnode->pMeta, uid, -1, 1); + if (pReader->pSchema == NULL) { + tsdbError("failed to get table schema, uid:%" PRIu64 ", it may have been dropped, ver:-1, %s", uid, pReader->idStr); + } + + return pReader->pSchema; +} + static FORCE_INLINE STSchema* doGetSchemaForTSRow(int32_t sversion, STsdbReader* pReader, uint64_t uid) { // always set the newest schema version in pReader->pSchema if (pReader->pSchema == NULL) { @@ -2260,6 +2295,7 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea } int32_t backward = (!ASCENDING_TRAVERSE(pReader->order)); + int64_t st = 0; STbData* d = NULL; if (pReader->pReadSnap->pMem != NULL) { @@ -2303,7 +2339,9 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea tsdbDebug("%p uid:%" PRIu64 ", no data in imem, %s", pReader, pBlockScanInfo->uid, pReader->idStr); } + st = taosGetTimestampUs(); initDelSkylineIterator(pBlockScanInfo, pReader, d, di); + pReader->cost.initDelSkylineIterTime += (taosGetTimestampUs() - st) / 1000.0; pBlockScanInfo->iterInit = true; return TSDB_CODE_SUCCESS; @@ -2533,7 +2571,7 @@ static int32_t buildComposedDataBlock(STsdbReader* pReader) { if (isCleanFileDataBlock(pReader, pBlockInfo, pBlock, pBlockScanInfo, keyInBuf, pLastBlockReader) && pBlock->nRow <= pReader->capacity) { if (asc || ((!asc) && (!hasDataInLastBlock(pLastBlockReader)))) { - copyBlockDataToSDataBlock(pReader, pBlockScanInfo); + copyBlockDataToSDataBlock(pReader); // record the last key value pBlockScanInfo->lastKey = asc ? pBlock->maxKey.ts : pBlock->minKey.ts; @@ -2678,21 +2716,39 @@ _err: } TSDBKEY getCurrentKeyInBuf(STableBlockScanInfo* pScanInfo, STsdbReader* pReader) { - TSDBKEY key = {.ts = TSKEY_INITIAL_VAL}; + bool asc = ASCENDING_TRAVERSE(pReader->order); + // TSKEY initialVal = asc? TSKEY_MIN:TSKEY_MAX; + + TSDBKEY key = {.ts = TSKEY_INITIAL_VAL}, ikey = {.ts = TSKEY_INITIAL_VAL}; + + bool hasKey = false, hasIKey = false; TSDBROW* pRow = getValidMemRow(&pScanInfo->iter, pScanInfo->delSkyline, pReader); if (pRow != NULL) { + hasKey = true; key = TSDBROW_KEY(pRow); } - pRow = getValidMemRow(&pScanInfo->iiter, pScanInfo->delSkyline, pReader); - if (pRow != NULL) { - TSDBKEY k = TSDBROW_KEY(pRow); - if (key.ts > k.ts) { - key = k; - } + TSDBROW* pIRow = getValidMemRow(&pScanInfo->iiter, pScanInfo->delSkyline, pReader); + if (pIRow != NULL) { + hasIKey = true; + ikey = TSDBROW_KEY(pIRow); } - return key; + if (hasKey) { + if (hasIKey) { // has data in mem & imem + if (asc) { + return key.ts <= ikey.ts ? key : ikey; + } else { + return key.ts <= ikey.ts ? ikey : key; + } + } else { // no data in imem + return key; + } + } else { + // no data in mem & imem, return the initial value + // only imem has data, return ikey + return ikey; + } } static int32_t moveToNextFile(STsdbReader* pReader, SBlockNumber* pBlockNum) { @@ -2921,59 +2977,19 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) { ASSERT(pBlockInfo != NULL); - if (pBlockInfo != NULL) { - pScanInfo = - *(STableBlockScanInfo**)taosHashGet(pReader->status.pTableMap, &pBlockInfo->uid, sizeof(pBlockInfo->uid)); - } else { - pScanInfo = *pReader->status.pTableIter; - } - + pScanInfo = *(STableBlockScanInfo**)taosHashGet(pReader->status.pTableMap, &pBlockInfo->uid, sizeof(pBlockInfo->uid)); if (pScanInfo == NULL) { tsdbError("failed to get table scan-info, %s", pReader->idStr); code = TSDB_CODE_INVALID_PARA; return code; } - if (pBlockInfo != NULL) { - pBlock = getCurrentBlock(pBlockIter); - } + pBlock = getCurrentBlock(pBlockIter); initLastBlockReader(pLastBlockReader, pScanInfo, pReader); TSDBKEY keyInBuf = getCurrentKeyInBuf(pScanInfo, pReader); - /*if (pBlockInfo == NULL) { // build data block from last data file - SBlockData* pBData = &pReader->status.fileBlockData; - tBlockDataReset(pBData); - - SSDataBlock* pResBlock = pReader->pResBlock; - tsdbDebug("load data in last block firstly, due to desc scan data, %s", pReader->idStr); - - int64_t st = taosGetTimestampUs(); - - while (1) { - bool hasBlockLData = hasDataInLastBlock(pLastBlockReader); - - // no data in last block and block, no need to proceed. - if (hasBlockLData == false) { - break; - } - - buildComposedDataBlockImpl(pReader, pScanInfo, &pReader->status.fileBlockData, pLastBlockReader); - if (pResBlock->info.rows >= pReader->capacity) { - break; - } - } - - double el = (taosGetTimestampUs() - st) / 1000.0; - updateComposedBlockInfo(pReader, el, pScanInfo); - - if (pResBlock->info.rows > 0) { - tsdbDebug("%p uid:%" PRIu64 ", composed data block created, brange:%" PRIu64 "-%" PRIu64 - " rows:%d, elapsed time:%.2f ms %s", - pReader, pResBlock->info.id.uid, pResBlock->info.window.skey, pResBlock->info.window.ekey, - pResBlock->info.rows, el, pReader->idStr); - } - } else*/ if (fileBlockShouldLoad(pReader, pBlockInfo, pBlock, pScanInfo, keyInBuf, pLastBlockReader)) { + if (fileBlockShouldLoad(pReader, pBlockInfo, pBlock, pScanInfo, keyInBuf, pLastBlockReader)) { code = doLoadFileBlockData(pReader, pBlockIter, &pStatus->fileBlockData, pScanInfo->uid); if (code != TSDB_CODE_SUCCESS) { return code; @@ -3033,6 +3049,11 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) { // update the last key for the corresponding table pScanInfo->lastKey = ASCENDING_TRAVERSE(pReader->order) ? pInfo->window.ekey : pInfo->window.skey; + tsdbDebug("%p uid:%" PRIu64 + " clean file block retrieved from file, global index:%d, " + "table index:%d, rows:%d, brange:%" PRId64 "-%" PRId64 ", %s", + pReader, pScanInfo->uid, pBlockIter->index, pBlockInfo->tbBlockIdx, pBlock->nRow, pBlock->minKey.ts, + pBlock->maxKey.ts, pReader->idStr); } } @@ -4124,19 +4145,21 @@ void tsdbReaderClose(STsdbReader* pReader) { taosMemoryFree(pLReader); } - tsdbDebug("%p :io-cost summary: head-file:%" PRIu64 ", head-file time:%.2f ms, SMA:%" PRId64 - " SMA-time:%.2f ms, fileBlocks:%" PRId64 - ", fileBlocks-load-time:%.2f ms, " - "build in-memory-block-time:%.2f ms, lastBlocks:%" PRId64 - ", lastBlocks-time:%.2f ms, composed-blocks:%" PRId64 - ", composed-blocks-time:%.2fms, STableBlockScanInfo size:%.2f Kb, creatTime:%.2f ms, %s", - pReader, pCost->headFileLoad, pCost->headFileLoadTime, pCost->smaDataLoad, pCost->smaLoadTime, - pCost->numOfBlocks, pCost->blockLoadTime, pCost->buildmemBlock, pCost->lastBlockLoad, - pCost->lastBlockLoadTime, pCost->composedBlocks, pCost->buildComposedBlockTime, - numOfTables * sizeof(STableBlockScanInfo) / 1000.0, pCost->createScanInfoList, pReader->idStr); + tsdbDebug( + "%p :io-cost summary: head-file:%" PRIu64 ", head-file time:%.2f ms, SMA:%" PRId64 + " SMA-time:%.2f ms, fileBlocks:%" PRId64 + ", fileBlocks-load-time:%.2f ms, " + "build in-memory-block-time:%.2f ms, lastBlocks:%" PRId64 ", lastBlocks-time:%.2f ms, composed-blocks:%" PRId64 + ", composed-blocks-time:%.2fms, STableBlockScanInfo size:%.2f Kb, createTime:%.2f ms,initDelSkylineIterTime:%.2f " + "ms, %s", + pReader, pCost->headFileLoad, pCost->headFileLoadTime, pCost->smaDataLoad, pCost->smaLoadTime, pCost->numOfBlocks, + pCost->blockLoadTime, pCost->buildmemBlock, pCost->lastBlockLoad, pCost->lastBlockLoadTime, pCost->composedBlocks, + pCost->buildComposedBlockTime, numOfTables * sizeof(STableBlockScanInfo) / 1000.0, pCost->createScanInfoList, + pCost->initDelSkylineIterTime, pReader->idStr); taosMemoryFree(pReader->idStr); taosMemoryFree(pReader->pSchema); + if (pReader->pMemSchema != pReader->pSchema) { taosMemoryFree(pReader->pMemSchema); } @@ -4435,26 +4458,6 @@ bool tsdbNextDataBlock(STsdbReader* pReader) { return false; } -static void setBlockInfo(const STsdbReader* pReader, int32_t* rows, uint64_t* uid, STimeWindow* pWindow) { - *rows = pReader->pResBlock->info.rows; - *uid = pReader->pResBlock->info.id.uid; - *pWindow = pReader->pResBlock->info.window; -} - -void tsdbRetrieveDataBlockInfo(const STsdbReader* pReader, int32_t* rows, uint64_t* uid, STimeWindow* pWindow) { - if (pReader->type == TIMEWINDOW_RANGE_EXTERNAL) { - if (pReader->step == EXTERNAL_ROWS_MAIN) { - setBlockInfo(pReader, rows, uid, pWindow); - } else if (pReader->step == EXTERNAL_ROWS_PREV) { - setBlockInfo(pReader->innerReader[0], rows, uid, pWindow); - } else { - setBlockInfo(pReader->innerReader[1], rows, uid, pWindow); - } - } else { - setBlockInfo(pReader, rows, uid, pWindow); - } -} - static void doFillNullColSMA(SBlockLoadSuppInfo* pSup, int32_t numOfRows, int32_t numOfCols, SColumnDataAgg* pTsAgg) { // do fill all null column value SMA info int32_t i = 0, j = 0; @@ -4585,7 +4588,7 @@ static SSDataBlock* doRetrieveDataBlock(STsdbReader* pReader) { return NULL; } - copyBlockDataToSDataBlock(pReader, pBlockScanInfo); + copyBlockDataToSDataBlock(pReader); return pReader->pResBlock; } diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index eb32ef489c..391891da28 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -926,8 +926,9 @@ int32_t tsdbRowMergerGetRow(SRowMerger *pMerger, SRow **ppRow) { return tRowBuild(pMerger->pArray, pMerger->pTSchema, ppRow); } +/* // delete skyline ====================================================== -static int32_t tsdbMergeSkyline(SArray *aSkyline1, SArray *aSkyline2, SArray *aSkyline) { +static int32_t tsdbMergeSkyline2(SArray *aSkyline1, SArray *aSkyline2, SArray *aSkyline) { int32_t code = 0; int32_t i1 = 0; int32_t n1 = taosArrayGetSize(aSkyline1); @@ -993,7 +994,141 @@ static int32_t tsdbMergeSkyline(SArray *aSkyline1, SArray *aSkyline2, SArray *aS _exit: return code; } +*/ + +// delete skyline ====================================================== +static int32_t tsdbMergeSkyline(SArray *pSkyline1, SArray *pSkyline2, SArray *pSkyline) { + int32_t code = 0; + int32_t i1 = 0; + int32_t n1 = taosArrayGetSize(pSkyline1); + int32_t i2 = 0; + int32_t n2 = taosArrayGetSize(pSkyline2); + TSDBKEY *pKey1; + TSDBKEY *pKey2; + int64_t version1 = 0; + int64_t version2 = 0; + + ASSERT(n1 > 0 && n2 > 0); + + taosArrayClear(pSkyline); + TSDBKEY **pItem = TARRAY_GET_ELEM(pSkyline, 0); + + while (i1 < n1 && i2 < n2) { + pKey1 = (TSDBKEY *)taosArrayGetP(pSkyline1, i1); + pKey2 = (TSDBKEY *)taosArrayGetP(pSkyline2, i2); + + if (pKey1->ts < pKey2->ts) { + version1 = pKey1->version; + *pItem = pKey1; + i1++; + } else if (pKey1->ts > pKey2->ts) { + version2 = pKey2->version; + *pItem = pKey2; + i2++; + } else { + version1 = pKey1->version; + version2 = pKey2->version; + *pItem = pKey1; + i1++; + i2++; + } + + (*pItem)->version = TMAX(version1, version2); + pItem++; + } + + while (i1 < n1) { + pKey1 = (TSDBKEY *)taosArrayGetP(pSkyline1, i1); + *pItem = pKey1; + pItem++; + i1++; + } + + while (i2 < n2) { + pKey2 = (TSDBKEY *)taosArrayGetP(pSkyline2, i2); + *pItem = pKey2; + pItem++; + i2++; + } + + taosArraySetSize(pSkyline, TARRAY_ELEM_IDX(pSkyline, pItem)); + +_exit: + return code; +} + + +int32_t tsdbBuildDeleteSkylineImpl(SArray *aSkyline, int32_t sidx, int32_t eidx, SArray *pSkyline) { + int32_t code = 0; + SDelData *pDelData; + int32_t midx; + + taosArrayClear(pSkyline); + if (sidx == eidx) { + TSDBKEY *pItem1 = taosArrayGet(aSkyline, sidx * 2); + TSDBKEY *pItem2 = taosArrayGet(aSkyline, sidx * 2 + 1); + taosArrayPush(pSkyline, &pItem1); + taosArrayPush(pSkyline, &pItem2); + } else { + SArray *pSkyline1 = NULL; + SArray *pSkyline2 = NULL; + midx = (sidx + eidx) / 2; + + pSkyline1 = taosArrayInit((midx - sidx + 1) * 2, POINTER_BYTES); + pSkyline2 = taosArrayInit((eidx - midx) * 2, POINTER_BYTES); + if (pSkyline1 == NULL || pSkyline1 == NULL) { + code = TSDB_CODE_OUT_OF_MEMORY; + goto _clear; + } + + code = tsdbBuildDeleteSkylineImpl(aSkyline, sidx, midx, pSkyline1); + if (code) goto _clear; + + code = tsdbBuildDeleteSkylineImpl(aSkyline, midx + 1, eidx, pSkyline2); + if (code) goto _clear; + + code = tsdbMergeSkyline(pSkyline1, pSkyline2, pSkyline); + + _clear: + taosArrayDestroy(pSkyline1); + taosArrayDestroy(pSkyline2); + } + + return code; +} + + int32_t tsdbBuildDeleteSkyline(SArray *aDelData, int32_t sidx, int32_t eidx, SArray *aSkyline) { + SDelData *pDelData; + int32_t code = 0; + int32_t dataNum = eidx - sidx + 1; + SArray *aTmpSkyline = taosArrayInit(dataNum * 2, sizeof(TSDBKEY)); + SArray *pSkyline = taosArrayInit(dataNum * 2, POINTER_BYTES); + + for (int32_t i = sidx; i <= eidx; ++i) { + pDelData = (SDelData *)taosArrayGet(aDelData, i); + taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->sKey, .version = pDelData->version}); + taosArrayPush(aTmpSkyline, &(TSDBKEY){.ts = pDelData->eKey, .version = 0}); + } + + code = tsdbBuildDeleteSkylineImpl(aTmpSkyline, sidx, eidx, pSkyline); + if (code) goto _clear; + + int32_t skylineNum = taosArrayGetSize(pSkyline); + for (int32_t i = 0; i < skylineNum; ++i) { + TSDBKEY *p = taosArrayGetP(pSkyline, i); + taosArrayPush(aSkyline, p); + } + +_clear: + taosArrayDestroy(aTmpSkyline); + taosArrayDestroy(pSkyline); + + return code; +} + +/* +int32_t tsdbBuildDeleteSkyline2(SArray *aDelData, int32_t sidx, int32_t eidx, SArray *aSkyline) { int32_t code = 0; SDelData *pDelData; int32_t midx; @@ -1030,6 +1165,7 @@ int32_t tsdbBuildDeleteSkyline(SArray *aDelData, int32_t sidx, int32_t eidx, SAr return code; } +*/ // SBlockData ====================================================== int32_t tBlockDataCreate(SBlockData *pBlockData) { diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index ad907a5595..05d29656ef 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -1339,7 +1339,7 @@ static int32_t vnodeProcessBatchDeleteReq(SVnode *pVnode, int64_t version, void tDecodeSBatchDeleteReq(&decoder, &deleteReq); SMetaReader mr = {0}; - metaReaderInit(&mr, pVnode->pMeta, 0); + metaReaderInit(&mr, pVnode->pMeta, META_READER_NOLOCK); int32_t sz = taosArrayGetSize(deleteReq.deleteReqs); for (int32_t i = 0; i < sz; i++) { diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 540b5e90f8..a6f9a13407 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1670,12 +1670,18 @@ int32_t convertFillType(int32_t mode) { case FILL_MODE_NULL: type = TSDB_FILL_NULL; break; + case FILL_MODE_NULL_F: + type = TSDB_FILL_NULL_F; + break; case FILL_MODE_NEXT: type = TSDB_FILL_NEXT; break; case FILL_MODE_VALUE: type = TSDB_FILL_SET_VALUE; break; + case FILL_MODE_VALUE_F: + type = TSDB_FILL_SET_VALUE_F; + break; case FILL_MODE_LINEAR: type = TSDB_FILL_LINEAR; break; diff --git a/source/libs/executor/src/filloperator.c b/source/libs/executor/src/filloperator.c index 187c8f582a..41e4c990f8 100644 --- a/source/libs/executor/src/filloperator.c +++ b/source/libs/executor/src/filloperator.c @@ -140,7 +140,7 @@ static SSDataBlock* doFillImpl(SOperatorInfo* pOperator) { while (1) { SSDataBlock* pBlock = pDownstream->fpSet.getNextFn(pDownstream); if (pBlock == NULL) { - if (pInfo->totalInputRows == 0) { + if (pInfo->totalInputRows == 0 && (pInfo->pFillInfo->type != TSDB_FILL_NULL_F && pInfo->pFillInfo->type != TSDB_FILL_SET_VALUE_F)) { setOperatorCompleted(pOperator); return NULL; } @@ -456,7 +456,8 @@ void* destroyStreamFillLinearInfo(SStreamFillLinearInfo* pFillLinear) { return NULL; } void* destroyStreamFillInfo(SStreamFillInfo* pFillInfo) { - if (pFillInfo->type == TSDB_FILL_SET_VALUE || pFillInfo->type == TSDB_FILL_NULL) { + if (pFillInfo->type == TSDB_FILL_SET_VALUE || pFillInfo->type == TSDB_FILL_SET_VALUE_F || + pFillInfo->type == TSDB_FILL_NULL || pFillInfo->type == TSDB_FILL_NULL_F) { taosMemoryFreeClear(pFillInfo->pResRow->pRowVal); taosMemoryFreeClear(pFillInfo->pResRow); } @@ -661,7 +662,9 @@ void setDeleteFillValueInfo(TSKEY start, TSKEY end, SStreamFillSupporter* pFillS pFillInfo->pos = FILL_POS_INVALID; switch (pFillInfo->type) { case TSDB_FILL_NULL: + case TSDB_FILL_NULL_F: case TSDB_FILL_SET_VALUE: + case TSDB_FILL_SET_VALUE_F: break; case TSDB_FILL_PREV: pFillInfo->pResRow = &pFillSup->prev; @@ -720,7 +723,9 @@ void setFillValueInfo(SSDataBlock* pBlock, TSKEY ts, int32_t rowId, SStreamFillS pFillInfo->pos = FILL_POS_INVALID; switch (pFillInfo->type) { case TSDB_FILL_NULL: - case TSDB_FILL_SET_VALUE: { + case TSDB_FILL_NULL_F: + case TSDB_FILL_SET_VALUE: + case TSDB_FILL_SET_VALUE_F: { if (pFillSup->prev.key == pFillInfo->preRowKey) { resetFillWindow(&pFillSup->prev); } @@ -1360,7 +1365,8 @@ SStreamFillInfo* initStreamFillInfo(SStreamFillSupporter* pFillSup, SSDataBlock* pFillInfo->pLinearInfo->winIndex = 0; pFillInfo->pResRow = NULL; - if (pFillSup->type == TSDB_FILL_SET_VALUE || pFillSup->type == TSDB_FILL_NULL) { + if (pFillSup->type == TSDB_FILL_SET_VALUE || pFillSup->type == TSDB_FILL_SET_VALUE_F + || pFillSup->type == TSDB_FILL_NULL || pFillSup->type == TSDB_FILL_NULL_F) { pFillInfo->pResRow = taosMemoryCalloc(1, sizeof(SResultRowData)); pFillInfo->pResRow->key = INT64_MIN; pFillInfo->pResRow->pRowVal = taosMemoryCalloc(1, pFillSup->rowSize); @@ -1405,7 +1411,7 @@ SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFi goto _error; } - if (pInfo->pFillInfo->type == TSDB_FILL_SET_VALUE) { + if (pInfo->pFillInfo->type == TSDB_FILL_SET_VALUE || pInfo->pFillInfo->type == TSDB_FILL_SET_VALUE_F) { for (int32_t i = 0; i < pInfo->pFillSup->numOfAllCols; ++i) { SFillColInfo* pFillCol = pInfo->pFillSup->pAllColInfo + i; int32_t slotId = GET_DEST_SLOT_ID(pFillCol); @@ -1427,7 +1433,7 @@ SOperatorInfo* createStreamFillOperatorInfo(SOperatorInfo* downstream, SStreamFi pCell->isNull = true; } } - } else if (pInfo->pFillInfo->type == TSDB_FILL_NULL) { + } else if (pInfo->pFillInfo->type == TSDB_FILL_NULL || pInfo->pFillInfo->type == TSDB_FILL_NULL_F) { for (int32_t i = 0; i < pInfo->pFillSup->numOfAllCols; ++i) { SFillColInfo* pFillCol = pInfo->pFillSup->pAllColInfo + i; int32_t slotId = GET_DEST_SLOT_ID(pFillCol); diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 9c8137db34..1d7a996541 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -492,8 +492,8 @@ _error: static void doHashPartition(SOperatorInfo* pOperator, SSDataBlock* pBlock) { SPartitionOperatorInfo* pInfo = pOperator->info; - SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; - + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + for (int32_t j = 0; j < pBlock->info.rows; ++j) { recordNewGroupKeys(pInfo->pGroupCols, pInfo->pGroupColVals, pBlock, j); int32_t len = buildGroupKeys(pInfo->keyBuf, pInfo->pGroupColVals); @@ -690,8 +690,8 @@ static int compareDataGroupInfo(const void* group1, const void* group2) { static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) { SPartitionOperatorInfo* pInfo = pOperator->info; - SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; - + SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; + SDataGroupInfo* pGroupInfo = (pInfo->groupIndex != -1) ? taosArrayGet(pInfo->sortedGroupArray, pInfo->groupIndex) : NULL; if (pInfo->groupIndex == -1 || pInfo->pageIndex >= taosArrayGetSize(pGroupInfo->pPageList)) { @@ -713,7 +713,7 @@ static SSDataBlock* buildPartitionResult(SOperatorInfo* pOperator) { qError("failed to get buffer, code:%s, %s", tstrerror(terrno), GET_TASKID(pTaskInfo)); T_LONG_JMP(pTaskInfo->env, terrno); } - + blockDataEnsureCapacity(pInfo->binfo.pRes, pInfo->rowCapacity); blockDataFromBuf1(pInfo->binfo.pRes, page, pInfo->rowCapacity); @@ -829,6 +829,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition SPartitionOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(SPartitionOperatorInfo)); SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); if (pInfo == NULL || pOperator == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + pTaskInfo->code = terrno; goto _error; } @@ -841,6 +843,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition SExprInfo* pExprInfo1 = createExprInfo(pPartNode->pExprs, NULL, &num); int32_t code = initExprSupp(&pInfo->scalarSup, pExprInfo1, num); if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = terrno; goto _error; } } @@ -848,6 +852,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition _hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY); pInfo->pGroupSet = taosHashInit(100, hashFn, false, HASH_NO_LOCK); if (pInfo->pGroupSet == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + pTaskInfo->code = terrno; goto _error; } @@ -866,6 +872,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition int32_t code = createDiskbasedBuf(&pInfo->pBuf, defaultPgsz, defaultBufsz, pTaskInfo->id.str, tsTempDir); if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = code; goto _error; } @@ -873,6 +881,8 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition pInfo->columnOffset = setupColumnOffset(pInfo->binfo.pRes, pInfo->rowCapacity); code = initGroupOptrInfo(&pInfo->pGroupColVals, &pInfo->groupKeyLen, &pInfo->keyBuf, pInfo->pGroupCols); if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = code; goto _error; } @@ -885,10 +895,15 @@ SOperatorInfo* createPartitionOperatorInfo(SOperatorInfo* downstream, SPartition createOperatorFpSet(optrDummyOpenFn, hashPartition, NULL, destroyPartitionOperatorInfo, optrDefaultBufFn, NULL); code = appendDownstream(pOperator, &downstream, 1); + if (code != TSDB_CODE_SUCCESS) { + terrno = code; + pTaskInfo->code = code; + goto _error; + } + return pOperator; _error: - pTaskInfo->code = TSDB_CODE_OUT_OF_MEMORY; if (pInfo != NULL) { destroyPartitionOperatorInfo(pInfo); } diff --git a/source/libs/executor/src/projectoperator.c b/source/libs/executor/src/projectoperator.c index f84871ea92..5a221a0fbd 100644 --- a/source/libs/executor/src/projectoperator.c +++ b/source/libs/executor/src/projectoperator.c @@ -190,6 +190,7 @@ static int32_t setInfoForNewGroup(SSDataBlock* pBlock, SLimitInfo* pLimitInfo, S return PROJECT_RETRIEVE_DONE; } +// todo refactor static int32_t doIngroupLimitOffset(SLimitInfo* pLimitInfo, uint64_t groupId, SSDataBlock* pBlock, SOperatorInfo* pOperator) { // set current group id diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index a7b9cce7aa..0d27332502 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -312,8 +312,8 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanBase* pTableSca tsdbReleaseDataBlock(pTableScanInfo->dataReader); return TSDB_CODE_SUCCESS; } else if (*status == FUNC_DATA_REQUIRED_NOT_LOAD) { - qDebug("%s data block skipped, brange:%" PRId64 "-%" PRId64 ", rows:%d", GET_TASKID(pTaskInfo), - pBlockInfo->window.skey, pBlockInfo->window.ekey, pBlockInfo->rows); + qDebug("%s data block skipped, brange:%" PRId64 "-%" PRId64 ", rows:%d, uid:%" PRIu64, GET_TASKID(pTaskInfo), + pBlockInfo->window.skey, pBlockInfo->window.ekey, pBlockInfo->rows, pBlockInfo->id.uid); doSetTagColumnData(pTableScanInfo, pBlock, pTaskInfo, 1); pCost->skipBlocks += 1; tsdbReleaseDataBlock(pTableScanInfo->dataReader); @@ -399,7 +399,7 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanBase* pTableSca } bool limitReached = applyLimitOffset(&pTableScanInfo->limitInfo, pBlock, pTaskInfo); - if (limitReached) { // set operator flag is done + if (limitReached) { // set operator flag is done setOperatorCompleted(pOperator); } @@ -450,6 +450,15 @@ static STableCachedVal* createTableCacheVal(const SMetaReader* pMetaReader) { // const void *key, size_t keyLen, void *value static void freeCachedMetaItem(const void* key, size_t keyLen, void* value) { freeTableCachedVal(value); } +static void doSetNullValue(SSDataBlock* pBlock, const SExprInfo* pExpr, int32_t numOfExpr) { + for (int32_t j = 0; j < numOfExpr; ++j) { + int32_t dstSlotId = pExpr[j].base.resSchema.slotId; + + SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, dstSlotId); + colDataAppendNNULL(pColInfoData, 0, pBlock->info.rows); + } +} + int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int32_t numOfExpr, SSDataBlock* pBlock, int32_t rows, const char* idStr, STableMetaCacheInfo* pCache) { // currently only the tbname pseudo column @@ -469,14 +478,21 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int SMetaReader mr = {0}; LRUHandle* h = NULL; + // todo refactor: extract method + // the handling of the null data should be packed in the extracted method + // 1. check if it is existed in meta cache if (pCache == NULL) { metaReaderInit(&mr, pHandle->meta, 0); code = metaGetTableEntryByUidCache(&mr, pBlock->info.id.uid); if (code != TSDB_CODE_SUCCESS) { + // when encounter the TSDB_CODE_PAR_TABLE_NOT_EXIST error, we proceed. if (terrno == TSDB_CODE_PAR_TABLE_NOT_EXIST) { qWarn("failed to get table meta, table may have been dropped, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); + + // append null value before return to caller, since the caller will ignore this error code and proceed + doSetNullValue(pBlock, pExpr, numOfExpr); } else { qError("failed to get table meta, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); @@ -502,6 +518,8 @@ int32_t addTagPseudoColumnData(SReadHandle* pHandle, const SExprInfo* pExpr, int if (terrno == TSDB_CODE_PAR_TABLE_NOT_EXIST) { qWarn("failed to get table meta, table may have been dropped, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); + // append null value before return to caller, since the caller will ignore this error code and proceed + doSetNullValue(pBlock, pExpr, numOfExpr); } else { qError("failed to get table meta, uid:0x%" PRIx64 ", code:%s, %s", pBlock->info.id.uid, tstrerror(terrno), idStr); @@ -621,6 +639,11 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) { T_LONG_JMP(pTaskInfo->env, pTaskInfo->code); } + if (pOperator->status == OP_EXEC_DONE) { + tsdbReleaseDataBlock(pTableScanInfo->base.dataReader); + break; + } + // process this data block based on the probabilities bool processThisBlock = processBlockWithProbability(&pTableScanInfo->sample); if (!processThisBlock) { @@ -632,9 +655,8 @@ static SSDataBlock* doTableScanImpl(SOperatorInfo* pOperator) { uint32_t status = 0; int32_t code = loadDataBlock(pOperator, &pTableScanInfo->base, pBlock, &status); - // int32_t code = loadDataBlockOnDemand(pOperator->pRuntimeEnv, pTableScanInfo, pBlock, &status); if (code != TSDB_CODE_SUCCESS) { - T_LONG_JMP(pOperator->pTaskInfo->env, code); + T_LONG_JMP(pTaskInfo->env, code); } // current block is filter out according to filter condition, continue load the next block @@ -2539,7 +2561,7 @@ static SSDataBlock* getTableDataBlockImpl(void* param) { } uint32_t status = 0; - loadDataBlock(pOperator, &pInfo->base, pBlock, &status); + code = loadDataBlock(pOperator, &pInfo->base, pBlock, &status); // code = loadDataBlockFromOneTable(pOperator, pTableScanInfo, pBlock, &status); if (code != TSDB_CODE_SUCCESS) { T_LONG_JMP(pTaskInfo->env, code); @@ -2714,10 +2736,13 @@ SSDataBlock* getSortedTableMergeScanBlockData(SSortHandle* pHandle, SSDataBlock* } } - applyLimitOffset(&pInfo->limitInfo, pResBlock, pTaskInfo); - qDebug("%s get sorted row block, rows:%d, limit:%"PRId64, GET_TASKID(pTaskInfo), pResBlock->info.rows, - pInfo->limitInfo.numOfOutputRows); + bool limitReached = applyLimitOffset(&pInfo->limitInfo, pResBlock, pTaskInfo); + qDebug("%s get sorted row block, rows:%d, limit:%" PRId64, GET_TASKID(pTaskInfo), pResBlock->info.rows, + pInfo->limitInfo.numOfOutputRows); + if (limitReached) { + resetLimitInfoForNextGroup(&pInfo->limitInfo); + } return (pResBlock->info.rows > 0) ? pResBlock : NULL; } diff --git a/source/libs/executor/src/tfill.c b/source/libs/executor/src/tfill.c index 2d921d43d3..778281f9b4 100644 --- a/source/libs/executor/src/tfill.c +++ b/source/libs/executor/src/tfill.c @@ -186,7 +186,7 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock* } } } - } else if (pFillInfo->type == TSDB_FILL_NULL) { // fill with NULL + } else if (pFillInfo->type == TSDB_FILL_NULL || pFillInfo->type == TSDB_FILL_NULL_F) { // fill with NULL setNullRow(pBlock, pFillInfo, index); } else { // fill with user specified value for each column for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) { @@ -349,7 +349,7 @@ static int32_t fillResultImpl(SFillInfo* pFillInfo, SSDataBlock* pBlock, int32_t bool isNull = colDataIsNull_s(pSrc, pFillInfo->index); colDataAppend(pDst, index, src, isNull); saveColData(pFillInfo->prev.pRowVal, i, src, isNull); // todo: - } else if (pFillInfo->type == TSDB_FILL_NULL) { + } else if (pFillInfo->type == TSDB_FILL_NULL || pFillInfo->type == TSDB_FILL_NULL_F) { colDataAppendNULL(pDst, index); } else if (pFillInfo->type == TSDB_FILL_NEXT) { SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->next.pRowVal : pFillInfo->prev.pRowVal; @@ -447,32 +447,6 @@ struct SFillInfo* taosCreateFillInfo(TSKEY skey, int32_t numOfFillCols, int32_t taosResetFillInfo(pFillInfo, skey); - switch (fillType) { - case FILL_MODE_NONE: - pFillInfo->type = TSDB_FILL_NONE; - break; - case FILL_MODE_PREV: - pFillInfo->type = TSDB_FILL_PREV; - break; - case FILL_MODE_NULL: - pFillInfo->type = TSDB_FILL_NULL; - break; - case FILL_MODE_LINEAR: - pFillInfo->type = TSDB_FILL_LINEAR; - break; - case FILL_MODE_NEXT: - pFillInfo->type = TSDB_FILL_NEXT; - break; - case FILL_MODE_VALUE: - pFillInfo->type = TSDB_FILL_SET_VALUE; - break; - default: { - taosMemoryFree(pFillInfo); - terrno = TSDB_CODE_INVALID_PARA; - return NULL; - } - } - pFillInfo->type = fillType; pFillInfo->pFillCol = pCol; pFillInfo->numOfCols = numOfFillCols + numOfNotFillCols; @@ -572,15 +546,14 @@ bool taosFillHasMoreResults(SFillInfo* pFillInfo) { } int64_t getNumOfResultsAfterFillGap(SFillInfo* pFillInfo, TSKEY ekey, int32_t maxNumOfRows) { - SColumnInfoData* pCol = taosArrayGet(pFillInfo->pSrcBlock->pDataBlock, pFillInfo->srcTsSlotId); - - int64_t* tsList = (int64_t*)pCol->pData; int32_t numOfRows = taosNumOfRemainRows(pFillInfo); TSKEY ekey1 = ekey; int64_t numOfRes = -1; if (numOfRows > 0) { // still fill gap within current data block, not generating data after the result set. + SColumnInfoData* pCol = taosArrayGet(pFillInfo->pSrcBlock->pDataBlock, pFillInfo->srcTsSlotId); + int64_t* tsList = (int64_t*)pCol->pData; TSKEY lastKey = tsList[pFillInfo->numOfRows - 1]; numOfRes = taosTimeCountInterval(lastKey, pFillInfo->currentKey, pFillInfo->interval.sliding, pFillInfo->interval.slidingUnit, pFillInfo->interval.precision); diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index 7cb49c8f54..bce8443353 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -185,12 +185,14 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; switch (pSliceInfo->fillType) { - case TSDB_FILL_NULL: { + case TSDB_FILL_NULL: + case TSDB_FILL_NULL_F: { colDataAppendNULL(pDst, rows); break; } - case TSDB_FILL_SET_VALUE: { + case TSDB_FILL_SET_VALUE: + case TSDB_FILL_SET_VALUE_F: { SVariant* pVar = &pSliceInfo->pFillColInfo[j].fillVal; if (pDst->info.type == TSDB_DATA_TYPE_FLOAT) { diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c index 661e9f97b7..90f20f40b8 100644 --- a/source/libs/executor/src/tsort.c +++ b/source/libs/executor/src/tsort.c @@ -190,8 +190,9 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) { qError("Add to buf failed since %s", terrstr(terrno)); return terrno; } + int32_t code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize, - "doAddToBuf", tsTempDir); + "sortExternalBuf", tsTempDir); dBufSetPrintInfo(pHandle->pBuf); if (code != TSDB_CODE_SUCCESS) { return code; @@ -635,6 +636,7 @@ int32_t getProperSortPageSize(size_t rowSize, uint32_t numOfCols) { static int32_t createInitialSources(SSortHandle* pHandle) { size_t sortBufSize = pHandle->numOfPages * pHandle->pageSize; + int32_t code = 0; if (pHandle->type == SORT_SINGLESOURCE_SORT) { SSortSource** pSource = taosArrayGet(pHandle->pOrderedSource, 0); @@ -663,8 +665,8 @@ static int32_t createInitialSources(SSortHandle* pHandle) { pHandle->beforeFp(pBlock, pHandle->param); } - int32_t code = blockDataMerge(pHandle->pDataBlock, pBlock); - if (code != 0) { + code = blockDataMerge(pHandle->pDataBlock, pBlock); + if (code != TSDB_CODE_SUCCESS) { if (source->param && !source->onlyRef) { taosMemoryFree(source->param); } @@ -689,6 +691,7 @@ static int32_t createInitialSources(SSortHandle* pHandle) { blockDataDestroy(source->src.pBlock); source->src.pBlock = NULL; } + taosMemoryFree(source); return code; } @@ -696,13 +699,17 @@ static int32_t createInitialSources(SSortHandle* pHandle) { int64_t el = taosGetTimestampUs() - p; pHandle->sortElapsed += el; - doAddToBuf(pHandle->pDataBlock, pHandle); + code = doAddToBuf(pHandle->pDataBlock, pHandle); + if (code != TSDB_CODE_SUCCESS) { + return code; + } } } if (source->param && !source->onlyRef) { taosMemoryFree(source->param); } + taosMemoryFree(source); if (pHandle->pDataBlock != NULL && pHandle->pDataBlock->info.rows > 0) { @@ -711,7 +718,7 @@ static int32_t createInitialSources(SSortHandle* pHandle) { // Perform the in-memory sort and then flush data in the buffer into disk. int64_t p = taosGetTimestampUs(); - int32_t code = blockDataSort(pHandle->pDataBlock, pHandle->pSortInfo); + code = blockDataSort(pHandle->pDataBlock, pHandle->pSortInfo); if (code != 0) { return code; } @@ -729,12 +736,12 @@ static int32_t createInitialSources(SSortHandle* pHandle) { pHandle->tupleHandle.pBlock = pHandle->pDataBlock; return 0; } else { - doAddToBuf(pHandle->pDataBlock, pHandle); + code = doAddToBuf(pHandle->pDataBlock, pHandle); } } } - return TSDB_CODE_SUCCESS; + return code; } int32_t tsortOpen(SSortHandle* pHandle) { diff --git a/source/libs/function/src/detail/tminmax.c b/source/libs/function/src/detail/tminmax.c index 847c738655..a511ca97f1 100644 --- a/source/libs/function/src/detail/tminmax.c +++ b/source/libs/function/src/detail/tminmax.c @@ -714,26 +714,18 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc, int32_t* nElems) pBuf->type = type; if (IS_NULL_TYPE(type)) { - numOfElems = 0; goto _over; } // data in current data block are qualified to the query if (pInput->colDataSMAIsSet) { numOfElems = pInput->numOfRows - pAgg->numOfNull; - if (numOfElems == 0) { goto _over; } - void* tval = NULL; int16_t index = 0; - - if (isMinFunc) { - tval = &pInput->pColumnDataAgg[0]->min; - } else { - tval = &pInput->pColumnDataAgg[0]->max; - } + void* tval = (isMinFunc) ? &pInput->pColumnDataAgg[0]->min : &pInput->pColumnDataAgg[0]->max; if (!pBuf->assign) { if (type == TSDB_DATA_TYPE_FLOAT) { @@ -824,8 +816,9 @@ int32_t doMinMaxHelper(SqlFunctionCtx* pCtx, int32_t isMinFunc, int32_t* nElems) } } + numOfElems = 1; pBuf->assign = true; - return TSDB_CODE_SUCCESS; + goto _over; } int32_t start = pInput->startRowIndex; diff --git a/source/libs/function/src/functionMgt.c b/source/libs/function/src/functionMgt.c index 6ab91a4483..e3127fcd7b 100644 --- a/source/libs/function/src/functionMgt.c +++ b/source/libs/function/src/functionMgt.c @@ -262,6 +262,13 @@ bool fmIsGroupKeyFunc(int32_t funcId) { return FUNCTION_TYPE_GROUP_KEY == funcMgtBuiltins[funcId].type; } +bool fmIsBlockDistFunc(int32_t funcId) { + if (funcId < 0 || funcId >= funcMgtBuiltinsNum) { + return false; + } + return FUNCTION_TYPE_BLOCK_DIST == funcMgtBuiltins[funcId].type; +} + void fmFuncMgtDestroy() { void* m = gFunMgtService.pFuncNameHashTable; if (m != NULL && atomic_val_compare_exchange_ptr((void**)&gFunMgtService.pFuncNameHashTable, m, 0) == m) { diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 9d52441976..0419c883e6 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -2019,10 +2019,14 @@ char* nodesGetFillModeString(EFillMode mode) { return "none"; case FILL_MODE_VALUE: return "value"; + case FILL_MODE_VALUE_F: + return "value_f"; case FILL_MODE_PREV: return "prev"; case FILL_MODE_NULL: return "null"; + case FILL_MODE_NULL_F: + return "null_f"; case FILL_MODE_LINEAR: return "linear"; case FILL_MODE_NEXT: diff --git a/source/libs/parser/inc/parInsertUtil.h b/source/libs/parser/inc/parInsertUtil.h index 7b816359f9..303d349b34 100644 --- a/source/libs/parser/inc/parInsertUtil.h +++ b/source/libs/parser/inc/parInsertUtil.h @@ -20,11 +20,11 @@ struct SToken; -#define NEXT_TOKEN(pSql, sToken) \ - do { \ - int32_t index = 0; \ - sToken = tStrGetToken(pSql, &index, false); \ - pSql += index; \ +#define NEXT_TOKEN(pSql, sToken) \ + do { \ + int32_t index = 0; \ + sToken = tStrGetToken(pSql, &index, false, NULL); \ + pSql += index; \ } while (0) #define CHECK_CODE(expr) \ diff --git a/source/libs/parser/inc/parToken.h b/source/libs/parser/inc/parToken.h index 642979c471..86bcc18fd5 100644 --- a/source/libs/parser/inc/parToken.h +++ b/source/libs/parser/inc/parToken.h @@ -55,7 +55,7 @@ uint32_t tGetToken(const char *z, uint32_t *tokenType); * @param isPrevOptr * @return */ -SToken tStrGetToken(const char *str, int32_t *i, bool isPrevOptr); +SToken tStrGetToken(const char *str, int32_t *i, bool isPrevOptr, bool *pIgnoreComma); /** * check if it is a keyword or not diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index d2debec7b5..c87911c9bc 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -1007,12 +1007,14 @@ sliding_opt(A) ::= SLIDING NK_LP duration_literal(B) NK_RP. fill_opt(A) ::= . { A = NULL; } fill_opt(A) ::= FILL NK_LP fill_mode(B) NK_RP. { A = createFillNode(pCxt, B, NULL); } fill_opt(A) ::= FILL NK_LP VALUE NK_COMMA literal_list(B) NK_RP. { A = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, B)); } +fill_opt(A) ::= FILL NK_LP VALUE_F NK_COMMA literal_list(B) NK_RP. { A = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, B)); } %type fill_mode { EFillMode } %destructor fill_mode { } fill_mode(A) ::= NONE. { A = FILL_MODE_NONE; } fill_mode(A) ::= PREV. { A = FILL_MODE_PREV; } fill_mode(A) ::= NULL. { A = FILL_MODE_NULL; } +fill_mode(A) ::= NULL_F. { A = FILL_MODE_NULL_F; } fill_mode(A) ::= LINEAR. { A = FILL_MODE_LINEAR; } fill_mode(A) ::= NEXT. { A = FILL_MODE_NEXT; } diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 630b61bd4b..e82b1edee1 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -18,16 +18,23 @@ #include "tglobal.h" #include "ttime.h" -#define NEXT_TOKEN_WITH_PREV(pSql, token) \ - do { \ - int32_t index = 0; \ - token = tStrGetToken(pSql, &index, true); \ - pSql += index; \ +#define NEXT_TOKEN_WITH_PREV(pSql, token) \ + do { \ + int32_t index = 0; \ + token = tStrGetToken(pSql, &index, true, NULL); \ + pSql += index; \ } while (0) -#define NEXT_TOKEN_KEEP_SQL(pSql, token, index) \ - do { \ - token = tStrGetToken(pSql, &index, false); \ +#define NEXT_TOKEN_WITH_PREV_EXT(pSql, token, pIgnoreComma) \ + do { \ + int32_t index = 0; \ + token = tStrGetToken(pSql, &index, true, pIgnoreComma); \ + pSql += index; \ + } while (0) + +#define NEXT_TOKEN_KEEP_SQL(pSql, token, index) \ + do { \ + token = tStrGetToken(pSql, &index, false, NULL); \ } while (0) #define NEXT_VALID_TOKEN(pSql, token) \ @@ -266,12 +273,12 @@ static int parseTime(const char** end, SToken* pToken, int16_t timePrec, int64_t * e.g., now+12a, now-5h */ index = 0; - SToken token = tStrGetToken(pTokenEnd, &index, false); + SToken token = tStrGetToken(pTokenEnd, &index, false, NULL); pTokenEnd += index; if (token.type == TK_NK_MINUS || token.type == TK_NK_PLUS) { index = 0; - SToken valueToken = tStrGetToken(pTokenEnd, &index, false); + SToken valueToken = tStrGetToken(pTokenEnd, &index, false, NULL); pTokenEnd += index; if (valueToken.n < 2) { @@ -1240,7 +1247,14 @@ static int parseOneRow(SInsertParseContext* pCxt, const char** pSql, STableDataC int32_t code = TSDB_CODE_SUCCESS; // 1. set the parsed value from sql string for (int i = 0; i < pCols->numOfBound && TSDB_CODE_SUCCESS == code; ++i) { - NEXT_TOKEN_WITH_PREV(*pSql, *pToken); + const char* pOrigSql = *pSql; + bool ignoreComma = false; + NEXT_TOKEN_WITH_PREV_EXT(*pSql, *pToken, &ignoreComma); + if (ignoreComma) { + code = buildSyntaxErrMsg(&pCxt->msg, "invalid data or symbol", pOrigSql); + break; + } + SSchema* pSchema = &pSchemas[pCols->pColIndex[i]]; SColVal* pVal = taosArrayGet(pTableCxt->pValues, pCols->pColIndex[i]); @@ -1248,20 +1262,22 @@ static int parseOneRow(SInsertParseContext* pCxt, const char** pSql, STableDataC isParseBindParam = true; if (NULL == pCxt->pComCxt->pStmtCb) { code = buildSyntaxErrMsg(&pCxt->msg, "? only used in stmt", pToken->z); + break; + } + } else { + if (TK_NK_RP == pToken->type) { + code = generateSyntaxErrMsg(&pCxt->msg, TSDB_CODE_PAR_INVALID_COLUMNS_NUM); + break; } - continue; - } - if (TSDB_CODE_SUCCESS == code && TK_NK_RP == pToken->type) { - code = generateSyntaxErrMsg(&pCxt->msg, TSDB_CODE_PAR_INVALID_COLUMNS_NUM); - } + if (isParseBindParam) { + code = buildInvalidOperationMsg(&pCxt->msg, "no mix usage for ? and values"); + break; + } - if (TSDB_CODE_SUCCESS == code && isParseBindParam) { - code = buildInvalidOperationMsg(&pCxt->msg, "no mix usage for ? and values"); - } - - if (TSDB_CODE_SUCCESS == code) { - code = parseValueToken(pCxt, pSql, pToken, pSchema, getTableInfo(pTableCxt->pMeta).precision, pVal); + if (TSDB_CODE_SUCCESS == code) { + code = parseValueToken(pCxt, pSql, pToken, pSchema, getTableInfo(pTableCxt->pMeta).precision, pVal); + } } if (TSDB_CODE_SUCCESS == code && i < pCols->numOfBound - 1) { diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 772ca9ea0b..3e16b5c80f 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -150,6 +150,7 @@ static SKeyword keywordTable[] = { {"NOT", TK_NOT}, {"NOW", TK_NOW}, {"NULL", TK_NULL}, + {"NULL_F", TK_NULL_F}, {"NULLS", TK_NULLS}, {"OFFSET", TK_OFFSET}, {"ON", TK_ON}, @@ -240,6 +241,7 @@ static SKeyword keywordTable[] = { {"USERS", TK_USERS}, {"USING", TK_USING}, {"VALUE", TK_VALUE}, + {"VALUE_F", TK_VALUE_F}, {"VALUES", TK_VALUES}, {"VARCHAR", TK_VARCHAR}, {"VARIABLES", TK_VARIABLES}, @@ -625,7 +627,7 @@ uint32_t tGetToken(const char* z, uint32_t* tokenId) { return 0; } -SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr) { +SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr, bool* pIgnoreComma) { SToken t0 = {0}; // here we reach the end of sql string, null-terminated string @@ -646,6 +648,10 @@ SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr) { return t0; } + if (NULL != pIgnoreComma && t == ',') { + *pIgnoreComma = true; + } + t = str[++(*i)]; } diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 63909a4d78..58857881d8 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1561,6 +1561,26 @@ static int32_t translateRepeatScanFunc(STranslateContext* pCxt, SFunctionNode* p return TSDB_CODE_SUCCESS; } +static int32_t translateBlockDistFunc(STranslateContext* pCtx, SFunctionNode* pFunc) { + if (!fmIsBlockDistFunc(pFunc->funcId)) { + return TSDB_CODE_SUCCESS; + } + if (!isSelectStmt(pCtx->pCurrStmt)) { + return generateSyntaxErrMsgExt(&pCtx->msgBuf, TSDB_CODE_PAR_ONLY_SUPPORT_SINGLE_TABLE, + "%s is only supported in single table query", pFunc->functionName); + } + SSelectStmt* pSelect = (SSelectStmt*)pCtx->pCurrStmt; + SNode* pTable = pSelect->pFromTable; + if (NULL != pTable && (QUERY_NODE_REAL_TABLE != nodeType(pTable) || + (TSDB_SUPER_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType && + TSDB_CHILD_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType && + TSDB_NORMAL_TABLE != ((SRealTableNode*)pTable)->pMeta->tableType))) { + return generateSyntaxErrMsgExt(&pCtx->msgBuf, TSDB_CODE_PAR_NOT_ALLOWED_FUNC, + "%s is only supported on super table, child table or normal table", pFunc->functionName); + } + return TSDB_CODE_SUCCESS; +} + static bool isStar(SNode* pNode) { return (QUERY_NODE_COLUMN == nodeType(pNode)) && ('\0' == ((SColumnNode*)pNode)->tableAlias[0]) && (0 == strcmp(((SColumnNode*)pNode)->colName, "*")); @@ -1720,7 +1740,7 @@ static int32_t rewriteSystemInfoFunc(STranslateContext* pCxt, SNode** pNode) { return TSDB_CODE_PAR_INTERNAL_ERROR; } -static int32_t translateNoramlFunction(STranslateContext* pCxt, SFunctionNode* pFunc) { +static int32_t translateNormalFunction(STranslateContext* pCxt, SFunctionNode* pFunc) { int32_t code = translateAggFunc(pCxt, pFunc); if (TSDB_CODE_SUCCESS == code) { code = translateScanPseudoColumnFunc(pCxt, pFunc); @@ -1752,6 +1772,9 @@ static int32_t translateNoramlFunction(STranslateContext* pCxt, SFunctionNode* p if (TSDB_CODE_SUCCESS == code) { code = translateTimelineFunc(pCxt, pFunc); } + if (TSDB_CODE_SUCCESS == code) { + code = translateBlockDistFunc(pCxt, pFunc); + } if (TSDB_CODE_SUCCESS == code) { setFuncClassification(pCxt->pCurrStmt, pFunc); } @@ -1812,7 +1835,7 @@ static int32_t translateFunctionImpl(STranslateContext* pCxt, SFunctionNode** pF if (fmIsClientPseudoColumnFunc((*pFunc)->funcId)) { return rewriteClientPseudoColumnFunc(pCxt, (SNode**)pFunc); } - return translateNoramlFunction(pCxt, *pFunc); + return translateNormalFunction(pCxt, *pFunc); } static EDealRes translateFunction(STranslateContext* pCxt, SFunctionNode** pFunc) { @@ -2798,7 +2821,7 @@ static int32_t convertFillValue(STranslateContext* pCxt, SDataType dt, SNodeList } static int32_t checkFillValues(STranslateContext* pCxt, SFillNode* pFill, SNodeList* pProjectionList) { - if (FILL_MODE_VALUE != pFill->mode) { + if (FILL_MODE_VALUE != pFill->mode && FILL_MODE_VALUE_F != pFill->mode) { return TSDB_CODE_SUCCESS; } diff --git a/source/libs/parser/src/parser.c b/source/libs/parser/src/parser.c index cf338d63ff..47482db740 100644 --- a/source/libs/parser/src/parser.c +++ b/source/libs/parser/src/parser.c @@ -27,7 +27,7 @@ bool qIsInsertValuesSql(const char* pStr, size_t length) { const char* pSql = pStr; int32_t index = 0; - SToken t = tStrGetToken((char*)pStr, &index, false); + SToken t = tStrGetToken((char*)pStr, &index, false, NULL); if (TK_INSERT != t.type && TK_IMPORT != t.type) { return false; } @@ -35,7 +35,7 @@ bool qIsInsertValuesSql(const char* pStr, size_t length) { do { pStr += index; index = 0; - t = tStrGetToken((char*)pStr, &index, false); + t = tStrGetToken((char*)pStr, &index, false, NULL); if (TK_USING == t.type || TK_VALUES == t.type || TK_FILE == t.type) { return true; } else if (TK_SELECT == t.type) { diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 3814c3a5e4..1faf34a528 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,26 +104,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 467 +#define YYNOCODE 469 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EFillMode yy22; - ENullOrder yy23; - SNode* yy44; - int64_t yy91; - SAlterOption yy153; - bool yy163; - int8_t yy169; - SDataType yy260; - SToken yy455; - EOrder yy490; - SNodeList* yy684; - EOperatorType yy704; - EJoinType yy724; - int32_t yy832; + EOperatorType yy2; + SNode* yy42; + bool yy103; + EOrder yy106; + SNodeList* yy110; + SToken yy225; + EFillMode yy410; + SDataType yy448; + SAlterOption yy459; + int32_t yy508; + ENullOrder yy599; + EJoinType yy638; + int64_t yy641; + int8_t yy705; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 737 -#define YYNRULE 559 -#define YYNTOKEN 326 -#define YY_MAX_SHIFT 736 -#define YY_MIN_SHIFTREDUCE 1092 -#define YY_MAX_SHIFTREDUCE 1650 -#define YY_ERROR_ACTION 1651 -#define YY_ACCEPT_ACTION 1652 -#define YY_NO_ACTION 1653 -#define YY_MIN_REDUCE 1654 -#define YY_MAX_REDUCE 2212 +#define YYNSTATE 740 +#define YYNRULE 561 +#define YYNTOKEN 328 +#define YY_MAX_SHIFT 739 +#define YY_MIN_SHIFTREDUCE 1097 +#define YY_MAX_SHIFTREDUCE 1657 +#define YY_ERROR_ACTION 1658 +#define YY_ACCEPT_ACTION 1659 +#define YY_NO_ACTION 1660 +#define YY_MIN_REDUCE 1661 +#define YY_MAX_REDUCE 2221 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,761 +216,769 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2799) +#define YY_ACTTAB_COUNT (2835) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 165, 378, 1666, 601, 477, 626, 478, 1690, 141, 160, - /* 10 */ 64, 2085, 45, 43, 1580, 1797, 355, 31, 1810, 131, - /* 20 */ 375, 1799, 1429, 38, 37, 1859, 516, 44, 42, 41, - /* 30 */ 40, 39, 2008, 1510, 139, 1427, 1808, 2026, 1144, 625, - /* 40 */ 1143, 2012, 38, 37, 607, 1454, 44, 42, 41, 40, - /* 50 */ 39, 626, 2008, 219, 2129, 38, 37, 175, 1505, 44, - /* 60 */ 42, 41, 40, 39, 18, 186, 2004, 2010, 2044, 1145, - /* 70 */ 380, 1435, 1652, 1854, 1856, 601, 640, 636, 345, 1910, - /* 80 */ 2126, 1994, 1808, 642, 45, 43, 2004, 2010, 357, 565, - /* 90 */ 625, 268, 375, 2183, 1429, 1927, 14, 636, 338, 180, - /* 100 */ 2122, 2123, 60, 137, 2127, 1510, 139, 1427, 2189, 181, - /* 110 */ 1925, 613, 2025, 2184, 590, 48, 2061, 495, 733, 322, - /* 120 */ 2027, 646, 2029, 2030, 641, 639, 636, 627, 2079, 60, - /* 130 */ 1505, 91, 2187, 1512, 1513, 1454, 18, 476, 388, 1539, - /* 140 */ 481, 1696, 387, 1435, 1617, 1252, 668, 667, 666, 1256, - /* 150 */ 665, 1258, 1259, 664, 1261, 661, 175, 1267, 658, 1269, - /* 160 */ 1270, 655, 652, 1485, 1495, 1927, 48, 1454, 14, 1511, - /* 170 */ 1514, 265, 2122, 600, 85, 132, 599, 366, 1911, 2183, - /* 180 */ 1924, 613, 680, 565, 1430, 2044, 1428, 2183, 135, 486, - /* 190 */ 733, 478, 1690, 583, 588, 181, 1540, 1803, 60, 2184, - /* 200 */ 590, 1212, 2189, 181, 49, 1512, 1513, 2184, 590, 1433, - /* 210 */ 1434, 60, 1484, 1487, 1488, 1489, 1490, 1491, 1492, 1493, - /* 220 */ 1494, 638, 634, 1503, 1504, 1506, 1507, 1508, 1509, 2, - /* 230 */ 44, 42, 41, 40, 39, 1485, 1495, 1214, 582, 554, - /* 240 */ 121, 1511, 1514, 120, 119, 118, 117, 116, 115, 114, - /* 250 */ 113, 112, 1144, 184, 1143, 234, 1430, 625, 1428, 38, - /* 260 */ 37, 1455, 420, 44, 42, 41, 40, 39, 34, 373, - /* 270 */ 1534, 1535, 1536, 1537, 1538, 1542, 1543, 1544, 1545, 612, - /* 280 */ 184, 1433, 1434, 1145, 1484, 1487, 1488, 1489, 1490, 1491, - /* 290 */ 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, 1507, 1508, - /* 300 */ 1509, 2, 328, 11, 45, 43, 736, 601, 220, 1786, - /* 310 */ 1350, 1351, 375, 235, 1429, 407, 1607, 184, 88, 333, - /* 320 */ 293, 611, 549, 170, 547, 1510, 493, 1427, 1920, 512, - /* 330 */ 508, 504, 500, 217, 612, 174, 409, 405, 139, 1785, - /* 340 */ 483, 726, 722, 718, 714, 291, 479, 414, 584, 184, - /* 350 */ 1505, 413, 1125, 38, 37, 184, 18, 44, 42, 41, - /* 360 */ 40, 39, 184, 1435, 1987, 576, 1605, 1606, 1608, 1609, - /* 370 */ 86, 1891, 495, 215, 1295, 1296, 45, 43, 1515, 1405, - /* 380 */ 1406, 610, 106, 1920, 375, 284, 1429, 672, 14, 27, - /* 390 */ 1852, 1127, 565, 1130, 1131, 592, 2183, 1510, 2129, 1427, - /* 400 */ 626, 626, 603, 179, 2122, 2123, 2026, 137, 2127, 565, - /* 410 */ 733, 2189, 181, 2183, 131, 54, 2184, 590, 622, 2188, - /* 420 */ 1861, 521, 1505, 2183, 2125, 1512, 1513, 1647, 2189, 181, - /* 430 */ 1677, 1808, 1808, 2184, 590, 1435, 1860, 2044, 1783, 2187, - /* 440 */ 579, 214, 208, 2184, 2186, 643, 213, 678, 1584, 491, - /* 450 */ 1994, 1174, 642, 271, 1454, 1485, 1495, 1861, 270, 2188, - /* 460 */ 46, 1511, 1514, 2183, 354, 206, 153, 152, 675, 674, - /* 470 */ 673, 150, 626, 1859, 1994, 1394, 1430, 239, 1428, 2187, - /* 480 */ 1453, 2025, 733, 2184, 2185, 2061, 418, 1175, 167, 2027, - /* 490 */ 646, 2029, 2030, 641, 151, 636, 485, 1512, 1513, 481, - /* 500 */ 1696, 1433, 1434, 1808, 1484, 1487, 1488, 1489, 1490, 1491, - /* 510 */ 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, 1507, 1508, - /* 520 */ 1509, 2, 1646, 438, 585, 580, 574, 1485, 1495, 566, - /* 530 */ 2151, 1655, 437, 1511, 1514, 35, 286, 38, 37, 11, - /* 540 */ 626, 44, 42, 41, 40, 39, 678, 53, 1430, 1457, - /* 550 */ 1428, 177, 121, 1723, 419, 120, 119, 118, 117, 116, - /* 560 */ 115, 114, 113, 112, 1848, 153, 152, 675, 674, 673, - /* 570 */ 150, 1808, 2026, 1433, 1434, 1456, 1484, 1487, 1488, 1489, - /* 580 */ 1490, 1491, 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, - /* 590 */ 1507, 1508, 1509, 2, 45, 43, 193, 1486, 626, 85, - /* 600 */ 1988, 1435, 375, 2044, 1429, 692, 589, 1861, 166, 671, - /* 610 */ 2183, 643, 428, 1762, 363, 1510, 1994, 1427, 642, 531, - /* 620 */ 530, 529, 1804, 1859, 2188, 588, 181, 136, 525, 1808, - /* 630 */ 2184, 590, 524, 82, 2129, 2012, 81, 523, 528, 2013, - /* 640 */ 1505, 1456, 1676, 522, 2026, 565, 2008, 2025, 626, 2183, - /* 650 */ 2008, 2061, 1906, 1435, 109, 2027, 646, 2029, 2030, 641, - /* 660 */ 2124, 636, 443, 189, 2189, 181, 45, 43, 2114, 2184, - /* 670 */ 590, 99, 2113, 2110, 375, 2044, 1429, 1654, 46, 1808, - /* 680 */ 2004, 2010, 370, 643, 2004, 2010, 1994, 1510, 1994, 1427, - /* 690 */ 642, 636, 612, 1801, 245, 636, 41, 40, 39, 105, - /* 700 */ 733, 130, 129, 128, 127, 126, 125, 124, 123, 122, - /* 710 */ 52, 1541, 1505, 140, 1784, 1512, 1513, 564, 1640, 2025, - /* 720 */ 267, 1800, 104, 2061, 626, 1435, 168, 2027, 646, 2029, - /* 730 */ 2030, 641, 101, 636, 545, 531, 530, 529, 444, 621, - /* 740 */ 1793, 1920, 626, 136, 525, 1485, 1495, 543, 524, 541, - /* 750 */ 14, 1511, 1514, 523, 528, 1808, 494, 38, 37, 522, - /* 760 */ 1861, 44, 42, 41, 40, 39, 1430, 343, 1428, 13, - /* 770 */ 12, 1906, 733, 1808, 1861, 1675, 1859, 680, 591, 2204, - /* 780 */ 163, 368, 191, 32, 1455, 1674, 267, 1512, 1513, 1811, - /* 790 */ 1859, 1433, 1434, 1546, 1484, 1487, 1488, 1489, 1490, 1491, - /* 800 */ 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, 1507, 1508, - /* 810 */ 1509, 2, 1795, 331, 1673, 1452, 1672, 1485, 1495, 1994, - /* 820 */ 33, 626, 451, 1511, 1514, 465, 38, 37, 464, 1994, - /* 830 */ 44, 42, 41, 40, 39, 1805, 1577, 589, 1430, 1720, - /* 840 */ 1428, 2183, 367, 434, 1791, 466, 1596, 1520, 436, 11, - /* 850 */ 163, 9, 1808, 1454, 1964, 1671, 588, 181, 1994, 1810, - /* 860 */ 1994, 2184, 590, 1433, 1434, 1553, 1484, 1487, 1488, 1489, - /* 870 */ 1490, 1491, 1492, 1493, 1494, 638, 634, 1503, 1504, 1506, - /* 880 */ 1507, 1508, 1509, 2, 277, 278, 670, 38, 37, 276, - /* 890 */ 346, 44, 42, 41, 40, 39, 240, 1367, 1368, 1994, - /* 900 */ 236, 349, 424, 527, 526, 710, 709, 708, 707, 385, - /* 910 */ 560, 706, 705, 143, 700, 699, 698, 697, 696, 695, - /* 920 */ 694, 155, 690, 689, 688, 384, 383, 685, 684, 683, - /* 930 */ 682, 681, 462, 1366, 1369, 456, 455, 454, 453, 450, - /* 940 */ 449, 448, 447, 446, 442, 441, 440, 439, 330, 431, - /* 950 */ 430, 429, 1457, 426, 425, 344, 164, 676, 552, 626, - /* 960 */ 1852, 306, 1670, 350, 1429, 348, 347, 1861, 518, 628, - /* 970 */ 2026, 2086, 520, 237, 379, 304, 71, 1427, 593, 70, - /* 980 */ 1669, 38, 37, 1859, 8, 44, 42, 41, 40, 39, - /* 990 */ 1808, 1855, 1856, 1667, 519, 1668, 1486, 202, 473, 471, - /* 1000 */ 468, 2044, 677, 565, 2026, 1852, 1994, 2183, 637, 604, - /* 1010 */ 601, 704, 702, 1435, 1994, 626, 642, 300, 1665, 1664, - /* 1020 */ 1838, 1663, 2189, 181, 1994, 1662, 1906, 2184, 590, 561, - /* 1030 */ 1661, 1660, 1763, 1659, 60, 2044, 458, 195, 1658, 1994, - /* 1040 */ 1454, 139, 60, 643, 162, 2025, 1808, 626, 1994, 2061, - /* 1050 */ 642, 1457, 108, 2027, 646, 2029, 2030, 641, 1657, 636, - /* 1060 */ 733, 605, 1994, 1994, 178, 1994, 2114, 596, 378, 1994, - /* 1070 */ 369, 2110, 72, 107, 1994, 1994, 163, 1994, 1808, 2025, - /* 1080 */ 1576, 2026, 1994, 2061, 183, 1810, 108, 2027, 646, 2029, - /* 1090 */ 2030, 641, 2140, 636, 197, 196, 142, 190, 148, 2085, - /* 1100 */ 2114, 630, 1994, 2086, 369, 2110, 182, 2122, 2123, 2154, - /* 1110 */ 137, 2127, 2044, 262, 79, 78, 417, 457, 151, 188, - /* 1120 */ 604, 693, 80, 1778, 626, 1994, 1430, 642, 1428, 412, - /* 1130 */ 2026, 411, 1130, 1131, 51, 520, 3, 329, 609, 1980, - /* 1140 */ 403, 1438, 401, 397, 393, 390, 410, 577, 626, 2134, - /* 1150 */ 1573, 1433, 1434, 2026, 410, 1808, 2025, 519, 626, 626, - /* 1160 */ 2061, 2044, 281, 108, 2027, 646, 2029, 2030, 641, 643, - /* 1170 */ 636, 1400, 623, 624, 1994, 178, 642, 2114, 381, 1808, - /* 1180 */ 626, 369, 2110, 1486, 2044, 184, 163, 395, 421, 1808, - /* 1190 */ 1808, 1573, 643, 184, 287, 1810, 244, 1994, 145, 642, - /* 1200 */ 133, 422, 594, 2141, 225, 2025, 218, 223, 151, 2061, - /* 1210 */ 2015, 1808, 108, 2027, 646, 2029, 2030, 641, 227, 636, - /* 1220 */ 229, 226, 231, 228, 2203, 230, 2114, 62, 2025, 633, - /* 1230 */ 369, 2110, 2061, 1710, 1703, 108, 2027, 646, 2029, 2030, - /* 1240 */ 641, 2148, 636, 2026, 626, 1701, 243, 2203, 1437, 2114, - /* 1250 */ 372, 371, 256, 369, 2110, 532, 534, 2045, 382, 2017, - /* 1260 */ 1443, 1403, 249, 151, 2161, 1697, 2026, 537, 1649, 1650, - /* 1270 */ 47, 1510, 386, 1436, 2044, 1808, 13, 12, 1915, 678, - /* 1280 */ 1604, 1849, 643, 274, 1691, 69, 89, 1994, 2144, 642, - /* 1290 */ 602, 686, 1441, 597, 149, 264, 1505, 2044, 153, 152, - /* 1300 */ 675, 674, 673, 150, 47, 643, 151, 261, 1, 1435, - /* 1310 */ 1994, 62, 642, 1193, 728, 251, 608, 4, 2025, 389, - /* 1320 */ 394, 342, 2061, 1364, 687, 108, 2027, 646, 2029, 2030, - /* 1330 */ 641, 47, 636, 1387, 2026, 294, 279, 2203, 618, 2114, - /* 1340 */ 423, 2025, 650, 369, 2110, 2061, 1191, 283, 108, 2027, - /* 1350 */ 646, 2029, 2030, 641, 572, 636, 632, 299, 194, 1245, - /* 1360 */ 2203, 536, 2114, 1457, 1547, 2044, 369, 2110, 1916, 427, - /* 1370 */ 460, 432, 1452, 643, 1531, 445, 546, 2177, 1994, 149, - /* 1380 */ 642, 1908, 452, 151, 1496, 459, 461, 467, 134, 149, - /* 1390 */ 233, 469, 470, 199, 2026, 1273, 472, 474, 1458, 1440, - /* 1400 */ 475, 484, 1460, 487, 205, 539, 1455, 488, 1459, 2025, - /* 1410 */ 533, 489, 1461, 2061, 207, 232, 108, 2027, 646, 2029, - /* 1420 */ 2030, 641, 1444, 636, 1439, 2044, 490, 210, 2203, 492, - /* 1430 */ 2114, 212, 1277, 643, 369, 2110, 1284, 83, 1994, 84, - /* 1440 */ 642, 1282, 154, 216, 496, 2133, 1147, 1447, 1449, 513, - /* 1450 */ 514, 1970, 68, 517, 515, 67, 111, 1798, 222, 1794, - /* 1460 */ 634, 1503, 1504, 1506, 1507, 1508, 1509, 2026, 224, 2025, - /* 1470 */ 553, 156, 157, 2061, 1796, 1792, 108, 2027, 646, 2029, - /* 1480 */ 2030, 641, 551, 636, 158, 159, 332, 87, 2089, 1969, - /* 1490 */ 2114, 2026, 555, 238, 369, 2110, 147, 562, 2044, 241, - /* 1500 */ 295, 556, 559, 569, 2145, 578, 643, 616, 2136, 2155, - /* 1510 */ 2160, 1994, 7, 642, 575, 358, 247, 250, 581, 2159, - /* 1520 */ 570, 587, 2044, 171, 255, 257, 258, 568, 359, 567, - /* 1530 */ 643, 595, 2206, 259, 1573, 1994, 263, 642, 260, 598, - /* 1540 */ 2182, 138, 2025, 1456, 2130, 362, 2061, 606, 1462, 108, - /* 1550 */ 2027, 646, 2029, 2030, 641, 269, 636, 94, 2026, 614, - /* 1560 */ 1921, 2087, 615, 2114, 296, 1935, 2025, 369, 2110, 1934, - /* 1570 */ 2061, 1933, 297, 108, 2027, 646, 2029, 2030, 641, 365, - /* 1580 */ 636, 2026, 619, 96, 620, 629, 298, 2114, 98, 2044, - /* 1590 */ 1809, 369, 2110, 59, 100, 2095, 648, 643, 1853, 290, - /* 1600 */ 729, 730, 1994, 1779, 642, 301, 50, 732, 310, 325, - /* 1610 */ 334, 324, 2044, 335, 1986, 314, 303, 305, 1985, 1984, - /* 1620 */ 643, 76, 1981, 391, 392, 1994, 1420, 642, 1421, 187, - /* 1630 */ 396, 1979, 398, 2025, 399, 400, 1978, 2061, 402, 1977, - /* 1640 */ 109, 2027, 646, 2029, 2030, 641, 404, 636, 2026, 1976, - /* 1650 */ 406, 1975, 408, 77, 2114, 1390, 644, 1389, 631, 2110, - /* 1660 */ 2061, 1947, 1946, 109, 2027, 646, 2029, 2030, 641, 1945, - /* 1670 */ 636, 2026, 415, 416, 1944, 1943, 1341, 2114, 1899, 2044, - /* 1680 */ 1898, 337, 2110, 1896, 144, 1895, 1894, 643, 1897, 1893, - /* 1690 */ 1892, 1890, 1994, 1889, 642, 1888, 192, 2026, 433, 1887, - /* 1700 */ 435, 1901, 2044, 1886, 1885, 1884, 1883, 1882, 1881, 1880, - /* 1710 */ 643, 1879, 1878, 1877, 1876, 1994, 1875, 642, 1874, 1873, - /* 1720 */ 1872, 146, 1871, 2025, 1870, 1869, 1900, 2061, 2044, 1868, - /* 1730 */ 109, 2027, 646, 2029, 2030, 641, 643, 636, 1867, 1343, - /* 1740 */ 1866, 1994, 1865, 642, 2114, 1864, 2025, 1863, 463, 2111, - /* 1750 */ 2061, 1862, 1726, 167, 2027, 646, 2029, 2030, 641, 1725, - /* 1760 */ 636, 1724, 1220, 2026, 1722, 1686, 1685, 176, 198, 1133, - /* 1770 */ 203, 74, 2025, 200, 1132, 204, 2061, 1960, 2014, 316, - /* 1780 */ 2027, 646, 2029, 2030, 641, 1954, 636, 75, 201, 1942, - /* 1790 */ 2026, 480, 209, 482, 2044, 2152, 211, 1941, 1919, 1787, - /* 1800 */ 1721, 1167, 643, 497, 498, 1717, 499, 1994, 1719, 642, - /* 1810 */ 501, 502, 503, 1715, 505, 507, 1713, 506, 509, 510, - /* 1820 */ 2026, 2044, 1700, 586, 1699, 511, 364, 1682, 1789, 643, - /* 1830 */ 1289, 1288, 1788, 1711, 1994, 701, 642, 1211, 2025, 61, - /* 1840 */ 221, 1210, 2061, 1704, 535, 168, 2027, 646, 2029, 2030, - /* 1850 */ 641, 2044, 636, 1209, 1208, 703, 1205, 1203, 1204, 640, - /* 1860 */ 1202, 351, 352, 1702, 1994, 2025, 642, 353, 1681, 2061, - /* 1870 */ 110, 538, 323, 2027, 646, 2029, 2030, 641, 1680, 636, - /* 1880 */ 1679, 2026, 540, 542, 544, 1412, 1410, 1959, 1409, 26, - /* 1890 */ 548, 1396, 65, 1953, 557, 2025, 1940, 2026, 2205, 2061, - /* 1900 */ 1938, 2188, 322, 2027, 646, 2029, 2030, 641, 55, 636, - /* 1910 */ 19, 2080, 2044, 28, 558, 2026, 16, 374, 58, 253, - /* 1920 */ 643, 573, 246, 356, 242, 1994, 161, 642, 2044, 254, - /* 1930 */ 571, 1619, 2015, 376, 248, 563, 643, 63, 1603, 1595, - /* 1940 */ 169, 1994, 5, 642, 6, 252, 2044, 30, 20, 21, - /* 1950 */ 29, 90, 1634, 17, 643, 1639, 2025, 1640, 1633, 1994, - /* 1960 */ 2061, 642, 360, 323, 2027, 646, 2029, 2030, 641, 266, - /* 1970 */ 636, 1638, 2025, 1637, 2026, 361, 2061, 57, 1570, 323, - /* 1980 */ 2027, 646, 2029, 2030, 641, 1569, 636, 1939, 172, 1937, - /* 1990 */ 550, 1936, 1918, 2026, 2061, 56, 93, 318, 2027, 646, - /* 2000 */ 2029, 2030, 641, 92, 636, 2044, 272, 22, 1917, 273, - /* 2010 */ 1601, 275, 280, 643, 617, 66, 95, 97, 1994, 285, - /* 2020 */ 642, 12, 23, 282, 2044, 1445, 101, 2064, 635, 1532, - /* 2030 */ 173, 1522, 643, 185, 1500, 36, 10, 1994, 15, 642, - /* 2040 */ 1521, 1498, 1497, 1469, 24, 1477, 25, 649, 1274, 2025, - /* 2050 */ 647, 377, 651, 2061, 1251, 1271, 307, 2027, 646, 2029, - /* 2060 */ 2030, 641, 2026, 636, 653, 654, 656, 1268, 2025, 657, - /* 2070 */ 645, 1262, 2061, 659, 662, 308, 2027, 646, 2029, 2030, - /* 2080 */ 641, 660, 636, 2026, 1266, 1260, 663, 1265, 1264, 669, - /* 2090 */ 102, 1263, 288, 2044, 103, 1283, 73, 1279, 1165, 679, - /* 2100 */ 1199, 643, 1198, 1197, 1196, 1195, 1994, 1194, 642, 1192, - /* 2110 */ 691, 2026, 1190, 1189, 2044, 1188, 1218, 289, 1186, 1183, - /* 2120 */ 1185, 1184, 643, 1182, 1181, 1180, 1215, 1994, 1213, 642, - /* 2130 */ 1177, 1176, 2026, 1173, 1172, 1171, 1170, 2025, 1718, 711, - /* 2140 */ 712, 2061, 2044, 1716, 309, 2027, 646, 2029, 2030, 641, - /* 2150 */ 643, 636, 715, 713, 716, 1994, 1714, 642, 2025, 717, - /* 2160 */ 719, 721, 2061, 2044, 720, 315, 2027, 646, 2029, 2030, - /* 2170 */ 641, 643, 636, 1712, 723, 724, 1994, 1698, 642, 725, - /* 2180 */ 727, 2026, 1122, 1678, 292, 731, 2025, 1431, 302, 734, - /* 2190 */ 2061, 735, 1653, 319, 2027, 646, 2029, 2030, 641, 2026, - /* 2200 */ 636, 1653, 1653, 1653, 1653, 1653, 1653, 2025, 1653, 1653, - /* 2210 */ 1653, 2061, 2044, 1653, 311, 2027, 646, 2029, 2030, 641, - /* 2220 */ 643, 636, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, - /* 2230 */ 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653, - /* 2240 */ 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653, 1653, - /* 2250 */ 1653, 1653, 1653, 1653, 1653, 1653, 2025, 1653, 2026, 1653, - /* 2260 */ 2061, 1653, 1653, 320, 2027, 646, 2029, 2030, 641, 1653, - /* 2270 */ 636, 1653, 1653, 1653, 2025, 1653, 2026, 1653, 2061, 1653, - /* 2280 */ 1653, 312, 2027, 646, 2029, 2030, 641, 1653, 636, 2044, - /* 2290 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653, 1653, - /* 2300 */ 1653, 1653, 1994, 1653, 642, 1653, 1653, 2044, 1653, 1653, - /* 2310 */ 1653, 1653, 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653, - /* 2320 */ 1994, 1653, 642, 1653, 1653, 1653, 1653, 1653, 1653, 1653, - /* 2330 */ 1653, 1653, 1653, 2025, 1653, 2026, 1653, 2061, 1653, 1653, - /* 2340 */ 321, 2027, 646, 2029, 2030, 641, 1653, 636, 1653, 1653, - /* 2350 */ 1653, 2025, 1653, 1653, 2026, 2061, 1653, 1653, 313, 2027, - /* 2360 */ 646, 2029, 2030, 641, 1653, 636, 2044, 1653, 1653, 1653, - /* 2370 */ 1653, 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994, - /* 2380 */ 1653, 642, 1653, 1653, 1653, 2044, 1653, 1653, 1653, 1653, - /* 2390 */ 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994, 1653, - /* 2400 */ 642, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, - /* 2410 */ 2025, 1653, 1653, 2026, 2061, 1653, 1653, 326, 2027, 646, - /* 2420 */ 2029, 2030, 641, 1653, 636, 1653, 1653, 1653, 1653, 2025, - /* 2430 */ 1653, 2026, 1653, 2061, 1653, 1653, 327, 2027, 646, 2029, - /* 2440 */ 2030, 641, 1653, 636, 2044, 1653, 1653, 1653, 1653, 1653, - /* 2450 */ 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994, 1653, 642, - /* 2460 */ 1653, 1653, 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, - /* 2470 */ 643, 1653, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, - /* 2480 */ 2026, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 2025, 1653, - /* 2490 */ 1653, 1653, 2061, 1653, 1653, 2038, 2027, 646, 2029, 2030, - /* 2500 */ 641, 2026, 636, 1653, 1653, 1653, 2025, 1653, 1653, 1653, - /* 2510 */ 2061, 2044, 1653, 2037, 2027, 646, 2029, 2030, 641, 643, - /* 2520 */ 636, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 2026, - /* 2530 */ 1653, 1653, 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, - /* 2540 */ 643, 1653, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, - /* 2550 */ 2026, 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061, - /* 2560 */ 2044, 1653, 2036, 2027, 646, 2029, 2030, 641, 643, 636, - /* 2570 */ 1653, 1653, 1653, 1994, 1653, 642, 2025, 1653, 1653, 1653, - /* 2580 */ 2061, 2044, 1653, 339, 2027, 646, 2029, 2030, 641, 643, - /* 2590 */ 636, 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653, - /* 2600 */ 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061, 1653, - /* 2610 */ 1653, 340, 2027, 646, 2029, 2030, 641, 1653, 636, 2026, - /* 2620 */ 1653, 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061, - /* 2630 */ 1653, 1653, 336, 2027, 646, 2029, 2030, 641, 1653, 636, - /* 2640 */ 1653, 1653, 1653, 1653, 1653, 2026, 1653, 1653, 1653, 1653, - /* 2650 */ 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653, - /* 2660 */ 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653, 1653, - /* 2670 */ 1653, 1653, 1653, 1653, 1653, 1653, 2044, 1653, 1653, 1653, - /* 2680 */ 1653, 1653, 1653, 1653, 643, 1653, 1653, 1653, 1653, 1994, - /* 2690 */ 1653, 642, 1653, 1653, 2025, 1653, 1653, 1653, 2061, 1653, - /* 2700 */ 1653, 341, 2027, 646, 2029, 2030, 641, 1653, 636, 2026, - /* 2710 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, - /* 2720 */ 644, 1653, 1653, 1653, 2061, 1653, 1653, 318, 2027, 646, - /* 2730 */ 2029, 2030, 641, 1653, 636, 1653, 1653, 1653, 1653, 1653, - /* 2740 */ 2044, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 643, 1653, - /* 2750 */ 1653, 1653, 1653, 1994, 1653, 642, 1653, 1653, 1653, 1653, - /* 2760 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, - /* 2770 */ 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, 1653, - /* 2780 */ 1653, 1653, 1653, 1653, 2025, 1653, 1653, 1653, 2061, 1653, - /* 2790 */ 1653, 317, 2027, 646, 2029, 2030, 641, 1653, 636, + /* 0 */ 166, 380, 1673, 604, 479, 629, 480, 1697, 142, 161, + /* 10 */ 65, 2092, 45, 43, 1585, 1804, 356, 31, 1817, 132, + /* 20 */ 377, 1806, 1434, 38, 37, 1866, 518, 44, 42, 41, + /* 30 */ 40, 39, 2015, 1515, 140, 1432, 1815, 2033, 1149, 1589, + /* 40 */ 1148, 2019, 38, 37, 610, 1459, 44, 42, 41, 40, + /* 50 */ 39, 629, 2015, 220, 2136, 38, 37, 176, 1510, 44, + /* 60 */ 42, 41, 40, 39, 18, 187, 2011, 2017, 2051, 1150, + /* 70 */ 382, 1440, 1659, 1861, 1863, 604, 643, 639, 346, 1917, + /* 80 */ 2133, 2001, 1815, 645, 45, 43, 2011, 2017, 358, 567, + /* 90 */ 1459, 269, 377, 2192, 1434, 1934, 14, 639, 339, 181, + /* 100 */ 2129, 2130, 61, 138, 2134, 1515, 140, 1432, 2198, 182, + /* 110 */ 1932, 616, 2032, 2193, 593, 1459, 2068, 1460, 736, 323, + /* 120 */ 2034, 649, 2036, 2037, 644, 642, 639, 630, 2086, 61, + /* 130 */ 1510, 92, 628, 1517, 1518, 628, 18, 478, 390, 1544, + /* 140 */ 483, 1703, 389, 1440, 1624, 1257, 671, 670, 669, 1261, + /* 150 */ 668, 1263, 1264, 667, 1266, 664, 1459, 1272, 661, 1274, + /* 160 */ 1275, 658, 655, 1490, 1500, 1934, 604, 61, 14, 1516, + /* 170 */ 1519, 266, 2129, 603, 614, 133, 602, 368, 86, 2192, + /* 180 */ 1931, 616, 176, 567, 1435, 2051, 1433, 2192, 1491, 488, + /* 190 */ 736, 480, 1697, 586, 591, 182, 1545, 140, 497, 2193, + /* 200 */ 593, 1811, 2198, 182, 1918, 1517, 1518, 2193, 593, 1438, + /* 210 */ 1439, 48, 1489, 1492, 1493, 1494, 1495, 1496, 1497, 1498, + /* 220 */ 1499, 641, 637, 1508, 1509, 1511, 1512, 1513, 1514, 2, + /* 230 */ 1300, 1301, 61, 1491, 604, 1490, 1500, 1459, 585, 1546, + /* 240 */ 122, 1516, 1519, 121, 120, 119, 118, 117, 116, 115, + /* 250 */ 114, 113, 1149, 185, 1148, 350, 1435, 100, 1433, 35, + /* 260 */ 287, 606, 180, 2129, 2130, 140, 138, 2134, 34, 375, + /* 270 */ 1539, 1540, 1541, 1542, 1543, 1547, 1548, 1549, 1550, 1808, + /* 280 */ 185, 1438, 1439, 1150, 1489, 1492, 1493, 1494, 1495, 1496, + /* 290 */ 1497, 1498, 1499, 641, 637, 1508, 1509, 1511, 1512, 1513, + /* 300 */ 1514, 2, 615, 11, 45, 43, 44, 42, 41, 40, + /* 310 */ 39, 32, 377, 1971, 1434, 1662, 587, 351, 185, 349, + /* 320 */ 348, 1551, 520, 167, 629, 1515, 522, 1432, 1769, 2033, + /* 330 */ 183, 2129, 2130, 592, 138, 2134, 122, 2192, 54, 121, + /* 340 */ 120, 119, 118, 117, 116, 115, 114, 113, 521, 495, + /* 350 */ 1510, 1927, 591, 182, 2033, 1815, 18, 2193, 593, 237, + /* 360 */ 2051, 2020, 185, 1440, 278, 279, 1217, 2197, 646, 277, + /* 370 */ 2197, 2192, 2015, 2001, 2192, 645, 45, 43, 1520, 582, + /* 380 */ 1355, 1356, 1130, 185, 377, 2051, 1434, 2196, 14, 629, + /* 390 */ 2196, 2193, 2195, 646, 2193, 2194, 1613, 1515, 2001, 1432, + /* 400 */ 645, 152, 1219, 420, 2032, 106, 2011, 2017, 2068, 683, + /* 410 */ 736, 168, 2034, 649, 2036, 2037, 644, 639, 639, 141, + /* 420 */ 1815, 1132, 1510, 1135, 1136, 1517, 1518, 1807, 487, 2032, + /* 430 */ 1458, 483, 1703, 2068, 105, 1440, 169, 2034, 649, 2036, + /* 440 */ 2037, 644, 1661, 639, 102, 579, 578, 1611, 1612, 1614, + /* 450 */ 1615, 1616, 568, 2158, 53, 1490, 1500, 1730, 1460, 628, + /* 460 */ 46, 1516, 1519, 588, 583, 576, 131, 130, 129, 128, + /* 470 */ 127, 126, 125, 124, 123, 1525, 1435, 547, 1433, 38, + /* 480 */ 37, 1459, 736, 44, 42, 41, 40, 39, 594, 2213, + /* 490 */ 545, 1462, 543, 41, 40, 39, 675, 1517, 1518, 1859, + /* 500 */ 1994, 1438, 1439, 1792, 1489, 1492, 1493, 1494, 1495, 1496, + /* 510 */ 1497, 1498, 1499, 641, 637, 1508, 1509, 1511, 1512, 1513, + /* 520 */ 1514, 2, 2197, 533, 532, 531, 556, 1490, 1500, 164, + /* 530 */ 629, 137, 527, 1516, 1519, 48, 526, 485, 1818, 1461, + /* 540 */ 86, 525, 530, 481, 132, 567, 1868, 524, 1435, 2192, + /* 550 */ 1433, 523, 1868, 344, 136, 1684, 416, 11, 369, 355, + /* 560 */ 415, 1815, 1866, 1810, 2198, 182, 164, 1440, 1866, 2193, + /* 570 */ 593, 1372, 1373, 1438, 1439, 1817, 1489, 1492, 1493, 1494, + /* 580 */ 1495, 1496, 1497, 1498, 1499, 641, 637, 1508, 1509, 1511, + /* 590 */ 1512, 1513, 1514, 2, 45, 43, 460, 1434, 629, 2001, + /* 600 */ 679, 567, 377, 1859, 1434, 2192, 73, 1371, 1374, 422, + /* 610 */ 1432, 681, 421, 615, 629, 1515, 1647, 1432, 1461, 2033, + /* 620 */ 2198, 182, 61, 592, 1491, 2193, 593, 2192, 430, 1815, + /* 630 */ 154, 153, 678, 677, 676, 151, 246, 629, 629, 674, + /* 640 */ 1510, 1683, 591, 182, 2033, 1815, 1440, 2193, 593, 329, + /* 650 */ 2051, 445, 446, 1440, 198, 197, 81, 1868, 646, 409, + /* 660 */ 613, 49, 1927, 2001, 365, 645, 45, 43, 1815, 1815, + /* 670 */ 1868, 615, 1995, 1866, 377, 2051, 1434, 459, 46, 178, + /* 680 */ 411, 407, 629, 646, 268, 2001, 1867, 1515, 2001, 1432, + /* 690 */ 645, 695, 1855, 736, 2032, 538, 496, 11, 2068, 9, + /* 700 */ 736, 168, 2034, 649, 2036, 2037, 644, 1987, 639, 414, + /* 710 */ 548, 413, 1510, 1815, 235, 1517, 1518, 567, 624, 2032, + /* 720 */ 1927, 2192, 1800, 2068, 234, 1440, 317, 2034, 649, 2036, + /* 730 */ 2037, 644, 680, 639, 412, 1859, 2198, 182, 1682, 541, + /* 740 */ 629, 2193, 593, 2159, 535, 1490, 1500, 1802, 629, 233, + /* 750 */ 14, 1516, 1519, 194, 1812, 397, 533, 532, 531, 1435, + /* 760 */ 1868, 1433, 238, 268, 137, 527, 1435, 370, 1433, 526, + /* 770 */ 589, 1815, 736, 185, 525, 530, 1866, 89, 334, 1815, + /* 780 */ 524, 551, 2001, 549, 1438, 1439, 69, 1517, 1518, 68, + /* 790 */ 83, 1438, 1439, 82, 1489, 1492, 1493, 1494, 1495, 1496, + /* 800 */ 1497, 1498, 1499, 641, 637, 1508, 1509, 1511, 1512, 1513, + /* 810 */ 1514, 2, 185, 332, 1462, 1457, 2136, 1490, 1500, 1862, + /* 820 */ 1863, 1681, 453, 1516, 1519, 467, 38, 37, 466, 221, + /* 830 */ 44, 42, 41, 40, 39, 2136, 681, 1798, 1435, 1727, + /* 840 */ 1433, 1680, 2132, 436, 171, 468, 529, 528, 438, 673, + /* 850 */ 514, 510, 506, 502, 218, 154, 153, 678, 677, 676, + /* 860 */ 151, 2131, 27, 1438, 1439, 2001, 1489, 1492, 1493, 1494, + /* 870 */ 1495, 1496, 1497, 1498, 1499, 641, 637, 1508, 1509, 1511, + /* 880 */ 1512, 1513, 1514, 2, 1462, 2001, 33, 380, 707, 705, + /* 890 */ 347, 87, 38, 37, 216, 164, 44, 42, 41, 40, + /* 900 */ 39, 1793, 426, 52, 1817, 713, 712, 711, 710, 387, + /* 910 */ 566, 709, 708, 144, 703, 702, 701, 700, 699, 698, + /* 920 */ 697, 156, 693, 692, 691, 386, 385, 688, 687, 686, + /* 930 */ 685, 684, 464, 241, 2033, 458, 457, 456, 455, 452, + /* 940 */ 451, 450, 449, 448, 444, 443, 442, 441, 331, 433, + /* 950 */ 432, 431, 739, 428, 427, 345, 165, 301, 2019, 191, + /* 960 */ 1845, 307, 215, 209, 497, 2051, 294, 214, 1679, 2015, + /* 970 */ 493, 629, 631, 646, 2093, 305, 72, 554, 2001, 71, + /* 980 */ 645, 175, 1913, 1678, 383, 563, 207, 729, 725, 721, + /* 990 */ 717, 292, 164, 190, 629, 1898, 2196, 203, 475, 473, + /* 1000 */ 470, 1817, 1815, 2011, 2017, 359, 2033, 1677, 608, 2032, + /* 1010 */ 236, 8, 2001, 2068, 639, 1582, 110, 2034, 649, 2036, + /* 1020 */ 2037, 644, 567, 639, 629, 1815, 2192, 2001, 107, 245, + /* 1030 */ 2121, 285, 1868, 1791, 61, 2118, 596, 2051, 612, 381, + /* 1040 */ 629, 2198, 182, 629, 629, 607, 2193, 593, 1866, 629, + /* 1050 */ 2001, 2001, 645, 1676, 282, 1815, 629, 626, 627, 13, + /* 1060 */ 12, 38, 37, 288, 625, 44, 42, 41, 40, 39, + /* 1070 */ 384, 1815, 522, 108, 1815, 1815, 1410, 1411, 2033, 640, + /* 1080 */ 1815, 2032, 633, 1675, 2093, 2068, 599, 1815, 109, 2034, + /* 1090 */ 649, 2036, 2037, 644, 521, 639, 683, 2001, 562, 272, + /* 1100 */ 179, 1913, 2121, 1674, 271, 1672, 371, 2117, 1671, 2051, + /* 1110 */ 1670, 696, 192, 1785, 80, 79, 419, 646, 152, 189, + /* 1120 */ 184, 1399, 2001, 240, 645, 38, 37, 2001, 2147, 44, + /* 1130 */ 42, 41, 40, 39, 1135, 1136, 1669, 330, 2033, 1668, + /* 1140 */ 405, 244, 403, 399, 395, 392, 412, 440, 226, 2001, + /* 1150 */ 1601, 224, 2001, 2032, 2001, 1558, 439, 2068, 1667, 1666, + /* 1160 */ 109, 2034, 649, 2036, 2037, 644, 1665, 639, 1664, 2051, + /* 1170 */ 143, 1405, 149, 2092, 2121, 2141, 1578, 607, 371, 2117, + /* 1180 */ 2001, 90, 2001, 2001, 645, 185, 1913, 38, 37, 1790, + /* 1190 */ 152, 44, 42, 41, 40, 39, 423, 196, 2033, 51, + /* 1200 */ 636, 3, 2001, 2001, 146, 228, 134, 1770, 227, 424, + /* 1210 */ 2001, 230, 2001, 2032, 229, 63, 63, 2068, 1578, 2019, + /* 1220 */ 109, 2034, 649, 2036, 2037, 644, 250, 639, 232, 2051, + /* 1230 */ 2015, 231, 179, 1443, 2121, 1717, 1710, 646, 371, 2117, + /* 1240 */ 1656, 1657, 2001, 1408, 645, 1708, 2022, 2033, 38, 37, + /* 1250 */ 152, 47, 44, 42, 41, 40, 39, 534, 536, 1581, + /* 1260 */ 2148, 595, 597, 2161, 2011, 2017, 372, 539, 1610, 1609, + /* 1270 */ 275, 70, 150, 2032, 152, 639, 1442, 2068, 2051, 252, + /* 1280 */ 109, 2034, 649, 2036, 2037, 644, 646, 639, 13, 12, + /* 1290 */ 1704, 2001, 2212, 645, 2121, 2024, 63, 681, 371, 2117, + /* 1300 */ 263, 47, 47, 611, 1369, 580, 653, 2033, 219, 2155, + /* 1310 */ 150, 152, 135, 689, 600, 150, 154, 153, 678, 677, + /* 1320 */ 676, 151, 2032, 280, 621, 284, 2068, 1250, 690, 109, + /* 1330 */ 2034, 649, 2036, 2037, 644, 1198, 639, 1179, 2051, 731, + /* 1340 */ 257, 2212, 2052, 2121, 163, 1536, 646, 371, 2117, 1552, + /* 1350 */ 1196, 2001, 1698, 645, 1501, 300, 388, 1856, 2168, 1278, + /* 1360 */ 1922, 605, 2151, 1282, 1289, 1287, 2033, 265, 155, 262, + /* 1370 */ 1, 4, 396, 1180, 391, 343, 1392, 295, 195, 425, + /* 1380 */ 1462, 1923, 2032, 429, 1446, 462, 2068, 434, 1457, 109, + /* 1390 */ 2034, 649, 2036, 2037, 644, 447, 639, 2051, 1915, 454, + /* 1400 */ 461, 2212, 463, 2121, 469, 646, 471, 371, 2117, 472, + /* 1410 */ 2001, 200, 645, 477, 474, 476, 1654, 1463, 574, 486, + /* 1420 */ 1465, 1460, 489, 206, 490, 2033, 208, 1445, 1464, 1466, + /* 1430 */ 491, 492, 211, 494, 1152, 498, 213, 84, 1977, 517, + /* 1440 */ 85, 2032, 217, 515, 516, 2068, 519, 1805, 109, 2034, + /* 1450 */ 649, 2036, 2037, 644, 112, 639, 2051, 333, 553, 555, + /* 1460 */ 2212, 223, 2121, 1976, 646, 1801, 371, 2117, 88, 2001, + /* 1470 */ 225, 645, 157, 148, 158, 1803, 1799, 2186, 159, 558, + /* 1480 */ 160, 239, 374, 373, 242, 2033, 557, 564, 581, 2152, + /* 1490 */ 2167, 2143, 1448, 619, 2162, 571, 561, 7, 577, 296, + /* 1500 */ 2032, 2166, 360, 1515, 2068, 1441, 584, 109, 2034, 649, + /* 1510 */ 2036, 2037, 644, 1653, 639, 248, 2051, 2033, 590, 2212, + /* 1520 */ 251, 2121, 256, 572, 646, 371, 2117, 570, 1510, 2001, + /* 1530 */ 258, 645, 569, 361, 2215, 601, 2140, 1578, 598, 2191, + /* 1540 */ 261, 1440, 1461, 139, 609, 2033, 2137, 270, 2051, 172, + /* 1550 */ 364, 95, 1467, 1928, 297, 617, 646, 298, 618, 1942, + /* 1560 */ 2032, 2001, 1941, 645, 2068, 1940, 367, 109, 2034, 649, + /* 1570 */ 2036, 2037, 644, 259, 639, 260, 2051, 622, 299, 2096, + /* 1580 */ 623, 2121, 264, 1816, 646, 371, 2117, 97, 635, 2001, + /* 1590 */ 99, 645, 2032, 60, 101, 651, 2068, 1860, 2102, 109, + /* 1600 */ 2034, 649, 2036, 2037, 644, 1786, 639, 732, 291, 302, + /* 1610 */ 733, 2094, 735, 2121, 50, 335, 336, 371, 2117, 311, + /* 1620 */ 2032, 326, 304, 306, 2068, 1993, 2033, 109, 2034, 649, + /* 1630 */ 2036, 2037, 644, 325, 639, 1992, 315, 1991, 77, 632, + /* 1640 */ 1988, 2121, 393, 394, 1425, 371, 2117, 1426, 188, 398, + /* 1650 */ 1986, 400, 401, 402, 1449, 1985, 1444, 2051, 404, 1984, + /* 1660 */ 1983, 406, 1982, 408, 410, 646, 78, 1395, 1394, 1954, + /* 1670 */ 2001, 1953, 645, 1952, 417, 2033, 1951, 1950, 418, 1452, + /* 1680 */ 1454, 1346, 1906, 1905, 1903, 145, 1902, 1901, 1904, 1900, + /* 1690 */ 1899, 1897, 637, 1508, 1509, 1511, 1512, 1513, 1514, 1896, + /* 1700 */ 1895, 2032, 193, 435, 1894, 2068, 2051, 437, 110, 2034, + /* 1710 */ 649, 2036, 2037, 644, 646, 639, 1908, 1893, 1892, 2001, + /* 1720 */ 1891, 645, 2121, 1890, 2033, 1889, 2120, 2117, 1888, 1887, + /* 1730 */ 1886, 1885, 1884, 1883, 1882, 1881, 1880, 1879, 147, 1878, + /* 1740 */ 1877, 1876, 1907, 1875, 1874, 1873, 1348, 1872, 1871, 1870, + /* 1750 */ 2032, 465, 1869, 1733, 2068, 2051, 199, 110, 2034, 649, + /* 1760 */ 2036, 2037, 644, 646, 639, 1732, 201, 1731, 2001, 202, + /* 1770 */ 645, 2121, 1729, 2033, 1693, 634, 2117, 1138, 1137, 1692, + /* 1780 */ 204, 1225, 1967, 1961, 1949, 212, 1948, 1926, 1794, 75, + /* 1790 */ 1728, 1172, 2033, 1726, 1724, 177, 205, 499, 76, 647, + /* 1800 */ 210, 2021, 482, 2068, 2051, 484, 110, 2034, 649, 2036, + /* 1810 */ 2037, 644, 646, 639, 500, 501, 503, 2001, 504, 645, + /* 1820 */ 2121, 1722, 1720, 2051, 338, 2117, 508, 507, 366, 1707, + /* 1830 */ 505, 646, 511, 512, 509, 513, 2001, 1706, 645, 1689, + /* 1840 */ 1796, 2033, 1294, 1795, 1216, 1293, 1215, 1214, 2032, 1213, + /* 1850 */ 704, 1210, 2068, 1209, 706, 169, 2034, 649, 2036, 2037, + /* 1860 */ 644, 2033, 639, 1208, 1718, 62, 1207, 2032, 352, 1711, + /* 1870 */ 353, 2068, 2051, 1709, 324, 2034, 649, 2036, 2037, 644, + /* 1880 */ 643, 639, 354, 222, 537, 2001, 540, 645, 1688, 542, + /* 1890 */ 1687, 544, 2051, 1686, 546, 111, 1415, 376, 1414, 550, + /* 1900 */ 646, 1417, 1966, 1401, 26, 2001, 1960, 645, 2214, 66, + /* 1910 */ 1947, 559, 1945, 28, 162, 19, 2032, 16, 2033, 575, + /* 1920 */ 2068, 1626, 55, 323, 2034, 649, 2036, 2037, 644, 2197, + /* 1930 */ 639, 247, 2087, 560, 2033, 573, 2032, 64, 357, 249, + /* 1940 */ 2068, 5, 243, 324, 2034, 649, 2036, 2037, 644, 2051, + /* 1950 */ 639, 58, 2033, 59, 378, 1608, 1600, 646, 254, 30, + /* 1960 */ 255, 6, 2001, 170, 645, 2051, 253, 2022, 21, 267, + /* 1970 */ 29, 565, 91, 646, 1646, 1647, 1641, 1640, 2001, 362, + /* 1980 */ 645, 1645, 1644, 2051, 363, 173, 1946, 57, 1575, 1574, + /* 1990 */ 1944, 646, 1943, 2032, 1925, 93, 2001, 2068, 645, 94, + /* 2000 */ 324, 2034, 649, 2036, 2037, 644, 273, 639, 274, 552, + /* 2010 */ 1924, 2033, 22, 2068, 1606, 276, 319, 2034, 649, 2036, + /* 2020 */ 2037, 644, 56, 639, 281, 620, 67, 2032, 2033, 98, + /* 2030 */ 96, 2068, 283, 102, 308, 2034, 649, 2036, 2037, 644, + /* 2040 */ 286, 639, 2051, 12, 23, 2033, 1450, 10, 2071, 1527, + /* 2050 */ 646, 20, 17, 1537, 1505, 2001, 1526, 645, 638, 2051, + /* 2060 */ 1503, 36, 174, 1502, 15, 24, 186, 646, 1474, 1482, + /* 2070 */ 1279, 25, 2001, 652, 645, 379, 2051, 650, 654, 656, + /* 2080 */ 1276, 657, 1256, 659, 646, 1273, 2032, 662, 665, 2001, + /* 2090 */ 2068, 645, 660, 309, 2034, 649, 2036, 2037, 644, 1267, + /* 2100 */ 639, 663, 2033, 2032, 1265, 648, 289, 2068, 666, 1271, + /* 2110 */ 310, 2034, 649, 2036, 2037, 644, 672, 639, 1270, 103, + /* 2120 */ 2032, 1269, 104, 1268, 2068, 1288, 74, 316, 2034, 649, + /* 2130 */ 2036, 2037, 644, 2051, 639, 1284, 2033, 1170, 682, 1204, + /* 2140 */ 1203, 646, 1202, 1201, 1200, 1199, 2001, 1197, 645, 1195, + /* 2150 */ 1194, 1193, 1223, 1191, 694, 290, 1190, 1189, 1188, 1187, + /* 2160 */ 1186, 1185, 1220, 2033, 1218, 1182, 1181, 2051, 1178, 1177, + /* 2170 */ 1176, 1725, 1175, 714, 716, 646, 715, 2032, 1723, 718, + /* 2180 */ 2001, 2068, 645, 1721, 320, 2034, 649, 2036, 2037, 644, + /* 2190 */ 719, 639, 720, 2033, 2051, 722, 724, 1719, 723, 726, + /* 2200 */ 727, 728, 646, 1705, 730, 1127, 1685, 2001, 293, 645, + /* 2210 */ 734, 2032, 2033, 1436, 303, 2068, 737, 1660, 312, 2034, + /* 2220 */ 649, 2036, 2037, 644, 2051, 639, 1660, 738, 1660, 1660, + /* 2230 */ 1660, 1660, 646, 1660, 1660, 1660, 1660, 2001, 2032, 645, + /* 2240 */ 1660, 1660, 2068, 2051, 1660, 321, 2034, 649, 2036, 2037, + /* 2250 */ 644, 646, 639, 1660, 1660, 1660, 2001, 1660, 645, 1660, + /* 2260 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 2032, 1660, + /* 2270 */ 1660, 1660, 2068, 1660, 1660, 313, 2034, 649, 2036, 2037, + /* 2280 */ 644, 2033, 639, 1660, 1660, 1660, 1660, 2032, 1660, 1660, + /* 2290 */ 1660, 2068, 1660, 1660, 322, 2034, 649, 2036, 2037, 644, + /* 2300 */ 1660, 639, 1660, 1660, 1660, 2033, 1660, 1660, 1660, 1660, + /* 2310 */ 1660, 1660, 2051, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2320 */ 646, 1660, 1660, 1660, 1660, 2001, 1660, 645, 1660, 1660, + /* 2330 */ 2033, 1660, 1660, 1660, 1660, 1660, 2051, 1660, 1660, 1660, + /* 2340 */ 1660, 1660, 1660, 1660, 646, 1660, 1660, 1660, 1660, 2001, + /* 2350 */ 1660, 645, 1660, 1660, 1660, 1660, 2032, 1660, 1660, 1660, + /* 2360 */ 2068, 2051, 1660, 314, 2034, 649, 2036, 2037, 644, 646, + /* 2370 */ 639, 1660, 1660, 1660, 2001, 1660, 645, 1660, 1660, 1660, + /* 2380 */ 2032, 1660, 1660, 1660, 2068, 1660, 1660, 327, 2034, 649, + /* 2390 */ 2036, 2037, 644, 1660, 639, 1660, 1660, 1660, 1660, 2033, + /* 2400 */ 1660, 1660, 1660, 1660, 1660, 2032, 1660, 1660, 1660, 2068, + /* 2410 */ 1660, 1660, 328, 2034, 649, 2036, 2037, 644, 2033, 639, + /* 2420 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2430 */ 2051, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 646, 1660, + /* 2440 */ 1660, 1660, 1660, 2001, 1660, 645, 1660, 1660, 1660, 2051, + /* 2450 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 646, 1660, 1660, + /* 2460 */ 1660, 1660, 2001, 1660, 645, 1660, 1660, 1660, 1660, 1660, + /* 2470 */ 1660, 1660, 1660, 1660, 2032, 1660, 1660, 1660, 2068, 1660, + /* 2480 */ 2033, 2045, 2034, 649, 2036, 2037, 644, 1660, 639, 1660, + /* 2490 */ 1660, 1660, 1660, 2032, 1660, 1660, 1660, 2068, 1660, 2033, + /* 2500 */ 2044, 2034, 649, 2036, 2037, 644, 1660, 639, 1660, 1660, + /* 2510 */ 1660, 2051, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 646, + /* 2520 */ 1660, 1660, 1660, 1660, 2001, 1660, 645, 1660, 1660, 1660, + /* 2530 */ 2051, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 646, 1660, + /* 2540 */ 1660, 1660, 1660, 2001, 1660, 645, 1660, 1660, 1660, 1660, + /* 2550 */ 1660, 1660, 1660, 1660, 1660, 2032, 2033, 1660, 1660, 2068, + /* 2560 */ 1660, 1660, 2043, 2034, 649, 2036, 2037, 644, 1660, 639, + /* 2570 */ 1660, 1660, 1660, 1660, 2032, 2033, 1660, 1660, 2068, 1660, + /* 2580 */ 1660, 340, 2034, 649, 2036, 2037, 644, 2051, 639, 1660, + /* 2590 */ 1660, 1660, 1660, 1660, 1660, 646, 1660, 1660, 1660, 1660, + /* 2600 */ 2001, 1660, 645, 1660, 1660, 1660, 2051, 1660, 1660, 1660, + /* 2610 */ 1660, 1660, 1660, 1660, 646, 1660, 1660, 1660, 1660, 2001, + /* 2620 */ 1660, 645, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2630 */ 1660, 2032, 1660, 1660, 1660, 2068, 1660, 2033, 341, 2034, + /* 2640 */ 649, 2036, 2037, 644, 1660, 639, 1660, 1660, 1660, 1660, + /* 2650 */ 2032, 1660, 1660, 1660, 2068, 1660, 1660, 337, 2034, 649, + /* 2660 */ 2036, 2037, 644, 1660, 639, 1660, 1660, 1660, 2051, 1660, + /* 2670 */ 1660, 1660, 1660, 1660, 1660, 1660, 646, 1660, 1660, 1660, + /* 2680 */ 1660, 2001, 1660, 645, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2690 */ 1660, 1660, 1660, 1660, 1660, 1660, 2033, 1660, 1660, 1660, + /* 2700 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2710 */ 1660, 1660, 2032, 1660, 1660, 1660, 2068, 1660, 1660, 342, + /* 2720 */ 2034, 649, 2036, 2037, 644, 1660, 639, 2051, 1660, 1660, + /* 2730 */ 1660, 1660, 1660, 1660, 1660, 646, 1660, 1660, 1660, 1660, + /* 2740 */ 2001, 1660, 645, 1660, 1660, 2033, 1660, 1660, 1660, 1660, + /* 2750 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2760 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2770 */ 1660, 647, 1660, 1660, 1660, 2068, 2051, 1660, 319, 2034, + /* 2780 */ 649, 2036, 2037, 644, 646, 639, 1660, 1660, 1660, 2001, + /* 2790 */ 1660, 645, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2800 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2810 */ 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, 1660, + /* 2820 */ 2032, 1660, 1660, 1660, 2068, 1660, 1660, 318, 2034, 649, + /* 2830 */ 2036, 2037, 644, 1660, 639, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 328, 352, 330, 337, 333, 337, 335, 336, 421, 360, - /* 10 */ 4, 424, 12, 13, 14, 361, 367, 2, 369, 351, - /* 20 */ 20, 362, 22, 8, 9, 376, 358, 12, 13, 14, - /* 30 */ 15, 16, 373, 33, 368, 35, 368, 329, 20, 20, - /* 40 */ 22, 362, 8, 9, 392, 20, 12, 13, 14, 15, - /* 50 */ 16, 337, 373, 35, 410, 8, 9, 360, 58, 12, - /* 60 */ 13, 14, 15, 16, 64, 351, 407, 408, 360, 51, - /* 70 */ 371, 71, 326, 374, 375, 337, 368, 418, 381, 382, - /* 80 */ 436, 373, 368, 375, 12, 13, 407, 408, 409, 437, - /* 90 */ 20, 58, 20, 441, 22, 375, 96, 418, 64, 433, - /* 100 */ 434, 435, 96, 437, 438, 33, 368, 35, 456, 457, - /* 110 */ 390, 391, 404, 461, 462, 96, 408, 63, 118, 411, - /* 120 */ 412, 413, 414, 415, 416, 417, 418, 419, 420, 96, - /* 130 */ 58, 98, 3, 133, 134, 20, 64, 334, 392, 105, - /* 140 */ 337, 338, 396, 71, 97, 109, 110, 111, 112, 113, - /* 150 */ 114, 115, 116, 117, 118, 119, 360, 121, 122, 123, - /* 160 */ 124, 125, 126, 163, 164, 375, 96, 20, 96, 169, - /* 170 */ 170, 433, 434, 435, 343, 437, 438, 387, 382, 441, - /* 180 */ 390, 391, 63, 437, 184, 360, 186, 441, 357, 333, - /* 190 */ 118, 335, 336, 368, 456, 457, 162, 366, 96, 461, - /* 200 */ 462, 35, 456, 457, 96, 133, 134, 461, 462, 209, + /* 0 */ 330, 354, 332, 339, 335, 339, 337, 338, 423, 362, + /* 10 */ 4, 426, 12, 13, 14, 363, 369, 2, 371, 353, + /* 20 */ 20, 364, 22, 8, 9, 378, 360, 12, 13, 14, + /* 30 */ 15, 16, 375, 33, 370, 35, 370, 331, 20, 14, + /* 40 */ 22, 364, 8, 9, 394, 20, 12, 13, 14, 15, + /* 50 */ 16, 339, 375, 35, 412, 8, 9, 362, 58, 12, + /* 60 */ 13, 14, 15, 16, 64, 353, 409, 410, 362, 51, + /* 70 */ 373, 71, 328, 376, 377, 339, 370, 420, 383, 384, + /* 80 */ 438, 375, 370, 377, 12, 13, 409, 410, 411, 439, + /* 90 */ 20, 58, 20, 443, 22, 377, 96, 420, 64, 435, + /* 100 */ 436, 437, 96, 439, 440, 33, 370, 35, 458, 459, + /* 110 */ 392, 393, 406, 463, 464, 20, 410, 20, 118, 413, + /* 120 */ 414, 415, 416, 417, 418, 419, 420, 421, 422, 96, + /* 130 */ 58, 98, 20, 133, 134, 20, 64, 336, 394, 105, + /* 140 */ 339, 340, 398, 71, 97, 109, 110, 111, 112, 113, + /* 150 */ 114, 115, 116, 117, 118, 119, 20, 121, 122, 123, + /* 160 */ 124, 125, 126, 163, 164, 377, 339, 96, 96, 169, + /* 170 */ 170, 435, 436, 437, 20, 439, 440, 389, 345, 443, + /* 180 */ 392, 393, 362, 439, 184, 362, 186, 443, 163, 335, + /* 190 */ 118, 337, 338, 370, 458, 459, 162, 370, 63, 463, + /* 200 */ 464, 368, 458, 459, 384, 133, 134, 463, 464, 209, /* 210 */ 210, 96, 212, 213, 214, 215, 216, 217, 218, 219, /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - /* 230 */ 12, 13, 14, 15, 16, 163, 164, 71, 413, 107, + /* 230 */ 133, 134, 96, 163, 339, 163, 164, 20, 415, 162, /* 240 */ 21, 169, 170, 24, 25, 26, 27, 28, 29, 30, - /* 250 */ 31, 32, 20, 247, 22, 128, 184, 20, 186, 8, - /* 260 */ 9, 20, 337, 12, 13, 14, 15, 16, 234, 235, - /* 270 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 337, + /* 250 */ 31, 32, 20, 247, 22, 37, 184, 343, 186, 428, + /* 260 */ 429, 434, 435, 436, 437, 370, 439, 440, 234, 235, + /* 270 */ 236, 237, 238, 239, 240, 241, 242, 243, 244, 365, /* 280 */ 247, 209, 210, 51, 212, 213, 214, 215, 216, 217, /* 290 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - /* 300 */ 228, 229, 377, 231, 12, 13, 19, 337, 33, 0, - /* 310 */ 163, 164, 20, 127, 22, 179, 209, 247, 191, 192, - /* 320 */ 33, 20, 195, 48, 197, 33, 384, 35, 386, 54, - /* 330 */ 55, 56, 57, 58, 337, 48, 200, 201, 368, 0, - /* 340 */ 14, 54, 55, 56, 57, 58, 20, 392, 20, 247, - /* 350 */ 58, 396, 4, 8, 9, 247, 64, 12, 13, 14, - /* 360 */ 15, 16, 247, 71, 392, 258, 259, 260, 261, 262, - /* 370 */ 95, 0, 63, 98, 133, 134, 12, 13, 14, 193, - /* 380 */ 194, 384, 95, 386, 20, 98, 22, 370, 96, 44, - /* 390 */ 373, 43, 437, 45, 46, 266, 441, 33, 410, 35, - /* 400 */ 337, 337, 432, 433, 434, 435, 329, 437, 438, 437, - /* 410 */ 118, 456, 457, 441, 351, 351, 461, 462, 131, 437, - /* 420 */ 360, 358, 58, 441, 436, 133, 134, 176, 456, 457, - /* 430 */ 329, 368, 368, 461, 462, 71, 376, 360, 0, 457, - /* 440 */ 168, 166, 167, 461, 462, 368, 171, 108, 14, 174, - /* 450 */ 373, 35, 375, 166, 20, 163, 164, 360, 171, 437, - /* 460 */ 96, 169, 170, 441, 367, 190, 127, 128, 129, 130, - /* 470 */ 131, 132, 337, 376, 373, 188, 184, 190, 186, 457, - /* 480 */ 20, 404, 118, 461, 462, 408, 351, 71, 411, 412, - /* 490 */ 413, 414, 415, 416, 44, 418, 334, 133, 134, 337, - /* 500 */ 338, 209, 210, 368, 212, 213, 214, 215, 216, 217, + /* 300 */ 228, 229, 339, 231, 12, 13, 12, 13, 14, 15, + /* 310 */ 16, 234, 20, 358, 22, 0, 20, 99, 247, 101, + /* 320 */ 102, 244, 104, 346, 339, 33, 108, 35, 351, 331, + /* 330 */ 435, 436, 437, 439, 439, 440, 21, 443, 353, 24, + /* 340 */ 25, 26, 27, 28, 29, 30, 31, 32, 130, 386, + /* 350 */ 58, 388, 458, 459, 331, 370, 64, 463, 464, 404, + /* 360 */ 362, 364, 247, 71, 127, 128, 35, 439, 370, 132, + /* 370 */ 439, 443, 375, 375, 443, 377, 12, 13, 14, 168, + /* 380 */ 163, 164, 4, 247, 20, 362, 22, 459, 96, 339, + /* 390 */ 459, 463, 464, 370, 463, 464, 209, 33, 375, 35, + /* 400 */ 377, 44, 71, 353, 406, 343, 409, 410, 410, 63, + /* 410 */ 118, 413, 414, 415, 416, 417, 418, 420, 420, 357, + /* 420 */ 370, 43, 58, 45, 46, 133, 134, 365, 336, 406, + /* 430 */ 20, 339, 340, 410, 96, 71, 413, 414, 415, 416, + /* 440 */ 417, 418, 0, 420, 106, 258, 259, 260, 261, 262, + /* 450 */ 263, 264, 454, 455, 97, 163, 164, 0, 20, 20, + /* 460 */ 96, 169, 170, 252, 253, 254, 24, 25, 26, 27, + /* 470 */ 28, 29, 30, 31, 32, 14, 184, 21, 186, 8, + /* 480 */ 9, 20, 118, 12, 13, 14, 15, 16, 465, 466, + /* 490 */ 34, 20, 36, 14, 15, 16, 372, 133, 134, 375, + /* 500 */ 394, 209, 210, 0, 212, 213, 214, 215, 216, 217, /* 510 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - /* 520 */ 228, 229, 271, 152, 252, 253, 254, 163, 164, 452, - /* 530 */ 453, 0, 161, 169, 170, 426, 427, 8, 9, 231, - /* 540 */ 337, 12, 13, 14, 15, 16, 108, 97, 184, 20, - /* 550 */ 186, 359, 21, 0, 351, 24, 25, 26, 27, 28, - /* 560 */ 29, 30, 31, 32, 372, 127, 128, 129, 130, 131, - /* 570 */ 132, 368, 329, 209, 210, 20, 212, 213, 214, 215, + /* 520 */ 228, 229, 3, 66, 67, 68, 107, 163, 164, 362, + /* 530 */ 339, 74, 75, 169, 170, 96, 79, 14, 371, 20, + /* 540 */ 345, 84, 85, 20, 353, 439, 362, 90, 184, 443, + /* 550 */ 186, 360, 362, 369, 359, 331, 394, 231, 354, 369, + /* 560 */ 398, 370, 378, 368, 458, 459, 362, 71, 378, 463, + /* 570 */ 464, 133, 134, 209, 210, 371, 212, 213, 214, 215, /* 580 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 590 */ 226, 227, 228, 229, 12, 13, 58, 163, 337, 343, - /* 600 */ 392, 71, 20, 360, 22, 71, 437, 360, 344, 107, - /* 610 */ 441, 368, 351, 349, 367, 33, 373, 35, 375, 66, - /* 620 */ 67, 68, 366, 376, 3, 456, 457, 74, 75, 368, - /* 630 */ 461, 462, 79, 95, 410, 362, 98, 84, 85, 362, - /* 640 */ 58, 20, 329, 90, 329, 437, 373, 404, 337, 441, - /* 650 */ 373, 408, 368, 71, 411, 412, 413, 414, 415, 416, - /* 660 */ 436, 418, 351, 379, 456, 457, 12, 13, 425, 461, - /* 670 */ 462, 341, 429, 430, 20, 360, 22, 0, 96, 368, - /* 680 */ 407, 408, 409, 368, 407, 408, 373, 33, 373, 35, - /* 690 */ 375, 418, 337, 363, 165, 418, 14, 15, 16, 341, - /* 700 */ 118, 24, 25, 26, 27, 28, 29, 30, 31, 32, - /* 710 */ 165, 162, 58, 355, 0, 133, 134, 172, 97, 404, - /* 720 */ 165, 363, 96, 408, 337, 71, 411, 412, 413, 414, - /* 730 */ 415, 416, 106, 418, 21, 66, 67, 68, 351, 384, - /* 740 */ 361, 386, 337, 74, 75, 163, 164, 34, 79, 36, - /* 750 */ 96, 169, 170, 84, 85, 368, 351, 8, 9, 90, - /* 760 */ 360, 12, 13, 14, 15, 16, 184, 367, 186, 1, - /* 770 */ 2, 368, 118, 368, 360, 329, 376, 63, 463, 464, - /* 780 */ 360, 367, 379, 234, 20, 329, 165, 133, 134, 369, - /* 790 */ 376, 209, 210, 244, 212, 213, 214, 215, 216, 217, + /* 590 */ 226, 227, 228, 229, 12, 13, 80, 22, 339, 375, + /* 600 */ 372, 439, 20, 375, 22, 443, 107, 169, 170, 339, + /* 610 */ 35, 108, 353, 339, 339, 33, 97, 35, 20, 331, + /* 620 */ 458, 459, 96, 439, 163, 463, 464, 443, 353, 370, + /* 630 */ 127, 128, 129, 130, 131, 132, 165, 339, 339, 107, + /* 640 */ 58, 331, 458, 459, 331, 370, 71, 463, 464, 379, + /* 650 */ 362, 353, 353, 71, 138, 139, 157, 362, 370, 179, + /* 660 */ 386, 96, 388, 375, 369, 377, 12, 13, 370, 370, + /* 670 */ 362, 339, 394, 378, 20, 362, 22, 161, 96, 361, + /* 680 */ 200, 201, 339, 370, 165, 375, 378, 33, 375, 35, + /* 690 */ 377, 71, 374, 118, 406, 4, 353, 231, 410, 233, + /* 700 */ 118, 413, 414, 415, 416, 417, 418, 0, 420, 183, + /* 710 */ 19, 185, 58, 370, 128, 133, 134, 439, 386, 406, + /* 720 */ 388, 443, 363, 410, 33, 71, 413, 414, 415, 416, + /* 730 */ 417, 418, 372, 420, 208, 375, 458, 459, 331, 48, + /* 740 */ 339, 463, 464, 455, 53, 163, 164, 363, 339, 58, + /* 750 */ 96, 169, 170, 58, 353, 48, 66, 67, 68, 184, + /* 760 */ 362, 186, 353, 165, 74, 75, 184, 369, 186, 79, + /* 770 */ 457, 370, 118, 247, 84, 85, 378, 191, 192, 370, + /* 780 */ 90, 195, 375, 197, 209, 210, 95, 133, 134, 98, + /* 790 */ 95, 209, 210, 98, 212, 213, 214, 215, 216, 217, /* 800 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - /* 810 */ 228, 229, 361, 18, 329, 20, 329, 163, 164, 373, - /* 820 */ 2, 337, 27, 169, 170, 30, 8, 9, 33, 373, - /* 830 */ 12, 13, 14, 15, 16, 351, 4, 437, 184, 0, - /* 840 */ 186, 441, 352, 48, 361, 50, 97, 14, 53, 231, - /* 850 */ 360, 233, 368, 20, 356, 329, 456, 457, 373, 369, - /* 860 */ 373, 461, 462, 209, 210, 97, 212, 213, 214, 215, + /* 810 */ 228, 229, 247, 18, 20, 20, 412, 163, 164, 376, + /* 820 */ 377, 331, 27, 169, 170, 30, 8, 9, 33, 33, + /* 830 */ 12, 13, 14, 15, 16, 412, 108, 363, 184, 0, + /* 840 */ 186, 331, 438, 48, 48, 50, 348, 349, 53, 363, + /* 850 */ 54, 55, 56, 57, 58, 127, 128, 129, 130, 131, + /* 860 */ 132, 438, 44, 209, 210, 375, 212, 213, 214, 215, /* 870 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 880 */ 226, 227, 228, 229, 127, 128, 361, 8, 9, 132, - /* 890 */ 95, 12, 13, 14, 15, 16, 361, 133, 134, 373, - /* 900 */ 402, 37, 107, 346, 347, 66, 67, 68, 69, 70, - /* 910 */ 397, 72, 73, 74, 75, 76, 77, 78, 79, 80, + /* 880 */ 226, 227, 228, 229, 20, 375, 2, 354, 348, 349, + /* 890 */ 95, 95, 8, 9, 98, 362, 12, 13, 14, 15, + /* 900 */ 16, 0, 107, 165, 371, 66, 67, 68, 69, 70, + /* 910 */ 172, 72, 73, 74, 75, 76, 77, 78, 79, 80, /* 920 */ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - /* 930 */ 91, 92, 137, 169, 170, 140, 141, 142, 143, 144, + /* 930 */ 91, 92, 137, 363, 331, 140, 141, 142, 143, 144, /* 940 */ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - /* 950 */ 155, 156, 20, 158, 159, 160, 18, 370, 392, 337, - /* 960 */ 373, 23, 329, 99, 22, 101, 102, 360, 104, 422, - /* 970 */ 329, 424, 108, 351, 367, 37, 38, 35, 44, 41, - /* 980 */ 329, 8, 9, 376, 39, 12, 13, 14, 15, 16, - /* 990 */ 368, 374, 375, 330, 130, 329, 163, 59, 60, 61, - /* 1000 */ 62, 360, 370, 437, 329, 373, 373, 441, 361, 368, - /* 1010 */ 337, 346, 347, 71, 373, 337, 375, 353, 329, 329, - /* 1020 */ 356, 329, 456, 457, 373, 329, 368, 461, 462, 351, - /* 1030 */ 329, 329, 349, 329, 96, 360, 80, 379, 329, 373, - /* 1040 */ 20, 368, 96, 368, 165, 404, 368, 337, 373, 408, - /* 1050 */ 375, 20, 411, 412, 413, 414, 415, 416, 329, 418, - /* 1060 */ 118, 351, 373, 373, 423, 373, 425, 44, 352, 373, - /* 1070 */ 429, 430, 107, 135, 373, 373, 360, 373, 368, 404, - /* 1080 */ 248, 329, 373, 408, 443, 369, 411, 412, 413, 414, - /* 1090 */ 415, 416, 451, 418, 138, 139, 421, 165, 423, 424, - /* 1100 */ 425, 422, 373, 424, 429, 430, 433, 434, 435, 383, - /* 1110 */ 437, 438, 360, 465, 176, 177, 178, 161, 44, 181, - /* 1120 */ 368, 348, 157, 350, 337, 373, 184, 375, 186, 183, - /* 1130 */ 329, 185, 45, 46, 42, 108, 44, 199, 351, 0, - /* 1140 */ 202, 35, 204, 205, 206, 207, 208, 454, 337, 245, - /* 1150 */ 246, 209, 210, 329, 208, 368, 404, 130, 337, 337, - /* 1160 */ 408, 360, 351, 411, 412, 413, 414, 415, 416, 368, - /* 1170 */ 418, 97, 351, 351, 373, 423, 375, 425, 352, 368, - /* 1180 */ 337, 429, 430, 163, 360, 247, 360, 48, 22, 368, - /* 1190 */ 368, 246, 368, 247, 351, 369, 165, 373, 42, 375, - /* 1200 */ 44, 35, 268, 451, 100, 404, 339, 103, 44, 408, - /* 1210 */ 47, 368, 411, 412, 413, 414, 415, 416, 100, 418, - /* 1220 */ 100, 103, 100, 103, 423, 103, 425, 44, 404, 64, - /* 1230 */ 429, 430, 408, 0, 0, 411, 412, 413, 414, 415, - /* 1240 */ 416, 440, 418, 329, 337, 0, 58, 423, 35, 425, - /* 1250 */ 12, 13, 448, 429, 430, 22, 22, 360, 351, 96, - /* 1260 */ 22, 97, 44, 44, 440, 0, 329, 22, 133, 134, - /* 1270 */ 44, 33, 339, 35, 360, 368, 1, 2, 383, 108, - /* 1280 */ 97, 372, 368, 44, 336, 44, 98, 373, 383, 375, - /* 1290 */ 439, 13, 186, 270, 44, 458, 58, 360, 127, 128, - /* 1300 */ 129, 130, 131, 132, 44, 368, 44, 431, 442, 71, - /* 1310 */ 373, 44, 375, 35, 49, 97, 97, 249, 404, 406, - /* 1320 */ 48, 405, 408, 97, 13, 411, 412, 413, 414, 415, - /* 1330 */ 416, 44, 418, 182, 329, 394, 97, 423, 97, 425, - /* 1340 */ 380, 404, 44, 429, 430, 408, 35, 97, 411, 412, - /* 1350 */ 413, 414, 415, 416, 440, 418, 118, 97, 42, 97, - /* 1360 */ 423, 4, 425, 20, 97, 360, 429, 430, 383, 380, - /* 1370 */ 162, 378, 20, 368, 209, 337, 19, 440, 373, 44, - /* 1380 */ 375, 337, 380, 44, 97, 378, 378, 337, 44, 44, - /* 1390 */ 33, 94, 345, 337, 329, 97, 337, 337, 20, 186, - /* 1400 */ 331, 331, 20, 399, 343, 48, 20, 375, 20, 404, - /* 1410 */ 53, 338, 20, 408, 343, 58, 411, 412, 413, 414, - /* 1420 */ 415, 416, 184, 418, 186, 360, 393, 343, 423, 338, - /* 1430 */ 425, 343, 97, 368, 429, 430, 97, 343, 373, 343, - /* 1440 */ 375, 97, 97, 343, 337, 440, 52, 209, 210, 340, - /* 1450 */ 340, 373, 95, 360, 331, 98, 337, 360, 360, 360, - /* 1460 */ 222, 223, 224, 225, 226, 227, 228, 329, 360, 404, - /* 1470 */ 403, 360, 360, 408, 360, 360, 411, 412, 413, 414, - /* 1480 */ 415, 416, 198, 418, 360, 360, 331, 96, 423, 373, - /* 1490 */ 425, 329, 189, 341, 429, 430, 401, 337, 360, 341, - /* 1500 */ 399, 398, 375, 373, 383, 257, 368, 256, 450, 383, - /* 1510 */ 447, 373, 263, 375, 373, 373, 388, 388, 373, 447, - /* 1520 */ 265, 175, 360, 447, 449, 446, 445, 264, 272, 250, - /* 1530 */ 368, 267, 466, 444, 246, 373, 459, 375, 406, 269, - /* 1540 */ 460, 368, 404, 20, 410, 338, 408, 337, 20, 411, - /* 1550 */ 412, 413, 414, 415, 416, 341, 418, 341, 329, 373, - /* 1560 */ 386, 423, 373, 425, 388, 373, 404, 429, 430, 373, - /* 1570 */ 408, 373, 388, 411, 412, 413, 414, 415, 416, 373, - /* 1580 */ 418, 329, 167, 341, 385, 423, 356, 425, 341, 360, - /* 1590 */ 368, 429, 430, 96, 96, 428, 364, 368, 373, 341, - /* 1600 */ 36, 332, 373, 350, 375, 337, 395, 331, 354, 400, - /* 1610 */ 389, 354, 360, 389, 0, 354, 342, 327, 0, 0, - /* 1620 */ 368, 42, 0, 35, 203, 373, 35, 375, 35, 35, - /* 1630 */ 203, 0, 35, 404, 35, 203, 0, 408, 203, 0, - /* 1640 */ 411, 412, 413, 414, 415, 416, 35, 418, 329, 0, - /* 1650 */ 22, 0, 35, 191, 425, 186, 404, 184, 429, 430, - /* 1660 */ 408, 0, 0, 411, 412, 413, 414, 415, 416, 0, - /* 1670 */ 418, 329, 180, 179, 0, 0, 47, 425, 0, 360, - /* 1680 */ 0, 429, 430, 0, 42, 0, 0, 368, 0, 0, - /* 1690 */ 0, 0, 373, 0, 375, 0, 152, 329, 35, 0, - /* 1700 */ 152, 0, 360, 0, 0, 0, 0, 0, 0, 0, - /* 1710 */ 368, 0, 0, 0, 0, 373, 0, 375, 0, 0, - /* 1720 */ 0, 42, 0, 404, 0, 0, 0, 408, 360, 0, - /* 1730 */ 411, 412, 413, 414, 415, 416, 368, 418, 0, 22, - /* 1740 */ 0, 373, 0, 375, 425, 0, 404, 0, 136, 430, - /* 1750 */ 408, 0, 0, 411, 412, 413, 414, 415, 416, 0, - /* 1760 */ 418, 0, 35, 329, 0, 0, 0, 44, 58, 14, - /* 1770 */ 42, 39, 404, 58, 14, 40, 408, 0, 47, 411, - /* 1780 */ 412, 413, 414, 415, 416, 0, 418, 39, 58, 0, - /* 1790 */ 329, 47, 39, 47, 360, 453, 175, 0, 0, 0, - /* 1800 */ 0, 65, 368, 35, 48, 0, 39, 373, 0, 375, - /* 1810 */ 35, 48, 39, 0, 35, 39, 0, 48, 35, 48, - /* 1820 */ 329, 360, 0, 455, 0, 39, 365, 0, 0, 368, - /* 1830 */ 35, 22, 0, 0, 373, 44, 375, 35, 404, 105, - /* 1840 */ 103, 35, 408, 0, 50, 411, 412, 413, 414, 415, - /* 1850 */ 416, 360, 418, 35, 35, 44, 35, 22, 35, 368, - /* 1860 */ 35, 22, 22, 0, 373, 404, 375, 22, 0, 408, - /* 1870 */ 20, 35, 411, 412, 413, 414, 415, 416, 0, 418, - /* 1880 */ 0, 329, 35, 35, 22, 97, 35, 0, 35, 96, - /* 1890 */ 196, 35, 96, 0, 22, 404, 0, 329, 464, 408, - /* 1900 */ 0, 3, 411, 412, 413, 414, 415, 416, 165, 418, - /* 1910 */ 44, 420, 360, 96, 165, 329, 251, 365, 44, 44, - /* 1920 */ 368, 255, 96, 165, 167, 373, 187, 375, 360, 47, - /* 1930 */ 230, 97, 47, 365, 97, 173, 368, 3, 97, 97, - /* 1940 */ 96, 373, 172, 375, 172, 96, 360, 44, 251, 44, - /* 1950 */ 96, 96, 35, 251, 368, 97, 404, 97, 35, 373, - /* 1960 */ 408, 375, 35, 411, 412, 413, 414, 415, 416, 47, - /* 1970 */ 418, 35, 404, 35, 329, 35, 408, 44, 97, 411, - /* 1980 */ 412, 413, 414, 415, 416, 97, 418, 0, 47, 0, - /* 1990 */ 404, 0, 0, 329, 408, 245, 39, 411, 412, 413, - /* 2000 */ 414, 415, 416, 96, 418, 360, 47, 96, 0, 97, - /* 2010 */ 97, 96, 96, 368, 168, 96, 39, 96, 373, 47, - /* 2020 */ 375, 2, 44, 166, 360, 22, 106, 96, 96, 209, - /* 2030 */ 47, 230, 368, 47, 97, 96, 232, 373, 96, 375, - /* 2040 */ 230, 97, 97, 97, 96, 22, 96, 35, 97, 404, - /* 2050 */ 107, 35, 96, 408, 22, 97, 411, 412, 413, 414, - /* 2060 */ 415, 416, 329, 418, 35, 96, 35, 97, 404, 96, - /* 2070 */ 211, 97, 408, 35, 35, 411, 412, 413, 414, 415, - /* 2080 */ 416, 96, 418, 329, 120, 97, 96, 120, 120, 108, - /* 2090 */ 96, 120, 44, 360, 96, 35, 96, 22, 65, 64, - /* 2100 */ 35, 368, 35, 35, 35, 35, 373, 35, 375, 35, - /* 2110 */ 93, 329, 35, 35, 360, 35, 71, 44, 35, 22, - /* 2120 */ 35, 35, 368, 35, 35, 35, 71, 373, 35, 375, - /* 2130 */ 35, 35, 329, 35, 35, 22, 35, 404, 0, 35, - /* 2140 */ 48, 408, 360, 0, 411, 412, 413, 414, 415, 416, - /* 2150 */ 368, 418, 35, 39, 48, 373, 0, 375, 404, 39, - /* 2160 */ 35, 39, 408, 360, 48, 411, 412, 413, 414, 415, - /* 2170 */ 416, 368, 418, 0, 35, 48, 373, 0, 375, 39, - /* 2180 */ 35, 329, 35, 0, 22, 21, 404, 22, 22, 21, - /* 2190 */ 408, 20, 467, 411, 412, 413, 414, 415, 416, 329, - /* 2200 */ 418, 467, 467, 467, 467, 467, 467, 404, 467, 467, - /* 2210 */ 467, 408, 360, 467, 411, 412, 413, 414, 415, 416, - /* 2220 */ 368, 418, 467, 467, 467, 373, 467, 375, 467, 467, - /* 2230 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467, - /* 2240 */ 467, 467, 467, 373, 467, 375, 467, 467, 467, 467, - /* 2250 */ 467, 467, 467, 467, 467, 467, 404, 467, 329, 467, - /* 2260 */ 408, 467, 467, 411, 412, 413, 414, 415, 416, 467, - /* 2270 */ 418, 467, 467, 467, 404, 467, 329, 467, 408, 467, - /* 2280 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, 360, - /* 2290 */ 467, 467, 467, 467, 467, 467, 467, 368, 467, 467, - /* 2300 */ 467, 467, 373, 467, 375, 467, 467, 360, 467, 467, - /* 2310 */ 467, 467, 467, 467, 467, 368, 467, 467, 467, 467, - /* 2320 */ 373, 467, 375, 467, 467, 467, 467, 467, 467, 467, - /* 2330 */ 467, 467, 467, 404, 467, 329, 467, 408, 467, 467, - /* 2340 */ 411, 412, 413, 414, 415, 416, 467, 418, 467, 467, - /* 2350 */ 467, 404, 467, 467, 329, 408, 467, 467, 411, 412, - /* 2360 */ 413, 414, 415, 416, 467, 418, 360, 467, 467, 467, - /* 2370 */ 467, 467, 467, 467, 368, 467, 467, 467, 467, 373, - /* 2380 */ 467, 375, 467, 467, 467, 360, 467, 467, 467, 467, - /* 2390 */ 467, 467, 467, 368, 467, 467, 467, 467, 373, 467, - /* 2400 */ 375, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2410 */ 404, 467, 467, 329, 408, 467, 467, 411, 412, 413, - /* 2420 */ 414, 415, 416, 467, 418, 467, 467, 467, 467, 404, - /* 2430 */ 467, 329, 467, 408, 467, 467, 411, 412, 413, 414, - /* 2440 */ 415, 416, 467, 418, 360, 467, 467, 467, 467, 467, - /* 2450 */ 467, 467, 368, 467, 467, 467, 467, 373, 467, 375, - /* 2460 */ 467, 467, 360, 467, 467, 467, 467, 467, 467, 467, - /* 2470 */ 368, 467, 467, 467, 467, 373, 467, 375, 467, 467, - /* 2480 */ 329, 467, 467, 467, 467, 467, 467, 467, 404, 467, - /* 2490 */ 467, 467, 408, 467, 467, 411, 412, 413, 414, 415, - /* 2500 */ 416, 329, 418, 467, 467, 467, 404, 467, 467, 467, - /* 2510 */ 408, 360, 467, 411, 412, 413, 414, 415, 416, 368, - /* 2520 */ 418, 467, 467, 467, 373, 467, 375, 467, 467, 329, - /* 2530 */ 467, 467, 360, 467, 467, 467, 467, 467, 467, 467, - /* 2540 */ 368, 467, 467, 467, 467, 373, 467, 375, 467, 467, - /* 2550 */ 329, 467, 467, 467, 467, 404, 467, 467, 467, 408, - /* 2560 */ 360, 467, 411, 412, 413, 414, 415, 416, 368, 418, - /* 2570 */ 467, 467, 467, 373, 467, 375, 404, 467, 467, 467, - /* 2580 */ 408, 360, 467, 411, 412, 413, 414, 415, 416, 368, - /* 2590 */ 418, 467, 467, 467, 373, 467, 375, 467, 467, 467, - /* 2600 */ 467, 467, 467, 467, 404, 467, 467, 467, 408, 467, - /* 2610 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, 329, - /* 2620 */ 467, 467, 467, 467, 467, 404, 467, 467, 467, 408, - /* 2630 */ 467, 467, 411, 412, 413, 414, 415, 416, 467, 418, - /* 2640 */ 467, 467, 467, 467, 467, 329, 467, 467, 467, 467, - /* 2650 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467, - /* 2660 */ 467, 467, 467, 373, 467, 375, 467, 467, 467, 467, - /* 2670 */ 467, 467, 467, 467, 467, 467, 360, 467, 467, 467, - /* 2680 */ 467, 467, 467, 467, 368, 467, 467, 467, 467, 373, - /* 2690 */ 467, 375, 467, 467, 404, 467, 467, 467, 408, 467, - /* 2700 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, 329, - /* 2710 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2720 */ 404, 467, 467, 467, 408, 467, 467, 411, 412, 413, - /* 2730 */ 414, 415, 416, 467, 418, 467, 467, 467, 467, 467, - /* 2740 */ 360, 467, 467, 467, 467, 467, 467, 467, 368, 467, - /* 2750 */ 467, 467, 467, 373, 467, 375, 467, 467, 467, 467, - /* 2760 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2770 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - /* 2780 */ 467, 467, 467, 467, 404, 467, 467, 467, 408, 467, - /* 2790 */ 467, 411, 412, 413, 414, 415, 416, 467, 418, + /* 950 */ 155, 156, 19, 158, 159, 160, 18, 355, 364, 165, + /* 960 */ 358, 23, 166, 167, 63, 362, 33, 171, 331, 375, + /* 970 */ 174, 339, 424, 370, 426, 37, 38, 394, 375, 41, + /* 980 */ 377, 48, 370, 331, 354, 353, 190, 54, 55, 56, + /* 990 */ 57, 58, 362, 381, 339, 0, 3, 59, 60, 61, + /* 1000 */ 62, 371, 370, 409, 410, 411, 331, 331, 353, 406, + /* 1010 */ 127, 39, 375, 410, 420, 4, 413, 414, 415, 416, + /* 1020 */ 417, 418, 439, 420, 339, 370, 443, 375, 95, 165, + /* 1030 */ 427, 98, 362, 0, 96, 432, 44, 362, 353, 369, + /* 1040 */ 339, 458, 459, 339, 339, 370, 463, 464, 378, 339, + /* 1050 */ 375, 375, 377, 331, 353, 370, 339, 353, 353, 1, + /* 1060 */ 2, 8, 9, 353, 131, 12, 13, 14, 15, 16, + /* 1070 */ 353, 370, 108, 135, 370, 370, 193, 194, 331, 363, + /* 1080 */ 370, 406, 424, 331, 426, 410, 44, 370, 413, 414, + /* 1090 */ 415, 416, 417, 418, 130, 420, 63, 375, 399, 166, + /* 1100 */ 425, 370, 427, 332, 171, 331, 431, 432, 331, 362, + /* 1110 */ 331, 350, 381, 352, 176, 177, 178, 370, 44, 181, + /* 1120 */ 445, 188, 375, 190, 377, 8, 9, 375, 453, 12, + /* 1130 */ 13, 14, 15, 16, 45, 46, 331, 199, 331, 331, + /* 1140 */ 202, 58, 204, 205, 206, 207, 208, 152, 100, 375, + /* 1150 */ 97, 103, 375, 406, 375, 97, 161, 410, 331, 331, + /* 1160 */ 413, 414, 415, 416, 417, 418, 331, 420, 331, 362, + /* 1170 */ 423, 97, 425, 426, 427, 245, 246, 370, 431, 432, + /* 1180 */ 375, 98, 375, 375, 377, 247, 370, 8, 9, 0, + /* 1190 */ 44, 12, 13, 14, 15, 16, 22, 381, 331, 42, + /* 1200 */ 64, 44, 375, 375, 42, 100, 44, 351, 103, 35, + /* 1210 */ 375, 100, 375, 406, 103, 44, 44, 410, 246, 364, + /* 1220 */ 413, 414, 415, 416, 417, 418, 44, 420, 100, 362, + /* 1230 */ 375, 103, 425, 35, 427, 0, 0, 370, 431, 432, + /* 1240 */ 133, 134, 375, 97, 377, 0, 47, 331, 8, 9, + /* 1250 */ 44, 44, 12, 13, 14, 15, 16, 22, 22, 248, + /* 1260 */ 453, 268, 270, 385, 409, 410, 411, 22, 97, 97, + /* 1270 */ 44, 44, 44, 406, 44, 420, 35, 410, 362, 97, + /* 1280 */ 413, 414, 415, 416, 417, 418, 370, 420, 1, 2, + /* 1290 */ 0, 375, 425, 377, 427, 96, 44, 108, 431, 432, + /* 1300 */ 467, 44, 44, 97, 97, 456, 44, 331, 341, 442, + /* 1310 */ 44, 44, 44, 13, 272, 44, 127, 128, 129, 130, + /* 1320 */ 131, 132, 406, 97, 97, 97, 410, 97, 13, 413, + /* 1330 */ 414, 415, 416, 417, 418, 35, 420, 35, 362, 49, + /* 1340 */ 450, 425, 362, 427, 165, 209, 370, 431, 432, 97, + /* 1350 */ 35, 375, 338, 377, 97, 97, 341, 374, 442, 97, + /* 1360 */ 385, 441, 385, 97, 97, 97, 331, 460, 97, 433, + /* 1370 */ 444, 249, 48, 71, 408, 407, 182, 396, 42, 382, + /* 1380 */ 20, 385, 406, 382, 186, 162, 410, 380, 20, 413, + /* 1390 */ 414, 415, 416, 417, 418, 339, 420, 362, 339, 382, + /* 1400 */ 380, 425, 380, 427, 339, 370, 94, 431, 432, 347, + /* 1410 */ 375, 339, 377, 333, 339, 339, 176, 20, 442, 333, + /* 1420 */ 20, 20, 401, 345, 377, 331, 345, 186, 20, 20, + /* 1430 */ 340, 395, 345, 340, 52, 339, 345, 345, 375, 333, + /* 1440 */ 345, 406, 345, 342, 342, 410, 362, 362, 413, 414, + /* 1450 */ 415, 416, 417, 418, 339, 420, 362, 333, 198, 405, + /* 1460 */ 425, 362, 427, 375, 370, 362, 431, 432, 96, 375, + /* 1470 */ 362, 377, 362, 403, 362, 362, 362, 442, 362, 400, + /* 1480 */ 362, 343, 12, 13, 343, 331, 189, 339, 257, 385, + /* 1490 */ 449, 452, 22, 256, 385, 375, 377, 265, 375, 401, + /* 1500 */ 406, 449, 375, 33, 410, 35, 375, 413, 414, 415, + /* 1510 */ 416, 417, 418, 273, 420, 390, 362, 331, 175, 425, + /* 1520 */ 390, 427, 451, 267, 370, 431, 432, 266, 58, 375, + /* 1530 */ 448, 377, 250, 274, 468, 271, 442, 246, 269, 462, + /* 1540 */ 408, 71, 20, 370, 339, 331, 412, 343, 362, 449, + /* 1550 */ 340, 343, 20, 388, 390, 375, 370, 390, 375, 375, + /* 1560 */ 406, 375, 375, 377, 410, 375, 375, 413, 414, 415, + /* 1570 */ 416, 417, 418, 447, 420, 446, 362, 167, 358, 425, + /* 1580 */ 387, 427, 461, 370, 370, 431, 432, 343, 118, 375, + /* 1590 */ 343, 377, 406, 96, 96, 366, 410, 375, 430, 413, + /* 1600 */ 414, 415, 416, 417, 418, 352, 420, 36, 343, 339, + /* 1610 */ 334, 425, 333, 427, 397, 391, 391, 431, 432, 356, + /* 1620 */ 406, 402, 344, 329, 410, 0, 331, 413, 414, 415, + /* 1630 */ 416, 417, 418, 356, 420, 0, 356, 0, 42, 425, + /* 1640 */ 0, 427, 35, 203, 35, 431, 432, 35, 35, 203, + /* 1650 */ 0, 35, 35, 203, 184, 0, 186, 362, 203, 0, + /* 1660 */ 0, 35, 0, 22, 35, 370, 191, 186, 184, 0, + /* 1670 */ 375, 0, 377, 0, 180, 331, 0, 0, 179, 209, + /* 1680 */ 210, 47, 0, 0, 0, 42, 0, 0, 0, 0, + /* 1690 */ 0, 0, 222, 223, 224, 225, 226, 227, 228, 0, + /* 1700 */ 0, 406, 152, 35, 0, 410, 362, 152, 413, 414, + /* 1710 */ 415, 416, 417, 418, 370, 420, 0, 0, 0, 375, + /* 1720 */ 0, 377, 427, 0, 331, 0, 431, 432, 0, 0, + /* 1730 */ 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, + /* 1740 */ 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, + /* 1750 */ 406, 136, 0, 0, 410, 362, 58, 413, 414, 415, + /* 1760 */ 416, 417, 418, 370, 420, 0, 58, 0, 375, 58, + /* 1770 */ 377, 427, 0, 331, 0, 431, 432, 14, 14, 0, + /* 1780 */ 42, 35, 0, 0, 0, 175, 0, 0, 0, 39, + /* 1790 */ 0, 65, 331, 0, 0, 44, 40, 35, 39, 406, + /* 1800 */ 39, 47, 47, 410, 362, 47, 413, 414, 415, 416, + /* 1810 */ 417, 418, 370, 420, 48, 39, 35, 375, 48, 377, + /* 1820 */ 427, 0, 0, 362, 431, 432, 48, 35, 367, 0, + /* 1830 */ 39, 370, 35, 48, 39, 39, 375, 0, 377, 0, + /* 1840 */ 0, 331, 35, 0, 35, 22, 35, 35, 406, 35, + /* 1850 */ 44, 35, 410, 35, 44, 413, 414, 415, 416, 417, + /* 1860 */ 418, 331, 420, 22, 0, 105, 35, 406, 22, 0, + /* 1870 */ 22, 410, 362, 0, 413, 414, 415, 416, 417, 418, + /* 1880 */ 370, 420, 22, 103, 50, 375, 35, 377, 0, 35, + /* 1890 */ 0, 35, 362, 0, 22, 20, 35, 367, 35, 196, + /* 1900 */ 370, 97, 0, 35, 96, 375, 0, 377, 466, 96, + /* 1910 */ 0, 22, 0, 96, 187, 44, 406, 251, 331, 255, + /* 1920 */ 410, 97, 165, 413, 414, 415, 416, 417, 418, 3, + /* 1930 */ 420, 96, 422, 165, 331, 230, 406, 3, 165, 97, + /* 1940 */ 410, 172, 167, 413, 414, 415, 416, 417, 418, 362, + /* 1950 */ 420, 44, 331, 44, 367, 97, 97, 370, 44, 44, + /* 1960 */ 47, 172, 375, 96, 377, 362, 96, 47, 44, 47, + /* 1970 */ 96, 173, 96, 370, 97, 97, 35, 35, 375, 35, + /* 1980 */ 377, 35, 35, 362, 35, 47, 0, 44, 97, 97, + /* 1990 */ 0, 370, 0, 406, 0, 96, 375, 410, 377, 39, + /* 2000 */ 413, 414, 415, 416, 417, 418, 47, 420, 97, 406, + /* 2010 */ 0, 331, 96, 410, 97, 96, 413, 414, 415, 416, + /* 2020 */ 417, 418, 245, 420, 96, 168, 96, 406, 331, 96, + /* 2030 */ 39, 410, 166, 106, 413, 414, 415, 416, 417, 418, + /* 2040 */ 47, 420, 362, 2, 44, 331, 22, 232, 96, 230, + /* 2050 */ 370, 251, 251, 209, 97, 375, 230, 377, 96, 362, + /* 2060 */ 97, 96, 47, 97, 96, 96, 47, 370, 97, 22, + /* 2070 */ 97, 96, 375, 35, 377, 35, 362, 107, 96, 35, + /* 2080 */ 97, 96, 22, 35, 370, 97, 406, 35, 35, 375, + /* 2090 */ 410, 377, 96, 413, 414, 415, 416, 417, 418, 97, + /* 2100 */ 420, 96, 331, 406, 97, 211, 44, 410, 96, 120, + /* 2110 */ 413, 414, 415, 416, 417, 418, 108, 420, 120, 96, + /* 2120 */ 406, 120, 96, 120, 410, 35, 96, 413, 414, 415, + /* 2130 */ 416, 417, 418, 362, 420, 22, 331, 65, 64, 35, + /* 2140 */ 35, 370, 35, 35, 35, 35, 375, 35, 377, 35, + /* 2150 */ 35, 35, 71, 35, 93, 44, 35, 35, 22, 35, + /* 2160 */ 35, 35, 71, 331, 35, 35, 35, 362, 35, 35, + /* 2170 */ 22, 0, 35, 35, 39, 370, 48, 406, 0, 35, + /* 2180 */ 375, 410, 377, 0, 413, 414, 415, 416, 417, 418, + /* 2190 */ 48, 420, 39, 331, 362, 35, 39, 0, 48, 35, + /* 2200 */ 48, 39, 370, 0, 35, 35, 0, 375, 22, 377, + /* 2210 */ 21, 406, 331, 22, 22, 410, 21, 469, 413, 414, + /* 2220 */ 415, 416, 417, 418, 362, 420, 469, 20, 469, 469, + /* 2230 */ 469, 469, 370, 469, 469, 469, 469, 375, 406, 377, + /* 2240 */ 469, 469, 410, 362, 469, 413, 414, 415, 416, 417, + /* 2250 */ 418, 370, 420, 469, 469, 469, 375, 469, 377, 469, + /* 2260 */ 469, 469, 469, 469, 469, 469, 469, 469, 406, 469, + /* 2270 */ 469, 469, 410, 469, 469, 413, 414, 415, 416, 417, + /* 2280 */ 418, 331, 420, 469, 469, 469, 469, 406, 469, 469, + /* 2290 */ 469, 410, 469, 469, 413, 414, 415, 416, 417, 418, + /* 2300 */ 469, 420, 469, 469, 469, 331, 469, 469, 469, 469, + /* 2310 */ 469, 469, 362, 469, 469, 469, 469, 469, 469, 469, + /* 2320 */ 370, 469, 469, 469, 469, 375, 469, 377, 469, 469, + /* 2330 */ 331, 469, 469, 469, 469, 469, 362, 469, 469, 469, + /* 2340 */ 469, 469, 469, 469, 370, 469, 469, 469, 469, 375, + /* 2350 */ 469, 377, 469, 469, 469, 469, 406, 469, 469, 469, + /* 2360 */ 410, 362, 469, 413, 414, 415, 416, 417, 418, 370, + /* 2370 */ 420, 469, 469, 469, 375, 469, 377, 469, 469, 469, + /* 2380 */ 406, 469, 469, 469, 410, 469, 469, 413, 414, 415, + /* 2390 */ 416, 417, 418, 469, 420, 469, 469, 469, 469, 331, + /* 2400 */ 469, 469, 469, 469, 469, 406, 469, 469, 469, 410, + /* 2410 */ 469, 469, 413, 414, 415, 416, 417, 418, 331, 420, + /* 2420 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2430 */ 362, 469, 469, 469, 469, 469, 469, 469, 370, 469, + /* 2440 */ 469, 469, 469, 375, 469, 377, 469, 469, 469, 362, + /* 2450 */ 469, 469, 469, 469, 469, 469, 469, 370, 469, 469, + /* 2460 */ 469, 469, 375, 469, 377, 469, 469, 469, 469, 469, + /* 2470 */ 469, 469, 469, 469, 406, 469, 469, 469, 410, 469, + /* 2480 */ 331, 413, 414, 415, 416, 417, 418, 469, 420, 469, + /* 2490 */ 469, 469, 469, 406, 469, 469, 469, 410, 469, 331, + /* 2500 */ 413, 414, 415, 416, 417, 418, 469, 420, 469, 469, + /* 2510 */ 469, 362, 469, 469, 469, 469, 469, 469, 469, 370, + /* 2520 */ 469, 469, 469, 469, 375, 469, 377, 469, 469, 469, + /* 2530 */ 362, 469, 469, 469, 469, 469, 469, 469, 370, 469, + /* 2540 */ 469, 469, 469, 375, 469, 377, 469, 469, 469, 469, + /* 2550 */ 469, 469, 469, 469, 469, 406, 331, 469, 469, 410, + /* 2560 */ 469, 469, 413, 414, 415, 416, 417, 418, 469, 420, + /* 2570 */ 469, 469, 469, 469, 406, 331, 469, 469, 410, 469, + /* 2580 */ 469, 413, 414, 415, 416, 417, 418, 362, 420, 469, + /* 2590 */ 469, 469, 469, 469, 469, 370, 469, 469, 469, 469, + /* 2600 */ 375, 469, 377, 469, 469, 469, 362, 469, 469, 469, + /* 2610 */ 469, 469, 469, 469, 370, 469, 469, 469, 469, 375, + /* 2620 */ 469, 377, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2630 */ 469, 406, 469, 469, 469, 410, 469, 331, 413, 414, + /* 2640 */ 415, 416, 417, 418, 469, 420, 469, 469, 469, 469, + /* 2650 */ 406, 469, 469, 469, 410, 469, 469, 413, 414, 415, + /* 2660 */ 416, 417, 418, 469, 420, 469, 469, 469, 362, 469, + /* 2670 */ 469, 469, 469, 469, 469, 469, 370, 469, 469, 469, + /* 2680 */ 469, 375, 469, 377, 469, 469, 469, 469, 469, 469, + /* 2690 */ 469, 469, 469, 469, 469, 469, 331, 469, 469, 469, + /* 2700 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2710 */ 469, 469, 406, 469, 469, 469, 410, 469, 469, 413, + /* 2720 */ 414, 415, 416, 417, 418, 469, 420, 362, 469, 469, + /* 2730 */ 469, 469, 469, 469, 469, 370, 469, 469, 469, 469, + /* 2740 */ 375, 469, 377, 469, 469, 331, 469, 469, 469, 469, + /* 2750 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2760 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2770 */ 469, 406, 469, 469, 469, 410, 362, 469, 413, 414, + /* 2780 */ 415, 416, 417, 418, 370, 420, 469, 469, 469, 375, + /* 2790 */ 469, 377, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2800 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2810 */ 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + /* 2820 */ 406, 469, 469, 469, 410, 469, 469, 413, 414, 415, + /* 2830 */ 416, 417, 418, 469, 420, }; -#define YY_SHIFT_COUNT (736) +#define YY_SHIFT_COUNT (739) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2183) +#define YY_SHIFT_MAX (2207) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 938, 0, 72, 0, 292, 292, 292, 292, 292, 292, /* 10 */ 292, 292, 292, 292, 292, 364, 582, 582, 654, 582, /* 20 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, /* 30 */ 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - /* 40 */ 582, 582, 582, 582, 582, 582, 582, 582, 70, 115, - /* 50 */ 946, 19, 33, 102, 108, 102, 19, 19, 1238, 1238, - /* 60 */ 102, 1238, 1238, 6, 102, 25, 764, 237, 237, 764, - /* 70 */ 348, 348, 147, 241, 326, 326, 237, 237, 237, 237, - /* 80 */ 237, 237, 237, 301, 237, 237, 54, 25, 237, 237, - /* 90 */ 328, 237, 25, 237, 301, 237, 301, 25, 237, 237, - /* 100 */ 25, 237, 25, 25, 25, 237, 119, 795, 34, 34, - /* 110 */ 219, 669, 942, 942, 942, 942, 942, 942, 942, 942, - /* 120 */ 942, 942, 942, 942, 942, 942, 942, 942, 942, 942, - /* 130 */ 942, 864, 621, 147, 241, 309, 166, 555, 555, 555, - /* 140 */ 714, 618, 618, 166, 460, 460, 460, 132, 308, 25, - /* 150 */ 530, 25, 530, 530, 502, 534, 36, 36, 36, 36, - /* 160 */ 36, 36, 36, 36, 287, 531, 553, 529, 251, 107, - /* 170 */ 18, 272, 434, 833, 232, 932, 1087, 1027, 1031, 904, - /* 180 */ 945, 129, 904, 1092, 832, 1020, 1068, 1272, 1151, 1316, - /* 190 */ 1343, 1316, 1208, 1352, 1352, 1316, 1208, 1208, 1352, 1297, - /* 200 */ 1352, 1352, 1352, 1378, 1378, 1382, 54, 1386, 54, 1388, - /* 210 */ 1392, 54, 1388, 54, 54, 54, 1352, 54, 1394, 1394, - /* 220 */ 1378, 25, 25, 25, 25, 25, 25, 25, 25, 25, - /* 230 */ 25, 25, 1352, 1378, 530, 530, 1284, 1391, 1382, 119, - /* 240 */ 1303, 1386, 119, 1352, 1343, 1343, 530, 1248, 1251, 530, - /* 250 */ 1248, 1251, 530, 530, 25, 1249, 1346, 1248, 1255, 1263, - /* 260 */ 1279, 1068, 1256, 1270, 1264, 1288, 460, 1523, 1352, 1388, - /* 270 */ 119, 119, 1528, 1251, 530, 530, 530, 530, 530, 1251, - /* 280 */ 530, 1415, 119, 502, 119, 460, 1497, 1498, 530, 534, - /* 290 */ 1352, 119, 1564, 1378, 2799, 2799, 2799, 2799, 2799, 2799, - /* 300 */ 2799, 2799, 2799, 839, 275, 677, 1357, 47, 345, 749, - /* 310 */ 339, 15, 818, 879, 438, 973, 973, 973, 973, 973, - /* 320 */ 973, 973, 973, 973, 1171, 127, 218, 218, 956, 136, - /* 330 */ 371, 538, 713, 186, 757, 757, 682, 768, 549, 682, - /* 340 */ 682, 682, 1139, 450, 1166, 1156, 965, 1104, 1118, 1120, - /* 350 */ 1122, 1233, 1234, 1245, 1074, 1164, 1188, 1183, 1218, 1135, - /* 360 */ 934, 1023, 545, 1219, 1226, 1239, 1241, 1250, 1262, 1275, - /* 370 */ 1267, 1106, 1213, 1165, 1287, 1163, 1260, 1298, 1335, 1339, - /* 380 */ 1344, 1345, 626, 1278, 1311, 416, 1265, 1614, 1618, 1619, - /* 390 */ 1579, 1622, 1588, 1421, 1591, 1593, 1594, 1427, 1631, 1597, - /* 400 */ 1599, 1432, 1636, 1435, 1639, 1611, 1649, 1628, 1651, 1617, - /* 410 */ 1462, 1469, 1473, 1661, 1662, 1669, 1492, 1494, 1674, 1675, - /* 420 */ 1629, 1678, 1680, 1683, 1642, 1685, 1686, 1688, 1689, 1690, - /* 430 */ 1691, 1693, 1695, 1544, 1663, 1699, 1548, 1701, 1703, 1704, - /* 440 */ 1705, 1706, 1707, 1708, 1709, 1711, 1712, 1713, 1714, 1716, - /* 450 */ 1718, 1719, 1720, 1679, 1722, 1724, 1725, 1726, 1729, 1738, - /* 460 */ 1717, 1740, 1742, 1745, 1612, 1747, 1751, 1752, 1710, 1727, - /* 470 */ 1759, 1715, 1761, 1730, 1764, 1765, 1728, 1732, 1723, 1731, - /* 480 */ 1755, 1744, 1760, 1746, 1766, 1735, 1748, 1777, 1785, 1789, - /* 490 */ 1753, 1621, 1797, 1798, 1799, 1736, 1800, 1808, 1768, 1756, - /* 500 */ 1767, 1805, 1775, 1763, 1773, 1813, 1779, 1769, 1776, 1816, - /* 510 */ 1783, 1771, 1786, 1822, 1824, 1827, 1828, 1734, 1737, 1795, - /* 520 */ 1809, 1832, 1802, 1806, 1818, 1819, 1791, 1811, 1821, 1823, - /* 530 */ 1835, 1825, 1833, 1839, 1843, 1840, 1794, 1863, 1845, 1836, - /* 540 */ 1868, 1847, 1878, 1848, 1880, 1862, 1850, 1851, 1853, 1694, - /* 550 */ 1788, 1793, 1887, 1743, 1796, 1856, 1893, 1739, 1872, 1749, - /* 560 */ 1757, 1896, 1900, 1758, 1762, 1898, 1866, 1665, 1817, 1834, - /* 570 */ 1826, 1770, 1700, 1772, 1666, 1837, 1874, 1841, 1844, 1849, - /* 580 */ 1854, 1842, 1875, 1882, 1885, 1855, 1903, 1697, 1858, 1860, - /* 590 */ 1934, 1905, 1702, 1917, 1923, 1927, 1936, 1938, 1940, 1881, - /* 600 */ 1888, 1922, 1750, 1933, 1941, 1987, 1989, 1991, 1992, 1907, - /* 610 */ 1957, 1731, 1959, 1911, 1912, 1913, 1915, 1916, 1846, 1919, - /* 620 */ 2008, 1977, 1857, 1921, 1920, 1731, 1972, 1978, 1801, 1804, - /* 630 */ 1810, 2019, 2003, 1820, 1931, 1937, 1932, 1944, 1939, 1945, - /* 640 */ 1983, 1942, 1948, 1986, 1946, 2023, 1859, 1950, 1943, 1951, - /* 650 */ 2012, 2016, 1956, 1958, 2029, 1969, 1970, 2031, 1973, 1974, - /* 660 */ 2038, 1985, 1988, 2039, 1990, 1964, 1967, 1968, 1971, 2032, - /* 670 */ 1981, 1994, 2048, 1998, 2060, 2000, 2048, 2048, 2075, 2033, - /* 680 */ 2035, 2065, 2067, 2068, 2069, 2070, 2072, 2074, 2077, 2078, - /* 690 */ 2080, 2045, 2017, 2073, 2083, 2085, 2086, 2097, 2088, 2089, - /* 700 */ 2090, 2055, 1791, 2093, 1811, 2095, 2096, 2098, 2099, 2113, - /* 710 */ 2101, 2138, 2104, 2092, 2114, 2143, 2117, 2106, 2120, 2156, - /* 720 */ 2125, 2116, 2122, 2173, 2139, 2127, 2140, 2177, 2145, 2147, - /* 730 */ 2183, 2162, 2164, 2165, 2166, 2168, 2171, + /* 40 */ 582, 582, 582, 582, 582, 582, 582, 582, 115, 136, + /* 50 */ 526, 439, 33, 71, 565, 71, 439, 439, 1470, 1470, + /* 60 */ 1470, 71, 1470, 1470, 6, 71, 95, 438, 112, 112, + /* 70 */ 438, 378, 378, 217, 97, 523, 523, 112, 112, 112, + /* 80 */ 112, 112, 112, 112, 154, 112, 112, 135, 95, 112, + /* 90 */ 112, 296, 112, 95, 112, 154, 112, 154, 95, 112, + /* 100 */ 112, 95, 112, 95, 95, 95, 112, 346, 795, 34, + /* 110 */ 34, 219, 690, 575, 575, 575, 575, 575, 575, 575, + /* 120 */ 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, + /* 130 */ 575, 575, 218, 519, 217, 97, 901, 331, 598, 598, + /* 140 */ 598, 1033, 466, 466, 331, 410, 410, 410, 419, 326, + /* 150 */ 95, 496, 95, 496, 496, 532, 620, 36, 36, 36, + /* 160 */ 36, 36, 36, 36, 36, 933, 315, 457, 471, 1240, + /* 170 */ 187, 18, 211, 25, 461, 232, 794, 1089, 964, 864, + /* 180 */ 930, 972, 993, 930, 1157, 1011, 70, 1122, 1324, 1194, + /* 190 */ 1336, 1360, 1336, 1223, 1368, 1368, 1336, 1223, 1223, 1368, + /* 200 */ 1312, 1368, 1368, 1368, 1397, 1397, 1400, 135, 1401, 135, + /* 210 */ 1408, 1409, 135, 1408, 135, 135, 135, 1368, 135, 1382, + /* 220 */ 1382, 1397, 95, 95, 95, 95, 95, 95, 95, 95, + /* 230 */ 95, 95, 95, 1368, 1397, 496, 496, 1260, 1372, 1400, + /* 240 */ 346, 1297, 1401, 346, 1368, 1360, 1360, 496, 1231, 1237, + /* 250 */ 496, 1231, 1237, 496, 496, 95, 1232, 1343, 1231, 1256, + /* 260 */ 1261, 1282, 1122, 1259, 1264, 1269, 1291, 410, 1522, 1368, + /* 270 */ 1408, 346, 346, 1532, 1237, 496, 496, 496, 496, 496, + /* 280 */ 1237, 496, 1410, 346, 532, 346, 410, 1497, 1498, 496, + /* 290 */ 620, 1368, 346, 1571, 1397, 2835, 2835, 2835, 2835, 2835, + /* 300 */ 2835, 2835, 2835, 2835, 839, 796, 442, 691, 47, 818, + /* 310 */ 1053, 503, 15, 884, 1179, 1189, 1117, 1117, 1117, 1117, + /* 320 */ 1117, 1117, 1117, 1117, 1117, 728, 586, 294, 294, 516, + /* 330 */ 480, 995, 695, 456, 883, 237, 237, 479, 1058, 77, + /* 340 */ 479, 479, 479, 707, 357, 1174, 1162, 499, 1048, 1105, + /* 350 */ 1111, 1128, 1235, 1236, 1245, 1074, 1146, 1083, 1171, 1172, + /* 360 */ 1182, 1107, 992, 1042, 738, 1206, 1207, 1226, 1227, 1228, + /* 370 */ 1230, 1287, 1252, 1198, 1241, 1136, 1257, 1199, 1258, 1262, + /* 380 */ 1266, 1267, 1268, 1271, 338, 1300, 1315, 1302, 1290, 1625, + /* 390 */ 1635, 1637, 1596, 1640, 1607, 1440, 1609, 1612, 1613, 1446, + /* 400 */ 1650, 1616, 1617, 1450, 1655, 1455, 1659, 1626, 1660, 1641, + /* 410 */ 1662, 1629, 1475, 1481, 1484, 1669, 1671, 1673, 1494, 1499, + /* 420 */ 1676, 1677, 1634, 1682, 1683, 1684, 1643, 1686, 1687, 1688, + /* 430 */ 1689, 1690, 1691, 1699, 1700, 1550, 1668, 1704, 1555, 1716, + /* 440 */ 1717, 1718, 1720, 1723, 1725, 1728, 1729, 1730, 1731, 1732, + /* 450 */ 1733, 1734, 1735, 1736, 1737, 1696, 1739, 1740, 1741, 1742, + /* 460 */ 1743, 1744, 1724, 1745, 1747, 1748, 1615, 1749, 1752, 1753, + /* 470 */ 1698, 1746, 1765, 1708, 1767, 1711, 1772, 1774, 1738, 1750, + /* 480 */ 1751, 1754, 1763, 1755, 1764, 1758, 1779, 1756, 1759, 1782, + /* 490 */ 1783, 1784, 1761, 1610, 1786, 1787, 1788, 1726, 1790, 1793, + /* 500 */ 1762, 1766, 1776, 1794, 1781, 1770, 1791, 1821, 1792, 1778, + /* 510 */ 1795, 1822, 1797, 1785, 1796, 1829, 1837, 1839, 1840, 1760, + /* 520 */ 1780, 1807, 1823, 1843, 1809, 1811, 1812, 1814, 1806, 1810, + /* 530 */ 1816, 1818, 1841, 1831, 1864, 1846, 1869, 1848, 1834, 1873, + /* 540 */ 1860, 1851, 1888, 1854, 1890, 1856, 1893, 1872, 1875, 1861, + /* 550 */ 1863, 1703, 1804, 1808, 1902, 1757, 1813, 1868, 1906, 1727, + /* 560 */ 1889, 1768, 1775, 1910, 1912, 1773, 1798, 1926, 1871, 1666, + /* 570 */ 1817, 1824, 1835, 1769, 1705, 1789, 1664, 1842, 1907, 1909, + /* 580 */ 1858, 1867, 1870, 1874, 1859, 1914, 1913, 1920, 1876, 1915, + /* 590 */ 1800, 1877, 1878, 1934, 1924, 1801, 1941, 1942, 1944, 1946, + /* 600 */ 1947, 1949, 1891, 1892, 1922, 1777, 1943, 1938, 1986, 1990, + /* 610 */ 1992, 1994, 1899, 1960, 1754, 1959, 1916, 1911, 1917, 1919, + /* 620 */ 1928, 1857, 1930, 2010, 1991, 1866, 1933, 1927, 1754, 1993, + /* 630 */ 2000, 1819, 1815, 1826, 2041, 2024, 1844, 1952, 1957, 1962, + /* 640 */ 1963, 1965, 1966, 2015, 1968, 1969, 2019, 1971, 2047, 1894, + /* 650 */ 1975, 1970, 1973, 2038, 2040, 1982, 1983, 2044, 1985, 1988, + /* 660 */ 2048, 1996, 2002, 2052, 2005, 2007, 2053, 2012, 1989, 1998, + /* 670 */ 2001, 2003, 2060, 2008, 2023, 2062, 2026, 2090, 2030, 2062, + /* 680 */ 2062, 2113, 2072, 2074, 2104, 2105, 2107, 2108, 2109, 2110, + /* 690 */ 2112, 2114, 2115, 2116, 2081, 2061, 2111, 2118, 2121, 2122, + /* 700 */ 2136, 2124, 2125, 2126, 2091, 1806, 2129, 1810, 2130, 2131, + /* 710 */ 2133, 2134, 2148, 2137, 2171, 2138, 2128, 2135, 2178, 2144, + /* 720 */ 2142, 2153, 2183, 2160, 2150, 2157, 2197, 2164, 2152, 2162, + /* 730 */ 2203, 2169, 2170, 2206, 2186, 2189, 2191, 2192, 2195, 2207, }; -#define YY_REDUCE_COUNT (302) -#define YY_REDUCE_MIN (-413) -#define YY_REDUCE_MAX (2380) +#define YY_REDUCE_COUNT (303) +#define YY_REDUCE_MIN (-415) +#define YY_REDUCE_MAX (2414) static const short yy_reduce_ofst[] = { - /* 0 */ -254, 641, 675, 752, 801, 824, 914, 937, 1005, 1065, - /* 10 */ 1138, 1162, 243, 1229, 1252, -292, 77, 315, 1319, 1342, - /* 20 */ 1368, 1434, 1461, 1491, 1552, 1568, 1586, 1645, 1664, 1733, - /* 30 */ 1754, 1782, 1803, 1852, 1870, 1929, 1947, 2006, 2025, 2084, - /* 40 */ 2102, 2151, 2172, 2200, 2221, 2290, 2316, 2380, -262, 400, - /* 50 */ -45, -30, -348, -28, 208, 566, -334, 673, -321, 273, - /* 60 */ 169, -341, 277, -18, 22, -351, -210, -332, 63, -280, - /* 70 */ -329, -144, -303, -301, -197, 162, -286, 64, 135, 203, - /* 80 */ 261, 311, 387, -58, 405, 484, -169, 97, 622, 678, - /* 90 */ -175, 710, 247, 787, -3, 811, 355, 490, 821, 822, - /* 100 */ 414, 843, 716, 607, 826, 907, 358, -75, 109, 109, - /* 110 */ -328, 264, 101, 313, 446, 456, 485, 487, 526, 633, - /* 120 */ 651, 666, 689, 690, 692, 696, 701, 702, 704, 709, - /* 130 */ 729, 192, -356, -204, 617, 256, 557, -356, -12, 224, - /* 140 */ 330, 547, 679, 665, 284, 403, 658, 498, -413, 420, - /* 150 */ 17, 60, 587, 632, 664, 773, -346, 379, 451, 483, - /* 160 */ 525, 535, 647, 525, 513, 663, 683, 726, 648, 693, - /* 170 */ 867, 804, 897, 897, 933, 895, 948, 909, 905, 851, - /* 180 */ 851, 837, 851, 876, 866, 897, 913, 916, 941, 960, - /* 190 */ 985, 989, 993, 1038, 1044, 1002, 1007, 1008, 1050, 1047, - /* 200 */ 1056, 1059, 1060, 1069, 1070, 1004, 1061, 1032, 1071, 1073, - /* 210 */ 1033, 1084, 1091, 1088, 1094, 1096, 1107, 1100, 1109, 1110, - /* 220 */ 1123, 1093, 1097, 1098, 1099, 1108, 1111, 1112, 1114, 1115, - /* 230 */ 1124, 1125, 1119, 1155, 1078, 1116, 1067, 1095, 1101, 1152, - /* 240 */ 1103, 1127, 1158, 1160, 1121, 1126, 1130, 1063, 1128, 1141, - /* 250 */ 1072, 1129, 1142, 1145, 897, 1058, 1075, 1076, 1079, 1081, - /* 260 */ 1089, 1132, 1066, 1080, 1077, 851, 1173, 1134, 1210, 1207, - /* 270 */ 1214, 1216, 1174, 1176, 1186, 1189, 1192, 1196, 1198, 1184, - /* 280 */ 1206, 1199, 1242, 1230, 1247, 1222, 1167, 1232, 1225, 1253, - /* 290 */ 1268, 1258, 1269, 1276, 1211, 1209, 1221, 1224, 1254, 1257, - /* 300 */ 1261, 1274, 1290, + /* 0 */ -256, 675, 747, 807, 867, 916, 976, 1035, 1094, 1154, + /* 10 */ 1186, 1214, 1295, 1344, 1393, -294, -2, 23, 603, 288, + /* 20 */ 313, 1442, 1461, 1510, 1530, 1587, 1603, 1621, 1680, 1697, + /* 30 */ 1714, 1771, 1805, 1832, 1862, 1881, 1950, 1974, 1999, 2068, + /* 40 */ 2087, 2149, 2168, 2225, 2244, 2306, 2365, 2414, -264, 184, + /* 50 */ 162, -173, -350, 106, 278, 583, -336, -105, -323, 594, + /* 60 */ 855, -106, -343, -3, -72, -69, -353, -212, -334, 191, + /* 70 */ -282, -331, -146, -305, -303, -199, 92, -288, -15, 50, + /* 80 */ 259, 275, 298, 299, -37, 343, 401, 195, 190, 409, + /* 90 */ 632, -177, 655, 295, 685, 274, 701, 332, 204, 704, + /* 100 */ 705, 398, 710, 533, 670, 630, 717, 62, 270, -169, + /* 110 */ -169, -330, -23, 224, 310, 407, 490, 510, 637, 652, + /* 120 */ 676, 722, 752, 774, 777, 779, 805, 808, 827, 828, + /* 130 */ 835, 837, 318, -358, -180, 443, -167, 498, -358, 404, + /* 140 */ 423, -86, 548, 658, 540, 612, 731, 816, -45, -415, + /* 150 */ 167, 124, 308, 228, 360, 602, 761, -348, 359, 384, + /* 160 */ 474, 486, 570, 716, 486, 699, 771, 856, 878, 833, + /* 170 */ 849, 967, 890, 980, 980, 1015, 975, 1014, 983, 977, + /* 180 */ 920, 920, 907, 920, 936, 926, 980, 966, 968, 981, + /* 190 */ 997, 996, 1001, 1007, 1056, 1059, 1017, 1020, 1022, 1065, + /* 200 */ 1062, 1072, 1075, 1076, 1080, 1086, 1021, 1078, 1047, 1081, + /* 210 */ 1090, 1036, 1087, 1093, 1091, 1092, 1095, 1096, 1097, 1101, + /* 220 */ 1102, 1106, 1084, 1085, 1099, 1103, 1108, 1110, 1112, 1113, + /* 230 */ 1114, 1116, 1118, 1115, 1124, 1063, 1088, 1054, 1070, 1098, + /* 240 */ 1138, 1079, 1119, 1141, 1148, 1104, 1109, 1120, 1041, 1125, + /* 250 */ 1123, 1052, 1130, 1127, 1131, 980, 1039, 1071, 1100, 1082, + /* 260 */ 1126, 1129, 1132, 1066, 1077, 1121, 920, 1173, 1134, 1205, + /* 270 */ 1210, 1204, 1208, 1165, 1164, 1180, 1183, 1184, 1187, 1190, + /* 280 */ 1167, 1191, 1193, 1244, 1220, 1247, 1213, 1168, 1229, 1222, + /* 290 */ 1253, 1270, 1265, 1276, 1279, 1217, 1219, 1224, 1225, 1263, + /* 300 */ 1277, 1280, 1278, 1294, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 10 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 20 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 30 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 40 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 50 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 60 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 70 */ 1651, 1651, 1909, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 80 */ 1651, 1651, 1651, 1651, 1651, 1651, 1730, 1651, 1651, 1651, - /* 90 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 100 */ 1651, 1651, 1651, 1651, 1651, 1651, 1728, 1902, 2116, 1651, - /* 110 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 120 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 130 */ 1651, 1651, 2128, 1651, 1651, 1730, 1651, 2128, 2128, 2128, - /* 140 */ 1728, 2088, 2088, 1651, 1651, 1651, 1651, 1963, 1651, 1651, - /* 150 */ 1651, 1651, 1651, 1651, 1837, 1651, 1651, 1651, 1651, 1651, - /* 160 */ 1861, 1651, 1651, 1651, 1955, 1651, 1651, 2153, 2207, 1651, - /* 170 */ 1651, 2156, 1651, 1651, 1651, 1914, 1651, 1790, 2143, 2120, - /* 180 */ 2134, 2191, 2121, 2118, 2137, 1651, 2147, 1651, 1948, 1907, - /* 190 */ 1651, 1907, 1904, 1651, 1651, 1907, 1904, 1904, 1651, 1781, - /* 200 */ 1651, 1651, 1651, 1651, 1651, 1651, 1730, 1651, 1730, 1651, - /* 210 */ 1651, 1730, 1651, 1730, 1730, 1730, 1651, 1730, 1708, 1708, - /* 220 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 230 */ 1651, 1651, 1651, 1651, 1651, 1651, 1973, 1961, 1651, 1728, - /* 240 */ 1957, 1651, 1728, 1651, 1651, 1651, 1651, 2164, 2162, 1651, - /* 250 */ 2164, 2162, 1651, 1651, 1651, 2176, 2172, 2164, 2180, 2178, - /* 260 */ 2149, 2147, 2210, 2197, 2193, 2134, 1651, 1651, 1651, 1651, - /* 270 */ 1728, 1728, 1651, 2162, 1651, 1651, 1651, 1651, 1651, 2162, - /* 280 */ 1651, 1651, 1728, 1651, 1728, 1651, 1651, 1806, 1651, 1651, - /* 290 */ 1651, 1728, 1683, 1651, 1950, 1966, 1932, 1932, 1840, 1840, - /* 300 */ 1840, 1731, 1656, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 310 */ 1651, 1651, 1651, 1651, 1651, 2175, 2174, 2043, 1651, 2092, - /* 320 */ 2091, 2090, 2081, 2042, 1802, 1651, 2041, 2040, 1651, 1651, - /* 330 */ 1651, 1651, 1651, 1651, 1923, 1922, 2034, 1651, 1651, 2035, - /* 340 */ 2033, 2032, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 350 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 360 */ 2194, 2198, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2117, - /* 370 */ 1651, 1651, 1651, 1651, 1651, 2016, 1651, 1651, 1651, 1651, - /* 380 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 390 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 400 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 410 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 420 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 430 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 440 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 450 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 460 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 470 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1688, 2021, - /* 480 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 490 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 500 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 510 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 520 */ 1651, 1651, 1651, 1651, 1651, 1651, 1769, 1768, 1651, 1651, - /* 530 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 540 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 550 */ 2025, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 560 */ 1651, 1651, 1651, 1651, 1651, 2190, 2150, 1651, 1651, 1651, - /* 570 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 580 */ 1651, 1651, 1651, 1651, 2016, 1651, 2173, 1651, 1651, 2188, - /* 590 */ 1651, 2192, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 2127, - /* 600 */ 2123, 1651, 1651, 2119, 1651, 1651, 1651, 1651, 1651, 1651, - /* 610 */ 1651, 2024, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 620 */ 1651, 1651, 1651, 1651, 1651, 2015, 1651, 2078, 1651, 1651, - /* 630 */ 1651, 2112, 1651, 1651, 2063, 1651, 1651, 1651, 1651, 1651, - /* 640 */ 1651, 1651, 1651, 1651, 2025, 1651, 2028, 1651, 1651, 1651, - /* 650 */ 1651, 1651, 1834, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 660 */ 1651, 1651, 1651, 1651, 1651, 1819, 1817, 1816, 1815, 1651, - /* 670 */ 1812, 1651, 1847, 1651, 1651, 1651, 1843, 1842, 1651, 1651, - /* 680 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 690 */ 1651, 1651, 1651, 1749, 1651, 1651, 1651, 1651, 1651, 1651, - /* 700 */ 1651, 1651, 1741, 1651, 1740, 1651, 1651, 1651, 1651, 1651, - /* 710 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 720 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, 1651, - /* 730 */ 1651, 1651, 1651, 1651, 1651, 1651, 1651, + /* 0 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 10 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 20 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 30 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 40 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 50 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 60 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 70 */ 1658, 1658, 1658, 1916, 1658, 1658, 1658, 1658, 1658, 1658, + /* 80 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1737, 1658, 1658, + /* 90 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 100 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1735, 1909, 2123, + /* 110 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 120 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 130 */ 1658, 1658, 1658, 2135, 1658, 1658, 1737, 1658, 2135, 2135, + /* 140 */ 2135, 1735, 2095, 2095, 1658, 1658, 1658, 1658, 1970, 1658, + /* 150 */ 1658, 1658, 1658, 1658, 1658, 1844, 1658, 1658, 1658, 1658, + /* 160 */ 1658, 1868, 1658, 1658, 1658, 1962, 1658, 1658, 2160, 2216, + /* 170 */ 1658, 1658, 2163, 1658, 1658, 1658, 1921, 1658, 1797, 2150, + /* 180 */ 2127, 2141, 2200, 2128, 2125, 2144, 1658, 2154, 1658, 1955, + /* 190 */ 1914, 1658, 1914, 1911, 1658, 1658, 1914, 1911, 1911, 1658, + /* 200 */ 1788, 1658, 1658, 1658, 1658, 1658, 1658, 1737, 1658, 1737, + /* 210 */ 1658, 1658, 1737, 1658, 1737, 1737, 1737, 1658, 1737, 1715, + /* 220 */ 1715, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 230 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1980, 1968, 1658, + /* 240 */ 1735, 1964, 1658, 1735, 1658, 1658, 1658, 1658, 2171, 2169, + /* 250 */ 1658, 2171, 2169, 1658, 1658, 1658, 2185, 2181, 2171, 2189, + /* 260 */ 2187, 2156, 2154, 2219, 2206, 2202, 2141, 1658, 1658, 1658, + /* 270 */ 1658, 1735, 1735, 1658, 2169, 1658, 1658, 1658, 1658, 1658, + /* 280 */ 2169, 1658, 1658, 1735, 1658, 1735, 1658, 1658, 1813, 1658, + /* 290 */ 1658, 1658, 1735, 1690, 1658, 1957, 1973, 1939, 1939, 1847, + /* 300 */ 1847, 1847, 1738, 1663, 1658, 1658, 1658, 1658, 1658, 1658, + /* 310 */ 1658, 1658, 1658, 1658, 1658, 1658, 2184, 2183, 2050, 1658, + /* 320 */ 2099, 2098, 2097, 2088, 2049, 1809, 1658, 2048, 2047, 1658, + /* 330 */ 1658, 1658, 1658, 1658, 1658, 1930, 1929, 2041, 1658, 1658, + /* 340 */ 2042, 2040, 2039, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 350 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 360 */ 1658, 1658, 2203, 2207, 1658, 1658, 1658, 1658, 1658, 1658, + /* 370 */ 1658, 2124, 1658, 1658, 1658, 1658, 1658, 2023, 1658, 1658, + /* 380 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 390 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 400 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 410 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 420 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 430 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 440 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 450 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 460 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 470 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 480 */ 1695, 2028, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 490 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 500 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 510 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 520 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1776, 1775, + /* 530 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 540 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 550 */ 1658, 1658, 2032, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 560 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 2199, 2157, 1658, + /* 570 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 580 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 2023, 1658, 2182, + /* 590 */ 1658, 1658, 2197, 1658, 2201, 1658, 1658, 1658, 1658, 1658, + /* 600 */ 1658, 1658, 2134, 2130, 1658, 1658, 2126, 1658, 1658, 1658, + /* 610 */ 1658, 1658, 1658, 1658, 2031, 1658, 1658, 1658, 1658, 1658, + /* 620 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 2022, 1658, + /* 630 */ 2085, 1658, 1658, 1658, 2119, 1658, 1658, 2070, 1658, 1658, + /* 640 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 2032, 1658, 2035, + /* 650 */ 1658, 1658, 1658, 1658, 1658, 1841, 1658, 1658, 1658, 1658, + /* 660 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1826, 1824, + /* 670 */ 1823, 1822, 1658, 1819, 1658, 1854, 1658, 1658, 1658, 1850, + /* 680 */ 1849, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 690 */ 1658, 1658, 1658, 1658, 1658, 1658, 1756, 1658, 1658, 1658, + /* 700 */ 1658, 1658, 1658, 1658, 1658, 1748, 1658, 1747, 1658, 1658, + /* 710 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 720 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, + /* 730 */ 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, 1658, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1220,7 +1228,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* SERVER_STATUS => nothing */ 0, /* CURRENT_USER => nothing */ 0, /* CASE => nothing */ - 273, /* END => ABORT */ + 275, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1249,8 +1257,10 @@ static const YYCODETYPE yyFallback[] = { 0, /* SLIDING => nothing */ 0, /* FILL => nothing */ 0, /* VALUE => nothing */ + 0, /* VALUE_F => nothing */ 0, /* NONE => nothing */ 0, /* PREV => nothing */ + 0, /* NULL_F => nothing */ 0, /* LINEAR => nothing */ 0, /* NEXT => nothing */ 0, /* HAVING => nothing */ @@ -1264,58 +1274,58 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 273, /* AFTER => ABORT */ - 273, /* ATTACH => ABORT */ - 273, /* BEFORE => ABORT */ - 273, /* BEGIN => ABORT */ - 273, /* BITAND => ABORT */ - 273, /* BITNOT => ABORT */ - 273, /* BITOR => ABORT */ - 273, /* BLOCKS => ABORT */ - 273, /* CHANGE => ABORT */ - 273, /* COMMA => ABORT */ - 273, /* CONCAT => ABORT */ - 273, /* CONFLICT => ABORT */ - 273, /* COPY => ABORT */ - 273, /* DEFERRED => ABORT */ - 273, /* DELIMITERS => ABORT */ - 273, /* DETACH => ABORT */ - 273, /* DIVIDE => ABORT */ - 273, /* DOT => ABORT */ - 273, /* EACH => ABORT */ - 273, /* FAIL => ABORT */ - 273, /* FILE => ABORT */ - 273, /* FOR => ABORT */ - 273, /* GLOB => ABORT */ - 273, /* ID => ABORT */ - 273, /* IMMEDIATE => ABORT */ - 273, /* IMPORT => ABORT */ - 273, /* INITIALLY => ABORT */ - 273, /* INSTEAD => ABORT */ - 273, /* ISNULL => ABORT */ - 273, /* KEY => ABORT */ - 273, /* MODULES => ABORT */ - 273, /* NK_BITNOT => ABORT */ - 273, /* NK_SEMI => ABORT */ - 273, /* NOTNULL => ABORT */ - 273, /* OF => ABORT */ - 273, /* PLUS => ABORT */ - 273, /* PRIVILEGE => ABORT */ - 273, /* RAISE => ABORT */ - 273, /* REPLACE => ABORT */ - 273, /* RESTRICT => ABORT */ - 273, /* ROW => ABORT */ - 273, /* SEMI => ABORT */ - 273, /* STAR => ABORT */ - 273, /* STATEMENT => ABORT */ - 273, /* STRICT => ABORT */ - 273, /* STRING => ABORT */ - 273, /* TIMES => ABORT */ - 273, /* UPDATE => ABORT */ - 273, /* VALUES => ABORT */ - 273, /* VARIABLE => ABORT */ - 273, /* VIEW => ABORT */ - 273, /* WAL => ABORT */ + 275, /* AFTER => ABORT */ + 275, /* ATTACH => ABORT */ + 275, /* BEFORE => ABORT */ + 275, /* BEGIN => ABORT */ + 275, /* BITAND => ABORT */ + 275, /* BITNOT => ABORT */ + 275, /* BITOR => ABORT */ + 275, /* BLOCKS => ABORT */ + 275, /* CHANGE => ABORT */ + 275, /* COMMA => ABORT */ + 275, /* CONCAT => ABORT */ + 275, /* CONFLICT => ABORT */ + 275, /* COPY => ABORT */ + 275, /* DEFERRED => ABORT */ + 275, /* DELIMITERS => ABORT */ + 275, /* DETACH => ABORT */ + 275, /* DIVIDE => ABORT */ + 275, /* DOT => ABORT */ + 275, /* EACH => ABORT */ + 275, /* FAIL => ABORT */ + 275, /* FILE => ABORT */ + 275, /* FOR => ABORT */ + 275, /* GLOB => ABORT */ + 275, /* ID => ABORT */ + 275, /* IMMEDIATE => ABORT */ + 275, /* IMPORT => ABORT */ + 275, /* INITIALLY => ABORT */ + 275, /* INSTEAD => ABORT */ + 275, /* ISNULL => ABORT */ + 275, /* KEY => ABORT */ + 275, /* MODULES => ABORT */ + 275, /* NK_BITNOT => ABORT */ + 275, /* NK_SEMI => ABORT */ + 275, /* NOTNULL => ABORT */ + 275, /* OF => ABORT */ + 275, /* PLUS => ABORT */ + 275, /* PRIVILEGE => ABORT */ + 275, /* RAISE => ABORT */ + 275, /* REPLACE => ABORT */ + 275, /* RESTRICT => ABORT */ + 275, /* ROW => ABORT */ + 275, /* SEMI => ABORT */ + 275, /* STAR => ABORT */ + 275, /* STATEMENT => ABORT */ + 275, /* STRICT => ABORT */ + 275, /* STRING => ABORT */ + 275, /* TIMES => ABORT */ + 275, /* UPDATE => ABORT */ + 275, /* VALUES => ABORT */ + 275, /* VARIABLE => ABORT */ + 275, /* VIEW => ABORT */ + 275, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1662,214 +1672,216 @@ static const char *const yyTokenName[] = { /* 256 */ "SLIDING", /* 257 */ "FILL", /* 258 */ "VALUE", - /* 259 */ "NONE", - /* 260 */ "PREV", - /* 261 */ "LINEAR", - /* 262 */ "NEXT", - /* 263 */ "HAVING", - /* 264 */ "RANGE", - /* 265 */ "EVERY", - /* 266 */ "ORDER", - /* 267 */ "SLIMIT", - /* 268 */ "SOFFSET", - /* 269 */ "LIMIT", - /* 270 */ "OFFSET", - /* 271 */ "ASC", - /* 272 */ "NULLS", - /* 273 */ "ABORT", - /* 274 */ "AFTER", - /* 275 */ "ATTACH", - /* 276 */ "BEFORE", - /* 277 */ "BEGIN", - /* 278 */ "BITAND", - /* 279 */ "BITNOT", - /* 280 */ "BITOR", - /* 281 */ "BLOCKS", - /* 282 */ "CHANGE", - /* 283 */ "COMMA", - /* 284 */ "CONCAT", - /* 285 */ "CONFLICT", - /* 286 */ "COPY", - /* 287 */ "DEFERRED", - /* 288 */ "DELIMITERS", - /* 289 */ "DETACH", - /* 290 */ "DIVIDE", - /* 291 */ "DOT", - /* 292 */ "EACH", - /* 293 */ "FAIL", - /* 294 */ "FILE", - /* 295 */ "FOR", - /* 296 */ "GLOB", - /* 297 */ "ID", - /* 298 */ "IMMEDIATE", - /* 299 */ "IMPORT", - /* 300 */ "INITIALLY", - /* 301 */ "INSTEAD", - /* 302 */ "ISNULL", - /* 303 */ "KEY", - /* 304 */ "MODULES", - /* 305 */ "NK_BITNOT", - /* 306 */ "NK_SEMI", - /* 307 */ "NOTNULL", - /* 308 */ "OF", - /* 309 */ "PLUS", - /* 310 */ "PRIVILEGE", - /* 311 */ "RAISE", - /* 312 */ "REPLACE", - /* 313 */ "RESTRICT", - /* 314 */ "ROW", - /* 315 */ "SEMI", - /* 316 */ "STAR", - /* 317 */ "STATEMENT", - /* 318 */ "STRICT", - /* 319 */ "STRING", - /* 320 */ "TIMES", - /* 321 */ "UPDATE", - /* 322 */ "VALUES", - /* 323 */ "VARIABLE", - /* 324 */ "VIEW", - /* 325 */ "WAL", - /* 326 */ "cmd", - /* 327 */ "account_options", - /* 328 */ "alter_account_options", - /* 329 */ "literal", - /* 330 */ "alter_account_option", - /* 331 */ "user_name", - /* 332 */ "sysinfo_opt", - /* 333 */ "privileges", - /* 334 */ "priv_level", - /* 335 */ "priv_type_list", - /* 336 */ "priv_type", - /* 337 */ "db_name", - /* 338 */ "topic_name", - /* 339 */ "dnode_endpoint", - /* 340 */ "force_opt", - /* 341 */ "not_exists_opt", - /* 342 */ "db_options", - /* 343 */ "exists_opt", - /* 344 */ "alter_db_options", - /* 345 */ "speed_opt", - /* 346 */ "integer_list", - /* 347 */ "variable_list", - /* 348 */ "retention_list", - /* 349 */ "alter_db_option", - /* 350 */ "retention", - /* 351 */ "full_table_name", - /* 352 */ "column_def_list", - /* 353 */ "tags_def_opt", - /* 354 */ "table_options", - /* 355 */ "multi_create_clause", - /* 356 */ "tags_def", - /* 357 */ "multi_drop_clause", - /* 358 */ "alter_table_clause", - /* 359 */ "alter_table_options", - /* 360 */ "column_name", - /* 361 */ "type_name", - /* 362 */ "signed_literal", - /* 363 */ "create_subtable_clause", - /* 364 */ "specific_cols_opt", - /* 365 */ "expression_list", - /* 366 */ "drop_table_clause", - /* 367 */ "col_name_list", - /* 368 */ "table_name", - /* 369 */ "column_def", - /* 370 */ "duration_list", - /* 371 */ "rollup_func_list", - /* 372 */ "alter_table_option", - /* 373 */ "duration_literal", - /* 374 */ "rollup_func_name", - /* 375 */ "function_name", - /* 376 */ "col_name", - /* 377 */ "db_name_cond_opt", - /* 378 */ "like_pattern_opt", - /* 379 */ "table_name_cond", - /* 380 */ "from_db_opt", - /* 381 */ "tag_list_opt", - /* 382 */ "tag_item", - /* 383 */ "column_alias", - /* 384 */ "full_index_name", - /* 385 */ "index_options", - /* 386 */ "index_name", - /* 387 */ "func_list", - /* 388 */ "sliding_opt", - /* 389 */ "sma_stream_opt", - /* 390 */ "func", - /* 391 */ "sma_func_name", - /* 392 */ "query_or_subquery", - /* 393 */ "cgroup_name", - /* 394 */ "analyze_opt", - /* 395 */ "explain_options", - /* 396 */ "insert_query", - /* 397 */ "agg_func_opt", - /* 398 */ "bufsize_opt", - /* 399 */ "stream_name", - /* 400 */ "stream_options", - /* 401 */ "col_list_opt", - /* 402 */ "tag_def_or_ref_opt", - /* 403 */ "subtable_opt", - /* 404 */ "expression", - /* 405 */ "dnode_list", - /* 406 */ "where_clause_opt", - /* 407 */ "signed", - /* 408 */ "literal_func", - /* 409 */ "literal_list", - /* 410 */ "table_alias", - /* 411 */ "expr_or_subquery", - /* 412 */ "pseudo_column", - /* 413 */ "column_reference", - /* 414 */ "function_expression", - /* 415 */ "case_when_expression", - /* 416 */ "star_func", - /* 417 */ "star_func_para_list", - /* 418 */ "noarg_func", - /* 419 */ "other_para_list", - /* 420 */ "star_func_para", - /* 421 */ "when_then_list", - /* 422 */ "case_when_else_opt", - /* 423 */ "common_expression", - /* 424 */ "when_then_expr", - /* 425 */ "predicate", - /* 426 */ "compare_op", - /* 427 */ "in_op", - /* 428 */ "in_predicate_value", - /* 429 */ "boolean_value_expression", - /* 430 */ "boolean_primary", - /* 431 */ "from_clause_opt", - /* 432 */ "table_reference_list", - /* 433 */ "table_reference", - /* 434 */ "table_primary", - /* 435 */ "joined_table", - /* 436 */ "alias_opt", - /* 437 */ "subquery", - /* 438 */ "parenthesized_joined_table", - /* 439 */ "join_type", - /* 440 */ "search_condition", - /* 441 */ "query_specification", - /* 442 */ "set_quantifier_opt", - /* 443 */ "select_list", - /* 444 */ "partition_by_clause_opt", - /* 445 */ "range_opt", - /* 446 */ "every_opt", - /* 447 */ "fill_opt", - /* 448 */ "twindow_clause_opt", - /* 449 */ "group_by_clause_opt", - /* 450 */ "having_clause_opt", - /* 451 */ "select_item", - /* 452 */ "partition_list", - /* 453 */ "partition_item", - /* 454 */ "fill_mode", - /* 455 */ "group_by_list", - /* 456 */ "query_expression", - /* 457 */ "query_simple", - /* 458 */ "order_by_clause_opt", - /* 459 */ "slimit_clause_opt", - /* 460 */ "limit_clause_opt", - /* 461 */ "union_query_expression", - /* 462 */ "query_simple_or_subquery", - /* 463 */ "sort_specification_list", - /* 464 */ "sort_specification", - /* 465 */ "ordering_specification_opt", - /* 466 */ "null_ordering_opt", + /* 259 */ "VALUE_F", + /* 260 */ "NONE", + /* 261 */ "PREV", + /* 262 */ "NULL_F", + /* 263 */ "LINEAR", + /* 264 */ "NEXT", + /* 265 */ "HAVING", + /* 266 */ "RANGE", + /* 267 */ "EVERY", + /* 268 */ "ORDER", + /* 269 */ "SLIMIT", + /* 270 */ "SOFFSET", + /* 271 */ "LIMIT", + /* 272 */ "OFFSET", + /* 273 */ "ASC", + /* 274 */ "NULLS", + /* 275 */ "ABORT", + /* 276 */ "AFTER", + /* 277 */ "ATTACH", + /* 278 */ "BEFORE", + /* 279 */ "BEGIN", + /* 280 */ "BITAND", + /* 281 */ "BITNOT", + /* 282 */ "BITOR", + /* 283 */ "BLOCKS", + /* 284 */ "CHANGE", + /* 285 */ "COMMA", + /* 286 */ "CONCAT", + /* 287 */ "CONFLICT", + /* 288 */ "COPY", + /* 289 */ "DEFERRED", + /* 290 */ "DELIMITERS", + /* 291 */ "DETACH", + /* 292 */ "DIVIDE", + /* 293 */ "DOT", + /* 294 */ "EACH", + /* 295 */ "FAIL", + /* 296 */ "FILE", + /* 297 */ "FOR", + /* 298 */ "GLOB", + /* 299 */ "ID", + /* 300 */ "IMMEDIATE", + /* 301 */ "IMPORT", + /* 302 */ "INITIALLY", + /* 303 */ "INSTEAD", + /* 304 */ "ISNULL", + /* 305 */ "KEY", + /* 306 */ "MODULES", + /* 307 */ "NK_BITNOT", + /* 308 */ "NK_SEMI", + /* 309 */ "NOTNULL", + /* 310 */ "OF", + /* 311 */ "PLUS", + /* 312 */ "PRIVILEGE", + /* 313 */ "RAISE", + /* 314 */ "REPLACE", + /* 315 */ "RESTRICT", + /* 316 */ "ROW", + /* 317 */ "SEMI", + /* 318 */ "STAR", + /* 319 */ "STATEMENT", + /* 320 */ "STRICT", + /* 321 */ "STRING", + /* 322 */ "TIMES", + /* 323 */ "UPDATE", + /* 324 */ "VALUES", + /* 325 */ "VARIABLE", + /* 326 */ "VIEW", + /* 327 */ "WAL", + /* 328 */ "cmd", + /* 329 */ "account_options", + /* 330 */ "alter_account_options", + /* 331 */ "literal", + /* 332 */ "alter_account_option", + /* 333 */ "user_name", + /* 334 */ "sysinfo_opt", + /* 335 */ "privileges", + /* 336 */ "priv_level", + /* 337 */ "priv_type_list", + /* 338 */ "priv_type", + /* 339 */ "db_name", + /* 340 */ "topic_name", + /* 341 */ "dnode_endpoint", + /* 342 */ "force_opt", + /* 343 */ "not_exists_opt", + /* 344 */ "db_options", + /* 345 */ "exists_opt", + /* 346 */ "alter_db_options", + /* 347 */ "speed_opt", + /* 348 */ "integer_list", + /* 349 */ "variable_list", + /* 350 */ "retention_list", + /* 351 */ "alter_db_option", + /* 352 */ "retention", + /* 353 */ "full_table_name", + /* 354 */ "column_def_list", + /* 355 */ "tags_def_opt", + /* 356 */ "table_options", + /* 357 */ "multi_create_clause", + /* 358 */ "tags_def", + /* 359 */ "multi_drop_clause", + /* 360 */ "alter_table_clause", + /* 361 */ "alter_table_options", + /* 362 */ "column_name", + /* 363 */ "type_name", + /* 364 */ "signed_literal", + /* 365 */ "create_subtable_clause", + /* 366 */ "specific_cols_opt", + /* 367 */ "expression_list", + /* 368 */ "drop_table_clause", + /* 369 */ "col_name_list", + /* 370 */ "table_name", + /* 371 */ "column_def", + /* 372 */ "duration_list", + /* 373 */ "rollup_func_list", + /* 374 */ "alter_table_option", + /* 375 */ "duration_literal", + /* 376 */ "rollup_func_name", + /* 377 */ "function_name", + /* 378 */ "col_name", + /* 379 */ "db_name_cond_opt", + /* 380 */ "like_pattern_opt", + /* 381 */ "table_name_cond", + /* 382 */ "from_db_opt", + /* 383 */ "tag_list_opt", + /* 384 */ "tag_item", + /* 385 */ "column_alias", + /* 386 */ "full_index_name", + /* 387 */ "index_options", + /* 388 */ "index_name", + /* 389 */ "func_list", + /* 390 */ "sliding_opt", + /* 391 */ "sma_stream_opt", + /* 392 */ "func", + /* 393 */ "sma_func_name", + /* 394 */ "query_or_subquery", + /* 395 */ "cgroup_name", + /* 396 */ "analyze_opt", + /* 397 */ "explain_options", + /* 398 */ "insert_query", + /* 399 */ "agg_func_opt", + /* 400 */ "bufsize_opt", + /* 401 */ "stream_name", + /* 402 */ "stream_options", + /* 403 */ "col_list_opt", + /* 404 */ "tag_def_or_ref_opt", + /* 405 */ "subtable_opt", + /* 406 */ "expression", + /* 407 */ "dnode_list", + /* 408 */ "where_clause_opt", + /* 409 */ "signed", + /* 410 */ "literal_func", + /* 411 */ "literal_list", + /* 412 */ "table_alias", + /* 413 */ "expr_or_subquery", + /* 414 */ "pseudo_column", + /* 415 */ "column_reference", + /* 416 */ "function_expression", + /* 417 */ "case_when_expression", + /* 418 */ "star_func", + /* 419 */ "star_func_para_list", + /* 420 */ "noarg_func", + /* 421 */ "other_para_list", + /* 422 */ "star_func_para", + /* 423 */ "when_then_list", + /* 424 */ "case_when_else_opt", + /* 425 */ "common_expression", + /* 426 */ "when_then_expr", + /* 427 */ "predicate", + /* 428 */ "compare_op", + /* 429 */ "in_op", + /* 430 */ "in_predicate_value", + /* 431 */ "boolean_value_expression", + /* 432 */ "boolean_primary", + /* 433 */ "from_clause_opt", + /* 434 */ "table_reference_list", + /* 435 */ "table_reference", + /* 436 */ "table_primary", + /* 437 */ "joined_table", + /* 438 */ "alias_opt", + /* 439 */ "subquery", + /* 440 */ "parenthesized_joined_table", + /* 441 */ "join_type", + /* 442 */ "search_condition", + /* 443 */ "query_specification", + /* 444 */ "set_quantifier_opt", + /* 445 */ "select_list", + /* 446 */ "partition_by_clause_opt", + /* 447 */ "range_opt", + /* 448 */ "every_opt", + /* 449 */ "fill_opt", + /* 450 */ "twindow_clause_opt", + /* 451 */ "group_by_clause_opt", + /* 452 */ "having_clause_opt", + /* 453 */ "select_item", + /* 454 */ "partition_list", + /* 455 */ "partition_item", + /* 456 */ "fill_mode", + /* 457 */ "group_by_list", + /* 458 */ "query_expression", + /* 459 */ "query_simple", + /* 460 */ "order_by_clause_opt", + /* 461 */ "slimit_clause_opt", + /* 462 */ "limit_clause_opt", + /* 463 */ "union_query_expression", + /* 464 */ "query_simple_or_subquery", + /* 465 */ "sort_specification_list", + /* 466 */ "sort_specification", + /* 467 */ "ordering_specification_opt", + /* 468 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2390,52 +2402,54 @@ static const char *const yyRuleName[] = { /* 510 */ "fill_opt ::=", /* 511 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", /* 512 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 513 */ "fill_mode ::= NONE", - /* 514 */ "fill_mode ::= PREV", - /* 515 */ "fill_mode ::= NULL", - /* 516 */ "fill_mode ::= LINEAR", - /* 517 */ "fill_mode ::= NEXT", - /* 518 */ "group_by_clause_opt ::=", - /* 519 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 520 */ "group_by_list ::= expr_or_subquery", - /* 521 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 522 */ "having_clause_opt ::=", - /* 523 */ "having_clause_opt ::= HAVING search_condition", - /* 524 */ "range_opt ::=", - /* 525 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 526 */ "every_opt ::=", - /* 527 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 528 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 529 */ "query_simple ::= query_specification", - /* 530 */ "query_simple ::= union_query_expression", - /* 531 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 532 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 533 */ "query_simple_or_subquery ::= query_simple", - /* 534 */ "query_simple_or_subquery ::= subquery", - /* 535 */ "query_or_subquery ::= query_expression", - /* 536 */ "query_or_subquery ::= subquery", - /* 537 */ "order_by_clause_opt ::=", - /* 538 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 539 */ "slimit_clause_opt ::=", - /* 540 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 541 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 542 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 543 */ "limit_clause_opt ::=", - /* 544 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 545 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 546 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 547 */ "subquery ::= NK_LP query_expression NK_RP", - /* 548 */ "subquery ::= NK_LP subquery NK_RP", - /* 549 */ "search_condition ::= common_expression", - /* 550 */ "sort_specification_list ::= sort_specification", - /* 551 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 552 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 553 */ "ordering_specification_opt ::=", - /* 554 */ "ordering_specification_opt ::= ASC", - /* 555 */ "ordering_specification_opt ::= DESC", - /* 556 */ "null_ordering_opt ::=", - /* 557 */ "null_ordering_opt ::= NULLS FIRST", - /* 558 */ "null_ordering_opt ::= NULLS LAST", + /* 513 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP", + /* 514 */ "fill_mode ::= NONE", + /* 515 */ "fill_mode ::= PREV", + /* 516 */ "fill_mode ::= NULL", + /* 517 */ "fill_mode ::= NULL_F", + /* 518 */ "fill_mode ::= LINEAR", + /* 519 */ "fill_mode ::= NEXT", + /* 520 */ "group_by_clause_opt ::=", + /* 521 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 522 */ "group_by_list ::= expr_or_subquery", + /* 523 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 524 */ "having_clause_opt ::=", + /* 525 */ "having_clause_opt ::= HAVING search_condition", + /* 526 */ "range_opt ::=", + /* 527 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 528 */ "every_opt ::=", + /* 529 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 530 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 531 */ "query_simple ::= query_specification", + /* 532 */ "query_simple ::= union_query_expression", + /* 533 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 534 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 535 */ "query_simple_or_subquery ::= query_simple", + /* 536 */ "query_simple_or_subquery ::= subquery", + /* 537 */ "query_or_subquery ::= query_expression", + /* 538 */ "query_or_subquery ::= subquery", + /* 539 */ "order_by_clause_opt ::=", + /* 540 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 541 */ "slimit_clause_opt ::=", + /* 542 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 543 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 544 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 545 */ "limit_clause_opt ::=", + /* 546 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 547 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 548 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 549 */ "subquery ::= NK_LP query_expression NK_RP", + /* 550 */ "subquery ::= NK_LP subquery NK_RP", + /* 551 */ "search_condition ::= common_expression", + /* 552 */ "sort_specification_list ::= sort_specification", + /* 553 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 554 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 555 */ "ordering_specification_opt ::=", + /* 556 */ "ordering_specification_opt ::= ASC", + /* 557 */ "ordering_specification_opt ::= DESC", + /* 558 */ "null_ordering_opt ::=", + /* 559 */ "null_ordering_opt ::= NULLS FIRST", + /* 560 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2562,199 +2576,199 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 326: /* cmd */ - case 329: /* literal */ - case 342: /* db_options */ - case 344: /* alter_db_options */ - case 350: /* retention */ - case 351: /* full_table_name */ - case 354: /* table_options */ - case 358: /* alter_table_clause */ - case 359: /* alter_table_options */ - case 362: /* signed_literal */ - case 363: /* create_subtable_clause */ - case 366: /* drop_table_clause */ - case 369: /* column_def */ - case 373: /* duration_literal */ - case 374: /* rollup_func_name */ - case 376: /* col_name */ - case 377: /* db_name_cond_opt */ - case 378: /* like_pattern_opt */ - case 379: /* table_name_cond */ - case 380: /* from_db_opt */ - case 382: /* tag_item */ - case 384: /* full_index_name */ - case 385: /* index_options */ - case 388: /* sliding_opt */ - case 389: /* sma_stream_opt */ - case 390: /* func */ - case 392: /* query_or_subquery */ - case 395: /* explain_options */ - case 396: /* insert_query */ - case 400: /* stream_options */ - case 403: /* subtable_opt */ - case 404: /* expression */ - case 406: /* where_clause_opt */ - case 407: /* signed */ - case 408: /* literal_func */ - case 411: /* expr_or_subquery */ - case 412: /* pseudo_column */ - case 413: /* column_reference */ - case 414: /* function_expression */ - case 415: /* case_when_expression */ - case 420: /* star_func_para */ - case 422: /* case_when_else_opt */ - case 423: /* common_expression */ - case 424: /* when_then_expr */ - case 425: /* predicate */ - case 428: /* in_predicate_value */ - case 429: /* boolean_value_expression */ - case 430: /* boolean_primary */ - case 431: /* from_clause_opt */ - case 432: /* table_reference_list */ - case 433: /* table_reference */ - case 434: /* table_primary */ - case 435: /* joined_table */ - case 437: /* subquery */ - case 438: /* parenthesized_joined_table */ - case 440: /* search_condition */ - case 441: /* query_specification */ - case 445: /* range_opt */ - case 446: /* every_opt */ - case 447: /* fill_opt */ - case 448: /* twindow_clause_opt */ - case 450: /* having_clause_opt */ - case 451: /* select_item */ - case 453: /* partition_item */ - case 456: /* query_expression */ - case 457: /* query_simple */ - case 459: /* slimit_clause_opt */ - case 460: /* limit_clause_opt */ - case 461: /* union_query_expression */ - case 462: /* query_simple_or_subquery */ - case 464: /* sort_specification */ + case 328: /* cmd */ + case 331: /* literal */ + case 344: /* db_options */ + case 346: /* alter_db_options */ + case 352: /* retention */ + case 353: /* full_table_name */ + case 356: /* table_options */ + case 360: /* alter_table_clause */ + case 361: /* alter_table_options */ + case 364: /* signed_literal */ + case 365: /* create_subtable_clause */ + case 368: /* drop_table_clause */ + case 371: /* column_def */ + case 375: /* duration_literal */ + case 376: /* rollup_func_name */ + case 378: /* col_name */ + case 379: /* db_name_cond_opt */ + case 380: /* like_pattern_opt */ + case 381: /* table_name_cond */ + case 382: /* from_db_opt */ + case 384: /* tag_item */ + case 386: /* full_index_name */ + case 387: /* index_options */ + case 390: /* sliding_opt */ + case 391: /* sma_stream_opt */ + case 392: /* func */ + case 394: /* query_or_subquery */ + case 397: /* explain_options */ + case 398: /* insert_query */ + case 402: /* stream_options */ + case 405: /* subtable_opt */ + case 406: /* expression */ + case 408: /* where_clause_opt */ + case 409: /* signed */ + case 410: /* literal_func */ + case 413: /* expr_or_subquery */ + case 414: /* pseudo_column */ + case 415: /* column_reference */ + case 416: /* function_expression */ + case 417: /* case_when_expression */ + case 422: /* star_func_para */ + case 424: /* case_when_else_opt */ + case 425: /* common_expression */ + case 426: /* when_then_expr */ + case 427: /* predicate */ + case 430: /* in_predicate_value */ + case 431: /* boolean_value_expression */ + case 432: /* boolean_primary */ + case 433: /* from_clause_opt */ + case 434: /* table_reference_list */ + case 435: /* table_reference */ + case 436: /* table_primary */ + case 437: /* joined_table */ + case 439: /* subquery */ + case 440: /* parenthesized_joined_table */ + case 442: /* search_condition */ + case 443: /* query_specification */ + case 447: /* range_opt */ + case 448: /* every_opt */ + case 449: /* fill_opt */ + case 450: /* twindow_clause_opt */ + case 452: /* having_clause_opt */ + case 453: /* select_item */ + case 455: /* partition_item */ + case 458: /* query_expression */ + case 459: /* query_simple */ + case 461: /* slimit_clause_opt */ + case 462: /* limit_clause_opt */ + case 463: /* union_query_expression */ + case 464: /* query_simple_or_subquery */ + case 466: /* sort_specification */ { - nodesDestroyNode((yypminor->yy44)); + nodesDestroyNode((yypminor->yy42)); } break; - case 327: /* account_options */ - case 328: /* alter_account_options */ - case 330: /* alter_account_option */ - case 345: /* speed_opt */ - case 398: /* bufsize_opt */ + case 329: /* account_options */ + case 330: /* alter_account_options */ + case 332: /* alter_account_option */ + case 347: /* speed_opt */ + case 400: /* bufsize_opt */ { } break; - case 331: /* user_name */ - case 334: /* priv_level */ - case 337: /* db_name */ - case 338: /* topic_name */ - case 339: /* dnode_endpoint */ - case 360: /* column_name */ - case 368: /* table_name */ - case 375: /* function_name */ - case 383: /* column_alias */ - case 386: /* index_name */ - case 391: /* sma_func_name */ - case 393: /* cgroup_name */ - case 399: /* stream_name */ - case 410: /* table_alias */ - case 416: /* star_func */ - case 418: /* noarg_func */ - case 436: /* alias_opt */ + case 333: /* user_name */ + case 336: /* priv_level */ + case 339: /* db_name */ + case 340: /* topic_name */ + case 341: /* dnode_endpoint */ + case 362: /* column_name */ + case 370: /* table_name */ + case 377: /* function_name */ + case 385: /* column_alias */ + case 388: /* index_name */ + case 393: /* sma_func_name */ + case 395: /* cgroup_name */ + case 401: /* stream_name */ + case 412: /* table_alias */ + case 418: /* star_func */ + case 420: /* noarg_func */ + case 438: /* alias_opt */ { } break; - case 332: /* sysinfo_opt */ + case 334: /* sysinfo_opt */ { } break; - case 333: /* privileges */ - case 335: /* priv_type_list */ - case 336: /* priv_type */ + case 335: /* privileges */ + case 337: /* priv_type_list */ + case 338: /* priv_type */ { } break; - case 340: /* force_opt */ - case 341: /* not_exists_opt */ - case 343: /* exists_opt */ - case 394: /* analyze_opt */ - case 397: /* agg_func_opt */ - case 442: /* set_quantifier_opt */ + case 342: /* force_opt */ + case 343: /* not_exists_opt */ + case 345: /* exists_opt */ + case 396: /* analyze_opt */ + case 399: /* agg_func_opt */ + case 444: /* set_quantifier_opt */ { } break; - case 346: /* integer_list */ - case 347: /* variable_list */ - case 348: /* retention_list */ - case 352: /* column_def_list */ - case 353: /* tags_def_opt */ - case 355: /* multi_create_clause */ - case 356: /* tags_def */ - case 357: /* multi_drop_clause */ - case 364: /* specific_cols_opt */ - case 365: /* expression_list */ - case 367: /* col_name_list */ - case 370: /* duration_list */ - case 371: /* rollup_func_list */ - case 381: /* tag_list_opt */ - case 387: /* func_list */ - case 401: /* col_list_opt */ - case 402: /* tag_def_or_ref_opt */ - case 405: /* dnode_list */ - case 409: /* literal_list */ - case 417: /* star_func_para_list */ - case 419: /* other_para_list */ - case 421: /* when_then_list */ - case 443: /* select_list */ - case 444: /* partition_by_clause_opt */ - case 449: /* group_by_clause_opt */ - case 452: /* partition_list */ - case 455: /* group_by_list */ - case 458: /* order_by_clause_opt */ - case 463: /* sort_specification_list */ + case 348: /* integer_list */ + case 349: /* variable_list */ + case 350: /* retention_list */ + case 354: /* column_def_list */ + case 355: /* tags_def_opt */ + case 357: /* multi_create_clause */ + case 358: /* tags_def */ + case 359: /* multi_drop_clause */ + case 366: /* specific_cols_opt */ + case 367: /* expression_list */ + case 369: /* col_name_list */ + case 372: /* duration_list */ + case 373: /* rollup_func_list */ + case 383: /* tag_list_opt */ + case 389: /* func_list */ + case 403: /* col_list_opt */ + case 404: /* tag_def_or_ref_opt */ + case 407: /* dnode_list */ + case 411: /* literal_list */ + case 419: /* star_func_para_list */ + case 421: /* other_para_list */ + case 423: /* when_then_list */ + case 445: /* select_list */ + case 446: /* partition_by_clause_opt */ + case 451: /* group_by_clause_opt */ + case 454: /* partition_list */ + case 457: /* group_by_list */ + case 460: /* order_by_clause_opt */ + case 465: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy684)); + nodesDestroyList((yypminor->yy110)); } break; - case 349: /* alter_db_option */ - case 372: /* alter_table_option */ + case 351: /* alter_db_option */ + case 374: /* alter_table_option */ { } break; - case 361: /* type_name */ + case 363: /* type_name */ { } break; - case 426: /* compare_op */ - case 427: /* in_op */ + case 428: /* compare_op */ + case 429: /* in_op */ { } break; - case 439: /* join_type */ + case 441: /* join_type */ { } break; - case 454: /* fill_mode */ + case 456: /* fill_mode */ { } break; - case 465: /* ordering_specification_opt */ + case 467: /* ordering_specification_opt */ { } break; - case 466: /* null_ordering_opt */ + case 468: /* null_ordering_opt */ { } @@ -3053,565 +3067,567 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 326, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 326, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 327, 0 }, /* (2) account_options ::= */ - { 327, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 327, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 327, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 327, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 327, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 327, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 327, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 327, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 327, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 328, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 328, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 330, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 330, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 330, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 330, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 330, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 330, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 330, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 330, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 330, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 330, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 326, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ - { 326, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 326, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - { 326, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - { 326, -3 }, /* (28) cmd ::= DROP USER user_name */ - { 332, 0 }, /* (29) sysinfo_opt ::= */ - { 332, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ - { 326, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 326, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 333, -1 }, /* (33) privileges ::= ALL */ - { 333, -1 }, /* (34) privileges ::= priv_type_list */ - { 333, -1 }, /* (35) privileges ::= SUBSCRIBE */ - { 335, -1 }, /* (36) priv_type_list ::= priv_type */ - { 335, -3 }, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 336, -1 }, /* (38) priv_type ::= READ */ - { 336, -1 }, /* (39) priv_type ::= WRITE */ - { 334, -3 }, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 334, -3 }, /* (41) priv_level ::= db_name NK_DOT NK_STAR */ - { 334, -1 }, /* (42) priv_level ::= topic_name */ - { 326, -3 }, /* (43) cmd ::= CREATE DNODE dnode_endpoint */ - { 326, -5 }, /* (44) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - { 326, -4 }, /* (45) cmd ::= DROP DNODE NK_INTEGER force_opt */ - { 326, -4 }, /* (46) cmd ::= DROP DNODE dnode_endpoint force_opt */ - { 326, -4 }, /* (47) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 326, -5 }, /* (48) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 326, -4 }, /* (49) cmd ::= ALTER ALL DNODES NK_STRING */ - { 326, -5 }, /* (50) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 339, -1 }, /* (51) dnode_endpoint ::= NK_STRING */ - { 339, -1 }, /* (52) dnode_endpoint ::= NK_ID */ - { 339, -1 }, /* (53) dnode_endpoint ::= NK_IPTOKEN */ - { 340, 0 }, /* (54) force_opt ::= */ - { 340, -1 }, /* (55) force_opt ::= FORCE */ - { 326, -3 }, /* (56) cmd ::= ALTER LOCAL NK_STRING */ - { 326, -4 }, /* (57) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 326, -5 }, /* (58) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (59) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (60) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (61) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (62) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (63) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (64) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (65) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 326, -5 }, /* (66) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 326, -4 }, /* (67) cmd ::= DROP DATABASE exists_opt db_name */ - { 326, -2 }, /* (68) cmd ::= USE db_name */ - { 326, -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 326, -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */ - { 326, -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */ - { 326, -3 }, /* (72) cmd ::= COMPACT DATABASE db_name */ - { 341, -3 }, /* (73) not_exists_opt ::= IF NOT EXISTS */ - { 341, 0 }, /* (74) not_exists_opt ::= */ - { 343, -2 }, /* (75) exists_opt ::= IF EXISTS */ - { 343, 0 }, /* (76) exists_opt ::= */ - { 342, 0 }, /* (77) db_options ::= */ - { 342, -3 }, /* (78) db_options ::= db_options BUFFER NK_INTEGER */ - { 342, -3 }, /* (79) db_options ::= db_options CACHEMODEL NK_STRING */ - { 342, -3 }, /* (80) db_options ::= db_options CACHESIZE NK_INTEGER */ - { 342, -3 }, /* (81) db_options ::= db_options COMP NK_INTEGER */ - { 342, -3 }, /* (82) db_options ::= db_options DURATION NK_INTEGER */ - { 342, -3 }, /* (83) db_options ::= db_options DURATION NK_VARIABLE */ - { 342, -3 }, /* (84) db_options ::= db_options MAXROWS NK_INTEGER */ - { 342, -3 }, /* (85) db_options ::= db_options MINROWS NK_INTEGER */ - { 342, -3 }, /* (86) db_options ::= db_options KEEP integer_list */ - { 342, -3 }, /* (87) db_options ::= db_options KEEP variable_list */ - { 342, -3 }, /* (88) db_options ::= db_options PAGES NK_INTEGER */ - { 342, -3 }, /* (89) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 342, -3 }, /* (90) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ - { 342, -3 }, /* (91) db_options ::= db_options PRECISION NK_STRING */ - { 342, -3 }, /* (92) db_options ::= db_options REPLICA NK_INTEGER */ - { 342, -3 }, /* (93) db_options ::= db_options VGROUPS NK_INTEGER */ - { 342, -3 }, /* (94) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 342, -3 }, /* (95) db_options ::= db_options RETENTIONS retention_list */ - { 342, -3 }, /* (96) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 342, -3 }, /* (97) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - { 342, -3 }, /* (98) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - { 342, -3 }, /* (99) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - { 342, -4 }, /* (100) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - { 342, -3 }, /* (101) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - { 342, -4 }, /* (102) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - { 342, -3 }, /* (103) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - { 342, -3 }, /* (104) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - { 342, -3 }, /* (105) db_options ::= db_options STT_TRIGGER NK_INTEGER */ - { 342, -3 }, /* (106) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ - { 342, -3 }, /* (107) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ - { 344, -1 }, /* (108) alter_db_options ::= alter_db_option */ - { 344, -2 }, /* (109) alter_db_options ::= alter_db_options alter_db_option */ - { 349, -2 }, /* (110) alter_db_option ::= BUFFER NK_INTEGER */ - { 349, -2 }, /* (111) alter_db_option ::= CACHEMODEL NK_STRING */ - { 349, -2 }, /* (112) alter_db_option ::= CACHESIZE NK_INTEGER */ - { 349, -2 }, /* (113) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - { 349, -2 }, /* (114) alter_db_option ::= KEEP integer_list */ - { 349, -2 }, /* (115) alter_db_option ::= KEEP variable_list */ - { 349, -2 }, /* (116) alter_db_option ::= PAGES NK_INTEGER */ - { 349, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ - { 349, -2 }, /* (118) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - { 349, -2 }, /* (119) alter_db_option ::= STT_TRIGGER NK_INTEGER */ - { 346, -1 }, /* (120) integer_list ::= NK_INTEGER */ - { 346, -3 }, /* (121) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 347, -1 }, /* (122) variable_list ::= NK_VARIABLE */ - { 347, -3 }, /* (123) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 348, -1 }, /* (124) retention_list ::= retention */ - { 348, -3 }, /* (125) retention_list ::= retention_list NK_COMMA retention */ - { 350, -3 }, /* (126) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 345, 0 }, /* (127) speed_opt ::= */ - { 345, -2 }, /* (128) speed_opt ::= MAX_SPEED NK_INTEGER */ - { 326, -9 }, /* (129) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 326, -3 }, /* (130) cmd ::= CREATE TABLE multi_create_clause */ - { 326, -9 }, /* (131) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 326, -3 }, /* (132) cmd ::= DROP TABLE multi_drop_clause */ - { 326, -4 }, /* (133) cmd ::= DROP STABLE exists_opt full_table_name */ - { 326, -3 }, /* (134) cmd ::= ALTER TABLE alter_table_clause */ - { 326, -3 }, /* (135) cmd ::= ALTER STABLE alter_table_clause */ - { 358, -2 }, /* (136) alter_table_clause ::= full_table_name alter_table_options */ - { 358, -5 }, /* (137) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 358, -4 }, /* (138) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 358, -5 }, /* (139) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 358, -5 }, /* (140) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 358, -5 }, /* (141) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 358, -4 }, /* (142) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 358, -5 }, /* (143) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 358, -5 }, /* (144) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 358, -6 }, /* (145) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 355, -1 }, /* (146) multi_create_clause ::= create_subtable_clause */ - { 355, -2 }, /* (147) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 363, -10 }, /* (148) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ - { 357, -1 }, /* (149) multi_drop_clause ::= drop_table_clause */ - { 357, -2 }, /* (150) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 366, -2 }, /* (151) drop_table_clause ::= exists_opt full_table_name */ - { 364, 0 }, /* (152) specific_cols_opt ::= */ - { 364, -3 }, /* (153) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 351, -1 }, /* (154) full_table_name ::= table_name */ - { 351, -3 }, /* (155) full_table_name ::= db_name NK_DOT table_name */ - { 352, -1 }, /* (156) column_def_list ::= column_def */ - { 352, -3 }, /* (157) column_def_list ::= column_def_list NK_COMMA column_def */ - { 369, -2 }, /* (158) column_def ::= column_name type_name */ - { 369, -4 }, /* (159) column_def ::= column_name type_name COMMENT NK_STRING */ - { 361, -1 }, /* (160) type_name ::= BOOL */ - { 361, -1 }, /* (161) type_name ::= TINYINT */ - { 361, -1 }, /* (162) type_name ::= SMALLINT */ - { 361, -1 }, /* (163) type_name ::= INT */ - { 361, -1 }, /* (164) type_name ::= INTEGER */ - { 361, -1 }, /* (165) type_name ::= BIGINT */ - { 361, -1 }, /* (166) type_name ::= FLOAT */ - { 361, -1 }, /* (167) type_name ::= DOUBLE */ - { 361, -4 }, /* (168) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 361, -1 }, /* (169) type_name ::= TIMESTAMP */ - { 361, -4 }, /* (170) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 361, -2 }, /* (171) type_name ::= TINYINT UNSIGNED */ - { 361, -2 }, /* (172) type_name ::= SMALLINT UNSIGNED */ - { 361, -2 }, /* (173) type_name ::= INT UNSIGNED */ - { 361, -2 }, /* (174) type_name ::= BIGINT UNSIGNED */ - { 361, -1 }, /* (175) type_name ::= JSON */ - { 361, -4 }, /* (176) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 361, -1 }, /* (177) type_name ::= MEDIUMBLOB */ - { 361, -1 }, /* (178) type_name ::= BLOB */ - { 361, -4 }, /* (179) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 361, -1 }, /* (180) type_name ::= DECIMAL */ - { 361, -4 }, /* (181) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 361, -6 }, /* (182) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 353, 0 }, /* (183) tags_def_opt ::= */ - { 353, -1 }, /* (184) tags_def_opt ::= tags_def */ - { 356, -4 }, /* (185) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 354, 0 }, /* (186) table_options ::= */ - { 354, -3 }, /* (187) table_options ::= table_options COMMENT NK_STRING */ - { 354, -3 }, /* (188) table_options ::= table_options MAX_DELAY duration_list */ - { 354, -3 }, /* (189) table_options ::= table_options WATERMARK duration_list */ - { 354, -5 }, /* (190) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 354, -3 }, /* (191) table_options ::= table_options TTL NK_INTEGER */ - { 354, -5 }, /* (192) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 354, -3 }, /* (193) table_options ::= table_options DELETE_MARK duration_list */ - { 359, -1 }, /* (194) alter_table_options ::= alter_table_option */ - { 359, -2 }, /* (195) alter_table_options ::= alter_table_options alter_table_option */ - { 372, -2 }, /* (196) alter_table_option ::= COMMENT NK_STRING */ - { 372, -2 }, /* (197) alter_table_option ::= TTL NK_INTEGER */ - { 370, -1 }, /* (198) duration_list ::= duration_literal */ - { 370, -3 }, /* (199) duration_list ::= duration_list NK_COMMA duration_literal */ - { 371, -1 }, /* (200) rollup_func_list ::= rollup_func_name */ - { 371, -3 }, /* (201) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 374, -1 }, /* (202) rollup_func_name ::= function_name */ - { 374, -1 }, /* (203) rollup_func_name ::= FIRST */ - { 374, -1 }, /* (204) rollup_func_name ::= LAST */ - { 367, -1 }, /* (205) col_name_list ::= col_name */ - { 367, -3 }, /* (206) col_name_list ::= col_name_list NK_COMMA col_name */ - { 376, -1 }, /* (207) col_name ::= column_name */ - { 326, -2 }, /* (208) cmd ::= SHOW DNODES */ - { 326, -2 }, /* (209) cmd ::= SHOW USERS */ - { 326, -3 }, /* (210) cmd ::= SHOW USER PRIVILEGES */ - { 326, -2 }, /* (211) cmd ::= SHOW DATABASES */ - { 326, -4 }, /* (212) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 326, -4 }, /* (213) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 326, -3 }, /* (214) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 326, -2 }, /* (215) cmd ::= SHOW MNODES */ - { 326, -2 }, /* (216) cmd ::= SHOW QNODES */ - { 326, -2 }, /* (217) cmd ::= SHOW FUNCTIONS */ - { 326, -5 }, /* (218) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 326, -2 }, /* (219) cmd ::= SHOW STREAMS */ - { 326, -2 }, /* (220) cmd ::= SHOW ACCOUNTS */ - { 326, -2 }, /* (221) cmd ::= SHOW APPS */ - { 326, -2 }, /* (222) cmd ::= SHOW CONNECTIONS */ - { 326, -2 }, /* (223) cmd ::= SHOW LICENCES */ - { 326, -2 }, /* (224) cmd ::= SHOW GRANTS */ - { 326, -4 }, /* (225) cmd ::= SHOW CREATE DATABASE db_name */ - { 326, -4 }, /* (226) cmd ::= SHOW CREATE TABLE full_table_name */ - { 326, -4 }, /* (227) cmd ::= SHOW CREATE STABLE full_table_name */ - { 326, -2 }, /* (228) cmd ::= SHOW QUERIES */ - { 326, -2 }, /* (229) cmd ::= SHOW SCORES */ - { 326, -2 }, /* (230) cmd ::= SHOW TOPICS */ - { 326, -2 }, /* (231) cmd ::= SHOW VARIABLES */ - { 326, -3 }, /* (232) cmd ::= SHOW CLUSTER VARIABLES */ - { 326, -3 }, /* (233) cmd ::= SHOW LOCAL VARIABLES */ - { 326, -5 }, /* (234) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ - { 326, -2 }, /* (235) cmd ::= SHOW BNODES */ - { 326, -2 }, /* (236) cmd ::= SHOW SNODES */ - { 326, -2 }, /* (237) cmd ::= SHOW CLUSTER */ - { 326, -2 }, /* (238) cmd ::= SHOW TRANSACTIONS */ - { 326, -4 }, /* (239) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 326, -2 }, /* (240) cmd ::= SHOW CONSUMERS */ - { 326, -2 }, /* (241) cmd ::= SHOW SUBSCRIPTIONS */ - { 326, -5 }, /* (242) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 326, -7 }, /* (243) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ - { 326, -3 }, /* (244) cmd ::= SHOW VNODES NK_INTEGER */ - { 326, -3 }, /* (245) cmd ::= SHOW VNODES NK_STRING */ - { 326, -3 }, /* (246) cmd ::= SHOW db_name_cond_opt ALIVE */ - { 326, -3 }, /* (247) cmd ::= SHOW CLUSTER ALIVE */ - { 377, 0 }, /* (248) db_name_cond_opt ::= */ - { 377, -2 }, /* (249) db_name_cond_opt ::= db_name NK_DOT */ - { 378, 0 }, /* (250) like_pattern_opt ::= */ - { 378, -2 }, /* (251) like_pattern_opt ::= LIKE NK_STRING */ - { 379, -1 }, /* (252) table_name_cond ::= table_name */ - { 380, 0 }, /* (253) from_db_opt ::= */ - { 380, -2 }, /* (254) from_db_opt ::= FROM db_name */ - { 381, 0 }, /* (255) tag_list_opt ::= */ - { 381, -1 }, /* (256) tag_list_opt ::= tag_item */ - { 381, -3 }, /* (257) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ - { 382, -1 }, /* (258) tag_item ::= TBNAME */ - { 382, -1 }, /* (259) tag_item ::= QTAGS */ - { 382, -1 }, /* (260) tag_item ::= column_name */ - { 382, -2 }, /* (261) tag_item ::= column_name column_alias */ - { 382, -3 }, /* (262) tag_item ::= column_name AS column_alias */ - { 326, -8 }, /* (263) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ - { 326, -9 }, /* (264) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ - { 326, -4 }, /* (265) cmd ::= DROP INDEX exists_opt full_index_name */ - { 384, -1 }, /* (266) full_index_name ::= index_name */ - { 384, -3 }, /* (267) full_index_name ::= db_name NK_DOT index_name */ - { 385, -10 }, /* (268) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 385, -12 }, /* (269) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - { 387, -1 }, /* (270) func_list ::= func */ - { 387, -3 }, /* (271) func_list ::= func_list NK_COMMA func */ - { 390, -4 }, /* (272) func ::= sma_func_name NK_LP expression_list NK_RP */ - { 391, -1 }, /* (273) sma_func_name ::= function_name */ - { 391, -1 }, /* (274) sma_func_name ::= COUNT */ - { 391, -1 }, /* (275) sma_func_name ::= FIRST */ - { 391, -1 }, /* (276) sma_func_name ::= LAST */ - { 391, -1 }, /* (277) sma_func_name ::= LAST_ROW */ - { 389, 0 }, /* (278) sma_stream_opt ::= */ - { 389, -3 }, /* (279) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 389, -3 }, /* (280) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 389, -3 }, /* (281) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 326, -6 }, /* (282) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 326, -7 }, /* (283) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 326, -9 }, /* (284) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 326, -7 }, /* (285) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 326, -9 }, /* (286) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 326, -4 }, /* (287) cmd ::= DROP TOPIC exists_opt topic_name */ - { 326, -7 }, /* (288) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 326, -2 }, /* (289) cmd ::= DESC full_table_name */ - { 326, -2 }, /* (290) cmd ::= DESCRIBE full_table_name */ - { 326, -3 }, /* (291) cmd ::= RESET QUERY CACHE */ - { 326, -4 }, /* (292) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 326, -4 }, /* (293) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ - { 394, 0 }, /* (294) analyze_opt ::= */ - { 394, -1 }, /* (295) analyze_opt ::= ANALYZE */ - { 395, 0 }, /* (296) explain_options ::= */ - { 395, -3 }, /* (297) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 395, -3 }, /* (298) explain_options ::= explain_options RATIO NK_FLOAT */ - { 326, -10 }, /* (299) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 326, -4 }, /* (300) cmd ::= DROP FUNCTION exists_opt function_name */ - { 397, 0 }, /* (301) agg_func_opt ::= */ - { 397, -1 }, /* (302) agg_func_opt ::= AGGREGATE */ - { 398, 0 }, /* (303) bufsize_opt ::= */ - { 398, -2 }, /* (304) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 326, -12 }, /* (305) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ - { 326, -4 }, /* (306) cmd ::= DROP STREAM exists_opt stream_name */ - { 401, 0 }, /* (307) col_list_opt ::= */ - { 401, -3 }, /* (308) col_list_opt ::= NK_LP col_name_list NK_RP */ - { 402, 0 }, /* (309) tag_def_or_ref_opt ::= */ - { 402, -1 }, /* (310) tag_def_or_ref_opt ::= tags_def */ - { 402, -4 }, /* (311) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ - { 400, 0 }, /* (312) stream_options ::= */ - { 400, -3 }, /* (313) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 400, -3 }, /* (314) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 400, -4 }, /* (315) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 400, -3 }, /* (316) stream_options ::= stream_options WATERMARK duration_literal */ - { 400, -4 }, /* (317) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 400, -3 }, /* (318) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 403, 0 }, /* (319) subtable_opt ::= */ - { 403, -4 }, /* (320) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 326, -3 }, /* (321) cmd ::= KILL CONNECTION NK_INTEGER */ - { 326, -3 }, /* (322) cmd ::= KILL QUERY NK_STRING */ - { 326, -3 }, /* (323) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 326, -2 }, /* (324) cmd ::= BALANCE VGROUP */ - { 326, -4 }, /* (325) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 326, -4 }, /* (326) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 326, -3 }, /* (327) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 405, -2 }, /* (328) dnode_list ::= DNODE NK_INTEGER */ - { 405, -3 }, /* (329) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 326, -4 }, /* (330) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 326, -1 }, /* (331) cmd ::= query_or_subquery */ - { 326, -1 }, /* (332) cmd ::= insert_query */ - { 396, -7 }, /* (333) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 396, -4 }, /* (334) insert_query ::= INSERT INTO full_table_name query_or_subquery */ - { 329, -1 }, /* (335) literal ::= NK_INTEGER */ - { 329, -1 }, /* (336) literal ::= NK_FLOAT */ - { 329, -1 }, /* (337) literal ::= NK_STRING */ - { 329, -1 }, /* (338) literal ::= NK_BOOL */ - { 329, -2 }, /* (339) literal ::= TIMESTAMP NK_STRING */ - { 329, -1 }, /* (340) literal ::= duration_literal */ - { 329, -1 }, /* (341) literal ::= NULL */ - { 329, -1 }, /* (342) literal ::= NK_QUESTION */ - { 373, -1 }, /* (343) duration_literal ::= NK_VARIABLE */ - { 407, -1 }, /* (344) signed ::= NK_INTEGER */ - { 407, -2 }, /* (345) signed ::= NK_PLUS NK_INTEGER */ - { 407, -2 }, /* (346) signed ::= NK_MINUS NK_INTEGER */ - { 407, -1 }, /* (347) signed ::= NK_FLOAT */ - { 407, -2 }, /* (348) signed ::= NK_PLUS NK_FLOAT */ - { 407, -2 }, /* (349) signed ::= NK_MINUS NK_FLOAT */ - { 362, -1 }, /* (350) signed_literal ::= signed */ - { 362, -1 }, /* (351) signed_literal ::= NK_STRING */ - { 362, -1 }, /* (352) signed_literal ::= NK_BOOL */ - { 362, -2 }, /* (353) signed_literal ::= TIMESTAMP NK_STRING */ - { 362, -1 }, /* (354) signed_literal ::= duration_literal */ - { 362, -1 }, /* (355) signed_literal ::= NULL */ - { 362, -1 }, /* (356) signed_literal ::= literal_func */ - { 362, -1 }, /* (357) signed_literal ::= NK_QUESTION */ - { 409, -1 }, /* (358) literal_list ::= signed_literal */ - { 409, -3 }, /* (359) literal_list ::= literal_list NK_COMMA signed_literal */ - { 337, -1 }, /* (360) db_name ::= NK_ID */ - { 368, -1 }, /* (361) table_name ::= NK_ID */ - { 360, -1 }, /* (362) column_name ::= NK_ID */ - { 375, -1 }, /* (363) function_name ::= NK_ID */ - { 410, -1 }, /* (364) table_alias ::= NK_ID */ - { 383, -1 }, /* (365) column_alias ::= NK_ID */ - { 331, -1 }, /* (366) user_name ::= NK_ID */ - { 338, -1 }, /* (367) topic_name ::= NK_ID */ - { 399, -1 }, /* (368) stream_name ::= NK_ID */ - { 393, -1 }, /* (369) cgroup_name ::= NK_ID */ - { 386, -1 }, /* (370) index_name ::= NK_ID */ - { 411, -1 }, /* (371) expr_or_subquery ::= expression */ - { 404, -1 }, /* (372) expression ::= literal */ - { 404, -1 }, /* (373) expression ::= pseudo_column */ - { 404, -1 }, /* (374) expression ::= column_reference */ - { 404, -1 }, /* (375) expression ::= function_expression */ - { 404, -1 }, /* (376) expression ::= case_when_expression */ - { 404, -3 }, /* (377) expression ::= NK_LP expression NK_RP */ - { 404, -2 }, /* (378) expression ::= NK_PLUS expr_or_subquery */ - { 404, -2 }, /* (379) expression ::= NK_MINUS expr_or_subquery */ - { 404, -3 }, /* (380) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 404, -3 }, /* (381) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 404, -3 }, /* (382) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 404, -3 }, /* (383) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 404, -3 }, /* (384) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 404, -3 }, /* (385) expression ::= column_reference NK_ARROW NK_STRING */ - { 404, -3 }, /* (386) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 404, -3 }, /* (387) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 365, -1 }, /* (388) expression_list ::= expr_or_subquery */ - { 365, -3 }, /* (389) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 413, -1 }, /* (390) column_reference ::= column_name */ - { 413, -3 }, /* (391) column_reference ::= table_name NK_DOT column_name */ - { 412, -1 }, /* (392) pseudo_column ::= ROWTS */ - { 412, -1 }, /* (393) pseudo_column ::= TBNAME */ - { 412, -3 }, /* (394) pseudo_column ::= table_name NK_DOT TBNAME */ - { 412, -1 }, /* (395) pseudo_column ::= QSTART */ - { 412, -1 }, /* (396) pseudo_column ::= QEND */ - { 412, -1 }, /* (397) pseudo_column ::= QDURATION */ - { 412, -1 }, /* (398) pseudo_column ::= WSTART */ - { 412, -1 }, /* (399) pseudo_column ::= WEND */ - { 412, -1 }, /* (400) pseudo_column ::= WDURATION */ - { 412, -1 }, /* (401) pseudo_column ::= IROWTS */ - { 412, -1 }, /* (402) pseudo_column ::= ISFILLED */ - { 412, -1 }, /* (403) pseudo_column ::= QTAGS */ - { 414, -4 }, /* (404) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 414, -4 }, /* (405) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 414, -6 }, /* (406) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 414, -1 }, /* (407) function_expression ::= literal_func */ - { 408, -3 }, /* (408) literal_func ::= noarg_func NK_LP NK_RP */ - { 408, -1 }, /* (409) literal_func ::= NOW */ - { 418, -1 }, /* (410) noarg_func ::= NOW */ - { 418, -1 }, /* (411) noarg_func ::= TODAY */ - { 418, -1 }, /* (412) noarg_func ::= TIMEZONE */ - { 418, -1 }, /* (413) noarg_func ::= DATABASE */ - { 418, -1 }, /* (414) noarg_func ::= CLIENT_VERSION */ - { 418, -1 }, /* (415) noarg_func ::= SERVER_VERSION */ - { 418, -1 }, /* (416) noarg_func ::= SERVER_STATUS */ - { 418, -1 }, /* (417) noarg_func ::= CURRENT_USER */ - { 418, -1 }, /* (418) noarg_func ::= USER */ - { 416, -1 }, /* (419) star_func ::= COUNT */ - { 416, -1 }, /* (420) star_func ::= FIRST */ - { 416, -1 }, /* (421) star_func ::= LAST */ - { 416, -1 }, /* (422) star_func ::= LAST_ROW */ - { 417, -1 }, /* (423) star_func_para_list ::= NK_STAR */ - { 417, -1 }, /* (424) star_func_para_list ::= other_para_list */ - { 419, -1 }, /* (425) other_para_list ::= star_func_para */ - { 419, -3 }, /* (426) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 420, -1 }, /* (427) star_func_para ::= expr_or_subquery */ - { 420, -3 }, /* (428) star_func_para ::= table_name NK_DOT NK_STAR */ - { 415, -4 }, /* (429) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 415, -5 }, /* (430) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 421, -1 }, /* (431) when_then_list ::= when_then_expr */ - { 421, -2 }, /* (432) when_then_list ::= when_then_list when_then_expr */ - { 424, -4 }, /* (433) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 422, 0 }, /* (434) case_when_else_opt ::= */ - { 422, -2 }, /* (435) case_when_else_opt ::= ELSE common_expression */ - { 425, -3 }, /* (436) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 425, -5 }, /* (437) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 425, -6 }, /* (438) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 425, -3 }, /* (439) predicate ::= expr_or_subquery IS NULL */ - { 425, -4 }, /* (440) predicate ::= expr_or_subquery IS NOT NULL */ - { 425, -3 }, /* (441) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 426, -1 }, /* (442) compare_op ::= NK_LT */ - { 426, -1 }, /* (443) compare_op ::= NK_GT */ - { 426, -1 }, /* (444) compare_op ::= NK_LE */ - { 426, -1 }, /* (445) compare_op ::= NK_GE */ - { 426, -1 }, /* (446) compare_op ::= NK_NE */ - { 426, -1 }, /* (447) compare_op ::= NK_EQ */ - { 426, -1 }, /* (448) compare_op ::= LIKE */ - { 426, -2 }, /* (449) compare_op ::= NOT LIKE */ - { 426, -1 }, /* (450) compare_op ::= MATCH */ - { 426, -1 }, /* (451) compare_op ::= NMATCH */ - { 426, -1 }, /* (452) compare_op ::= CONTAINS */ - { 427, -1 }, /* (453) in_op ::= IN */ - { 427, -2 }, /* (454) in_op ::= NOT IN */ - { 428, -3 }, /* (455) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 429, -1 }, /* (456) boolean_value_expression ::= boolean_primary */ - { 429, -2 }, /* (457) boolean_value_expression ::= NOT boolean_primary */ - { 429, -3 }, /* (458) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 429, -3 }, /* (459) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 430, -1 }, /* (460) boolean_primary ::= predicate */ - { 430, -3 }, /* (461) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 423, -1 }, /* (462) common_expression ::= expr_or_subquery */ - { 423, -1 }, /* (463) common_expression ::= boolean_value_expression */ - { 431, 0 }, /* (464) from_clause_opt ::= */ - { 431, -2 }, /* (465) from_clause_opt ::= FROM table_reference_list */ - { 432, -1 }, /* (466) table_reference_list ::= table_reference */ - { 432, -3 }, /* (467) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 433, -1 }, /* (468) table_reference ::= table_primary */ - { 433, -1 }, /* (469) table_reference ::= joined_table */ - { 434, -2 }, /* (470) table_primary ::= table_name alias_opt */ - { 434, -4 }, /* (471) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 434, -2 }, /* (472) table_primary ::= subquery alias_opt */ - { 434, -1 }, /* (473) table_primary ::= parenthesized_joined_table */ - { 436, 0 }, /* (474) alias_opt ::= */ - { 436, -1 }, /* (475) alias_opt ::= table_alias */ - { 436, -2 }, /* (476) alias_opt ::= AS table_alias */ - { 438, -3 }, /* (477) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 438, -3 }, /* (478) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 435, -6 }, /* (479) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 439, 0 }, /* (480) join_type ::= */ - { 439, -1 }, /* (481) join_type ::= INNER */ - { 441, -12 }, /* (482) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 442, 0 }, /* (483) set_quantifier_opt ::= */ - { 442, -1 }, /* (484) set_quantifier_opt ::= DISTINCT */ - { 442, -1 }, /* (485) set_quantifier_opt ::= ALL */ - { 443, -1 }, /* (486) select_list ::= select_item */ - { 443, -3 }, /* (487) select_list ::= select_list NK_COMMA select_item */ - { 451, -1 }, /* (488) select_item ::= NK_STAR */ - { 451, -1 }, /* (489) select_item ::= common_expression */ - { 451, -2 }, /* (490) select_item ::= common_expression column_alias */ - { 451, -3 }, /* (491) select_item ::= common_expression AS column_alias */ - { 451, -3 }, /* (492) select_item ::= table_name NK_DOT NK_STAR */ - { 406, 0 }, /* (493) where_clause_opt ::= */ - { 406, -2 }, /* (494) where_clause_opt ::= WHERE search_condition */ - { 444, 0 }, /* (495) partition_by_clause_opt ::= */ - { 444, -3 }, /* (496) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 452, -1 }, /* (497) partition_list ::= partition_item */ - { 452, -3 }, /* (498) partition_list ::= partition_list NK_COMMA partition_item */ - { 453, -1 }, /* (499) partition_item ::= expr_or_subquery */ - { 453, -2 }, /* (500) partition_item ::= expr_or_subquery column_alias */ - { 453, -3 }, /* (501) partition_item ::= expr_or_subquery AS column_alias */ - { 448, 0 }, /* (502) twindow_clause_opt ::= */ - { 448, -6 }, /* (503) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 448, -4 }, /* (504) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 448, -6 }, /* (505) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 448, -8 }, /* (506) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 448, -7 }, /* (507) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - { 388, 0 }, /* (508) sliding_opt ::= */ - { 388, -4 }, /* (509) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 447, 0 }, /* (510) fill_opt ::= */ - { 447, -4 }, /* (511) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 447, -6 }, /* (512) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 454, -1 }, /* (513) fill_mode ::= NONE */ - { 454, -1 }, /* (514) fill_mode ::= PREV */ - { 454, -1 }, /* (515) fill_mode ::= NULL */ - { 454, -1 }, /* (516) fill_mode ::= LINEAR */ - { 454, -1 }, /* (517) fill_mode ::= NEXT */ - { 449, 0 }, /* (518) group_by_clause_opt ::= */ - { 449, -3 }, /* (519) group_by_clause_opt ::= GROUP BY group_by_list */ - { 455, -1 }, /* (520) group_by_list ::= expr_or_subquery */ - { 455, -3 }, /* (521) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 450, 0 }, /* (522) having_clause_opt ::= */ - { 450, -2 }, /* (523) having_clause_opt ::= HAVING search_condition */ - { 445, 0 }, /* (524) range_opt ::= */ - { 445, -6 }, /* (525) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 446, 0 }, /* (526) every_opt ::= */ - { 446, -4 }, /* (527) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 456, -4 }, /* (528) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 457, -1 }, /* (529) query_simple ::= query_specification */ - { 457, -1 }, /* (530) query_simple ::= union_query_expression */ - { 461, -4 }, /* (531) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 461, -3 }, /* (532) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 462, -1 }, /* (533) query_simple_or_subquery ::= query_simple */ - { 462, -1 }, /* (534) query_simple_or_subquery ::= subquery */ - { 392, -1 }, /* (535) query_or_subquery ::= query_expression */ - { 392, -1 }, /* (536) query_or_subquery ::= subquery */ - { 458, 0 }, /* (537) order_by_clause_opt ::= */ - { 458, -3 }, /* (538) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 459, 0 }, /* (539) slimit_clause_opt ::= */ - { 459, -2 }, /* (540) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 459, -4 }, /* (541) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 459, -4 }, /* (542) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 460, 0 }, /* (543) limit_clause_opt ::= */ - { 460, -2 }, /* (544) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 460, -4 }, /* (545) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 460, -4 }, /* (546) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 437, -3 }, /* (547) subquery ::= NK_LP query_expression NK_RP */ - { 437, -3 }, /* (548) subquery ::= NK_LP subquery NK_RP */ - { 440, -1 }, /* (549) search_condition ::= common_expression */ - { 463, -1 }, /* (550) sort_specification_list ::= sort_specification */ - { 463, -3 }, /* (551) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 464, -3 }, /* (552) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 465, 0 }, /* (553) ordering_specification_opt ::= */ - { 465, -1 }, /* (554) ordering_specification_opt ::= ASC */ - { 465, -1 }, /* (555) ordering_specification_opt ::= DESC */ - { 466, 0 }, /* (556) null_ordering_opt ::= */ - { 466, -2 }, /* (557) null_ordering_opt ::= NULLS FIRST */ - { 466, -2 }, /* (558) null_ordering_opt ::= NULLS LAST */ + { 328, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 328, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 329, 0 }, /* (2) account_options ::= */ + { 329, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 329, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 329, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 329, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 329, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 329, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 329, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 329, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 329, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 330, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 330, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 332, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 332, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 332, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 332, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 332, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 332, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 332, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 332, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 332, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 332, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 328, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ + { 328, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 328, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + { 328, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + { 328, -3 }, /* (28) cmd ::= DROP USER user_name */ + { 334, 0 }, /* (29) sysinfo_opt ::= */ + { 334, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ + { 328, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 328, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 335, -1 }, /* (33) privileges ::= ALL */ + { 335, -1 }, /* (34) privileges ::= priv_type_list */ + { 335, -1 }, /* (35) privileges ::= SUBSCRIBE */ + { 337, -1 }, /* (36) priv_type_list ::= priv_type */ + { 337, -3 }, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 338, -1 }, /* (38) priv_type ::= READ */ + { 338, -1 }, /* (39) priv_type ::= WRITE */ + { 336, -3 }, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 336, -3 }, /* (41) priv_level ::= db_name NK_DOT NK_STAR */ + { 336, -1 }, /* (42) priv_level ::= topic_name */ + { 328, -3 }, /* (43) cmd ::= CREATE DNODE dnode_endpoint */ + { 328, -5 }, /* (44) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + { 328, -4 }, /* (45) cmd ::= DROP DNODE NK_INTEGER force_opt */ + { 328, -4 }, /* (46) cmd ::= DROP DNODE dnode_endpoint force_opt */ + { 328, -4 }, /* (47) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 328, -5 }, /* (48) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 328, -4 }, /* (49) cmd ::= ALTER ALL DNODES NK_STRING */ + { 328, -5 }, /* (50) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 341, -1 }, /* (51) dnode_endpoint ::= NK_STRING */ + { 341, -1 }, /* (52) dnode_endpoint ::= NK_ID */ + { 341, -1 }, /* (53) dnode_endpoint ::= NK_IPTOKEN */ + { 342, 0 }, /* (54) force_opt ::= */ + { 342, -1 }, /* (55) force_opt ::= FORCE */ + { 328, -3 }, /* (56) cmd ::= ALTER LOCAL NK_STRING */ + { 328, -4 }, /* (57) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 328, -5 }, /* (58) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (59) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (60) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (61) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (62) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (63) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (64) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (65) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 328, -5 }, /* (66) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 328, -4 }, /* (67) cmd ::= DROP DATABASE exists_opt db_name */ + { 328, -2 }, /* (68) cmd ::= USE db_name */ + { 328, -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 328, -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */ + { 328, -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */ + { 328, -3 }, /* (72) cmd ::= COMPACT DATABASE db_name */ + { 343, -3 }, /* (73) not_exists_opt ::= IF NOT EXISTS */ + { 343, 0 }, /* (74) not_exists_opt ::= */ + { 345, -2 }, /* (75) exists_opt ::= IF EXISTS */ + { 345, 0 }, /* (76) exists_opt ::= */ + { 344, 0 }, /* (77) db_options ::= */ + { 344, -3 }, /* (78) db_options ::= db_options BUFFER NK_INTEGER */ + { 344, -3 }, /* (79) db_options ::= db_options CACHEMODEL NK_STRING */ + { 344, -3 }, /* (80) db_options ::= db_options CACHESIZE NK_INTEGER */ + { 344, -3 }, /* (81) db_options ::= db_options COMP NK_INTEGER */ + { 344, -3 }, /* (82) db_options ::= db_options DURATION NK_INTEGER */ + { 344, -3 }, /* (83) db_options ::= db_options DURATION NK_VARIABLE */ + { 344, -3 }, /* (84) db_options ::= db_options MAXROWS NK_INTEGER */ + { 344, -3 }, /* (85) db_options ::= db_options MINROWS NK_INTEGER */ + { 344, -3 }, /* (86) db_options ::= db_options KEEP integer_list */ + { 344, -3 }, /* (87) db_options ::= db_options KEEP variable_list */ + { 344, -3 }, /* (88) db_options ::= db_options PAGES NK_INTEGER */ + { 344, -3 }, /* (89) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 344, -3 }, /* (90) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ + { 344, -3 }, /* (91) db_options ::= db_options PRECISION NK_STRING */ + { 344, -3 }, /* (92) db_options ::= db_options REPLICA NK_INTEGER */ + { 344, -3 }, /* (93) db_options ::= db_options VGROUPS NK_INTEGER */ + { 344, -3 }, /* (94) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 344, -3 }, /* (95) db_options ::= db_options RETENTIONS retention_list */ + { 344, -3 }, /* (96) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 344, -3 }, /* (97) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + { 344, -3 }, /* (98) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + { 344, -3 }, /* (99) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + { 344, -4 }, /* (100) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + { 344, -3 }, /* (101) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + { 344, -4 }, /* (102) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + { 344, -3 }, /* (103) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + { 344, -3 }, /* (104) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + { 344, -3 }, /* (105) db_options ::= db_options STT_TRIGGER NK_INTEGER */ + { 344, -3 }, /* (106) db_options ::= db_options TABLE_PREFIX NK_INTEGER */ + { 344, -3 }, /* (107) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ + { 346, -1 }, /* (108) alter_db_options ::= alter_db_option */ + { 346, -2 }, /* (109) alter_db_options ::= alter_db_options alter_db_option */ + { 351, -2 }, /* (110) alter_db_option ::= BUFFER NK_INTEGER */ + { 351, -2 }, /* (111) alter_db_option ::= CACHEMODEL NK_STRING */ + { 351, -2 }, /* (112) alter_db_option ::= CACHESIZE NK_INTEGER */ + { 351, -2 }, /* (113) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + { 351, -2 }, /* (114) alter_db_option ::= KEEP integer_list */ + { 351, -2 }, /* (115) alter_db_option ::= KEEP variable_list */ + { 351, -2 }, /* (116) alter_db_option ::= PAGES NK_INTEGER */ + { 351, -2 }, /* (117) alter_db_option ::= REPLICA NK_INTEGER */ + { 351, -2 }, /* (118) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + { 351, -2 }, /* (119) alter_db_option ::= STT_TRIGGER NK_INTEGER */ + { 348, -1 }, /* (120) integer_list ::= NK_INTEGER */ + { 348, -3 }, /* (121) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 349, -1 }, /* (122) variable_list ::= NK_VARIABLE */ + { 349, -3 }, /* (123) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 350, -1 }, /* (124) retention_list ::= retention */ + { 350, -3 }, /* (125) retention_list ::= retention_list NK_COMMA retention */ + { 352, -3 }, /* (126) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 347, 0 }, /* (127) speed_opt ::= */ + { 347, -2 }, /* (128) speed_opt ::= MAX_SPEED NK_INTEGER */ + { 328, -9 }, /* (129) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 328, -3 }, /* (130) cmd ::= CREATE TABLE multi_create_clause */ + { 328, -9 }, /* (131) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 328, -3 }, /* (132) cmd ::= DROP TABLE multi_drop_clause */ + { 328, -4 }, /* (133) cmd ::= DROP STABLE exists_opt full_table_name */ + { 328, -3 }, /* (134) cmd ::= ALTER TABLE alter_table_clause */ + { 328, -3 }, /* (135) cmd ::= ALTER STABLE alter_table_clause */ + { 360, -2 }, /* (136) alter_table_clause ::= full_table_name alter_table_options */ + { 360, -5 }, /* (137) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 360, -4 }, /* (138) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 360, -5 }, /* (139) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 360, -5 }, /* (140) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 360, -5 }, /* (141) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 360, -4 }, /* (142) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 360, -5 }, /* (143) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 360, -5 }, /* (144) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 360, -6 }, /* (145) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 357, -1 }, /* (146) multi_create_clause ::= create_subtable_clause */ + { 357, -2 }, /* (147) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 365, -10 }, /* (148) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + { 359, -1 }, /* (149) multi_drop_clause ::= drop_table_clause */ + { 359, -2 }, /* (150) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 368, -2 }, /* (151) drop_table_clause ::= exists_opt full_table_name */ + { 366, 0 }, /* (152) specific_cols_opt ::= */ + { 366, -3 }, /* (153) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 353, -1 }, /* (154) full_table_name ::= table_name */ + { 353, -3 }, /* (155) full_table_name ::= db_name NK_DOT table_name */ + { 354, -1 }, /* (156) column_def_list ::= column_def */ + { 354, -3 }, /* (157) column_def_list ::= column_def_list NK_COMMA column_def */ + { 371, -2 }, /* (158) column_def ::= column_name type_name */ + { 371, -4 }, /* (159) column_def ::= column_name type_name COMMENT NK_STRING */ + { 363, -1 }, /* (160) type_name ::= BOOL */ + { 363, -1 }, /* (161) type_name ::= TINYINT */ + { 363, -1 }, /* (162) type_name ::= SMALLINT */ + { 363, -1 }, /* (163) type_name ::= INT */ + { 363, -1 }, /* (164) type_name ::= INTEGER */ + { 363, -1 }, /* (165) type_name ::= BIGINT */ + { 363, -1 }, /* (166) type_name ::= FLOAT */ + { 363, -1 }, /* (167) type_name ::= DOUBLE */ + { 363, -4 }, /* (168) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 363, -1 }, /* (169) type_name ::= TIMESTAMP */ + { 363, -4 }, /* (170) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 363, -2 }, /* (171) type_name ::= TINYINT UNSIGNED */ + { 363, -2 }, /* (172) type_name ::= SMALLINT UNSIGNED */ + { 363, -2 }, /* (173) type_name ::= INT UNSIGNED */ + { 363, -2 }, /* (174) type_name ::= BIGINT UNSIGNED */ + { 363, -1 }, /* (175) type_name ::= JSON */ + { 363, -4 }, /* (176) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 363, -1 }, /* (177) type_name ::= MEDIUMBLOB */ + { 363, -1 }, /* (178) type_name ::= BLOB */ + { 363, -4 }, /* (179) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 363, -1 }, /* (180) type_name ::= DECIMAL */ + { 363, -4 }, /* (181) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 363, -6 }, /* (182) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 355, 0 }, /* (183) tags_def_opt ::= */ + { 355, -1 }, /* (184) tags_def_opt ::= tags_def */ + { 358, -4 }, /* (185) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 356, 0 }, /* (186) table_options ::= */ + { 356, -3 }, /* (187) table_options ::= table_options COMMENT NK_STRING */ + { 356, -3 }, /* (188) table_options ::= table_options MAX_DELAY duration_list */ + { 356, -3 }, /* (189) table_options ::= table_options WATERMARK duration_list */ + { 356, -5 }, /* (190) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 356, -3 }, /* (191) table_options ::= table_options TTL NK_INTEGER */ + { 356, -5 }, /* (192) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 356, -3 }, /* (193) table_options ::= table_options DELETE_MARK duration_list */ + { 361, -1 }, /* (194) alter_table_options ::= alter_table_option */ + { 361, -2 }, /* (195) alter_table_options ::= alter_table_options alter_table_option */ + { 374, -2 }, /* (196) alter_table_option ::= COMMENT NK_STRING */ + { 374, -2 }, /* (197) alter_table_option ::= TTL NK_INTEGER */ + { 372, -1 }, /* (198) duration_list ::= duration_literal */ + { 372, -3 }, /* (199) duration_list ::= duration_list NK_COMMA duration_literal */ + { 373, -1 }, /* (200) rollup_func_list ::= rollup_func_name */ + { 373, -3 }, /* (201) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 376, -1 }, /* (202) rollup_func_name ::= function_name */ + { 376, -1 }, /* (203) rollup_func_name ::= FIRST */ + { 376, -1 }, /* (204) rollup_func_name ::= LAST */ + { 369, -1 }, /* (205) col_name_list ::= col_name */ + { 369, -3 }, /* (206) col_name_list ::= col_name_list NK_COMMA col_name */ + { 378, -1 }, /* (207) col_name ::= column_name */ + { 328, -2 }, /* (208) cmd ::= SHOW DNODES */ + { 328, -2 }, /* (209) cmd ::= SHOW USERS */ + { 328, -3 }, /* (210) cmd ::= SHOW USER PRIVILEGES */ + { 328, -2 }, /* (211) cmd ::= SHOW DATABASES */ + { 328, -4 }, /* (212) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 328, -4 }, /* (213) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 328, -3 }, /* (214) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 328, -2 }, /* (215) cmd ::= SHOW MNODES */ + { 328, -2 }, /* (216) cmd ::= SHOW QNODES */ + { 328, -2 }, /* (217) cmd ::= SHOW FUNCTIONS */ + { 328, -5 }, /* (218) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 328, -2 }, /* (219) cmd ::= SHOW STREAMS */ + { 328, -2 }, /* (220) cmd ::= SHOW ACCOUNTS */ + { 328, -2 }, /* (221) cmd ::= SHOW APPS */ + { 328, -2 }, /* (222) cmd ::= SHOW CONNECTIONS */ + { 328, -2 }, /* (223) cmd ::= SHOW LICENCES */ + { 328, -2 }, /* (224) cmd ::= SHOW GRANTS */ + { 328, -4 }, /* (225) cmd ::= SHOW CREATE DATABASE db_name */ + { 328, -4 }, /* (226) cmd ::= SHOW CREATE TABLE full_table_name */ + { 328, -4 }, /* (227) cmd ::= SHOW CREATE STABLE full_table_name */ + { 328, -2 }, /* (228) cmd ::= SHOW QUERIES */ + { 328, -2 }, /* (229) cmd ::= SHOW SCORES */ + { 328, -2 }, /* (230) cmd ::= SHOW TOPICS */ + { 328, -2 }, /* (231) cmd ::= SHOW VARIABLES */ + { 328, -3 }, /* (232) cmd ::= SHOW CLUSTER VARIABLES */ + { 328, -3 }, /* (233) cmd ::= SHOW LOCAL VARIABLES */ + { 328, -5 }, /* (234) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ + { 328, -2 }, /* (235) cmd ::= SHOW BNODES */ + { 328, -2 }, /* (236) cmd ::= SHOW SNODES */ + { 328, -2 }, /* (237) cmd ::= SHOW CLUSTER */ + { 328, -2 }, /* (238) cmd ::= SHOW TRANSACTIONS */ + { 328, -4 }, /* (239) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 328, -2 }, /* (240) cmd ::= SHOW CONSUMERS */ + { 328, -2 }, /* (241) cmd ::= SHOW SUBSCRIPTIONS */ + { 328, -5 }, /* (242) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 328, -7 }, /* (243) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ + { 328, -3 }, /* (244) cmd ::= SHOW VNODES NK_INTEGER */ + { 328, -3 }, /* (245) cmd ::= SHOW VNODES NK_STRING */ + { 328, -3 }, /* (246) cmd ::= SHOW db_name_cond_opt ALIVE */ + { 328, -3 }, /* (247) cmd ::= SHOW CLUSTER ALIVE */ + { 379, 0 }, /* (248) db_name_cond_opt ::= */ + { 379, -2 }, /* (249) db_name_cond_opt ::= db_name NK_DOT */ + { 380, 0 }, /* (250) like_pattern_opt ::= */ + { 380, -2 }, /* (251) like_pattern_opt ::= LIKE NK_STRING */ + { 381, -1 }, /* (252) table_name_cond ::= table_name */ + { 382, 0 }, /* (253) from_db_opt ::= */ + { 382, -2 }, /* (254) from_db_opt ::= FROM db_name */ + { 383, 0 }, /* (255) tag_list_opt ::= */ + { 383, -1 }, /* (256) tag_list_opt ::= tag_item */ + { 383, -3 }, /* (257) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ + { 384, -1 }, /* (258) tag_item ::= TBNAME */ + { 384, -1 }, /* (259) tag_item ::= QTAGS */ + { 384, -1 }, /* (260) tag_item ::= column_name */ + { 384, -2 }, /* (261) tag_item ::= column_name column_alias */ + { 384, -3 }, /* (262) tag_item ::= column_name AS column_alias */ + { 328, -8 }, /* (263) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ + { 328, -9 }, /* (264) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ + { 328, -4 }, /* (265) cmd ::= DROP INDEX exists_opt full_index_name */ + { 386, -1 }, /* (266) full_index_name ::= index_name */ + { 386, -3 }, /* (267) full_index_name ::= db_name NK_DOT index_name */ + { 387, -10 }, /* (268) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 387, -12 }, /* (269) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + { 389, -1 }, /* (270) func_list ::= func */ + { 389, -3 }, /* (271) func_list ::= func_list NK_COMMA func */ + { 392, -4 }, /* (272) func ::= sma_func_name NK_LP expression_list NK_RP */ + { 393, -1 }, /* (273) sma_func_name ::= function_name */ + { 393, -1 }, /* (274) sma_func_name ::= COUNT */ + { 393, -1 }, /* (275) sma_func_name ::= FIRST */ + { 393, -1 }, /* (276) sma_func_name ::= LAST */ + { 393, -1 }, /* (277) sma_func_name ::= LAST_ROW */ + { 391, 0 }, /* (278) sma_stream_opt ::= */ + { 391, -3 }, /* (279) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 391, -3 }, /* (280) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 391, -3 }, /* (281) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 328, -6 }, /* (282) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 328, -7 }, /* (283) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 328, -9 }, /* (284) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 328, -7 }, /* (285) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 328, -9 }, /* (286) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 328, -4 }, /* (287) cmd ::= DROP TOPIC exists_opt topic_name */ + { 328, -7 }, /* (288) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 328, -2 }, /* (289) cmd ::= DESC full_table_name */ + { 328, -2 }, /* (290) cmd ::= DESCRIBE full_table_name */ + { 328, -3 }, /* (291) cmd ::= RESET QUERY CACHE */ + { 328, -4 }, /* (292) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 328, -4 }, /* (293) cmd ::= EXPLAIN analyze_opt explain_options insert_query */ + { 396, 0 }, /* (294) analyze_opt ::= */ + { 396, -1 }, /* (295) analyze_opt ::= ANALYZE */ + { 397, 0 }, /* (296) explain_options ::= */ + { 397, -3 }, /* (297) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 397, -3 }, /* (298) explain_options ::= explain_options RATIO NK_FLOAT */ + { 328, -10 }, /* (299) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 328, -4 }, /* (300) cmd ::= DROP FUNCTION exists_opt function_name */ + { 399, 0 }, /* (301) agg_func_opt ::= */ + { 399, -1 }, /* (302) agg_func_opt ::= AGGREGATE */ + { 400, 0 }, /* (303) bufsize_opt ::= */ + { 400, -2 }, /* (304) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 328, -12 }, /* (305) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ + { 328, -4 }, /* (306) cmd ::= DROP STREAM exists_opt stream_name */ + { 403, 0 }, /* (307) col_list_opt ::= */ + { 403, -3 }, /* (308) col_list_opt ::= NK_LP col_name_list NK_RP */ + { 404, 0 }, /* (309) tag_def_or_ref_opt ::= */ + { 404, -1 }, /* (310) tag_def_or_ref_opt ::= tags_def */ + { 404, -4 }, /* (311) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ + { 402, 0 }, /* (312) stream_options ::= */ + { 402, -3 }, /* (313) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 402, -3 }, /* (314) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 402, -4 }, /* (315) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 402, -3 }, /* (316) stream_options ::= stream_options WATERMARK duration_literal */ + { 402, -4 }, /* (317) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 402, -3 }, /* (318) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 405, 0 }, /* (319) subtable_opt ::= */ + { 405, -4 }, /* (320) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 328, -3 }, /* (321) cmd ::= KILL CONNECTION NK_INTEGER */ + { 328, -3 }, /* (322) cmd ::= KILL QUERY NK_STRING */ + { 328, -3 }, /* (323) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 328, -2 }, /* (324) cmd ::= BALANCE VGROUP */ + { 328, -4 }, /* (325) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 328, -4 }, /* (326) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 328, -3 }, /* (327) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 407, -2 }, /* (328) dnode_list ::= DNODE NK_INTEGER */ + { 407, -3 }, /* (329) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 328, -4 }, /* (330) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 328, -1 }, /* (331) cmd ::= query_or_subquery */ + { 328, -1 }, /* (332) cmd ::= insert_query */ + { 398, -7 }, /* (333) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 398, -4 }, /* (334) insert_query ::= INSERT INTO full_table_name query_or_subquery */ + { 331, -1 }, /* (335) literal ::= NK_INTEGER */ + { 331, -1 }, /* (336) literal ::= NK_FLOAT */ + { 331, -1 }, /* (337) literal ::= NK_STRING */ + { 331, -1 }, /* (338) literal ::= NK_BOOL */ + { 331, -2 }, /* (339) literal ::= TIMESTAMP NK_STRING */ + { 331, -1 }, /* (340) literal ::= duration_literal */ + { 331, -1 }, /* (341) literal ::= NULL */ + { 331, -1 }, /* (342) literal ::= NK_QUESTION */ + { 375, -1 }, /* (343) duration_literal ::= NK_VARIABLE */ + { 409, -1 }, /* (344) signed ::= NK_INTEGER */ + { 409, -2 }, /* (345) signed ::= NK_PLUS NK_INTEGER */ + { 409, -2 }, /* (346) signed ::= NK_MINUS NK_INTEGER */ + { 409, -1 }, /* (347) signed ::= NK_FLOAT */ + { 409, -2 }, /* (348) signed ::= NK_PLUS NK_FLOAT */ + { 409, -2 }, /* (349) signed ::= NK_MINUS NK_FLOAT */ + { 364, -1 }, /* (350) signed_literal ::= signed */ + { 364, -1 }, /* (351) signed_literal ::= NK_STRING */ + { 364, -1 }, /* (352) signed_literal ::= NK_BOOL */ + { 364, -2 }, /* (353) signed_literal ::= TIMESTAMP NK_STRING */ + { 364, -1 }, /* (354) signed_literal ::= duration_literal */ + { 364, -1 }, /* (355) signed_literal ::= NULL */ + { 364, -1 }, /* (356) signed_literal ::= literal_func */ + { 364, -1 }, /* (357) signed_literal ::= NK_QUESTION */ + { 411, -1 }, /* (358) literal_list ::= signed_literal */ + { 411, -3 }, /* (359) literal_list ::= literal_list NK_COMMA signed_literal */ + { 339, -1 }, /* (360) db_name ::= NK_ID */ + { 370, -1 }, /* (361) table_name ::= NK_ID */ + { 362, -1 }, /* (362) column_name ::= NK_ID */ + { 377, -1 }, /* (363) function_name ::= NK_ID */ + { 412, -1 }, /* (364) table_alias ::= NK_ID */ + { 385, -1 }, /* (365) column_alias ::= NK_ID */ + { 333, -1 }, /* (366) user_name ::= NK_ID */ + { 340, -1 }, /* (367) topic_name ::= NK_ID */ + { 401, -1 }, /* (368) stream_name ::= NK_ID */ + { 395, -1 }, /* (369) cgroup_name ::= NK_ID */ + { 388, -1 }, /* (370) index_name ::= NK_ID */ + { 413, -1 }, /* (371) expr_or_subquery ::= expression */ + { 406, -1 }, /* (372) expression ::= literal */ + { 406, -1 }, /* (373) expression ::= pseudo_column */ + { 406, -1 }, /* (374) expression ::= column_reference */ + { 406, -1 }, /* (375) expression ::= function_expression */ + { 406, -1 }, /* (376) expression ::= case_when_expression */ + { 406, -3 }, /* (377) expression ::= NK_LP expression NK_RP */ + { 406, -2 }, /* (378) expression ::= NK_PLUS expr_or_subquery */ + { 406, -2 }, /* (379) expression ::= NK_MINUS expr_or_subquery */ + { 406, -3 }, /* (380) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 406, -3 }, /* (381) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 406, -3 }, /* (382) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 406, -3 }, /* (383) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 406, -3 }, /* (384) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 406, -3 }, /* (385) expression ::= column_reference NK_ARROW NK_STRING */ + { 406, -3 }, /* (386) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 406, -3 }, /* (387) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 367, -1 }, /* (388) expression_list ::= expr_or_subquery */ + { 367, -3 }, /* (389) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 415, -1 }, /* (390) column_reference ::= column_name */ + { 415, -3 }, /* (391) column_reference ::= table_name NK_DOT column_name */ + { 414, -1 }, /* (392) pseudo_column ::= ROWTS */ + { 414, -1 }, /* (393) pseudo_column ::= TBNAME */ + { 414, -3 }, /* (394) pseudo_column ::= table_name NK_DOT TBNAME */ + { 414, -1 }, /* (395) pseudo_column ::= QSTART */ + { 414, -1 }, /* (396) pseudo_column ::= QEND */ + { 414, -1 }, /* (397) pseudo_column ::= QDURATION */ + { 414, -1 }, /* (398) pseudo_column ::= WSTART */ + { 414, -1 }, /* (399) pseudo_column ::= WEND */ + { 414, -1 }, /* (400) pseudo_column ::= WDURATION */ + { 414, -1 }, /* (401) pseudo_column ::= IROWTS */ + { 414, -1 }, /* (402) pseudo_column ::= ISFILLED */ + { 414, -1 }, /* (403) pseudo_column ::= QTAGS */ + { 416, -4 }, /* (404) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 416, -4 }, /* (405) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 416, -6 }, /* (406) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 416, -1 }, /* (407) function_expression ::= literal_func */ + { 410, -3 }, /* (408) literal_func ::= noarg_func NK_LP NK_RP */ + { 410, -1 }, /* (409) literal_func ::= NOW */ + { 420, -1 }, /* (410) noarg_func ::= NOW */ + { 420, -1 }, /* (411) noarg_func ::= TODAY */ + { 420, -1 }, /* (412) noarg_func ::= TIMEZONE */ + { 420, -1 }, /* (413) noarg_func ::= DATABASE */ + { 420, -1 }, /* (414) noarg_func ::= CLIENT_VERSION */ + { 420, -1 }, /* (415) noarg_func ::= SERVER_VERSION */ + { 420, -1 }, /* (416) noarg_func ::= SERVER_STATUS */ + { 420, -1 }, /* (417) noarg_func ::= CURRENT_USER */ + { 420, -1 }, /* (418) noarg_func ::= USER */ + { 418, -1 }, /* (419) star_func ::= COUNT */ + { 418, -1 }, /* (420) star_func ::= FIRST */ + { 418, -1 }, /* (421) star_func ::= LAST */ + { 418, -1 }, /* (422) star_func ::= LAST_ROW */ + { 419, -1 }, /* (423) star_func_para_list ::= NK_STAR */ + { 419, -1 }, /* (424) star_func_para_list ::= other_para_list */ + { 421, -1 }, /* (425) other_para_list ::= star_func_para */ + { 421, -3 }, /* (426) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 422, -1 }, /* (427) star_func_para ::= expr_or_subquery */ + { 422, -3 }, /* (428) star_func_para ::= table_name NK_DOT NK_STAR */ + { 417, -4 }, /* (429) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 417, -5 }, /* (430) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 423, -1 }, /* (431) when_then_list ::= when_then_expr */ + { 423, -2 }, /* (432) when_then_list ::= when_then_list when_then_expr */ + { 426, -4 }, /* (433) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 424, 0 }, /* (434) case_when_else_opt ::= */ + { 424, -2 }, /* (435) case_when_else_opt ::= ELSE common_expression */ + { 427, -3 }, /* (436) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 427, -5 }, /* (437) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 427, -6 }, /* (438) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 427, -3 }, /* (439) predicate ::= expr_or_subquery IS NULL */ + { 427, -4 }, /* (440) predicate ::= expr_or_subquery IS NOT NULL */ + { 427, -3 }, /* (441) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 428, -1 }, /* (442) compare_op ::= NK_LT */ + { 428, -1 }, /* (443) compare_op ::= NK_GT */ + { 428, -1 }, /* (444) compare_op ::= NK_LE */ + { 428, -1 }, /* (445) compare_op ::= NK_GE */ + { 428, -1 }, /* (446) compare_op ::= NK_NE */ + { 428, -1 }, /* (447) compare_op ::= NK_EQ */ + { 428, -1 }, /* (448) compare_op ::= LIKE */ + { 428, -2 }, /* (449) compare_op ::= NOT LIKE */ + { 428, -1 }, /* (450) compare_op ::= MATCH */ + { 428, -1 }, /* (451) compare_op ::= NMATCH */ + { 428, -1 }, /* (452) compare_op ::= CONTAINS */ + { 429, -1 }, /* (453) in_op ::= IN */ + { 429, -2 }, /* (454) in_op ::= NOT IN */ + { 430, -3 }, /* (455) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 431, -1 }, /* (456) boolean_value_expression ::= boolean_primary */ + { 431, -2 }, /* (457) boolean_value_expression ::= NOT boolean_primary */ + { 431, -3 }, /* (458) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 431, -3 }, /* (459) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 432, -1 }, /* (460) boolean_primary ::= predicate */ + { 432, -3 }, /* (461) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 425, -1 }, /* (462) common_expression ::= expr_or_subquery */ + { 425, -1 }, /* (463) common_expression ::= boolean_value_expression */ + { 433, 0 }, /* (464) from_clause_opt ::= */ + { 433, -2 }, /* (465) from_clause_opt ::= FROM table_reference_list */ + { 434, -1 }, /* (466) table_reference_list ::= table_reference */ + { 434, -3 }, /* (467) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 435, -1 }, /* (468) table_reference ::= table_primary */ + { 435, -1 }, /* (469) table_reference ::= joined_table */ + { 436, -2 }, /* (470) table_primary ::= table_name alias_opt */ + { 436, -4 }, /* (471) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 436, -2 }, /* (472) table_primary ::= subquery alias_opt */ + { 436, -1 }, /* (473) table_primary ::= parenthesized_joined_table */ + { 438, 0 }, /* (474) alias_opt ::= */ + { 438, -1 }, /* (475) alias_opt ::= table_alias */ + { 438, -2 }, /* (476) alias_opt ::= AS table_alias */ + { 440, -3 }, /* (477) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 440, -3 }, /* (478) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 437, -6 }, /* (479) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 441, 0 }, /* (480) join_type ::= */ + { 441, -1 }, /* (481) join_type ::= INNER */ + { 443, -12 }, /* (482) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 444, 0 }, /* (483) set_quantifier_opt ::= */ + { 444, -1 }, /* (484) set_quantifier_opt ::= DISTINCT */ + { 444, -1 }, /* (485) set_quantifier_opt ::= ALL */ + { 445, -1 }, /* (486) select_list ::= select_item */ + { 445, -3 }, /* (487) select_list ::= select_list NK_COMMA select_item */ + { 453, -1 }, /* (488) select_item ::= NK_STAR */ + { 453, -1 }, /* (489) select_item ::= common_expression */ + { 453, -2 }, /* (490) select_item ::= common_expression column_alias */ + { 453, -3 }, /* (491) select_item ::= common_expression AS column_alias */ + { 453, -3 }, /* (492) select_item ::= table_name NK_DOT NK_STAR */ + { 408, 0 }, /* (493) where_clause_opt ::= */ + { 408, -2 }, /* (494) where_clause_opt ::= WHERE search_condition */ + { 446, 0 }, /* (495) partition_by_clause_opt ::= */ + { 446, -3 }, /* (496) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 454, -1 }, /* (497) partition_list ::= partition_item */ + { 454, -3 }, /* (498) partition_list ::= partition_list NK_COMMA partition_item */ + { 455, -1 }, /* (499) partition_item ::= expr_or_subquery */ + { 455, -2 }, /* (500) partition_item ::= expr_or_subquery column_alias */ + { 455, -3 }, /* (501) partition_item ::= expr_or_subquery AS column_alias */ + { 450, 0 }, /* (502) twindow_clause_opt ::= */ + { 450, -6 }, /* (503) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 450, -4 }, /* (504) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 450, -6 }, /* (505) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 450, -8 }, /* (506) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 450, -7 }, /* (507) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + { 390, 0 }, /* (508) sliding_opt ::= */ + { 390, -4 }, /* (509) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 449, 0 }, /* (510) fill_opt ::= */ + { 449, -4 }, /* (511) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 449, -6 }, /* (512) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 449, -6 }, /* (513) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ + { 456, -1 }, /* (514) fill_mode ::= NONE */ + { 456, -1 }, /* (515) fill_mode ::= PREV */ + { 456, -1 }, /* (516) fill_mode ::= NULL */ + { 456, -1 }, /* (517) fill_mode ::= NULL_F */ + { 456, -1 }, /* (518) fill_mode ::= LINEAR */ + { 456, -1 }, /* (519) fill_mode ::= NEXT */ + { 451, 0 }, /* (520) group_by_clause_opt ::= */ + { 451, -3 }, /* (521) group_by_clause_opt ::= GROUP BY group_by_list */ + { 457, -1 }, /* (522) group_by_list ::= expr_or_subquery */ + { 457, -3 }, /* (523) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 452, 0 }, /* (524) having_clause_opt ::= */ + { 452, -2 }, /* (525) having_clause_opt ::= HAVING search_condition */ + { 447, 0 }, /* (526) range_opt ::= */ + { 447, -6 }, /* (527) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 448, 0 }, /* (528) every_opt ::= */ + { 448, -4 }, /* (529) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 458, -4 }, /* (530) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 459, -1 }, /* (531) query_simple ::= query_specification */ + { 459, -1 }, /* (532) query_simple ::= union_query_expression */ + { 463, -4 }, /* (533) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 463, -3 }, /* (534) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 464, -1 }, /* (535) query_simple_or_subquery ::= query_simple */ + { 464, -1 }, /* (536) query_simple_or_subquery ::= subquery */ + { 394, -1 }, /* (537) query_or_subquery ::= query_expression */ + { 394, -1 }, /* (538) query_or_subquery ::= subquery */ + { 460, 0 }, /* (539) order_by_clause_opt ::= */ + { 460, -3 }, /* (540) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 461, 0 }, /* (541) slimit_clause_opt ::= */ + { 461, -2 }, /* (542) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 461, -4 }, /* (543) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 461, -4 }, /* (544) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 462, 0 }, /* (545) limit_clause_opt ::= */ + { 462, -2 }, /* (546) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 462, -4 }, /* (547) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 462, -4 }, /* (548) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 439, -3 }, /* (549) subquery ::= NK_LP query_expression NK_RP */ + { 439, -3 }, /* (550) subquery ::= NK_LP subquery NK_RP */ + { 442, -1 }, /* (551) search_condition ::= common_expression */ + { 465, -1 }, /* (552) sort_specification_list ::= sort_specification */ + { 465, -3 }, /* (553) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 466, -3 }, /* (554) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 467, 0 }, /* (555) ordering_specification_opt ::= */ + { 467, -1 }, /* (556) ordering_specification_opt ::= ASC */ + { 467, -1 }, /* (557) ordering_specification_opt ::= DESC */ + { 468, 0 }, /* (558) null_ordering_opt ::= */ + { 468, -2 }, /* (559) null_ordering_opt ::= NULLS FIRST */ + { 468, -2 }, /* (560) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3700,11 +3716,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,327,&yymsp[0].minor); + yy_destructor(yypParser,329,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,328,&yymsp[0].minor); + yy_destructor(yypParser,330,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3718,20 +3734,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,327,&yymsp[-2].minor); +{ yy_destructor(yypParser,329,&yymsp[-2].minor); { } - yy_destructor(yypParser,329,&yymsp[0].minor); + yy_destructor(yypParser,331,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,330,&yymsp[0].minor); +{ yy_destructor(yypParser,332,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,328,&yymsp[-1].minor); +{ yy_destructor(yypParser,330,&yymsp[-1].minor); { } - yy_destructor(yypParser,330,&yymsp[0].minor); + yy_destructor(yypParser,332,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3745,81 +3761,81 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,329,&yymsp[0].minor); + yy_destructor(yypParser,331,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy455, &yymsp[-1].minor.yy0, yymsp[0].minor.yy169); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy225, &yymsp[-1].minor.yy0, yymsp[0].minor.yy705); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy455, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy225, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy455, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy225, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy455, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy225, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy225); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy169 = 1; } +{ yymsp[1].minor.yy705 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy169 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy705 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy91, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy641, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy91, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy641, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy91 = yymsp[0].minor.yy91; } - yymsp[0].minor.yy91 = yylhsminor.yy91; +{ yylhsminor.yy641 = yymsp[0].minor.yy641; } + yymsp[0].minor.yy641 = yylhsminor.yy641; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy91 = yymsp[-2].minor.yy91 | yymsp[0].minor.yy91; } - yymsp[-2].minor.yy91 = yylhsminor.yy91; +{ yylhsminor.yy641 = yymsp[-2].minor.yy641 | yymsp[0].minor.yy641; } + yymsp[-2].minor.yy641 = yylhsminor.yy641; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_READ; } break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy91 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy641 = PRIVILEGE_TYPE_WRITE; } break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy455 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy225 = yylhsminor.yy225; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy455 = yymsp[-2].minor.yy455; } - yymsp[-2].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[-2].minor.yy225; } + yymsp[-2].minor.yy225 = yylhsminor.yy225; break; case 42: /* priv_level ::= topic_name */ case 273: /* sma_func_name ::= function_name */ yytestcase(yyruleno==273); case 475: /* alias_opt ::= table_alias */ yytestcase(yyruleno==475); -{ yylhsminor.yy455 = yymsp[0].minor.yy455; } - yymsp[0].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[0].minor.yy225; } + yymsp[0].minor.yy225 = yylhsminor.yy225; break; case 43: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy455, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy225, NULL); } break; case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0); } break; case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy163); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy103); } break; case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy163); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy103); } break; case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3864,8 +3880,8 @@ static YYACTIONTYPE yy_reduce( case 420: /* star_func ::= FIRST */ yytestcase(yyruleno==420); case 421: /* star_func ::= LAST */ yytestcase(yyruleno==421); case 422: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==422); -{ yylhsminor.yy455 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy455 = yylhsminor.yy455; +{ yylhsminor.yy225 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy225 = yylhsminor.yy225; break; case 54: /* force_opt ::= */ case 74: /* not_exists_opt ::= */ yytestcase(yyruleno==74); @@ -3873,13 +3889,13 @@ static YYACTIONTYPE yy_reduce( case 294: /* analyze_opt ::= */ yytestcase(yyruleno==294); case 301: /* agg_func_opt ::= */ yytestcase(yyruleno==301); case 483: /* set_quantifier_opt ::= */ yytestcase(yyruleno==483); -{ yymsp[1].minor.yy163 = false; } +{ yymsp[1].minor.yy103 = false; } break; case 55: /* force_opt ::= FORCE */ case 295: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==295); case 302: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==302); case 484: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==484); -{ yymsp[0].minor.yy163 = true; } +{ yymsp[0].minor.yy103 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3912,209 +3928,209 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy163, &yymsp[-1].minor.yy455, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy103, &yymsp[-1].minor.yy225, yymsp[0].minor.yy42); } break; case 67: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 68: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } break; case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy42); } break; case 70: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } break; case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy832); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy508); } break; case 72: /* cmd ::= COMPACT DATABASE db_name */ -{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[0].minor.yy225); } break; case 73: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy163 = true; } +{ yymsp[-2].minor.yy103 = true; } break; case 75: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy163 = true; } +{ yymsp[-1].minor.yy103 = true; } break; case 77: /* db_options ::= */ -{ yymsp[1].minor.yy44 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultDatabaseOptions(pCxt); } break; case 78: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 79: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 80: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 81: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 82: /* db_options ::= db_options DURATION NK_INTEGER */ case 83: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==83); -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 84: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 85: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 86: /* db_options ::= db_options KEEP integer_list */ case 87: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==87); -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_KEEP, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_KEEP, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 88: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 89: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 90: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 91: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 92: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 93: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 94: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 95: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_RETENTIONS, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_RETENTIONS, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 96: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 97: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 98: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 100: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-3].minor.yy44, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-3].minor.yy42, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 102: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-3].minor.yy44, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-3].minor.yy42, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 103: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 104: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 105: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 106: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 107: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy44 = setDatabaseOption(pCxt, yymsp[-2].minor.yy44, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setDatabaseOption(pCxt, yymsp[-2].minor.yy42, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 108: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy44 = createAlterDatabaseOptions(pCxt); yylhsminor.yy44 = setAlterDatabaseOption(pCxt, yylhsminor.yy44, &yymsp[0].minor.yy153); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterDatabaseOptions(pCxt); yylhsminor.yy42 = setAlterDatabaseOption(pCxt, yylhsminor.yy42, &yymsp[0].minor.yy459); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 109: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy44 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy44, &yymsp[0].minor.yy153); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy42, &yymsp[0].minor.yy459); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 110: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 111: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 113: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 114: /* alter_db_option ::= KEEP integer_list */ case 115: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==115); -{ yymsp[-1].minor.yy153.type = DB_OPTION_KEEP; yymsp[-1].minor.yy153.pList = yymsp[0].minor.yy684; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_KEEP; yymsp[-1].minor.yy459.pList = yymsp[0].minor.yy110; } break; case 116: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_PAGES; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_PAGES; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 117: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 118: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_WAL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_WAL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 119: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 120: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy684 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 121: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 329: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==329); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 122: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy684 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 123: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 124: /* retention_list ::= retention */ case 146: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==146); @@ -4129,9 +4145,9 @@ static YYACTIONTYPE yy_reduce( case 431: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==431); case 486: /* select_list ::= select_item */ yytestcase(yyruleno==486); case 497: /* partition_list ::= partition_item */ yytestcase(yyruleno==497); - case 550: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==550); -{ yylhsminor.yy684 = createNodeList(pCxt, yymsp[0].minor.yy44); } - yymsp[0].minor.yy684 = yylhsminor.yy684; + case 552: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==552); +{ yylhsminor.yy110 = createNodeList(pCxt, yymsp[0].minor.yy42); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 125: /* retention_list ::= retention_list NK_COMMA retention */ case 157: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==157); @@ -4143,96 +4159,96 @@ static YYACTIONTYPE yy_reduce( case 426: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==426); case 487: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==487); case 498: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==498); - case 551: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==551); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; + case 553: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==553); +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 126: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy44 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 127: /* speed_opt ::= */ case 303: /* bufsize_opt ::= */ yytestcase(yyruleno==303); -{ yymsp[1].minor.yy832 = 0; } +{ yymsp[1].minor.yy508 = 0; } break; case 128: /* speed_opt ::= MAX_SPEED NK_INTEGER */ case 304: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==304); -{ yymsp[-1].minor.yy832 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy508 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 129: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 131: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==131); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy163, yymsp[-5].minor.yy44, yymsp[-3].minor.yy684, yymsp[-1].minor.yy684, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy103, yymsp[-5].minor.yy42, yymsp[-3].minor.yy110, yymsp[-1].minor.yy110, yymsp[0].minor.yy42); } break; case 130: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy684); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy110); } break; case 132: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy684); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy110); } break; case 133: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } break; case 134: /* cmd ::= ALTER TABLE alter_table_clause */ case 331: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==331); case 332: /* cmd ::= insert_query */ yytestcase(yyruleno==332); -{ pCxt->pRootNode = yymsp[0].minor.yy44; } +{ pCxt->pRootNode = yymsp[0].minor.yy42; } break; case 135: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy44); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy42); } break; case 136: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy44 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 137: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 138: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy44 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy44, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy455); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy42, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy225); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 139: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 140: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy44 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 141: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 142: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy44 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy44, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy455); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy42, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy225); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 143: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy44 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 144: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy44 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy44, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy42, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 145: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy44 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy44, &yymsp[-2].minor.yy455, yymsp[0].minor.yy44); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy42, &yymsp[-2].minor.yy225, yymsp[0].minor.yy42); } + yymsp[-5].minor.yy42 = yylhsminor.yy42; break; case 147: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 150: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==150); case 432: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==432); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-1].minor.yy684, yymsp[0].minor.yy44); } - yymsp[-1].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-1].minor.yy110, yymsp[0].minor.yy42); } + yymsp[-1].minor.yy110 = yylhsminor.yy110; break; case 148: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy44 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy163, yymsp[-8].minor.yy44, yymsp[-6].minor.yy44, yymsp[-5].minor.yy684, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); } - yymsp[-9].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy103, yymsp[-8].minor.yy42, yymsp[-6].minor.yy42, yymsp[-5].minor.yy110, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } + yymsp[-9].minor.yy42 = yylhsminor.yy42; break; case 151: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy44 = createDropTableClause(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createDropTableClause(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 152: /* specific_cols_opt ::= */ case 183: /* tags_def_opt ::= */ yytestcase(yyruleno==183); @@ -4240,176 +4256,176 @@ static YYACTIONTYPE yy_reduce( case 307: /* col_list_opt ::= */ yytestcase(yyruleno==307); case 309: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==309); case 495: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==495); - case 518: /* group_by_clause_opt ::= */ yytestcase(yyruleno==518); - case 537: /* order_by_clause_opt ::= */ yytestcase(yyruleno==537); -{ yymsp[1].minor.yy684 = NULL; } + case 520: /* group_by_clause_opt ::= */ yytestcase(yyruleno==520); + case 539: /* order_by_clause_opt ::= */ yytestcase(yyruleno==539); +{ yymsp[1].minor.yy110 = NULL; } break; case 153: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ case 308: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==308); -{ yymsp[-2].minor.yy684 = yymsp[-1].minor.yy684; } +{ yymsp[-2].minor.yy110 = yymsp[-1].minor.yy110; } break; case 154: /* full_table_name ::= table_name */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy455, NULL); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy225, NULL); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 155: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455, NULL); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225, NULL); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 158: /* column_def ::= column_name type_name */ -{ yylhsminor.yy44 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy455, yymsp[0].minor.yy260, NULL); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy225, yymsp[0].minor.yy448, NULL); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 159: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy44 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-2].minor.yy260, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-2].minor.yy448, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 160: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 161: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 162: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 163: /* type_name ::= INT */ case 164: /* type_name ::= INTEGER */ yytestcase(yyruleno==164); -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_INT); } break; case 165: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 166: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 167: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 168: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 169: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 170: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 171: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 172: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 173: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 174: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy260 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy448 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 175: /* type_name ::= JSON */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 176: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 177: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 178: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 179: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy448 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 180: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 182: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy260 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy448 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 184: /* tags_def_opt ::= tags_def */ case 310: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==310); case 424: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==424); -{ yylhsminor.yy684 = yymsp[0].minor.yy684; } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = yymsp[0].minor.yy110; } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 185: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ case 311: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==311); -{ yymsp[-3].minor.yy684 = yymsp[-1].minor.yy684; } +{ yymsp[-3].minor.yy110 = yymsp[-1].minor.yy110; } break; case 186: /* table_options ::= */ -{ yymsp[1].minor.yy44 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultTableOptions(pCxt); } break; case 187: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 188: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 189: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 190: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-4].minor.yy44, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy684); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-4].minor.yy42, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy110); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 191: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 192: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-4].minor.yy44, TABLE_OPTION_SMA, yymsp[-1].minor.yy684); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-4].minor.yy42, TABLE_OPTION_SMA, yymsp[-1].minor.yy110); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 193: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-2].minor.yy44, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy684); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-2].minor.yy42, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy110); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 194: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy44 = createAlterTableOptions(pCxt); yylhsminor.yy44 = setTableOption(pCxt, yylhsminor.yy44, yymsp[0].minor.yy153.type, &yymsp[0].minor.yy153.val); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createAlterTableOptions(pCxt); yylhsminor.yy42 = setTableOption(pCxt, yylhsminor.yy42, yymsp[0].minor.yy459.type, &yymsp[0].minor.yy459.val); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 195: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy44 = setTableOption(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy153.type, &yymsp[0].minor.yy153.val); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setTableOption(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy459.type, &yymsp[0].minor.yy459.val); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 196: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy153.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 197: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy153.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy153.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy459.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy459.val = yymsp[0].minor.yy0; } break; case 198: /* duration_list ::= duration_literal */ case 388: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==388); -{ yylhsminor.yy684 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 199: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 389: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==389); -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; break; case 202: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[0].minor.yy455, NULL); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[0].minor.yy225, NULL); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 203: /* rollup_func_name ::= FIRST */ case 204: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==204); case 259: /* tag_item ::= QTAGS */ yytestcase(yyruleno==259); -{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 207: /* col_name ::= column_name */ case 260: /* tag_item ::= column_name */ yytestcase(yyruleno==260); -{ yylhsminor.yy44 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy455); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy225); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 208: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -4424,13 +4440,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 212: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, OP_TYPE_LIKE); } break; case 213: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, OP_TYPE_LIKE); } break; case 214: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy44, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy42, NULL, OP_TYPE_LIKE); } break; case 215: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -4442,7 +4458,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 218: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy44, yymsp[-1].minor.yy44, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy42, yymsp[-1].minor.yy42, OP_TYPE_EQUAL); } break; case 219: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -4461,13 +4477,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 225: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy225); } break; case 226: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy42); } break; case 227: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy42); } break; case 228: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4486,7 +4502,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; case 234: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy42); } break; case 235: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } @@ -4501,7 +4517,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; case 239: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy42); } break; case 240: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4510,10 +4526,10 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; case 242: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy44, yymsp[-1].minor.yy44, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy42, yymsp[-1].minor.yy42, OP_TYPE_EQUAL); } break; case 243: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44, yymsp[-3].minor.yy684); } +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42, yymsp[-3].minor.yy110); } break; case 244: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } @@ -4522,18 +4538,18 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); } break; case 246: /* cmd ::= SHOW db_name_cond_opt ALIVE */ -{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy44, QUERY_NODE_SHOW_DB_ALIVE_STMT); } +{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy42, QUERY_NODE_SHOW_DB_ALIVE_STMT); } break; case 247: /* cmd ::= SHOW CLUSTER ALIVE */ { pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); } break; case 248: /* db_name_cond_opt ::= */ case 253: /* from_db_opt ::= */ yytestcase(yyruleno==253); -{ yymsp[1].minor.yy44 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultDatabaseCondValue(pCxt); } break; case 249: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy44 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 250: /* like_pattern_opt ::= */ case 319: /* subtable_opt ::= */ yytestcase(yyruleno==319); @@ -4543,158 +4559,158 @@ static YYACTIONTYPE yy_reduce( case 502: /* twindow_clause_opt ::= */ yytestcase(yyruleno==502); case 508: /* sliding_opt ::= */ yytestcase(yyruleno==508); case 510: /* fill_opt ::= */ yytestcase(yyruleno==510); - case 522: /* having_clause_opt ::= */ yytestcase(yyruleno==522); - case 524: /* range_opt ::= */ yytestcase(yyruleno==524); - case 526: /* every_opt ::= */ yytestcase(yyruleno==526); - case 539: /* slimit_clause_opt ::= */ yytestcase(yyruleno==539); - case 543: /* limit_clause_opt ::= */ yytestcase(yyruleno==543); -{ yymsp[1].minor.yy44 = NULL; } + case 524: /* having_clause_opt ::= */ yytestcase(yyruleno==524); + case 526: /* range_opt ::= */ yytestcase(yyruleno==526); + case 528: /* every_opt ::= */ yytestcase(yyruleno==528); + case 541: /* slimit_clause_opt ::= */ yytestcase(yyruleno==541); + case 545: /* limit_clause_opt ::= */ yytestcase(yyruleno==545); +{ yymsp[1].minor.yy42 = NULL; } break; case 251: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 252: /* table_name_cond ::= table_name */ -{ yylhsminor.yy44 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy455); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy225); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 254: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy44 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy455); } +{ yymsp[-1].minor.yy42 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy225); } break; case 258: /* tag_item ::= TBNAME */ -{ yylhsminor.yy44 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 261: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy44 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy455), &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy225), &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 262: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy44 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy455), &yymsp[0].minor.yy455); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy225), &yymsp[0].minor.yy225); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 263: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy163, yymsp[-3].minor.yy44, yymsp[-1].minor.yy44, NULL, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy103, yymsp[-3].minor.yy42, yymsp[-1].minor.yy42, NULL, yymsp[0].minor.yy42); } break; case 264: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy163, yymsp[-5].minor.yy44, yymsp[-3].minor.yy44, yymsp[-1].minor.yy684, NULL); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy103, yymsp[-5].minor.yy42, yymsp[-3].minor.yy42, yymsp[-1].minor.yy110, NULL); } break; case 265: /* cmd ::= DROP INDEX exists_opt full_index_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy163, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy103, yymsp[0].minor.yy42); } break; case 266: /* full_index_name ::= index_name */ -{ yylhsminor.yy44 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy455); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy225); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 267: /* full_index_name ::= db_name NK_DOT index_name */ -{ yylhsminor.yy44 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 268: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy44 = createIndexOption(pCxt, yymsp[-7].minor.yy684, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-9].minor.yy42 = createIndexOption(pCxt, yymsp[-7].minor.yy110, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 269: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy44 = createIndexOption(pCxt, yymsp[-9].minor.yy684, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-11].minor.yy42 = createIndexOption(pCxt, yymsp[-9].minor.yy110, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 272: /* func ::= sma_func_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy44 = createFunctionNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-1].minor.yy684); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createFunctionNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-1].minor.yy110); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 278: /* sma_stream_opt ::= */ case 312: /* stream_options ::= */ yytestcase(yyruleno==312); -{ yymsp[1].minor.yy44 = createStreamOptions(pCxt); } +{ yymsp[1].minor.yy42 = createStreamOptions(pCxt); } break; case 279: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ case 316: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==316); -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 280: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 281: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 282: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy163, &yymsp[-2].minor.yy455, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy103, &yymsp[-2].minor.yy225, yymsp[0].minor.yy42); } break; case 283: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy163, &yymsp[-3].minor.yy455, &yymsp[0].minor.yy455, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy103, &yymsp[-3].minor.yy225, &yymsp[0].minor.yy225, false); } break; case 284: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy163, &yymsp[-5].minor.yy455, &yymsp[0].minor.yy455, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy103, &yymsp[-5].minor.yy225, &yymsp[0].minor.yy225, true); } break; case 285: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy163, &yymsp[-3].minor.yy455, yymsp[0].minor.yy44, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy103, &yymsp[-3].minor.yy225, yymsp[0].minor.yy42, false); } break; case 286: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy163, &yymsp[-5].minor.yy455, yymsp[0].minor.yy44, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy103, &yymsp[-5].minor.yy225, yymsp[0].minor.yy42, true); } break; case 287: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 288: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy163, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy103, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225); } break; case 289: /* cmd ::= DESC full_table_name */ case 290: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==290); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy42); } break; case 291: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 292: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ case 293: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==293); -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy163, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy103, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 296: /* explain_options ::= */ -{ yymsp[1].minor.yy44 = createDefaultExplainOptions(pCxt); } +{ yymsp[1].minor.yy42 = createDefaultExplainOptions(pCxt); } break; case 297: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy44 = setExplainVerbose(pCxt, yymsp[-2].minor.yy44, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setExplainVerbose(pCxt, yymsp[-2].minor.yy42, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 298: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy44 = setExplainRatio(pCxt, yymsp[-2].minor.yy44, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setExplainRatio(pCxt, yymsp[-2].minor.yy42, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 299: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy163, yymsp[-8].minor.yy163, &yymsp[-5].minor.yy455, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy260, yymsp[0].minor.yy832); } +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy103, yymsp[-8].minor.yy103, &yymsp[-5].minor.yy225, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy448, yymsp[0].minor.yy508); } break; case 300: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 305: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy163, &yymsp[-8].minor.yy455, yymsp[-5].minor.yy44, yymsp[-7].minor.yy44, yymsp[-3].minor.yy684, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, yymsp[-4].minor.yy684); } +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy103, &yymsp[-8].minor.yy225, yymsp[-5].minor.yy42, yymsp[-7].minor.yy42, yymsp[-3].minor.yy110, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, yymsp[-4].minor.yy110); } break; case 306: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy163, &yymsp[0].minor.yy455); } +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy103, &yymsp[0].minor.yy225); } break; case 313: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 314: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 315: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy44)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy44)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); yylhsminor.yy44 = yymsp[-3].minor.yy44; } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-3].minor.yy42)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy42)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); yylhsminor.yy42 = yymsp[-3].minor.yy42; } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 317: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-3].minor.yy44)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy44 = yymsp[-3].minor.yy44; } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-3].minor.yy42)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy42 = yymsp[-3].minor.yy42; } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 318: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-2].minor.yy44)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy44 = yymsp[-2].minor.yy44; } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ ((SStreamOptions*)yymsp[-2].minor.yy42)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy42 = yymsp[-2].minor.yy42; } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 320: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ case 509: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==509); - case 527: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==527); -{ yymsp[-3].minor.yy44 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy44); } + case 529: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==529); +{ yymsp[-3].minor.yy42 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy42); } break; case 321: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } @@ -4712,42 +4728,42 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 326: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy684); } +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy110); } break; case 327: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 328: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy684 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +{ yymsp[-1].minor.yy110 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 330: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 333: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ -{ yymsp[-6].minor.yy44 = createInsertStmt(pCxt, yymsp[-4].minor.yy44, yymsp[-2].minor.yy684, yymsp[0].minor.yy44); } +{ yymsp[-6].minor.yy42 = createInsertStmt(pCxt, yymsp[-4].minor.yy42, yymsp[-2].minor.yy110, yymsp[0].minor.yy42); } break; case 334: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */ -{ yymsp[-3].minor.yy44 = createInsertStmt(pCxt, yymsp[-1].minor.yy44, NULL, yymsp[0].minor.yy44); } +{ yymsp[-3].minor.yy42 = createInsertStmt(pCxt, yymsp[-1].minor.yy42, NULL, yymsp[0].minor.yy42); } break; case 335: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 336: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 337: /* literal ::= NK_STRING */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 338: /* literal ::= NK_BOOL */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 339: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 340: /* literal ::= duration_literal */ case 350: /* signed_literal ::= signed */ yytestcase(yyruleno==350); @@ -4766,175 +4782,175 @@ static YYACTIONTYPE yy_reduce( case 468: /* table_reference ::= table_primary */ yytestcase(yyruleno==468); case 469: /* table_reference ::= joined_table */ yytestcase(yyruleno==469); case 473: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==473); - case 529: /* query_simple ::= query_specification */ yytestcase(yyruleno==529); - case 530: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==530); - case 533: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==533); - case 535: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==535); -{ yylhsminor.yy44 = yymsp[0].minor.yy44; } - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 531: /* query_simple ::= query_specification */ yytestcase(yyruleno==531); + case 532: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==532); + case 535: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==535); + case 537: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==537); +{ yylhsminor.yy42 = yymsp[0].minor.yy42; } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 341: /* literal ::= NULL */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 342: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 343: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 344: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 345: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; case 346: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 347: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 348: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 349: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 351: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 352: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 353: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 354: /* signed_literal ::= duration_literal */ case 356: /* signed_literal ::= literal_func */ yytestcase(yyruleno==356); case 427: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==427); case 489: /* select_item ::= common_expression */ yytestcase(yyruleno==489); case 499: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==499); - case 534: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==534); - case 536: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==536); - case 549: /* search_condition ::= common_expression */ yytestcase(yyruleno==549); -{ yylhsminor.yy44 = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); } - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 536: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==536); + case 538: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==538); + case 551: /* search_condition ::= common_expression */ yytestcase(yyruleno==551); +{ yylhsminor.yy42 = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 355: /* signed_literal ::= NULL */ -{ yylhsminor.yy44 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 357: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy44 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 377: /* expression ::= NK_LP expression NK_RP */ case 461: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==461); - case 548: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==548); -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 550: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==550); +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 378: /* expression ::= NK_PLUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 379: /* expression ::= NK_MINUS expr_or_subquery */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy44), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy42), NULL)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 380: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 381: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 382: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 383: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 384: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 385: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 386: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 387: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 390: /* column_reference ::= column_name */ -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy455, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy455)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy225, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy225)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 391: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455, createColumnNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy455)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225, createColumnNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy225)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 392: /* pseudo_column ::= ROWTS */ case 393: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==393); @@ -4948,330 +4964,336 @@ static YYACTIONTYPE yy_reduce( case 402: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==402); case 403: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==403); case 409: /* literal_func ::= NOW */ yytestcase(yyruleno==409); -{ yylhsminor.yy44 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 394: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy455)))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy225)))); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 404: /* function_expression ::= function_name NK_LP expression_list NK_RP */ case 405: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==405); -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy455, yymsp[-1].minor.yy684)); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy225, yymsp[-1].minor.yy110)); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 406: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy260)); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy448)); } + yymsp[-5].minor.yy42 = yylhsminor.yy42; break; case 408: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy455, NULL)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy225, NULL)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 423: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy684 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy684 = yylhsminor.yy684; +{ yylhsminor.yy110 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; case 428: /* star_func_para ::= table_name NK_DOT NK_STAR */ case 492: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==492); -{ yylhsminor.yy44 = createColumnNode(pCxt, &yymsp[-2].minor.yy455, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnNode(pCxt, &yymsp[-2].minor.yy225, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 429: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy684, yymsp[-1].minor.yy44)); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy110, yymsp[-1].minor.yy42)); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 430: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-2].minor.yy684, yymsp[-1].minor.yy44)); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-2].minor.yy110, yymsp[-1].minor.yy42)); } + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 433: /* when_then_expr ::= WHEN common_expression THEN common_expression */ -{ yymsp[-3].minor.yy44 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44)); } +{ yymsp[-3].minor.yy42 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42)); } break; case 435: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy44 = releaseRawExprNode(pCxt, yymsp[0].minor.yy44); } +{ yymsp[-1].minor.yy42 = releaseRawExprNode(pCxt, yymsp[0].minor.yy42); } break; case 436: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ case 441: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==441); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy704, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy2, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 437: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy44), releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy42), releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-4].minor.yy44 = yylhsminor.yy44; + yymsp[-4].minor.yy42 = yylhsminor.yy42; break; case 438: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; + yymsp[-5].minor.yy42 = yylhsminor.yy42; break; case 439: /* predicate ::= expr_or_subquery IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), NULL)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 440: /* predicate ::= expr_or_subquery IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL)); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 442: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy704 = OP_TYPE_LOWER_THAN; } +{ yymsp[0].minor.yy2 = OP_TYPE_LOWER_THAN; } break; case 443: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy704 = OP_TYPE_GREATER_THAN; } +{ yymsp[0].minor.yy2 = OP_TYPE_GREATER_THAN; } break; case 444: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy704 = OP_TYPE_LOWER_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_LOWER_EQUAL; } break; case 445: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy704 = OP_TYPE_GREATER_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_GREATER_EQUAL; } break; case 446: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy704 = OP_TYPE_NOT_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_NOT_EQUAL; } break; case 447: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy704 = OP_TYPE_EQUAL; } +{ yymsp[0].minor.yy2 = OP_TYPE_EQUAL; } break; case 448: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy704 = OP_TYPE_LIKE; } +{ yymsp[0].minor.yy2 = OP_TYPE_LIKE; } break; case 449: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy704 = OP_TYPE_NOT_LIKE; } +{ yymsp[-1].minor.yy2 = OP_TYPE_NOT_LIKE; } break; case 450: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy704 = OP_TYPE_MATCH; } +{ yymsp[0].minor.yy2 = OP_TYPE_MATCH; } break; case 451: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy704 = OP_TYPE_NMATCH; } +{ yymsp[0].minor.yy2 = OP_TYPE_NMATCH; } break; case 452: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy704 = OP_TYPE_JSON_CONTAINS; } +{ yymsp[0].minor.yy2 = OP_TYPE_JSON_CONTAINS; } break; case 453: /* in_op ::= IN */ -{ yymsp[0].minor.yy704 = OP_TYPE_IN; } +{ yymsp[0].minor.yy2 = OP_TYPE_IN; } break; case 454: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy704 = OP_TYPE_NOT_IN; } +{ yymsp[-1].minor.yy2 = OP_TYPE_NOT_IN; } break; case 455: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy684)); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 457: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy44), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy42), NULL)); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 458: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 459: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy44); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy44); - yylhsminor.yy44 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy42); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy42); + yylhsminor.yy42 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 465: /* from_clause_opt ::= FROM table_reference_list */ case 494: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==494); - case 523: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==523); -{ yymsp[-1].minor.yy44 = yymsp[0].minor.yy44; } + case 525: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==525); +{ yymsp[-1].minor.yy42 = yymsp[0].minor.yy42; } break; case 467: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy44 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy44, yymsp[0].minor.yy44, NULL); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy42, yymsp[0].minor.yy42, NULL); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 470: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 471: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy44 = createRealTableNode(pCxt, &yymsp[-3].minor.yy455, &yymsp[-1].minor.yy455, &yymsp[0].minor.yy455); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createRealTableNode(pCxt, &yymsp[-3].minor.yy225, &yymsp[-1].minor.yy225, &yymsp[0].minor.yy225); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; case 472: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy44 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44), &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42), &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 474: /* alias_opt ::= */ -{ yymsp[1].minor.yy455 = nil_token; } +{ yymsp[1].minor.yy225 = nil_token; } break; case 476: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy455 = yymsp[0].minor.yy455; } +{ yymsp[-1].minor.yy225 = yymsp[0].minor.yy225; } break; case 477: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 478: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==478); -{ yymsp[-2].minor.yy44 = yymsp[-1].minor.yy44; } +{ yymsp[-2].minor.yy42 = yymsp[-1].minor.yy42; } break; case 479: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy44 = createJoinTableNode(pCxt, yymsp[-4].minor.yy724, yymsp[-5].minor.yy44, yymsp[-2].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-5].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createJoinTableNode(pCxt, yymsp[-4].minor.yy638, yymsp[-5].minor.yy42, yymsp[-2].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-5].minor.yy42 = yylhsminor.yy42; break; case 480: /* join_type ::= */ -{ yymsp[1].minor.yy724 = JOIN_TYPE_INNER; } +{ yymsp[1].minor.yy638 = JOIN_TYPE_INNER; } break; case 481: /* join_type ::= INNER */ -{ yymsp[0].minor.yy724 = JOIN_TYPE_INNER; } +{ yymsp[0].minor.yy638 = JOIN_TYPE_INNER; } break; case 482: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-11].minor.yy44 = createSelectStmt(pCxt, yymsp[-10].minor.yy163, yymsp[-9].minor.yy684, yymsp[-8].minor.yy44); - yymsp[-11].minor.yy44 = addWhereClause(pCxt, yymsp[-11].minor.yy44, yymsp[-7].minor.yy44); - yymsp[-11].minor.yy44 = addPartitionByClause(pCxt, yymsp[-11].minor.yy44, yymsp[-6].minor.yy684); - yymsp[-11].minor.yy44 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy44, yymsp[-2].minor.yy44); - yymsp[-11].minor.yy44 = addGroupByClause(pCxt, yymsp[-11].minor.yy44, yymsp[-1].minor.yy684); - yymsp[-11].minor.yy44 = addHavingClause(pCxt, yymsp[-11].minor.yy44, yymsp[0].minor.yy44); - yymsp[-11].minor.yy44 = addRangeClause(pCxt, yymsp[-11].minor.yy44, yymsp[-5].minor.yy44); - yymsp[-11].minor.yy44 = addEveryClause(pCxt, yymsp[-11].minor.yy44, yymsp[-4].minor.yy44); - yymsp[-11].minor.yy44 = addFillClause(pCxt, yymsp[-11].minor.yy44, yymsp[-3].minor.yy44); + yymsp[-11].minor.yy42 = createSelectStmt(pCxt, yymsp[-10].minor.yy103, yymsp[-9].minor.yy110, yymsp[-8].minor.yy42); + yymsp[-11].minor.yy42 = addWhereClause(pCxt, yymsp[-11].minor.yy42, yymsp[-7].minor.yy42); + yymsp[-11].minor.yy42 = addPartitionByClause(pCxt, yymsp[-11].minor.yy42, yymsp[-6].minor.yy110); + yymsp[-11].minor.yy42 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy42, yymsp[-2].minor.yy42); + yymsp[-11].minor.yy42 = addGroupByClause(pCxt, yymsp[-11].minor.yy42, yymsp[-1].minor.yy110); + yymsp[-11].minor.yy42 = addHavingClause(pCxt, yymsp[-11].minor.yy42, yymsp[0].minor.yy42); + yymsp[-11].minor.yy42 = addRangeClause(pCxt, yymsp[-11].minor.yy42, yymsp[-5].minor.yy42); + yymsp[-11].minor.yy42 = addEveryClause(pCxt, yymsp[-11].minor.yy42, yymsp[-4].minor.yy42); + yymsp[-11].minor.yy42 = addFillClause(pCxt, yymsp[-11].minor.yy42, yymsp[-3].minor.yy42); } break; case 485: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy163 = false; } +{ yymsp[0].minor.yy103 = false; } break; case 488: /* select_item ::= NK_STAR */ -{ yylhsminor.yy44 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy42 = yylhsminor.yy42; break; case 490: /* select_item ::= common_expression column_alias */ case 500: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==500); -{ yylhsminor.yy44 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44), &yymsp[0].minor.yy455); } - yymsp[-1].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42), &yymsp[0].minor.yy225); } + yymsp[-1].minor.yy42 = yylhsminor.yy42; break; case 491: /* select_item ::= common_expression AS column_alias */ case 501: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==501); -{ yylhsminor.yy44 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), &yymsp[0].minor.yy455); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; +{ yylhsminor.yy42 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), &yymsp[0].minor.yy225); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 496: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 519: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==519); - case 538: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==538); -{ yymsp[-2].minor.yy684 = yymsp[0].minor.yy684; } + case 521: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==521); + case 540: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==540); +{ yymsp[-2].minor.yy110 = yymsp[0].minor.yy110; } break; case 503: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy44 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } +{ yymsp[-5].minor.yy42 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } break; case 504: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy44 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } +{ yymsp[-3].minor.yy42 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } break; case 505: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy44 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), NULL, yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-5].minor.yy42 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), NULL, yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 506: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy44 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy44), releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), yymsp[-1].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-7].minor.yy42 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy42), releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), yymsp[-1].minor.yy42, yymsp[0].minor.yy42); } break; case 507: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy44 = createEventWindowNode(pCxt, yymsp[-3].minor.yy44, yymsp[0].minor.yy44); } +{ yymsp[-6].minor.yy42 = createEventWindowNode(pCxt, yymsp[-3].minor.yy42, yymsp[0].minor.yy42); } break; case 511: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy44 = createFillNode(pCxt, yymsp[-1].minor.yy22, NULL); } +{ yymsp[-3].minor.yy42 = createFillNode(pCxt, yymsp[-1].minor.yy410, NULL); } break; case 512: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy44 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy684)); } +{ yymsp[-5].minor.yy42 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } break; - case 513: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy22 = FILL_MODE_NONE; } + case 513: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy42 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy110)); } break; - case 514: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy22 = FILL_MODE_PREV; } + case 514: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy410 = FILL_MODE_NONE; } break; - case 515: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy22 = FILL_MODE_NULL; } + case 515: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy410 = FILL_MODE_PREV; } break; - case 516: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy22 = FILL_MODE_LINEAR; } + case 516: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy410 = FILL_MODE_NULL; } break; - case 517: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy22 = FILL_MODE_NEXT; } + case 517: /* fill_mode ::= NULL_F */ +{ yymsp[0].minor.yy410 = FILL_MODE_NULL_F; } break; - case 520: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy684 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); } - yymsp[0].minor.yy684 = yylhsminor.yy684; + case 518: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy410 = FILL_MODE_LINEAR; } break; - case 521: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ -{ yylhsminor.yy684 = addNodeToList(pCxt, yymsp[-2].minor.yy684, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy44))); } - yymsp[-2].minor.yy684 = yylhsminor.yy684; + case 519: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy410 = FILL_MODE_NEXT; } break; - case 525: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ -{ yymsp[-5].minor.yy44 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy44), releaseRawExprNode(pCxt, yymsp[-1].minor.yy44)); } + case 522: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy110 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } + yymsp[0].minor.yy110 = yylhsminor.yy110; break; - case 528: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 523: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy110 = addNodeToList(pCxt, yymsp[-2].minor.yy110, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy42))); } + yymsp[-2].minor.yy110 = yylhsminor.yy110; + break; + case 527: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy42 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy42), releaseRawExprNode(pCxt, yymsp[-1].minor.yy42)); } + break; + case 530: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy44 = addOrderByClause(pCxt, yymsp[-3].minor.yy44, yymsp[-2].minor.yy684); - yylhsminor.yy44 = addSlimitClause(pCxt, yylhsminor.yy44, yymsp[-1].minor.yy44); - yylhsminor.yy44 = addLimitClause(pCxt, yylhsminor.yy44, yymsp[0].minor.yy44); + yylhsminor.yy42 = addOrderByClause(pCxt, yymsp[-3].minor.yy42, yymsp[-2].minor.yy110); + yylhsminor.yy42 = addSlimitClause(pCxt, yylhsminor.yy42, yymsp[-1].minor.yy42); + yylhsminor.yy42 = addLimitClause(pCxt, yylhsminor.yy42, yymsp[0].minor.yy42); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; - case 531: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ -{ yylhsminor.yy44 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-3].minor.yy44 = yylhsminor.yy44; + case 533: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy42 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-3].minor.yy42 = yylhsminor.yy42; break; - case 532: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ -{ yylhsminor.yy44 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy44, yymsp[0].minor.yy44); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 534: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy42 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy42, yymsp[0].minor.yy42); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; - case 540: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 544: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==544); -{ yymsp[-1].minor.yy44 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 542: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 546: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==546); +{ yymsp[-1].minor.yy42 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 541: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 545: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==545); -{ yymsp[-3].minor.yy44 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 543: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 547: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==547); +{ yymsp[-3].minor.yy42 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 542: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 546: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==546); -{ yymsp[-3].minor.yy44 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 544: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 548: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==548); +{ yymsp[-3].minor.yy42 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 547: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy44 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy44); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 549: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy42 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy42); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; - case 552: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy44 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy44), yymsp[-1].minor.yy490, yymsp[0].minor.yy23); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 554: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy42 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy42), yymsp[-1].minor.yy106, yymsp[0].minor.yy599); } + yymsp[-2].minor.yy42 = yylhsminor.yy42; break; - case 553: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy490 = ORDER_ASC; } + case 555: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy106 = ORDER_ASC; } break; - case 554: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy490 = ORDER_ASC; } + case 556: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy106 = ORDER_ASC; } break; - case 555: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy490 = ORDER_DESC; } + case 557: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy106 = ORDER_DESC; } break; - case 556: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy23 = NULL_ORDER_DEFAULT; } + case 558: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy599 = NULL_ORDER_DEFAULT; } break; - case 557: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy23 = NULL_ORDER_FIRST; } + case 559: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy599 = NULL_ORDER_FIRST; } break; - case 558: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy23 = NULL_ORDER_LAST; } + case 560: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy599 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c index 1e35529d27..5645e969a2 100644 --- a/source/libs/qworker/src/qworker.c +++ b/source/libs/qworker/src/qworker.c @@ -516,7 +516,7 @@ int32_t qwHandlePostPhaseEvents(QW_FPARAMS_DEF, int8_t phase, SQWPhaseInput *inp } if (QW_EVENT_RECEIVED(ctx, QW_EVENT_DROP)) { - if (QW_PHASE_POST_FETCH != phase || qwTaskNotInExec(ctx)) { + if (QW_PHASE_POST_FETCH != phase || ((!QW_QUERY_RUNNING(ctx)) && qwTaskNotInExec(ctx))) { QW_ERR_JRET(qwDropTask(QW_FPARAMS())); QW_ERR_JRET(ctx->rspCode); } diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 56c3c3ebef..2ef351cbb0 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -128,7 +128,7 @@ SStreamState* streamStateOpen(char* path, SStreamTask* pTask, bool specPath, int memset(statePath, 0, 1024); tstrncpy(statePath, path, 1024); } - if (tdbOpen(statePath, szPage, pages, &pState->pTdbState->db, 0) < 0) { + if (tdbOpen(statePath, szPage, pages, &pState->pTdbState->db, 1) < 0) { goto _err; } diff --git a/source/libs/sync/src/syncCommit.c b/source/libs/sync/src/syncCommit.c index 67ed1e0701..6d256a735d 100644 --- a/source/libs/sync/src/syncCommit.c +++ b/source/libs/sync/src/syncCommit.c @@ -110,7 +110,7 @@ int64_t syncNodeCheckCommitIndex(SSyncNode* ths, SyncIndex indexLikely) { if (indexLikely > ths->commitIndex && syncNodeAgreedUpon(ths, indexLikely)) { SyncIndex commitIndex = indexLikely; syncNodeUpdateCommitIndex(ths, commitIndex); - sTrace("vgId:%d, agreed upon. role:%d, term:%" PRId64 ", index: %" PRId64 "", ths->vgId, ths->state, + sTrace("vgId:%d, agreed upon. role:%d, term:%" PRId64 ", index:%" PRId64 "", ths->vgId, ths->state, ths->raftStore.currentTerm, commitIndex); } return ths->commitIndex; diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 77b87a885b..1d96412ba3 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -85,7 +85,7 @@ int64_t syncOpen(SSyncInfo* pSyncInfo) { int32_t syncStart(int64_t rid) { SSyncNode* pSyncNode = syncNodeAcquire(rid); if (pSyncNode == NULL) { - sError("failed to acquire rid: %" PRId64 " of tsNodeReftId for pSyncNode", rid); + sError("failed to acquire rid:%" PRId64 " of tsNodeReftId for pSyncNode", rid); return -1; } @@ -756,7 +756,7 @@ int32_t syncNodeLogStoreRestoreOnNeed(SSyncNode* pNode) { SyncIndex lastVer = pNode->pLogStore->syncLogLastIndex(pNode->pLogStore); if (lastVer < commitIndex || firstVer > commitIndex + 1) { if (pNode->pLogStore->syncLogRestoreFromSnapshot(pNode->pLogStore, commitIndex)) { - sError("vgId:%d, failed to restore log store from snapshot since %s. lastVer: %" PRId64 ", snapshotVer: %" PRId64, + sError("vgId:%d, failed to restore log store from snapshot since %s. lastVer:%" PRId64 ", snapshotVer:%" PRId64, pNode->vgId, terrstr(), lastVer, commitIndex); return -1; } @@ -1112,7 +1112,7 @@ int32_t syncNodeRestore(SSyncNode* pSyncNode) { SyncIndex endIndex = pSyncNode->pLogBuf->endIndex; if (lastVer != -1 && endIndex != lastVer + 1) { terrno = TSDB_CODE_WAL_LOG_INCOMPLETE; - sError("vgId:%d, failed to restore sync node since %s. expected lastLogIndex: %" PRId64 ", lastVer: %" PRId64 "", + sError("vgId:%d, failed to restore sync node since %s. expected lastLogIndex:%" PRId64 ", lastVer:%" PRId64 "", pSyncNode->vgId, terrstr(), endIndex - 1, lastVer); return -1; } @@ -1831,7 +1831,7 @@ void syncNodeCandidate2Leader(SSyncNode* pSyncNode) { SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); ASSERT(lastIndex >= 0); - sInfo("vgId:%d, become leader. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64 "", + sInfo("vgId:%d, become leader. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64 "", pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); } @@ -1850,7 +1850,7 @@ void syncNodeFollower2Candidate(SSyncNode* pSyncNode) { ASSERT(pSyncNode->state == TAOS_SYNC_STATE_FOLLOWER); pSyncNode->state = TAOS_SYNC_STATE_CANDIDATE; SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); - sInfo("vgId:%d, become candidate from follower. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64, + sInfo("vgId:%d, become candidate from follower. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64, pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); sNTrace(pSyncNode, "follower to candidate"); @@ -1860,7 +1860,7 @@ void syncNodeLeader2Follower(SSyncNode* pSyncNode) { ASSERT(pSyncNode->state == TAOS_SYNC_STATE_LEADER); syncNodeBecomeFollower(pSyncNode, "leader to follower"); SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); - sInfo("vgId:%d, become follower from leader. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64, + sInfo("vgId:%d, become follower from leader. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64, pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); sNTrace(pSyncNode, "leader to follower"); @@ -1870,7 +1870,7 @@ void syncNodeCandidate2Follower(SSyncNode* pSyncNode) { ASSERT(pSyncNode->state == TAOS_SYNC_STATE_CANDIDATE); syncNodeBecomeFollower(pSyncNode, "candidate to follower"); SyncIndex lastIndex = pSyncNode->pLogStore->syncLogLastIndex(pSyncNode->pLogStore); - sInfo("vgId:%d, become follower from candidate. term: %" PRId64 ", commit index: %" PRId64 ", last index: %" PRId64, + sInfo("vgId:%d, become follower from candidate. term:%" PRId64 ", commit index:%" PRId64 ", last index:%" PRId64, pSyncNode->vgId, pSyncNode->raftStore.currentTerm, pSyncNode->commitIndex, lastIndex); sNTrace(pSyncNode, "candidate to follower"); @@ -2310,7 +2310,7 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) { // proceed match index, with replicating on needed SyncIndex matchIndex = syncLogBufferProceed(ths->pLogBuf, ths, NULL); - sTrace("vgId:%d, append raft entry. index: %" PRId64 ", term: %" PRId64 " pBuf: [%" PRId64 " %" PRId64 " %" PRId64 + sTrace("vgId:%d, append raft entry. index:%" PRId64 ", term:%" PRId64 " pBuf: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", ths->vgId, pEntry->index, pEntry->term, ths->pLogBuf->startIndex, ths->pLogBuf->commitIndex, ths->pLogBuf->matchIndex, ths->pLogBuf->endIndex); @@ -2483,7 +2483,7 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) { sError("vgId:%d, sync enqueue step-down msg error, code:%d", ths->vgId, code); rpcFreeCont(rpcMsgLocalCmd.pCont); } else { - sTrace("vgId:%d, sync enqueue step-down msg, new-term: %" PRId64, ths->vgId, pSyncMsg->currentTerm); + sTrace("vgId:%d, sync enqueue step-down msg, new-term:%" PRId64, ths->vgId, pSyncMsg->currentTerm); } } } @@ -2549,7 +2549,7 @@ int32_t syncNodeOnLocalCmd(SSyncNode* ths, const SRpcMsg* pRpcMsg) { (void)syncNodeUpdateCommitIndex(ths, pMsg->commitIndex); } if (syncLogBufferCommit(ths->pLogBuf, ths, ths->commitIndex) < 0) { - sError("vgId:%d, failed to commit raft log since %s. commit index: %" PRId64 "", ths->vgId, terrstr(), + sError("vgId:%d, failed to commit raft log since %s. commit index:%" PRId64 "", ths->vgId, terrstr(), ths->commitIndex); } } else { diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index bb3bb0d6a4..b3eb5684cf 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -132,16 +132,16 @@ SSyncRaftEntry* syncEntryBuildDummy(SyncTerm term, SyncIndex index, int32_t vgId int32_t syncLogValidateAlignmentOfCommit(SSyncNode* pNode, SyncIndex commitIndex) { SyncIndex firstVer = pNode->pLogStore->syncLogBeginIndex(pNode->pLogStore); if (firstVer > commitIndex + 1) { - sError("vgId:%d, firstVer of WAL log greater than tsdb commit version + 1. firstVer: %" PRId64 - ", tsdb commit version: %" PRId64 "", + sError("vgId:%d, firstVer of WAL log greater than tsdb commit version + 1. firstVer:%" PRId64 + ", tsdb commit version:%" PRId64 "", pNode->vgId, firstVer, commitIndex); return -1; } SyncIndex lastVer = pNode->pLogStore->syncLogLastIndex(pNode->pLogStore); if (lastVer < commitIndex) { - sError("vgId:%d, lastVer of WAL log less than tsdb commit version. lastVer: %" PRId64 - ", tsdb commit version: %" PRId64 "", + sError("vgId:%d, lastVer of WAL log less than tsdb commit version. lastVer:%" PRId64 + ", tsdb commit version:%" PRId64 "", pNode->vgId, lastVer, commitIndex); return -1; } @@ -293,7 +293,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt bool inBuf = true; if (index <= pBuf->commitIndex) { - sTrace("vgId:%d, already committed. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 + sTrace("vgId:%d, already committed. index:%" PRId64 ", term:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -306,7 +306,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt } if (index - pBuf->startIndex >= pBuf->size) { - sWarn("vgId:%d, out of buffer range. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 + sWarn("vgId:%d, out of buffer range. index:%" PRId64 ", term:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -314,8 +314,8 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt } if (index > pBuf->matchIndex && lastMatchTerm != prevTerm) { - sWarn("vgId:%d, not ready to accept. index: %" PRId64 ", term: %" PRId64 ": prevterm: %" PRId64 - " != lastmatch: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", + sWarn("vgId:%d, not ready to accept. index:%" PRId64 ", term:%" PRId64 ": prevterm:%" PRId64 + " != lastmatch:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, prevTerm, lastMatchTerm, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); goto _out; @@ -328,7 +328,7 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt if (pEntry->term != pExist->term) { (void)syncLogBufferRollback(pBuf, pNode, index); } else { - sTrace("vgId:%d, duplicate log entry received. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 + sTrace("vgId:%d, duplicate log entry received. index:%" PRId64 ", term:%" PRId64 ". log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -434,7 +434,7 @@ int64_t syncLogBufferProceed(SSyncLogBuffer* pBuf, SSyncNode* pNode, SyncTerm* p // increase match index pBuf->matchIndex = index; - sTrace("vgId:%d, log buffer proceed. start index: %" PRId64 ", match index: %" PRId64 ", end index: %" PRId64, + sTrace("vgId:%d, log buffer proceed. start index:%" PRId64 ", match index:%" PRId64 ", end index:%" PRId64, pNode->vgId, pBuf->startIndex, pBuf->matchIndex, pBuf->endIndex); // replicate on demand @@ -475,7 +475,7 @@ int32_t syncLogFsmExecute(SSyncNode* pNode, SSyncFSM* pFsm, ESyncState role, Syn } if (pEntry->originalRpcType == TDMT_VND_COMMIT) { - sInfo("vgId:%d, fsm execute vnode commit. index: %" PRId64 ", term: %" PRId64 "", pNode->vgId, pEntry->index, + sInfo("vgId:%d, fsm execute vnode commit. index:%" PRId64 ", term:%" PRId64 "", pNode->vgId, pEntry->index, pEntry->term); } @@ -528,7 +528,7 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm goto _out; } - sTrace("vgId:%d, commit. log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 "), role: %d, term: %" PRId64, + sTrace("vgId:%d, commit. log buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 "), role:%d, term:%" PRId64, pNode->vgId, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex, role, term); // execute in fsm @@ -541,19 +541,19 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm // execute it if (!syncUtilUserCommit(pEntry->originalRpcType)) { - sInfo("vgId:%d, commit sync barrier. index: %" PRId64 ", term:%" PRId64 ", type: %s", vgId, pEntry->index, + sInfo("vgId:%d, commit sync barrier. index:%" PRId64 ", term:%" PRId64 ", type:%s", vgId, pEntry->index, pEntry->term, TMSG_INFO(pEntry->originalRpcType)); } if (syncLogFsmExecute(pNode, pFsm, role, term, pEntry, 0) != 0) { sError("vgId:%d, failed to execute sync log entry. index:%" PRId64 ", term:%" PRId64 - ", role: %d, current term: %" PRId64, + ", role:%d, current term:%" PRId64, vgId, pEntry->index, pEntry->term, role, term); goto _out; } pBuf->commitIndex = index; - sTrace("vgId:%d, committed index: %" PRId64 ", term: %" PRId64 ", role: %d, current term: %" PRId64 "", pNode->vgId, + sTrace("vgId:%d, committed index:%" PRId64 ", term:%" PRId64 ", role:%d, current term:%" PRId64 "", pNode->vgId, pEntry->index, pEntry->term, role, term); if (!inBuf) { @@ -614,7 +614,7 @@ int32_t syncLogReplMgrRetryOnNeed(SSyncLogReplMgr* pMgr, SSyncNode* pNode) { SRaftId* pDestId = &pNode->replicasId[pMgr->peerId]; if (pMgr->retryBackoff == SYNC_MAX_RETRY_BACKOFF) { syncLogReplMgrReset(pMgr); - sWarn("vgId:%d, reset sync log repl mgr since retry backoff exceeding limit. peer: %" PRIx64, pNode->vgId, + sWarn("vgId:%d, reset sync log repl mgr since retry backoff exceeding limit. peer:%" PRIx64, pNode->vgId, pDestId->addr); return -1; } @@ -639,7 +639,7 @@ int32_t syncLogReplMgrRetryOnNeed(SSyncLogReplMgr* pMgr, SSyncNode* pNode) { if (pMgr->states[pos].acked) { if (pMgr->matchIndex < index && pMgr->states[pos].timeMs + (syncGetRetryMaxWaitMs() << 3) < nowMs) { syncLogReplMgrReset(pMgr); - sWarn("vgId:%d, reset sync log repl mgr since stagnation. index: %" PRId64 ", peer: %" PRIx64, pNode->vgId, + sWarn("vgId:%d, reset sync log repl mgr since stagnation. index:%" PRId64 ", peer:%" PRIx64, pNode->vgId, index, pDestId->addr); goto _out; } @@ -648,7 +648,7 @@ int32_t syncLogReplMgrRetryOnNeed(SSyncLogReplMgr* pMgr, SSyncNode* pNode) { bool barrier = false; if (syncLogReplMgrReplicateOneTo(pMgr, pNode, index, &term, pDestId, &barrier) < 0) { - sError("vgId:%d, failed to replicate sync log entry since %s. index: %" PRId64 ", dest: %" PRIx64 "", pNode->vgId, + sError("vgId:%d, failed to replicate sync log entry since %s. index:%" PRId64 ", dest:%" PRIx64 "", pNode->vgId, terrstr(), index, pDestId->addr); goto _out; } @@ -670,8 +670,8 @@ _out: if (retried) { pMgr->retryBackoff = syncLogGetNextRetryBackoff(pMgr); SSyncLogBuffer* pBuf = pNode->pLogBuf; - sInfo("vgId:%d, resend %d sync log entries. dest: %" PRIx64 ", indexes: %" PRId64 " ..., terms: ... %" PRId64 - ", retryWaitMs: %" PRId64 ", mgr: [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 + sInfo("vgId:%d, resend %d sync log entries. dest:%" PRIx64 ", indexes:%" PRId64 " ..., terms: ... %" PRId64 + ", retryWaitMs:%" PRId64 ", mgr: [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, count, pDestId->addr, firstIndex, term, retryWaitMs, pMgr->startIndex, pMgr->matchIndex, pMgr->endIndex, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -714,7 +714,7 @@ int32_t syncLogReplMgrProcessReplyAsRecovery(SSyncLogReplMgr* pMgr, SSyncNode* p } if (pMsg->success == false && pMsg->matchIndex >= pMsg->lastSendIndex) { - sWarn("vgId:%d, failed to rollback match index. peer: dnode:%d, match index: %" PRId64 ", last sent: %" PRId64, + sWarn("vgId:%d, failed to rollback match index. peer: dnode:%d, match index:%" PRId64 ", last sent:%" PRId64, pNode->vgId, DID(&destId), pMsg->matchIndex, pMsg->lastSendIndex); if (syncNodeStartSnapshot(pNode, &destId) < 0) { sError("vgId:%d, failed to start snapshot for peer dnode:%d", pNode->vgId, DID(&destId)); @@ -761,7 +761,7 @@ int32_t syncLogReplMgrProcessHeartbeatReply(SSyncLogReplMgr* pMgr, SSyncNode* pN SSyncLogBuffer* pBuf = pNode->pLogBuf; taosThreadMutexLock(&pBuf->mutex); if (pMsg->startTime != 0 && pMsg->startTime != pMgr->peerStartTime) { - sInfo("vgId:%d, reset sync log repl mgr in heartbeat. peer: %" PRIx64 ", start time:%" PRId64 ", old:%" PRId64 "", + sInfo("vgId:%d, reset sync log repl mgr in heartbeat. peer:%" PRIx64 ", start time:%" PRId64 ", old:%" PRId64 "", pNode->vgId, pMsg->srcId.addr, pMsg->startTime, pMgr->peerStartTime); syncLogReplMgrReset(pMgr); pMgr->peerStartTime = pMsg->startTime; @@ -774,7 +774,7 @@ int32_t syncLogReplMgrProcessReply(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sync SSyncLogBuffer* pBuf = pNode->pLogBuf; taosThreadMutexLock(&pBuf->mutex); if (pMsg->startTime != pMgr->peerStartTime) { - sInfo("vgId:%d, reset sync log repl mgr in appendlog reply. peer: %" PRIx64 ", start time:%" PRId64 + sInfo("vgId:%d, reset sync log repl mgr in appendlog reply. peer:%" PRIx64 ", start time:%" PRId64 ", old:%" PRId64, pNode->vgId, pMsg->srcId.addr, pMsg->startTime, pMgr->peerStartTime); syncLogReplMgrReset(pMgr); @@ -815,7 +815,7 @@ int32_t syncLogReplMgrReplicateProbe(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy bool barrier = false; SyncTerm term = -1; if (syncLogReplMgrReplicateOneTo(pMgr, pNode, index, &term, pDestId, &barrier) < 0) { - sError("vgId:%d, failed to replicate log entry since %s. index: %" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, + sError("vgId:%d, failed to replicate log entry since %s. index:%" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, terrstr(), index, pDestId->addr); return -1; } @@ -830,7 +830,7 @@ int32_t syncLogReplMgrReplicateProbe(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy pMgr->endIndex = index + 1; SSyncLogBuffer* pBuf = pNode->pLogBuf; - sTrace("vgId:%d, probe peer:%" PRIx64 " with msg of index:%" PRId64 " term: %" PRId64 ". mgr (rs:%d): [%" PRId64 + sTrace("vgId:%d, probe peer:%" PRIx64 " with msg of index:%" PRId64 " term:%" PRId64 ". mgr (rs:%d): [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pDestId->addr, index, term, pMgr->restored, pMgr->startIndex, pMgr->matchIndex, pMgr->endIndex, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -860,7 +860,7 @@ int32_t syncLogReplMgrReplicateAttempt(SSyncLogReplMgr* pMgr, SSyncNode* pNode) bool barrier = false; SyncTerm term = -1; if (syncLogReplMgrReplicateOneTo(pMgr, pNode, index, &term, pDestId, &barrier) < 0) { - sError("vgId:%d, failed to replicate log entry since %s. index: %" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, + sError("vgId:%d, failed to replicate log entry since %s. index:%" PRId64 ", dest: 0x%016" PRIx64 "", pNode->vgId, terrstr(), index, pDestId->addr); return -1; } @@ -874,7 +874,7 @@ int32_t syncLogReplMgrReplicateAttempt(SSyncLogReplMgr* pMgr, SSyncNode* pNode) pMgr->endIndex = index + 1; if (barrier) { - sInfo("vgId:%d, replicated sync barrier to dest: %" PRIx64 ". index: %" PRId64 ", term: %" PRId64 + sInfo("vgId:%d, replicated sync barrier to dest:%" PRIx64 ". index:%" PRId64 ", term:%" PRId64 ", repl mgr: rs(%d) [%" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pDestId->addr, index, term, pMgr->restored, pMgr->startIndex, pMgr->matchIndex, pMgr->endIndex); @@ -885,7 +885,7 @@ int32_t syncLogReplMgrReplicateAttempt(SSyncLogReplMgr* pMgr, SSyncNode* pNode) syncLogReplMgrRetryOnNeed(pMgr, pNode); SSyncLogBuffer* pBuf = pNode->pLogBuf; - sTrace("vgId:%d, replicated %d msgs to peer: %" PRIx64 ". indexes: %" PRId64 "..., terms: ...%" PRId64 + sTrace("vgId:%d, replicated %d msgs to peer:%" PRIx64 ". indexes:%" PRId64 "..., terms: ...%" PRId64 ", mgr: (rs:%d) [%" PRId64 " %" PRId64 ", %" PRId64 "), buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, count, pDestId->addr, firstIndex, term, pMgr->restored, pMgr->startIndex, pMgr->matchIndex, @@ -1028,7 +1028,7 @@ int32_t syncLogBufferRollback(SSyncLogBuffer* pBuf, SSyncNode* pNode, SyncIndex return 0; } - sInfo("vgId:%d, rollback sync log buffer. toindex: %" PRId64 ", buffer: [%" PRId64 " %" PRId64 " %" PRId64 + sInfo("vgId:%d, rollback sync log buffer. toindex:%" PRId64 ", buffer: [%" PRId64 " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, toIndex, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); @@ -1119,11 +1119,11 @@ int32_t syncLogReplMgrReplicateOneTo(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy pEntry = syncLogBufferGetOneEntry(pBuf, pNode, index, &inBuf); if (pEntry == NULL) { - sError("vgId:%d, failed to get raft entry for index: %" PRId64 "", pNode->vgId, index); + sError("vgId:%d, failed to get raft entry for index:%" PRId64 "", pNode->vgId, index); if (terrno == TSDB_CODE_WAL_LOG_NOT_EXIST) { SSyncLogReplMgr* pMgr = syncNodeGetLogReplMgr(pNode, pDestId); if (pMgr) { - sInfo("vgId:%d, reset sync log repl mgr of peer: %" PRIx64 " since %s. index: %" PRId64, pNode->vgId, + sInfo("vgId:%d, reset sync log repl mgr of peer:%" PRIx64 " since %s. index:%" PRId64, pNode->vgId, pDestId->addr, terrstr(), index); (void)syncLogReplMgrReset(pMgr); } @@ -1134,7 +1134,7 @@ int32_t syncLogReplMgrReplicateOneTo(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy prevLogTerm = syncLogReplMgrGetPrevLogTerm(pMgr, pNode, index); if (prevLogTerm < 0) { - sError("vgId:%d, failed to get prev log term since %s. index: %" PRId64 "", pNode->vgId, terrstr(), index); + sError("vgId:%d, failed to get prev log term since %s. index:%" PRId64 "", pNode->vgId, terrstr(), index); goto _err; } if (pTerm) *pTerm = pEntry->term; @@ -1147,7 +1147,7 @@ int32_t syncLogReplMgrReplicateOneTo(SSyncLogReplMgr* pMgr, SSyncNode* pNode, Sy (void)syncNodeSendAppendEntries(pNode, pDestId, &msgOut); - sTrace("vgId:%d, replicate one msg index: %" PRId64 " term: %" PRId64 " prevterm: %" PRId64 " to dest: 0x%016" PRIx64, + sTrace("vgId:%d, replicate one msg index:%" PRId64 " term:%" PRId64 " prevterm:%" PRId64 " to dest: 0x%016" PRIx64, pNode->vgId, pEntry->index, pEntry->term, prevLogTerm, pDestId->addr); if (!inBuf) { diff --git a/source/libs/sync/src/syncRaftEntry.c b/source/libs/sync/src/syncRaftEntry.c index 988a86cc67..623f1b77a4 100644 --- a/source/libs/sync/src/syncRaftEntry.c +++ b/source/libs/sync/src/syncRaftEntry.c @@ -91,7 +91,7 @@ SSyncRaftEntry* syncEntryBuildNoop(SyncTerm term, SyncIndex index, int32_t vgId) void syncEntryDestroy(SSyncRaftEntry* pEntry) { if (pEntry != NULL) { - sTrace("free entry: %p", pEntry); + sTrace("free entry:%p", pEntry); taosMemoryFree(pEntry); } } diff --git a/source/libs/sync/src/syncSnapshot.c b/source/libs/sync/src/syncSnapshot.c index e61bcc9ffc..18f263cc95 100644 --- a/source/libs/sync/src/syncSnapshot.c +++ b/source/libs/sync/src/syncSnapshot.c @@ -510,16 +510,8 @@ SyncIndex syncNodeGetSnapBeginIndex(SSyncNode *ths) { SSyncLogStoreData *pData = ths->pLogStore->data; SWal *pWal = pData->pWal; - bool isEmpty = ths->pLogStore->syncLogIsEmpty(ths->pLogStore); int64_t walCommitVer = walGetCommittedVer(pWal); - - if (!isEmpty && ths->commitIndex != walCommitVer) { - sNError(ths, "commit not same, wal-commit:%" PRId64 ", commit:%" PRId64 ", ignore", walCommitVer, - ths->commitIndex); - snapStart = walCommitVer + 1; - } else { - snapStart = ths->commitIndex + 1; - } + snapStart = TMAX(ths->commitIndex, walCommitVer) + 1; sNInfo(ths, "snapshot begin index is %" PRId64, snapStart); } diff --git a/source/libs/sync/src/syncUtil.c b/source/libs/sync/src/syncUtil.c index 6a50572cba..97641b8f41 100644 --- a/source/libs/sync/src/syncUtil.c +++ b/source/libs/sync/src/syncUtil.c @@ -43,7 +43,7 @@ void syncUtilNodeInfo2EpSet(const SNodeInfo* pInfo, SEpSet* pEpSet) { bool syncUtilNodeInfo2RaftId(const SNodeInfo* pInfo, SyncGroupId vgId, SRaftId* raftId) { uint32_t ipv4 = taosGetIpv4FromFqdn(pInfo->nodeFqdn); if (ipv4 == 0xFFFFFFFF || ipv4 == 1) { - sError("failed to resolve ipv4 addr, fqdn: %s", pInfo->nodeFqdn); + sError("failed to resolve ipv4 addr, fqdn:%s", pInfo->nodeFqdn); terrno = TSDB_CODE_TSC_INVALID_FQDN; return false; } diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 1a99db5f99..111742a6f4 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -671,7 +671,7 @@ static SCliConn* cliCreateConn(SCliThrd* pThrd) { conn->stream = (uv_stream_t*)taosMemoryMalloc(sizeof(uv_tcp_t)); uv_tcp_init(pThrd->loop, (uv_tcp_t*)(conn->stream)); conn->stream->data = conn; - transSetConnOption((uv_tcp_t*)conn->stream); + // transSetConnOption((uv_tcp_t*)conn->stream); uv_timer_t* timer = taosArrayGetSize(pThrd->timerList) > 0 ? *(uv_timer_t**)taosArrayPop(pThrd->timerList) : NULL; if (timer == NULL) { @@ -778,7 +778,7 @@ static void cliSendCb(uv_write_t* req, int status) { SCliMsg* pMsg = !transQueueEmpty(&pConn->cliMsgs) ? transQueueGet(&pConn->cliMsgs, 0) : NULL; if (pMsg != NULL) { int64_t cost = taosGetTimestampUs() - pMsg->st; - if (cost > 1000) { + if (cost > 1000 * 20) { tWarn("%s conn %p send cost:%dus, send exception", CONN_GET_INST_LABEL(pConn), pConn, (int)cost); } } @@ -800,9 +800,12 @@ static void cliSendCb(uv_write_t* req, int status) { } void cliSend(SCliConn* pConn) { - bool empty = transQueueEmpty(&pConn->cliMsgs); - ASSERTS(empty == false, "trans-cli get invalid msg"); - if (empty == true) { + SCliThrd* pThrd = pConn->hostThrd; + STrans* pTransInst = pThrd->pTransInst; + + if (transQueueEmpty(&pConn->cliMsgs)) { + tError("%s conn %p not msg to send", pTransInst->label, pConn); + cliHandleExcept(pConn); return; } @@ -812,9 +815,6 @@ void cliSend(SCliConn* pConn) { STransConnCtx* pCtx = pCliMsg->ctx; - SCliThrd* pThrd = pConn->hostThrd; - STrans* pTransInst = pThrd->pTransInst; - STransMsg* pMsg = (STransMsg*)(&pCliMsg->msg); if (pMsg->pCont == 0) { pMsg->pCont = (void*)rpcMallocCont(0); @@ -1045,6 +1045,12 @@ static FORCE_INLINE uint32_t cliGetIpFromFqdnCache(SHashObj* cache, char* fqdn) uint32_t* v = taosHashGet(cache, fqdn, strlen(fqdn)); if (v == NULL) { addr = taosGetIpv4FromFqdn(fqdn); + if (addr == 0xffffffff) { + terrno = TAOS_SYSTEM_ERROR(errno); + tError("failed to get ip from fqdn:%s since %s", fqdn, terrstr()); + return addr; + } + taosHashPut(cache, fqdn, strlen(fqdn), &addr, sizeof(addr)); } else { addr = *v; @@ -1061,9 +1067,10 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { STransConnCtx* pCtx = pMsg->ctx; cliMayCvtFqdnToIp(&pCtx->epSet, &pThrd->cvtAddr); + STraceId* trace = &pMsg->msg.info.traceId; if (!EPSET_IS_VALID(&pCtx->epSet)) { - tError("invalid epset"); + tGError("%s, msg %s sent with invalid epset", pTransInst->label, TMSG_INFO(pMsg->msg.msgType)); destroyCmsg(pMsg); return; } @@ -1116,15 +1123,45 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { conn->ip = strdup(EPSET_GET_INUSE_IP(&pCtx->epSet)); conn->port = EPSET_GET_INUSE_PORT(&pCtx->epSet); + uint32_t ipaddr = cliGetIpFromFqdnCache(pThrd->fqdn2ipCache, conn->ip); + if (ipaddr == 0xffffffff) { + uv_timer_stop(conn->timer); + conn->timer->data = NULL; + taosArrayPush(pThrd->timerList, &conn->timer); + conn->timer = NULL; + + cliHandleExcept(conn); + return; + } + struct sockaddr_in addr; addr.sin_family = AF_INET; - addr.sin_addr.s_addr = cliGetIpFromFqdnCache(pThrd->fqdn2ipCache, conn->ip); + addr.sin_addr.s_addr = ipaddr; addr.sin_port = (uint16_t)htons((uint16_t)conn->port); - STraceId* trace = &(pMsg->msg.info.traceId); tGTrace("%s conn %p try to connect to %s:%d", pTransInst->label, conn, conn->ip, conn->port); + int32_t fd = taosCreateSocketWithTimeout(TRANS_CONN_TIMEOUT * 4); + if (fd == -1) { + tGError("%s conn %p failed to create socket, reason:%s", transLabel(pTransInst), conn, + tstrerror(TAOS_SYSTEM_ERROR(errno))); + cliHandleExcept(conn); + errno = 0; + return; + } + int ret = uv_tcp_open((uv_tcp_t*)conn->stream, fd); + if (ret != 0) { + tGError("%s conn %p failed to set stream, reason:%s", transLabel(pTransInst), conn, uv_err_name(ret)); + cliHandleExcept(conn); + return; + } + ret = transSetConnOption((uv_tcp_t*)conn->stream); + if (ret != 0) { + tGError("%s conn %p failed to set socket opt, reason:%s", transLabel(pTransInst), conn, uv_err_name(ret)); + cliHandleExcept(conn); + return; + } - int ret = uv_tcp_connect(&conn->connReq, (uv_tcp_t*)(conn->stream), (const struct sockaddr*)&addr, cliConnCb); + ret = uv_tcp_connect(&conn->connReq, (uv_tcp_t*)(conn->stream), (const struct sockaddr*)&addr, cliConnCb); if (ret != 0) { tGError("%s conn %p failed to connect to %s:%d, reason:%s", pTransInst->label, conn, conn->ip, conn->port, uv_err_name(ret)); @@ -1139,7 +1176,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { } uv_timer_start(conn->timer, cliConnTimeout, TRANS_CONN_TIMEOUT, 0); } - STraceId* trace = &pMsg->msg.info.traceId; tGTrace("%s conn %p ready", pTransInst->label, conn); } static void cliAsyncCb(uv_async_t* handle) { @@ -1275,7 +1311,11 @@ void* transInitClient(uint32_t ip, uint32_t port, char* label, int numOfThreads, for (int i = 0; i < cli->numOfThreads; i++) { SCliThrd* pThrd = createThrdObj(shandle); - int err = taosThreadCreate(&pThrd->thread, NULL, cliWorkThread, (void*)(pThrd)); + if (pThrd == NULL) { + return NULL; + } + + int err = taosThreadCreate(&pThrd->thread, NULL, cliWorkThread, (void*)(pThrd)); if (err == 0) { tDebug("success to create tranport-cli thread:%d", i); } @@ -1332,9 +1372,23 @@ static SCliThrd* createThrdObj(void* trans) { taosThreadMutexInit(&pThrd->msgMtx, NULL); pThrd->loop = (uv_loop_t*)taosMemoryMalloc(sizeof(uv_loop_t)); - uv_loop_init(pThrd->loop); - + int err = uv_loop_init(pThrd->loop); + if (err != 0) { + tError("failed to init uv_loop, reason:%s", uv_err_name(err)); + taosMemoryFree(pThrd->loop); + taosThreadMutexDestroy(&pThrd->msgMtx); + taosMemoryFree(pThrd); + return NULL; + } pThrd->asyncPool = transAsyncPoolCreate(pThrd->loop, 8, pThrd, cliAsyncCb); + if (pThrd->asyncPool == NULL) { + tError("failed to init async pool"); + uv_loop_close(pThrd->loop); + taosMemoryFree(pThrd->loop); + taosThreadMutexDestroy(&pThrd->msgMtx); + taosMemoryFree(pThrd); + return NULL; + } pThrd->prepare = taosMemoryCalloc(1, sizeof(uv_prepare_t)); uv_prepare_init(pThrd->loop, pThrd->prepare); diff --git a/source/libs/transport/src/transComm.c b/source/libs/transport/src/transComm.c index 1161ed7c00..4c107a88f1 100644 --- a/source/libs/transport/src/transComm.c +++ b/source/libs/transport/src/transComm.c @@ -205,6 +205,10 @@ bool transReadComplete(SConnBuffer* connBuf) { } int transSetConnOption(uv_tcp_t* stream) { +#if defined(WINDOWS) || defined(DARWIN) +#else + uv_tcp_keepalive(stream, 1, 20); +#endif return uv_tcp_nodelay(stream, 1); // int ret = uv_tcp_keepalive(stream, 5, 60); } @@ -214,24 +218,37 @@ SAsyncPool* transAsyncPoolCreate(uv_loop_t* loop, int sz, void* arg, AsyncCB cb) pool->nAsync = sz; pool->asyncs = taosMemoryCalloc(1, sizeof(uv_async_t) * pool->nAsync); - for (int i = 0; i < pool->nAsync; i++) { + int i = 0, err = 0; + for (i = 0; i < pool->nAsync; i++) { + uv_async_t* async = &(pool->asyncs[i]); + SAsyncItem* item = taosMemoryCalloc(1, sizeof(SAsyncItem)); item->pThrd = arg; QUEUE_INIT(&item->qmsg); taosThreadMutexInit(&item->mtx, NULL); - uv_async_t* async = &(pool->asyncs[i]); - uv_async_init(loop, async, cb); async->data = item; + err = uv_async_init(loop, async, cb); + if (err != 0) { + tError("failed to init async, reason:%s", uv_err_name(err)); + break; + } } + + if (i != pool->nAsync) { + transAsyncPoolDestroy(pool); + pool = NULL; + } + return pool; } void transAsyncPoolDestroy(SAsyncPool* pool) { for (int i = 0; i < pool->nAsync; i++) { uv_async_t* async = &(pool->asyncs[i]); - SAsyncItem* item = async->data; + if (item == NULL) continue; + taosThreadMutexDestroy(&item->mtx); taosMemoryFree(item); } diff --git a/source/os/src/osSocket.c b/source/os/src/osSocket.c index 715c2632e0..ddb8eca0eb 100644 --- a/source/os/src/osSocket.c +++ b/source/os/src/osSocket.c @@ -55,7 +55,7 @@ typedef struct TdSocket { #endif int refId; SocketFd fd; -} * TdSocketPtr, TdSocket; +} *TdSocketPtr, TdSocket; typedef struct TdSocketServer { #if SOCKET_WITH_LOCK @@ -63,7 +63,7 @@ typedef struct TdSocketServer { #endif int refId; SocketFd fd; -} * TdSocketServerPtr, TdSocketServer; +} *TdSocketServerPtr, TdSocketServer; typedef struct TdEpoll { #if SOCKET_WITH_LOCK @@ -71,7 +71,7 @@ typedef struct TdEpoll { #endif int refId; EpollFd fd; -} * TdEpollPtr, TdEpoll; +} *TdEpollPtr, TdEpoll; #if 0 int32_t taosSendto(TdSocketPtr pSocket, void *buf, int len, unsigned int flags, const struct sockaddr *dest_addr, @@ -944,7 +944,7 @@ uint32_t taosGetIpv4FromFqdn(const char *fqdn) { iResult = WSAStartup(MAKEWORD(2, 2), &wsaData); if (iResult != 0) { // printf("WSAStartup failed: %d\n", iResult); - return 1; + return 0xFFFFFFFF; } #endif struct addrinfo hints = {0}; @@ -1005,7 +1005,7 @@ int32_t taosGetFqdn(char *fqdn) { // immediately // hints.ai_family = AF_INET; strcpy(fqdn, hostname); - strcpy(fqdn+strlen(hostname), ".local"); + strcpy(fqdn + strlen(hostname), ".local"); #else // __APPLE__ struct addrinfo hints = {0}; struct addrinfo *result = NULL; @@ -1060,7 +1060,7 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) { #if defined(WINDOWS) SOCKET fd; #else - int fd; + int fd; #endif if ((fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) { return -1; @@ -1071,11 +1071,12 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) { return -1; } #elif defined(_TD_DARWIN_64) - uint32_t conn_timeout_ms = timeout * 1000; - if (0 != setsockopt(fd, IPPROTO_TCP, TCP_CONNECTIONTIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { - taosCloseSocketNoCheck1(fd); - return -1; - } + // invalid config + // uint32_t conn_timeout_ms = timeout * 1000; + // if (0 != setsockopt(fd, IPPROTO_TCP, TCP_CONNECTIONTIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { + // taosCloseSocketNoCheck1(fd); + // return -1; + //} #else // Linux like systems uint32_t conn_timeout_ms = timeout * 1000; if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { diff --git a/source/util/src/terror.c b/source/util/src/terror.c index bab3edc870..d63687c8d7 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -289,6 +289,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_STREAM_NOT_EXIST, "Stream not exist") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_STREAM_OPTION, "Invalid stream option") TAOS_DEFINE_ERROR(TSDB_CODE_MND_STREAM_MUST_BE_DELETED, "Stream must be dropped first") TAOS_DEFINE_ERROR(TSDB_CODE_MND_MULTI_REPLICA_SOURCE_DB, "Stream temporarily does not support source db having replica > 1") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_TOO_MANY_STREAMS, "Too many streams") // mnode-sma TAOS_DEFINE_ERROR(TSDB_CODE_MND_SMA_ALREADY_EXIST, "SMA already exists") diff --git a/source/util/src/tpagedbuf.c b/source/util/src/tpagedbuf.c index 7c60862c56..3cecfdff9c 100644 --- a/source/util/src/tpagedbuf.c +++ b/source/util/src/tpagedbuf.c @@ -5,11 +5,11 @@ #include "thash.h" #include "tlog.h" -#define GET_PAYLOAD_DATA(_p) ((char*)(_p)->pData + POINTER_BYTES) -#define BUF_PAGE_IN_MEM(_p) ((_p)->pData != NULL) +#define GET_PAYLOAD_DATA(_p) ((char*)(_p)->pData + POINTER_BYTES) +#define BUF_PAGE_IN_MEM(_p) ((_p)->pData != NULL) #define CLEAR_BUF_PAGE_IN_MEM_FLAG(_p) ((_p)->pData = NULL) -#define HAS_DATA_IN_DISK(_p) ((_p)->offset >= 0) -#define NO_IN_MEM_AVAILABLE_PAGES(_b) (listNEles((_b)->lruList) >= (_b)->inMemPages) +#define HAS_DATA_IN_DISK(_p) ((_p)->offset >= 0) +#define NO_IN_MEM_AVAILABLE_PAGES(_b) (listNEles((_b)->lruList) >= (_b)->inMemPages) typedef struct SPageDiskInfo { int64_t offset; @@ -17,7 +17,7 @@ typedef struct SPageDiskInfo { } SPageDiskInfo, SFreeListItem; struct SPageInfo { - SListNode* pn; // point to list node struct. it is NULL when the page is evicted from the in-memory buffer + SListNode* pn; // point to list node struct. it is NULL when the page is evicted from the in-memory buffer void* pData; int64_t offset; int32_t pageId; @@ -52,10 +52,13 @@ struct SDiskbasedBuf { }; static int32_t createDiskFile(SDiskbasedBuf* pBuf) { - if (pBuf->path == NULL) { // prepare the file name when needed it + if (pBuf->path == NULL) { // prepare the file name when needed it char path[PATH_MAX] = {0}; taosGetTmpfilePath(pBuf->prefix, "paged-buf", path); pBuf->path = taosMemoryStrDup(path); + if (pBuf->path == NULL) { + return TSDB_CODE_OUT_OF_MEMORY; + } } pBuf->pFile = @@ -126,6 +129,30 @@ static uint64_t allocateNewPositionInFile(SDiskbasedBuf* pBuf, size_t size) { static FORCE_INLINE size_t getAllocPageSize(int32_t pageSize) { return pageSize + POINTER_BYTES + sizeof(SFilePage); } +static int32_t doFlushBufPageImpl(SDiskbasedBuf* pBuf, int64_t offset, const char* pData, int32_t size) { + int32_t ret = taosLSeekFile(pBuf->pFile, offset, SEEK_SET); + if (ret == -1) { + terrno = TAOS_SYSTEM_ERROR(errno); + return terrno; + } + + ret = (int32_t)taosWriteFile(pBuf->pFile, pData, size); + if (ret != size) { + terrno = TAOS_SYSTEM_ERROR(errno); + return terrno; + } + + // extend the file + if (pBuf->fileSize < offset + size) { + pBuf->fileSize = offset + size; + } + + pBuf->statis.flushBytes += size; + pBuf->statis.flushPages += 1; + + return TSDB_CODE_SUCCESS; +} + static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { if (pg->pData == NULL || pg->used) { uError("invalid params in paged buffer process when flushing buf to disk, %s", pBuf->id); @@ -134,12 +161,15 @@ static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { } int32_t size = pBuf->pageSize; - char* t = NULL; + int64_t offset = pg->offset; + + char* t = NULL; if ((!HAS_DATA_IN_DISK(pg)) || pg->dirty) { void* payload = GET_PAYLOAD_DATA(pg); t = doCompressData(payload, pBuf->pageSize, &size, pBuf); if (size < 0) { uError("failed to compress data when flushing data to disk, %s", pBuf->id); + terrno = TSDB_CODE_INVALID_PARA; return NULL; } } @@ -147,59 +177,29 @@ static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { // this page is flushed to disk for the first time if (pg->dirty) { if (!HAS_DATA_IN_DISK(pg)) { - pg->offset = allocateNewPositionInFile(pBuf, size); + offset = allocateNewPositionInFile(pBuf, size); pBuf->nextPos += size; - int32_t ret = taosLSeekFile(pBuf->pFile, pg->offset, SEEK_SET); - if (ret == -1) { - terrno = TAOS_SYSTEM_ERROR(errno); + int32_t code = doFlushBufPageImpl(pBuf, offset, t, size); + if (code != TSDB_CODE_SUCCESS) { return NULL; } - - ret = (int32_t)taosWriteFile(pBuf->pFile, t, size); - if (ret != size) { - terrno = TAOS_SYSTEM_ERROR(errno); - return NULL; - } - - // extend the file size - if (pBuf->fileSize < pg->offset + size) { - pBuf->fileSize = pg->offset + size; - } - - pBuf->statis.flushBytes += size; - pBuf->statis.flushPages += 1; } else { // length becomes greater, current space is not enough, allocate new place, otherwise, do nothing if (pg->length < size) { // 1. add current space to free list - SPageDiskInfo dinfo = {.length = pg->length, .offset = pg->offset}; + SPageDiskInfo dinfo = {.length = pg->length, .offset = offset}; taosArrayPush(pBuf->pFree, &dinfo); // 2. allocate new position, and update the info - pg->offset = allocateNewPositionInFile(pBuf, size); + offset = allocateNewPositionInFile(pBuf, size); pBuf->nextPos += size; } - // 3. write to disk. - int32_t ret = taosLSeekFile(pBuf->pFile, pg->offset, SEEK_SET); - if (ret == -1) { - terrno = TAOS_SYSTEM_ERROR(errno); + int32_t code = doFlushBufPageImpl(pBuf, offset, t, size); + if (code != TSDB_CODE_SUCCESS) { return NULL; } - - ret = (int32_t)taosWriteFile(pBuf->pFile, t, size); - if (ret != size) { - terrno = TAOS_SYSTEM_ERROR(errno); - return NULL; - } - - if (pBuf->fileSize < pg->offset + size) { - pBuf->fileSize = pg->offset + size; - } - - pBuf->statis.flushBytes += size; - pBuf->statis.flushPages += 1; } } else { // NOTE: the size may be -1, the this recycle page has not been flushed to disk yet. size = pg->length; @@ -209,9 +209,10 @@ static char* doFlushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { memset(pDataBuf, 0, getAllocPageSize(pBuf->pageSize)); #ifdef BUF_PAGE_DEBUG - uDebug("page_flush %p, pageId:%d, offset:%d", pDataBuf, pg->pageId, pg->offset); + uDebug("page_flush %p, pageId:%d, offset:%d", pDataBuf, pg->pageId, offset); #endif + pg->offset = offset; pg->length = size; // on disk size return pDataBuf; } @@ -236,7 +237,7 @@ static char* flushBufPage(SDiskbasedBuf* pBuf, SPageInfo* pg) { // load file block data in disk static int32_t loadPageFromDisk(SDiskbasedBuf* pBuf, SPageInfo* pg) { if (pg->offset < 0 || pg->length <= 0) { - uError("failed to load buf page from disk, offset:%"PRId64", length:%d, %s", pg->offset, pg->length, pBuf->id); + uError("failed to load buf page from disk, offset:%" PRId64 ", length:%d, %s", pg->offset, pg->length, pBuf->id); return TSDB_CODE_INVALID_PARA; } @@ -303,6 +304,7 @@ static SListNode* getEldestUnrefedPage(SDiskbasedBuf* pBuf) { static char* evictBufPage(SDiskbasedBuf* pBuf) { SListNode* pn = getEldestUnrefedPage(pBuf); if (pn == NULL) { // no available buffer pages now, return. + terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } @@ -382,14 +384,14 @@ int32_t createDiskbasedBuf(SDiskbasedBuf** pBuf, int32_t pagesize, int32_t inMem goto _error; } - pPBuf->prefix = (char*) dir; + pPBuf->prefix = (char*)dir; pPBuf->emptyDummyIdList = taosArrayInit(1, sizeof(int32_t)); // qDebug("QInfo:0x%"PRIx64" create resBuf for output, page size:%d, inmem buf pages:%d, file:%s", qId, // pPBuf->pageSize, pPBuf->inMemPages, pPBuf->path); return TSDB_CODE_SUCCESS; - _error: +_error: destroyDiskbasedBuf(pPBuf); return TSDB_CODE_OUT_OF_MEMORY; } @@ -399,11 +401,12 @@ static char* doExtractPage(SDiskbasedBuf* pBuf) { if (NO_IN_MEM_AVAILABLE_PAGES(pBuf)) { availablePage = evictBufPage(pBuf); if (availablePage == NULL) { - terrno = TSDB_CODE_OUT_OF_MEMORY; - uWarn("no available buf pages, current:%d, max:%d", listNEles(pBuf->lruList), pBuf->inMemPages) + uWarn("no available buf pages, current:%d, max:%d, reason: %s, %s", listNEles(pBuf->lruList), pBuf->inMemPages, + terrstr(), pBuf->id) } } else { - availablePage = taosMemoryCalloc(1, getAllocPageSize(pBuf->pageSize)); // add extract bytes in case of zipped buffer increased. + availablePage = + taosMemoryCalloc(1, getAllocPageSize(pBuf->pageSize)); // add extract bytes in case of zipped buffer increased. if (availablePage == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; } @@ -551,9 +554,7 @@ void releaseBufPageInfo(SDiskbasedBuf* pBuf, SPageInfo* pi) { size_t getTotalBufSize(const SDiskbasedBuf* pBuf) { return (size_t)pBuf->totalBufSize; } -SArray* getDataBufPagesIdList(SDiskbasedBuf* pBuf) { - return pBuf->pIdList; -} +SArray* getDataBufPagesIdList(SDiskbasedBuf* pBuf) { return pBuf->pIdList; } void destroyDiskbasedBuf(SDiskbasedBuf* pBuf) { if (pBuf == NULL) { @@ -567,7 +568,7 @@ void destroyDiskbasedBuf(SDiskbasedBuf* pBuf) { needRemoveFile = true; uDebug( "Paged buffer closed, total:%.2f Kb (%d Pages), inmem size:%.2f Kb (%d Pages), file size:%.2f Kb, page " - "size:%.2f Kb, %s\n", + "size:%.2f Kb, %s", pBuf->totalBufSize / 1024.0, pBuf->numOfPages, listNEles(pBuf->lruList) * pBuf->pageSize / 1024.0, listNEles(pBuf->lruList), pBuf->fileSize / 1024.0, pBuf->pageSize / 1024.0f, pBuf->id); @@ -584,8 +585,7 @@ void destroyDiskbasedBuf(SDiskbasedBuf* pBuf) { ps->releasePages, ps->flushBytes / 1024.0f, ps->flushPages, ps->loadBytes / 1024.0f, ps->loadPages); } else { uDebug( - "Get/Release pages:%d/%d, flushToDisk:%.2f Kb (%d Pages), loadFromDisk:%.2f Kb (%d Pages), avgPageSize:%.2f " - "Kb", + "Get/Release pages:%d/%d, flushToDisk:%.2f Kb (%d Pages), loadFromDisk:%.2f Kb (%d Pages), avgPgSize:%.2f Kb", ps->getPages, ps->releasePages, ps->flushBytes / 1024.0f, ps->flushPages, ps->loadBytes / 1024.0f, ps->loadPages, ps->loadBytes / (1024.0 * ps->loadPages)); } @@ -628,9 +628,7 @@ SPageInfo* getLastPageInfo(SArray* pList) { return pPgInfo; } -int32_t getPageId(const SPageInfo* pPgInfo) { - return pPgInfo->pageId; -} +int32_t getPageId(const SPageInfo* pPgInfo) { return pPgInfo->pageId; } int32_t getBufPageSize(const SDiskbasedBuf* pBuf) { return pBuf->pageSize; } @@ -686,7 +684,7 @@ void dBufPrintStatis(const SDiskbasedBuf* pBuf) { ps->getPages, ps->releasePages, ps->flushBytes / 1024.0f, ps->flushPages, ps->loadBytes / 1024.0f, ps->loadPages, ps->loadBytes / (1024.0 * ps->loadPages)); } else { - //printf("no page loaded\n"); + // printf("no page loaded\n"); } } diff --git a/tests/docs-examples-test/python.sh b/tests/docs-examples-test/python.sh index ccb391b752..31342b33d7 100644 --- a/tests/docs-examples-test/python.sh +++ b/tests/docs-examples-test/python.sh @@ -83,4 +83,5 @@ python3 fast_write_example.py # 20 pip3 install kafka-python -python3 kafka_example.py +python3 kafka_example_consumer.py + diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 3b4f61daee..827ffe183c 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -180,6 +180,7 @@ ,,y,script,./test.sh -f tsim/query/sys_tbname.sim ,,y,script,./test.sh -f tsim/query/groupby.sim ,,y,script,./test.sh -f tsim/query/event.sim +,,y,script,./test.sh -f tsim/query/forceFill.sim ,,y,script,./test.sh -f tsim/qnode/basic1.sim ,,y,script,./test.sh -f tsim/snode/basic1.sim ,,y,script,./test.sh -f tsim/mnode/basic1.sim @@ -1054,6 +1055,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/out_of_order.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/max_min_data.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/blockSMA.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/odbc.py ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-21561.py -Q 4 diff --git a/tests/script/tsim/compute/block_dist.sim b/tests/script/tsim/compute/block_dist.sim index 2d0a4e8902..4fdcf63e34 100644 --- a/tests/script/tsim/compute/block_dist.sim +++ b/tests/script/tsim/compute/block_dist.sim @@ -91,6 +91,10 @@ print ============== TD-5998 sql_error select _block_dist() from (select * from $nt) sql_error select _block_dist() from (select * from $mt) +print ============== TD-22140 & TD-22165 +sql_error show table distributed information_schema.ins_databases +sql_error show table distributed performance_schema.perf_apps + print =============== clear sql drop database $db sql select * from information_schema.ins_databases diff --git a/tests/script/tsim/parser/regressiontest.sim b/tests/script/tsim/parser/regressiontest.sim index 3ce2b47b44..1d84ae88cb 100644 --- a/tests/script/tsim/parser/regressiontest.sim +++ b/tests/script/tsim/parser/regressiontest.sim @@ -31,13 +31,8 @@ sql insert into $tb values ( $ts , $x ) $x = $x + 1 endw -print ================== restart server to commit data into disk -system sh/exec.sh -n dnode1 -s stop -x SIGINT -system sh/exec.sh -n dnode1 -s start -print ================== server restart completed -sql connect +sql flush database $db -sql use $db sql delete from $tb where ts=1537146000000 sql delete from $tb where ts=1537146409500 @@ -63,7 +58,6 @@ if $rows != 8198 then return -1 endi -print ===========================> TD-22077 && TD-21877 sql drop database if exists $db -x step1 sql create database $db vgroups 1; @@ -88,6 +82,8 @@ endw sql flush database $db +print ===========================> TD-22077 && TD-21877 + sql insert into t1 values('2018-09-17 09:00:26', 26); sql insert into t2 values('2018-09-17 09:00:25', 25); @@ -97,4 +93,33 @@ sql flush database reg_db0; sql delete from st1 where ts<='2018-9-17 09:00:26'; sql select * from st1; +sql drop table t1 +sql drop table t2 + +print =========================================>TD-22196 +sql create table t1 using st1 tags(1); + +$i = 0 +$ts = 1674977959000 +$rowNum = 200 + +$x = 0 +while $x < $rowNum +$xs = $x * $delta +$ts = $ts0 + $xs +sql insert into t1 values ( $ts , $x ) +$x = $x + 1 +$ts = $ts + 1000 +endw + +sql flush database $db +sql select min(c),max(c) from t1 +if $data00 != 0 then + return -1 +endi + +if $data01 != 199 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/query/forceFill.sim b/tests/script/tsim/query/forceFill.sim new file mode 100644 index 0000000000..37eb85baaa --- /dev/null +++ b/tests/script/tsim/query/forceFill.sim @@ -0,0 +1,367 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sql connect + +sql drop database if exists db1; +sql create database db1 vgroups 10; +sql use db1; +sql create stable sta (ts timestamp, f1 double, f2 binary(200)) tags(t1 int); +sql create table tba1 using sta tags(1); +sql insert into tba1 values ('2022-04-26 15:15:01', 1.0, "a"); +sql insert into tba1 values ('2022-04-26 15:15:02', 2.0, "b"); +sql insert into tba1 values ('2022-04-26 15:15:04', 4.0, "b"); +sql insert into tba1 values ('2022-04-26 15:15:05', 5.0, "b"); + +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(value_f, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(value, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(null); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:00' and ts <= '2022-04-26 15:15:06' interval(1s) fill(null_f); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(value, 8.8); +if $rows != 0 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(value_f, 8.8); +if $rows != 5 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 8.800000000 then + return -1 +endi +if $data20 != 8.800000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(null); +if $rows != 0 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:15:06' and ts <= '2022-04-26 15:15:10' interval(1s) fill(null_f); +if $rows != 5 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != NULL then + return -1 +endi +if $data20 != NULL then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != NULL then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:16:00' and ts <= '2022-04-26 19:15:59' interval(1s) fill(value_f, 8.8); +if $rows != 14400 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +sql select avg(f1) from tba1 where ts >= '2022-04-26 15:16:00' and ts <= '2022-04-26 19:15:59' interval(1s) fill(null_f); +if $rows != 14400 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(value_f, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(value, 8.8); +if $rows != 7 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(null); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:00','2022-04-26 15:15:06') every(1s) fill(null_f); +if $rows != 7 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != 1.000000000 then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != 4.000000000 then + return -1 +endi +if $data50 != 5.000000000 then + return -1 +endi +if $data60 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(value, 8.8); +if $rows != 5 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 8.800000000 then + return -1 +endi +if $data20 != 8.800000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(value_f, 8.8); +if $rows != 5 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +if $data10 != 8.800000000 then + return -1 +endi +if $data20 != 8.800000000 then + return -1 +endi +if $data30 != 8.800000000 then + return -1 +endi +if $data40 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(null); +if $rows != 5 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != NULL then + return -1 +endi +if $data20 != NULL then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:15:06','2022-04-26 15:15:10') every(1s) fill(null_f); +if $rows != 5 then + return -1 +endi +if $data00 != NULL then + return -1 +endi +if $data10 != NULL then + return -1 +endi +if $data20 != NULL then + return -1 +endi +if $data30 != NULL then + return -1 +endi +if $data40 != NULL then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:16:00','2022-04-26 19:15:59') every(1s) fill(value_f, 8.8); +if $rows != 14400 then + return -1 +endi +if $data00 != 8.800000000 then + return -1 +endi +sql select interp(f1) from tba1 range('2022-04-26 15:16:00','2022-04-26 19:15:59') every(1s) fill(null_f); +if $rows != 14400 then + return -1 +endi +if $data00 != NULL then + return -1 +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/drop_stream.sim b/tests/script/tsim/stream/drop_stream.sim index 1a474bd9ae..7ff9632a3e 100644 --- a/tests/script/tsim/stream/drop_stream.sim +++ b/tests/script/tsim/stream/drop_stream.sim @@ -55,62 +55,62 @@ sql create stream stb_asin_stream trigger at_once into output_asin_stb as select sql create stream ctb_asin_stream trigger at_once into output_asin_ctb as select ts, asin(c1), asin(c2), c3 from scalar_ct1; sql create stream tb_asin_stream trigger at_once into output_asin_tb as select ts, asin(c1), asin(c2), c3 from scalar_tb; sql create stream stb_atan_stream trigger at_once into output_atan_stb as select ts, atan(c1), atan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; -sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; -sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; -sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; -sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; -sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; -sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; -sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; -sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; -sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; -sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; -sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; -sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; -sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; -sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; -sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; -sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; -sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; -sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; -sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; -sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; -sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; -sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; -sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; -sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; -sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; -sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; -sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; -sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; -sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; -sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; -sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; -sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; -sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; -sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; -sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; -sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; -sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; -sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; -sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; -sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; +# sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; +# sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; +# sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; +# sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; +# sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; +# sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; +# sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; +# sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; +# sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; +# sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; +# sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; +# sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; +# sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; +# sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; +# sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; +# sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; +# sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; +# sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; +# sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; +# sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; +# sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; +# sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; +# sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; +# sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; +# sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; +# sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; +# sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; +# sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; +# sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; +# sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; +# sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; +# sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; +# sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; +# sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; +# sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; +# sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; +# sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; +# sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; +# sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; sql insert into scalar_ct1 values (1656668180503, 100, 100.1, "beijing", "taos", "Taos"); sql insert into scalar_ct1 values (1656668180503+1s, -50, -50.1, "tianjin", "taosdata", "Taosdata"); sql insert into scalar_ct1 values (1656668180503+2s, 0, Null, "hebei", "TDengine", Null); @@ -146,62 +146,62 @@ sql create stream stb_asin_stream trigger at_once into output_asin_stb as select sql create stream ctb_asin_stream trigger at_once into output_asin_ctb as select ts, asin(c1), asin(c2), c3 from scalar_ct1; sql create stream tb_asin_stream trigger at_once into output_asin_tb as select ts, asin(c1), asin(c2), c3 from scalar_tb; sql create stream stb_atan_stream trigger at_once into output_atan_stb as select ts, atan(c1), atan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; -sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; -sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; -sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; -sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; -sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; -sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; -sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; -sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; -sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; -sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; -sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; -sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; -sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; -sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; -sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; -sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; -sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; -sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; -sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; -sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; -sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; -sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; -sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; -sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; -sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; -sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; -sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; -sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; -sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; -sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; -sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; -sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; -sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; -sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; -sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; -sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; -sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; -sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; -sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; -sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; -sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; -sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; -sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; -sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; -sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; +# sql create stream ctb_atan_stream trigger at_once into output_atan_ctb as select ts, atan(c1), atan(c2), c3 from scalar_ct1; +# sql create stream tb_atan_stream trigger at_once into output_atan_tb as select ts, atan(c1), atan(c2), c3 from scalar_tb; +# sql create stream stb_ceil_stream trigger at_once into output_ceil_stb as select ts, ceil(c1), ceil(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_ceil_stream trigger at_once into output_ceil_ctb as select ts, ceil(c1), ceil(c2), c3 from scalar_ct1; +# sql create stream tb_ceil_stream trigger at_once into output_ceil_tb as select ts, ceil(c1), ceil(c2), c3 from scalar_tb; +# sql create stream stb_cos_stream trigger at_once into output_cos_stb as select ts, cos(c1), cos(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_cos_stream trigger at_once into output_cos_ctb as select ts, cos(c1), cos(c2), c3 from scalar_ct1; +# sql create stream tb_cos_stream trigger at_once into output_cos_tb as select ts, cos(c1), cos(c2), c3 from scalar_tb; +# sql create stream stb_floor_stream trigger at_once into output_floor_stb as select ts, floor(c1), floor(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_floor_stream trigger at_once into output_floor_ctb as select ts, floor(c1), floor(c2), c3 from scalar_ct1; +# sql create stream tb_floor_stream trigger at_once into output_floor_tb as select ts, floor(c1), floor(c2), c3 from scalar_tb; +# sql create stream stb_log_stream trigger at_once into output_log_stb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_log_stream trigger at_once into output_log_ctb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_ct1; +# sql create stream tb_log_stream trigger at_once into output_log_tb as select ts, log(c1, 2), log(c2, 2), c3 from scalar_tb; +# sql create stream stb_pow_stream trigger at_once into output_pow_stb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_pow_stream trigger at_once into output_pow_ctb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_ct1; +# sql create stream tb_pow_stream trigger at_once into output_pow_tb as select ts, pow(c1, 2), pow(c2, 2), c3 from scalar_tb; +# sql create stream stb_round_stream trigger at_once into output_round_stb as select ts, round(c1), round(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_round_stream trigger at_once into output_round_ctb as select ts, round(c1), round(c2), c3 from scalar_ct1; +# sql create stream tb_round_stream trigger at_once into output_round_tb as select ts, round(c1), round(c2), c3 from scalar_tb; +# sql create stream stb_sin_stream trigger at_once into output_sin_stb as select ts, sin(c1), sin(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sin_stream trigger at_once into output_sin_ctb as select ts, sin(c1), sin(c2), c3 from scalar_ct1; +# sql create stream tb_sin_stream trigger at_once into output_sin_tb as select ts, sin(c1), sin(c2), c3 from scalar_tb; +# sql create stream stb_sqrt_stream trigger at_once into output_sqrt_stb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_sqrt_stream trigger at_once into output_sqrt_ctb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_ct1; +# sql create stream tb_sqrt_stream trigger at_once into output_sqrt_tb as select ts, sqrt(c1), sqrt(c2), c3 from scalar_tb; +# sql create stream stb_tan_stream trigger at_once into output_tan_stb as select ts, tan(c1), tan(c2), c3 from scalar_stb partition by tbname; +# sql create stream ctb_tan_stream trigger at_once into output_tan_ctb as select ts, tan(c1), tan(c2), c3 from scalar_ct1; +# sql create stream tb_tan_stream trigger at_once into output_tan_tb as select ts, tan(c1), tan(c2), c3 from scalar_tb; +# sql create stream stb_char_length_stream into output_char_length_stb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_char_length_stream into output_char_length_ctb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_ct1; +# sql create stream tb_char_length_stream into output_char_length_tb as select ts, char_length(c3), char_length(c4), char_length(c5) from scalar_tb; +# sql create stream stb_concat_stream into output_concat_stb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_stream into output_concat_ctb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_stream into output_concat_tb as select ts, concat(c3, c4), concat(c3, c5), concat(c4, c5), concat(c3, c4, c5) from scalar_tb; +# sql create stream stb_concat_ws_stream into output_concat_ws_stb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_stb partition by tbname; +# sql create stream ctb_concat_ws_stream into output_concat_ws_ctb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_ct1; +# sql create stream tb_concat_ws_stream into output_concat_ws_tb as select ts, concat_ws("aND", c3, c4), concat_ws("and", c3, c5), concat_ws("And", c4, c5), concat_ws("AND", c3, c4, c5) from scalar_tb; +# sql create stream stb_length_stream into output_length_stb as select ts, length(c3), length(c4), length(c5) from scalar_stb partition by tbname; +# sql create stream ctb_length_stream into output_length_ctb as select ts, length(c3), length(c4), length(c5) from scalar_ct1; +# sql create stream tb_length_stream into output_length_tb as select ts, length(c3), length(c4), length(c5) from scalar_tb; +# sql create stream stb_lower_stream into output_lower_stb as select ts, lower(c3), lower(c4), lower(c5) from scalar_stb partition by tbname; +# sql create stream ctb_lower_stream into output_lower_ctb as select ts, lower(c3), lower(c4), lower(c5) from scalar_ct1; +# sql create stream tb_lower_stream into output_lower_tb as select ts, lower(c3), lower(c4), lower(c5) from scalar_tb; +# sql create stream stb_ltrim_stream into output_ltrim_stb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_ltrim_stream into output_ltrim_ctb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_ct1; +# sql create stream tb_ltrim_stream into output_ltrim_tb as select ts, ltrim(c3), ltrim(c4), ltrim(c5) from scalar_tb; +# sql create stream stb_rtrim_stream into output_rtrim_stb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_stb partition by tbname; +# sql create stream ctb_rtrim_stream into output_rtrim_ctb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_ct1; +# sql create stream tb_rtrim_stream into output_rtrim_tb as select ts, rtrim(c3), rtrim(c4), rtrim(c5) from scalar_tb; +# sql create stream stb_substr_stream into output_substr_stb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_stb partition by tbname; +# sql create stream ctb_substr_stream into output_substr_ctb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_ct1; +# sql create stream tb_substr_stream into output_substr_tb as select ts, substr(c3, 2), substr(c3, 2, 2), substr(c4, 5, 1), substr(c5, 3, 4) from scalar_tb; +# sql create stream stb_upper_stream into output_upper_stb as select ts, upper(c3), upper(c4), upper(c5) from scalar_stb partition by tbname; +# sql create stream ctb_upper_stream into output_upper_ctb as select ts, upper(c3), upper(c4), upper(c5) from scalar_ct1; +# sql create stream tb_upper_stream into output_upper_tb as select ts, upper(c3), upper(c4), upper(c5) from scalar_tb; sql insert into scalar_ct1 values (1656668180503, 100, 100.1, "beijing", "taos", "Taos"); sql insert into scalar_ct1 values (1656668180503+1s, -50, -50.1, "tianjin", "taosdata", "Taosdata"); sql insert into scalar_ct1 values (1656668180503+2s, 0, Null, "hebei", "TDengine", Null); @@ -273,4 +273,4 @@ print ========== step7 system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT -system sh/exec.sh -n dnode4 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode4 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/fillIntervalValue.sim b/tests/script/tsim/stream/fillIntervalValue.sim index fe4ec759eb..2cd419397f 100644 --- a/tests/script/tsim/stream/fillIntervalValue.sim +++ b/tests/script/tsim/stream/fillIntervalValue.sim @@ -14,6 +14,7 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));; sql create stream streams1 trigger at_once into streamt as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(value, 100); +sql create stream streams1a trigger at_once into streamta as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(value_f, 100); sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa'); sleep 100 sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa'); @@ -77,6 +78,69 @@ if $data71 != 1 then goto loop0 endi + +print "force fill vaule" + +$loop_count = 0 + +loop0a: +sleep 200 +sql select * from streamta order by ts; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $rows != 8 then + print =====rows=$rows + goto loop0a +endi + +if $data01 != 1 then + print =====data01=$data01 + goto loop0a +endi + +if $data11 != 1 then + print =====data11=$data11 + goto loop0a +endi + +if $data21 != 1 then + print =====data21=$data21 + goto loop0a +endi + +if $data31 != 100 then + print =====data31=$data31 + goto loop0a +endi + +if $data41 != 1 then + print =====data41=$data41 + goto loop0a +endi + +if $data51 != 100 then + print =====data01=$data01 + goto loop0a +endi + +if $data61 != 100 then + print =====data61=$data61 + goto loop0a +endi + +if $data71 != 1 then + print =====data71=$data71 + goto loop0a +endi + + + + + sql drop stream if exists streams2; sql drop database if exists test2; sql create database test2 vgroups 1; @@ -408,6 +472,7 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams4 trigger at_once into streamt4 as select _wstart ts, count(*) c1, concat(tbname, 'aaa') as pname, timezone() from st where ts > 1648791000000 and ts < 1648793000000 partition by tbname interval(10s) fill(NULL); +sql create stream streams4a trigger at_once into streamt4a as select _wstart ts, count(*) c1, concat(tbname, 'aaa') as pname, timezone() from st where ts > 1648791000000 and ts < 1648793000000 partition by tbname interval(10s) fill(NULL_F); sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa'); sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa'); sql insert into t1 values(1648791273000,1,2,3,1.0,'aaa'); @@ -512,32 +577,104 @@ if $data[12][3] == NULL then goto loop4 endi +print "force fill null" +$loop_count = 0 +loop4a: +sleep 200 +sql select * from streamt4a order by pname, ts; +print ===> $data[0][0] , $data[0][1] , $data[0][2] , $data[0][3] +print ===> $data[1][0] , $data[1][1] , $data[1][2] , $data[1][3] +print ===> $data[2][0] , $data[2][1] , $data[2][2] , $data[2][3] +print ===> $data[3][0] , $data[3][1] , $data[3][2] , $data[3][3] +print ===> $data[4][0] , $data[4][1] , $data[4][2] , $data[4][3] +print ===> $data[5][0] , $data[5][1] , $data[5][2] , $data[5][3] +print ===> $data[6][0] , $data[6][1] , $data[6][2] , $data[6][3] +print ===> $data[7][0] , $data[7][1] , $data[7][2] , $data[7][3] +print ===> $data[8][0] , $data[8][1] , $data[8][2] , $data[8][3] +print ===> $data[9][0] , $data[9][1] , $data[9][2] , $data[9][3] +print ===> $data[10][0] , $data[10][1] , $data[10][2] , $data[10][3] +print ===> $data[11][0] , $data[11][1] , $data[11][2] , $data[11][3] +print ===> $data[12][0] , $data[12][1] , $data[12][2] , $data[12][3] +print ===> $data[13][0] , $data[13][1] , $data[13][2] , $data[13][3] +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi +if $rows != 14 then + print =====rows=$rows + goto loop4a +endi +if $data11 != NULL then + print =====data11=$data11 + goto loop4a +endi +if $data12 != t1aaa then + print =====data12=$data12 + goto loop4a +endi +if $data13 == NULL then + print =====data13=$data13 + goto loop4a +endi +if $data32 != t1aaa then + print =====data32=$data32 + goto loop4a +endi +if $data42 != t1aaa then + print =====data42=$data42 + goto loop4a +endi +if $data52 != t1aaa then + print =====data52=$data52 + goto loop4a +endi +if $data81 != NULL then + print =====data81=$data81 + goto loop4a +endi +if $data82 != t2aaa then + print =====data82=$data82 + goto loop4a +endi +if $data83 == NULL then + print =====data83=$data83 + goto loop4a +endi +if $data[10][2] != t2aaa then + print =====data[10][2]=$data[10][2] + goto loop4a +endi +if $data[11][2] != t2aaa then + print =====data[11][2]=$data[11][2] + goto loop4a +endi +if $data[12][2] != t2aaa then + print =====data[12][2]=$data[12][2] + goto loop4a +endi - - - - - - - +if $data[12][3] == NULL then + print =====data[12][3]=$data[12][3] + goto loop4a +endi @@ -584,4 +721,4 @@ print ============loop_all=$loop_all system sh/stop_dnodes.sh -#goto looptest \ No newline at end of file +#goto looptest diff --git a/tests/system-test/2-query/case_when.py b/tests/system-test/2-query/case_when.py index cfe0399553..eebbcc3fa3 100755 --- a/tests/system-test/2-query/case_when.py +++ b/tests/system-test/2-query/case_when.py @@ -111,6 +111,17 @@ class TDTestCase: sql2 = "select (case when sum(q_smallint)=0 then null else sum(q_smallint) end) from %s.stable_1_1 limit 100;" %database self.constant_check(database,sql1,sql2,0) + #TD-20257 + sql1 = "select tbname,first(ts),q_int,q_smallint,q_bigint,case when q_int <0 then 1 else 0 end from %s.stable_1 where tbname = 'stable_1_1' and ts < now partition by tbname state_window(case when q_int <0 then 1 else 0 end);" %database + sql2 = "select tbname,first(ts),q_int,q_smallint,q_bigint,case when q_int <0 then 1 else 0 end from %s.stable_1_1 where ts < now partition by tbname state_window(case when q_int <0 then 1 else 0 end);" %database + self.constant_check(database,sql1,sql2,0) + self.constant_check(database,sql1,sql2,1) + self.constant_check(database,sql1,sql2,2) + self.constant_check(database,sql1,sql2,3) + self.constant_check(database,sql1,sql2,4) + self.constant_check(database,sql1,sql2,5) + + #TD-20260 sql1 = "select _wstart,avg(q_int),min(q_smallint) from %s.stable_1 where tbname = 'stable_1_1' and ts < now state_window(case when q_smallint <0 then 1 else 0 end);" %database sql2 = "select _wstart,avg(q_int),min(q_smallint) from %s.stable_1_1 where ts < now state_window(case when q_smallint <0 then 1 else 0 end);" %database self.constant_check(database,sql1,sql2,0) diff --git a/tests/system-test/2-query/max_min_data.py b/tests/system-test/2-query/max_min_data.py new file mode 100755 index 0000000000..e3dff5da78 --- /dev/null +++ b/tests/system-test/2-query/max_min_data.py @@ -0,0 +1,159 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import random +import os +import time +import taos +import subprocess +from faker import Faker +from util.log import tdLog +from util.cases import tdCases +from util.sql import tdSql +from util.dnodes import tdDnodes +from util.dnodes import * + +class TDTestCase: + updatecfgDict = {'maxSQLLength':1048576,'debugFlag': 131 ,"querySmaOptimize":1} + + def init(self, conn, logSql, replicaVar): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + self.testcasePath = os.path.split(__file__)[0] + self.testcaseFilename = os.path.split(__file__)[-1] + os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) + + self.db = "max_min" + + def dropandcreateDB_random(self,database,n): + ts = 1630000000000 + num_random = 5 + fake = Faker('zh_CN') + tdSql.execute('''drop database if exists %s ;''' %database) + tdSql.execute('''create database %s keep 36500 ;'''%(database)) + tdSql.execute('''use %s;'''%database) + + tdSql.execute('''create stable %s.stable_1 (ts timestamp , q_int int , q_bigint bigint , q_smallint smallint , q_tinyint tinyint , q_float float , q_double double , q_bool bool , q_binary binary(100) , q_nchar nchar(100) , q_ts timestamp , \ + q_int_null int , q_bigint_null bigint , q_smallint_null smallint , q_tinyint_null tinyint, q_float_null float , q_double_null double , q_bool_null bool , q_binary_null binary(20) , q_nchar_null nchar(20) , q_ts_null timestamp) \ + tags(loc nchar(100) , t_int int , t_bigint bigint , t_smallint smallint , t_tinyint tinyint, t_bool bool , t_binary binary(100) , t_nchar nchar(100) ,t_float float , t_double double , t_ts timestamp);'''%database) + + for i in range(num_random): + tdSql.execute('''create table %s.stable_1_%d using %s.stable_1 tags('stable_1_%d', '%d' , '%d', '%d' , '%d' , 1 , 'binary1.%s' , 'nchar1.%s' , '%f', '%f' ,'%d') ;''' + %(database,i,database,i,fake.random_int(min=-2147483647, max=2147483647, step=1), fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pystr() ,fake.pystr() ,fake.pyfloat(),fake.pyfloat(),fake.random_int(min=-2147483647, max=2147483647, step=1))) + + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.query("select count(*) from %s.stable_1;" %database) + tdSql.checkData(0,0,num_random*n) + tdSql.query("select count(*) from %s.stable_1_1;"%database) + tdSql.checkData(0,0,n) + + + def TD_22219_max(self,database): + + sql3 = "select count(*) from (select max(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + sql1 = "select max(q_int) from %s.stable_1_1 ;" %database + sql2 = "select max(q_int) from %s.stable_1 where tbname = 'stable_1_1' ;" %database + self.constant_check(database,sql1,sql2,0) + + sql3 = "select count(*) from (select max(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + def TD_22219_min(self,database): + + sql3 = "select count(*) from (select min(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + sql1 = "select min(q_int) from %s.stable_1_1 ;" %database + sql2 = "select min(q_int) from %s.stable_1 where tbname = 'stable_1_1' ;" %database + self.constant_check(database,sql1,sql2,0) + + sql3 = "select count(*) from (select min(q_int) from %s.stable_1 group by tbname); ;" %database + tdSql.query(sql3) + sql_value = tdSql.getData(0,0) + self.value_check(sql_value,5) + + def constant_check(self,database,sql1,sql2,column): + #column =0 代表0列, column = n代表n-1列 + tdLog.info("\n=============sql1:(%s)___sql2:(%s) ====================\n" %(sql1,sql2)) + + tdSql.query(sql1) + sql1_value = tdSql.getData(0,column) + tdSql.query(sql2) + sql2_value = tdSql.getData(0,column) + self.value_check(sql1_value,sql2_value) + + tdSql.execute(" flush database %s;" %database) + + time.sleep(3) + + tdSql.query(sql1) + sql1_flush_value = tdSql.getData(0,column) + tdSql.query(sql2) + sql2_flush_value = tdSql.getData(0,column) + self.value_check(sql1_flush_value,sql2_flush_value) + + self.value_check(sql1_value,sql1_flush_value) + self.value_check(sql2_value,sql2_flush_value) + + def value_check(self,base_value,check_value): + if base_value==check_value: + tdLog.info(f"checkEqual success, base_value={base_value},check_value={check_value}") + else : + tdLog.exit(f"checkEqual error, base_value=={base_value},check_value={check_value}") + + def run(self): + + startTime = time.time() + + os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) + + self.dropandcreateDB_random("%s" %self.db, 2000) + + self.TD_22219_max("%s" %self.db) + + self.dropandcreateDB_random("%s" %self.db, 2000) + + self.TD_22219_min("%s" %self.db) + + endTime = time.time() + print("total time %ds" % (endTime - startTime)) + + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase())