From cbaf3829b206a18173f9e4fec3c284887e92d650 Mon Sep 17 00:00:00 2001 From: jiacy-jcy <714897623@qq.com> Date: Thu, 2 Feb 2023 15:18:42 +0800 Subject: [PATCH 01/44] =?UTF-8?q?test=EF=BC=9Aadd=20test=20case=20into=20c?= =?UTF-8?q?i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/parallel_test/cases.task | 2 +- .../0-others/balance_vgroups_r1.py | 99 +++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 tests/system-test/0-others/balance_vgroups_r1.py diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index df4cc5f468..19024646b8 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -405,7 +405,7 @@ ,,y,script,./test.sh -f tmp/monitor.sim #system test - +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/balance_vgroups_r1.py -N 6 ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShell.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellError.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/taosShellNetChk.py diff --git a/tests/system-test/0-others/balance_vgroups_r1.py b/tests/system-test/0-others/balance_vgroups_r1.py new file mode 100644 index 0000000000..ae504cbab1 --- /dev/null +++ b/tests/system-test/0-others/balance_vgroups_r1.py @@ -0,0 +1,99 @@ +################################################################### +# 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 -*- + + +from util import constant +from util.log import * +from util.cases import * +from util.sql import * +from util.common import * +from util.sqlset import * +from util.cluster import * +class TDTestCase: + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor()) + self.dnode_num=len(cluster.dnodes) + self.dbname = 'db_test' + self.setsql = TDSetSql() + self.stbname = f'{self.dbname}.stb' + self.rowNum = 5 + self.tbnum = 10 + self.ts = 1537146000000 + self.binary_str = 'taosdata' + self.nchar_str = '涛思数据' + self.column_dict = { + 'ts' : 'timestamp', + 'col1': 'tinyint', + 'col2': 'smallint', + 'col3': 'int', + 'col4': 'bigint', + 'col5': 'tinyint unsigned', + 'col6': 'smallint unsigned', + 'col7': 'int unsigned', + 'col8': 'bigint unsigned', + 'col9': 'float', + 'col10': 'double', + 'col11': 'bool', + 'col12': 'binary(20)', + 'col13': 'nchar(20)' + } + self.replica = [1,3] + + def insert_data(self,column_dict,tbname,row_num): + insert_sql = self.setsql.set_insertsql(column_dict,tbname,self.binary_str,self.nchar_str) + for i in range(row_num): + insert_list = [] + self.setsql.insert_values(column_dict,i,insert_sql,insert_list,self.ts) + def prepare_data(self,dbname,stbname,column_dict,tbnum,rowNum,replica): + tag_dict = { + 't0':'int' + } + tag_values = [ + f'1' + ] + tdSql.execute(f"create database if not exists {dbname} vgroups 1 replica {replica} ") + tdSql.execute(f'use {dbname}') + tdSql.execute(self.setsql.set_create_stable_sql(stbname,column_dict,tag_dict)) + for i in range(tbnum): + tdSql.execute(f"create table {stbname}_{i} using {stbname} tags({tag_values[0]})") + self.insert_data(self.column_dict,f'{stbname}_{i}',rowNum) + def redistribute_vgroups(self,replica,stbname,tbnum,rownum): + tdSql.query('show vgroups') + vnode_id = tdSql.queryResult[0][0] + if replica == 1: + for dnode_id in range(1,self.dnode_num+1) : + tdSql.execute(f'redistribute vgroup {vnode_id} dnode {dnode_id}') + tdSql.query(f'select count(*) from {stbname}') + tdSql.checkEqual(tdSql.queryResult[0][0],tbnum*rownum) + elif replica == 3: + for dnode_id in range(1,self.dnode_num-1): + tdSql.execute(f'redistribute vgroup {vnode_id} dnode {dnode_id} dnode {dnode_id+1} dnode {dnode_id+2}') + tdSql.query(f'select count(*) from {stbname}') + tdSql.checkEqual(tdSql.queryResult[0][0],tbnum*rownum) + + def run(self): + for replica in self.replica: + self.prepare_data(self.dbname,self.stbname,self.column_dict,self.tbnum,self.rowNum,replica) + self.redistribute_vgroups(replica,self.stbname,self.tbnum,self.rowNum) + tdSql.execute(f'drop database {self.dbname}') + + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file From d750bd6e93957ffe9899e3047d4910d0f16afca2 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Tue, 7 Feb 2023 09:37:14 +0800 Subject: [PATCH 02/44] ci:modify stream state window test --- tests/script/tsim/stream/state0.sim | 146 +++++++++++++++------------- 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/tests/script/tsim/stream/state0.sim b/tests/script/tsim/stream/state0.sim index 7c922658c9..07abdc0040 100644 --- a/tests/script/tsim/stream/state0.sim +++ b/tests/script/tsim/stream/state0.sim @@ -16,6 +16,9 @@ print $data00 $data01 $data02 sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double, id int); + +print create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); + sql create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); sql insert into t1 values(1648791213000,1,2,3,1.0,1); @@ -79,86 +82,88 @@ endi if $data03 != 1 then print ======$data03 - return -1 + goto loop1 endi if $data04 != 1 then print ======$data04 - return -1 + goto loop1 endi if $data05 != 3 then print ======$data05 - return -1 + goto loop1 endi if $data06 != 5 then print ======$data06 - return -1 + goto loop1 endi # row 1 if $data11 != 1 then print ======$data11 - return -1 + goto loop1 endi if $data12 != 1 then print ======$data12 - return -1 + goto loop1 endi if $data13 != 2 then print ======$data13 - return -1 + goto loop1 endi if $data14 != 2 then print ======$data14 - return -1 + goto loop1 endi if $data15 != 3 then print ======$data15 - return -1 + goto loop1 endi if $data16 != 4 then print ======$data16 - return -1 + goto loop1 endi # row 2 if $data21 != 1 then print ======$data21 - return -1 + goto loop1 endi if $data22 != 1 then print ======$data22 - return -1 + goto loop1 endi if $data23 != 1 then print ======$data23 - return -1 + goto loop1 endi if $data24 != 1 then print ======$data24 - return -1 + goto loop1 endi if $data25 != 3 then print ======$data25 - return -1 + goto loop1 endi if $data26 != 6 then print ======$data26 - return -1 + goto loop1 endi +print loop1 end + sql insert into t1 values(1648791213011,1,2,3,1.0,7); $loop_count = 0 @@ -174,33 +179,31 @@ endi if $data21 != 2 then print =====data21=$data21 goto loop2 - return -1 endi if $data22 != 2 then print =====data22=$data22 goto loop2 - return -1 endi if $data23 != 2 then print ======$data23 - return -1 + goto loop2 endi if $data24 != 1 then print ======$data24 - return -1 + goto loop2 endi if $data25 != 3 then print ======$data25 - return -1 + goto loop2 endi if $data26 != 7 then print ======$data26 - return -1 + goto loop2 endi sql insert into t1 values(1648791213011,1,2,3,1.0,8); @@ -238,99 +241,93 @@ endi if $data21 != 1 then print =====data21=$data21 goto loop3 - return -1 endi if $data22 != 1 then print =====data22=$data22 goto loop3 - return -1 endi if $data23 != 10 then print ======$data23 - return -1 + goto loop3 endi if $data24 != 10 then print ======$data24 - return -1 + goto loop3 endi if $data25 != 10 then print ======$data25 - return -1 + goto loop3 endi if $data26 != 12 then print ======$data26 - return -1 + goto loop3 endi # row 3 if $data31 != 1 then print =====data31=$data31 goto loop3 - return -1 endi if $data32 != 1 then print =====data32=$data32 goto loop3 - return -1 endi if $data33 != 3 then print ======$data33 - return -1 + goto loop3 endi if $data34 != 3 then print ======$data34 - return -1 + goto loop3 endi if $data35 != 3 then print ======$data35 - return -1 + goto loop3 endi if $data36 != 10 then print ======$data36 - return -1 + goto loop3 endi # row 4 if $data41 != 1 then print =====data41=$data41 goto loop3 - return -1 endi if $data42 != 1 then print =====data42=$data42 goto loop3 - return -1 endi if $data43 != 1 then print ======$data43 - return -1 + goto loop3 endi if $data44 != 1 then print ======$data44 - return -1 + goto loop3 endi if $data45 != 3 then print ======$data45 - return -1 + goto loop3 endi if $data46 != 11 then print ======$data46 - return -1 + goto loop3 endi sql insert into t1 values(1648791213030,3,12,12,12.0,13); @@ -360,95 +357,93 @@ endi if $data02 != 2 then print ======$data02 - return -1 + goto loop4 endi if $data03 != 6 then print ======$data03 - return -1 + goto loop4 endi if $data04 != 3 then print ======$data04 - return -1 + goto loop4 endi if $data05 != 3 then print ======$data05 - return -1 + goto loop4 endi if $data06 != 15 then print ======$data06 - return -1 + goto loop4 endi # row 1 if $data11 != 1 then print =====data11=$data11 goto loop4 - return -1 endi if $data12 != 1 then print =====data12=$data12 goto loop4 - return -1 endi if $data13 != 15 then print ======$data13 - return -1 + goto loop4 endi if $data14 != 15 then print ======$data14 - return -1 + goto loop4 endi if $data15 != 15 then print ======$data15 - return -1 + goto loop4 endi if $data16 != 16 then print ======$data16 - return -1 + goto loop4 endi # row 2 if $data21 != 1 then print =====data21=$data21 goto loop4 - return -1 endi if $data22 != 1 then print =====data22=$data22 goto loop4 - return -1 endi if $data23 != 1 then print ======$data23 - return -1 + goto loop4 endi if $data24 != 1 then print ======$data24 - return -1 + goto loop4 endi if $data25 != 13 then print ======$data25 - return -1 + goto loop4 endi if $data26 != 14 then print ======$data26 - return -1 + goto loop4 endi +print loop4 end + sql create database test1 vgroups 1; sql select * from information_schema.ins_databases; @@ -457,6 +452,9 @@ print $data00 $data01 $data02 sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double, id int); + +print create stream streams2 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); + sql create stream streams2 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); sql insert into t1 values(1648791212000,2,2,3,1.0,1); @@ -502,6 +500,9 @@ sql create database test3 vgroups 1; sql use test3; sql create table t1(ts timestamp, a int, b int , c int, d double, id int); + +print create stream streams3 trigger at_once into streamt3 as select _wstart, count(*) c1, sum(b) c3 from t1 state_window(a); + sql create stream streams3 trigger at_once into streamt3 as select _wstart, count(*) c1, sum(b) c3 from t1 state_window(a); sql insert into t1 values(1648791212000,1,2,3,1.0,1); sql insert into t1 values(1648791213000,2,2,3,1.0,1); @@ -543,7 +544,6 @@ if $rows != 10 then goto loop6 endi - sql drop stream if exists streams4; sql drop database if exists test4; sql drop stable if exists streamt4; @@ -552,7 +552,10 @@ sql use test4; sql create table st (ts timestamp, c1 tinyint, c2 smallint) tags (t1 tinyint) ; sql create table t1 using st tags (-81) ; sql create table t2 using st tags (-81) ; -sql create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS start, min(c1),count(c1) from t1 state_window(c1); + +print create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS startts, min(c1),count(c1) from t1 state_window(c1); + +sql create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS startts, min(c1),count(c1) from t1 state_window(c1); sql insert into t1 (ts, c1) values (1668073288209, 11); sql insert into t1 (ts, c1) values (1668073288210, 11); @@ -567,7 +570,7 @@ loop7: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -606,7 +609,7 @@ loop8: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -636,11 +639,11 @@ sql insert into t1 (ts, c1) values (1668073288225, 65); sql insert into t1 (ts, c1) values (1668073288226, 65); $loop_count = 0 -loop8: +loop81: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -649,27 +652,27 @@ endi if $rows != 2 then print =====rows=$rows - goto loop8 + goto loop81 endi if $data01 != 11 then print =====data01=$data01 - goto loop8 + goto loop81 endi if $data02 != 5 then print =====data02=$data02 - goto loop8 + goto loop81 endi if $data11 != 29 then print =====data11=$data11 - goto loop8 + goto loop81 endi if $data12 != 1 then print =====data12=$data12 - goto loop8 + goto loop81 endi sql insert into t1 (ts, c1) values (1668073288224, 64); @@ -679,7 +682,7 @@ loop9: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -738,6 +741,9 @@ sql use test5; sql create table tb (ts timestamp, a int); sql insert into tb values (now + 1m , 1 ); sql create table b (c timestamp, d int, e int , f int, g double); + +print create stream streams0 trigger at_once into streamt as select _wstart c1, count(*) c2, max(a) c3 from tb state_window(a); + sql create stream streams0 trigger at_once into streamt as select _wstart c1, count(*) c2, max(a) c3 from tb state_window(a); sql insert into b values(1648791213000,NULL,NULL,NULL,NULL); sql select * from streamt order by c1, c2, c3; @@ -792,4 +798,6 @@ if $data00 != 2 then goto loop10 endi +print state0 end + system sh/exec.sh -n dnode1 -s stop -x SIGINT From 1e0e4172755088d5042a001883888f55cb5ce4ee Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Tue, 7 Feb 2023 09:37:14 +0800 Subject: [PATCH 03/44] ci:modify stream state window test --- tests/script/tsim/stream/state0.sim | 146 +++++++++++++++------------- 1 file changed, 77 insertions(+), 69 deletions(-) diff --git a/tests/script/tsim/stream/state0.sim b/tests/script/tsim/stream/state0.sim index 7c922658c9..07abdc0040 100644 --- a/tests/script/tsim/stream/state0.sim +++ b/tests/script/tsim/stream/state0.sim @@ -16,6 +16,9 @@ print $data00 $data01 $data02 sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double, id int); + +print create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); + sql create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); sql insert into t1 values(1648791213000,1,2,3,1.0,1); @@ -79,86 +82,88 @@ endi if $data03 != 1 then print ======$data03 - return -1 + goto loop1 endi if $data04 != 1 then print ======$data04 - return -1 + goto loop1 endi if $data05 != 3 then print ======$data05 - return -1 + goto loop1 endi if $data06 != 5 then print ======$data06 - return -1 + goto loop1 endi # row 1 if $data11 != 1 then print ======$data11 - return -1 + goto loop1 endi if $data12 != 1 then print ======$data12 - return -1 + goto loop1 endi if $data13 != 2 then print ======$data13 - return -1 + goto loop1 endi if $data14 != 2 then print ======$data14 - return -1 + goto loop1 endi if $data15 != 3 then print ======$data15 - return -1 + goto loop1 endi if $data16 != 4 then print ======$data16 - return -1 + goto loop1 endi # row 2 if $data21 != 1 then print ======$data21 - return -1 + goto loop1 endi if $data22 != 1 then print ======$data22 - return -1 + goto loop1 endi if $data23 != 1 then print ======$data23 - return -1 + goto loop1 endi if $data24 != 1 then print ======$data24 - return -1 + goto loop1 endi if $data25 != 3 then print ======$data25 - return -1 + goto loop1 endi if $data26 != 6 then print ======$data26 - return -1 + goto loop1 endi +print loop1 end + sql insert into t1 values(1648791213011,1,2,3,1.0,7); $loop_count = 0 @@ -174,33 +179,31 @@ endi if $data21 != 2 then print =====data21=$data21 goto loop2 - return -1 endi if $data22 != 2 then print =====data22=$data22 goto loop2 - return -1 endi if $data23 != 2 then print ======$data23 - return -1 + goto loop2 endi if $data24 != 1 then print ======$data24 - return -1 + goto loop2 endi if $data25 != 3 then print ======$data25 - return -1 + goto loop2 endi if $data26 != 7 then print ======$data26 - return -1 + goto loop2 endi sql insert into t1 values(1648791213011,1,2,3,1.0,8); @@ -238,99 +241,93 @@ endi if $data21 != 1 then print =====data21=$data21 goto loop3 - return -1 endi if $data22 != 1 then print =====data22=$data22 goto loop3 - return -1 endi if $data23 != 10 then print ======$data23 - return -1 + goto loop3 endi if $data24 != 10 then print ======$data24 - return -1 + goto loop3 endi if $data25 != 10 then print ======$data25 - return -1 + goto loop3 endi if $data26 != 12 then print ======$data26 - return -1 + goto loop3 endi # row 3 if $data31 != 1 then print =====data31=$data31 goto loop3 - return -1 endi if $data32 != 1 then print =====data32=$data32 goto loop3 - return -1 endi if $data33 != 3 then print ======$data33 - return -1 + goto loop3 endi if $data34 != 3 then print ======$data34 - return -1 + goto loop3 endi if $data35 != 3 then print ======$data35 - return -1 + goto loop3 endi if $data36 != 10 then print ======$data36 - return -1 + goto loop3 endi # row 4 if $data41 != 1 then print =====data41=$data41 goto loop3 - return -1 endi if $data42 != 1 then print =====data42=$data42 goto loop3 - return -1 endi if $data43 != 1 then print ======$data43 - return -1 + goto loop3 endi if $data44 != 1 then print ======$data44 - return -1 + goto loop3 endi if $data45 != 3 then print ======$data45 - return -1 + goto loop3 endi if $data46 != 11 then print ======$data46 - return -1 + goto loop3 endi sql insert into t1 values(1648791213030,3,12,12,12.0,13); @@ -360,95 +357,93 @@ endi if $data02 != 2 then print ======$data02 - return -1 + goto loop4 endi if $data03 != 6 then print ======$data03 - return -1 + goto loop4 endi if $data04 != 3 then print ======$data04 - return -1 + goto loop4 endi if $data05 != 3 then print ======$data05 - return -1 + goto loop4 endi if $data06 != 15 then print ======$data06 - return -1 + goto loop4 endi # row 1 if $data11 != 1 then print =====data11=$data11 goto loop4 - return -1 endi if $data12 != 1 then print =====data12=$data12 goto loop4 - return -1 endi if $data13 != 15 then print ======$data13 - return -1 + goto loop4 endi if $data14 != 15 then print ======$data14 - return -1 + goto loop4 endi if $data15 != 15 then print ======$data15 - return -1 + goto loop4 endi if $data16 != 16 then print ======$data16 - return -1 + goto loop4 endi # row 2 if $data21 != 1 then print =====data21=$data21 goto loop4 - return -1 endi if $data22 != 1 then print =====data22=$data22 goto loop4 - return -1 endi if $data23 != 1 then print ======$data23 - return -1 + goto loop4 endi if $data24 != 1 then print ======$data24 - return -1 + goto loop4 endi if $data25 != 13 then print ======$data25 - return -1 + goto loop4 endi if $data26 != 14 then print ======$data26 - return -1 + goto loop4 endi +print loop4 end + sql create database test1 vgroups 1; sql select * from information_schema.ins_databases; @@ -457,6 +452,9 @@ print $data00 $data01 $data02 sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double, id int); + +print create stream streams2 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); + sql create stream streams2 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a); sql insert into t1 values(1648791212000,2,2,3,1.0,1); @@ -502,6 +500,9 @@ sql create database test3 vgroups 1; sql use test3; sql create table t1(ts timestamp, a int, b int , c int, d double, id int); + +print create stream streams3 trigger at_once into streamt3 as select _wstart, count(*) c1, sum(b) c3 from t1 state_window(a); + sql create stream streams3 trigger at_once into streamt3 as select _wstart, count(*) c1, sum(b) c3 from t1 state_window(a); sql insert into t1 values(1648791212000,1,2,3,1.0,1); sql insert into t1 values(1648791213000,2,2,3,1.0,1); @@ -543,7 +544,6 @@ if $rows != 10 then goto loop6 endi - sql drop stream if exists streams4; sql drop database if exists test4; sql drop stable if exists streamt4; @@ -552,7 +552,10 @@ sql use test4; sql create table st (ts timestamp, c1 tinyint, c2 smallint) tags (t1 tinyint) ; sql create table t1 using st tags (-81) ; sql create table t2 using st tags (-81) ; -sql create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS start, min(c1),count(c1) from t1 state_window(c1); + +print create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS startts, min(c1),count(c1) from t1 state_window(c1); + +sql create stream if not exists streams4 trigger window_close into streamt4 as select _wstart AS startts, min(c1),count(c1) from t1 state_window(c1); sql insert into t1 (ts, c1) values (1668073288209, 11); sql insert into t1 (ts, c1) values (1668073288210, 11); @@ -567,7 +570,7 @@ loop7: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -606,7 +609,7 @@ loop8: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -636,11 +639,11 @@ sql insert into t1 (ts, c1) values (1668073288225, 65); sql insert into t1 (ts, c1) values (1668073288226, 65); $loop_count = 0 -loop8: +loop81: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -649,27 +652,27 @@ endi if $rows != 2 then print =====rows=$rows - goto loop8 + goto loop81 endi if $data01 != 11 then print =====data01=$data01 - goto loop8 + goto loop81 endi if $data02 != 5 then print =====data02=$data02 - goto loop8 + goto loop81 endi if $data11 != 29 then print =====data11=$data11 - goto loop8 + goto loop81 endi if $data12 != 1 then print =====data12=$data12 - goto loop8 + goto loop81 endi sql insert into t1 (ts, c1) values (1668073288224, 64); @@ -679,7 +682,7 @@ loop9: sleep 200 -sql select * from streamt4 order by start; +sql select * from streamt4 order by startts; $loop_count = $loop_count + 1 if $loop_count == 20 then @@ -738,6 +741,9 @@ sql use test5; sql create table tb (ts timestamp, a int); sql insert into tb values (now + 1m , 1 ); sql create table b (c timestamp, d int, e int , f int, g double); + +print create stream streams0 trigger at_once into streamt as select _wstart c1, count(*) c2, max(a) c3 from tb state_window(a); + sql create stream streams0 trigger at_once into streamt as select _wstart c1, count(*) c2, max(a) c3 from tb state_window(a); sql insert into b values(1648791213000,NULL,NULL,NULL,NULL); sql select * from streamt order by c1, c2, c3; @@ -792,4 +798,6 @@ if $data00 != 2 then goto loop10 endi +print state0 end + system sh/exec.sh -n dnode1 -s stop -x SIGINT From e89362fb36c802ad290c9859f8dae306ed49ade8 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Tue, 7 Feb 2023 15:29:05 +0800 Subject: [PATCH 04/44] feat:stream ignore check update data --- include/libs/nodes/plannodes.h | 1 + source/libs/executor/inc/executorimpl.h | 2 + source/libs/executor/src/groupoperator.c | 2 +- source/libs/executor/src/scanoperator.c | 4 ++ source/libs/executor/src/timewindowoperator.c | 4 +- .../script/tsim/stream/ignoreCheckUpdate.sim | 62 +++++++++++++++++++ 6 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 tests/script/tsim/stream/ignoreCheckUpdate.sim diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index d885665117..799f4e368b 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -357,6 +357,7 @@ typedef struct STableScanPhysiNode { int64_t watermark; int8_t igExpired; bool assignBlockUid; + int8_t igCheckUpdate; } STableScanPhysiNode; typedef STableScanPhysiNode STableSeqScanPhysiNode; diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index 4ae178d508..999a7965fb 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -474,6 +474,8 @@ typedef struct SStreamScanInfo { int32_t blockRecoverContiCnt; int32_t blockRecoverTotCnt; + int8_t igCheckUpdate; + int8_t igExpired; } SStreamScanInfo; typedef struct { diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 5febfbb2f3..9d88126220 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -1109,7 +1109,7 @@ void initParDownStream(SOperatorInfo* downstream, SPartitionBySupporter* pParSup SStreamScanInfo* pScanInfo = downstream->info; pScanInfo->partitionSup = *pParSup; pScanInfo->pPartScalarSup = pExpr; - if (!pScanInfo->pUpdateInfo) { + if (!pScanInfo->igCheckUpdate && !pScanInfo->pUpdateInfo) { pScanInfo->pUpdateInfo = updateInfoInit(60000, TSDB_TIME_PRECISION_MILLI, 0); } } diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 6d3eb67f16..ab1810398b 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -2368,6 +2368,10 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys pInfo->pUpdateDataRes = createSpecialDataBlock(STREAM_CLEAR); pInfo->assignBlockUid = pTableScanNode->assignBlockUid; pInfo->partitionSup.needCalc = false; + //todo(liuyao) for test + pTableScanNode->igCheckUpdate = true; + pInfo->igCheckUpdate = pTableScanNode->igCheckUpdate; + pInfo->igExpired = pTableScanNode->igExpired; setOperatorInfo(pOperator, "StreamScanOperator", QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN, false, OP_NOT_OPENED, pInfo, pTaskInfo); diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index d320ef6e9e..0dbed103c8 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -1726,7 +1726,7 @@ void initIntervalDownStream(SOperatorInfo* downstream, uint16_t type, SAggSuppor SStreamScanInfo* pScanInfo = downstream->info; pScanInfo->windowSup.parentType = type; pScanInfo->windowSup.pIntervalAggSup = pSup; - if (!pScanInfo->pUpdateInfo) { + if (!pScanInfo->igCheckUpdate && !pScanInfo->pUpdateInfo) { pScanInfo->pUpdateInfo = updateInfoInitP(pInterval, pTwSup->waterMark); } pScanInfo->interval = *pInterval; @@ -2893,7 +2893,7 @@ void initDownStream(SOperatorInfo* downstream, SStreamAggSupporter* pAggSup, uin } SStreamScanInfo* pScanInfo = downstream->info; pScanInfo->windowSup = (SWindowSupporter){.pStreamAggSup = pAggSup, .gap = pAggSup->gap, .parentType = type}; - if (!pScanInfo->pUpdateInfo) { + if (!pScanInfo->igCheckUpdate && !pScanInfo->pUpdateInfo) { pScanInfo->pUpdateInfo = updateInfoInit(60000, TSDB_TIME_PRECISION_MILLI, pTwSup->waterMark); } pScanInfo->twAggSup = *pTwSup; diff --git a/tests/script/tsim/stream/ignoreCheckUpdate.sim b/tests/script/tsim/stream/ignoreCheckUpdate.sim new file mode 100644 index 0000000000..d380a97d16 --- /dev/null +++ b/tests/script/tsim/stream/ignoreCheckUpdate.sim @@ -0,0 +1,62 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 +system sh/exec.sh -n dnode1 -s start +sleep 50 +sql connect + +sql drop stream if exists streams0; +sql drop database if exists test; +sql create database test vgroups 1; +sql use test; +sql create table t1(ts timestamp, a int, b int , c int); +sql create stream streams0 trigger at_once ignore update 1 into streamt as select _wstart c1, count(*) c2, max(b) c3 from t1 interval(10s); + +sql insert into t1 values(1648791213000,1,1,1); +sql insert into t1 values(1648791213000,2,2,2); + +$loop_count = 0 + +loop0: +sleep 300 +sql select * from streamt order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 2 then + print =====data01=$data01 + goto loop0 +endi + +if $data02 != 1 then + print =====data02=$data02 + goto loop0 +endi + + +sql insert into t1 values(1648791213000,3,3,3); + +$loop_count = 0 + +loop1: +sleep 300 +sql select * from streamt order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 3 then + print =====data01=$data01 + goto loop1 +endi + +if $data02 != 1 then + print =====data02=$data02 + goto loop1 +endi + +system sh/stop_dnodes.sh From 2330bf5b49c100f8af8e3c1f2ddc337c3f3a54cc Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 7 Feb 2023 15:08:35 +0800 Subject: [PATCH 05/44] enh: set terrno as TSDB_CODE_TDB_INVALID_TABLE_ID while tdbTbGet suid failure --- source/dnode/vnode/src/meta/metaTable.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 60a27bec10..7406f51d4b 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -1343,6 +1343,9 @@ static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) { int32_t ret = 0; // get super table if (tdbTbGet(pMeta->pUidIdx, &pCtbEntry->ctbEntry.suid, sizeof(tb_uid_t), &pData, &nData) != 0) { + metaError("vgId:%d, failed to get stable suid for update. version:%" PRId64, TD_VID(pMeta->pVnode), + pCtbEntry->version); + terrno = TSDB_CODE_TDB_INVALID_TABLE_ID; ret = -1; goto end; } From 3b03341de486c3cd0e4e526dc6852047b22d2e20 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 7 Feb 2023 18:15:55 +0800 Subject: [PATCH 06/44] fix: setting logKeepDays to -1 result in old log files not compressed and empty. --- include/os/osFile.h | 2 ++ source/os/CMakeLists.txt | 6 ++++-- source/os/src/osFile.c | 46 ++++++++++++++++++++++++++++++++++++++++ source/util/src/tlog.c | 45 --------------------------------------- 4 files changed, 52 insertions(+), 47 deletions(-) diff --git a/include/os/osFile.h b/include/os/osFile.h index ae77e0f27a..0e93002706 100644 --- a/include/os/osFile.h +++ b/include/os/osFile.h @@ -110,6 +110,8 @@ bool taosValidFile(TdFilePtr pFile); int32_t taosGetErrorFile(TdFilePtr pFile); +int32_t taosCompressFile(char *srcFileName, char *destFileName); + #ifdef __cplusplus } #endif diff --git a/source/os/CMakeLists.txt b/source/os/CMakeLists.txt index 3aac5e9775..bc554c48a3 100644 --- a/source/os/CMakeLists.txt +++ b/source/os/CMakeLists.txt @@ -37,7 +37,9 @@ if(CHECK_STR2INT_ERROR) add_definitions(-DTD_CHECK_STR_TO_INT_ERROR) endif() target_link_libraries( - os PUBLIC pthread + os + PUBLIC pthread + PUBLIC zlibstatic ) if(TD_WINDOWS) target_link_libraries( @@ -63,4 +65,4 @@ ENDIF () if(${BUILD_TEST}) add_subdirectory(test) -endif(${BUILD_TEST}) \ No newline at end of file +endif(${BUILD_TEST}) diff --git a/source/os/src/osFile.c b/source/os/src/osFile.c index 3f527e9130..4cdf4cbdbc 100644 --- a/source/os/src/osFile.c +++ b/source/os/src/osFile.c @@ -15,6 +15,7 @@ #define ALLOW_FORBID_FUNC #include "os.h" #include "osSemaphore.h" +#include "zlib.h" #ifdef WINDOWS #include @@ -830,3 +831,48 @@ bool taosCheckAccessFile(const char *pathname, int32_t tdFileAccessOptions) { } bool taosCheckExistFile(const char *pathname) { return taosCheckAccessFile(pathname, TD_FILE_ACCESS_EXIST_OK); }; + +int32_t taosCompressFile(char *srcFileName, char *destFileName) { + int32_t compressSize = 163840; + int32_t ret = 0; + int32_t len = 0; + char *data = taosMemoryMalloc(compressSize); + gzFile dstFp = NULL; + + TdFilePtr pSrcFile = taosOpenFile(srcFileName, TD_FILE_READ | TD_FILE_STREAM); + if (pSrcFile == NULL) { + ret = -1; + goto cmp_end; + } + + TdFilePtr pFile = taosOpenFile(destFileName, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC); + if (pFile == NULL) { + ret = -2; + goto cmp_end; + } + + dstFp = gzdopen(pFile->fd, "wb6f"); + if (dstFp == NULL) { + ret = -3; + taosCloseFile(&pFile); + goto cmp_end; + } + + while (!feof(pSrcFile->fp)) { + len = (int32_t)fread(data, 1, compressSize, pSrcFile->fp); + (void)gzwrite(dstFp, data, len); + } + +cmp_end: + if (pSrcFile) { + taosCloseFile(&pSrcFile); + } + + if (dstFp) { + gzclose(dstFp); + } + + taosMemoryFree(data); + + return ret; +} diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index 62f074db5b..89dd51a892 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -115,7 +115,6 @@ static int32_t taosPushLogBuffer(SLogBuff *pLogBuf, const char *msg, int32_t m static SLogBuff *taosLogBuffNew(int32_t bufSize); static void taosCloseLogByFd(TdFilePtr pFile); static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum); -static int32_t taosCompressFile(char *srcFileName, char *destFileName); static FORCE_INLINE void taosUpdateDaylight() { struct tm Tm, *ptm; @@ -748,50 +747,6 @@ static void *taosAsyncOutputLog(void *param) { return NULL; } -int32_t taosCompressFile(char *srcFileName, char *destFileName) { - int32_t compressSize = 163840; - int32_t ret = 0; - int32_t len = 0; - char *data = taosMemoryMalloc(compressSize); - // gzFile dstFp = NULL; - - // srcFp = fopen(srcFileName, "r"); - TdFilePtr pSrcFile = taosOpenFile(srcFileName, TD_FILE_READ); - if (pSrcFile == NULL) { - ret = -1; - goto cmp_end; - } - - TdFilePtr pFile = taosOpenFile(destFileName, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC); - if (pFile == NULL) { - ret = -2; - goto cmp_end; - } - - // dstFp = gzdopen(fd, "wb6f"); - // if (dstFp == NULL) { - // ret = -3; - // close(fd); - // goto cmp_end; - // } - // - // while (!feof(srcFp)) { - // len = (int32_t)fread(data, 1, compressSize, srcFp); - // (void)gzwrite(dstFp, data, len); - // } - -cmp_end: - if (pSrcFile) { - taosCloseFile(&pSrcFile); - } - // if (dstFp) { - // gzclose(dstFp); - // } - taosMemoryFree(data); - - return ret; -} - bool taosAssertDebug(bool condition, const char *file, int32_t line, const char *format, ...) { if (condition) return false; From e3ba07e0541b3eb8c81c57093db03783ae4966ba Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Tue, 7 Feb 2023 18:25:22 +0800 Subject: [PATCH 07/44] test(tdb/defragment): unit test case for page defragment --- source/libs/tdb/test/CMakeLists.txt | 6 +- .../libs/tdb/test/tdbPageDefragmentTest.cpp | 722 ++++++++++++++++++ 2 files changed, 727 insertions(+), 1 deletion(-) create mode 100644 source/libs/tdb/test/tdbPageDefragmentTest.cpp diff --git a/source/libs/tdb/test/CMakeLists.txt b/source/libs/tdb/test/CMakeLists.txt index 2621e02b02..fd4d7c101d 100644 --- a/source/libs/tdb/test/CMakeLists.txt +++ b/source/libs/tdb/test/CMakeLists.txt @@ -6,7 +6,11 @@ target_link_libraries(tdbTest tdb gtest gtest_main) add_executable(tdbUtilTest "tdbUtilTest.cpp") target_link_libraries(tdbUtilTest tdb gtest gtest_main) -# tdbUtilTest +# overflow pages testing add_executable(tdbExOVFLTest "tdbExOVFLTest.cpp") target_link_libraries(tdbExOVFLTest tdb gtest gtest_main) +# page defragment testing +add_executable(tdbPageDefragmentTest "tdbPageDefragmentTest.cpp") +target_link_libraries(tdbPageDefragmentTest tdb gtest gtest_main) + diff --git a/source/libs/tdb/test/tdbPageDefragmentTest.cpp b/source/libs/tdb/test/tdbPageDefragmentTest.cpp new file mode 100644 index 0000000000..7aeef94d14 --- /dev/null +++ b/source/libs/tdb/test/tdbPageDefragmentTest.cpp @@ -0,0 +1,722 @@ +#include + +#define ALLOW_FORBID_FUNC +#include "os.h" +#include "tdb.h" + +#include +#include +#include +#include +#include "tlog.h" + +typedef struct SPoolMem { + int64_t size; + struct SPoolMem *prev; + struct SPoolMem *next; +} SPoolMem; + +static SPoolMem *openPool() { + SPoolMem *pPool = (SPoolMem *)taosMemoryMalloc(sizeof(*pPool)); + + pPool->prev = pPool->next = pPool; + pPool->size = 0; + + return pPool; +} + +static void clearPool(SPoolMem *pPool) { + SPoolMem *pMem; + + do { + pMem = pPool->next; + + if (pMem == pPool) break; + + pMem->next->prev = pMem->prev; + pMem->prev->next = pMem->next; + pPool->size -= pMem->size; + + taosMemoryFree(pMem); + } while (1); + + assert(pPool->size == 0); +} + +static void closePool(SPoolMem *pPool) { + clearPool(pPool); + taosMemoryFree(pPool); +} + +static void *poolMalloc(void *arg, size_t size) { + void *ptr = NULL; + SPoolMem *pPool = (SPoolMem *)arg; + SPoolMem *pMem; + + pMem = (SPoolMem *)taosMemoryMalloc(sizeof(*pMem) + size); + if (pMem == NULL) { + assert(0); + } + + pMem->size = sizeof(*pMem) + size; + pMem->next = pPool->next; + pMem->prev = pPool; + + pPool->next->prev = pMem; + pPool->next = pMem; + pPool->size += pMem->size; + + ptr = (void *)(&pMem[1]); + return ptr; +} + +static void poolFree(void *arg, void *ptr) { + SPoolMem *pPool = (SPoolMem *)arg; + SPoolMem *pMem; + + pMem = &(((SPoolMem *)ptr)[-1]); + + pMem->next->prev = pMem->prev; + pMem->prev->next = pMem->next; + pPool->size -= pMem->size; + + taosMemoryFree(pMem); +} + +static int tKeyCmpr(const void *pKey1, int kLen1, const void *pKey2, int kLen2) { + int k1, k2; + + std::string s1((char *)pKey1 + 3, kLen1 - 3); + std::string s2((char *)pKey2 + 3, kLen2 - 3); + k1 = stoi(s1); + k2 = stoi(s2); + + if (k1 < k2) { + return -1; + } else if (k1 > k2) { + return 1; + } else { + return 0; + } +} + +static int tDefaultKeyCmpr(const void *pKey1, int keyLen1, const void *pKey2, int keyLen2) { + int mlen; + int cret; + + ASSERT(keyLen1 > 0 && keyLen2 > 0 && pKey1 != NULL && pKey2 != NULL); + + mlen = keyLen1 < keyLen2 ? keyLen1 : keyLen2; + cret = memcmp(pKey1, pKey2, mlen); + if (cret == 0) { + if (keyLen1 < keyLen2) { + cret = -1; + } else if (keyLen1 > keyLen2) { + cret = 1; + } else { + cret = 0; + } + } + return cret; +} + +// TEST(TdbPageDefragmentTest, DISABLED_TbUpsertTest) { +// TEST(TdbPageDefragmentTest, TbUpsertTest) { +//} + +// TEST(TdbPageDefragmentTest, DISABLED_TbPGetTest) { +// TEST(TdbPageDefragmentTest, TbPGetTest) { +//} + +static void generateBigVal(char *val, int valLen) { + for (int i = 0; i < valLen; ++i) { + char c = char(i & 0xff); + if (c == 0) { + c = 1; + } + val[i] = c; + } +} + +static TDB *openEnv(char const *envName, int const pageSize, int const pageNum) { + TDB *pEnv = NULL; + + int ret = tdbOpen(envName, pageSize, pageNum, &pEnv, 0); + if (ret) { + pEnv = NULL; + } + + return pEnv; +} + +static void insertOfp(void) { + int ret = 0; + + taosRemoveDir("tdb"); + + // open Env + int const pageSize = 4096; + int const pageNum = 64; + TDB *pEnv = openEnv("tdb", pageSize, pageNum); + GTEST_ASSERT_NE(pEnv, nullptr); + + // open db + TTB *pDb = NULL; + tdb_cmpr_fn_t compFunc = tKeyCmpr; + // ret = tdbTbOpen("ofp_insert.db", -1, -1, compFunc, pEnv, &pDb, 0); + ret = tdbTbOpen("ofp_insert.db", 12, -1, compFunc, pEnv, &pDb, 0); + GTEST_ASSERT_EQ(ret, 0); + + // open the pool + SPoolMem *pPool = openPool(); + + // start a transaction + TXN *txn = NULL; + + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + + // generate value payload + // char val[((4083 - 4 - 3 - 2) + 1) * 100]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + char val[32605]; + int valLen = sizeof(val) / sizeof(val[0]); + generateBigVal(val, valLen); + + // insert the generated big data + // char const *key = "key1"; + char const *key = "key123456789"; + ret = tdbTbInsert(pDb, key, strlen(key), val, valLen, txn); + GTEST_ASSERT_EQ(ret, 0); + + // commit current transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); +} + +TEST(TdbPageDefragmentTest, DISABLED_TbInsertTest) { + // TEST(TdbPageDefragmentTest, TbInsertTest) { + // ofp inserting + insertOfp(); +} + +TEST(TdbPageDefragmentTest, DISABLED_TbGetTest) { + // TEST(TdbPageDefragmentTest, TbGetTest) { + insertOfp(); + + // open Env + int const pageSize = 4096; + int const pageNum = 64; + TDB *pEnv = openEnv("tdb", pageSize, pageNum); + GTEST_ASSERT_NE(pEnv, nullptr); + + // open db + TTB *pDb = NULL; + tdb_cmpr_fn_t compFunc = tKeyCmpr; + // int ret = tdbTbOpen("ofp_insert.db", -1, -1, compFunc, pEnv, &pDb, 0); + int ret = tdbTbOpen("ofp_insert.db", 12, -1, compFunc, pEnv, &pDb, 0); + GTEST_ASSERT_EQ(ret, 0); + + // generate value payload + // char val[((4083 - 4 - 3 - 2) + 1) * 100]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + char val[32605]; + int valLen = sizeof(val) / sizeof(val[0]); + generateBigVal(val, valLen); + + { // Query the data + void *pVal = NULL; + int vLen; + + // char const *key = "key1"; + char const *key = "key123456789"; + ret = tdbTbGet(pDb, key, strlen(key), &pVal, &vLen); + ASSERT(ret == 0); + GTEST_ASSERT_EQ(ret, 0); + + GTEST_ASSERT_EQ(vLen, valLen); + GTEST_ASSERT_EQ(memcmp(val, pVal, vLen), 0); + + tdbFree(pVal); + } +} + +TEST(TdbPageDefragmentTest, DISABLED_TbDeleteTest) { + // TEST(TdbPageDefragmentTest, TbDeleteTest) { + int ret = 0; + + taosRemoveDir("tdb"); + + // open Env + int const pageSize = 4096; + int const pageNum = 64; + TDB *pEnv = openEnv("tdb", pageSize, pageNum); + GTEST_ASSERT_NE(pEnv, nullptr); + + // open db + TTB *pDb = NULL; + tdb_cmpr_fn_t compFunc = tKeyCmpr; + ret = tdbTbOpen("ofp_insert.db", -1, -1, compFunc, pEnv, &pDb, 0); + GTEST_ASSERT_EQ(ret, 0); + + // open the pool + SPoolMem *pPool = openPool(); + + // start a transaction + TXN *txn; + + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + + // generate value payload + // char val[((4083 - 4 - 3 - 2) + 1) * 100]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + char val[((4083 - 4 - 3 - 2) + 1) * 2]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + int valLen = sizeof(val) / sizeof(val[0]); + generateBigVal(val, valLen); + + { // insert the generated big data + ret = tdbTbInsert(pDb, "key1", strlen("key1"), val, valLen, txn); + GTEST_ASSERT_EQ(ret, 0); + } + + { // query the data + void *pVal = NULL; + int vLen; + + ret = tdbTbGet(pDb, "key1", strlen("key1"), &pVal, &vLen); + ASSERT(ret == 0); + GTEST_ASSERT_EQ(ret, 0); + + GTEST_ASSERT_EQ(vLen, valLen); + GTEST_ASSERT_EQ(memcmp(val, pVal, vLen), 0); + + tdbFree(pVal); + } + /* open to debug committed file +tdbCommit(pEnv, &txn); +tdbTxnClose(&txn); + +++txnid; +tdbTxnOpen(&txn, txnid, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); +tdbBegin(pEnv, &txn); + */ + { // upsert the data + ret = tdbTbUpsert(pDb, "key1", strlen("key1"), "value1", strlen("value1"), txn); + GTEST_ASSERT_EQ(ret, 0); + } + + { // query the upserted data + void *pVal = NULL; + int vLen; + + ret = tdbTbGet(pDb, "key1", strlen("key1"), &pVal, &vLen); + ASSERT(ret == 0); + GTEST_ASSERT_EQ(ret, 0); + + GTEST_ASSERT_EQ(vLen, strlen("value1")); + GTEST_ASSERT_EQ(memcmp("value1", pVal, vLen), 0); + + tdbFree(pVal); + } + + { // delete the data + ret = tdbTbDelete(pDb, "key1", strlen("key1"), txn); + GTEST_ASSERT_EQ(ret, 0); + } + + { // query the deleted data + void *pVal = NULL; + int vLen = -1; + + ret = tdbTbGet(pDb, "key1", strlen("key1"), &pVal, &vLen); + ASSERT(ret == -1); + GTEST_ASSERT_EQ(ret, -1); + + GTEST_ASSERT_EQ(vLen, -1); + GTEST_ASSERT_EQ(pVal, nullptr); + + tdbFree(pVal); + } + + // commit current transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); +} + +TEST(TdbPageDefragmentTest, DISABLED_simple_insert1) { + // TEST(TdbPageDefragmentTest, simple_insert1) { + int ret; + TDB *pEnv; + TTB *pDb; + tdb_cmpr_fn_t compFunc; + int nData = 1; + TXN *txn; + int const pageSize = 4096; + + taosRemoveDir("tdb"); + + // Open Env + ret = tdbOpen("tdb", pageSize, 64, &pEnv, 0); + GTEST_ASSERT_EQ(ret, 0); + + // Create a database + compFunc = tKeyCmpr; + ret = tdbTbOpen("db.db", -1, -1, compFunc, pEnv, &pDb, 0); + GTEST_ASSERT_EQ(ret, 0); + + { + char key[64]; + // char val[(4083 - 4 - 3 - 2)]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + char val[(4083 - 4 - 3 - 2) + 1]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + int64_t poolLimit = 4096; // 1M pool limit + SPoolMem *pPool; + + // open the pool + pPool = openPool(); + + // start a transaction + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + + for (int iData = 1; iData <= nData; iData++) { + sprintf(key, "key0"); + sprintf(val, "value%d", iData); + + // ret = tdbTbInsert(pDb, key, strlen(key), val, strlen(val), &txn); + // GTEST_ASSERT_EQ(ret, 0); + + // generate value payload + int valLen = sizeof(val) / sizeof(val[0]); + for (int i = 6; i < valLen; ++i) { + char c = char(i & 0xff); + if (c == 0) { + c = 1; + } + val[i] = c; + } + + ret = tdbTbInsert(pDb, "key1", strlen("key1"), val, valLen, txn); + GTEST_ASSERT_EQ(ret, 0); + + // if pool is full, commit the transaction and start a new one + if (pPool->size >= poolLimit) { + // commit current transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + + // start a new transaction + clearPool(pPool); + + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + } + } + + // commit the transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + + { // Query the data + void *pVal = NULL; + int vLen; + + for (int i = 1; i <= nData; i++) { + sprintf(key, "key%d", i); + // sprintf(val, "value%d", i); + + ret = tdbTbGet(pDb, key, strlen(key), &pVal, &vLen); + ASSERT(ret == 0); + GTEST_ASSERT_EQ(ret, 0); + + GTEST_ASSERT_EQ(vLen, sizeof(val) / sizeof(val[0])); + GTEST_ASSERT_EQ(memcmp(val, pVal, vLen), 0); + } + + tdbFree(pVal); + } + + { // Iterate to query the DB data + TBC *pDBC; + void *pKey = NULL; + void *pVal = NULL; + int vLen, kLen; + int count = 0; + + ret = tdbTbcOpen(pDb, &pDBC, NULL); + GTEST_ASSERT_EQ(ret, 0); + + tdbTbcMoveToFirst(pDBC); + + for (;;) { + ret = tdbTbcNext(pDBC, &pKey, &kLen, &pVal, &vLen); + if (ret < 0) break; + + // std::cout.write((char *)pKey, kLen) /* << " " << kLen */ << " "; + // std::cout.write((char *)pVal, vLen) /* << " " << vLen */; + // std::cout << std::endl; + + count++; + } + + GTEST_ASSERT_EQ(count, nData); + + tdbTbcClose(pDBC); + + tdbFree(pKey); + tdbFree(pVal); + } + } + + ret = tdbTbDrop(pDb); + GTEST_ASSERT_EQ(ret, 0); + + // Close a database + tdbTbClose(pDb); + + // Close Env + ret = tdbClose(pEnv); + GTEST_ASSERT_EQ(ret, 0); +} + +// TEST(TdbPageDefragmentTest, DISABLED_seq_insert) { +TEST(TdbPageDefragmentTest, seq_insert) { + int ret = 0; + TDB *pEnv = NULL; + TTB *pDb = NULL; + tdb_cmpr_fn_t compFunc; + int nData = 64 * 1024; + TXN *txn = NULL; + int const pageSize = 1 * 1024 * 1024; + + taosRemoveDir("tdb"); + + // Open Env + ret = tdbOpen("tdb", pageSize, 64, &pEnv, 0); + GTEST_ASSERT_EQ(ret, 0); + + // Create a database + compFunc = tKeyCmpr; + ret = tdbTbOpen("db.db", -1, -1, compFunc, pEnv, &pDb, 0); + GTEST_ASSERT_EQ(ret, 0); + + // 1, insert nData kv + { + char key[64]; + // char val[(4083 - 4 - 3 - 2)]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + char val[(4083 - 4 - 3 - 2) + 1]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + int64_t poolLimit = 4096; // 1M pool limit + SPoolMem *pPool; + + // open the pool + pPool = openPool(); + + // start a transaction + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + + for (int iData = 0; iData < nData; ++iData) { + sprintf(key, "key%d", iData); + sprintf(val, "value%d", iData); + + ret = tdbTbInsert(pDb, key, strlen(key), val, strlen(val), txn); + GTEST_ASSERT_EQ(ret, 0); + /* + // generate value payload + int valLen = sizeof(val) / sizeof(val[0]); + for (int i = 6; i < valLen; ++i) { + char c = char(i & 0xff); + if (c == 0) { + c = 1; + } + val[i] = c; + } + + ret = tdbTbInsert(pDb, key, strlen(key), val, valLen, txn); + GTEST_ASSERT_EQ(ret, 0); + */ + // if pool is full, commit the transaction and start a new one + if (pPool->size >= poolLimit) { + // commit current transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + + // start a new transaction + clearPool(pPool); + + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + } + } + + // commit the transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + + // 2, delete nData/2 records + } + + // Close a database + tdbTbClose(pDb); + + // Close Env + ret = tdbClose(pEnv); + GTEST_ASSERT_EQ(ret, 0); +} + +// TEST(TdbPageDefragmentTest, DISABLED_seq_delete) { +TEST(TdbPageDefragmentTest, seq_delete) { + int ret = 0; + TDB *pEnv = NULL; + TTB *pDb = NULL; + tdb_cmpr_fn_t compFunc; + int nData = 64 * 1024; + TXN *txn = NULL; + int const pageSize = 1 * 1024 * 1024; + + // Open Env + ret = tdbOpen("tdb", pageSize, 64, &pEnv, 0); + GTEST_ASSERT_EQ(ret, 0); + + // Create a database + compFunc = tKeyCmpr; + ret = tdbTbOpen("db.db", -1, -1, compFunc, pEnv, &pDb, 0); + GTEST_ASSERT_EQ(ret, 0); + + // 2, delete nData/2 records + { + char key[64]; + // char val[(4083 - 4 - 3 - 2)]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + char val[(4083 - 4 - 3 - 2) + 1]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + int64_t poolLimit = 4096; // 1M pool limit + SPoolMem *pPool; + + // open the pool + pPool = openPool(); + + // start a transaction + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + + for (int iData = 1; iData <= nData; iData++) { + if (iData % 2 == 0) continue; + + sprintf(key, "key%d", iData); + sprintf(val, "value%d", iData); + + { // delete the data + ret = tdbTbDelete(pDb, key, strlen(key), txn); + GTEST_ASSERT_EQ(ret, 0); + } + + /* + // generate value payload + int valLen = sizeof(val) / sizeof(val[0]); + for (int i = 6; i < valLen; ++i) { + char c = char(i & 0xff); + if (c == 0) { + c = 1; + } + val[i] = c; + } + + ret = tdbTbInsert(pDb, key, strlen(key), val, valLen, txn); + GTEST_ASSERT_EQ(ret, 0); + */ + // if pool is full, commit the transaction and start a new one + if (pPool->size >= poolLimit) { + // commit current transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + + // start a new transaction + clearPool(pPool); + + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + } + } + + // commit the transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + } + + // Close a database + tdbTbClose(pDb); + + // Close Env + ret = tdbClose(pEnv); + GTEST_ASSERT_EQ(ret, 0); +} + +// TEST(TdbPageDefragmentTest, DISABLED_defragment_insert) { +TEST(TdbPageDefragmentTest, defragment_insert) { + int ret = 0; + TDB *pEnv = NULL; + TTB *pDb = NULL; + tdb_cmpr_fn_t compFunc; + int nData = 64 * 1024; + TXN *txn = NULL; + int const pageSize = 1 * 1024 * 1024; + + // Open Env + ret = tdbOpen("tdb", pageSize, 64, &pEnv, 0); + GTEST_ASSERT_EQ(ret, 0); + + // Create a database + compFunc = tKeyCmpr; + ret = tdbTbOpen("db.db", -1, -1, compFunc, pEnv, &pDb, 0); + GTEST_ASSERT_EQ(ret, 0); + + // 3, insert 32k records + { + char key[64]; + // char val[(4083 - 4 - 3 - 2)]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + char val[(4083 - 4 - 3 - 2) + 1]; // pSize(4096) - amSize(1) - pageHdr(8) - footerSize(4) + int64_t poolLimit = 4096; // 1M pool limit + SPoolMem *pPool; + + // open the pool + pPool = openPool(); + + // start a transaction + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + + for (int iData = nData + 1; iData <= nData * 2; iData++) { + // if (iData % 2 == 0) continue; + sprintf(key, "key%d", iData); + sprintf(val, "value%d", iData); + + ret = tdbTbInsert(pDb, key, strlen(key), val, strlen(val), txn); + GTEST_ASSERT_EQ(ret, 0); + /* + // generate value payload + int valLen = sizeof(val) / sizeof(val[0]); + for (int i = 6; i < valLen; ++i) { + char c = char(i & 0xff); + if (c == 0) { + c = 1; + } + val[i] = c; + } + + ret = tdbTbInsert(pDb, key, strlen(key), val, valLen, txn); + GTEST_ASSERT_EQ(ret, 0); + */ + // if pool is full, commit the transaction and start a new one + if (pPool->size >= poolLimit) { + // commit current transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + + // start a new transaction + clearPool(pPool); + + tdbBegin(pEnv, &txn, poolMalloc, poolFree, pPool, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED); + } + } + + // commit the transaction + tdbCommit(pEnv, txn); + tdbPostCommit(pEnv, txn); + + // 2, delete nData/2 records + } + + // Close a database + tdbTbClose(pDb); + + // Close Env + ret = tdbClose(pEnv); + GTEST_ASSERT_EQ(ret, 0); +} From e91b9ff47cae3636b56d1691749c03fe606d597a Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Feb 2023 19:05:41 +0800 Subject: [PATCH 08/44] fix: keepcolumnname is invalid in nested query --- source/libs/parser/src/parTranslater.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 18350da129..cb84d38370 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1576,7 +1576,8 @@ static int32_t translateBlockDistFunc(STranslateContext* pCtx, SFunctionNode* pF 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); + "%s is only supported on super table, child table or normal table", + pFunc->functionName); } return TSDB_CODE_SUCCESS; } @@ -1604,6 +1605,7 @@ static int32_t translateMultiResFunc(STranslateContext* pCxt, SFunctionNode* pFu } if (tsKeepColumnName && 1 == LIST_LENGTH(pFunc->pParameterList) && !pFunc->node.asAlias) { strcpy(pFunc->node.userAlias, ((SExprNode*)nodesListGetNode(pFunc->pParameterList, 0))->userAlias); + strcpy(pFunc->node.aliasName, pFunc->node.userAlias); } return TSDB_CODE_SUCCESS; } @@ -2546,11 +2548,12 @@ static SNode* createMultiResFunc(SFunctionNode* pSrcFunc, SExprNode* pExpr) { int32_t len = 0; if (QUERY_NODE_COLUMN == nodeType(pExpr)) { SColumnNode* pCol = (SColumnNode*)pExpr; - len = snprintf(buf, sizeof(buf), "%s(%s.%s)", pSrcFunc->functionName, pCol->tableAlias, pCol->colName); - strncpy(pFunc->node.aliasName, buf, TMIN(len, sizeof(pFunc->node.aliasName) - 1)); if (tsKeepColumnName) { strcpy(pFunc->node.userAlias, pCol->colName); + strcpy(pFunc->node.aliasName, pCol->colName); } else { + len = snprintf(buf, sizeof(buf), "%s(%s.%s)", pSrcFunc->functionName, pCol->tableAlias, pCol->colName); + strncpy(pFunc->node.aliasName, buf, TMIN(len, sizeof(pFunc->node.aliasName) - 1)); len = snprintf(buf, sizeof(buf), "%s(%s)", pSrcFunc->functionName, pCol->colName); strncpy(pFunc->node.userAlias, buf, TMIN(len, sizeof(pFunc->node.userAlias) - 1)); } From 9b522cec3adc5711f048e9a14b0bd51b78151a05 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Tue, 7 Feb 2023 19:16:39 +0800 Subject: [PATCH 09/44] enh: return error on unexpected snapshot msg --- source/dnode/vnode/src/vnd/vnodeSnapshot.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSnapshot.c b/source/dnode/vnode/src/vnd/vnodeSnapshot.c index 43f903dc48..4487261617 100644 --- a/source/dnode/vnode/src/vnd/vnodeSnapshot.c +++ b/source/dnode/vnode/src/vnd/vnodeSnapshot.c @@ -426,7 +426,13 @@ int32_t vnodeSnapWrite(SVSnapWriter *pWriter, uint8_t *pData, uint32_t nData) { SVnode *pVnode = pWriter->pVnode; ASSERT(pHdr->size + sizeof(SSnapDataHdr) == nData); - ASSERT(pHdr->index == pWriter->index + 1); + + if (pHdr->index != pWriter->index + 1) { + vError("vgId:%d, unexpected vnode snapshot msg. index:%" PRId64 ", expected index:%" PRId64, TD_VID(pVnode), + pHdr->index, pWriter->index + 1); + return -1; + } + pWriter->index = pHdr->index; vDebug("vgId:%d, vnode snapshot write data, index:%" PRId64 " type:%d blockLen:%d", TD_VID(pVnode), pHdr->index, From a52371959e48a8bd454bd391b4c863f6eab9d75a Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 7 Feb 2023 19:31:08 +0800 Subject: [PATCH 10/44] feat: add ignore update option for create stream --- include/common/tmsg.h | 2 + include/common/ttokendef.h | 248 +- include/libs/nodes/cmdnodes.h | 1 + source/common/src/tmsg.c | 3 + source/libs/parser/inc/sql.y | 3 +- source/libs/parser/src/parAstCreater.c | 1 + source/libs/parser/src/parTokenizer.c | 1 + source/libs/parser/src/parTranslater.c | 4 +- source/libs/parser/src/sql.c | 3265 ++++++++++--------- source/libs/parser/test/parInitialCTest.cpp | 16 +- 10 files changed, 1789 insertions(+), 1755 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index c4a3cad28a..f02144fe3e 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -1752,6 +1752,7 @@ typedef struct { #define STREAM_FILL_HISTORY_ON 1 #define STREAM_FILL_HISTORY_OFF 0 #define STREAM_DEFAULT_FILL_HISTORY STREAM_FILL_HISTORY_OFF +#define STREAM_DEFAULT_IGNORE_UPDATE 0 typedef struct { char name[TSDB_STREAM_FNAME_LEN]; @@ -1769,6 +1770,7 @@ typedef struct { SArray* pTags; // array of SField // 3.0.20 int64_t checkpointFreq; // ms + int8_t igUpdate; } SCMCreateStreamReq; typedef struct { diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 0192bbf486..c553f53148 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -209,130 +209,130 @@ #define TK_IGNORE 191 #define TK_EXPIRED 192 #define TK_FILL_HISTORY 193 -#define TK_SUBTABLE 194 -#define TK_KILL 195 -#define TK_CONNECTION 196 -#define TK_TRANSACTION 197 -#define TK_BALANCE 198 -#define TK_VGROUP 199 -#define TK_MERGE 200 -#define TK_REDISTRIBUTE 201 -#define TK_SPLIT 202 -#define TK_DELETE 203 -#define TK_INSERT 204 -#define TK_NULL 205 -#define TK_NK_QUESTION 206 -#define TK_NK_ARROW 207 -#define TK_ROWTS 208 -#define TK_QSTART 209 -#define TK_QEND 210 -#define TK_QDURATION 211 -#define TK_WSTART 212 -#define TK_WEND 213 -#define TK_WDURATION 214 -#define TK_IROWTS 215 -#define TK_CAST 216 -#define TK_NOW 217 -#define TK_TODAY 218 -#define TK_TIMEZONE 219 -#define TK_CLIENT_VERSION 220 -#define TK_SERVER_VERSION 221 -#define TK_SERVER_STATUS 222 -#define TK_CURRENT_USER 223 -#define TK_COUNT 224 -#define TK_LAST_ROW 225 -#define TK_CASE 226 -#define TK_END 227 -#define TK_WHEN 228 -#define TK_THEN 229 -#define TK_ELSE 230 -#define TK_BETWEEN 231 -#define TK_IS 232 -#define TK_NK_LT 233 -#define TK_NK_GT 234 -#define TK_NK_LE 235 -#define TK_NK_GE 236 -#define TK_NK_NE 237 -#define TK_MATCH 238 -#define TK_NMATCH 239 -#define TK_CONTAINS 240 -#define TK_IN 241 -#define TK_JOIN 242 -#define TK_INNER 243 -#define TK_SELECT 244 -#define TK_DISTINCT 245 -#define TK_WHERE 246 -#define TK_PARTITION 247 -#define TK_BY 248 -#define TK_SESSION 249 -#define TK_STATE_WINDOW 250 -#define TK_SLIDING 251 -#define TK_FILL 252 -#define TK_VALUE 253 -#define TK_NONE 254 -#define TK_PREV 255 -#define TK_LINEAR 256 -#define TK_NEXT 257 -#define TK_HAVING 258 -#define TK_RANGE 259 -#define TK_EVERY 260 -#define TK_ORDER 261 -#define TK_SLIMIT 262 -#define TK_SOFFSET 263 -#define TK_LIMIT 264 -#define TK_OFFSET 265 -#define TK_ASC 266 -#define TK_NULLS 267 -#define TK_ABORT 268 -#define TK_AFTER 269 -#define TK_ATTACH 270 -#define TK_BEFORE 271 -#define TK_BEGIN 272 -#define TK_BITAND 273 -#define TK_BITNOT 274 -#define TK_BITOR 275 -#define TK_BLOCKS 276 -#define TK_CHANGE 277 -#define TK_COMMA 278 -#define TK_COMPACT 279 -#define TK_CONCAT 280 -#define TK_CONFLICT 281 -#define TK_COPY 282 -#define TK_DEFERRED 283 -#define TK_DELIMITERS 284 -#define TK_DETACH 285 -#define TK_DIVIDE 286 -#define TK_DOT 287 -#define TK_EACH 288 -#define TK_FAIL 289 -#define TK_FILE 290 -#define TK_FOR 291 -#define TK_GLOB 292 -#define TK_ID 293 -#define TK_IMMEDIATE 294 -#define TK_IMPORT 295 -#define TK_INITIALLY 296 -#define TK_INSTEAD 297 -#define TK_ISNULL 298 -#define TK_KEY 299 -#define TK_MODULES 300 -#define TK_NK_BITNOT 301 -#define TK_NK_SEMI 302 -#define TK_NOTNULL 303 -#define TK_OF 304 -#define TK_PLUS 305 -#define TK_PRIVILEGE 306 -#define TK_RAISE 307 -#define TK_REPLACE 308 -#define TK_RESTRICT 309 -#define TK_ROW 310 -#define TK_SEMI 311 -#define TK_STAR 312 -#define TK_STATEMENT 313 -#define TK_STRICT 314 -#define TK_STRING 315 -#define TK_TIMES 316 -#define TK_UPDATE 317 +#define TK_UPDATE 194 +#define TK_SUBTABLE 195 +#define TK_KILL 196 +#define TK_CONNECTION 197 +#define TK_TRANSACTION 198 +#define TK_BALANCE 199 +#define TK_VGROUP 200 +#define TK_MERGE 201 +#define TK_REDISTRIBUTE 202 +#define TK_SPLIT 203 +#define TK_DELETE 204 +#define TK_INSERT 205 +#define TK_NULL 206 +#define TK_NK_QUESTION 207 +#define TK_NK_ARROW 208 +#define TK_ROWTS 209 +#define TK_QSTART 210 +#define TK_QEND 211 +#define TK_QDURATION 212 +#define TK_WSTART 213 +#define TK_WEND 214 +#define TK_WDURATION 215 +#define TK_IROWTS 216 +#define TK_CAST 217 +#define TK_NOW 218 +#define TK_TODAY 219 +#define TK_TIMEZONE 220 +#define TK_CLIENT_VERSION 221 +#define TK_SERVER_VERSION 222 +#define TK_SERVER_STATUS 223 +#define TK_CURRENT_USER 224 +#define TK_COUNT 225 +#define TK_LAST_ROW 226 +#define TK_CASE 227 +#define TK_END 228 +#define TK_WHEN 229 +#define TK_THEN 230 +#define TK_ELSE 231 +#define TK_BETWEEN 232 +#define TK_IS 233 +#define TK_NK_LT 234 +#define TK_NK_GT 235 +#define TK_NK_LE 236 +#define TK_NK_GE 237 +#define TK_NK_NE 238 +#define TK_MATCH 239 +#define TK_NMATCH 240 +#define TK_CONTAINS 241 +#define TK_IN 242 +#define TK_JOIN 243 +#define TK_INNER 244 +#define TK_SELECT 245 +#define TK_DISTINCT 246 +#define TK_WHERE 247 +#define TK_PARTITION 248 +#define TK_BY 249 +#define TK_SESSION 250 +#define TK_STATE_WINDOW 251 +#define TK_SLIDING 252 +#define TK_FILL 253 +#define TK_VALUE 254 +#define TK_NONE 255 +#define TK_PREV 256 +#define TK_LINEAR 257 +#define TK_NEXT 258 +#define TK_HAVING 259 +#define TK_RANGE 260 +#define TK_EVERY 261 +#define TK_ORDER 262 +#define TK_SLIMIT 263 +#define TK_SOFFSET 264 +#define TK_LIMIT 265 +#define TK_OFFSET 266 +#define TK_ASC 267 +#define TK_NULLS 268 +#define TK_ABORT 269 +#define TK_AFTER 270 +#define TK_ATTACH 271 +#define TK_BEFORE 272 +#define TK_BEGIN 273 +#define TK_BITAND 274 +#define TK_BITNOT 275 +#define TK_BITOR 276 +#define TK_BLOCKS 277 +#define TK_CHANGE 278 +#define TK_COMMA 279 +#define TK_COMPACT 280 +#define TK_CONCAT 281 +#define TK_CONFLICT 282 +#define TK_COPY 283 +#define TK_DEFERRED 284 +#define TK_DELIMITERS 285 +#define TK_DETACH 286 +#define TK_DIVIDE 287 +#define TK_DOT 288 +#define TK_EACH 289 +#define TK_FAIL 290 +#define TK_FILE 291 +#define TK_FOR 292 +#define TK_GLOB 293 +#define TK_ID 294 +#define TK_IMMEDIATE 295 +#define TK_IMPORT 296 +#define TK_INITIALLY 297 +#define TK_INSTEAD 298 +#define TK_ISNULL 299 +#define TK_KEY 300 +#define TK_MODULES 301 +#define TK_NK_BITNOT 302 +#define TK_NK_SEMI 303 +#define TK_NOTNULL 304 +#define TK_OF 305 +#define TK_PLUS 306 +#define TK_PRIVILEGE 307 +#define TK_RAISE 308 +#define TK_REPLACE 309 +#define TK_RESTRICT 310 +#define TK_ROW 311 +#define TK_SEMI 312 +#define TK_STAR 313 +#define TK_STATEMENT 314 +#define TK_STRICT 315 +#define TK_STRING 316 +#define TK_TIMES 317 #define TK_VALUES 318 #define TK_VARIABLE 319 #define TK_VIEW 320 diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index b1054e7b85..de27806912 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -389,6 +389,7 @@ typedef struct SStreamOptions { SNode* pDeleteMark; int8_t fillHistory; int8_t ignoreExpired; + int8_t ignoreUpdate; } SStreamOptions; typedef struct SCreateStreamStmt { diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 891f5e21ab..ec617163a2 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -5425,6 +5425,7 @@ int32_t tSerializeSCMCreateStreamReq(void *buf, int32_t bufLen, const SCMCreateS if (tEncodeI32(&encoder, pField->bytes) < 0) return -1; if (tEncodeCStr(&encoder, pField->name) < 0) return -1; } + if (tEncodeI8(&encoder, pReq->igUpdate) < 0) return -1; tEndEncode(&encoder); @@ -5486,6 +5487,8 @@ int32_t tDeserializeSCMCreateStreamReq(void *buf, int32_t bufLen, SCMCreateStrea } } + if (tDecodeI8(&decoder, &pReq->igUpdate) < 0) return -1; + tEndDecode(&decoder); tDecoderClear(&decoder); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 7136a555cd..eafcd5e0c0 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -544,6 +544,7 @@ stream_options(A) ::= stream_options(B) TRIGGER MAX_DELAY duration_literal(C). stream_options(A) ::= stream_options(B) WATERMARK duration_literal(C). { ((SStreamOptions*)B)->pWatermark = releaseRawExprNode(pCxt, C); A = B; } stream_options(A) ::= stream_options(B) IGNORE EXPIRED NK_INTEGER(C). { ((SStreamOptions*)B)->ignoreExpired = taosStr2Int8(C.z, NULL, 10); A = B; } stream_options(A) ::= stream_options(B) FILL_HISTORY NK_INTEGER(C). { ((SStreamOptions*)B)->fillHistory = taosStr2Int8(C.z, NULL, 10); A = B; } +stream_options(A) ::= stream_options(B) IGNORE UPDATE NK_INTEGER(C). { ((SStreamOptions*)B)->ignoreUpdate = taosStr2Int8(C.z, NULL, 10); A = B; } subtable_opt(A) ::= . { A = NULL; } subtable_opt(A) ::= SUBTABLE NK_LP expression(B) NK_RP. { A = releaseRawExprNode(pCxt, B); } @@ -1075,4 +1076,4 @@ null_ordering_opt(A) ::= NULLS LAST. %fallback ABORT AFTER ATTACH BEFORE BEGIN BITAND BITNOT BITOR BLOCKS CHANGE COMMA COMPACT CONCAT CONFLICT COPY DEFERRED DELIMITERS DETACH DIVIDE DOT EACH END FAIL FILE FOR GLOB ID IMMEDIATE IMPORT INITIALLY INSTEAD ISNULL KEY MODULES NK_BITNOT NK_SEMI NOTNULL OF PLUS PRIVILEGE RAISE REPLACE RESTRICT ROW SEMI STAR STATEMENT - STRICT STRING TIMES UPDATE VALUES VARIABLE VIEW WAL. + STRICT STRING TIMES VALUES VARIABLE VIEW WAL. diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index eaa72b1377..d1f861a5fc 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1763,6 +1763,7 @@ SNode* createStreamOptions(SAstCreateContext* pCxt) { pOptions->triggerType = STREAM_TRIGGER_AT_ONCE; pOptions->fillHistory = STREAM_DEFAULT_FILL_HISTORY; pOptions->ignoreExpired = STREAM_DEFAULT_IGNORE_EXPIRED; + pOptions->ignoreUpdate = STREAM_DEFAULT_IGNORE_UPDATE; return (SNode*)pOptions; } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 6a96ff9c50..9f68116ee5 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -232,6 +232,7 @@ static SKeyword keywordTable[] = { {"TTL", TK_TTL}, {"UNION", TK_UNION}, {"UNSIGNED", TK_UNSIGNED}, + {"UPDATE", TK_UPDATE}, {"USE", TK_USE}, {"USER", TK_USER}, {"USERS", TK_USERS}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index ec834a6ba1..e47814ca2e 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1576,7 +1576,8 @@ static int32_t translateBlockDistFunc(STranslateContext* pCtx, SFunctionNode* pF 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); + "%s is only supported on super table, child table or normal table", + pFunc->functionName); } return TSDB_CODE_SUCCESS; } @@ -5738,6 +5739,7 @@ static int32_t buildCreateStreamReq(STranslateContext* pCxt, SCreateStreamStmt* pReq->watermark = (NULL != pStmt->pOptions->pWatermark ? ((SValueNode*)pStmt->pOptions->pWatermark)->datum.i : 0); pReq->fillHistory = pStmt->pOptions->fillHistory; pReq->igExpired = pStmt->pOptions->ignoreExpired; + pReq->igUpdate = pStmt->pOptions->ignoreUpdate; columnDefNodeToField(pStmt->pTags, &pReq->pTags); pReq->numOfTags = LIST_LENGTH(pStmt->pTags); } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index d3b9bf069b..9a518f8c40 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -139,17 +139,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 711 -#define YYNRULE 541 +#define YYNSTATE 712 +#define YYNRULE 542 #define YYNTOKEN 322 -#define YY_MAX_SHIFT 710 -#define YY_MIN_SHIFTREDUCE 1054 -#define YY_MAX_SHIFTREDUCE 1594 -#define YY_ERROR_ACTION 1595 -#define YY_ACCEPT_ACTION 1596 -#define YY_NO_ACTION 1597 -#define YY_MIN_REDUCE 1598 -#define YY_MAX_REDUCE 2138 +#define YY_MAX_SHIFT 711 +#define YY_MIN_SHIFTREDUCE 1056 +#define YY_MAX_SHIFTREDUCE 1597 +#define YY_ERROR_ACTION 1598 +#define YY_ACCEPT_ACTION 1599 +#define YY_NO_ACTION 1600 +#define YY_MIN_REDUCE 1601 +#define YY_MAX_REDUCE 2142 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,742 +216,757 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2723) +#define YY_ACTTAB_COUNT (2717) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 459, 353, 460, 1634, 566, 600, 578, 2114, 2109, 155, - /* 10 */ 1940, 2109, 43, 41, 1525, 39, 38, 37, 1753, 123, - /* 20 */ 361, 1936, 1375, 565, 173, 599, 498, 2113, 2110, 567, - /* 30 */ 1954, 2110, 2112, 1455, 1400, 1373, 1751, 131, 468, 406, - /* 40 */ 460, 1634, 36, 35, 1940, 586, 42, 40, 39, 38, - /* 50 */ 37, 1932, 1938, 344, 541, 1936, 167, 578, 1450, 465, - /* 60 */ 585, 1972, 610, 16, 366, 461, 1804, 1797, 1799, 581, - /* 70 */ 1381, 599, 1401, 330, 1922, 158, 616, 333, 1851, 319, - /* 80 */ 1705, 1972, 1802, 43, 41, 1932, 1938, 356, 131, 560, - /* 90 */ 477, 361, 475, 1375, 1860, 12, 610, 326, 172, 2049, - /* 100 */ 2050, 1953, 129, 2054, 1455, 1988, 1373, 2113, 100, 1955, - /* 110 */ 620, 1957, 1958, 615, 600, 610, 1106, 707, 1105, 654, - /* 120 */ 170, 458, 2041, 599, 463, 1640, 355, 2037, 123, 1450, - /* 130 */ 559, 210, 1457, 1458, 16, 503, 33, 275, 1484, 566, - /* 140 */ 175, 1381, 157, 2109, 1610, 1751, 46, 1107, 2067, 255, - /* 150 */ 2049, 577, 578, 124, 576, 1621, 1954, 2109, 565, 173, - /* 160 */ 600, 1431, 1440, 2110, 567, 578, 12, 42, 40, 39, - /* 170 */ 38, 37, 565, 173, 52, 1309, 1310, 2110, 567, 97, - /* 180 */ 1376, 586, 1374, 131, 1256, 1257, 467, 1972, 707, 463, - /* 190 */ 1640, 1751, 1402, 132, 1485, 614, 131, 561, 46, 1922, - /* 200 */ 1922, 1743, 616, 1457, 1458, 1379, 1380, 62, 1430, 1433, - /* 210 */ 1434, 1435, 1436, 1437, 1438, 1439, 612, 608, 1448, 1449, - /* 220 */ 1451, 1452, 1453, 1454, 1456, 1459, 2, 1953, 595, 58, - /* 230 */ 1860, 1988, 1431, 1440, 311, 1955, 620, 1957, 1958, 615, - /* 240 */ 613, 610, 601, 2006, 174, 2049, 2050, 1400, 129, 2054, - /* 250 */ 338, 1376, 2056, 1374, 1798, 1799, 580, 171, 2049, 2050, - /* 260 */ 556, 129, 2054, 1620, 58, 32, 359, 1479, 1480, 1481, - /* 270 */ 1482, 1483, 1487, 1488, 1489, 1490, 1379, 1380, 2053, 1430, - /* 280 */ 1433, 1434, 1435, 1436, 1437, 1438, 1439, 612, 608, 1448, - /* 290 */ 1449, 1451, 1452, 1453, 1454, 1456, 1459, 2, 58, 9, - /* 300 */ 43, 41, 1667, 47, 1551, 1596, 1847, 1922, 361, 1529, - /* 310 */ 1375, 339, 1729, 337, 336, 1400, 500, 181, 1954, 1619, - /* 320 */ 502, 1455, 58, 1373, 1213, 642, 641, 640, 1217, 639, - /* 330 */ 1219, 1220, 638, 1222, 635, 257, 1228, 632, 1230, 1231, - /* 340 */ 629, 626, 501, 562, 557, 258, 1450, 176, 399, 1972, - /* 350 */ 398, 16, 553, 1549, 1550, 1552, 1553, 617, 1381, 1106, - /* 360 */ 1173, 1105, 1922, 1922, 616, 569, 395, 513, 512, 511, - /* 370 */ 376, 43, 41, 1460, 477, 128, 507, 400, 176, 361, - /* 380 */ 506, 1375, 58, 12, 85, 505, 510, 397, 393, 1953, - /* 390 */ 1107, 504, 1455, 1988, 1373, 1175, 100, 1955, 620, 1957, - /* 400 */ 1958, 615, 1954, 610, 80, 707, 134, 1618, 141, 2012, - /* 410 */ 2041, 600, 546, 176, 355, 2037, 2109, 1450, 127, 546, - /* 420 */ 1457, 1458, 169, 2109, 1401, 178, 226, 1746, 573, 1381, - /* 430 */ 1617, 2115, 173, 1972, 1599, 1791, 2110, 567, 2115, 173, - /* 440 */ 1375, 617, 1751, 2110, 567, 167, 1922, 176, 616, 1431, - /* 450 */ 1440, 1922, 176, 1373, 44, 113, 1432, 587, 112, 111, - /* 460 */ 110, 109, 108, 107, 106, 105, 104, 1852, 1376, 352, - /* 470 */ 1374, 176, 1864, 1953, 1922, 227, 707, 1988, 1781, 1804, - /* 480 */ 160, 1955, 620, 1957, 1958, 615, 354, 610, 1381, 1352, - /* 490 */ 1353, 1457, 1458, 1379, 1380, 1802, 1430, 1433, 1434, 1435, - /* 500 */ 1436, 1437, 1438, 1439, 612, 608, 1448, 1449, 1451, 1452, - /* 510 */ 1453, 1454, 1456, 1459, 2, 509, 508, 678, 676, 113, - /* 520 */ 1431, 1440, 112, 111, 110, 109, 108, 107, 106, 105, - /* 530 */ 104, 176, 568, 2130, 364, 707, 513, 512, 511, 1376, - /* 540 */ 367, 1374, 155, 1804, 128, 507, 1465, 1909, 155, 506, - /* 550 */ 365, 1753, 1400, 1403, 505, 510, 1728, 1753, 1954, 1802, - /* 560 */ 504, 266, 267, 1400, 1379, 1380, 265, 1430, 1433, 1434, - /* 570 */ 1435, 1436, 1437, 1438, 1439, 612, 608, 1448, 1449, 1451, - /* 580 */ 1452, 1453, 1454, 1456, 1459, 2, 43, 41, 1598, 1972, - /* 590 */ 1616, 600, 185, 527, 361, 383, 1375, 581, 1376, 1727, - /* 600 */ 1374, 1615, 1922, 1399, 616, 404, 525, 1455, 523, 1373, - /* 610 */ 1742, 600, 122, 121, 120, 119, 118, 117, 116, 115, - /* 620 */ 114, 1936, 1751, 1379, 1380, 405, 11, 10, 77, 1953, - /* 630 */ 1614, 76, 1450, 1988, 1922, 1613, 100, 1955, 620, 1957, - /* 640 */ 1958, 615, 1751, 610, 1381, 1922, 91, 80, 170, 574, - /* 650 */ 2041, 1932, 1938, 133, 355, 2037, 2012, 43, 41, 600, - /* 660 */ 518, 654, 610, 652, 2114, 361, 1954, 1375, 1744, 44, - /* 670 */ 1747, 442, 1612, 414, 1922, 528, 2068, 587, 1455, 1922, - /* 680 */ 1373, 1402, 146, 145, 649, 648, 647, 143, 29, 224, - /* 690 */ 1751, 707, 1865, 1432, 36, 35, 182, 1972, 42, 40, - /* 700 */ 39, 38, 37, 1450, 521, 617, 1457, 1458, 1609, 515, - /* 710 */ 1922, 1608, 616, 2056, 223, 1381, 1922, 1607, 2114, 36, - /* 720 */ 35, 1498, 2109, 42, 40, 39, 38, 37, 1522, 189, - /* 730 */ 188, 1403, 1641, 1486, 2056, 1431, 1440, 1953, 2113, 2052, - /* 740 */ 12, 1988, 2110, 2111, 101, 1955, 620, 1957, 1958, 615, - /* 750 */ 64, 610, 1922, 63, 1376, 1922, 1374, 1584, 2041, 31, - /* 760 */ 2051, 1922, 707, 2038, 1606, 36, 35, 1605, 225, 42, - /* 770 */ 40, 39, 38, 37, 9, 1604, 1087, 1457, 1458, 1379, - /* 780 */ 1380, 702, 1430, 1433, 1434, 1435, 1436, 1437, 1438, 1439, - /* 790 */ 612, 608, 1448, 1449, 1451, 1452, 1453, 1454, 1456, 1459, - /* 800 */ 2, 318, 1384, 1398, 30, 1603, 1431, 1440, 1922, 710, - /* 810 */ 436, 1922, 155, 449, 1491, 1089, 448, 1092, 1093, 1922, - /* 820 */ 602, 1754, 2013, 282, 257, 1376, 1664, 1374, 82, 321, - /* 830 */ 1847, 420, 531, 450, 529, 9, 422, 7, 166, 1834, - /* 840 */ 604, 183, 2013, 6, 700, 696, 692, 688, 280, 1922, - /* 850 */ 1379, 1380, 1726, 1430, 1433, 1434, 1435, 1436, 1437, 1438, - /* 860 */ 1439, 612, 608, 1448, 1449, 1451, 1452, 1453, 1454, 1456, - /* 870 */ 1459, 2, 1804, 1403, 235, 36, 35, 334, 1400, 42, - /* 880 */ 40, 39, 38, 37, 98, 1847, 607, 273, 1803, 410, - /* 890 */ 645, 684, 683, 682, 681, 371, 187, 680, 679, 135, - /* 900 */ 674, 673, 672, 671, 670, 669, 668, 148, 664, 663, - /* 910 */ 662, 370, 369, 659, 658, 657, 656, 655, 646, 446, - /* 920 */ 596, 1795, 441, 440, 439, 438, 435, 434, 433, 432, - /* 930 */ 431, 427, 426, 425, 424, 335, 417, 416, 415, 1381, - /* 940 */ 412, 411, 332, 156, 1092, 1093, 36, 35, 295, 1387, - /* 950 */ 42, 40, 39, 38, 37, 1602, 1601, 260, 1954, 652, - /* 960 */ 666, 650, 293, 66, 1795, 289, 65, 651, 1781, 1521, - /* 970 */ 1795, 667, 1740, 1721, 1346, 48, 229, 3, 146, 145, - /* 980 */ 649, 648, 647, 143, 193, 455, 453, 36, 35, 1972, - /* 990 */ 423, 42, 40, 39, 38, 37, 502, 617, 1943, 1922, - /* 1000 */ 1922, 600, 1922, 652, 616, 1736, 36, 35, 2061, 1518, - /* 1010 */ 42, 40, 39, 38, 37, 428, 234, 233, 501, 1432, - /* 1020 */ 58, 600, 146, 145, 649, 648, 647, 143, 1476, 1953, - /* 1030 */ 154, 600, 1751, 1988, 1561, 429, 100, 1955, 620, 1957, - /* 1040 */ 1958, 615, 25, 610, 144, 476, 1945, 1518, 2129, 137, - /* 1050 */ 2041, 125, 1751, 407, 355, 2037, 83, 1738, 67, 99, - /* 1060 */ 600, 1954, 1751, 36, 35, 2075, 408, 42, 40, 39, - /* 1070 */ 38, 37, 36, 35, 1748, 1734, 42, 40, 39, 38, - /* 1080 */ 37, 600, 216, 218, 570, 214, 217, 600, 1654, 1383, - /* 1090 */ 220, 1751, 1972, 219, 1647, 139, 51, 74, 73, 403, - /* 1100 */ 617, 542, 180, 600, 60, 1922, 1954, 616, 75, 1645, - /* 1110 */ 514, 222, 1751, 1941, 221, 239, 516, 582, 1751, 45, - /* 1120 */ 317, 1593, 1594, 391, 1936, 389, 385, 381, 378, 375, - /* 1130 */ 263, 519, 1953, 600, 1751, 600, 1988, 1972, 1611, 100, - /* 1140 */ 1955, 620, 1957, 1958, 615, 617, 610, 270, 140, 597, - /* 1150 */ 1922, 2129, 616, 2041, 1932, 1938, 1548, 355, 2037, 1706, - /* 1160 */ 1541, 600, 600, 230, 1751, 610, 1751, 241, 2103, 176, - /* 1170 */ 142, 1322, 611, 50, 144, 598, 276, 1953, 545, 1954, - /* 1180 */ 60, 1988, 268, 252, 100, 1955, 620, 1957, 1958, 615, - /* 1190 */ 660, 610, 1751, 1751, 358, 357, 2129, 600, 2041, 45, - /* 1200 */ 592, 45, 355, 2037, 1389, 11, 10, 661, 644, 96, - /* 1210 */ 1972, 368, 1154, 2060, 2081, 1455, 624, 1382, 617, 93, - /* 1220 */ 211, 584, 272, 1922, 374, 616, 1206, 1591, 1751, 1152, - /* 1230 */ 209, 554, 1492, 246, 1954, 162, 1386, 142, 1973, 372, - /* 1240 */ 1450, 494, 490, 486, 482, 208, 144, 1856, 1635, 126, - /* 1250 */ 1953, 1441, 1381, 288, 1988, 1792, 142, 100, 1955, 620, - /* 1260 */ 1957, 1958, 615, 546, 610, 1972, 546, 2109, 1234, 2016, - /* 1270 */ 2109, 2041, 1135, 617, 579, 355, 2037, 2071, 1922, 251, - /* 1280 */ 616, 81, 2115, 173, 206, 2115, 173, 2110, 567, 1238, - /* 1290 */ 2110, 567, 254, 1, 373, 4, 382, 331, 1245, 606, - /* 1300 */ 377, 1243, 1339, 571, 283, 1953, 186, 1136, 147, 1988, - /* 1310 */ 409, 1403, 100, 1955, 620, 1957, 1958, 615, 1857, 610, - /* 1320 */ 413, 1590, 444, 418, 2014, 1398, 2041, 430, 1849, 437, - /* 1330 */ 355, 2037, 443, 451, 452, 445, 546, 190, 454, 456, - /* 1340 */ 2109, 1404, 457, 466, 1406, 470, 1954, 534, 469, 1405, - /* 1350 */ 196, 205, 199, 198, 204, 2115, 173, 473, 471, 1407, - /* 1360 */ 2110, 567, 1390, 472, 1385, 201, 474, 203, 78, 79, - /* 1370 */ 478, 1109, 207, 197, 495, 496, 1954, 1972, 499, 497, - /* 1380 */ 103, 1741, 1899, 213, 320, 617, 1898, 1393, 1395, 546, - /* 1390 */ 1922, 1737, 616, 2109, 533, 284, 535, 215, 149, 608, - /* 1400 */ 1448, 1449, 1451, 1452, 1453, 1454, 150, 1972, 2115, 173, - /* 1410 */ 228, 536, 1739, 2110, 567, 617, 540, 1953, 1735, 151, - /* 1420 */ 1922, 1988, 616, 152, 100, 1955, 620, 1957, 1958, 615, - /* 1430 */ 231, 610, 1954, 543, 550, 537, 603, 2072, 2041, 590, - /* 1440 */ 2082, 555, 355, 2037, 5, 552, 345, 1953, 2087, 558, - /* 1450 */ 237, 1988, 1954, 240, 101, 1955, 620, 1957, 1958, 615, - /* 1460 */ 2063, 610, 2086, 1972, 564, 548, 551, 549, 2041, 572, - /* 1470 */ 250, 617, 2040, 2037, 247, 245, 1922, 346, 616, 575, - /* 1480 */ 130, 248, 1518, 1972, 249, 163, 1402, 2057, 349, 583, - /* 1490 */ 259, 617, 1408, 1861, 285, 593, 1922, 588, 616, 286, - /* 1500 */ 589, 1870, 1869, 1953, 1868, 2108, 351, 1988, 88, 1752, - /* 1510 */ 101, 1955, 620, 1957, 1958, 615, 287, 610, 90, 594, - /* 1520 */ 1954, 253, 57, 618, 2041, 2022, 2132, 1988, 605, 2037, - /* 1530 */ 101, 1955, 620, 1957, 1958, 615, 1954, 610, 92, 622, - /* 1540 */ 279, 703, 1796, 1722, 2041, 704, 290, 706, 325, 2037, - /* 1550 */ 49, 1972, 314, 322, 323, 294, 1916, 1915, 71, 617, - /* 1560 */ 72, 292, 1914, 1913, 1922, 1910, 616, 1972, 379, 299, - /* 1570 */ 1367, 313, 303, 380, 1368, 617, 179, 1908, 384, 386, - /* 1580 */ 1922, 387, 616, 388, 1907, 390, 1906, 392, 1905, 394, - /* 1590 */ 1904, 1953, 1342, 396, 1341, 1988, 1881, 1954, 159, 1955, - /* 1600 */ 620, 1957, 1958, 615, 1880, 610, 401, 1953, 402, 1879, - /* 1610 */ 1878, 1988, 1842, 1300, 159, 1955, 620, 1957, 1958, 615, - /* 1620 */ 1841, 610, 1839, 136, 1838, 1837, 1840, 1836, 1972, 184, - /* 1630 */ 419, 1830, 421, 1829, 1828, 1827, 617, 1835, 1833, 547, - /* 1640 */ 2078, 1922, 1954, 616, 1832, 1831, 1826, 1825, 1824, 1823, - /* 1650 */ 1822, 1821, 1820, 1819, 1818, 1817, 2079, 1816, 1815, 138, - /* 1660 */ 1814, 1813, 1812, 1811, 1810, 1302, 1809, 1808, 1953, 1807, - /* 1670 */ 1806, 447, 1988, 1972, 1181, 305, 1955, 620, 1957, 1958, - /* 1680 */ 615, 617, 610, 1805, 1669, 1668, 1922, 1666, 616, 1630, - /* 1690 */ 191, 1095, 1094, 1629, 192, 1894, 1888, 1877, 194, 202, - /* 1700 */ 1876, 1859, 1730, 1954, 69, 1128, 1942, 1665, 1663, 1661, - /* 1710 */ 1659, 70, 168, 1953, 479, 195, 1657, 1988, 462, 563, - /* 1720 */ 160, 1955, 620, 1957, 1958, 615, 1954, 610, 464, 200, - /* 1730 */ 480, 481, 1644, 483, 1972, 1643, 484, 1626, 485, 350, - /* 1740 */ 487, 491, 617, 489, 1732, 1249, 59, 1922, 1731, 616, - /* 1750 */ 1250, 488, 493, 1172, 1171, 1170, 1169, 1972, 675, 492, - /* 1760 */ 1166, 677, 1164, 1165, 1163, 614, 1655, 340, 1648, 341, - /* 1770 */ 1922, 1646, 616, 2131, 1953, 212, 517, 342, 1988, 1625, - /* 1780 */ 1624, 312, 1955, 620, 1957, 1958, 615, 1954, 610, 520, - /* 1790 */ 1623, 522, 524, 102, 526, 1357, 1356, 1953, 530, 1893, - /* 1800 */ 1348, 1988, 1887, 53, 311, 1955, 620, 1957, 1958, 615, - /* 1810 */ 1875, 610, 1873, 2007, 538, 1874, 2114, 1954, 1972, 17, - /* 1820 */ 1359, 14, 56, 360, 244, 24, 617, 1563, 26, 236, - /* 1830 */ 243, 1922, 238, 616, 1547, 1540, 161, 242, 1943, 28, - /* 1840 */ 1954, 27, 18, 539, 84, 61, 1583, 1584, 1972, 19, - /* 1850 */ 15, 232, 1578, 362, 343, 1577, 617, 347, 1953, 153, - /* 1860 */ 1582, 1922, 1988, 616, 1581, 312, 1955, 620, 1957, 1958, - /* 1870 */ 615, 1972, 610, 348, 256, 55, 1872, 1515, 1514, 617, - /* 1880 */ 164, 544, 1871, 261, 1922, 1954, 616, 1858, 1953, 20, - /* 1890 */ 87, 264, 1988, 262, 1545, 312, 1955, 620, 1957, 1958, - /* 1900 */ 615, 1954, 610, 269, 86, 93, 89, 274, 21, 10, - /* 1910 */ 1391, 532, 1445, 1991, 609, 1988, 1972, 271, 307, 1955, - /* 1920 */ 620, 1957, 1958, 615, 617, 610, 1443, 34, 591, 1922, - /* 1930 */ 1442, 616, 1972, 165, 13, 22, 54, 177, 1423, 1415, - /* 1940 */ 617, 23, 625, 621, 1235, 1922, 623, 616, 363, 1467, - /* 1950 */ 1232, 628, 627, 630, 1954, 1229, 1953, 1477, 631, 633, - /* 1960 */ 1988, 1223, 634, 296, 1955, 620, 1957, 1958, 615, 1221, - /* 1970 */ 610, 619, 1953, 636, 637, 1212, 1988, 1227, 643, 297, - /* 1980 */ 1955, 620, 1957, 1958, 615, 1972, 610, 8, 1226, 1225, - /* 1990 */ 1466, 1224, 94, 617, 277, 95, 1244, 1240, 1922, 1954, - /* 2000 */ 616, 68, 1160, 1126, 653, 1159, 1158, 1157, 1156, 1155, - /* 2010 */ 1179, 1153, 1151, 1150, 1149, 665, 1147, 1146, 1145, 1144, - /* 2020 */ 1143, 1142, 1141, 1174, 278, 1953, 1176, 1138, 1137, 1988, - /* 2030 */ 1972, 1134, 298, 1955, 620, 1957, 1958, 615, 617, 610, - /* 2040 */ 1133, 1132, 1131, 1922, 1662, 616, 685, 686, 687, 1660, - /* 2050 */ 689, 690, 1954, 691, 1658, 693, 694, 695, 1656, 697, - /* 2060 */ 698, 699, 1642, 701, 1084, 1622, 709, 281, 1954, 705, - /* 2070 */ 1953, 1597, 1377, 291, 1988, 1597, 708, 304, 1955, 620, - /* 2080 */ 1957, 1958, 615, 1972, 610, 1597, 1597, 1597, 1597, 1597, - /* 2090 */ 1597, 617, 1597, 1597, 1597, 1597, 1922, 1597, 616, 1972, - /* 2100 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 617, 1597, 1597, - /* 2110 */ 1597, 1597, 1922, 1954, 616, 1597, 1597, 1597, 1597, 1597, - /* 2120 */ 1597, 1597, 1597, 1953, 1597, 1597, 1597, 1988, 1597, 1597, - /* 2130 */ 308, 1955, 620, 1957, 1958, 615, 1597, 610, 1597, 1953, - /* 2140 */ 1597, 1597, 1597, 1988, 1972, 1597, 300, 1955, 620, 1957, - /* 2150 */ 1958, 615, 617, 610, 1597, 1597, 1597, 1922, 1597, 616, - /* 2160 */ 1597, 1597, 1597, 1597, 1597, 1597, 1954, 1597, 1597, 1597, - /* 2170 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 2180 */ 1597, 1597, 1954, 1597, 1953, 1597, 1597, 1597, 1988, 1597, - /* 2190 */ 1597, 309, 1955, 620, 1957, 1958, 615, 1972, 610, 1597, - /* 2200 */ 1597, 1597, 1597, 1597, 1597, 617, 1597, 1597, 1597, 1597, - /* 2210 */ 1922, 1597, 616, 1972, 1597, 1597, 1597, 1597, 1597, 1597, - /* 2220 */ 1597, 617, 1597, 1597, 1597, 1597, 1922, 1954, 616, 1597, - /* 2230 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1953, 1597, 1597, - /* 2240 */ 1597, 1988, 1597, 1597, 301, 1955, 620, 1957, 1958, 615, - /* 2250 */ 1954, 610, 1597, 1953, 1597, 1597, 1597, 1988, 1972, 1597, - /* 2260 */ 310, 1955, 620, 1957, 1958, 615, 617, 610, 1597, 1597, - /* 2270 */ 1597, 1922, 1597, 616, 1597, 1597, 1597, 1597, 1597, 1597, - /* 2280 */ 1954, 1972, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 617, - /* 2290 */ 1597, 1597, 1597, 1597, 1922, 1597, 616, 1597, 1953, 1597, - /* 2300 */ 1597, 1597, 1988, 1597, 1597, 302, 1955, 620, 1957, 1958, - /* 2310 */ 615, 1972, 610, 1597, 1597, 1597, 1597, 1597, 1597, 617, - /* 2320 */ 1597, 1953, 1597, 1597, 1922, 1988, 616, 1597, 315, 1955, - /* 2330 */ 620, 1957, 1958, 615, 1597, 610, 1597, 1597, 1597, 1597, - /* 2340 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 2350 */ 1597, 1953, 1597, 1597, 1597, 1988, 1954, 1597, 316, 1955, - /* 2360 */ 620, 1957, 1958, 615, 1597, 610, 1597, 1597, 1597, 1597, - /* 2370 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1954, 1597, - /* 2380 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1972, 1597, 1597, - /* 2390 */ 1597, 1597, 1597, 1597, 1597, 617, 1597, 1597, 1597, 1597, - /* 2400 */ 1922, 1597, 616, 1597, 1597, 1597, 1597, 1597, 1597, 1972, - /* 2410 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 617, 1597, 1597, - /* 2420 */ 1597, 1597, 1922, 1597, 616, 1597, 1597, 1953, 1597, 1597, - /* 2430 */ 1597, 1988, 1597, 1954, 1966, 1955, 620, 1957, 1958, 615, - /* 2440 */ 1597, 610, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1953, - /* 2450 */ 1597, 1597, 1597, 1988, 1597, 1597, 1965, 1955, 620, 1957, - /* 2460 */ 1958, 615, 1597, 610, 1972, 1597, 1597, 1597, 1597, 1597, - /* 2470 */ 1597, 1597, 617, 1597, 1597, 1597, 1597, 1922, 1954, 616, - /* 2480 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 2490 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 2500 */ 1597, 1597, 1597, 1597, 1953, 1597, 1597, 1597, 1988, 1972, - /* 2510 */ 1597, 1964, 1955, 620, 1957, 1958, 615, 617, 610, 1597, - /* 2520 */ 1597, 1597, 1922, 1954, 616, 1597, 1597, 1597, 1597, 1597, - /* 2530 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1954, - /* 2540 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1953, - /* 2550 */ 1597, 1597, 1597, 1988, 1972, 1597, 327, 1955, 620, 1957, - /* 2560 */ 1958, 615, 617, 610, 1597, 1597, 1597, 1922, 1597, 616, - /* 2570 */ 1972, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 617, 1597, - /* 2580 */ 1597, 1597, 1597, 1922, 1954, 616, 1597, 1597, 1597, 1597, - /* 2590 */ 1597, 1597, 1597, 1597, 1953, 1597, 1597, 1597, 1988, 1597, - /* 2600 */ 1597, 328, 1955, 620, 1957, 1958, 615, 1954, 610, 1597, - /* 2610 */ 1953, 1597, 1597, 1597, 1988, 1972, 1597, 324, 1955, 620, - /* 2620 */ 1957, 1958, 615, 617, 610, 1597, 1597, 1597, 1922, 1597, - /* 2630 */ 616, 1597, 1597, 1597, 1597, 1597, 1597, 1954, 1972, 1597, - /* 2640 */ 1597, 1597, 1597, 1597, 1597, 1597, 617, 1597, 1597, 1597, - /* 2650 */ 1597, 1922, 1597, 616, 1597, 1953, 1597, 1597, 1597, 1988, - /* 2660 */ 1597, 1597, 329, 1955, 620, 1957, 1958, 615, 1972, 610, - /* 2670 */ 1597, 1597, 1597, 1597, 1597, 1597, 617, 1597, 618, 1597, - /* 2680 */ 1597, 1922, 1988, 616, 1597, 307, 1955, 620, 1957, 1958, - /* 2690 */ 615, 1597, 610, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 2700 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1953, 1597, - /* 2710 */ 1597, 1597, 1988, 1597, 1597, 306, 1955, 620, 1957, 1958, - /* 2720 */ 615, 1597, 610, + /* 0 */ 460, 367, 461, 1637, 1800, 1802, 401, 1958, 1745, 33, + /* 10 */ 275, 169, 43, 41, 1528, 1624, 1743, 567, 167, 1940, + /* 20 */ 362, 2113, 1378, 1944, 1794, 42, 40, 39, 38, 37, + /* 30 */ 1958, 601, 1599, 1458, 1940, 1376, 566, 173, 1976, 333, + /* 40 */ 1854, 2114, 568, 1801, 1802, 52, 618, 587, 547, 1936, + /* 50 */ 1942, 1926, 2113, 617, 11, 10, 1403, 585, 1453, 1926, + /* 60 */ 611, 1976, 1754, 16, 1936, 1942, 345, 2119, 173, 582, + /* 70 */ 1384, 1404, 2114, 568, 1926, 611, 617, 459, 1957, 600, + /* 80 */ 464, 1643, 1992, 43, 41, 160, 1959, 621, 1961, 1962, + /* 90 */ 616, 362, 611, 1378, 476, 12, 1863, 377, 600, 547, + /* 100 */ 601, 1957, 158, 2113, 1458, 1992, 1376, 1708, 100, 1959, + /* 110 */ 621, 1961, 1962, 616, 123, 611, 258, 708, 2119, 173, + /* 120 */ 170, 499, 2045, 2114, 568, 96, 356, 2041, 1405, 1453, + /* 130 */ 600, 1754, 1460, 1461, 16, 93, 601, 569, 2134, 547, + /* 140 */ 175, 1384, 579, 2113, 469, 478, 461, 1637, 2071, 1501, + /* 150 */ 123, 156, 1175, 58, 46, 85, 295, 504, 2119, 173, + /* 160 */ 588, 1434, 1443, 2114, 568, 468, 12, 1754, 464, 1643, + /* 170 */ 293, 66, 353, 131, 65, 1867, 6, 514, 513, 512, + /* 180 */ 1379, 1670, 1377, 1258, 1259, 128, 508, 1177, 708, 1945, + /* 190 */ 507, 354, 193, 456, 454, 506, 511, 1311, 1312, 155, + /* 200 */ 1940, 505, 443, 1460, 1461, 46, 1382, 1383, 1756, 1433, + /* 210 */ 1436, 1437, 1438, 1439, 1440, 1441, 1442, 613, 609, 1451, + /* 220 */ 1452, 1454, 1455, 1456, 1457, 1459, 1462, 2, 58, 62, + /* 230 */ 1936, 1942, 1434, 1443, 255, 2053, 578, 466, 124, 577, + /* 240 */ 1403, 611, 2113, 462, 266, 267, 514, 513, 512, 265, + /* 250 */ 1807, 1379, 225, 1377, 128, 508, 144, 566, 173, 507, + /* 260 */ 189, 188, 2114, 568, 506, 511, 1806, 99, 36, 35, + /* 270 */ 505, 257, 42, 40, 39, 38, 37, 1382, 1383, 375, + /* 280 */ 1433, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 613, 609, + /* 290 */ 1451, 1452, 1454, 1455, 1456, 1457, 1459, 1462, 2, 519, + /* 300 */ 9, 43, 41, 176, 176, 74, 73, 404, 51, 362, + /* 310 */ 180, 1378, 82, 321, 529, 58, 343, 587, 530, 1958, + /* 320 */ 58, 547, 1458, 1807, 1376, 2113, 1807, 167, 224, 317, + /* 330 */ 355, 1623, 392, 366, 390, 386, 382, 379, 376, 1805, + /* 340 */ 2119, 173, 1805, 522, 1944, 2114, 568, 1453, 516, 1855, + /* 350 */ 1976, 646, 16, 223, 80, 1940, 1564, 601, 618, 1384, + /* 360 */ 510, 509, 365, 1926, 596, 617, 1863, 155, 127, 97, + /* 370 */ 155, 178, 43, 41, 1463, 1926, 1757, 1749, 176, 1756, + /* 380 */ 362, 1521, 1378, 132, 12, 1936, 1942, 357, 1754, 64, + /* 390 */ 1957, 1746, 63, 1458, 1992, 1376, 611, 100, 1959, 621, + /* 400 */ 1961, 1962, 616, 157, 611, 1613, 708, 134, 586, 141, + /* 410 */ 2016, 2045, 562, 29, 1732, 356, 2041, 67, 1453, 36, + /* 420 */ 35, 1460, 1461, 42, 40, 39, 38, 37, 1622, 1621, + /* 430 */ 1384, 1215, 643, 642, 641, 1219, 640, 1221, 1222, 639, + /* 440 */ 1224, 636, 1404, 1230, 633, 1232, 1233, 630, 627, 1089, + /* 450 */ 1434, 1443, 396, 113, 1601, 44, 112, 111, 110, 109, + /* 460 */ 108, 107, 106, 105, 104, 176, 1108, 75, 1107, 1379, + /* 470 */ 176, 1377, 1926, 1926, 398, 394, 478, 708, 122, 121, + /* 480 */ 120, 119, 118, 117, 116, 115, 114, 1403, 1091, 58, + /* 490 */ 1094, 1095, 1460, 1461, 407, 1382, 1383, 1109, 1433, 1436, + /* 500 */ 1437, 1438, 1439, 1440, 1441, 1442, 613, 609, 1451, 1452, + /* 510 */ 1454, 1455, 1456, 1457, 1459, 1462, 2, 2060, 368, 655, + /* 520 */ 47, 1434, 1443, 1602, 36, 35, 155, 601, 42, 40, + /* 530 */ 39, 38, 37, 1730, 319, 1756, 1406, 9, 338, 7, + /* 540 */ 1379, 405, 1377, 2057, 113, 80, 1620, 112, 111, 110, + /* 550 */ 109, 108, 107, 106, 105, 104, 36, 35, 1754, 557, + /* 560 */ 42, 40, 39, 38, 37, 226, 1382, 1383, 1750, 1433, + /* 570 */ 1436, 1437, 1438, 1439, 1440, 1441, 1442, 613, 609, 1451, + /* 580 */ 1452, 1454, 1455, 1456, 1457, 1459, 1462, 2, 43, 41, + /* 590 */ 1926, 1644, 1976, 653, 2060, 655, 362, 1402, 1378, 339, + /* 600 */ 561, 337, 336, 9, 501, 1554, 1958, 601, 503, 1458, + /* 610 */ 91, 1376, 146, 145, 650, 649, 648, 143, 36, 35, + /* 620 */ 2056, 406, 42, 40, 39, 38, 37, 58, 1354, 1355, + /* 630 */ 502, 1384, 1747, 601, 1453, 579, 185, 1976, 1754, 176, + /* 640 */ 703, 560, 1807, 563, 558, 582, 1384, 415, 1739, 330, + /* 650 */ 1926, 1619, 617, 554, 1552, 1553, 1555, 1556, 1805, 43, + /* 660 */ 41, 679, 677, 1108, 1754, 1107, 131, 362, 588, 1378, + /* 670 */ 176, 44, 77, 326, 1618, 76, 601, 1957, 210, 235, + /* 680 */ 1458, 1992, 1376, 1868, 100, 1959, 621, 1961, 1962, 616, + /* 690 */ 369, 611, 601, 708, 1109, 1926, 170, 528, 2045, 39, + /* 700 */ 38, 37, 356, 2041, 1741, 1453, 429, 1754, 1460, 1461, + /* 710 */ 526, 400, 524, 399, 1487, 567, 1617, 1384, 1926, 2113, + /* 720 */ 1594, 2118, 601, 1754, 2072, 2113, 581, 171, 2053, 2054, + /* 730 */ 2117, 129, 2058, 2060, 566, 173, 430, 1434, 1443, 2114, + /* 740 */ 568, 2117, 12, 36, 35, 2114, 2116, 42, 40, 39, + /* 750 */ 38, 37, 603, 1754, 2017, 605, 1379, 2017, 1377, 2055, + /* 760 */ 1926, 31, 647, 1616, 708, 1798, 1615, 36, 35, 667, + /* 770 */ 1488, 42, 40, 39, 38, 37, 1612, 176, 227, 1460, + /* 780 */ 1461, 1784, 1382, 1383, 1737, 1433, 1436, 1437, 1438, 1439, + /* 790 */ 1440, 1441, 1442, 613, 609, 1451, 1452, 1454, 1455, 1456, + /* 800 */ 1457, 1459, 1462, 2, 318, 230, 1401, 1926, 1434, 1443, + /* 810 */ 1926, 133, 612, 437, 2016, 1593, 450, 36, 35, 449, + /* 820 */ 1926, 42, 40, 39, 38, 37, 1850, 1379, 1667, 1377, + /* 830 */ 1850, 1544, 1611, 503, 421, 1610, 451, 181, 668, 423, + /* 840 */ 1724, 183, 32, 360, 1482, 1483, 1484, 1485, 1486, 1490, + /* 850 */ 1491, 1492, 1493, 1382, 1383, 502, 1433, 1436, 1437, 1438, + /* 860 */ 1439, 1440, 1441, 1442, 613, 609, 1451, 1452, 1454, 1455, + /* 870 */ 1456, 1457, 1459, 1462, 2, 1850, 1926, 36, 35, 1926, + /* 880 */ 334, 42, 40, 39, 38, 37, 187, 651, 652, 542, + /* 890 */ 1798, 1798, 411, 685, 684, 683, 682, 372, 1609, 681, + /* 900 */ 680, 135, 675, 674, 673, 672, 671, 670, 669, 148, + /* 910 */ 665, 664, 663, 371, 370, 660, 659, 658, 657, 656, + /* 920 */ 289, 1525, 447, 1784, 1958, 442, 441, 440, 439, 436, + /* 930 */ 435, 434, 433, 432, 428, 427, 426, 425, 335, 418, + /* 940 */ 417, 416, 1926, 413, 412, 332, 36, 35, 2118, 1406, + /* 950 */ 42, 40, 39, 38, 37, 1976, 48, 601, 3, 579, + /* 960 */ 2118, 601, 645, 618, 2113, 1405, 1614, 601, 1926, 1837, + /* 970 */ 617, 477, 154, 1729, 1709, 1751, 1913, 374, 246, 601, + /* 980 */ 2117, 139, 25, 1731, 2114, 2115, 1958, 601, 1754, 570, + /* 990 */ 131, 1406, 1754, 543, 1532, 1957, 1608, 601, 1754, 1992, + /* 1000 */ 1403, 583, 100, 1959, 621, 1961, 1962, 616, 1403, 611, + /* 1010 */ 1754, 270, 359, 358, 2133, 601, 2045, 1976, 1754, 547, + /* 1020 */ 356, 2041, 1392, 2113, 384, 618, 1094, 1095, 1754, 598, + /* 1030 */ 1926, 2079, 617, 1458, 216, 1385, 1468, 214, 2119, 173, + /* 1040 */ 1926, 1587, 1403, 2114, 568, 574, 1754, 1607, 601, 233, + /* 1050 */ 1958, 172, 2053, 2054, 1489, 129, 2058, 1957, 1453, 2065, + /* 1060 */ 1521, 1992, 599, 1606, 100, 1959, 621, 1961, 1962, 616, + /* 1070 */ 1384, 611, 1605, 408, 579, 1657, 2133, 535, 2045, 1754, + /* 1080 */ 653, 1976, 356, 2041, 601, 137, 409, 125, 83, 618, + /* 1090 */ 653, 1926, 182, 2107, 1926, 2085, 617, 515, 276, 146, + /* 1100 */ 145, 650, 649, 648, 143, 131, 1958, 1926, 257, 146, + /* 1110 */ 145, 650, 649, 648, 143, 1754, 1926, 607, 1604, 547, + /* 1120 */ 424, 1957, 60, 2113, 218, 1992, 30, 217, 100, 1959, + /* 1130 */ 621, 1961, 1962, 616, 234, 611, 1494, 1976, 2119, 173, + /* 1140 */ 2133, 1435, 2045, 2114, 568, 618, 356, 2041, 220, 1435, + /* 1150 */ 1926, 219, 617, 222, 1650, 571, 221, 2064, 532, 239, + /* 1160 */ 531, 252, 1926, 1524, 45, 263, 174, 2053, 2054, 1958, + /* 1170 */ 129, 2058, 1648, 50, 1551, 608, 517, 1957, 546, 140, + /* 1180 */ 1393, 1992, 1388, 1435, 100, 1959, 621, 1961, 1962, 616, + /* 1190 */ 142, 611, 1596, 1597, 520, 1387, 2020, 1958, 2045, 1386, + /* 1200 */ 1976, 555, 356, 2041, 661, 144, 1396, 1398, 618, 11, + /* 1210 */ 10, 241, 1947, 1926, 1378, 617, 1324, 268, 609, 1451, + /* 1220 */ 1452, 1454, 1455, 1456, 1457, 1958, 1156, 1376, 1976, 1977, + /* 1230 */ 209, 593, 373, 60, 45, 1137, 618, 1859, 45, 625, + /* 1240 */ 1957, 1926, 272, 617, 1992, 1638, 1795, 100, 1959, 621, + /* 1250 */ 1961, 1962, 616, 1958, 611, 2075, 1976, 1208, 580, 2018, + /* 1260 */ 1949, 2045, 1384, 142, 618, 356, 2041, 575, 1957, 1926, + /* 1270 */ 1138, 617, 1992, 254, 251, 100, 1959, 621, 1961, 1962, + /* 1280 */ 616, 1958, 611, 1, 1976, 1495, 1444, 604, 4, 2045, + /* 1290 */ 288, 1236, 618, 356, 2041, 144, 1957, 1926, 383, 617, + /* 1300 */ 1992, 126, 142, 101, 1959, 621, 1961, 1962, 616, 708, + /* 1310 */ 611, 1341, 1976, 378, 283, 1240, 331, 2045, 1479, 662, + /* 1320 */ 618, 2044, 2041, 186, 1957, 1926, 410, 617, 1992, 1406, + /* 1330 */ 1860, 101, 1959, 621, 1961, 1962, 616, 414, 611, 445, + /* 1340 */ 1958, 1154, 1390, 1401, 419, 2045, 1389, 1247, 438, 606, + /* 1350 */ 2041, 431, 619, 1245, 147, 452, 1992, 1958, 444, 101, + /* 1360 */ 1959, 621, 1961, 1962, 616, 453, 611, 1852, 446, 190, + /* 1370 */ 455, 1976, 1379, 2045, 1377, 572, 1407, 325, 2041, 615, + /* 1380 */ 457, 1409, 458, 467, 1926, 470, 617, 196, 1976, 198, + /* 1390 */ 471, 1408, 472, 1410, 473, 479, 618, 475, 1382, 1383, + /* 1400 */ 201, 1926, 1111, 617, 203, 78, 79, 207, 496, 497, + /* 1410 */ 498, 1957, 103, 500, 320, 1992, 534, 228, 311, 1959, + /* 1420 */ 621, 1961, 1962, 616, 614, 611, 602, 2010, 1957, 537, + /* 1430 */ 1744, 284, 1992, 213, 536, 159, 1959, 621, 1961, 1962, + /* 1440 */ 616, 1740, 611, 1958, 215, 149, 150, 1742, 1738, 151, + /* 1450 */ 152, 1902, 541, 1901, 231, 544, 538, 5, 556, 2091, + /* 1460 */ 237, 591, 2090, 1958, 551, 2076, 553, 346, 2067, 559, + /* 1470 */ 565, 245, 163, 552, 1976, 2086, 548, 2082, 247, 248, + /* 1480 */ 550, 549, 618, 240, 347, 2136, 573, 1926, 249, 617, + /* 1490 */ 576, 1521, 130, 1405, 1976, 584, 2112, 253, 1411, 250, + /* 1500 */ 350, 1864, 618, 589, 2061, 259, 590, 1926, 285, 617, + /* 1510 */ 1873, 1872, 1871, 286, 1957, 88, 352, 594, 1992, 287, + /* 1520 */ 595, 101, 1959, 621, 1961, 1962, 616, 1755, 611, 1958, + /* 1530 */ 90, 57, 92, 2026, 1957, 2045, 623, 704, 1992, 1799, + /* 1540 */ 2042, 159, 1959, 621, 1961, 1962, 616, 1958, 611, 1725, + /* 1550 */ 290, 279, 705, 707, 294, 1920, 299, 313, 322, 49, + /* 1560 */ 1976, 303, 323, 1919, 71, 314, 292, 1918, 618, 1917, + /* 1570 */ 72, 1914, 380, 1926, 381, 617, 385, 1370, 1976, 1371, + /* 1580 */ 179, 1912, 387, 2083, 388, 389, 618, 1911, 391, 1910, + /* 1590 */ 1909, 1926, 393, 617, 395, 1908, 1344, 397, 1343, 1884, + /* 1600 */ 1957, 1883, 1958, 402, 1992, 403, 1882, 305, 1959, 621, + /* 1610 */ 1961, 1962, 616, 1881, 611, 1302, 1845, 1844, 1957, 1958, + /* 1620 */ 1842, 136, 1992, 1841, 1840, 160, 1959, 621, 1961, 1962, + /* 1630 */ 616, 1843, 611, 1976, 1839, 1838, 1836, 1835, 351, 1834, + /* 1640 */ 184, 618, 420, 1833, 422, 1832, 1926, 138, 617, 1831, + /* 1650 */ 1976, 564, 1830, 1829, 1828, 1827, 1826, 1825, 615, 1824, + /* 1660 */ 1823, 1822, 1821, 1926, 1820, 617, 1819, 1818, 1817, 1816, + /* 1670 */ 1815, 1814, 1813, 1957, 1812, 1811, 1958, 1992, 2135, 1810, + /* 1680 */ 312, 1959, 621, 1961, 1962, 616, 448, 611, 1809, 1808, + /* 1690 */ 1957, 1672, 1958, 1183, 1992, 1304, 191, 311, 1959, 621, + /* 1700 */ 1961, 1962, 616, 1671, 611, 1669, 2011, 1976, 192, 1633, + /* 1710 */ 1946, 1097, 361, 1096, 1632, 618, 69, 1897, 194, 1891, + /* 1720 */ 1926, 195, 617, 1976, 168, 463, 70, 1880, 363, 465, + /* 1730 */ 202, 618, 200, 1879, 1862, 1733, 1926, 1958, 617, 1668, + /* 1740 */ 1666, 480, 481, 482, 1664, 484, 485, 1957, 1130, 1662, + /* 1750 */ 486, 1992, 490, 1958, 312, 1959, 621, 1961, 1962, 616, + /* 1760 */ 488, 611, 1660, 1957, 492, 494, 489, 1992, 1976, 493, + /* 1770 */ 312, 1959, 621, 1961, 1962, 616, 618, 611, 1647, 1646, + /* 1780 */ 1629, 1926, 1735, 617, 1976, 1252, 1251, 59, 212, 1734, + /* 1790 */ 1174, 1173, 618, 1172, 1171, 676, 678, 1926, 1168, 617, + /* 1800 */ 1167, 1165, 1658, 1166, 1651, 340, 341, 518, 533, 1649, + /* 1810 */ 342, 521, 1992, 1958, 527, 307, 1959, 621, 1961, 1962, + /* 1820 */ 616, 1628, 611, 1627, 1957, 523, 525, 1626, 1992, 1359, + /* 1830 */ 102, 296, 1959, 621, 1961, 1962, 616, 1362, 611, 1896, + /* 1840 */ 1360, 1358, 24, 1350, 1976, 1890, 539, 1878, 53, 1876, + /* 1850 */ 1566, 2118, 618, 14, 244, 540, 17, 1926, 1947, 617, + /* 1860 */ 232, 56, 26, 236, 344, 545, 1958, 238, 1550, 161, + /* 1870 */ 242, 18, 27, 153, 243, 28, 61, 19, 15, 1581, + /* 1880 */ 1877, 1543, 84, 256, 1957, 1580, 1958, 348, 1992, 1585, + /* 1890 */ 1584, 297, 1959, 621, 1961, 1962, 616, 1976, 611, 1586, + /* 1900 */ 349, 55, 1875, 164, 1874, 618, 261, 1861, 54, 1587, + /* 1910 */ 1926, 1518, 617, 87, 1517, 20, 274, 1976, 262, 592, + /* 1920 */ 21, 1548, 10, 264, 269, 618, 1480, 86, 1394, 89, + /* 1930 */ 1926, 93, 617, 1995, 271, 1470, 1448, 1957, 8, 1446, + /* 1940 */ 1469, 1992, 1445, 165, 298, 1959, 621, 1961, 1962, 616, + /* 1950 */ 177, 611, 1958, 610, 1426, 34, 13, 1957, 22, 622, + /* 1960 */ 1418, 1992, 1237, 23, 304, 1959, 621, 1961, 1962, 616, + /* 1970 */ 624, 611, 1958, 364, 626, 628, 631, 1234, 629, 634, + /* 1980 */ 1231, 620, 1225, 1976, 632, 635, 637, 1223, 638, 1229, + /* 1990 */ 1228, 618, 1214, 94, 1227, 644, 1926, 1226, 617, 277, + /* 2000 */ 95, 1246, 1242, 1976, 68, 666, 1128, 1162, 654, 1161, + /* 2010 */ 1160, 618, 1159, 1158, 1157, 278, 1926, 1155, 617, 1153, + /* 2020 */ 1152, 1151, 1181, 1957, 1149, 1958, 1148, 1992, 1147, 1146, + /* 2030 */ 308, 1959, 621, 1961, 1962, 616, 1145, 611, 1144, 1143, + /* 2040 */ 1176, 1958, 1134, 1957, 1140, 1139, 1178, 1992, 1136, 1135, + /* 2050 */ 300, 1959, 621, 1961, 1962, 616, 1976, 611, 1133, 1665, + /* 2060 */ 686, 688, 1663, 687, 618, 690, 691, 692, 1661, 1926, + /* 2070 */ 694, 617, 1976, 696, 1659, 695, 698, 699, 700, 1645, + /* 2080 */ 618, 702, 1086, 1625, 706, 1926, 281, 617, 1380, 291, + /* 2090 */ 709, 710, 1600, 1600, 1958, 1600, 1957, 1600, 1600, 1600, + /* 2100 */ 1992, 1600, 1600, 309, 1959, 621, 1961, 1962, 616, 1600, + /* 2110 */ 611, 1600, 1957, 1600, 1600, 1600, 1992, 1600, 1958, 301, + /* 2120 */ 1959, 621, 1961, 1962, 616, 1976, 611, 1600, 1600, 1600, + /* 2130 */ 1600, 1600, 1600, 618, 1600, 1600, 1600, 1600, 1926, 1958, + /* 2140 */ 617, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1976, + /* 2150 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 618, 1600, 1600, + /* 2160 */ 1600, 1600, 1926, 1600, 617, 1957, 1600, 1600, 1600, 1992, + /* 2170 */ 1976, 1600, 310, 1959, 621, 1961, 1962, 616, 618, 611, + /* 2180 */ 1600, 1600, 1600, 1926, 1600, 617, 1600, 1600, 1600, 1957, + /* 2190 */ 1600, 1600, 1958, 1992, 1600, 1600, 302, 1959, 621, 1961, + /* 2200 */ 1962, 616, 1600, 611, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2210 */ 1957, 1600, 1958, 1600, 1992, 1600, 1600, 315, 1959, 621, + /* 2220 */ 1961, 1962, 616, 1976, 611, 1600, 1600, 1600, 1600, 1600, + /* 2230 */ 1600, 618, 1600, 1600, 1600, 1600, 1926, 1600, 617, 1600, + /* 2240 */ 1600, 1600, 1600, 1976, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2250 */ 1600, 618, 1600, 1600, 1600, 1600, 1926, 1600, 617, 1600, + /* 2260 */ 1600, 1600, 1600, 1957, 1600, 1600, 1600, 1992, 1600, 1600, + /* 2270 */ 316, 1959, 621, 1961, 1962, 616, 1600, 611, 1958, 1600, + /* 2280 */ 1600, 1600, 1600, 1957, 1600, 1600, 1600, 1992, 1600, 1600, + /* 2290 */ 1970, 1959, 621, 1961, 1962, 616, 1600, 611, 1958, 1600, + /* 2300 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1976, + /* 2310 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 618, 1600, 1600, + /* 2320 */ 1600, 1600, 1926, 1600, 617, 1600, 1600, 1600, 1600, 1976, + /* 2330 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 618, 1600, 1600, + /* 2340 */ 1600, 1600, 1926, 1600, 617, 1600, 1600, 1600, 1600, 1957, + /* 2350 */ 1600, 1958, 1600, 1992, 1600, 1600, 1969, 1959, 621, 1961, + /* 2360 */ 1962, 616, 1600, 611, 1600, 1600, 1600, 1958, 1600, 1957, + /* 2370 */ 1600, 1600, 1600, 1992, 1600, 1600, 1968, 1959, 621, 1961, + /* 2380 */ 1962, 616, 1976, 611, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2390 */ 618, 1600, 1600, 1600, 1600, 1926, 1600, 617, 1976, 1600, + /* 2400 */ 1600, 1600, 1600, 1600, 1600, 1600, 618, 1600, 1600, 1600, + /* 2410 */ 1600, 1926, 1600, 617, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2420 */ 1958, 1600, 1957, 1600, 1600, 1600, 1992, 1600, 1600, 327, + /* 2430 */ 1959, 621, 1961, 1962, 616, 1600, 611, 1600, 1957, 1600, + /* 2440 */ 1600, 1600, 1992, 1600, 1958, 328, 1959, 621, 1961, 1962, + /* 2450 */ 616, 1976, 611, 1600, 1600, 1600, 1600, 1600, 1600, 618, + /* 2460 */ 1600, 1600, 1600, 1600, 1926, 1958, 617, 1600, 1600, 1600, + /* 2470 */ 1600, 1600, 1600, 1600, 1600, 1976, 1600, 1600, 1600, 1600, + /* 2480 */ 1600, 1600, 1600, 618, 1600, 1600, 1600, 1600, 1926, 1600, + /* 2490 */ 617, 1957, 1600, 1600, 1600, 1992, 1976, 1600, 324, 1959, + /* 2500 */ 621, 1961, 1962, 616, 618, 611, 1600, 1600, 1600, 1926, + /* 2510 */ 1600, 617, 1600, 1600, 1600, 1957, 1600, 1600, 1958, 1992, + /* 2520 */ 1600, 1600, 329, 1959, 621, 1961, 1962, 616, 1600, 611, + /* 2530 */ 1600, 1600, 1600, 1600, 1600, 1600, 619, 1600, 711, 1600, + /* 2540 */ 1992, 1600, 1600, 307, 1959, 621, 1961, 1962, 616, 1976, + /* 2550 */ 611, 1600, 282, 1600, 1600, 1600, 1600, 618, 1600, 1600, + /* 2560 */ 1600, 1600, 1926, 211, 617, 1600, 1600, 166, 1600, 1600, + /* 2570 */ 1600, 1600, 1600, 701, 697, 693, 689, 280, 162, 1600, + /* 2580 */ 1600, 1600, 1600, 1600, 495, 491, 487, 483, 208, 1957, + /* 2590 */ 1600, 1600, 1600, 1992, 1600, 1600, 306, 1959, 621, 1961, + /* 2600 */ 1962, 616, 1600, 611, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2610 */ 1600, 1600, 1600, 98, 1600, 1600, 273, 1600, 1600, 1600, + /* 2620 */ 1600, 1600, 1600, 1600, 81, 1600, 1600, 206, 1600, 1600, + /* 2630 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2640 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 597, + /* 2650 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2660 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2670 */ 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, 1600, + /* 2680 */ 1600, 1600, 1600, 1600, 1600, 1600, 260, 1600, 1600, 1600, + /* 2690 */ 1600, 1600, 1600, 1600, 205, 199, 1600, 204, 1600, 1600, + /* 2700 */ 474, 1600, 1600, 1348, 1600, 229, 1600, 1600, 1600, 1600, + /* 2710 */ 1600, 1600, 1600, 1600, 1600, 1600, 197, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 329, 348, 331, 332, 429, 333, 333, 429, 433, 356, - /* 10 */ 358, 433, 12, 13, 14, 14, 15, 16, 365, 347, - /* 20 */ 20, 369, 22, 448, 449, 20, 354, 449, 453, 454, - /* 30 */ 325, 453, 454, 33, 20, 35, 364, 364, 329, 333, - /* 40 */ 331, 332, 8, 9, 358, 333, 12, 13, 14, 15, - /* 50 */ 16, 399, 400, 401, 391, 369, 356, 333, 58, 14, - /* 60 */ 20, 356, 410, 63, 367, 20, 356, 370, 371, 364, - /* 70 */ 70, 20, 20, 363, 369, 340, 371, 377, 378, 373, - /* 80 */ 345, 356, 372, 12, 13, 399, 400, 401, 364, 364, - /* 90 */ 62, 20, 380, 22, 382, 95, 410, 63, 425, 426, - /* 100 */ 427, 396, 429, 430, 33, 400, 35, 3, 403, 404, - /* 110 */ 405, 406, 407, 408, 333, 410, 20, 117, 22, 62, - /* 120 */ 415, 330, 417, 20, 333, 334, 421, 422, 347, 58, - /* 130 */ 405, 35, 132, 133, 63, 354, 418, 419, 104, 429, - /* 140 */ 435, 70, 324, 433, 326, 364, 95, 51, 443, 425, - /* 150 */ 426, 427, 333, 429, 430, 325, 325, 433, 448, 449, - /* 160 */ 333, 161, 162, 453, 454, 333, 95, 12, 13, 14, - /* 170 */ 15, 16, 448, 449, 347, 161, 162, 453, 454, 337, - /* 180 */ 180, 333, 182, 364, 132, 133, 330, 356, 117, 333, - /* 190 */ 334, 364, 20, 351, 160, 364, 364, 20, 95, 369, - /* 200 */ 369, 359, 371, 132, 133, 205, 206, 4, 208, 209, + /* 0 */ 329, 367, 331, 332, 370, 371, 387, 325, 358, 418, + /* 10 */ 419, 355, 12, 13, 14, 325, 357, 429, 356, 369, + /* 20 */ 20, 433, 22, 358, 368, 12, 13, 14, 15, 16, + /* 30 */ 325, 333, 322, 33, 369, 35, 448, 449, 356, 377, + /* 40 */ 378, 453, 454, 370, 371, 347, 364, 333, 429, 399, + /* 50 */ 400, 369, 433, 371, 1, 2, 20, 387, 58, 369, + /* 60 */ 410, 356, 364, 63, 399, 400, 401, 448, 449, 364, + /* 70 */ 70, 20, 453, 454, 369, 410, 371, 330, 396, 20, + /* 80 */ 333, 334, 400, 12, 13, 403, 404, 405, 406, 407, + /* 90 */ 408, 20, 410, 22, 380, 95, 382, 387, 20, 429, + /* 100 */ 333, 396, 340, 433, 33, 400, 35, 345, 403, 404, + /* 110 */ 405, 406, 407, 408, 347, 410, 58, 117, 448, 449, + /* 120 */ 415, 354, 417, 453, 454, 95, 421, 422, 20, 58, + /* 130 */ 20, 364, 132, 133, 63, 105, 333, 455, 456, 429, + /* 140 */ 435, 70, 333, 433, 329, 62, 331, 332, 443, 96, + /* 150 */ 347, 18, 35, 95, 95, 97, 23, 354, 448, 449, + /* 160 */ 371, 161, 162, 453, 454, 330, 95, 364, 333, 334, + /* 170 */ 37, 38, 383, 364, 41, 386, 39, 65, 66, 67, + /* 180 */ 180, 0, 182, 132, 133, 73, 74, 70, 117, 358, + /* 190 */ 78, 348, 59, 60, 61, 83, 84, 161, 162, 356, + /* 200 */ 369, 89, 79, 132, 133, 95, 206, 207, 365, 209, /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 220 */ 220, 221, 222, 223, 224, 225, 226, 396, 380, 95, - /* 230 */ 382, 400, 161, 162, 403, 404, 405, 406, 407, 408, - /* 240 */ 409, 410, 411, 412, 425, 426, 427, 20, 429, 430, - /* 250 */ 37, 180, 402, 182, 370, 371, 424, 425, 426, 427, - /* 260 */ 166, 429, 430, 325, 95, 231, 232, 233, 234, 235, - /* 270 */ 236, 237, 238, 239, 240, 241, 205, 206, 428, 208, + /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 95, 4, + /* 230 */ 399, 400, 161, 162, 425, 426, 427, 14, 429, 430, + /* 240 */ 20, 410, 433, 20, 126, 127, 65, 66, 67, 131, + /* 250 */ 356, 180, 127, 182, 73, 74, 44, 448, 449, 78, + /* 260 */ 137, 138, 453, 454, 83, 84, 372, 134, 8, 9, + /* 270 */ 89, 163, 12, 13, 14, 15, 16, 206, 207, 387, /* 280 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - /* 290 */ 219, 220, 221, 222, 223, 224, 225, 226, 95, 228, - /* 300 */ 12, 13, 0, 95, 205, 322, 364, 369, 20, 14, - /* 310 */ 22, 98, 0, 100, 101, 20, 103, 375, 325, 325, - /* 320 */ 107, 33, 95, 35, 108, 109, 110, 111, 112, 113, - /* 330 */ 114, 115, 116, 117, 118, 163, 120, 121, 122, 123, - /* 340 */ 124, 125, 129, 249, 250, 58, 58, 244, 179, 356, - /* 350 */ 181, 63, 253, 254, 255, 256, 257, 364, 70, 20, - /* 360 */ 35, 22, 369, 369, 371, 261, 175, 65, 66, 67, - /* 370 */ 387, 12, 13, 14, 62, 73, 74, 387, 244, 20, - /* 380 */ 78, 22, 95, 95, 97, 83, 84, 196, 197, 396, - /* 390 */ 51, 89, 33, 400, 35, 70, 403, 404, 405, 406, - /* 400 */ 407, 408, 325, 410, 339, 117, 413, 325, 415, 416, - /* 410 */ 417, 333, 429, 244, 421, 422, 433, 58, 353, 429, - /* 420 */ 132, 133, 355, 433, 20, 347, 126, 362, 44, 70, - /* 430 */ 325, 448, 449, 356, 0, 368, 453, 454, 448, 449, - /* 440 */ 22, 364, 364, 453, 454, 356, 369, 244, 371, 161, - /* 450 */ 162, 369, 244, 35, 95, 21, 161, 371, 24, 25, - /* 460 */ 26, 27, 28, 29, 30, 31, 32, 378, 180, 383, - /* 470 */ 182, 244, 386, 396, 369, 349, 117, 400, 352, 356, - /* 480 */ 403, 404, 405, 406, 407, 408, 363, 410, 70, 189, - /* 490 */ 190, 132, 133, 205, 206, 372, 208, 209, 210, 211, - /* 500 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 510 */ 222, 223, 224, 225, 226, 342, 343, 342, 343, 21, - /* 520 */ 161, 162, 24, 25, 26, 27, 28, 29, 30, 31, - /* 530 */ 32, 244, 455, 456, 348, 117, 65, 66, 67, 180, - /* 540 */ 348, 182, 356, 356, 73, 74, 14, 0, 356, 78, - /* 550 */ 363, 365, 20, 20, 83, 84, 0, 365, 325, 372, - /* 560 */ 89, 126, 127, 20, 205, 206, 131, 208, 209, 210, - /* 570 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - /* 580 */ 221, 222, 223, 224, 225, 226, 12, 13, 0, 356, - /* 590 */ 325, 333, 58, 21, 20, 48, 22, 364, 180, 0, - /* 600 */ 182, 325, 369, 20, 371, 347, 34, 33, 36, 35, - /* 610 */ 358, 333, 24, 25, 26, 27, 28, 29, 30, 31, - /* 620 */ 32, 369, 364, 205, 206, 347, 1, 2, 94, 396, - /* 630 */ 325, 97, 58, 400, 369, 325, 403, 404, 405, 406, - /* 640 */ 407, 408, 364, 410, 70, 369, 337, 339, 415, 265, - /* 650 */ 417, 399, 400, 413, 421, 422, 416, 12, 13, 333, - /* 660 */ 4, 62, 410, 107, 3, 20, 325, 22, 359, 95, - /* 670 */ 362, 79, 325, 347, 369, 19, 443, 371, 33, 369, - /* 680 */ 35, 20, 126, 127, 128, 129, 130, 131, 2, 33, - /* 690 */ 364, 117, 386, 161, 8, 9, 163, 356, 12, 13, - /* 700 */ 14, 15, 16, 58, 48, 364, 132, 133, 325, 53, - /* 710 */ 369, 325, 371, 402, 58, 70, 369, 325, 429, 8, - /* 720 */ 9, 96, 433, 12, 13, 14, 15, 16, 4, 137, - /* 730 */ 138, 20, 0, 160, 402, 161, 162, 396, 449, 428, - /* 740 */ 95, 400, 453, 454, 403, 404, 405, 406, 407, 408, - /* 750 */ 94, 410, 369, 97, 180, 369, 182, 96, 417, 2, - /* 760 */ 428, 369, 117, 422, 325, 8, 9, 325, 127, 12, - /* 770 */ 13, 14, 15, 16, 228, 325, 4, 132, 133, 205, - /* 780 */ 206, 49, 208, 209, 210, 211, 212, 213, 214, 215, - /* 790 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 800 */ 226, 18, 35, 20, 231, 325, 161, 162, 369, 19, - /* 810 */ 27, 369, 356, 30, 241, 43, 33, 45, 46, 369, - /* 820 */ 414, 365, 416, 33, 163, 180, 0, 182, 187, 188, - /* 830 */ 364, 48, 191, 50, 193, 228, 53, 230, 48, 0, - /* 840 */ 414, 375, 416, 39, 54, 55, 56, 57, 58, 369, - /* 850 */ 205, 206, 0, 208, 209, 210, 211, 212, 213, 214, - /* 860 */ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - /* 870 */ 225, 226, 356, 20, 163, 8, 9, 94, 20, 12, - /* 880 */ 13, 14, 15, 16, 94, 364, 63, 97, 372, 106, - /* 890 */ 106, 65, 66, 67, 68, 69, 375, 71, 72, 73, - /* 900 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - /* 910 */ 84, 85, 86, 87, 88, 89, 90, 91, 366, 136, - /* 920 */ 130, 369, 139, 140, 141, 142, 143, 144, 145, 146, - /* 930 */ 147, 148, 149, 150, 151, 152, 153, 154, 155, 70, - /* 940 */ 157, 158, 159, 18, 45, 46, 8, 9, 23, 182, - /* 950 */ 12, 13, 14, 15, 16, 325, 325, 167, 325, 107, - /* 960 */ 70, 366, 37, 38, 369, 349, 41, 366, 352, 245, - /* 970 */ 369, 344, 357, 346, 184, 42, 186, 44, 126, 127, - /* 980 */ 128, 129, 130, 131, 59, 60, 61, 8, 9, 356, - /* 990 */ 151, 12, 13, 14, 15, 16, 107, 364, 47, 369, - /* 1000 */ 369, 333, 369, 107, 371, 357, 8, 9, 242, 243, - /* 1010 */ 12, 13, 14, 15, 16, 347, 163, 58, 129, 161, - /* 1020 */ 95, 333, 126, 127, 128, 129, 130, 131, 205, 396, - /* 1030 */ 163, 333, 364, 400, 96, 347, 403, 404, 405, 406, - /* 1040 */ 407, 408, 44, 410, 44, 347, 95, 243, 415, 42, - /* 1050 */ 417, 44, 364, 22, 421, 422, 97, 357, 106, 134, - /* 1060 */ 333, 325, 364, 8, 9, 432, 35, 12, 13, 14, - /* 1070 */ 15, 16, 8, 9, 347, 357, 12, 13, 14, 15, - /* 1080 */ 16, 333, 99, 99, 44, 102, 102, 333, 0, 35, - /* 1090 */ 99, 364, 356, 102, 0, 347, 96, 172, 173, 174, - /* 1100 */ 364, 347, 177, 333, 44, 369, 325, 371, 156, 0, - /* 1110 */ 22, 99, 364, 358, 102, 44, 22, 347, 364, 44, - /* 1120 */ 195, 132, 133, 198, 369, 200, 201, 202, 203, 204, - /* 1130 */ 44, 22, 396, 333, 364, 333, 400, 356, 326, 403, - /* 1140 */ 404, 405, 406, 407, 408, 364, 410, 347, 44, 347, - /* 1150 */ 369, 415, 371, 417, 399, 400, 96, 421, 422, 345, - /* 1160 */ 96, 333, 333, 357, 364, 410, 364, 96, 432, 244, - /* 1170 */ 44, 96, 357, 163, 44, 347, 347, 396, 168, 325, - /* 1180 */ 44, 400, 96, 457, 403, 404, 405, 406, 407, 408, - /* 1190 */ 13, 410, 364, 364, 12, 13, 415, 333, 417, 44, - /* 1200 */ 96, 44, 421, 422, 22, 1, 2, 13, 357, 95, - /* 1210 */ 356, 347, 35, 432, 379, 33, 44, 35, 364, 105, - /* 1220 */ 33, 387, 96, 369, 387, 371, 96, 172, 364, 35, - /* 1230 */ 335, 446, 96, 440, 325, 48, 182, 44, 356, 335, - /* 1240 */ 58, 54, 55, 56, 57, 58, 44, 379, 332, 44, - /* 1250 */ 396, 96, 70, 96, 400, 368, 44, 403, 404, 405, - /* 1260 */ 406, 407, 408, 429, 410, 356, 429, 433, 96, 415, - /* 1270 */ 433, 417, 35, 364, 431, 421, 422, 379, 369, 423, - /* 1280 */ 371, 94, 448, 449, 97, 448, 449, 453, 454, 96, - /* 1290 */ 453, 454, 450, 434, 387, 246, 48, 397, 96, 117, - /* 1300 */ 398, 96, 178, 263, 389, 396, 42, 70, 96, 400, - /* 1310 */ 376, 20, 403, 404, 405, 406, 407, 408, 379, 410, - /* 1320 */ 376, 266, 160, 374, 415, 20, 417, 333, 333, 376, - /* 1330 */ 421, 422, 374, 93, 341, 374, 429, 333, 333, 333, - /* 1340 */ 433, 20, 327, 327, 20, 371, 325, 387, 393, 20, - /* 1350 */ 339, 164, 165, 339, 167, 448, 449, 170, 334, 20, - /* 1360 */ 453, 454, 180, 388, 182, 339, 334, 339, 339, 339, - /* 1370 */ 333, 52, 339, 186, 336, 336, 325, 356, 356, 327, - /* 1380 */ 333, 356, 369, 356, 327, 364, 369, 205, 206, 429, - /* 1390 */ 369, 356, 371, 433, 194, 393, 395, 356, 356, 217, - /* 1400 */ 218, 219, 220, 221, 222, 223, 356, 356, 448, 449, - /* 1410 */ 337, 185, 356, 453, 454, 364, 371, 396, 356, 356, - /* 1420 */ 369, 400, 371, 356, 403, 404, 405, 406, 407, 408, - /* 1430 */ 337, 410, 325, 333, 369, 392, 415, 379, 417, 251, - /* 1440 */ 379, 252, 421, 422, 258, 369, 369, 396, 439, 369, - /* 1450 */ 384, 400, 325, 384, 403, 404, 405, 406, 407, 408, - /* 1460 */ 442, 410, 439, 356, 171, 247, 260, 259, 417, 262, - /* 1470 */ 398, 364, 421, 422, 438, 441, 369, 267, 371, 264, - /* 1480 */ 364, 437, 243, 356, 436, 439, 20, 402, 334, 333, - /* 1490 */ 337, 364, 20, 382, 384, 165, 369, 369, 371, 384, - /* 1500 */ 369, 369, 369, 396, 369, 452, 369, 400, 337, 364, - /* 1510 */ 403, 404, 405, 406, 407, 408, 352, 410, 337, 381, - /* 1520 */ 325, 451, 95, 396, 417, 420, 458, 400, 421, 422, - /* 1530 */ 403, 404, 405, 406, 407, 408, 325, 410, 95, 360, - /* 1540 */ 337, 36, 369, 346, 417, 328, 333, 327, 421, 422, - /* 1550 */ 390, 356, 394, 385, 385, 323, 0, 0, 187, 364, - /* 1560 */ 42, 338, 0, 0, 369, 0, 371, 356, 35, 350, - /* 1570 */ 35, 350, 350, 199, 35, 364, 35, 0, 199, 35, - /* 1580 */ 369, 35, 371, 199, 0, 199, 0, 35, 0, 22, - /* 1590 */ 0, 396, 182, 35, 180, 400, 0, 325, 403, 404, - /* 1600 */ 405, 406, 407, 408, 0, 410, 176, 396, 175, 0, - /* 1610 */ 0, 400, 0, 47, 403, 404, 405, 406, 407, 408, - /* 1620 */ 0, 410, 0, 42, 0, 0, 0, 0, 356, 151, - /* 1630 */ 35, 0, 151, 0, 0, 0, 364, 0, 0, 444, - /* 1640 */ 445, 369, 325, 371, 0, 0, 0, 0, 0, 0, - /* 1650 */ 0, 0, 0, 0, 0, 0, 445, 0, 0, 42, - /* 1660 */ 0, 0, 0, 0, 0, 22, 0, 0, 396, 0, - /* 1670 */ 0, 135, 400, 356, 35, 403, 404, 405, 406, 407, - /* 1680 */ 408, 364, 410, 0, 0, 0, 369, 0, 371, 0, - /* 1690 */ 58, 14, 14, 0, 58, 0, 0, 0, 42, 171, - /* 1700 */ 0, 0, 0, 325, 39, 64, 47, 0, 0, 0, - /* 1710 */ 0, 39, 44, 396, 35, 40, 0, 400, 47, 447, - /* 1720 */ 403, 404, 405, 406, 407, 408, 325, 410, 47, 39, - /* 1730 */ 48, 39, 0, 35, 356, 0, 48, 0, 39, 361, - /* 1740 */ 35, 35, 364, 39, 0, 22, 104, 369, 0, 371, - /* 1750 */ 35, 48, 39, 35, 35, 35, 35, 356, 44, 48, - /* 1760 */ 35, 44, 22, 35, 35, 364, 0, 22, 0, 22, - /* 1770 */ 369, 0, 371, 456, 396, 102, 50, 22, 400, 0, - /* 1780 */ 0, 403, 404, 405, 406, 407, 408, 325, 410, 35, - /* 1790 */ 0, 35, 35, 20, 22, 35, 35, 396, 192, 0, - /* 1800 */ 35, 400, 0, 163, 403, 404, 405, 406, 407, 408, - /* 1810 */ 0, 410, 0, 412, 22, 0, 3, 325, 356, 44, - /* 1820 */ 96, 248, 44, 361, 47, 95, 364, 96, 95, 95, - /* 1830 */ 44, 369, 96, 371, 96, 96, 95, 95, 47, 44, - /* 1840 */ 325, 95, 248, 163, 95, 3, 96, 96, 356, 44, - /* 1850 */ 248, 165, 35, 361, 163, 35, 364, 35, 396, 183, - /* 1860 */ 35, 369, 400, 371, 35, 403, 404, 405, 406, 407, - /* 1870 */ 408, 356, 410, 35, 47, 44, 0, 96, 96, 364, - /* 1880 */ 47, 169, 0, 47, 369, 325, 371, 0, 396, 95, - /* 1890 */ 39, 95, 400, 96, 96, 403, 404, 405, 406, 407, - /* 1900 */ 408, 325, 410, 95, 95, 105, 95, 47, 44, 2, - /* 1910 */ 22, 396, 96, 95, 95, 400, 356, 164, 403, 404, - /* 1920 */ 405, 406, 407, 408, 364, 410, 96, 95, 166, 369, - /* 1930 */ 96, 371, 356, 47, 95, 95, 242, 47, 22, 96, - /* 1940 */ 364, 95, 95, 106, 96, 369, 35, 371, 35, 227, - /* 1950 */ 96, 95, 35, 35, 325, 96, 396, 205, 95, 35, - /* 1960 */ 400, 96, 95, 403, 404, 405, 406, 407, 408, 96, - /* 1970 */ 410, 207, 396, 35, 95, 22, 400, 119, 107, 403, - /* 1980 */ 404, 405, 406, 407, 408, 356, 410, 229, 119, 119, - /* 1990 */ 227, 119, 95, 364, 44, 95, 35, 22, 369, 325, - /* 2000 */ 371, 95, 35, 64, 63, 35, 35, 35, 35, 35, - /* 2010 */ 70, 35, 35, 35, 35, 92, 35, 35, 35, 22, - /* 2020 */ 35, 35, 35, 35, 44, 396, 70, 35, 35, 400, - /* 2030 */ 356, 35, 403, 404, 405, 406, 407, 408, 364, 410, - /* 2040 */ 35, 22, 35, 369, 0, 371, 35, 48, 39, 0, - /* 2050 */ 35, 48, 325, 39, 0, 35, 48, 39, 0, 35, - /* 2060 */ 48, 39, 0, 35, 35, 0, 20, 22, 325, 21, - /* 2070 */ 396, 459, 22, 22, 400, 459, 21, 403, 404, 405, - /* 2080 */ 406, 407, 408, 356, 410, 459, 459, 459, 459, 459, - /* 2090 */ 459, 364, 459, 459, 459, 459, 369, 459, 371, 356, - /* 2100 */ 459, 459, 459, 459, 459, 459, 459, 364, 459, 459, - /* 2110 */ 459, 459, 369, 325, 371, 459, 459, 459, 459, 459, - /* 2120 */ 459, 459, 459, 396, 459, 459, 459, 400, 459, 459, - /* 2130 */ 403, 404, 405, 406, 407, 408, 459, 410, 459, 396, - /* 2140 */ 459, 459, 459, 400, 356, 459, 403, 404, 405, 406, - /* 2150 */ 407, 408, 364, 410, 459, 459, 459, 369, 459, 371, - /* 2160 */ 459, 459, 459, 459, 459, 459, 325, 459, 459, 459, - /* 2170 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2180 */ 459, 459, 325, 459, 396, 459, 459, 459, 400, 459, - /* 2190 */ 459, 403, 404, 405, 406, 407, 408, 356, 410, 459, - /* 2200 */ 459, 459, 459, 459, 459, 364, 459, 459, 459, 459, - /* 2210 */ 369, 459, 371, 356, 459, 459, 459, 459, 459, 459, - /* 2220 */ 459, 364, 459, 459, 459, 459, 369, 325, 371, 459, - /* 2230 */ 459, 459, 459, 459, 459, 459, 459, 396, 459, 459, - /* 2240 */ 459, 400, 459, 459, 403, 404, 405, 406, 407, 408, - /* 2250 */ 325, 410, 459, 396, 459, 459, 459, 400, 356, 459, - /* 2260 */ 403, 404, 405, 406, 407, 408, 364, 410, 459, 459, - /* 2270 */ 459, 369, 459, 371, 459, 459, 459, 459, 459, 459, - /* 2280 */ 325, 356, 459, 459, 459, 459, 459, 459, 459, 364, - /* 2290 */ 459, 459, 459, 459, 369, 459, 371, 459, 396, 459, - /* 2300 */ 459, 459, 400, 459, 459, 403, 404, 405, 406, 407, - /* 2310 */ 408, 356, 410, 459, 459, 459, 459, 459, 459, 364, - /* 2320 */ 459, 396, 459, 459, 369, 400, 371, 459, 403, 404, - /* 2330 */ 405, 406, 407, 408, 459, 410, 459, 459, 459, 459, - /* 2340 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2350 */ 459, 396, 459, 459, 459, 400, 325, 459, 403, 404, - /* 2360 */ 405, 406, 407, 408, 459, 410, 459, 459, 459, 459, - /* 2370 */ 459, 459, 459, 459, 459, 459, 459, 459, 325, 459, - /* 2380 */ 459, 459, 459, 459, 459, 459, 459, 356, 459, 459, - /* 2390 */ 459, 459, 459, 459, 459, 364, 459, 459, 459, 459, - /* 2400 */ 369, 459, 371, 459, 459, 459, 459, 459, 459, 356, - /* 2410 */ 459, 459, 459, 459, 459, 459, 459, 364, 459, 459, - /* 2420 */ 459, 459, 369, 459, 371, 459, 459, 396, 459, 459, - /* 2430 */ 459, 400, 459, 325, 403, 404, 405, 406, 407, 408, - /* 2440 */ 459, 410, 459, 459, 459, 459, 459, 459, 459, 396, - /* 2450 */ 459, 459, 459, 400, 459, 459, 403, 404, 405, 406, - /* 2460 */ 407, 408, 459, 410, 356, 459, 459, 459, 459, 459, - /* 2470 */ 459, 459, 364, 459, 459, 459, 459, 369, 325, 371, - /* 2480 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2490 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2500 */ 459, 459, 459, 459, 396, 459, 459, 459, 400, 356, - /* 2510 */ 459, 403, 404, 405, 406, 407, 408, 364, 410, 459, - /* 2520 */ 459, 459, 369, 325, 371, 459, 459, 459, 459, 459, - /* 2530 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 325, - /* 2540 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 396, - /* 2550 */ 459, 459, 459, 400, 356, 459, 403, 404, 405, 406, - /* 2560 */ 407, 408, 364, 410, 459, 459, 459, 369, 459, 371, - /* 2570 */ 356, 459, 459, 459, 459, 459, 459, 459, 364, 459, - /* 2580 */ 459, 459, 459, 369, 325, 371, 459, 459, 459, 459, - /* 2590 */ 459, 459, 459, 459, 396, 459, 459, 459, 400, 459, - /* 2600 */ 459, 403, 404, 405, 406, 407, 408, 325, 410, 459, - /* 2610 */ 396, 459, 459, 459, 400, 356, 459, 403, 404, 405, - /* 2620 */ 406, 407, 408, 364, 410, 459, 459, 459, 369, 459, - /* 2630 */ 371, 459, 459, 459, 459, 459, 459, 325, 356, 459, - /* 2640 */ 459, 459, 459, 459, 459, 459, 364, 459, 459, 459, - /* 2650 */ 459, 369, 459, 371, 459, 396, 459, 459, 459, 400, - /* 2660 */ 459, 459, 403, 404, 405, 406, 407, 408, 356, 410, - /* 2670 */ 459, 459, 459, 459, 459, 459, 364, 459, 396, 459, - /* 2680 */ 459, 369, 400, 371, 459, 403, 404, 405, 406, 407, - /* 2690 */ 408, 459, 410, 459, 459, 459, 459, 459, 459, 459, - /* 2700 */ 459, 459, 459, 459, 459, 459, 459, 459, 396, 459, - /* 2710 */ 459, 459, 400, 459, 459, 403, 404, 405, 406, 407, - /* 2720 */ 408, 459, 410, + /* 290 */ 219, 220, 221, 222, 223, 224, 225, 226, 227, 4, + /* 300 */ 229, 12, 13, 245, 245, 172, 173, 174, 96, 20, + /* 310 */ 177, 22, 187, 188, 19, 95, 191, 333, 193, 325, + /* 320 */ 95, 429, 33, 356, 35, 433, 356, 356, 33, 196, + /* 330 */ 363, 325, 199, 363, 201, 202, 203, 204, 205, 372, + /* 340 */ 448, 449, 372, 48, 358, 453, 454, 58, 53, 378, + /* 350 */ 356, 106, 63, 58, 339, 369, 96, 333, 364, 70, + /* 360 */ 342, 343, 348, 369, 380, 371, 382, 356, 353, 337, + /* 370 */ 356, 347, 12, 13, 14, 369, 365, 362, 245, 365, + /* 380 */ 20, 244, 22, 351, 95, 399, 400, 401, 364, 94, + /* 390 */ 396, 359, 97, 33, 400, 35, 410, 403, 404, 405, + /* 400 */ 406, 407, 408, 324, 410, 326, 117, 413, 20, 415, + /* 410 */ 416, 417, 20, 2, 0, 421, 422, 106, 58, 8, + /* 420 */ 9, 132, 133, 12, 13, 14, 15, 16, 325, 325, + /* 430 */ 70, 108, 109, 110, 111, 112, 113, 114, 115, 116, + /* 440 */ 117, 118, 20, 120, 121, 122, 123, 124, 125, 4, + /* 450 */ 161, 162, 175, 21, 0, 95, 24, 25, 26, 27, + /* 460 */ 28, 29, 30, 31, 32, 245, 20, 156, 22, 180, + /* 470 */ 245, 182, 369, 369, 197, 198, 62, 117, 24, 25, + /* 480 */ 26, 27, 28, 29, 30, 31, 32, 20, 43, 95, + /* 490 */ 45, 46, 132, 133, 333, 206, 207, 51, 209, 210, + /* 500 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + /* 510 */ 221, 222, 223, 224, 225, 226, 227, 402, 348, 62, + /* 520 */ 95, 161, 162, 0, 8, 9, 356, 333, 12, 13, + /* 530 */ 14, 15, 16, 0, 373, 365, 20, 229, 37, 231, + /* 540 */ 180, 347, 182, 428, 21, 339, 325, 24, 25, 26, + /* 550 */ 27, 28, 29, 30, 31, 32, 8, 9, 364, 166, + /* 560 */ 12, 13, 14, 15, 16, 126, 206, 207, 362, 209, + /* 570 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + /* 580 */ 220, 221, 222, 223, 224, 225, 226, 227, 12, 13, + /* 590 */ 369, 0, 356, 107, 402, 62, 20, 20, 22, 98, + /* 600 */ 364, 100, 101, 229, 103, 206, 325, 333, 107, 33, + /* 610 */ 337, 35, 126, 127, 128, 129, 130, 131, 8, 9, + /* 620 */ 428, 347, 12, 13, 14, 15, 16, 95, 189, 190, + /* 630 */ 129, 70, 359, 333, 58, 333, 58, 356, 364, 245, + /* 640 */ 49, 405, 356, 250, 251, 364, 70, 347, 357, 363, + /* 650 */ 369, 325, 371, 254, 255, 256, 257, 258, 372, 12, + /* 660 */ 13, 342, 343, 20, 364, 22, 364, 20, 371, 22, + /* 670 */ 245, 95, 94, 63, 325, 97, 333, 396, 35, 163, + /* 680 */ 33, 400, 35, 386, 403, 404, 405, 406, 407, 408, + /* 690 */ 347, 410, 333, 117, 51, 369, 415, 21, 417, 14, + /* 700 */ 15, 16, 421, 422, 357, 58, 347, 364, 132, 133, + /* 710 */ 34, 179, 36, 181, 104, 429, 325, 70, 369, 433, + /* 720 */ 172, 429, 333, 364, 443, 433, 424, 425, 426, 427, + /* 730 */ 3, 429, 430, 402, 448, 449, 347, 161, 162, 453, + /* 740 */ 454, 449, 95, 8, 9, 453, 454, 12, 13, 14, + /* 750 */ 15, 16, 414, 364, 416, 414, 180, 416, 182, 428, + /* 760 */ 369, 2, 366, 325, 117, 369, 325, 8, 9, 70, + /* 770 */ 160, 12, 13, 14, 15, 16, 325, 245, 349, 132, + /* 780 */ 133, 352, 206, 207, 357, 209, 210, 211, 212, 213, + /* 790 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + /* 800 */ 224, 225, 226, 227, 18, 357, 20, 369, 161, 162, + /* 810 */ 369, 413, 357, 27, 416, 267, 30, 8, 9, 33, + /* 820 */ 369, 12, 13, 14, 15, 16, 364, 180, 0, 182, + /* 830 */ 364, 96, 325, 107, 48, 325, 50, 375, 344, 53, + /* 840 */ 346, 375, 232, 233, 234, 235, 236, 237, 238, 239, + /* 850 */ 240, 241, 242, 206, 207, 129, 209, 210, 211, 212, + /* 860 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + /* 870 */ 223, 224, 225, 226, 227, 364, 369, 8, 9, 369, + /* 880 */ 94, 12, 13, 14, 15, 16, 375, 366, 366, 391, + /* 890 */ 369, 369, 106, 65, 66, 67, 68, 69, 325, 71, + /* 900 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + /* 910 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + /* 920 */ 349, 4, 136, 352, 325, 139, 140, 141, 142, 143, + /* 930 */ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + /* 940 */ 154, 155, 369, 157, 158, 159, 8, 9, 3, 20, + /* 950 */ 12, 13, 14, 15, 16, 356, 42, 333, 44, 333, + /* 960 */ 429, 333, 357, 364, 433, 20, 326, 333, 369, 0, + /* 970 */ 371, 347, 163, 0, 345, 347, 0, 387, 440, 333, + /* 980 */ 449, 347, 44, 0, 453, 454, 325, 333, 364, 262, + /* 990 */ 364, 20, 364, 347, 14, 396, 325, 333, 364, 400, + /* 1000 */ 20, 347, 403, 404, 405, 406, 407, 408, 20, 410, + /* 1010 */ 364, 347, 12, 13, 415, 333, 417, 356, 364, 429, + /* 1020 */ 421, 422, 22, 433, 48, 364, 45, 46, 364, 347, + /* 1030 */ 369, 432, 371, 33, 99, 35, 14, 102, 448, 449, + /* 1040 */ 369, 96, 20, 453, 454, 44, 364, 325, 333, 58, + /* 1050 */ 325, 425, 426, 427, 160, 429, 430, 396, 58, 243, + /* 1060 */ 244, 400, 347, 325, 403, 404, 405, 406, 407, 408, + /* 1070 */ 70, 410, 325, 22, 333, 0, 415, 387, 417, 364, + /* 1080 */ 107, 356, 421, 422, 333, 42, 35, 44, 97, 364, + /* 1090 */ 107, 369, 163, 432, 369, 379, 371, 22, 347, 126, + /* 1100 */ 127, 128, 129, 130, 131, 364, 325, 369, 163, 126, + /* 1110 */ 127, 128, 129, 130, 131, 364, 369, 117, 325, 429, + /* 1120 */ 151, 396, 44, 433, 99, 400, 232, 102, 403, 404, + /* 1130 */ 405, 406, 407, 408, 163, 410, 242, 356, 448, 449, + /* 1140 */ 415, 161, 417, 453, 454, 364, 421, 422, 99, 161, + /* 1150 */ 369, 102, 371, 99, 0, 44, 102, 432, 192, 44, + /* 1160 */ 194, 457, 369, 246, 44, 44, 425, 426, 427, 325, + /* 1170 */ 429, 430, 0, 163, 96, 63, 22, 396, 168, 44, + /* 1180 */ 180, 400, 182, 161, 403, 404, 405, 406, 407, 408, + /* 1190 */ 44, 410, 132, 133, 22, 35, 415, 325, 417, 35, + /* 1200 */ 356, 446, 421, 422, 13, 44, 206, 207, 364, 1, + /* 1210 */ 2, 96, 47, 369, 22, 371, 96, 96, 218, 219, + /* 1220 */ 220, 221, 222, 223, 224, 325, 35, 35, 356, 356, + /* 1230 */ 335, 96, 335, 44, 44, 35, 364, 379, 44, 44, + /* 1240 */ 396, 369, 96, 371, 400, 332, 368, 403, 404, 405, + /* 1250 */ 406, 407, 408, 325, 410, 379, 356, 96, 431, 415, + /* 1260 */ 95, 417, 70, 44, 364, 421, 422, 266, 396, 369, + /* 1270 */ 70, 371, 400, 450, 423, 403, 404, 405, 406, 407, + /* 1280 */ 408, 325, 410, 434, 356, 96, 96, 415, 247, 417, + /* 1290 */ 96, 96, 364, 421, 422, 44, 396, 369, 48, 371, + /* 1300 */ 400, 44, 44, 403, 404, 405, 406, 407, 408, 117, + /* 1310 */ 410, 178, 356, 398, 389, 96, 397, 417, 206, 13, + /* 1320 */ 364, 421, 422, 42, 396, 369, 376, 371, 400, 20, + /* 1330 */ 379, 403, 404, 405, 406, 407, 408, 376, 410, 160, + /* 1340 */ 325, 35, 182, 20, 374, 417, 182, 96, 376, 421, + /* 1350 */ 422, 333, 396, 96, 96, 93, 400, 325, 374, 403, + /* 1360 */ 404, 405, 406, 407, 408, 341, 410, 333, 374, 333, + /* 1370 */ 333, 356, 180, 417, 182, 264, 20, 421, 422, 364, + /* 1380 */ 333, 20, 327, 327, 369, 393, 371, 339, 356, 339, + /* 1390 */ 371, 20, 334, 20, 388, 333, 364, 334, 206, 207, + /* 1400 */ 339, 369, 52, 371, 339, 339, 339, 339, 336, 336, + /* 1410 */ 327, 396, 333, 356, 327, 400, 195, 337, 403, 404, + /* 1420 */ 405, 406, 407, 408, 409, 410, 411, 412, 396, 185, + /* 1430 */ 356, 393, 400, 356, 395, 403, 404, 405, 406, 407, + /* 1440 */ 408, 356, 410, 325, 356, 356, 356, 356, 356, 356, + /* 1450 */ 356, 369, 371, 369, 337, 333, 392, 259, 253, 439, + /* 1460 */ 384, 252, 439, 325, 369, 379, 369, 369, 442, 369, + /* 1470 */ 171, 441, 439, 261, 356, 379, 444, 445, 438, 437, + /* 1480 */ 260, 248, 364, 384, 268, 458, 263, 369, 436, 371, + /* 1490 */ 265, 244, 364, 20, 356, 333, 452, 451, 20, 398, + /* 1500 */ 334, 382, 364, 369, 402, 337, 369, 369, 384, 371, + /* 1510 */ 369, 369, 369, 384, 396, 337, 369, 165, 400, 352, + /* 1520 */ 381, 403, 404, 405, 406, 407, 408, 364, 410, 325, + /* 1530 */ 337, 95, 95, 420, 396, 417, 360, 36, 400, 369, + /* 1540 */ 422, 403, 404, 405, 406, 407, 408, 325, 410, 346, + /* 1550 */ 333, 337, 328, 327, 323, 0, 350, 350, 385, 390, + /* 1560 */ 356, 350, 385, 0, 187, 394, 338, 0, 364, 0, + /* 1570 */ 42, 0, 35, 369, 200, 371, 200, 35, 356, 35, + /* 1580 */ 35, 0, 35, 445, 35, 200, 364, 0, 200, 0, + /* 1590 */ 0, 369, 35, 371, 22, 0, 182, 35, 180, 0, + /* 1600 */ 396, 0, 325, 176, 400, 175, 0, 403, 404, 405, + /* 1610 */ 406, 407, 408, 0, 410, 47, 0, 0, 396, 325, + /* 1620 */ 0, 42, 400, 0, 0, 403, 404, 405, 406, 407, + /* 1630 */ 408, 0, 410, 356, 0, 0, 0, 0, 361, 0, + /* 1640 */ 151, 364, 35, 0, 151, 0, 369, 42, 371, 0, + /* 1650 */ 356, 447, 0, 0, 0, 0, 0, 0, 364, 0, + /* 1660 */ 0, 0, 0, 369, 0, 371, 0, 0, 0, 0, + /* 1670 */ 0, 0, 0, 396, 0, 0, 325, 400, 456, 0, + /* 1680 */ 403, 404, 405, 406, 407, 408, 135, 410, 0, 0, + /* 1690 */ 396, 0, 325, 35, 400, 22, 58, 403, 404, 405, + /* 1700 */ 406, 407, 408, 0, 410, 0, 412, 356, 58, 0, + /* 1710 */ 47, 14, 361, 14, 0, 364, 39, 0, 42, 0, + /* 1720 */ 369, 40, 371, 356, 44, 47, 39, 0, 361, 47, + /* 1730 */ 171, 364, 39, 0, 0, 0, 369, 325, 371, 0, + /* 1740 */ 0, 35, 48, 39, 0, 35, 48, 396, 64, 0, + /* 1750 */ 39, 400, 39, 325, 403, 404, 405, 406, 407, 408, + /* 1760 */ 35, 410, 0, 396, 35, 39, 48, 400, 356, 48, + /* 1770 */ 403, 404, 405, 406, 407, 408, 364, 410, 0, 0, + /* 1780 */ 0, 369, 0, 371, 356, 35, 22, 104, 102, 0, + /* 1790 */ 35, 35, 364, 35, 35, 44, 44, 369, 35, 371, + /* 1800 */ 35, 35, 0, 22, 0, 22, 22, 50, 396, 0, + /* 1810 */ 22, 35, 400, 325, 22, 403, 404, 405, 406, 407, + /* 1820 */ 408, 0, 410, 0, 396, 35, 35, 0, 400, 35, + /* 1830 */ 20, 403, 404, 405, 406, 407, 408, 96, 410, 0, + /* 1840 */ 35, 35, 95, 35, 356, 0, 22, 0, 163, 0, + /* 1850 */ 96, 3, 364, 249, 47, 163, 44, 369, 47, 371, + /* 1860 */ 165, 44, 95, 95, 163, 169, 325, 96, 96, 95, + /* 1870 */ 95, 249, 95, 183, 44, 44, 3, 44, 249, 35, + /* 1880 */ 0, 96, 95, 47, 396, 35, 325, 35, 400, 35, + /* 1890 */ 35, 403, 404, 405, 406, 407, 408, 356, 410, 96, + /* 1900 */ 35, 44, 0, 47, 0, 364, 47, 0, 243, 96, + /* 1910 */ 369, 96, 371, 39, 96, 95, 47, 356, 96, 166, + /* 1920 */ 44, 96, 2, 95, 95, 364, 206, 95, 22, 95, + /* 1930 */ 369, 105, 371, 95, 164, 228, 96, 396, 230, 96, + /* 1940 */ 228, 400, 96, 47, 403, 404, 405, 406, 407, 408, + /* 1950 */ 47, 410, 325, 95, 22, 95, 95, 396, 95, 106, + /* 1960 */ 96, 400, 96, 95, 403, 404, 405, 406, 407, 408, + /* 1970 */ 35, 410, 325, 35, 95, 35, 35, 96, 95, 35, + /* 1980 */ 96, 208, 96, 356, 95, 95, 35, 96, 95, 119, + /* 1990 */ 119, 364, 22, 95, 119, 107, 369, 119, 371, 44, + /* 2000 */ 95, 35, 22, 356, 95, 92, 64, 35, 63, 35, + /* 2010 */ 35, 364, 35, 35, 35, 44, 369, 35, 371, 35, + /* 2020 */ 35, 35, 70, 396, 35, 325, 35, 400, 35, 22, + /* 2030 */ 403, 404, 405, 406, 407, 408, 35, 410, 35, 35, + /* 2040 */ 35, 325, 22, 396, 35, 35, 70, 400, 35, 35, + /* 2050 */ 403, 404, 405, 406, 407, 408, 356, 410, 35, 0, + /* 2060 */ 35, 39, 0, 48, 364, 35, 48, 39, 0, 369, + /* 2070 */ 35, 371, 356, 39, 0, 48, 35, 48, 39, 0, + /* 2080 */ 364, 35, 35, 0, 21, 369, 22, 371, 22, 22, + /* 2090 */ 21, 20, 459, 459, 325, 459, 396, 459, 459, 459, + /* 2100 */ 400, 459, 459, 403, 404, 405, 406, 407, 408, 459, + /* 2110 */ 410, 459, 396, 459, 459, 459, 400, 459, 325, 403, + /* 2120 */ 404, 405, 406, 407, 408, 356, 410, 459, 459, 459, + /* 2130 */ 459, 459, 459, 364, 459, 459, 459, 459, 369, 325, + /* 2140 */ 371, 459, 459, 459, 459, 459, 459, 459, 459, 356, + /* 2150 */ 459, 459, 459, 459, 459, 459, 459, 364, 459, 459, + /* 2160 */ 459, 459, 369, 459, 371, 396, 459, 459, 459, 400, + /* 2170 */ 356, 459, 403, 404, 405, 406, 407, 408, 364, 410, + /* 2180 */ 459, 459, 459, 369, 459, 371, 459, 459, 459, 396, + /* 2190 */ 459, 459, 325, 400, 459, 459, 403, 404, 405, 406, + /* 2200 */ 407, 408, 459, 410, 459, 459, 459, 459, 459, 459, + /* 2210 */ 396, 459, 325, 459, 400, 459, 459, 403, 404, 405, + /* 2220 */ 406, 407, 408, 356, 410, 459, 459, 459, 459, 459, + /* 2230 */ 459, 364, 459, 459, 459, 459, 369, 459, 371, 459, + /* 2240 */ 459, 459, 459, 356, 459, 459, 459, 459, 459, 459, + /* 2250 */ 459, 364, 459, 459, 459, 459, 369, 459, 371, 459, + /* 2260 */ 459, 459, 459, 396, 459, 459, 459, 400, 459, 459, + /* 2270 */ 403, 404, 405, 406, 407, 408, 459, 410, 325, 459, + /* 2280 */ 459, 459, 459, 396, 459, 459, 459, 400, 459, 459, + /* 2290 */ 403, 404, 405, 406, 407, 408, 459, 410, 325, 459, + /* 2300 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 356, + /* 2310 */ 459, 459, 459, 459, 459, 459, 459, 364, 459, 459, + /* 2320 */ 459, 459, 369, 459, 371, 459, 459, 459, 459, 356, + /* 2330 */ 459, 459, 459, 459, 459, 459, 459, 364, 459, 459, + /* 2340 */ 459, 459, 369, 459, 371, 459, 459, 459, 459, 396, + /* 2350 */ 459, 325, 459, 400, 459, 459, 403, 404, 405, 406, + /* 2360 */ 407, 408, 459, 410, 459, 459, 459, 325, 459, 396, + /* 2370 */ 459, 459, 459, 400, 459, 459, 403, 404, 405, 406, + /* 2380 */ 407, 408, 356, 410, 459, 459, 459, 459, 459, 459, + /* 2390 */ 364, 459, 459, 459, 459, 369, 459, 371, 356, 459, + /* 2400 */ 459, 459, 459, 459, 459, 459, 364, 459, 459, 459, + /* 2410 */ 459, 369, 459, 371, 459, 459, 459, 459, 459, 459, + /* 2420 */ 325, 459, 396, 459, 459, 459, 400, 459, 459, 403, + /* 2430 */ 404, 405, 406, 407, 408, 459, 410, 459, 396, 459, + /* 2440 */ 459, 459, 400, 459, 325, 403, 404, 405, 406, 407, + /* 2450 */ 408, 356, 410, 459, 459, 459, 459, 459, 459, 364, + /* 2460 */ 459, 459, 459, 459, 369, 325, 371, 459, 459, 459, + /* 2470 */ 459, 459, 459, 459, 459, 356, 459, 459, 459, 459, + /* 2480 */ 459, 459, 459, 364, 459, 459, 459, 459, 369, 459, + /* 2490 */ 371, 396, 459, 459, 459, 400, 356, 459, 403, 404, + /* 2500 */ 405, 406, 407, 408, 364, 410, 459, 459, 459, 369, + /* 2510 */ 459, 371, 459, 459, 459, 396, 459, 459, 325, 400, + /* 2520 */ 459, 459, 403, 404, 405, 406, 407, 408, 459, 410, + /* 2530 */ 459, 459, 459, 459, 459, 459, 396, 459, 19, 459, + /* 2540 */ 400, 459, 459, 403, 404, 405, 406, 407, 408, 356, + /* 2550 */ 410, 459, 33, 459, 459, 459, 459, 364, 459, 459, + /* 2560 */ 459, 459, 369, 33, 371, 459, 459, 48, 459, 459, + /* 2570 */ 459, 459, 459, 54, 55, 56, 57, 58, 48, 459, + /* 2580 */ 459, 459, 459, 459, 54, 55, 56, 57, 58, 396, + /* 2590 */ 459, 459, 459, 400, 459, 459, 403, 404, 405, 406, + /* 2600 */ 407, 408, 459, 410, 459, 459, 459, 459, 459, 459, + /* 2610 */ 459, 459, 459, 94, 459, 459, 97, 459, 459, 459, + /* 2620 */ 459, 459, 459, 459, 94, 459, 459, 97, 459, 459, + /* 2630 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2640 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 130, + /* 2650 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2660 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2670 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2680 */ 459, 459, 459, 459, 459, 459, 167, 459, 459, 459, + /* 2690 */ 459, 459, 459, 459, 164, 165, 459, 167, 459, 459, + /* 2700 */ 170, 459, 459, 184, 459, 186, 459, 459, 459, 459, + /* 2710 */ 459, 459, 459, 459, 459, 459, 186, 459, 459, 459, + /* 2720 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2730 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2740 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2750 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2760 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2770 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2780 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2790 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2800 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2810 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2820 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2830 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2840 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2850 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2860 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2870 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + /* 2880 */ 459, 459, 459, 459, 459, 459, }; -#define YY_SHIFT_COUNT (710) +#define YY_SHIFT_COUNT (711) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2065) +#define YY_SHIFT_MAX (2530) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 925, 0, 71, 0, 288, 288, 288, 288, 288, 288, - /* 10 */ 288, 288, 288, 359, 574, 574, 645, 574, 574, 574, - /* 20 */ 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, - /* 30 */ 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, - /* 40 */ 574, 574, 574, 574, 574, 574, 103, 227, 51, 169, - /* 50 */ 287, 134, 208, 134, 51, 51, 1182, 1182, 134, 1182, - /* 60 */ 1182, 203, 134, 5, 5, 772, 772, 14, 52, 45, - /* 70 */ 45, 5, 5, 5, 5, 5, 5, 5, 40, 5, - /* 80 */ 5, 28, 5, 5, 177, 5, 404, 5, 40, 543, - /* 90 */ 5, 5, 543, 5, 543, 543, 543, 5, 57, 783, - /* 100 */ 34, 34, 498, 471, 418, 418, 418, 418, 418, 418, - /* 110 */ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, - /* 120 */ 418, 418, 418, 213, 661, 14, 52, 312, 325, 172, - /* 130 */ 172, 172, 599, 607, 607, 325, 583, 583, 583, 784, - /* 140 */ 404, 546, 543, 869, 543, 869, 869, 784, 890, 216, - /* 150 */ 216, 216, 216, 216, 216, 216, 790, 434, 302, 711, - /* 160 */ 1055, 99, 96, 94, 295, 532, 339, 533, 899, 889, - /* 170 */ 853, 766, 804, 104, 766, 933, 724, 858, 1049, 1248, - /* 180 */ 1124, 1264, 1291, 1264, 1162, 1305, 1305, 1264, 1162, 1162, - /* 190 */ 1240, 1305, 1305, 1305, 1321, 1321, 1324, 28, 404, 28, - /* 200 */ 1329, 1339, 28, 1329, 28, 28, 28, 1305, 28, 1319, - /* 210 */ 1319, 1321, 543, 543, 543, 543, 543, 543, 543, 543, - /* 220 */ 543, 543, 543, 1305, 1321, 869, 869, 1200, 1324, 57, - /* 230 */ 1226, 404, 57, 1305, 1291, 1291, 869, 1189, 1188, 869, - /* 240 */ 1189, 1188, 869, 869, 543, 1186, 1293, 1189, 1206, 1208, - /* 250 */ 1218, 1049, 1210, 1215, 1207, 1239, 583, 1466, 1305, 1329, - /* 260 */ 57, 1472, 1188, 869, 869, 869, 869, 869, 1188, 869, - /* 270 */ 1330, 57, 784, 57, 583, 1427, 1443, 869, 890, 1305, - /* 280 */ 57, 1505, 1321, 2723, 2723, 2723, 2723, 2723, 2723, 2723, - /* 290 */ 2723, 2723, 826, 1187, 588, 656, 938, 998, 1064, 556, - /* 300 */ 686, 757, 867, 852, 979, 979, 979, 979, 979, 979, - /* 310 */ 979, 979, 979, 896, 641, 155, 155, 191, 534, 592, - /* 320 */ 572, 300, 435, 435, 1, 625, 573, 1, 1, 1, - /* 330 */ 1000, 547, 1031, 1007, 952, 839, 983, 984, 991, 1012, - /* 340 */ 1088, 1094, 1109, 959, 1060, 1071, 989, 1040, 384, 1010, - /* 350 */ 1075, 1086, 1104, 1126, 1130, 1204, 1136, 767, 1054, 823, - /* 360 */ 1155, 951, 1157, 1172, 1193, 1202, 1205, 1212, 1114, 1177, - /* 370 */ 1194, 1237, 732, 1556, 1557, 1371, 1562, 1563, 1518, 1565, - /* 380 */ 1533, 1374, 1535, 1539, 1541, 1379, 1577, 1544, 1546, 1384, - /* 390 */ 1584, 1386, 1586, 1552, 1588, 1567, 1590, 1558, 1410, 1414, - /* 400 */ 1596, 1604, 1430, 1433, 1609, 1610, 1566, 1612, 1620, 1622, - /* 410 */ 1581, 1624, 1625, 1626, 1627, 1637, 1638, 1644, 1645, 1478, - /* 420 */ 1595, 1631, 1481, 1633, 1634, 1635, 1646, 1647, 1648, 1649, - /* 430 */ 1650, 1651, 1652, 1653, 1654, 1655, 1657, 1658, 1617, 1660, - /* 440 */ 1661, 1662, 1663, 1664, 1643, 1666, 1667, 1669, 1536, 1670, - /* 450 */ 1683, 1639, 1684, 1632, 1685, 1636, 1687, 1689, 1656, 1665, - /* 460 */ 1668, 1659, 1677, 1671, 1678, 1681, 1693, 1675, 1672, 1695, - /* 470 */ 1696, 1697, 1690, 1528, 1700, 1701, 1702, 1641, 1707, 1708, - /* 480 */ 1679, 1682, 1692, 1709, 1698, 1688, 1699, 1710, 1705, 1703, - /* 490 */ 1704, 1716, 1706, 1711, 1713, 1732, 1735, 1737, 1744, 1642, - /* 500 */ 1673, 1715, 1723, 1748, 1718, 1719, 1720, 1721, 1714, 1717, - /* 510 */ 1725, 1728, 1740, 1729, 1766, 1745, 1768, 1747, 1726, 1771, - /* 520 */ 1755, 1754, 1779, 1756, 1780, 1757, 1790, 1772, 1773, 1760, - /* 530 */ 1761, 1606, 1724, 1730, 1799, 1640, 1765, 1802, 1676, 1792, - /* 540 */ 1680, 1686, 1810, 1812, 1691, 1712, 1813, 1775, 1573, 1733, - /* 550 */ 1731, 1734, 1736, 1778, 1738, 1741, 1742, 1746, 1739, 1786, - /* 560 */ 1777, 1791, 1749, 1795, 1594, 1750, 1751, 1842, 1805, 1602, - /* 570 */ 1817, 1820, 1822, 1825, 1829, 1838, 1781, 1782, 1827, 1694, - /* 580 */ 1831, 1833, 1815, 1876, 1882, 1659, 1836, 1794, 1797, 1798, - /* 590 */ 1796, 1808, 1762, 1809, 1887, 1851, 1753, 1811, 1800, 1659, - /* 600 */ 1860, 1864, 1722, 1758, 1763, 1907, 1888, 1752, 1818, 1816, - /* 610 */ 1819, 1830, 1832, 1834, 1886, 1839, 1840, 1890, 1843, 1916, - /* 620 */ 1764, 1846, 1837, 1848, 1911, 1913, 1847, 1854, 1917, 1856, - /* 630 */ 1859, 1918, 1863, 1865, 1924, 1867, 1873, 1938, 1879, 1858, - /* 640 */ 1869, 1870, 1872, 1953, 1871, 1897, 1950, 1900, 1961, 1906, - /* 650 */ 1950, 1950, 1975, 1939, 1941, 1967, 1970, 1971, 1972, 1973, - /* 660 */ 1974, 1976, 1977, 1978, 1979, 1940, 1923, 1980, 1981, 1982, - /* 670 */ 1983, 1997, 1985, 1986, 1987, 1956, 1714, 1988, 1717, 1992, - /* 680 */ 1993, 1996, 2005, 2019, 2007, 2044, 2011, 1999, 2009, 2049, - /* 690 */ 2015, 2003, 2014, 2054, 2020, 2008, 2018, 2058, 2024, 2012, - /* 700 */ 2022, 2062, 2028, 2029, 2065, 2045, 2048, 2050, 2051, 2055, - /* 710 */ 2046, + /* 0 */ 133, 0, 71, 0, 289, 289, 289, 289, 289, 289, + /* 10 */ 289, 289, 289, 360, 576, 576, 647, 576, 576, 576, + /* 20 */ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + /* 30 */ 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, + /* 40 */ 576, 576, 576, 576, 576, 576, 59, 220, 110, 532, + /* 50 */ 58, 394, 425, 394, 110, 110, 1000, 1000, 394, 1000, + /* 60 */ 1000, 225, 394, 78, 78, 445, 445, 36, 51, 223, + /* 70 */ 223, 78, 78, 78, 78, 78, 78, 78, 388, 78, + /* 80 */ 78, 83, 78, 78, 392, 78, 422, 78, 388, 467, + /* 90 */ 78, 78, 467, 78, 467, 467, 467, 78, 457, 786, + /* 100 */ 610, 610, 432, 112, 1192, 1192, 1192, 1192, 1192, 1192, + /* 110 */ 1192, 1192, 1192, 1192, 1192, 1192, 1192, 1192, 1192, 1192, + /* 120 */ 1192, 1192, 1192, 501, 945, 36, 51, 414, 117, 108, + /* 130 */ 108, 108, 533, 308, 308, 117, 577, 577, 577, 245, + /* 140 */ 422, 374, 467, 561, 467, 561, 561, 245, 699, 323, + /* 150 */ 323, 323, 323, 323, 323, 323, 2519, 523, 181, 516, + /* 160 */ 548, 399, 643, 393, 980, 1022, 446, 929, 981, 726, + /* 170 */ 971, 816, 137, 727, 816, 914, 917, 988, 1041, 1250, + /* 180 */ 1133, 1281, 1309, 1281, 1179, 1323, 1323, 1281, 1179, 1179, + /* 190 */ 1262, 1323, 1323, 1323, 1356, 1356, 1361, 83, 422, 83, + /* 200 */ 1371, 1373, 83, 1371, 83, 83, 83, 1323, 83, 1350, + /* 210 */ 1350, 1356, 467, 467, 467, 467, 467, 467, 467, 467, + /* 220 */ 467, 467, 467, 1323, 1356, 561, 561, 1221, 1361, 457, + /* 230 */ 1244, 422, 457, 1323, 1309, 1309, 561, 1205, 1209, 561, + /* 240 */ 1205, 1209, 561, 561, 467, 1198, 1299, 1205, 1212, 1220, + /* 250 */ 1233, 1041, 1216, 1225, 1223, 1247, 577, 1473, 1323, 1371, + /* 260 */ 457, 1478, 1209, 561, 561, 561, 561, 561, 1209, 561, + /* 270 */ 1352, 457, 245, 457, 577, 1436, 1437, 561, 699, 1323, + /* 280 */ 457, 1501, 1356, 2717, 2717, 2717, 2717, 2717, 2717, 2717, + /* 290 */ 2717, 2717, 828, 2530, 454, 295, 260, 938, 735, 983, + /* 300 */ 411, 759, 809, 973, 869, 869, 869, 869, 869, 869, + /* 310 */ 869, 869, 869, 486, 125, 13, 13, 277, 578, 123, + /* 320 */ 676, 439, 118, 118, 685, 53, 894, 685, 685, 685, + /* 330 */ 212, 976, 1051, 1043, 311, 969, 935, 1025, 1049, 1054, + /* 340 */ 1075, 1154, 1172, 966, 991, 1078, 1115, 1060, 1111, 1001, + /* 350 */ 1010, 1120, 1121, 1135, 1146, 1161, 1208, 1189, 1160, 1164, + /* 360 */ 1112, 1190, 1165, 1194, 1195, 1219, 1251, 1257, 1258, 30, + /* 370 */ 1191, 1306, 1200, 591, 1555, 1563, 1377, 1567, 1569, 1528, + /* 380 */ 1571, 1537, 1374, 1542, 1544, 1545, 1376, 1581, 1547, 1549, + /* 390 */ 1385, 1587, 1388, 1589, 1557, 1590, 1572, 1595, 1562, 1414, + /* 400 */ 1418, 1599, 1601, 1427, 1430, 1606, 1613, 1568, 1616, 1617, + /* 410 */ 1620, 1579, 1623, 1624, 1631, 1634, 1635, 1636, 1637, 1639, + /* 420 */ 1489, 1607, 1643, 1493, 1645, 1649, 1652, 1653, 1654, 1655, + /* 430 */ 1656, 1657, 1659, 1660, 1661, 1662, 1664, 1666, 1667, 1605, + /* 440 */ 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1679, 1551, + /* 450 */ 1688, 1689, 1658, 1691, 1638, 1703, 1650, 1705, 1709, 1676, + /* 460 */ 1677, 1680, 1663, 1697, 1678, 1699, 1682, 1714, 1681, 1687, + /* 470 */ 1717, 1719, 1727, 1693, 1559, 1733, 1734, 1735, 1684, 1739, + /* 480 */ 1740, 1706, 1694, 1704, 1744, 1710, 1698, 1711, 1749, 1725, + /* 490 */ 1718, 1713, 1762, 1729, 1721, 1726, 1778, 1779, 1780, 1782, + /* 500 */ 1683, 1686, 1750, 1764, 1789, 1755, 1756, 1758, 1759, 1751, + /* 510 */ 1752, 1763, 1765, 1781, 1766, 1802, 1783, 1804, 1784, 1757, + /* 520 */ 1809, 1788, 1776, 1821, 1790, 1823, 1791, 1827, 1792, 1810, + /* 530 */ 1794, 1805, 1806, 1741, 1747, 1839, 1685, 1808, 1845, 1690, + /* 540 */ 1824, 1692, 1695, 1847, 1849, 1701, 1696, 1848, 1812, 1604, + /* 550 */ 1767, 1754, 1768, 1771, 1817, 1772, 1774, 1775, 1777, 1785, + /* 560 */ 1830, 1807, 1811, 1787, 1831, 1622, 1803, 1813, 1873, 1833, + /* 570 */ 1629, 1844, 1850, 1852, 1854, 1855, 1865, 1815, 1818, 1836, + /* 580 */ 1665, 1857, 1856, 1880, 1902, 1904, 1663, 1859, 1820, 1822, + /* 590 */ 1825, 1828, 1829, 1753, 1832, 1907, 1874, 1770, 1834, 1826, + /* 600 */ 1663, 1869, 1876, 1707, 1708, 1712, 1920, 1906, 1720, 1838, + /* 610 */ 1840, 1858, 1843, 1860, 1846, 1896, 1861, 1863, 1903, 1864, + /* 620 */ 1932, 1773, 1868, 1853, 1866, 1935, 1938, 1879, 1881, 1940, + /* 630 */ 1883, 1884, 1941, 1889, 1886, 1944, 1890, 1891, 1951, 1893, + /* 640 */ 1870, 1871, 1875, 1878, 1970, 1888, 1898, 1955, 1905, 1966, + /* 650 */ 1909, 1955, 1955, 1980, 1942, 1945, 1972, 1974, 1975, 1977, + /* 660 */ 1978, 1979, 1982, 1984, 1985, 1986, 1952, 1913, 1971, 1989, + /* 670 */ 1991, 1993, 2007, 2001, 2003, 2004, 1976, 1751, 2005, 1752, + /* 680 */ 2009, 2010, 2013, 2014, 2020, 2023, 2059, 2025, 2015, 2022, + /* 690 */ 2062, 2030, 2018, 2028, 2068, 2035, 2027, 2034, 2074, 2041, + /* 700 */ 2029, 2039, 2079, 2046, 2047, 2083, 2064, 2063, 2066, 2067, + /* 710 */ 2069, 2071, }; #define YY_REDUCE_COUNT (291) -#define YY_REDUCE_MIN (-425) -#define YY_REDUCE_MAX (2312) +#define YY_REDUCE_MIN (-412) +#define YY_REDUCE_MAX (2193) static const short yy_reduce_ofst[] = { - /* 0 */ -17, -295, -7, 233, 633, 736, 781, 854, 909, 1021, - /* 10 */ 1051, 1107, 1127, -169, 1195, 77, 341, 1211, 1272, 1317, - /* 20 */ 1378, 1401, 1462, 1492, 1515, 1560, 1576, 1629, 1674, 1727, - /* 30 */ 1743, 1788, 1841, 1857, 1902, 1925, 1955, 2031, 2053, 2108, - /* 40 */ 2153, 2198, 2214, 2259, 2282, 2312, -276, -290, -168, -10, - /* 50 */ 834, 837, 907, 960, -327, -181, -348, -314, -425, 252, - /* 60 */ 755, -422, 289, -328, -219, -329, -291, -300, -303, -209, - /* 70 */ -144, -173, 78, 258, 278, 326, 668, 688, -288, 698, - /* 80 */ 727, 65, 748, 754, -275, 770, 86, 800, -152, -347, - /* 90 */ 802, 828, 123, 829, 186, 187, 192, 864, -158, -294, - /* 100 */ -282, -282, -182, -265, -170, -62, -6, 82, 105, 265, - /* 110 */ 276, 305, 310, 347, 383, 386, 392, 439, 442, 450, - /* 120 */ 480, 630, 631, 67, -150, 89, -116, 308, 173, -150, - /* 130 */ 311, 332, 309, 406, 426, 175, -58, 466, 521, 126, - /* 140 */ 306, 240, 456, 552, 516, 595, 601, 616, 627, 615, - /* 150 */ 648, 700, 718, 806, 815, 851, -337, 812, 814, 835, - /* 160 */ 726, 785, 895, 793, 882, 882, 904, 868, 916, 887, - /* 170 */ 898, 843, 843, 842, 843, 856, 859, 882, 902, 900, - /* 180 */ 915, 934, 939, 944, 949, 994, 995, 953, 958, 961, - /* 190 */ 993, 1004, 1005, 1006, 1015, 1016, 955, 1011, 974, 1014, - /* 200 */ 1024, 975, 1026, 1032, 1028, 1029, 1030, 1037, 1033, 1038, - /* 210 */ 1039, 1052, 1022, 1025, 1027, 1035, 1041, 1042, 1050, 1056, - /* 220 */ 1062, 1063, 1067, 1047, 1057, 1013, 1017, 1001, 1002, 1073, - /* 230 */ 1043, 1045, 1093, 1100, 1058, 1061, 1065, 1009, 1066, 1076, - /* 240 */ 1023, 1069, 1077, 1080, 882, 1018, 1034, 1046, 1036, 1044, - /* 250 */ 1048, 1072, 1068, 1053, 1070, 843, 1116, 1085, 1156, 1154, - /* 260 */ 1153, 1111, 1110, 1128, 1131, 1132, 1133, 1135, 1115, 1137, - /* 270 */ 1138, 1171, 1164, 1181, 1145, 1105, 1179, 1173, 1197, 1213, - /* 280 */ 1203, 1217, 1220, 1160, 1158, 1168, 1169, 1219, 1221, 1222, - /* 290 */ 1223, 1232, + /* 0 */ -290, -295, -6, 281, 599, 661, 725, 781, 844, 872, + /* 10 */ 900, 928, 956, 1015, 1032, -318, 1118, 1138, 1204, 1222, + /* 20 */ 1277, 1294, 1351, 1367, 1412, 1428, 1488, 1541, 1561, 1627, + /* 30 */ 1647, 1700, 1716, 1769, 1793, 1814, 1867, 1887, 1953, 1973, + /* 40 */ 2026, 2042, 2095, 2119, 2140, 2193, -191, 286, 302, -381, + /* 50 */ -330, -108, 590, 690, 626, 741, -335, -14, -412, -350, + /* 60 */ -169, 292, 531, -233, -197, -329, -185, -338, -366, -253, + /* 70 */ -165, -302, 24, 194, 274, 300, 359, 389, -286, 624, + /* 80 */ 628, 15, 634, 646, 236, 654, -211, 664, -16, -157, + /* 90 */ 682, 715, -33, 751, 14, -30, 170, 343, 32, 161, + /* 100 */ -409, -409, 79, -238, -310, 6, 103, 104, 221, 326, + /* 110 */ 349, 391, 438, 441, 451, 507, 510, 573, 671, 722, + /* 120 */ 738, 747, 793, -344, 115, -29, -327, 206, 18, 115, + /* 130 */ 192, 331, 273, 338, 341, 319, 462, 466, 511, 429, + /* 140 */ 297, 398, 11, 396, -106, 521, 522, 571, 494, -341, + /* 150 */ 291, 347, 427, 448, 455, 605, 498, 640, 629, 716, + /* 160 */ 704, 755, 895, 538, 873, 873, 897, 858, 913, 878, + /* 170 */ 876, 827, 827, 823, 827, 851, 849, 873, 915, 919, + /* 180 */ 925, 950, 951, 961, 970, 1018, 1034, 972, 984, 994, + /* 190 */ 1024, 1036, 1037, 1047, 1055, 1056, 992, 1048, 1019, 1050, + /* 200 */ 1058, 1006, 1061, 1063, 1065, 1066, 1067, 1062, 1068, 1072, + /* 210 */ 1073, 1083, 1057, 1074, 1077, 1085, 1088, 1089, 1090, 1091, + /* 220 */ 1092, 1093, 1094, 1079, 1087, 1082, 1084, 1039, 1038, 1080, + /* 230 */ 1064, 1081, 1117, 1122, 1086, 1096, 1095, 1020, 1076, 1097, + /* 240 */ 1023, 1099, 1098, 1100, 873, 1026, 1030, 1033, 1040, 1042, + /* 250 */ 1052, 1101, 1027, 1044, 1046, 827, 1128, 1102, 1162, 1166, + /* 260 */ 1168, 1119, 1124, 1134, 1137, 1141, 1142, 1143, 1129, 1147, + /* 270 */ 1139, 1178, 1167, 1193, 1163, 1113, 1176, 1170, 1203, 1217, + /* 280 */ 1214, 1224, 1226, 1169, 1171, 1173, 1177, 1206, 1207, 1211, + /* 290 */ 1228, 1231, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 10 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 20 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 30 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 40 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 50 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 60 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1850, 1595, 1595, - /* 70 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 80 */ 1595, 1673, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 90 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1671, 1843, - /* 100 */ 2043, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 110 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 120 */ 1595, 1595, 1595, 1595, 2055, 1595, 1595, 1673, 1595, 2055, - /* 130 */ 2055, 2055, 1671, 2015, 2015, 1595, 1595, 1595, 1595, 1780, - /* 140 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1780, 1595, 1595, - /* 150 */ 1595, 1595, 1595, 1595, 1595, 1595, 1889, 1595, 1595, 2080, - /* 160 */ 2133, 1595, 1595, 2083, 1595, 1595, 1595, 1855, 1595, 1733, - /* 170 */ 2070, 2047, 2061, 2117, 2048, 2045, 2064, 1595, 2074, 1595, - /* 180 */ 1882, 1848, 1595, 1848, 1845, 1595, 1595, 1848, 1845, 1845, - /* 190 */ 1724, 1595, 1595, 1595, 1595, 1595, 1595, 1673, 1595, 1673, - /* 200 */ 1595, 1595, 1673, 1595, 1673, 1673, 1673, 1595, 1673, 1652, - /* 210 */ 1652, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 220 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1902, 1595, 1671, - /* 230 */ 1891, 1595, 1671, 1595, 1595, 1595, 1595, 2090, 2088, 1595, - /* 240 */ 2090, 2088, 1595, 1595, 1595, 2102, 2098, 2090, 2106, 2104, - /* 250 */ 2076, 2074, 2136, 2123, 2119, 2061, 1595, 1595, 1595, 1595, - /* 260 */ 1671, 1595, 2088, 1595, 1595, 1595, 1595, 1595, 2088, 1595, - /* 270 */ 1595, 1671, 1595, 1671, 1595, 1595, 1749, 1595, 1595, 1595, - /* 280 */ 1671, 1627, 1595, 1884, 1895, 1867, 1867, 1783, 1783, 1783, - /* 290 */ 1674, 1600, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 300 */ 1595, 1595, 1595, 1595, 2101, 2100, 1971, 1595, 2019, 2018, - /* 310 */ 2017, 2008, 1970, 1745, 1595, 1969, 1968, 1595, 1595, 1595, - /* 320 */ 1595, 1595, 1863, 1862, 1962, 1595, 1595, 1963, 1961, 1960, - /* 330 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 340 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 2120, 2124, 1595, - /* 350 */ 1595, 1595, 1595, 1595, 1595, 2044, 1595, 1595, 1595, 1595, - /* 360 */ 1595, 1944, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 370 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 380 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 390 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 400 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 410 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 420 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 430 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 440 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 450 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 460 */ 1632, 1949, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 470 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 480 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 490 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 500 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1712, 1711, - /* 510 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 520 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 530 */ 1595, 1595, 1953, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 540 */ 1595, 1595, 1595, 1595, 1595, 1595, 2116, 2077, 1595, 1595, - /* 550 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 560 */ 1595, 1944, 1595, 2099, 1595, 1595, 2114, 1595, 2118, 1595, - /* 570 */ 1595, 1595, 1595, 1595, 1595, 1595, 2054, 2050, 1595, 1595, - /* 580 */ 2046, 1595, 1595, 1595, 1595, 1952, 1595, 1595, 1595, 1595, - /* 590 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1943, - /* 600 */ 1595, 2005, 1595, 1595, 1595, 2039, 1595, 1595, 1990, 1595, - /* 610 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1953, 1595, - /* 620 */ 1956, 1595, 1595, 1595, 1595, 1595, 1777, 1595, 1595, 1595, - /* 630 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1762, - /* 640 */ 1760, 1759, 1758, 1595, 1755, 1595, 1790, 1595, 1595, 1595, - /* 650 */ 1786, 1785, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 660 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1692, 1595, 1595, - /* 670 */ 1595, 1595, 1595, 1595, 1595, 1595, 1684, 1595, 1683, 1595, - /* 680 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 690 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 700 */ 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, 1595, - /* 710 */ 1595, + /* 0 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 10 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 20 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 30 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 40 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 50 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 60 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1853, 1598, 1598, + /* 70 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 80 */ 1598, 1676, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 90 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1674, 1846, + /* 100 */ 2047, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 110 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 120 */ 1598, 1598, 1598, 1598, 2059, 1598, 1598, 1676, 1598, 2059, + /* 130 */ 2059, 2059, 1674, 2019, 2019, 1598, 1598, 1598, 1598, 1783, + /* 140 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1783, 1598, 1598, + /* 150 */ 1598, 1598, 1598, 1598, 1598, 1598, 1892, 1598, 1598, 2084, + /* 160 */ 2137, 1598, 1598, 2087, 1598, 1598, 1598, 1858, 1598, 1736, + /* 170 */ 2074, 2051, 2065, 2121, 2052, 2049, 2068, 1598, 2078, 1598, + /* 180 */ 1885, 1851, 1598, 1851, 1848, 1598, 1598, 1851, 1848, 1848, + /* 190 */ 1727, 1598, 1598, 1598, 1598, 1598, 1598, 1676, 1598, 1676, + /* 200 */ 1598, 1598, 1676, 1598, 1676, 1676, 1676, 1598, 1676, 1655, + /* 210 */ 1655, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 220 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1906, 1598, 1674, + /* 230 */ 1894, 1598, 1674, 1598, 1598, 1598, 1598, 2094, 2092, 1598, + /* 240 */ 2094, 2092, 1598, 1598, 1598, 2106, 2102, 2094, 2110, 2108, + /* 250 */ 2080, 2078, 2140, 2127, 2123, 2065, 1598, 1598, 1598, 1598, + /* 260 */ 1674, 1598, 2092, 1598, 1598, 1598, 1598, 1598, 2092, 1598, + /* 270 */ 1598, 1674, 1598, 1674, 1598, 1598, 1752, 1598, 1598, 1598, + /* 280 */ 1674, 1630, 1598, 1887, 1898, 1870, 1870, 1786, 1786, 1786, + /* 290 */ 1677, 1603, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 300 */ 1598, 1598, 1598, 1598, 2105, 2104, 1975, 1598, 2023, 2022, + /* 310 */ 2021, 2012, 1974, 1748, 1598, 1973, 1972, 1598, 1598, 1598, + /* 320 */ 1598, 1598, 1866, 1865, 1966, 1598, 1598, 1967, 1965, 1964, + /* 330 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 340 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 2124, 2128, + /* 350 */ 1598, 1598, 1598, 1598, 1598, 1598, 2048, 1598, 1598, 1598, + /* 360 */ 1598, 1598, 1948, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 370 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 380 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 390 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 400 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 410 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 420 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 430 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 440 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 450 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 460 */ 1598, 1635, 1953, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 470 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 480 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 490 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 500 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1715, + /* 510 */ 1714, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 520 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 530 */ 1598, 1598, 1598, 1957, 1598, 1598, 1598, 1598, 1598, 1598, + /* 540 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 2120, 2081, 1598, + /* 550 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 560 */ 1598, 1598, 1948, 1598, 2103, 1598, 1598, 2118, 1598, 2122, + /* 570 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 2058, 2054, 1598, + /* 580 */ 1598, 2050, 1598, 1598, 1598, 1598, 1956, 1598, 1598, 1598, + /* 590 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 600 */ 1947, 1598, 2009, 1598, 1598, 1598, 2043, 1598, 1598, 1994, + /* 610 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1957, + /* 620 */ 1598, 1960, 1598, 1598, 1598, 1598, 1598, 1780, 1598, 1598, + /* 630 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 640 */ 1765, 1763, 1762, 1761, 1598, 1758, 1598, 1793, 1598, 1598, + /* 650 */ 1598, 1789, 1788, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 660 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1695, 1598, + /* 670 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1687, 1598, 1686, + /* 680 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 690 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 700 */ 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, 1598, + /* 710 */ 1598, 1598, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1165,6 +1180,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* IGNORE => nothing */ 0, /* EXPIRED => nothing */ 0, /* FILL_HISTORY => nothing */ + 0, /* UPDATE => nothing */ 0, /* SUBTABLE => nothing */ 0, /* KILL => nothing */ 0, /* CONNECTION => nothing */ @@ -1198,7 +1214,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* COUNT => nothing */ 0, /* LAST_ROW => nothing */ 0, /* CASE => nothing */ - 268, /* END => ABORT */ + 269, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1240,59 +1256,58 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 268, /* AFTER => ABORT */ - 268, /* ATTACH => ABORT */ - 268, /* BEFORE => ABORT */ - 268, /* BEGIN => ABORT */ - 268, /* BITAND => ABORT */ - 268, /* BITNOT => ABORT */ - 268, /* BITOR => ABORT */ - 268, /* BLOCKS => ABORT */ - 268, /* CHANGE => ABORT */ - 268, /* COMMA => ABORT */ - 268, /* COMPACT => ABORT */ - 268, /* CONCAT => ABORT */ - 268, /* CONFLICT => ABORT */ - 268, /* COPY => ABORT */ - 268, /* DEFERRED => ABORT */ - 268, /* DELIMITERS => ABORT */ - 268, /* DETACH => ABORT */ - 268, /* DIVIDE => ABORT */ - 268, /* DOT => ABORT */ - 268, /* EACH => ABORT */ - 268, /* FAIL => ABORT */ - 268, /* FILE => ABORT */ - 268, /* FOR => ABORT */ - 268, /* GLOB => ABORT */ - 268, /* ID => ABORT */ - 268, /* IMMEDIATE => ABORT */ - 268, /* IMPORT => ABORT */ - 268, /* INITIALLY => ABORT */ - 268, /* INSTEAD => ABORT */ - 268, /* ISNULL => ABORT */ - 268, /* KEY => ABORT */ - 268, /* MODULES => ABORT */ - 268, /* NK_BITNOT => ABORT */ - 268, /* NK_SEMI => ABORT */ - 268, /* NOTNULL => ABORT */ - 268, /* OF => ABORT */ - 268, /* PLUS => ABORT */ - 268, /* PRIVILEGE => ABORT */ - 268, /* RAISE => ABORT */ - 268, /* REPLACE => ABORT */ - 268, /* RESTRICT => ABORT */ - 268, /* ROW => ABORT */ - 268, /* SEMI => ABORT */ - 268, /* STAR => ABORT */ - 268, /* STATEMENT => ABORT */ - 268, /* STRICT => ABORT */ - 268, /* STRING => ABORT */ - 268, /* TIMES => ABORT */ - 268, /* UPDATE => ABORT */ - 268, /* VALUES => ABORT */ - 268, /* VARIABLE => ABORT */ - 268, /* VIEW => ABORT */ - 268, /* WAL => ABORT */ + 269, /* AFTER => ABORT */ + 269, /* ATTACH => ABORT */ + 269, /* BEFORE => ABORT */ + 269, /* BEGIN => ABORT */ + 269, /* BITAND => ABORT */ + 269, /* BITNOT => ABORT */ + 269, /* BITOR => ABORT */ + 269, /* BLOCKS => ABORT */ + 269, /* CHANGE => ABORT */ + 269, /* COMMA => ABORT */ + 269, /* COMPACT => ABORT */ + 269, /* CONCAT => ABORT */ + 269, /* CONFLICT => ABORT */ + 269, /* COPY => ABORT */ + 269, /* DEFERRED => ABORT */ + 269, /* DELIMITERS => ABORT */ + 269, /* DETACH => ABORT */ + 269, /* DIVIDE => ABORT */ + 269, /* DOT => ABORT */ + 269, /* EACH => ABORT */ + 269, /* FAIL => ABORT */ + 269, /* FILE => ABORT */ + 269, /* FOR => ABORT */ + 269, /* GLOB => ABORT */ + 269, /* ID => ABORT */ + 269, /* IMMEDIATE => ABORT */ + 269, /* IMPORT => ABORT */ + 269, /* INITIALLY => ABORT */ + 269, /* INSTEAD => ABORT */ + 269, /* ISNULL => ABORT */ + 269, /* KEY => ABORT */ + 269, /* MODULES => ABORT */ + 269, /* NK_BITNOT => ABORT */ + 269, /* NK_SEMI => ABORT */ + 269, /* NOTNULL => ABORT */ + 269, /* OF => ABORT */ + 269, /* PLUS => ABORT */ + 269, /* PRIVILEGE => ABORT */ + 269, /* RAISE => ABORT */ + 269, /* REPLACE => ABORT */ + 269, /* RESTRICT => ABORT */ + 269, /* ROW => ABORT */ + 269, /* SEMI => ABORT */ + 269, /* STAR => ABORT */ + 269, /* STATEMENT => ABORT */ + 269, /* STRICT => ABORT */ + 269, /* STRING => ABORT */ + 269, /* TIMES => ABORT */ + 269, /* VALUES => ABORT */ + 269, /* VARIABLE => ABORT */ + 269, /* VIEW => ABORT */ + 269, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1574,130 +1589,130 @@ static const char *const yyTokenName[] = { /* 191 */ "IGNORE", /* 192 */ "EXPIRED", /* 193 */ "FILL_HISTORY", - /* 194 */ "SUBTABLE", - /* 195 */ "KILL", - /* 196 */ "CONNECTION", - /* 197 */ "TRANSACTION", - /* 198 */ "BALANCE", - /* 199 */ "VGROUP", - /* 200 */ "MERGE", - /* 201 */ "REDISTRIBUTE", - /* 202 */ "SPLIT", - /* 203 */ "DELETE", - /* 204 */ "INSERT", - /* 205 */ "NULL", - /* 206 */ "NK_QUESTION", - /* 207 */ "NK_ARROW", - /* 208 */ "ROWTS", - /* 209 */ "QSTART", - /* 210 */ "QEND", - /* 211 */ "QDURATION", - /* 212 */ "WSTART", - /* 213 */ "WEND", - /* 214 */ "WDURATION", - /* 215 */ "IROWTS", - /* 216 */ "CAST", - /* 217 */ "NOW", - /* 218 */ "TODAY", - /* 219 */ "TIMEZONE", - /* 220 */ "CLIENT_VERSION", - /* 221 */ "SERVER_VERSION", - /* 222 */ "SERVER_STATUS", - /* 223 */ "CURRENT_USER", - /* 224 */ "COUNT", - /* 225 */ "LAST_ROW", - /* 226 */ "CASE", - /* 227 */ "END", - /* 228 */ "WHEN", - /* 229 */ "THEN", - /* 230 */ "ELSE", - /* 231 */ "BETWEEN", - /* 232 */ "IS", - /* 233 */ "NK_LT", - /* 234 */ "NK_GT", - /* 235 */ "NK_LE", - /* 236 */ "NK_GE", - /* 237 */ "NK_NE", - /* 238 */ "MATCH", - /* 239 */ "NMATCH", - /* 240 */ "CONTAINS", - /* 241 */ "IN", - /* 242 */ "JOIN", - /* 243 */ "INNER", - /* 244 */ "SELECT", - /* 245 */ "DISTINCT", - /* 246 */ "WHERE", - /* 247 */ "PARTITION", - /* 248 */ "BY", - /* 249 */ "SESSION", - /* 250 */ "STATE_WINDOW", - /* 251 */ "SLIDING", - /* 252 */ "FILL", - /* 253 */ "VALUE", - /* 254 */ "NONE", - /* 255 */ "PREV", - /* 256 */ "LINEAR", - /* 257 */ "NEXT", - /* 258 */ "HAVING", - /* 259 */ "RANGE", - /* 260 */ "EVERY", - /* 261 */ "ORDER", - /* 262 */ "SLIMIT", - /* 263 */ "SOFFSET", - /* 264 */ "LIMIT", - /* 265 */ "OFFSET", - /* 266 */ "ASC", - /* 267 */ "NULLS", - /* 268 */ "ABORT", - /* 269 */ "AFTER", - /* 270 */ "ATTACH", - /* 271 */ "BEFORE", - /* 272 */ "BEGIN", - /* 273 */ "BITAND", - /* 274 */ "BITNOT", - /* 275 */ "BITOR", - /* 276 */ "BLOCKS", - /* 277 */ "CHANGE", - /* 278 */ "COMMA", - /* 279 */ "COMPACT", - /* 280 */ "CONCAT", - /* 281 */ "CONFLICT", - /* 282 */ "COPY", - /* 283 */ "DEFERRED", - /* 284 */ "DELIMITERS", - /* 285 */ "DETACH", - /* 286 */ "DIVIDE", - /* 287 */ "DOT", - /* 288 */ "EACH", - /* 289 */ "FAIL", - /* 290 */ "FILE", - /* 291 */ "FOR", - /* 292 */ "GLOB", - /* 293 */ "ID", - /* 294 */ "IMMEDIATE", - /* 295 */ "IMPORT", - /* 296 */ "INITIALLY", - /* 297 */ "INSTEAD", - /* 298 */ "ISNULL", - /* 299 */ "KEY", - /* 300 */ "MODULES", - /* 301 */ "NK_BITNOT", - /* 302 */ "NK_SEMI", - /* 303 */ "NOTNULL", - /* 304 */ "OF", - /* 305 */ "PLUS", - /* 306 */ "PRIVILEGE", - /* 307 */ "RAISE", - /* 308 */ "REPLACE", - /* 309 */ "RESTRICT", - /* 310 */ "ROW", - /* 311 */ "SEMI", - /* 312 */ "STAR", - /* 313 */ "STATEMENT", - /* 314 */ "STRICT", - /* 315 */ "STRING", - /* 316 */ "TIMES", - /* 317 */ "UPDATE", + /* 194 */ "UPDATE", + /* 195 */ "SUBTABLE", + /* 196 */ "KILL", + /* 197 */ "CONNECTION", + /* 198 */ "TRANSACTION", + /* 199 */ "BALANCE", + /* 200 */ "VGROUP", + /* 201 */ "MERGE", + /* 202 */ "REDISTRIBUTE", + /* 203 */ "SPLIT", + /* 204 */ "DELETE", + /* 205 */ "INSERT", + /* 206 */ "NULL", + /* 207 */ "NK_QUESTION", + /* 208 */ "NK_ARROW", + /* 209 */ "ROWTS", + /* 210 */ "QSTART", + /* 211 */ "QEND", + /* 212 */ "QDURATION", + /* 213 */ "WSTART", + /* 214 */ "WEND", + /* 215 */ "WDURATION", + /* 216 */ "IROWTS", + /* 217 */ "CAST", + /* 218 */ "NOW", + /* 219 */ "TODAY", + /* 220 */ "TIMEZONE", + /* 221 */ "CLIENT_VERSION", + /* 222 */ "SERVER_VERSION", + /* 223 */ "SERVER_STATUS", + /* 224 */ "CURRENT_USER", + /* 225 */ "COUNT", + /* 226 */ "LAST_ROW", + /* 227 */ "CASE", + /* 228 */ "END", + /* 229 */ "WHEN", + /* 230 */ "THEN", + /* 231 */ "ELSE", + /* 232 */ "BETWEEN", + /* 233 */ "IS", + /* 234 */ "NK_LT", + /* 235 */ "NK_GT", + /* 236 */ "NK_LE", + /* 237 */ "NK_GE", + /* 238 */ "NK_NE", + /* 239 */ "MATCH", + /* 240 */ "NMATCH", + /* 241 */ "CONTAINS", + /* 242 */ "IN", + /* 243 */ "JOIN", + /* 244 */ "INNER", + /* 245 */ "SELECT", + /* 246 */ "DISTINCT", + /* 247 */ "WHERE", + /* 248 */ "PARTITION", + /* 249 */ "BY", + /* 250 */ "SESSION", + /* 251 */ "STATE_WINDOW", + /* 252 */ "SLIDING", + /* 253 */ "FILL", + /* 254 */ "VALUE", + /* 255 */ "NONE", + /* 256 */ "PREV", + /* 257 */ "LINEAR", + /* 258 */ "NEXT", + /* 259 */ "HAVING", + /* 260 */ "RANGE", + /* 261 */ "EVERY", + /* 262 */ "ORDER", + /* 263 */ "SLIMIT", + /* 264 */ "SOFFSET", + /* 265 */ "LIMIT", + /* 266 */ "OFFSET", + /* 267 */ "ASC", + /* 268 */ "NULLS", + /* 269 */ "ABORT", + /* 270 */ "AFTER", + /* 271 */ "ATTACH", + /* 272 */ "BEFORE", + /* 273 */ "BEGIN", + /* 274 */ "BITAND", + /* 275 */ "BITNOT", + /* 276 */ "BITOR", + /* 277 */ "BLOCKS", + /* 278 */ "CHANGE", + /* 279 */ "COMMA", + /* 280 */ "COMPACT", + /* 281 */ "CONCAT", + /* 282 */ "CONFLICT", + /* 283 */ "COPY", + /* 284 */ "DEFERRED", + /* 285 */ "DELIMITERS", + /* 286 */ "DETACH", + /* 287 */ "DIVIDE", + /* 288 */ "DOT", + /* 289 */ "EACH", + /* 290 */ "FAIL", + /* 291 */ "FILE", + /* 292 */ "FOR", + /* 293 */ "GLOB", + /* 294 */ "ID", + /* 295 */ "IMMEDIATE", + /* 296 */ "IMPORT", + /* 297 */ "INITIALLY", + /* 298 */ "INSTEAD", + /* 299 */ "ISNULL", + /* 300 */ "KEY", + /* 301 */ "MODULES", + /* 302 */ "NK_BITNOT", + /* 303 */ "NK_SEMI", + /* 304 */ "NOTNULL", + /* 305 */ "OF", + /* 306 */ "PLUS", + /* 307 */ "PRIVILEGE", + /* 308 */ "RAISE", + /* 309 */ "REPLACE", + /* 310 */ "RESTRICT", + /* 311 */ "ROW", + /* 312 */ "SEMI", + /* 313 */ "STAR", + /* 314 */ "STATEMENT", + /* 315 */ "STRICT", + /* 316 */ "STRING", + /* 317 */ "TIMES", /* 318 */ "VALUES", /* 319 */ "VARIABLE", /* 320 */ "VIEW", @@ -2150,243 +2165,244 @@ static const char *const yyRuleName[] = { /* 301 */ "stream_options ::= stream_options WATERMARK duration_literal", /* 302 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", /* 303 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 304 */ "subtable_opt ::=", - /* 305 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 306 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 307 */ "cmd ::= KILL QUERY NK_STRING", - /* 308 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 309 */ "cmd ::= BALANCE VGROUP", - /* 310 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 311 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 312 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 313 */ "dnode_list ::= DNODE NK_INTEGER", - /* 314 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 315 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 316 */ "cmd ::= query_or_subquery", - /* 317 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 318 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", - /* 319 */ "literal ::= NK_INTEGER", - /* 320 */ "literal ::= NK_FLOAT", - /* 321 */ "literal ::= NK_STRING", - /* 322 */ "literal ::= NK_BOOL", - /* 323 */ "literal ::= TIMESTAMP NK_STRING", - /* 324 */ "literal ::= duration_literal", - /* 325 */ "literal ::= NULL", - /* 326 */ "literal ::= NK_QUESTION", - /* 327 */ "duration_literal ::= NK_VARIABLE", - /* 328 */ "signed ::= NK_INTEGER", - /* 329 */ "signed ::= NK_PLUS NK_INTEGER", - /* 330 */ "signed ::= NK_MINUS NK_INTEGER", - /* 331 */ "signed ::= NK_FLOAT", - /* 332 */ "signed ::= NK_PLUS NK_FLOAT", - /* 333 */ "signed ::= NK_MINUS NK_FLOAT", - /* 334 */ "signed_literal ::= signed", - /* 335 */ "signed_literal ::= NK_STRING", - /* 336 */ "signed_literal ::= NK_BOOL", - /* 337 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 338 */ "signed_literal ::= duration_literal", - /* 339 */ "signed_literal ::= NULL", - /* 340 */ "signed_literal ::= literal_func", - /* 341 */ "signed_literal ::= NK_QUESTION", - /* 342 */ "literal_list ::= signed_literal", - /* 343 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 344 */ "db_name ::= NK_ID", - /* 345 */ "table_name ::= NK_ID", - /* 346 */ "column_name ::= NK_ID", - /* 347 */ "function_name ::= NK_ID", - /* 348 */ "table_alias ::= NK_ID", - /* 349 */ "column_alias ::= NK_ID", - /* 350 */ "user_name ::= NK_ID", - /* 351 */ "topic_name ::= NK_ID", - /* 352 */ "stream_name ::= NK_ID", - /* 353 */ "cgroup_name ::= NK_ID", - /* 354 */ "index_name ::= NK_ID", - /* 355 */ "expr_or_subquery ::= expression", - /* 356 */ "expression ::= literal", - /* 357 */ "expression ::= pseudo_column", - /* 358 */ "expression ::= column_reference", - /* 359 */ "expression ::= function_expression", - /* 360 */ "expression ::= case_when_expression", - /* 361 */ "expression ::= NK_LP expression NK_RP", - /* 362 */ "expression ::= NK_PLUS expr_or_subquery", - /* 363 */ "expression ::= NK_MINUS expr_or_subquery", - /* 364 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 365 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 366 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 367 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 368 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 369 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 370 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 371 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 372 */ "expression_list ::= expr_or_subquery", - /* 373 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 374 */ "column_reference ::= column_name", - /* 375 */ "column_reference ::= table_name NK_DOT column_name", - /* 376 */ "pseudo_column ::= ROWTS", - /* 377 */ "pseudo_column ::= TBNAME", - /* 378 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 379 */ "pseudo_column ::= QSTART", - /* 380 */ "pseudo_column ::= QEND", - /* 381 */ "pseudo_column ::= QDURATION", - /* 382 */ "pseudo_column ::= WSTART", - /* 383 */ "pseudo_column ::= WEND", - /* 384 */ "pseudo_column ::= WDURATION", - /* 385 */ "pseudo_column ::= IROWTS", - /* 386 */ "pseudo_column ::= QTAGS", - /* 387 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 388 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 389 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 390 */ "function_expression ::= literal_func", - /* 391 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 392 */ "literal_func ::= NOW", - /* 393 */ "noarg_func ::= NOW", - /* 394 */ "noarg_func ::= TODAY", - /* 395 */ "noarg_func ::= TIMEZONE", - /* 396 */ "noarg_func ::= DATABASE", - /* 397 */ "noarg_func ::= CLIENT_VERSION", - /* 398 */ "noarg_func ::= SERVER_VERSION", - /* 399 */ "noarg_func ::= SERVER_STATUS", - /* 400 */ "noarg_func ::= CURRENT_USER", - /* 401 */ "noarg_func ::= USER", - /* 402 */ "star_func ::= COUNT", - /* 403 */ "star_func ::= FIRST", - /* 404 */ "star_func ::= LAST", - /* 405 */ "star_func ::= LAST_ROW", - /* 406 */ "star_func_para_list ::= NK_STAR", - /* 407 */ "star_func_para_list ::= other_para_list", - /* 408 */ "other_para_list ::= star_func_para", - /* 409 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 410 */ "star_func_para ::= expr_or_subquery", - /* 411 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 412 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 413 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 414 */ "when_then_list ::= when_then_expr", - /* 415 */ "when_then_list ::= when_then_list when_then_expr", - /* 416 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 417 */ "case_when_else_opt ::=", - /* 418 */ "case_when_else_opt ::= ELSE common_expression", - /* 419 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 420 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 421 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 422 */ "predicate ::= expr_or_subquery IS NULL", - /* 423 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 424 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 425 */ "compare_op ::= NK_LT", - /* 426 */ "compare_op ::= NK_GT", - /* 427 */ "compare_op ::= NK_LE", - /* 428 */ "compare_op ::= NK_GE", - /* 429 */ "compare_op ::= NK_NE", - /* 430 */ "compare_op ::= NK_EQ", - /* 431 */ "compare_op ::= LIKE", - /* 432 */ "compare_op ::= NOT LIKE", - /* 433 */ "compare_op ::= MATCH", - /* 434 */ "compare_op ::= NMATCH", - /* 435 */ "compare_op ::= CONTAINS", - /* 436 */ "in_op ::= IN", - /* 437 */ "in_op ::= NOT IN", - /* 438 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 439 */ "boolean_value_expression ::= boolean_primary", - /* 440 */ "boolean_value_expression ::= NOT boolean_primary", - /* 441 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 442 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 443 */ "boolean_primary ::= predicate", - /* 444 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 445 */ "common_expression ::= expr_or_subquery", - /* 446 */ "common_expression ::= boolean_value_expression", - /* 447 */ "from_clause_opt ::=", - /* 448 */ "from_clause_opt ::= FROM table_reference_list", - /* 449 */ "table_reference_list ::= table_reference", - /* 450 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 451 */ "table_reference ::= table_primary", - /* 452 */ "table_reference ::= joined_table", - /* 453 */ "table_primary ::= table_name alias_opt", - /* 454 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 455 */ "table_primary ::= subquery alias_opt", - /* 456 */ "table_primary ::= parenthesized_joined_table", - /* 457 */ "alias_opt ::=", - /* 458 */ "alias_opt ::= table_alias", - /* 459 */ "alias_opt ::= AS table_alias", - /* 460 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 461 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 462 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 463 */ "join_type ::=", - /* 464 */ "join_type ::= INNER", - /* 465 */ "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", - /* 466 */ "set_quantifier_opt ::=", - /* 467 */ "set_quantifier_opt ::= DISTINCT", - /* 468 */ "set_quantifier_opt ::= ALL", - /* 469 */ "select_list ::= select_item", - /* 470 */ "select_list ::= select_list NK_COMMA select_item", - /* 471 */ "select_item ::= NK_STAR", - /* 472 */ "select_item ::= common_expression", - /* 473 */ "select_item ::= common_expression column_alias", - /* 474 */ "select_item ::= common_expression AS column_alias", - /* 475 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 476 */ "where_clause_opt ::=", - /* 477 */ "where_clause_opt ::= WHERE search_condition", - /* 478 */ "partition_by_clause_opt ::=", - /* 479 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 480 */ "partition_list ::= partition_item", - /* 481 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 482 */ "partition_item ::= expr_or_subquery", - /* 483 */ "partition_item ::= expr_or_subquery column_alias", - /* 484 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 485 */ "twindow_clause_opt ::=", - /* 486 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 487 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 488 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 489 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 490 */ "sliding_opt ::=", - /* 491 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 492 */ "fill_opt ::=", - /* 493 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 494 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 495 */ "fill_mode ::= NONE", - /* 496 */ "fill_mode ::= PREV", - /* 497 */ "fill_mode ::= NULL", - /* 498 */ "fill_mode ::= LINEAR", - /* 499 */ "fill_mode ::= NEXT", - /* 500 */ "group_by_clause_opt ::=", - /* 501 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 502 */ "group_by_list ::= expr_or_subquery", - /* 503 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 504 */ "having_clause_opt ::=", - /* 505 */ "having_clause_opt ::= HAVING search_condition", - /* 506 */ "range_opt ::=", - /* 507 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 508 */ "every_opt ::=", - /* 509 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 510 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 511 */ "query_simple ::= query_specification", - /* 512 */ "query_simple ::= union_query_expression", - /* 513 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 514 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 515 */ "query_simple_or_subquery ::= query_simple", - /* 516 */ "query_simple_or_subquery ::= subquery", - /* 517 */ "query_or_subquery ::= query_expression", - /* 518 */ "query_or_subquery ::= subquery", - /* 519 */ "order_by_clause_opt ::=", - /* 520 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 521 */ "slimit_clause_opt ::=", - /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 523 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 524 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 525 */ "limit_clause_opt ::=", - /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 527 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 528 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 529 */ "subquery ::= NK_LP query_expression NK_RP", - /* 530 */ "subquery ::= NK_LP subquery NK_RP", - /* 531 */ "search_condition ::= common_expression", - /* 532 */ "sort_specification_list ::= sort_specification", - /* 533 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 534 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 535 */ "ordering_specification_opt ::=", - /* 536 */ "ordering_specification_opt ::= ASC", - /* 537 */ "ordering_specification_opt ::= DESC", - /* 538 */ "null_ordering_opt ::=", - /* 539 */ "null_ordering_opt ::= NULLS FIRST", - /* 540 */ "null_ordering_opt ::= NULLS LAST", + /* 304 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER", + /* 305 */ "subtable_opt ::=", + /* 306 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 307 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 308 */ "cmd ::= KILL QUERY NK_STRING", + /* 309 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 310 */ "cmd ::= BALANCE VGROUP", + /* 311 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 312 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 313 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 314 */ "dnode_list ::= DNODE NK_INTEGER", + /* 315 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 316 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 317 */ "cmd ::= query_or_subquery", + /* 318 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 319 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", + /* 320 */ "literal ::= NK_INTEGER", + /* 321 */ "literal ::= NK_FLOAT", + /* 322 */ "literal ::= NK_STRING", + /* 323 */ "literal ::= NK_BOOL", + /* 324 */ "literal ::= TIMESTAMP NK_STRING", + /* 325 */ "literal ::= duration_literal", + /* 326 */ "literal ::= NULL", + /* 327 */ "literal ::= NK_QUESTION", + /* 328 */ "duration_literal ::= NK_VARIABLE", + /* 329 */ "signed ::= NK_INTEGER", + /* 330 */ "signed ::= NK_PLUS NK_INTEGER", + /* 331 */ "signed ::= NK_MINUS NK_INTEGER", + /* 332 */ "signed ::= NK_FLOAT", + /* 333 */ "signed ::= NK_PLUS NK_FLOAT", + /* 334 */ "signed ::= NK_MINUS NK_FLOAT", + /* 335 */ "signed_literal ::= signed", + /* 336 */ "signed_literal ::= NK_STRING", + /* 337 */ "signed_literal ::= NK_BOOL", + /* 338 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 339 */ "signed_literal ::= duration_literal", + /* 340 */ "signed_literal ::= NULL", + /* 341 */ "signed_literal ::= literal_func", + /* 342 */ "signed_literal ::= NK_QUESTION", + /* 343 */ "literal_list ::= signed_literal", + /* 344 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 345 */ "db_name ::= NK_ID", + /* 346 */ "table_name ::= NK_ID", + /* 347 */ "column_name ::= NK_ID", + /* 348 */ "function_name ::= NK_ID", + /* 349 */ "table_alias ::= NK_ID", + /* 350 */ "column_alias ::= NK_ID", + /* 351 */ "user_name ::= NK_ID", + /* 352 */ "topic_name ::= NK_ID", + /* 353 */ "stream_name ::= NK_ID", + /* 354 */ "cgroup_name ::= NK_ID", + /* 355 */ "index_name ::= NK_ID", + /* 356 */ "expr_or_subquery ::= expression", + /* 357 */ "expression ::= literal", + /* 358 */ "expression ::= pseudo_column", + /* 359 */ "expression ::= column_reference", + /* 360 */ "expression ::= function_expression", + /* 361 */ "expression ::= case_when_expression", + /* 362 */ "expression ::= NK_LP expression NK_RP", + /* 363 */ "expression ::= NK_PLUS expr_or_subquery", + /* 364 */ "expression ::= NK_MINUS expr_or_subquery", + /* 365 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 366 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 367 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 368 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 369 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 370 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 371 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 372 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 373 */ "expression_list ::= expr_or_subquery", + /* 374 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 375 */ "column_reference ::= column_name", + /* 376 */ "column_reference ::= table_name NK_DOT column_name", + /* 377 */ "pseudo_column ::= ROWTS", + /* 378 */ "pseudo_column ::= TBNAME", + /* 379 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 380 */ "pseudo_column ::= QSTART", + /* 381 */ "pseudo_column ::= QEND", + /* 382 */ "pseudo_column ::= QDURATION", + /* 383 */ "pseudo_column ::= WSTART", + /* 384 */ "pseudo_column ::= WEND", + /* 385 */ "pseudo_column ::= WDURATION", + /* 386 */ "pseudo_column ::= IROWTS", + /* 387 */ "pseudo_column ::= QTAGS", + /* 388 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 389 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 390 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 391 */ "function_expression ::= literal_func", + /* 392 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 393 */ "literal_func ::= NOW", + /* 394 */ "noarg_func ::= NOW", + /* 395 */ "noarg_func ::= TODAY", + /* 396 */ "noarg_func ::= TIMEZONE", + /* 397 */ "noarg_func ::= DATABASE", + /* 398 */ "noarg_func ::= CLIENT_VERSION", + /* 399 */ "noarg_func ::= SERVER_VERSION", + /* 400 */ "noarg_func ::= SERVER_STATUS", + /* 401 */ "noarg_func ::= CURRENT_USER", + /* 402 */ "noarg_func ::= USER", + /* 403 */ "star_func ::= COUNT", + /* 404 */ "star_func ::= FIRST", + /* 405 */ "star_func ::= LAST", + /* 406 */ "star_func ::= LAST_ROW", + /* 407 */ "star_func_para_list ::= NK_STAR", + /* 408 */ "star_func_para_list ::= other_para_list", + /* 409 */ "other_para_list ::= star_func_para", + /* 410 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 411 */ "star_func_para ::= expr_or_subquery", + /* 412 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 413 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 414 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 415 */ "when_then_list ::= when_then_expr", + /* 416 */ "when_then_list ::= when_then_list when_then_expr", + /* 417 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 418 */ "case_when_else_opt ::=", + /* 419 */ "case_when_else_opt ::= ELSE common_expression", + /* 420 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 421 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 422 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 423 */ "predicate ::= expr_or_subquery IS NULL", + /* 424 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 425 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 426 */ "compare_op ::= NK_LT", + /* 427 */ "compare_op ::= NK_GT", + /* 428 */ "compare_op ::= NK_LE", + /* 429 */ "compare_op ::= NK_GE", + /* 430 */ "compare_op ::= NK_NE", + /* 431 */ "compare_op ::= NK_EQ", + /* 432 */ "compare_op ::= LIKE", + /* 433 */ "compare_op ::= NOT LIKE", + /* 434 */ "compare_op ::= MATCH", + /* 435 */ "compare_op ::= NMATCH", + /* 436 */ "compare_op ::= CONTAINS", + /* 437 */ "in_op ::= IN", + /* 438 */ "in_op ::= NOT IN", + /* 439 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 440 */ "boolean_value_expression ::= boolean_primary", + /* 441 */ "boolean_value_expression ::= NOT boolean_primary", + /* 442 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 443 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 444 */ "boolean_primary ::= predicate", + /* 445 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 446 */ "common_expression ::= expr_or_subquery", + /* 447 */ "common_expression ::= boolean_value_expression", + /* 448 */ "from_clause_opt ::=", + /* 449 */ "from_clause_opt ::= FROM table_reference_list", + /* 450 */ "table_reference_list ::= table_reference", + /* 451 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 452 */ "table_reference ::= table_primary", + /* 453 */ "table_reference ::= joined_table", + /* 454 */ "table_primary ::= table_name alias_opt", + /* 455 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 456 */ "table_primary ::= subquery alias_opt", + /* 457 */ "table_primary ::= parenthesized_joined_table", + /* 458 */ "alias_opt ::=", + /* 459 */ "alias_opt ::= table_alias", + /* 460 */ "alias_opt ::= AS table_alias", + /* 461 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 462 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 463 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 464 */ "join_type ::=", + /* 465 */ "join_type ::= INNER", + /* 466 */ "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", + /* 467 */ "set_quantifier_opt ::=", + /* 468 */ "set_quantifier_opt ::= DISTINCT", + /* 469 */ "set_quantifier_opt ::= ALL", + /* 470 */ "select_list ::= select_item", + /* 471 */ "select_list ::= select_list NK_COMMA select_item", + /* 472 */ "select_item ::= NK_STAR", + /* 473 */ "select_item ::= common_expression", + /* 474 */ "select_item ::= common_expression column_alias", + /* 475 */ "select_item ::= common_expression AS column_alias", + /* 476 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 477 */ "where_clause_opt ::=", + /* 478 */ "where_clause_opt ::= WHERE search_condition", + /* 479 */ "partition_by_clause_opt ::=", + /* 480 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 481 */ "partition_list ::= partition_item", + /* 482 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 483 */ "partition_item ::= expr_or_subquery", + /* 484 */ "partition_item ::= expr_or_subquery column_alias", + /* 485 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 486 */ "twindow_clause_opt ::=", + /* 487 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 488 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 489 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 490 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 491 */ "sliding_opt ::=", + /* 492 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 493 */ "fill_opt ::=", + /* 494 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 495 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 496 */ "fill_mode ::= NONE", + /* 497 */ "fill_mode ::= PREV", + /* 498 */ "fill_mode ::= NULL", + /* 499 */ "fill_mode ::= LINEAR", + /* 500 */ "fill_mode ::= NEXT", + /* 501 */ "group_by_clause_opt ::=", + /* 502 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 503 */ "group_by_list ::= expr_or_subquery", + /* 504 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 505 */ "having_clause_opt ::=", + /* 506 */ "having_clause_opt ::= HAVING search_condition", + /* 507 */ "range_opt ::=", + /* 508 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 509 */ "every_opt ::=", + /* 510 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 511 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 512 */ "query_simple ::= query_specification", + /* 513 */ "query_simple ::= union_query_expression", + /* 514 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 515 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 516 */ "query_simple_or_subquery ::= query_simple", + /* 517 */ "query_simple_or_subquery ::= subquery", + /* 518 */ "query_or_subquery ::= query_expression", + /* 519 */ "query_or_subquery ::= subquery", + /* 520 */ "order_by_clause_opt ::=", + /* 521 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 522 */ "slimit_clause_opt ::=", + /* 523 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 524 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 525 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 526 */ "limit_clause_opt ::=", + /* 527 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 528 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 529 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 530 */ "subquery ::= NK_LP query_expression NK_RP", + /* 531 */ "subquery ::= NK_LP subquery NK_RP", + /* 532 */ "search_condition ::= common_expression", + /* 533 */ "sort_specification_list ::= sort_specification", + /* 534 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 535 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 536 */ "ordering_specification_opt ::=", + /* 537 */ "ordering_specification_opt ::= ASC", + /* 538 */ "ordering_specification_opt ::= DESC", + /* 539 */ "null_ordering_opt ::=", + /* 540 */ "null_ordering_opt ::= NULLS FIRST", + /* 541 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -3304,243 +3320,244 @@ static const struct { { 394, -3 }, /* (301) stream_options ::= stream_options WATERMARK duration_literal */ { 394, -4 }, /* (302) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ { 394, -3 }, /* (303) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 395, 0 }, /* (304) subtable_opt ::= */ - { 395, -4 }, /* (305) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 322, -3 }, /* (306) cmd ::= KILL CONNECTION NK_INTEGER */ - { 322, -3 }, /* (307) cmd ::= KILL QUERY NK_STRING */ - { 322, -3 }, /* (308) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 322, -2 }, /* (309) cmd ::= BALANCE VGROUP */ - { 322, -4 }, /* (310) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 322, -4 }, /* (311) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 322, -3 }, /* (312) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 397, -2 }, /* (313) dnode_list ::= DNODE NK_INTEGER */ - { 397, -3 }, /* (314) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 322, -4 }, /* (315) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 322, -1 }, /* (316) cmd ::= query_or_subquery */ - { 322, -7 }, /* (317) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 322, -4 }, /* (318) cmd ::= INSERT INTO full_table_name query_or_subquery */ - { 325, -1 }, /* (319) literal ::= NK_INTEGER */ - { 325, -1 }, /* (320) literal ::= NK_FLOAT */ - { 325, -1 }, /* (321) literal ::= NK_STRING */ - { 325, -1 }, /* (322) literal ::= NK_BOOL */ - { 325, -2 }, /* (323) literal ::= TIMESTAMP NK_STRING */ - { 325, -1 }, /* (324) literal ::= duration_literal */ - { 325, -1 }, /* (325) literal ::= NULL */ - { 325, -1 }, /* (326) literal ::= NK_QUESTION */ - { 369, -1 }, /* (327) duration_literal ::= NK_VARIABLE */ - { 399, -1 }, /* (328) signed ::= NK_INTEGER */ - { 399, -2 }, /* (329) signed ::= NK_PLUS NK_INTEGER */ - { 399, -2 }, /* (330) signed ::= NK_MINUS NK_INTEGER */ - { 399, -1 }, /* (331) signed ::= NK_FLOAT */ - { 399, -2 }, /* (332) signed ::= NK_PLUS NK_FLOAT */ - { 399, -2 }, /* (333) signed ::= NK_MINUS NK_FLOAT */ - { 358, -1 }, /* (334) signed_literal ::= signed */ - { 358, -1 }, /* (335) signed_literal ::= NK_STRING */ - { 358, -1 }, /* (336) signed_literal ::= NK_BOOL */ - { 358, -2 }, /* (337) signed_literal ::= TIMESTAMP NK_STRING */ - { 358, -1 }, /* (338) signed_literal ::= duration_literal */ - { 358, -1 }, /* (339) signed_literal ::= NULL */ - { 358, -1 }, /* (340) signed_literal ::= literal_func */ - { 358, -1 }, /* (341) signed_literal ::= NK_QUESTION */ - { 401, -1 }, /* (342) literal_list ::= signed_literal */ - { 401, -3 }, /* (343) literal_list ::= literal_list NK_COMMA signed_literal */ - { 333, -1 }, /* (344) db_name ::= NK_ID */ - { 364, -1 }, /* (345) table_name ::= NK_ID */ - { 356, -1 }, /* (346) column_name ::= NK_ID */ - { 371, -1 }, /* (347) function_name ::= NK_ID */ - { 402, -1 }, /* (348) table_alias ::= NK_ID */ - { 379, -1 }, /* (349) column_alias ::= NK_ID */ - { 327, -1 }, /* (350) user_name ::= NK_ID */ - { 334, -1 }, /* (351) topic_name ::= NK_ID */ - { 393, -1 }, /* (352) stream_name ::= NK_ID */ - { 388, -1 }, /* (353) cgroup_name ::= NK_ID */ - { 382, -1 }, /* (354) index_name ::= NK_ID */ - { 403, -1 }, /* (355) expr_or_subquery ::= expression */ - { 396, -1 }, /* (356) expression ::= literal */ - { 396, -1 }, /* (357) expression ::= pseudo_column */ - { 396, -1 }, /* (358) expression ::= column_reference */ - { 396, -1 }, /* (359) expression ::= function_expression */ - { 396, -1 }, /* (360) expression ::= case_when_expression */ - { 396, -3 }, /* (361) expression ::= NK_LP expression NK_RP */ - { 396, -2 }, /* (362) expression ::= NK_PLUS expr_or_subquery */ - { 396, -2 }, /* (363) expression ::= NK_MINUS expr_or_subquery */ - { 396, -3 }, /* (364) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 396, -3 }, /* (365) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 396, -3 }, /* (366) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 396, -3 }, /* (367) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 396, -3 }, /* (368) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 396, -3 }, /* (369) expression ::= column_reference NK_ARROW NK_STRING */ - { 396, -3 }, /* (370) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 396, -3 }, /* (371) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 361, -1 }, /* (372) expression_list ::= expr_or_subquery */ - { 361, -3 }, /* (373) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 405, -1 }, /* (374) column_reference ::= column_name */ - { 405, -3 }, /* (375) column_reference ::= table_name NK_DOT column_name */ - { 404, -1 }, /* (376) pseudo_column ::= ROWTS */ - { 404, -1 }, /* (377) pseudo_column ::= TBNAME */ - { 404, -3 }, /* (378) pseudo_column ::= table_name NK_DOT TBNAME */ - { 404, -1 }, /* (379) pseudo_column ::= QSTART */ - { 404, -1 }, /* (380) pseudo_column ::= QEND */ - { 404, -1 }, /* (381) pseudo_column ::= QDURATION */ - { 404, -1 }, /* (382) pseudo_column ::= WSTART */ - { 404, -1 }, /* (383) pseudo_column ::= WEND */ - { 404, -1 }, /* (384) pseudo_column ::= WDURATION */ - { 404, -1 }, /* (385) pseudo_column ::= IROWTS */ - { 404, -1 }, /* (386) pseudo_column ::= QTAGS */ - { 406, -4 }, /* (387) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 406, -4 }, /* (388) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 406, -6 }, /* (389) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 406, -1 }, /* (390) function_expression ::= literal_func */ - { 400, -3 }, /* (391) literal_func ::= noarg_func NK_LP NK_RP */ - { 400, -1 }, /* (392) literal_func ::= NOW */ - { 410, -1 }, /* (393) noarg_func ::= NOW */ - { 410, -1 }, /* (394) noarg_func ::= TODAY */ - { 410, -1 }, /* (395) noarg_func ::= TIMEZONE */ - { 410, -1 }, /* (396) noarg_func ::= DATABASE */ - { 410, -1 }, /* (397) noarg_func ::= CLIENT_VERSION */ - { 410, -1 }, /* (398) noarg_func ::= SERVER_VERSION */ - { 410, -1 }, /* (399) noarg_func ::= SERVER_STATUS */ - { 410, -1 }, /* (400) noarg_func ::= CURRENT_USER */ - { 410, -1 }, /* (401) noarg_func ::= USER */ - { 408, -1 }, /* (402) star_func ::= COUNT */ - { 408, -1 }, /* (403) star_func ::= FIRST */ - { 408, -1 }, /* (404) star_func ::= LAST */ - { 408, -1 }, /* (405) star_func ::= LAST_ROW */ - { 409, -1 }, /* (406) star_func_para_list ::= NK_STAR */ - { 409, -1 }, /* (407) star_func_para_list ::= other_para_list */ - { 411, -1 }, /* (408) other_para_list ::= star_func_para */ - { 411, -3 }, /* (409) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 412, -1 }, /* (410) star_func_para ::= expr_or_subquery */ - { 412, -3 }, /* (411) star_func_para ::= table_name NK_DOT NK_STAR */ - { 407, -4 }, /* (412) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 407, -5 }, /* (413) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 413, -1 }, /* (414) when_then_list ::= when_then_expr */ - { 413, -2 }, /* (415) when_then_list ::= when_then_list when_then_expr */ - { 416, -4 }, /* (416) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 414, 0 }, /* (417) case_when_else_opt ::= */ - { 414, -2 }, /* (418) case_when_else_opt ::= ELSE common_expression */ - { 417, -3 }, /* (419) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 417, -5 }, /* (420) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 417, -6 }, /* (421) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 417, -3 }, /* (422) predicate ::= expr_or_subquery IS NULL */ - { 417, -4 }, /* (423) predicate ::= expr_or_subquery IS NOT NULL */ - { 417, -3 }, /* (424) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 418, -1 }, /* (425) compare_op ::= NK_LT */ - { 418, -1 }, /* (426) compare_op ::= NK_GT */ - { 418, -1 }, /* (427) compare_op ::= NK_LE */ - { 418, -1 }, /* (428) compare_op ::= NK_GE */ - { 418, -1 }, /* (429) compare_op ::= NK_NE */ - { 418, -1 }, /* (430) compare_op ::= NK_EQ */ - { 418, -1 }, /* (431) compare_op ::= LIKE */ - { 418, -2 }, /* (432) compare_op ::= NOT LIKE */ - { 418, -1 }, /* (433) compare_op ::= MATCH */ - { 418, -1 }, /* (434) compare_op ::= NMATCH */ - { 418, -1 }, /* (435) compare_op ::= CONTAINS */ - { 419, -1 }, /* (436) in_op ::= IN */ - { 419, -2 }, /* (437) in_op ::= NOT IN */ - { 420, -3 }, /* (438) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 421, -1 }, /* (439) boolean_value_expression ::= boolean_primary */ - { 421, -2 }, /* (440) boolean_value_expression ::= NOT boolean_primary */ - { 421, -3 }, /* (441) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 421, -3 }, /* (442) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 422, -1 }, /* (443) boolean_primary ::= predicate */ - { 422, -3 }, /* (444) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 415, -1 }, /* (445) common_expression ::= expr_or_subquery */ - { 415, -1 }, /* (446) common_expression ::= boolean_value_expression */ - { 423, 0 }, /* (447) from_clause_opt ::= */ - { 423, -2 }, /* (448) from_clause_opt ::= FROM table_reference_list */ - { 424, -1 }, /* (449) table_reference_list ::= table_reference */ - { 424, -3 }, /* (450) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 425, -1 }, /* (451) table_reference ::= table_primary */ - { 425, -1 }, /* (452) table_reference ::= joined_table */ - { 426, -2 }, /* (453) table_primary ::= table_name alias_opt */ - { 426, -4 }, /* (454) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 426, -2 }, /* (455) table_primary ::= subquery alias_opt */ - { 426, -1 }, /* (456) table_primary ::= parenthesized_joined_table */ - { 428, 0 }, /* (457) alias_opt ::= */ - { 428, -1 }, /* (458) alias_opt ::= table_alias */ - { 428, -2 }, /* (459) alias_opt ::= AS table_alias */ - { 430, -3 }, /* (460) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 430, -3 }, /* (461) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 427, -6 }, /* (462) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 431, 0 }, /* (463) join_type ::= */ - { 431, -1 }, /* (464) join_type ::= INNER */ - { 433, -12 }, /* (465) 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 */ - { 434, 0 }, /* (466) set_quantifier_opt ::= */ - { 434, -1 }, /* (467) set_quantifier_opt ::= DISTINCT */ - { 434, -1 }, /* (468) set_quantifier_opt ::= ALL */ - { 435, -1 }, /* (469) select_list ::= select_item */ - { 435, -3 }, /* (470) select_list ::= select_list NK_COMMA select_item */ - { 443, -1 }, /* (471) select_item ::= NK_STAR */ - { 443, -1 }, /* (472) select_item ::= common_expression */ - { 443, -2 }, /* (473) select_item ::= common_expression column_alias */ - { 443, -3 }, /* (474) select_item ::= common_expression AS column_alias */ - { 443, -3 }, /* (475) select_item ::= table_name NK_DOT NK_STAR */ - { 398, 0 }, /* (476) where_clause_opt ::= */ - { 398, -2 }, /* (477) where_clause_opt ::= WHERE search_condition */ - { 436, 0 }, /* (478) partition_by_clause_opt ::= */ - { 436, -3 }, /* (479) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 444, -1 }, /* (480) partition_list ::= partition_item */ - { 444, -3 }, /* (481) partition_list ::= partition_list NK_COMMA partition_item */ - { 445, -1 }, /* (482) partition_item ::= expr_or_subquery */ - { 445, -2 }, /* (483) partition_item ::= expr_or_subquery column_alias */ - { 445, -3 }, /* (484) partition_item ::= expr_or_subquery AS column_alias */ - { 440, 0 }, /* (485) twindow_clause_opt ::= */ - { 440, -6 }, /* (486) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 440, -4 }, /* (487) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 440, -6 }, /* (488) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 440, -8 }, /* (489) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 384, 0 }, /* (490) sliding_opt ::= */ - { 384, -4 }, /* (491) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 439, 0 }, /* (492) fill_opt ::= */ - { 439, -4 }, /* (493) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 439, -6 }, /* (494) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 446, -1 }, /* (495) fill_mode ::= NONE */ - { 446, -1 }, /* (496) fill_mode ::= PREV */ - { 446, -1 }, /* (497) fill_mode ::= NULL */ - { 446, -1 }, /* (498) fill_mode ::= LINEAR */ - { 446, -1 }, /* (499) fill_mode ::= NEXT */ - { 441, 0 }, /* (500) group_by_clause_opt ::= */ - { 441, -3 }, /* (501) group_by_clause_opt ::= GROUP BY group_by_list */ - { 447, -1 }, /* (502) group_by_list ::= expr_or_subquery */ - { 447, -3 }, /* (503) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 442, 0 }, /* (504) having_clause_opt ::= */ - { 442, -2 }, /* (505) having_clause_opt ::= HAVING search_condition */ - { 437, 0 }, /* (506) range_opt ::= */ - { 437, -6 }, /* (507) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 438, 0 }, /* (508) every_opt ::= */ - { 438, -4 }, /* (509) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 448, -4 }, /* (510) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 449, -1 }, /* (511) query_simple ::= query_specification */ - { 449, -1 }, /* (512) query_simple ::= union_query_expression */ - { 453, -4 }, /* (513) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 453, -3 }, /* (514) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 454, -1 }, /* (515) query_simple_or_subquery ::= query_simple */ - { 454, -1 }, /* (516) query_simple_or_subquery ::= subquery */ - { 387, -1 }, /* (517) query_or_subquery ::= query_expression */ - { 387, -1 }, /* (518) query_or_subquery ::= subquery */ - { 450, 0 }, /* (519) order_by_clause_opt ::= */ - { 450, -3 }, /* (520) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 451, 0 }, /* (521) slimit_clause_opt ::= */ - { 451, -2 }, /* (522) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 451, -4 }, /* (523) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 451, -4 }, /* (524) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 452, 0 }, /* (525) limit_clause_opt ::= */ - { 452, -2 }, /* (526) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 452, -4 }, /* (527) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 452, -4 }, /* (528) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 429, -3 }, /* (529) subquery ::= NK_LP query_expression NK_RP */ - { 429, -3 }, /* (530) subquery ::= NK_LP subquery NK_RP */ - { 432, -1 }, /* (531) search_condition ::= common_expression */ - { 455, -1 }, /* (532) sort_specification_list ::= sort_specification */ - { 455, -3 }, /* (533) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 456, -3 }, /* (534) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 457, 0 }, /* (535) ordering_specification_opt ::= */ - { 457, -1 }, /* (536) ordering_specification_opt ::= ASC */ - { 457, -1 }, /* (537) ordering_specification_opt ::= DESC */ - { 458, 0 }, /* (538) null_ordering_opt ::= */ - { 458, -2 }, /* (539) null_ordering_opt ::= NULLS FIRST */ - { 458, -2 }, /* (540) null_ordering_opt ::= NULLS LAST */ + { 394, -4 }, /* (304) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ + { 395, 0 }, /* (305) subtable_opt ::= */ + { 395, -4 }, /* (306) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 322, -3 }, /* (307) cmd ::= KILL CONNECTION NK_INTEGER */ + { 322, -3 }, /* (308) cmd ::= KILL QUERY NK_STRING */ + { 322, -3 }, /* (309) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 322, -2 }, /* (310) cmd ::= BALANCE VGROUP */ + { 322, -4 }, /* (311) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 322, -4 }, /* (312) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 322, -3 }, /* (313) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 397, -2 }, /* (314) dnode_list ::= DNODE NK_INTEGER */ + { 397, -3 }, /* (315) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 322, -4 }, /* (316) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 322, -1 }, /* (317) cmd ::= query_or_subquery */ + { 322, -7 }, /* (318) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 322, -4 }, /* (319) cmd ::= INSERT INTO full_table_name query_or_subquery */ + { 325, -1 }, /* (320) literal ::= NK_INTEGER */ + { 325, -1 }, /* (321) literal ::= NK_FLOAT */ + { 325, -1 }, /* (322) literal ::= NK_STRING */ + { 325, -1 }, /* (323) literal ::= NK_BOOL */ + { 325, -2 }, /* (324) literal ::= TIMESTAMP NK_STRING */ + { 325, -1 }, /* (325) literal ::= duration_literal */ + { 325, -1 }, /* (326) literal ::= NULL */ + { 325, -1 }, /* (327) literal ::= NK_QUESTION */ + { 369, -1 }, /* (328) duration_literal ::= NK_VARIABLE */ + { 399, -1 }, /* (329) signed ::= NK_INTEGER */ + { 399, -2 }, /* (330) signed ::= NK_PLUS NK_INTEGER */ + { 399, -2 }, /* (331) signed ::= NK_MINUS NK_INTEGER */ + { 399, -1 }, /* (332) signed ::= NK_FLOAT */ + { 399, -2 }, /* (333) signed ::= NK_PLUS NK_FLOAT */ + { 399, -2 }, /* (334) signed ::= NK_MINUS NK_FLOAT */ + { 358, -1 }, /* (335) signed_literal ::= signed */ + { 358, -1 }, /* (336) signed_literal ::= NK_STRING */ + { 358, -1 }, /* (337) signed_literal ::= NK_BOOL */ + { 358, -2 }, /* (338) signed_literal ::= TIMESTAMP NK_STRING */ + { 358, -1 }, /* (339) signed_literal ::= duration_literal */ + { 358, -1 }, /* (340) signed_literal ::= NULL */ + { 358, -1 }, /* (341) signed_literal ::= literal_func */ + { 358, -1 }, /* (342) signed_literal ::= NK_QUESTION */ + { 401, -1 }, /* (343) literal_list ::= signed_literal */ + { 401, -3 }, /* (344) literal_list ::= literal_list NK_COMMA signed_literal */ + { 333, -1 }, /* (345) db_name ::= NK_ID */ + { 364, -1 }, /* (346) table_name ::= NK_ID */ + { 356, -1 }, /* (347) column_name ::= NK_ID */ + { 371, -1 }, /* (348) function_name ::= NK_ID */ + { 402, -1 }, /* (349) table_alias ::= NK_ID */ + { 379, -1 }, /* (350) column_alias ::= NK_ID */ + { 327, -1 }, /* (351) user_name ::= NK_ID */ + { 334, -1 }, /* (352) topic_name ::= NK_ID */ + { 393, -1 }, /* (353) stream_name ::= NK_ID */ + { 388, -1 }, /* (354) cgroup_name ::= NK_ID */ + { 382, -1 }, /* (355) index_name ::= NK_ID */ + { 403, -1 }, /* (356) expr_or_subquery ::= expression */ + { 396, -1 }, /* (357) expression ::= literal */ + { 396, -1 }, /* (358) expression ::= pseudo_column */ + { 396, -1 }, /* (359) expression ::= column_reference */ + { 396, -1 }, /* (360) expression ::= function_expression */ + { 396, -1 }, /* (361) expression ::= case_when_expression */ + { 396, -3 }, /* (362) expression ::= NK_LP expression NK_RP */ + { 396, -2 }, /* (363) expression ::= NK_PLUS expr_or_subquery */ + { 396, -2 }, /* (364) expression ::= NK_MINUS expr_or_subquery */ + { 396, -3 }, /* (365) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 396, -3 }, /* (366) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 396, -3 }, /* (367) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 396, -3 }, /* (368) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 396, -3 }, /* (369) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 396, -3 }, /* (370) expression ::= column_reference NK_ARROW NK_STRING */ + { 396, -3 }, /* (371) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 396, -3 }, /* (372) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 361, -1 }, /* (373) expression_list ::= expr_or_subquery */ + { 361, -3 }, /* (374) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 405, -1 }, /* (375) column_reference ::= column_name */ + { 405, -3 }, /* (376) column_reference ::= table_name NK_DOT column_name */ + { 404, -1 }, /* (377) pseudo_column ::= ROWTS */ + { 404, -1 }, /* (378) pseudo_column ::= TBNAME */ + { 404, -3 }, /* (379) pseudo_column ::= table_name NK_DOT TBNAME */ + { 404, -1 }, /* (380) pseudo_column ::= QSTART */ + { 404, -1 }, /* (381) pseudo_column ::= QEND */ + { 404, -1 }, /* (382) pseudo_column ::= QDURATION */ + { 404, -1 }, /* (383) pseudo_column ::= WSTART */ + { 404, -1 }, /* (384) pseudo_column ::= WEND */ + { 404, -1 }, /* (385) pseudo_column ::= WDURATION */ + { 404, -1 }, /* (386) pseudo_column ::= IROWTS */ + { 404, -1 }, /* (387) pseudo_column ::= QTAGS */ + { 406, -4 }, /* (388) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 406, -4 }, /* (389) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 406, -6 }, /* (390) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 406, -1 }, /* (391) function_expression ::= literal_func */ + { 400, -3 }, /* (392) literal_func ::= noarg_func NK_LP NK_RP */ + { 400, -1 }, /* (393) literal_func ::= NOW */ + { 410, -1 }, /* (394) noarg_func ::= NOW */ + { 410, -1 }, /* (395) noarg_func ::= TODAY */ + { 410, -1 }, /* (396) noarg_func ::= TIMEZONE */ + { 410, -1 }, /* (397) noarg_func ::= DATABASE */ + { 410, -1 }, /* (398) noarg_func ::= CLIENT_VERSION */ + { 410, -1 }, /* (399) noarg_func ::= SERVER_VERSION */ + { 410, -1 }, /* (400) noarg_func ::= SERVER_STATUS */ + { 410, -1 }, /* (401) noarg_func ::= CURRENT_USER */ + { 410, -1 }, /* (402) noarg_func ::= USER */ + { 408, -1 }, /* (403) star_func ::= COUNT */ + { 408, -1 }, /* (404) star_func ::= FIRST */ + { 408, -1 }, /* (405) star_func ::= LAST */ + { 408, -1 }, /* (406) star_func ::= LAST_ROW */ + { 409, -1 }, /* (407) star_func_para_list ::= NK_STAR */ + { 409, -1 }, /* (408) star_func_para_list ::= other_para_list */ + { 411, -1 }, /* (409) other_para_list ::= star_func_para */ + { 411, -3 }, /* (410) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 412, -1 }, /* (411) star_func_para ::= expr_or_subquery */ + { 412, -3 }, /* (412) star_func_para ::= table_name NK_DOT NK_STAR */ + { 407, -4 }, /* (413) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 407, -5 }, /* (414) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 413, -1 }, /* (415) when_then_list ::= when_then_expr */ + { 413, -2 }, /* (416) when_then_list ::= when_then_list when_then_expr */ + { 416, -4 }, /* (417) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 414, 0 }, /* (418) case_when_else_opt ::= */ + { 414, -2 }, /* (419) case_when_else_opt ::= ELSE common_expression */ + { 417, -3 }, /* (420) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 417, -5 }, /* (421) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 417, -6 }, /* (422) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 417, -3 }, /* (423) predicate ::= expr_or_subquery IS NULL */ + { 417, -4 }, /* (424) predicate ::= expr_or_subquery IS NOT NULL */ + { 417, -3 }, /* (425) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 418, -1 }, /* (426) compare_op ::= NK_LT */ + { 418, -1 }, /* (427) compare_op ::= NK_GT */ + { 418, -1 }, /* (428) compare_op ::= NK_LE */ + { 418, -1 }, /* (429) compare_op ::= NK_GE */ + { 418, -1 }, /* (430) compare_op ::= NK_NE */ + { 418, -1 }, /* (431) compare_op ::= NK_EQ */ + { 418, -1 }, /* (432) compare_op ::= LIKE */ + { 418, -2 }, /* (433) compare_op ::= NOT LIKE */ + { 418, -1 }, /* (434) compare_op ::= MATCH */ + { 418, -1 }, /* (435) compare_op ::= NMATCH */ + { 418, -1 }, /* (436) compare_op ::= CONTAINS */ + { 419, -1 }, /* (437) in_op ::= IN */ + { 419, -2 }, /* (438) in_op ::= NOT IN */ + { 420, -3 }, /* (439) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 421, -1 }, /* (440) boolean_value_expression ::= boolean_primary */ + { 421, -2 }, /* (441) boolean_value_expression ::= NOT boolean_primary */ + { 421, -3 }, /* (442) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 421, -3 }, /* (443) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 422, -1 }, /* (444) boolean_primary ::= predicate */ + { 422, -3 }, /* (445) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 415, -1 }, /* (446) common_expression ::= expr_or_subquery */ + { 415, -1 }, /* (447) common_expression ::= boolean_value_expression */ + { 423, 0 }, /* (448) from_clause_opt ::= */ + { 423, -2 }, /* (449) from_clause_opt ::= FROM table_reference_list */ + { 424, -1 }, /* (450) table_reference_list ::= table_reference */ + { 424, -3 }, /* (451) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 425, -1 }, /* (452) table_reference ::= table_primary */ + { 425, -1 }, /* (453) table_reference ::= joined_table */ + { 426, -2 }, /* (454) table_primary ::= table_name alias_opt */ + { 426, -4 }, /* (455) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 426, -2 }, /* (456) table_primary ::= subquery alias_opt */ + { 426, -1 }, /* (457) table_primary ::= parenthesized_joined_table */ + { 428, 0 }, /* (458) alias_opt ::= */ + { 428, -1 }, /* (459) alias_opt ::= table_alias */ + { 428, -2 }, /* (460) alias_opt ::= AS table_alias */ + { 430, -3 }, /* (461) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 430, -3 }, /* (462) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 427, -6 }, /* (463) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 431, 0 }, /* (464) join_type ::= */ + { 431, -1 }, /* (465) join_type ::= INNER */ + { 433, -12 }, /* (466) 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 */ + { 434, 0 }, /* (467) set_quantifier_opt ::= */ + { 434, -1 }, /* (468) set_quantifier_opt ::= DISTINCT */ + { 434, -1 }, /* (469) set_quantifier_opt ::= ALL */ + { 435, -1 }, /* (470) select_list ::= select_item */ + { 435, -3 }, /* (471) select_list ::= select_list NK_COMMA select_item */ + { 443, -1 }, /* (472) select_item ::= NK_STAR */ + { 443, -1 }, /* (473) select_item ::= common_expression */ + { 443, -2 }, /* (474) select_item ::= common_expression column_alias */ + { 443, -3 }, /* (475) select_item ::= common_expression AS column_alias */ + { 443, -3 }, /* (476) select_item ::= table_name NK_DOT NK_STAR */ + { 398, 0 }, /* (477) where_clause_opt ::= */ + { 398, -2 }, /* (478) where_clause_opt ::= WHERE search_condition */ + { 436, 0 }, /* (479) partition_by_clause_opt ::= */ + { 436, -3 }, /* (480) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 444, -1 }, /* (481) partition_list ::= partition_item */ + { 444, -3 }, /* (482) partition_list ::= partition_list NK_COMMA partition_item */ + { 445, -1 }, /* (483) partition_item ::= expr_or_subquery */ + { 445, -2 }, /* (484) partition_item ::= expr_or_subquery column_alias */ + { 445, -3 }, /* (485) partition_item ::= expr_or_subquery AS column_alias */ + { 440, 0 }, /* (486) twindow_clause_opt ::= */ + { 440, -6 }, /* (487) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 440, -4 }, /* (488) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 440, -6 }, /* (489) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 440, -8 }, /* (490) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 384, 0 }, /* (491) sliding_opt ::= */ + { 384, -4 }, /* (492) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 439, 0 }, /* (493) fill_opt ::= */ + { 439, -4 }, /* (494) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 439, -6 }, /* (495) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 446, -1 }, /* (496) fill_mode ::= NONE */ + { 446, -1 }, /* (497) fill_mode ::= PREV */ + { 446, -1 }, /* (498) fill_mode ::= NULL */ + { 446, -1 }, /* (499) fill_mode ::= LINEAR */ + { 446, -1 }, /* (500) fill_mode ::= NEXT */ + { 441, 0 }, /* (501) group_by_clause_opt ::= */ + { 441, -3 }, /* (502) group_by_clause_opt ::= GROUP BY group_by_list */ + { 447, -1 }, /* (503) group_by_list ::= expr_or_subquery */ + { 447, -3 }, /* (504) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 442, 0 }, /* (505) having_clause_opt ::= */ + { 442, -2 }, /* (506) having_clause_opt ::= HAVING search_condition */ + { 437, 0 }, /* (507) range_opt ::= */ + { 437, -6 }, /* (508) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 438, 0 }, /* (509) every_opt ::= */ + { 438, -4 }, /* (510) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 448, -4 }, /* (511) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 449, -1 }, /* (512) query_simple ::= query_specification */ + { 449, -1 }, /* (513) query_simple ::= union_query_expression */ + { 453, -4 }, /* (514) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 453, -3 }, /* (515) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 454, -1 }, /* (516) query_simple_or_subquery ::= query_simple */ + { 454, -1 }, /* (517) query_simple_or_subquery ::= subquery */ + { 387, -1 }, /* (518) query_or_subquery ::= query_expression */ + { 387, -1 }, /* (519) query_or_subquery ::= subquery */ + { 450, 0 }, /* (520) order_by_clause_opt ::= */ + { 450, -3 }, /* (521) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 451, 0 }, /* (522) slimit_clause_opt ::= */ + { 451, -2 }, /* (523) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 451, -4 }, /* (524) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 451, -4 }, /* (525) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 452, 0 }, /* (526) limit_clause_opt ::= */ + { 452, -2 }, /* (527) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 452, -4 }, /* (528) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 452, -4 }, /* (529) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 429, -3 }, /* (530) subquery ::= NK_LP query_expression NK_RP */ + { 429, -3 }, /* (531) subquery ::= NK_LP subquery NK_RP */ + { 432, -1 }, /* (532) search_condition ::= common_expression */ + { 455, -1 }, /* (533) sort_specification_list ::= sort_specification */ + { 455, -3 }, /* (534) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 456, -3 }, /* (535) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 457, 0 }, /* (536) ordering_specification_opt ::= */ + { 457, -1 }, /* (537) ordering_specification_opt ::= ASC */ + { 457, -1 }, /* (538) ordering_specification_opt ::= DESC */ + { 458, 0 }, /* (539) null_ordering_opt ::= */ + { 458, -2 }, /* (540) null_ordering_opt ::= NULLS FIRST */ + { 458, -2 }, /* (541) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3733,7 +3750,7 @@ static YYACTIONTYPE yy_reduce( yymsp[-2].minor.yy317 = yylhsminor.yy317; break; case 42: /* priv_level ::= topic_name */ - case 458: /* alias_opt ::= table_alias */ yytestcase(yyruleno==458); + case 459: /* alias_opt ::= table_alias */ yytestcase(yyruleno==459); { yylhsminor.yy317 = yymsp[0].minor.yy317; } yymsp[0].minor.yy317 = yylhsminor.yy317; break; @@ -3764,30 +3781,30 @@ static YYACTIONTYPE yy_reduce( case 51: /* dnode_endpoint ::= NK_STRING */ case 52: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==52); case 53: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==53); - case 344: /* db_name ::= NK_ID */ yytestcase(yyruleno==344); - case 345: /* table_name ::= NK_ID */ yytestcase(yyruleno==345); - case 346: /* column_name ::= NK_ID */ yytestcase(yyruleno==346); - case 347: /* function_name ::= NK_ID */ yytestcase(yyruleno==347); - case 348: /* table_alias ::= NK_ID */ yytestcase(yyruleno==348); - case 349: /* column_alias ::= NK_ID */ yytestcase(yyruleno==349); - case 350: /* user_name ::= NK_ID */ yytestcase(yyruleno==350); - case 351: /* topic_name ::= NK_ID */ yytestcase(yyruleno==351); - case 352: /* stream_name ::= NK_ID */ yytestcase(yyruleno==352); - case 353: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==353); - case 354: /* index_name ::= NK_ID */ yytestcase(yyruleno==354); - case 393: /* noarg_func ::= NOW */ yytestcase(yyruleno==393); - case 394: /* noarg_func ::= TODAY */ yytestcase(yyruleno==394); - case 395: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==395); - case 396: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==396); - case 397: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==397); - case 398: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==398); - case 399: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==399); - case 400: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==400); - case 401: /* noarg_func ::= USER */ yytestcase(yyruleno==401); - case 402: /* star_func ::= COUNT */ yytestcase(yyruleno==402); - case 403: /* star_func ::= FIRST */ yytestcase(yyruleno==403); - case 404: /* star_func ::= LAST */ yytestcase(yyruleno==404); - case 405: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==405); + case 345: /* db_name ::= NK_ID */ yytestcase(yyruleno==345); + case 346: /* table_name ::= NK_ID */ yytestcase(yyruleno==346); + case 347: /* column_name ::= NK_ID */ yytestcase(yyruleno==347); + case 348: /* function_name ::= NK_ID */ yytestcase(yyruleno==348); + case 349: /* table_alias ::= NK_ID */ yytestcase(yyruleno==349); + case 350: /* column_alias ::= NK_ID */ yytestcase(yyruleno==350); + case 351: /* user_name ::= NK_ID */ yytestcase(yyruleno==351); + case 352: /* topic_name ::= NK_ID */ yytestcase(yyruleno==352); + case 353: /* stream_name ::= NK_ID */ yytestcase(yyruleno==353); + case 354: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==354); + case 355: /* index_name ::= NK_ID */ yytestcase(yyruleno==355); + case 394: /* noarg_func ::= NOW */ yytestcase(yyruleno==394); + case 395: /* noarg_func ::= TODAY */ yytestcase(yyruleno==395); + case 396: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==396); + case 397: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==397); + case 398: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==398); + case 399: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==399); + case 400: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==400); + case 401: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==401); + case 402: /* noarg_func ::= USER */ yytestcase(yyruleno==402); + case 403: /* star_func ::= COUNT */ yytestcase(yyruleno==403); + case 404: /* star_func ::= FIRST */ yytestcase(yyruleno==404); + case 405: /* star_func ::= LAST */ yytestcase(yyruleno==405); + case 406: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==406); { yylhsminor.yy317 = yymsp[0].minor.yy0; } yymsp[0].minor.yy317 = yylhsminor.yy317; break; @@ -3796,13 +3813,13 @@ static YYACTIONTYPE yy_reduce( case 75: /* exists_opt ::= */ yytestcase(yyruleno==75); case 284: /* analyze_opt ::= */ yytestcase(yyruleno==284); case 291: /* agg_func_opt ::= */ yytestcase(yyruleno==291); - case 466: /* set_quantifier_opt ::= */ yytestcase(yyruleno==466); + case 467: /* set_quantifier_opt ::= */ yytestcase(yyruleno==467); { yymsp[1].minor.yy335 = false; } break; case 55: /* force_opt ::= FORCE */ case 285: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==285); case 292: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==292); - case 467: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==467); + case 468: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==468); { yymsp[0].minor.yy335 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ @@ -4025,7 +4042,7 @@ static YYACTIONTYPE yy_reduce( yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 120: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 314: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==314); + case 315: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==315); { yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy874 = yylhsminor.yy874; break; @@ -4045,12 +4062,12 @@ static YYACTIONTYPE yy_reduce( case 204: /* col_name_list ::= col_name */ yytestcase(yyruleno==204); case 253: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==253); case 266: /* func_list ::= func */ yytestcase(yyruleno==266); - case 342: /* literal_list ::= signed_literal */ yytestcase(yyruleno==342); - case 408: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==408); - case 414: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==414); - case 469: /* select_list ::= select_item */ yytestcase(yyruleno==469); - case 480: /* partition_list ::= partition_item */ yytestcase(yyruleno==480); - case 532: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==532); + case 343: /* literal_list ::= signed_literal */ yytestcase(yyruleno==343); + case 409: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==409); + case 415: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==415); + case 470: /* select_list ::= select_item */ yytestcase(yyruleno==470); + case 481: /* partition_list ::= partition_item */ yytestcase(yyruleno==481); + case 533: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==533); { yylhsminor.yy874 = createNodeList(pCxt, yymsp[0].minor.yy74); } yymsp[0].minor.yy874 = yylhsminor.yy874; break; @@ -4060,11 +4077,11 @@ static YYACTIONTYPE yy_reduce( case 205: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==205); case 254: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==254); case 267: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==267); - case 343: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==343); - case 409: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==409); - case 470: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==470); - case 481: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==481); - case 533: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==533); + case 344: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==344); + case 410: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==410); + case 471: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==471); + case 482: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==482); + case 534: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==534); { yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } yymsp[-2].minor.yy874 = yylhsminor.yy874; break; @@ -4094,7 +4111,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } break; case 133: /* cmd ::= ALTER TABLE alter_table_clause */ - case 316: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==316); + case 317: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==317); { pCxt->pRootNode = yymsp[0].minor.yy74; } break; case 134: /* cmd ::= ALTER STABLE alter_table_clause */ @@ -4142,7 +4159,7 @@ static YYACTIONTYPE yy_reduce( break; case 146: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 149: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==149); - case 415: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==415); + case 416: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==416); { yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); } yymsp[-1].minor.yy874 = yylhsminor.yy874; break; @@ -4157,9 +4174,9 @@ static YYACTIONTYPE yy_reduce( case 151: /* specific_cols_opt ::= */ case 182: /* tags_def_opt ::= */ yytestcase(yyruleno==182); case 252: /* tag_list_opt ::= */ yytestcase(yyruleno==252); - case 478: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==478); - case 500: /* group_by_clause_opt ::= */ yytestcase(yyruleno==500); - case 519: /* order_by_clause_opt ::= */ yytestcase(yyruleno==519); + case 479: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==479); + case 501: /* group_by_clause_opt ::= */ yytestcase(yyruleno==501); + case 520: /* order_by_clause_opt ::= */ yytestcase(yyruleno==520); { yymsp[1].minor.yy874 = NULL; } break; case 152: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ @@ -4249,7 +4266,7 @@ static YYACTIONTYPE yy_reduce( { yymsp[-5].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 183: /* tags_def_opt ::= tags_def */ - case 407: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==407); + case 408: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==408); { yylhsminor.yy874 = yymsp[0].minor.yy874; } yymsp[0].minor.yy874 = yylhsminor.yy874; break; @@ -4302,12 +4319,12 @@ static YYACTIONTYPE yy_reduce( { yymsp[-1].minor.yy767.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } break; case 197: /* duration_list ::= duration_literal */ - case 372: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==372); + case 373: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==373); { yylhsminor.yy874 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } yymsp[0].minor.yy874 = yylhsminor.yy874; break; case 198: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 373: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==373); + case 374: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==374); { yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } yymsp[-2].minor.yy874 = yylhsminor.yy874; break; @@ -4445,18 +4462,18 @@ static YYACTIONTYPE yy_reduce( yymsp[-1].minor.yy74 = yylhsminor.yy74; break; case 247: /* like_pattern_opt ::= */ - case 304: /* subtable_opt ::= */ yytestcase(yyruleno==304); - case 417: /* case_when_else_opt ::= */ yytestcase(yyruleno==417); - case 447: /* from_clause_opt ::= */ yytestcase(yyruleno==447); - case 476: /* where_clause_opt ::= */ yytestcase(yyruleno==476); - case 485: /* twindow_clause_opt ::= */ yytestcase(yyruleno==485); - case 490: /* sliding_opt ::= */ yytestcase(yyruleno==490); - case 492: /* fill_opt ::= */ yytestcase(yyruleno==492); - case 504: /* having_clause_opt ::= */ yytestcase(yyruleno==504); - case 506: /* range_opt ::= */ yytestcase(yyruleno==506); - case 508: /* every_opt ::= */ yytestcase(yyruleno==508); - case 521: /* slimit_clause_opt ::= */ yytestcase(yyruleno==521); - case 525: /* limit_clause_opt ::= */ yytestcase(yyruleno==525); + case 305: /* subtable_opt ::= */ yytestcase(yyruleno==305); + case 418: /* case_when_else_opt ::= */ yytestcase(yyruleno==418); + case 448: /* from_clause_opt ::= */ yytestcase(yyruleno==448); + case 477: /* where_clause_opt ::= */ yytestcase(yyruleno==477); + case 486: /* twindow_clause_opt ::= */ yytestcase(yyruleno==486); + case 491: /* sliding_opt ::= */ yytestcase(yyruleno==491); + case 493: /* fill_opt ::= */ yytestcase(yyruleno==493); + case 505: /* having_clause_opt ::= */ yytestcase(yyruleno==505); + case 507: /* range_opt ::= */ yytestcase(yyruleno==507); + case 509: /* every_opt ::= */ yytestcase(yyruleno==509); + case 522: /* slimit_clause_opt ::= */ yytestcase(yyruleno==522); + case 526: /* limit_clause_opt ::= */ yytestcase(yyruleno==526); { yymsp[1].minor.yy74 = NULL; } break; case 248: /* like_pattern_opt ::= LIKE NK_STRING */ @@ -4596,108 +4613,112 @@ static YYACTIONTYPE yy_reduce( { ((SStreamOptions*)yymsp[-2].minor.yy74)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-2].minor.yy74; } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 305: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 491: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==491); - case 509: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==509); + case 304: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */ +{ ((SStreamOptions*)yymsp[-3].minor.yy74)->ignoreUpdate = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-3].minor.yy74; } + yymsp[-3].minor.yy74 = yylhsminor.yy74; + break; + case 306: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 492: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==492); + case 510: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==510); { yymsp[-3].minor.yy74 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy74); } break; - case 306: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 307: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 307: /* cmd ::= KILL QUERY NK_STRING */ + case 308: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 308: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 309: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 309: /* cmd ::= BALANCE VGROUP */ + case 310: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 310: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 311: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 311: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + case 312: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy874); } break; - case 312: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 313: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 313: /* dnode_list ::= DNODE NK_INTEGER */ + case 314: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 315: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ + case 316: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; - case 317: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + case 318: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ { pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy74, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } break; - case 318: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ + case 319: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ { pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); } break; - case 319: /* literal ::= NK_INTEGER */ + case 320: /* literal ::= NK_INTEGER */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 320: /* literal ::= NK_FLOAT */ + case 321: /* literal ::= NK_FLOAT */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 321: /* literal ::= NK_STRING */ + case 322: /* literal ::= NK_STRING */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 322: /* literal ::= NK_BOOL */ + case 323: /* literal ::= NK_BOOL */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 323: /* literal ::= TIMESTAMP NK_STRING */ + case 324: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 324: /* literal ::= duration_literal */ - case 334: /* signed_literal ::= signed */ yytestcase(yyruleno==334); - case 355: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==355); - case 356: /* expression ::= literal */ yytestcase(yyruleno==356); - case 357: /* expression ::= pseudo_column */ yytestcase(yyruleno==357); - case 358: /* expression ::= column_reference */ yytestcase(yyruleno==358); - case 359: /* expression ::= function_expression */ yytestcase(yyruleno==359); - case 360: /* expression ::= case_when_expression */ yytestcase(yyruleno==360); - case 390: /* function_expression ::= literal_func */ yytestcase(yyruleno==390); - case 439: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==439); - case 443: /* boolean_primary ::= predicate */ yytestcase(yyruleno==443); - case 445: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==445); - case 446: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==446); - case 449: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==449); - case 451: /* table_reference ::= table_primary */ yytestcase(yyruleno==451); - case 452: /* table_reference ::= joined_table */ yytestcase(yyruleno==452); - case 456: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==456); - case 511: /* query_simple ::= query_specification */ yytestcase(yyruleno==511); - case 512: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==512); - case 515: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==515); - case 517: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==517); + case 325: /* literal ::= duration_literal */ + case 335: /* signed_literal ::= signed */ yytestcase(yyruleno==335); + case 356: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==356); + case 357: /* expression ::= literal */ yytestcase(yyruleno==357); + case 358: /* expression ::= pseudo_column */ yytestcase(yyruleno==358); + case 359: /* expression ::= column_reference */ yytestcase(yyruleno==359); + case 360: /* expression ::= function_expression */ yytestcase(yyruleno==360); + case 361: /* expression ::= case_when_expression */ yytestcase(yyruleno==361); + case 391: /* function_expression ::= literal_func */ yytestcase(yyruleno==391); + case 440: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==440); + case 444: /* boolean_primary ::= predicate */ yytestcase(yyruleno==444); + case 446: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==446); + case 447: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==447); + case 450: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==450); + case 452: /* table_reference ::= table_primary */ yytestcase(yyruleno==452); + case 453: /* table_reference ::= joined_table */ yytestcase(yyruleno==453); + case 457: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==457); + case 512: /* query_simple ::= query_specification */ yytestcase(yyruleno==512); + case 513: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==513); + case 516: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==516); + case 518: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==518); { yylhsminor.yy74 = yymsp[0].minor.yy74; } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 325: /* literal ::= NULL */ + case 326: /* literal ::= NULL */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 326: /* literal ::= NK_QUESTION */ + case 327: /* literal ::= NK_QUESTION */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 327: /* duration_literal ::= NK_VARIABLE */ + case 328: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 328: /* signed ::= NK_INTEGER */ + case 329: /* signed ::= NK_INTEGER */ { yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 329: /* signed ::= NK_PLUS NK_INTEGER */ + case 330: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 330: /* signed ::= NK_MINUS NK_INTEGER */ + case 331: /* 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; @@ -4705,14 +4726,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 331: /* signed ::= NK_FLOAT */ + case 332: /* signed ::= NK_FLOAT */ { yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 332: /* signed ::= NK_PLUS NK_FLOAT */ + case 333: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 333: /* signed ::= NK_MINUS NK_FLOAT */ + case 334: /* 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; @@ -4720,57 +4741,57 @@ static YYACTIONTYPE yy_reduce( } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 335: /* signed_literal ::= NK_STRING */ + case 336: /* signed_literal ::= NK_STRING */ { yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 336: /* signed_literal ::= NK_BOOL */ + case 337: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 337: /* signed_literal ::= TIMESTAMP NK_STRING */ + case 338: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 338: /* signed_literal ::= duration_literal */ - case 340: /* signed_literal ::= literal_func */ yytestcase(yyruleno==340); - case 410: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==410); - case 472: /* select_item ::= common_expression */ yytestcase(yyruleno==472); - case 482: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==482); - case 516: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==516); - case 518: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==518); - case 531: /* search_condition ::= common_expression */ yytestcase(yyruleno==531); + case 339: /* signed_literal ::= duration_literal */ + case 341: /* signed_literal ::= literal_func */ yytestcase(yyruleno==341); + case 411: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==411); + case 473: /* select_item ::= common_expression */ yytestcase(yyruleno==473); + case 483: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==483); + case 517: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==517); + case 519: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==519); + case 532: /* search_condition ::= common_expression */ yytestcase(yyruleno==532); { yylhsminor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 339: /* signed_literal ::= NULL */ + case 340: /* signed_literal ::= NULL */ { yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 341: /* signed_literal ::= NK_QUESTION */ + case 342: /* signed_literal ::= NK_QUESTION */ { yylhsminor.yy74 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 361: /* expression ::= NK_LP expression NK_RP */ - case 444: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==444); - case 530: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==530); + case 362: /* expression ::= NK_LP expression NK_RP */ + case 445: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==445); + case 531: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==531); { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 362: /* expression ::= NK_PLUS expr_or_subquery */ + case 363: /* expression ::= NK_PLUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 363: /* expression ::= NK_MINUS expr_or_subquery */ + case 364: /* expression ::= NK_MINUS expr_or_subquery */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy74), NULL)); } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 364: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 365: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4778,7 +4799,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 365: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 366: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4786,7 +4807,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 366: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 367: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4794,7 +4815,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 367: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 368: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4802,7 +4823,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 368: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 369: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4810,14 +4831,14 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 369: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 370: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 370: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 371: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4825,7 +4846,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 371: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 372: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4833,70 +4854,70 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 374: /* column_reference ::= column_name */ + case 375: /* column_reference ::= column_name */ { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy317, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy317)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 375: /* column_reference ::= table_name NK_DOT column_name */ + case 376: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317, createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317)); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 376: /* pseudo_column ::= ROWTS */ - case 377: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==377); - case 379: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==379); - case 380: /* pseudo_column ::= QEND */ yytestcase(yyruleno==380); - case 381: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==381); - case 382: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==382); - case 383: /* pseudo_column ::= WEND */ yytestcase(yyruleno==383); - case 384: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==384); - case 385: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==385); - case 386: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==386); - case 392: /* literal_func ::= NOW */ yytestcase(yyruleno==392); + case 377: /* pseudo_column ::= ROWTS */ + case 378: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==378); + case 380: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==380); + case 381: /* pseudo_column ::= QEND */ yytestcase(yyruleno==381); + case 382: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==382); + case 383: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==383); + case 384: /* pseudo_column ::= WEND */ yytestcase(yyruleno==384); + case 385: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==385); + case 386: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==386); + case 387: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==387); + case 393: /* literal_func ::= NOW */ yytestcase(yyruleno==393); { yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 378: /* pseudo_column ::= table_name NK_DOT TBNAME */ + case 379: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy317)))); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 387: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 388: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==388); + case 388: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 389: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==389); { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-1].minor.yy874)); } yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 389: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + case 390: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy898)); } yymsp[-5].minor.yy74 = yylhsminor.yy74; break; - case 391: /* literal_func ::= noarg_func NK_LP NK_RP */ + case 392: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy317, NULL)); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 406: /* star_func_para_list ::= NK_STAR */ + case 407: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy874 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy874 = yylhsminor.yy874; break; - case 411: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 475: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==475); + case 412: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 476: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==476); { yylhsminor.yy74 = createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 412: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ + case 413: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy874, yymsp[-1].minor.yy74)); } yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 413: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + case 414: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-2].minor.yy874, yymsp[-1].minor.yy74)); } yymsp[-4].minor.yy74 = yylhsminor.yy74; break; - case 416: /* when_then_expr ::= WHEN common_expression THEN common_expression */ + case 417: /* when_then_expr ::= WHEN common_expression THEN common_expression */ { yymsp[-3].minor.yy74 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } break; - case 418: /* case_when_else_opt ::= ELSE common_expression */ + case 419: /* case_when_else_opt ::= ELSE common_expression */ { yymsp[-1].minor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } break; - case 419: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 424: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==424); + case 420: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 425: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==425); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4904,7 +4925,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 420: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 421: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4912,7 +4933,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-4].minor.yy74 = yylhsminor.yy74; break; - case 421: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 422: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4920,71 +4941,71 @@ static YYACTIONTYPE yy_reduce( } yymsp[-5].minor.yy74 = yylhsminor.yy74; break; - case 422: /* predicate ::= expr_or_subquery IS NULL */ + case 423: /* predicate ::= expr_or_subquery IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), NULL)); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 423: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 424: /* predicate ::= expr_or_subquery IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy74); yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL)); } yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 425: /* compare_op ::= NK_LT */ + case 426: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; } break; - case 426: /* compare_op ::= NK_GT */ + case 427: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy20 = OP_TYPE_GREATER_THAN; } break; - case 427: /* compare_op ::= NK_LE */ + case 428: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy20 = OP_TYPE_LOWER_EQUAL; } break; - case 428: /* compare_op ::= NK_GE */ + case 429: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy20 = OP_TYPE_GREATER_EQUAL; } break; - case 429: /* compare_op ::= NK_NE */ + case 430: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy20 = OP_TYPE_NOT_EQUAL; } break; - case 430: /* compare_op ::= NK_EQ */ + case 431: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy20 = OP_TYPE_EQUAL; } break; - case 431: /* compare_op ::= LIKE */ + case 432: /* compare_op ::= LIKE */ { yymsp[0].minor.yy20 = OP_TYPE_LIKE; } break; - case 432: /* compare_op ::= NOT LIKE */ + case 433: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy20 = OP_TYPE_NOT_LIKE; } break; - case 433: /* compare_op ::= MATCH */ + case 434: /* compare_op ::= MATCH */ { yymsp[0].minor.yy20 = OP_TYPE_MATCH; } break; - case 434: /* compare_op ::= NMATCH */ + case 435: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy20 = OP_TYPE_NMATCH; } break; - case 435: /* compare_op ::= CONTAINS */ + case 436: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy20 = OP_TYPE_JSON_CONTAINS; } break; - case 436: /* in_op ::= IN */ + case 437: /* in_op ::= IN */ { yymsp[0].minor.yy20 = OP_TYPE_IN; } break; - case 437: /* in_op ::= NOT IN */ + case 438: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; } break; - case 438: /* in_predicate_value ::= NK_LP literal_list NK_RP */ + case 439: /* in_predicate_value ::= NK_LP literal_list NK_RP */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy874)); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 440: /* boolean_value_expression ::= NOT boolean_primary */ + case 441: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy74), NULL)); } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 441: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 442: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -4992,7 +5013,7 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 442: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 443: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); @@ -5000,48 +5021,48 @@ static YYACTIONTYPE yy_reduce( } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 448: /* from_clause_opt ::= FROM table_reference_list */ - case 477: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==477); - case 505: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==505); + case 449: /* from_clause_opt ::= FROM table_reference_list */ + case 478: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==478); + case 506: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==506); { yymsp[-1].minor.yy74 = yymsp[0].minor.yy74; } break; - case 450: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ + case 451: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy74 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, NULL); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 453: /* table_primary ::= table_name alias_opt */ + case 454: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy74 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 454: /* table_primary ::= db_name NK_DOT table_name alias_opt */ + case 455: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy74 = createRealTableNode(pCxt, &yymsp[-3].minor.yy317, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 455: /* table_primary ::= subquery alias_opt */ + case 456: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy74 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 457: /* alias_opt ::= */ + case 458: /* alias_opt ::= */ { yymsp[1].minor.yy317 = nil_token; } break; - case 459: /* alias_opt ::= AS table_alias */ + case 460: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy317 = yymsp[0].minor.yy317; } break; - case 460: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 461: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==461); + case 461: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 462: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==462); { yymsp[-2].minor.yy74 = yymsp[-1].minor.yy74; } break; - case 462: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + case 463: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy74 = createJoinTableNode(pCxt, yymsp[-4].minor.yy630, yymsp[-5].minor.yy74, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); } yymsp[-5].minor.yy74 = yylhsminor.yy74; break; - case 463: /* join_type ::= */ + case 464: /* join_type ::= */ { yymsp[1].minor.yy630 = JOIN_TYPE_INNER; } break; - case 464: /* join_type ::= INNER */ + case 465: /* join_type ::= INNER */ { yymsp[0].minor.yy630 = JOIN_TYPE_INNER; } break; - case 465: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 466: /* 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.yy74 = createSelectStmt(pCxt, yymsp[-10].minor.yy335, yymsp[-9].minor.yy874, yymsp[-8].minor.yy74); yymsp[-11].minor.yy74 = addWhereClause(pCxt, yymsp[-11].minor.yy74, yymsp[-7].minor.yy74); @@ -5054,73 +5075,73 @@ static YYACTIONTYPE yy_reduce( yymsp[-11].minor.yy74 = addFillClause(pCxt, yymsp[-11].minor.yy74, yymsp[-3].minor.yy74); } break; - case 468: /* set_quantifier_opt ::= ALL */ + case 469: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy335 = false; } break; - case 471: /* select_item ::= NK_STAR */ + case 472: /* select_item ::= NK_STAR */ { yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 473: /* select_item ::= common_expression column_alias */ - case 483: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==483); + case 474: /* select_item ::= common_expression column_alias */ + case 484: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==484); { yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 474: /* select_item ::= common_expression AS column_alias */ - case 484: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==484); + case 475: /* select_item ::= common_expression AS column_alias */ + case 485: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==485); { yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), &yymsp[0].minor.yy317); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 479: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 501: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==501); - case 520: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==520); + case 480: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 502: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==502); + case 521: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==521); { yymsp[-2].minor.yy874 = yymsp[0].minor.yy874; } break; - case 486: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + case 487: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { yymsp[-5].minor.yy74 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } break; - case 487: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + case 488: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ { yymsp[-3].minor.yy74 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } break; - case 488: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + case 489: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy74 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; - case 489: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + case 490: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy74 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } break; - case 493: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ + case 494: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy74 = createFillNode(pCxt, yymsp[-1].minor.yy828, NULL); } break; - case 494: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + case 495: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy74 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy874)); } break; - case 495: /* fill_mode ::= NONE */ + case 496: /* fill_mode ::= NONE */ { yymsp[0].minor.yy828 = FILL_MODE_NONE; } break; - case 496: /* fill_mode ::= PREV */ + case 497: /* fill_mode ::= PREV */ { yymsp[0].minor.yy828 = FILL_MODE_PREV; } break; - case 497: /* fill_mode ::= NULL */ + case 498: /* fill_mode ::= NULL */ { yymsp[0].minor.yy828 = FILL_MODE_NULL; } break; - case 498: /* fill_mode ::= LINEAR */ + case 499: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy828 = FILL_MODE_LINEAR; } break; - case 499: /* fill_mode ::= NEXT */ + case 500: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy828 = FILL_MODE_NEXT; } break; - case 502: /* group_by_list ::= expr_or_subquery */ + case 503: /* group_by_list ::= expr_or_subquery */ { yylhsminor.yy874 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } yymsp[0].minor.yy874 = yylhsminor.yy874; break; - case 503: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + case 504: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ { yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } yymsp[-2].minor.yy874 = yylhsminor.yy874; break; - case 507: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + case 508: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ { yymsp[-5].minor.yy74 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } break; - case 510: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 511: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy74 = addOrderByClause(pCxt, yymsp[-3].minor.yy74, yymsp[-2].minor.yy874); yylhsminor.yy74 = addSlimitClause(pCxt, yylhsminor.yy74, yymsp[-1].minor.yy74); @@ -5128,50 +5149,50 @@ static YYACTIONTYPE yy_reduce( } yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 513: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + case 514: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ { yylhsminor.yy74 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy74, yymsp[0].minor.yy74); } yymsp[-3].minor.yy74 = yylhsminor.yy74; break; - case 514: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + case 515: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ { yylhsminor.yy74 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==526); + case 523: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 527: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==527); { yymsp[-1].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 523: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 527: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==527); + case 524: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 528: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==528); { yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 524: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 528: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==528); + case 525: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 529: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==529); { yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 529: /* subquery ::= NK_LP query_expression NK_RP */ + case 530: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy74); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 534: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + case 535: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ { yylhsminor.yy74 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), yymsp[-1].minor.yy326, yymsp[0].minor.yy109); } yymsp[-2].minor.yy74 = yylhsminor.yy74; break; - case 535: /* ordering_specification_opt ::= */ + case 536: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy326 = ORDER_ASC; } break; - case 536: /* ordering_specification_opt ::= ASC */ + case 537: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy326 = ORDER_ASC; } break; - case 537: /* ordering_specification_opt ::= DESC */ + case 538: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy326 = ORDER_DESC; } break; - case 538: /* null_ordering_opt ::= */ + case 539: /* null_ordering_opt ::= */ { yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; } break; - case 539: /* null_ordering_opt ::= NULLS FIRST */ + case 540: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; } break; - case 540: /* null_ordering_opt ::= NULLS LAST */ + case 541: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy109 = NULL_ORDER_LAST; } break; default: diff --git a/source/libs/parser/test/parInitialCTest.cpp b/source/libs/parser/test/parInitialCTest.cpp index 17d02c1cce..eb264687f1 100644 --- a/source/libs/parser/test/parInitialCTest.cpp +++ b/source/libs/parser/test/parInitialCTest.cpp @@ -643,7 +643,8 @@ TEST_F(ParserInitialCTest, createStream) { auto setCreateStreamReq = [&](const char* pStream, const char* pSrcDb, const char* pSql, const char* pDstStb, int8_t igExists = 0, int8_t triggerType = STREAM_TRIGGER_AT_ONCE, int64_t maxDelay = 0, int64_t watermark = 0, int8_t igExpired = STREAM_DEFAULT_IGNORE_EXPIRED, - int8_t fillHistory = STREAM_DEFAULT_FILL_HISTORY) { + int8_t fillHistory = STREAM_DEFAULT_FILL_HISTORY, + int8_t igUpdate = STREAM_DEFAULT_IGNORE_UPDATE) { snprintf(expect.name, sizeof(expect.name), "0.%s", pStream); snprintf(expect.sourceDB, sizeof(expect.sourceDB), "0.%s", pSrcDb); snprintf(expect.targetStbFullName, sizeof(expect.targetStbFullName), "0.test.%s", pDstStb); @@ -654,6 +655,7 @@ TEST_F(ParserInitialCTest, createStream) { expect.watermark = watermark; expect.fillHistory = fillHistory; expect.igExpired = igExpired; + expect.igUpdate = igUpdate; }; auto addTag = [&](const char* pFieldName, uint8_t type, int32_t bytes = 0) { @@ -699,6 +701,7 @@ TEST_F(ParserInitialCTest, createStream) { ASSERT_EQ(pField->flags, pExpectField->flags); } } + ASSERT_EQ(req.igUpdate, expect.igUpdate); tFreeSCMCreateStreamReq(&req); }); @@ -708,12 +711,11 @@ TEST_F(ParserInitialCTest, createStream) { setCreateStreamReq( "s1", "test", - "create stream if not exists s1 trigger max_delay 20s watermark 10s ignore expired 0 fill_history 1 into st1 " - "as select count(*) from t1 interval(10s)", - "st1", 1, STREAM_TRIGGER_MAX_DELAY, 20 * MILLISECOND_PER_SECOND, 10 * MILLISECOND_PER_SECOND, 0, 1); - run("CREATE STREAM IF NOT EXISTS s1 TRIGGER MAX_DELAY 20s WATERMARK 10s IGNORE EXPIRED 0 FILL_HISTORY 1 INTO st1 AS " - "SELECT COUNT(*) " - "FROM t1 INTERVAL(10S)"); + "create stream if not exists s1 trigger max_delay 20s watermark 10s ignore expired 0 fill_history 1 ignore " + "update 1 into st1 as select count(*) from t1 interval(10s)", + "st1", 1, STREAM_TRIGGER_MAX_DELAY, 20 * MILLISECOND_PER_SECOND, 10 * MILLISECOND_PER_SECOND, 0, 1, 1); + run("CREATE STREAM IF NOT EXISTS s1 TRIGGER MAX_DELAY 20s WATERMARK 10s IGNORE EXPIRED 0 FILL_HISTORY 1 IGNORE " + "UPDATE 1 INTO st1 AS SELECT COUNT(*) FROM t1 INTERVAL(10S)"); clearCreateStreamReq(); setCreateStreamReq("s1", "test", From e199f96d94699282332bbca57de8ba96f4c524cc Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 8 Feb 2023 09:14:38 +0800 Subject: [PATCH 11/44] fix(query): reset the data load flag when build clean file block. --- source/dnode/vnode/src/tsdb/tsdbRead.c | 1 + tests/script/tsim/parser/regressiontest.sim | 24 +++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 176adb43b8..53e5cd7a88 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -2960,6 +2960,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) { SDataBlockInfo* pInfo = &pReader->pResBlock->info; pInfo->rows = pBlock->nRow; pInfo->id.uid = pScanInfo->uid; + pInfo->dataLoad = 0; pInfo->window = (STimeWindow){.skey = pBlock->minKey.ts, .ekey = pBlock->maxKey.ts}; setComposedBlockFlag(pReader, false); setBlockAllDumped(&pStatus->fBlockDumpInfo, pBlock->maxKey.ts, pReader->order); diff --git a/tests/script/tsim/parser/regressiontest.sim b/tests/script/tsim/parser/regressiontest.sim index 1d84ae88cb..29937af10e 100644 --- a/tests/script/tsim/parser/regressiontest.sim +++ b/tests/script/tsim/parser/regressiontest.sim @@ -122,4 +122,28 @@ if $data01 != 199 then return -1 endi +sql drop table t1 + +$rowNum = 8200 +$ts0 = 1537146000000 +sql create table t1 (ts timestamp, c1 int) + +$i = 0 +$ts = $ts0 + +$x = 0 +while $x < $rowNum +$xs = $x * $delta +$ts = $ts0 + $xs +sql insert into t1 values ( $ts , $x ) +$x = $x + 1 +endw + +sql delete from t1 where ts<=1537146409500 + +sql flush database $db + +print =====================================>TD-22007 +sql select count(*) from t1 interval(10a) + system sh/exec.sh -n dnode1 -s stop -x SIGINT From 59fc68dbf196cd68e0e6e80517966c1bb846274d Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 8 Feb 2023 09:36:01 +0800 Subject: [PATCH 12/44] case: add doulbe comma insert check --- tests/system-test/1-insert/insert_drop.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/system-test/1-insert/insert_drop.py b/tests/system-test/1-insert/insert_drop.py index 029d013d5b..a633d9e9f4 100644 --- a/tests/system-test/1-insert/insert_drop.py +++ b/tests/system-test/1-insert/insert_drop.py @@ -40,6 +40,9 @@ class TDTestCase: self.multiThreadRun(tlist) tdSql.query(f'select * from information_schema.ins_databases') + # double comma insert check error + tdSql.error("insert into test.tb(ts, c11) values(now,,100)") + def stop(self): tdSql.close() From 273d4e966517dd115104e3b9f30cf7929f9092b8 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 8 Feb 2023 09:44:29 +0800 Subject: [PATCH 13/44] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 05c1c075f0..62a64d5f9d 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ [![Build status](https://ci.appveyor.com/api/projects/status/kf3pwh2or5afsgl9/branch/master?svg=true)](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master) [![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=develop)](https://coveralls.io/github/taosdata/TDengine?branch=develop) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4201/badge)](https://bestpractices.coreinfrastructure.org/projects/4201) +![Twitter Follow](https://img.shields.io/twitter/follow/tdenginedb?label=TDengine&style=social) + English | [简体中文](README-CN.md) | [TDengine Cloud](https://cloud.tdengine.com) | [Learn more about TSDB](https://tdengine.com/tsdb/) From 85e6066002d1eff4103b29f882b13cd61d73e4cf Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 8 Feb 2023 09:46:40 +0800 Subject: [PATCH 14/44] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62a64d5f9d..d136fd7ba0 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ [![Build status](https://ci.appveyor.com/api/projects/status/kf3pwh2or5afsgl9/branch/master?svg=true)](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master) [![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=develop)](https://coveralls.io/github/taosdata/TDengine?branch=develop) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4201/badge)](https://bestpractices.coreinfrastructure.org/projects/4201) -![Twitter Follow](https://img.shields.io/twitter/follow/tdenginedb?label=TDengine&style=social) +[![Twitter Follow](https://img.shields.io/twitter/follow/tdenginedb?label=TDengine&style=social)](https://twitter.com/tdenginedb) English | [简体中文](README-CN.md) | [TDengine Cloud](https://cloud.tdengine.com) | [Learn more about TSDB](https://tdengine.com/tsdb/) From a086f83c27e52deaf6da9527195bc81df91d2079 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 8 Feb 2023 09:46:48 +0800 Subject: [PATCH 15/44] fix: slow TDB page defragment --- source/libs/tdb/src/db/tdbPage.c | 48 ++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/source/libs/tdb/src/db/tdbPage.c b/source/libs/tdb/src/db/tdbPage.c index 50dc8e0a65..757a7f1ba0 100644 --- a/source/libs/tdb/src/db/tdbPage.c +++ b/source/libs/tdb/src/db/tdbPage.c @@ -404,7 +404,52 @@ static int tdbPageFree(SPage *pPage, int idx, SCell *pCell, int szCell) { return 0; } +typedef struct { + int32_t iCell; + int32_t offset; +} SCellIdx; +static int32_t tCellIdxCmprFn(const void *p1, const void *p2) { + if (((SCellIdx *)p1)->offset < ((SCellIdx *)p2)->offset) { + return -1; + } else if (((SCellIdx *)p1)->offset > ((SCellIdx *)p2)->offset) { + return 1; + } else { + return 0; + } +} static int tdbPageDefragment(SPage *pPage) { +#if 1 + int32_t nFree = TDB_PAGE_NFREE(pPage); + int32_t nCell = TDB_PAGE_NCELLS(pPage); + + SCellIdx *aCellIdx = (SCellIdx *)tdbOsMalloc(sizeof(SCellIdx) * nCell); + if (aCellIdx == NULL) return -1; + for (int32_t iCell = 0; iCell < nCell; iCell++) { + aCellIdx[iCell].iCell = iCell; + aCellIdx[iCell].offset = TDB_PAGE_CELL_OFFSET_AT(pPage, iCell); + } + taosSort(aCellIdx, nCell, sizeof(SCellIdx), tCellIdxCmprFn); + + SCell *pNextCell = (u8 *)pPage->pPageFtr; + for (int32_t iCell = nCell - 1; iCell >= 0; iCell--) { + SCell *pCell = TDB_PAGE_CELL_AT(pPage, aCellIdx[iCell].iCell); + int32_t szCell = pPage->xCellSize(pPage, pCell, 0, NULL, NULL); + + ASSERT(pNextCell - szCell >= pCell); + + pNextCell -= szCell; + if (pNextCell > pCell) { + memmove(pNextCell, pCell, szCell); + TDB_PAGE_CELL_OFFSET_AT_SET(pPage, aCellIdx[iCell].iCell, pNextCell - pPage->pData); + } + } + pPage->pFreeEnd = pNextCell; + TDB_PAGE_CCELLS_SET(pPage, pPage->pFreeEnd - pPage->pData); + TDB_PAGE_FCELL_SET(pPage, 0); + tdbOsFree(aCellIdx); + + ASSERT(pPage->pFreeEnd - pPage->pFreeStart == nFree); +#else int nFree; int nCells; SCell *pCell; @@ -457,10 +502,9 @@ static int tdbPageDefragment(SPage *pPage) { TDB_PAGE_CELL_OFFSET_AT_SET(pPage, idx, pNextCell - pPage->pData); } - ASSERT(pPage->pFreeEnd - pPage->pFreeStart == nFree); TDB_PAGE_CCELLS_SET(pPage, pPage->pFreeEnd - pPage->pData); TDB_PAGE_FCELL_SET(pPage, 0); - +#endif return 0; } From 52d117293abe7e524a22d4a8707a4034f5cfa69c Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 8 Feb 2023 09:53:04 +0800 Subject: [PATCH 16/44] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d136fd7ba0..685ff20c10 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,10 @@ [![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=develop)](https://coveralls.io/github/taosdata/TDengine?branch=develop) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4201/badge)](https://bestpractices.coreinfrastructure.org/projects/4201) [![Twitter Follow](https://img.shields.io/twitter/follow/tdenginedb?label=TDengine&style=social)](https://twitter.com/tdenginedb) - +[![YouTube Channel](https://img.shields.io/badge/Subscribe_@tdengine--white?logo=youtube&style=social)](https://www.youtube.com/@tdengine) +[![Discord Community](https://img.shields.io/badge/Join_Discord--white?logo=discord&style=social)](https://discord.com/invite/VZdSuUg4pS) +[![LinkedIn](https://img.shields.io/badge/Follow_LinkedIn--white?logo=linkedin&style=social)](https://www.linkedin.com/company/tdengine) +[![StackOverflow](https://img.shields.io/badge/Ask_StackOverflow--white?logo=stackoverflow&style=social&logoColor=orange)](https://stackoverflow.com/questions/tagged/tdengine) English | [简体中文](README-CN.md) | [TDengine Cloud](https://cloud.tdengine.com) | [Learn more about TSDB](https://tdengine.com/tsdb/) From 94158747ca3c37408a044244b4855fc6239277f0 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 8 Feb 2023 09:54:21 +0800 Subject: [PATCH 17/44] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 685ff20c10..885f91cb4e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ [![Build status](https://ci.appveyor.com/api/projects/status/kf3pwh2or5afsgl9/branch/master?svg=true)](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master) [![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=develop)](https://coveralls.io/github/taosdata/TDengine?branch=develop) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4201/badge)](https://bestpractices.coreinfrastructure.org/projects/4201) +
[![Twitter Follow](https://img.shields.io/twitter/follow/tdenginedb?label=TDengine&style=social)](https://twitter.com/tdenginedb) [![YouTube Channel](https://img.shields.io/badge/Subscribe_@tdengine--white?logo=youtube&style=social)](https://www.youtube.com/@tdengine) [![Discord Community](https://img.shields.io/badge/Join_Discord--white?logo=discord&style=social)](https://discord.com/invite/VZdSuUg4pS) From dbdf26538ca071cc098c6098dca62bb2159f9b78 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Wed, 8 Feb 2023 09:56:18 +0800 Subject: [PATCH 18/44] fix(tdb/page): remove n^2 implementation of page defragment --- source/libs/tdb/src/db/tdbPage.c | 56 -------------------------------- 1 file changed, 56 deletions(-) diff --git a/source/libs/tdb/src/db/tdbPage.c b/source/libs/tdb/src/db/tdbPage.c index 757a7f1ba0..dc448c986e 100644 --- a/source/libs/tdb/src/db/tdbPage.c +++ b/source/libs/tdb/src/db/tdbPage.c @@ -418,7 +418,6 @@ static int32_t tCellIdxCmprFn(const void *p1, const void *p2) { } } static int tdbPageDefragment(SPage *pPage) { -#if 1 int32_t nFree = TDB_PAGE_NFREE(pPage); int32_t nCell = TDB_PAGE_NCELLS(pPage); @@ -449,62 +448,7 @@ static int tdbPageDefragment(SPage *pPage) { tdbOsFree(aCellIdx); ASSERT(pPage->pFreeEnd - pPage->pFreeStart == nFree); -#else - int nFree; - int nCells; - SCell *pCell; - SCell *pNextCell; - SCell *pTCell; - int szCell; - int idx; - int iCell; - nFree = TDB_PAGE_NFREE(pPage); - nCells = TDB_PAGE_NCELLS(pPage); - - ASSERT(pPage->pFreeEnd - pPage->pFreeStart < nFree); - - // Loop to compact the page content - // Here we use an O(n^2) algorithm to do the job since - // this is a low frequency job. - pNextCell = (u8 *)pPage->pPageFtr; - pCell = NULL; - for (iCell = 0;; iCell++) { - // compact over - if (iCell == nCells) { - pPage->pFreeEnd = pNextCell; - break; - } - - for (int i = 0; i < nCells; i++) { - if (TDB_PAGE_CELL_OFFSET_AT(pPage, i) < pNextCell - pPage->pData) { - pTCell = TDB_PAGE_CELL_AT(pPage, i); - if (pCell == NULL || pCell < pTCell) { - pCell = pTCell; - idx = i; - } - } else { - continue; - } - } - - ASSERT(pCell != NULL); - - szCell = (*pPage->xCellSize)(pPage, pCell, 0, NULL, NULL); - - ASSERT(pCell + szCell <= pNextCell); - if (pCell + szCell < pNextCell) { - memmove(pNextCell - szCell, pCell, szCell); - } - - pCell = NULL; - pNextCell = pNextCell - szCell; - TDB_PAGE_CELL_OFFSET_AT_SET(pPage, idx, pNextCell - pPage->pData); - } - - TDB_PAGE_CCELLS_SET(pPage, pPage->pFreeEnd - pPage->pData); - TDB_PAGE_FCELL_SET(pPage, 0); -#endif return 0; } From bafe5a577e349f43169c6ce76252334e5d4bb9e7 Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Wed, 8 Feb 2023 10:54:45 +0800 Subject: [PATCH 19/44] ci:add ci --- source/libs/executor/src/scanoperator.c | 2 - tests/script/tsim/stream/basic3.sim | 18 +-- .../script/tsim/stream/ignoreCheckUpdate.sim | 137 +++++++++++++++++- 3 files changed, 144 insertions(+), 13 deletions(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index ab1810398b..842098d9ff 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -2368,8 +2368,6 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys pInfo->pUpdateDataRes = createSpecialDataBlock(STREAM_CLEAR); pInfo->assignBlockUid = pTableScanNode->assignBlockUid; pInfo->partitionSup.needCalc = false; - //todo(liuyao) for test - pTableScanNode->igCheckUpdate = true; pInfo->igCheckUpdate = pTableScanNode->igCheckUpdate; pInfo->igExpired = pTableScanNode->igExpired; diff --git a/tests/script/tsim/stream/basic3.sim b/tests/script/tsim/stream/basic3.sim index e598919e34..2df33541b4 100644 --- a/tests/script/tsim/stream/basic3.sim +++ b/tests/script/tsim/stream/basic3.sim @@ -81,6 +81,15 @@ if $rows == 0 then return -1 endi +sleep 3000 + +sql drop stream if exists streamd1; +sql drop stream if exists streamd2; +sql drop stream if exists streamd3; +sql drop stream if exists streamd4; +sql drop stream if exists streamd5; +sql drop stream if exists streamd6; + sql create stream streamd10 into streamd10 as select _wstart, _wend, count(*), first(ca), last(cb) as c2 from t1 interval(10s); sql desc streamd10; @@ -100,15 +109,6 @@ if $rows == 0 then return -1 endi -sleep 3000 - -sql drop stream if exists streamd1; -sql drop stream if exists streamd2; -sql drop stream if exists streamd3; -sql drop stream if exists streamd4; -sql drop stream if exists streamd5; -sql drop stream if exists streamd6; - _OVER: system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stream/ignoreCheckUpdate.sim b/tests/script/tsim/stream/ignoreCheckUpdate.sim index d380a97d16..fb631f788c 100644 --- a/tests/script/tsim/stream/ignoreCheckUpdate.sim +++ b/tests/script/tsim/stream/ignoreCheckUpdate.sim @@ -4,11 +4,16 @@ system sh/exec.sh -n dnode1 -s start sleep 50 sql connect +print step 1 start + sql drop stream if exists streams0; sql drop database if exists test; sql create database test vgroups 1; sql use test; sql create table t1(ts timestamp, a int, b int , c int); + +print create stream streams0 trigger at_once ignore update 1 into streamt as select _wstart c1, count(*) c2, max(b) c3 from t1 interval(10s); + sql create stream streams0 trigger at_once ignore update 1 into streamt as select _wstart c1, count(*) c2, max(b) c3 from t1 interval(10s); sql insert into t1 values(1648791213000,1,1,1); @@ -30,7 +35,7 @@ if $data01 != 2 then goto loop0 endi -if $data02 != 1 then +if $data02 != 2 then print =====data02=$data02 goto loop0 endi @@ -54,9 +59,137 @@ if $data01 != 3 then goto loop1 endi -if $data02 != 1 then +if $data02 != 3 then print =====data02=$data02 goto loop1 endi +print step 1 end + +print step 2 start + +sql drop stream if exists streams1; +sql drop database if exists test1; +sql create database test1 vgroups 1; +sql use test1; +sql create table t1(ts timestamp, a int, b int , c int); + +print create stream streams1 trigger at_once ignore update 1 into streamt1 as select _wstart c1, count(*) c2, max(b) c3 from t1 session(ts, 10s); + +sql create stream streams1 trigger at_once ignore update 1 into streamt1 as select _wstart c1, count(*) c2, max(b) c3 from t1 session(ts, 10s); + +sql insert into t1 values(1648791213000,1,1,1); +sql insert into t1 values(1648791213000,2,2,2); + +$loop_count = 0 + +loop2: +sleep 300 +sql select * from streamt1 order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 2 then + print =====data01=$data01 + goto loop2 +endi + +if $data02 != 2 then + print =====data02=$data02 + goto loop2 +endi + + +sql insert into t1 values(1648791213000,3,3,3); + +$loop_count = 0 + +loop3: + +sleep 300 +sql select * from streamt1 order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 3 then + print =====data01=$data01 + goto loop3 +endi + +if $data02 != 3 then + print =====data02=$data02 + goto loop3 +endi + +print step 2 end + +print step 3 start + +sql drop stream if exists streams2; +sql drop database if exists test2; +sql create database test2 vgroups 1; +sql use test2; +sql create table t1(ts timestamp, a int, b int , c int); + +print create stream streams2 trigger at_once ignore update 1 into streamt2 as select _wstart c1, count(*) c2, max(b) c3 from t1 state_window(c); + +sql create stream streams2 trigger at_once ignore update 1 into streamt2 as select _wstart c1, count(*) c2, max(b) c3 from t1 state_window(c); + +sql insert into t1 values(1648791213000,1,1,1); +sql insert into t1 values(1648791213000,2,2,1); + +$loop_count = 0 + +loop2: +sleep 300 +sql select * from streamt2 order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 2 then + print =====data01=$data01 + goto loop2 +endi + +if $data02 != 2 then + print =====data02=$data02 + goto loop2 +endi + + +sql insert into t1 values(1648791213000,3,3,1); + +$loop_count = 0 + +loop3: + +sleep 300 +sql select * from streamt2 order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 3 then + print =====data01=$data01 + goto loop3 +endi + +if $data02 != 3 then + print =====data02=$data02 + goto loop3 +endi + +print step 3 end + system sh/stop_dnodes.sh From 4bbcfb31519d25245b8547299e706c376746993f Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 8 Feb 2023 12:11:42 +0800 Subject: [PATCH 20/44] move check sql before drop database --- tests/system-test/1-insert/insert_drop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/system-test/1-insert/insert_drop.py b/tests/system-test/1-insert/insert_drop.py index a633d9e9f4..4275372d27 100644 --- a/tests/system-test/1-insert/insert_drop.py +++ b/tests/system-test/1-insert/insert_drop.py @@ -31,6 +31,10 @@ class TDTestCase: tdSql.execute('create database if not exists test;') tdSql.execute('create table test.stb (ts timestamp, c11 int, c12 float ) TAGS(t11 int, t12 int );') tdSql.execute('create table test.tb using test.stb TAGS (1, 1);') + + # double comma insert check error + tdSql.error("insert into test.tb(ts, c11) values(now,,100)") + sql_list = list() for i in range(5): sql = f'insert into test.tb values (now-{i}m, {i}, {i});' @@ -40,8 +44,6 @@ class TDTestCase: self.multiThreadRun(tlist) tdSql.query(f'select * from information_schema.ins_databases') - # double comma insert check error - tdSql.error("insert into test.tb(ts, c11) values(now,,100)") def stop(self): From 82deedbaff891960116ce470711acf772bdaddd8 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 8 Feb 2023 14:13:26 +0800 Subject: [PATCH 21/44] test: remove blank line --- tests/system-test/1-insert/insert_drop.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/system-test/1-insert/insert_drop.py b/tests/system-test/1-insert/insert_drop.py index 4275372d27..930c65d90e 100644 --- a/tests/system-test/1-insert/insert_drop.py +++ b/tests/system-test/1-insert/insert_drop.py @@ -45,7 +45,6 @@ class TDTestCase: tdSql.query(f'select * from information_schema.ins_databases') - def stop(self): tdSql.close() tdLog.success("%s successfully executed" % __file__) From e5656a600f05963512c97212a40e23b58c8932eb Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 8 Feb 2023 14:22:32 +0800 Subject: [PATCH 22/44] Update CMakeLists.txt --- source/client/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index a14fc650d8..d0cfd38fb9 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}) From 43cce095d0d278375b7408e6db1940b0a256cf5a Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 8 Feb 2023 14:26:04 +0800 Subject: [PATCH 23/44] fix(query): set correct group table size. --- source/libs/executor/src/executil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 92d52fbb0a..96b73b1269 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1831,9 +1831,9 @@ int32_t tableListGetGroupList(const STableListInfo* pTableList, int32_t ordinalG int32_t offset = pTableList->groupOffset[ordinalGroupIndex]; if (ordinalGroupIndex < total - 1) { - *size = pTableList->groupOffset[offset + 1] - pTableList->groupOffset[offset]; + *size = pTableList->groupOffset[ordinalGroupIndex + 1] - offset; } else { - *size = total - pTableList->groupOffset[offset] - 1; + *size = total - offset; } *pKeyInfo = taosArrayGet(pTableList->pTableList, offset); From 5ce5dded752035b64dd8b82350be386054fcd698 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Wed, 8 Feb 2023 14:41:15 +0800 Subject: [PATCH 24/44] enh: reset wal reader after walReadVer --- include/libs/wal/wal.h | 1 + source/libs/sync/src/syncRaftLog.c | 1 + source/libs/wal/src/walRead.c | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/include/libs/wal/wal.h b/include/libs/wal/wal.h index a0f421212a..1eed342f8c 100644 --- a/include/libs/wal/wal.h +++ b/include/libs/wal/wal.h @@ -191,6 +191,7 @@ int32_t walApplyVer(SWal *, int64_t ver); // read SWalReader *walOpenReader(SWal *, SWalFilterCond *pCond); void walCloseReader(SWalReader *pRead); +void walReadReset(SWalReader *pReader); int32_t walReadVer(SWalReader *pRead, int64_t ver); int32_t walReadSeekVer(SWalReader *pRead, int64_t ver); int32_t walNextValidMsg(SWalReader *pRead); diff --git a/source/libs/sync/src/syncRaftLog.c b/source/libs/sync/src/syncRaftLog.c index e6569d9974..9299651999 100644 --- a/source/libs/sync/src/syncRaftLog.c +++ b/source/libs/sync/src/syncRaftLog.c @@ -249,6 +249,7 @@ int32_t raftLogGetEntry(struct SSyncLogStore* pLogStore, SyncIndex index, SSyncR int64_t ts2 = taosGetTimestampNs(); code = walReadVer(pWalHandle, index); + walReadReset(pWalHandle); int64_t ts3 = taosGetTimestampNs(); // code = walReadVerCached(pWalHandle, index); diff --git a/source/libs/wal/src/walRead.c b/source/libs/wal/src/walRead.c index 07228bddd8..0f8f140bd8 100644 --- a/source/libs/wal/src/walRead.c +++ b/source/libs/wal/src/walRead.c @@ -594,3 +594,12 @@ int32_t walReadVer(SWalReader *pReader, int64_t ver) { return 0; } + +void walReadReset(SWalReader *pReader) { + taosThreadMutexLock(&pReader->mutex); + taosCloseFile(&pReader->pIdxFile); + taosCloseFile(&pReader->pLogFile); + pReader->curInvalid = 1; + pReader->curFileFirstVer = -1; + taosThreadMutexUnlock(&pReader->mutex); +} From d69b57fab9d63c527308e2aa4b5f790174ced8b8 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 8 Feb 2023 15:48:27 +0800 Subject: [PATCH 25/44] fix(query): set correct size for the last group. --- source/libs/executor/src/executil.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index 96b73b1269..cdb5e845e3 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1812,28 +1812,30 @@ int32_t tableListAddTableInfo(STableListInfo* pTableList, uint64_t uid, uint64_t int32_t tableListGetGroupList(const STableListInfo* pTableList, int32_t ordinalGroupIndex, STableKeyInfo** pKeyInfo, int32_t* size) { - int32_t total = tableListGetOutputGroups(pTableList); - if (ordinalGroupIndex < 0 || ordinalGroupIndex >= total) { + int32_t totalGroups = tableListGetOutputGroups(pTableList); + int32_t numOfTables = tableListGetSize(pTableList); + + if (ordinalGroupIndex < 0 || ordinalGroupIndex >= totalGroups) { return TSDB_CODE_INVALID_PARA; } // here handle two special cases: // 1. only one group exists, and 2. one table exists for each group. - if (total == 1) { - *size = tableListGetSize(pTableList); + if (totalGroups == 1) { + *size = numOfTables; *pKeyInfo = (*size == 0) ? NULL : taosArrayGet(pTableList->pTableList, 0); return TSDB_CODE_SUCCESS; - } else if (total == tableListGetSize(pTableList)) { + } else if (totalGroups == numOfTables) { *size = 1; *pKeyInfo = taosArrayGet(pTableList->pTableList, ordinalGroupIndex); return TSDB_CODE_SUCCESS; } int32_t offset = pTableList->groupOffset[ordinalGroupIndex]; - if (ordinalGroupIndex < total - 1) { + if (ordinalGroupIndex < totalGroups - 1) { *size = pTableList->groupOffset[ordinalGroupIndex + 1] - offset; } else { - *size = total - offset; + *size = numOfTables - offset; } *pKeyInfo = taosArrayGet(pTableList->pTableList, offset); From 28db09a127a090364ce7ed503d37e48652c1eaf4 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 8 Feb 2023 17:10:09 +0800 Subject: [PATCH 26/44] fix:change async to sync in schemaless --- source/client/src/clientSml.c | 132 +++++----------------------------- 1 file changed, 18 insertions(+), 114 deletions(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index c24aa536c2..0694f4c457 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -149,17 +149,8 @@ typedef struct { int64_t endTime; } SSmlCostInfo; -typedef struct { - SRequestObj *request; - tsem_t sem; - int32_t cnt; - int32_t total; - TdThreadSpinlock lock; -} Params; - typedef struct { int64_t id; - Params *params; SMLProtocolType protocol; int8_t precision; @@ -178,7 +169,6 @@ typedef struct { SQuery *pQuery; SSmlCostInfo cost; - int32_t affectedRows; SSmlMsgBuf msgBuf; SHashObj *dumplicateKey; // for dumplicate key SArray *colsContainer; // for cols parse, if dataFormat == false @@ -1513,7 +1503,6 @@ static void smlDestroyInfo(SSmlHandle *info) { if (!info->dataFormat) { taosArrayDestroy(info->colsContainer); } - destroyRequest(info->pRequest); cJSON_Delete(info->root); taosMemoryFreeClear(info); @@ -2351,20 +2340,11 @@ static int32_t smlInsertData(SSmlHandle *info) { } info->cost.insertRpcTime = taosGetTimestampUs(); - // launchQueryImpl(info->pRequest, info->pQuery, false, NULL); - // info->affectedRows = taos_affected_rows(info->pRequest); - // return info->pRequest->code; - SAppClusterSummary *pActivity = &info->taos->pAppInfo->summary; atomic_add_fetch_64((int64_t *)&pActivity->numOfInsertsReq, 1); - SSqlCallbackWrapper *pWrapper = (SSqlCallbackWrapper *)taosMemoryCalloc(1, sizeof(SSqlCallbackWrapper)); - if (pWrapper == NULL) { - return TSDB_CODE_OUT_OF_MEMORY; - } - pWrapper->pRequest = info->pRequest; - launchAsyncQuery(info->pRequest, info->pQuery, NULL, pWrapper); - return TSDB_CODE_SUCCESS; + launchQueryImpl(info->pRequest, info->pQuery, true, NULL); + return info->pRequest->code; } static void smlPrintStatisticInfo(SSmlHandle *info) { @@ -2498,48 +2478,13 @@ static int32_t isSchemalessDb(STscObj *taos, SRequestObj *request) { return TSDB_CODE_SUCCESS; } -static void smlInsertCallback(void *param, void *res, int32_t code) { - SRequestObj *pRequest = (SRequestObj *)res; - SSmlHandle *info = (SSmlHandle *)param; - int32_t rows = taos_affected_rows(pRequest); - - uDebug("SML:0x%" PRIx64 " result. code:%d, msg:%s", info->id, pRequest->code, pRequest->msgBuf); - Params *pParam = info->params; - // lock - taosThreadSpinLock(&pParam->lock); - pParam->cnt++; - if (code != TSDB_CODE_SUCCESS) { - pParam->request->code = code; - pParam->request->body.resInfo.numOfRows += rows; - } else { - pParam->request->body.resInfo.numOfRows += info->affectedRows; - } - // unlock - taosThreadSpinUnlock(&pParam->lock); - - if (pParam->cnt == pParam->total) { - tsem_post(&pParam->sem); - } - uDebug("SML:0x%" PRIx64 " insert finished, code: %d, rows: %d, total: %d", info->id, code, rows, info->affectedRows); - info->cost.endTime = taosGetTimestampUs(); - info->cost.code = code; - smlPrintStatisticInfo(info); - smlDestroyInfo(info); -} - TAOS_RES *taos_schemaless_insert_inner(SRequestObj *request, char *lines[], char *rawLine, char *rawLineEnd, int numLines, int protocol, int precision, int32_t ttl) { - int batchs = 0; STscObj *pTscObj = request->pTscObj; - + SSmlHandle *info = NULL; pTscObj->schemalessType = 1; SSmlMsgBuf msg = {ERROR_MSG_BUF_DEFAULT_SIZE, request->msgBuf}; - Params params = {0}; - params.request = request; - tsem_init(¶ms.sem, 0, 0); - taosThreadSpinInit(&(params.lock), 0); - if (request->pDb == NULL) { request->code = TSDB_CODE_PAR_DB_NOT_SPECIFIED; smlBuildInvalidDataMsg(&msg, "Database not specified", NULL); @@ -2573,65 +2518,24 @@ TAOS_RES *taos_schemaless_insert_inner(SRequestObj *request, char *lines[], char goto end; } - batchs = ceil(((double)numLines) / tsSmlBatchSize); - params.total = batchs; - for (int i = 0; i < batchs; ++i) { - SRequestObj *req = (SRequestObj *)createRequest(pTscObj->id, TSDB_SQL_INSERT, 0); - if (!req) { - request->code = TSDB_CODE_OUT_OF_MEMORY; - uError("SML:taos_schemaless_insert error request is null"); - goto end; - } - SSmlHandle *info = smlBuildSmlInfo(pTscObj, req, (SMLProtocolType)protocol, precision); - if (!info) { - request->code = TSDB_CODE_OUT_OF_MEMORY; - uError("SML:taos_schemaless_insert error SSmlHandle is null"); - goto end; - } - - info->isRawLine = (rawLine == NULL); - info->ttl = ttl; - - int32_t perBatch = tsSmlBatchSize; - - if (numLines > perBatch) { - numLines -= perBatch; - } else { - perBatch = numLines; - numLines = 0; - } - - info->params = ¶ms; - info->affectedRows = perBatch; - info->pRequest->body.queryFp = smlInsertCallback; - info->pRequest->body.param = info; - int32_t code = smlProcess(info, lines, rawLine, rawLineEnd, perBatch); - if (lines) { - lines += perBatch; - } - if (rawLine) { - int num = 0; - while (rawLine < rawLineEnd) { - if (*(rawLine++) == '\n') { - num++; - } - if (num == perBatch) { - break; - } - } - } - if (code != TSDB_CODE_SUCCESS) { - info->pRequest->body.queryFp(info, req, code); - } + info = smlBuildSmlInfo(pTscObj, request, (SMLProtocolType)protocol, precision); + if (!info) { + request->code = TSDB_CODE_OUT_OF_MEMORY; + uError("SML:taos_schemaless_insert error SSmlHandle is null"); + goto end; } - tsem_wait(¶ms.sem); + + info->isRawLine = (rawLine == NULL); + info->ttl = ttl; + request->code = smlProcess(info, lines, rawLine, rawLineEnd, numLines); end: - taosThreadSpinDestroy(¶ms.lock); - tsem_destroy(¶ms.sem); - // ((STscObj *)taos)->schemalessType = 0; - pTscObj->schemalessType = 1; - uDebug("resultend:%s", request->msgBuf); + uDebug("SML:0x%" PRIx64 " insert finished, code: %d", info->id, request->code); + info->cost.endTime = taosGetTimestampUs(); + info->cost.code = request->code; + smlPrintStatisticInfo(info); + smlDestroyInfo(info); + return (TAOS_RES *)request; } From 37babb5511630cfe3f6dee615e8be031fcf4dcf2 Mon Sep 17 00:00:00 2001 From: freemine Date: Wed, 8 Feb 2023 17:12:57 +0800 Subject: [PATCH 27/44] make_install.bat: (#19658) 1. copy files failed if svc-deleting is still outstanding 2. unnecessary duplication of C:\TDengine in %PATH% --- packaging/tools/make_install.bat | 57 +++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 8 deletions(-) diff --git a/packaging/tools/make_install.bat b/packaging/tools/make_install.bat index c19519f9a1..993a8a19ee 100644 --- a/packaging/tools/make_install.bat +++ b/packaging/tools/make_install.bat @@ -2,12 +2,20 @@ for /F %%a in ('echo prompt $E ^| cmd') do set "ESC=%%a" -goto %1 +if "%1" NEQ "" goto %1 + :needAdmin if exist C:\\TDengine\\data\\dnode\\dnodeCfg.json ( echo The default data directory C:/TDengine/data contains old data of tdengine 2.x, please clear it before installing! ) + +rem // stop and delete service +mshta vbscript:createobject("shell.application").shellexecute("%~s0",":stop_delete","","runas",1)(window.close) +echo This might take a few moment to accomplish deleting service taosd/taosadapter ... +call :check_svc taosd +call :check_svc taosadapter + set source_dir=%2 set source_dir=%source_dir:/=\\% set binary_dir=%3 @@ -60,7 +68,6 @@ if exist %binary_dir%\\build\\bin\\taosdump.exe ( copy %binary_dir%\\build\\bin\\taosd.exe %target_dir% > nul copy %binary_dir%\\build\\bin\\udfd.exe %target_dir% > nul - if exist %binary_dir%\\build\\bin\\taosadapter.exe ( copy %binary_dir%\\build\\bin\\taosadapter.exe %target_dir% > nul ) @@ -80,22 +87,23 @@ goto :eof :hasAdmin -sc query "taosd" && sc stop taosd && sc delete taosd -sc query "taosadapter" && sc stop taosadapter && sc delete taosd +call :stop_delete +call :check_svc taosd +call :check_svc taosadapter copy /y C:\\TDengine\\driver\\taos.dll C:\\Windows\\System32 > nul if exist C:\\TDengine\\driver\\taosws.dll ( copy /y C:\\TDengine\\driver\\taosws.dll C:\\Windows\\System32 > nul ) -sc query "taosd" >nul || sc create "taosd" binPath= "C:\\TDengine\\taosd.exe --win_service" start= DEMAND -sc query "taosadapter" >nul || sc create "taosadapter" binPath= "C:\\TDengine\\taosadapter.exe" start= DEMAND +rem // create services +sc create "taosd" binPath= "C:\\TDengine\\taosd.exe --win_service" start= DEMAND +sc create "taosadapter" binPath= "C:\\TDengine\\taosadapter.exe" start= DEMAND set "env=HKLM\System\CurrentControlSet\Control\Session Manager\Environment" for /f "tokens=2*" %%I in ('reg query "%env%" /v Path ^| findstr /i "\"') do ( - rem // make addition persistent through reboots - reg add "%env%" /f /v Path /t REG_EXPAND_SZ /d "%%J;C:\TDengine" + call :append_if_not_exists %%J rem // apply change to the current process for %%a in ("%%J;C:\TDengine") do path %%~a @@ -105,3 +113,36 @@ rem // use setx to set a temporary throwaway value to trigger a WM_SETTINGCHANGE rem // applies change to new console windows without requiring a reboot (setx /m foo bar & reg delete "%env%" /f /v foo) >NUL 2>NUL +goto :end + +:append_if_not_exists +set "_origin_paths=%*" +set "_paths=%*" +set "_found=0" +:loop +for /f "tokens=1* delims=;" %%x in ("%_paths%") do ( + if "%%x" EQU "C:\TDengine" ( + set "_found=1" + ) else ( + set "_paths=%%y" + goto :loop + ) +) +if "%_found%" == "0" ( + rem // make addition persistent through reboots + reg add "%env%" /f /v Path /t REG_EXPAND_SZ /d "%_origin_paths%;C:\TDengine" +) +exit /B 0 + +:stop_delete +sc stop taosd +sc delete taosd +sc stop taosadapter +sc delete taosadapter +exit /B 0 + +:check_svc +sc query %1 >nul 2>nul && goto :check_svc %1 +exit /B 0 + +:end From 98e2fa2d7b6110958422d97c875043d33fd65fde Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 8 Feb 2023 18:46:12 +0800 Subject: [PATCH 28/44] feat: add ignore update option for create stream --- include/libs/nodes/plannodes.h | 2 ++ include/libs/planner/planner.h | 1 + source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/src/mndDef.c | 4 +++- source/dnode/mnode/impl/src/mndStream.c | 2 ++ source/libs/nodes/src/nodesCloneFuncs.c | 1 + source/libs/nodes/src/nodesCodeFuncs.c | 7 +++++++ source/libs/nodes/src/nodesMsgFuncs.c | 6 ++++++ source/libs/planner/src/planLogicCreater.c | 1 + source/libs/planner/src/planOptimizer.c | 1 + source/libs/planner/src/planPhysiCreater.c | 1 + 11 files changed, 26 insertions(+), 1 deletion(-) diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index 799f4e368b..80fa0d3e78 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -93,6 +93,7 @@ typedef struct SScanLogicNode { int64_t watermark; int64_t deleteMark; int8_t igExpired; + int8_t igCheckUpdate; SArray* pSmaIndexes; SNodeList* pGroupTags; bool groupSort; @@ -217,6 +218,7 @@ typedef struct SWindowLogicNode { int64_t watermark; int64_t deleteMark; int8_t igExpired; + int8_t igCheckUpdate; EWindowAlgorithm windowAlgo; EOrder inputTsOrder; EOrder outputTsOrder; diff --git a/include/libs/planner/planner.h b/include/libs/planner/planner.h index f7bd68393e..41c0e98084 100644 --- a/include/libs/planner/planner.h +++ b/include/libs/planner/planner.h @@ -36,6 +36,7 @@ typedef struct SPlanContext { int64_t watermark; int64_t deleteMark; int8_t igExpired; + int8_t igCheckUpdate; char* pMsg; int32_t msgLen; const char* pUser; diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 2f824b48b4..6f6f801c39 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -648,6 +648,7 @@ typedef struct { int64_t checkpointFreq; // ms int64_t currentTick; // do not serialize int64_t deleteMark; + int8_t igCheckUpdate; } SStreamObj; int32_t tEncodeSStreamObj(SEncoder* pEncoder, const SStreamObj* pObj); diff --git a/source/dnode/mnode/impl/src/mndDef.c b/source/dnode/mnode/impl/src/mndDef.c index a5f77513de..75177f4158 100644 --- a/source/dnode/mnode/impl/src/mndDef.c +++ b/source/dnode/mnode/impl/src/mndDef.c @@ -78,6 +78,7 @@ int32_t tEncodeSStreamObj(SEncoder *pEncoder, const SStreamObj *pObj) { // 3.0.20 if (tEncodeI64(pEncoder, pObj->checkpointFreq) < 0) return -1; + if (tEncodeI8(pEncoder, pObj->igCheckUpdate) < 0) return -1; tEndEncode(pEncoder); return pEncoder->pos; @@ -145,6 +146,7 @@ int32_t tDecodeSStreamObj(SDecoder *pDecoder, SStreamObj *pObj, int32_t sver) { // 3.0.20 if (sver >= 2) { if (tDecodeI64(pDecoder, &pObj->checkpointFreq) < 0) return -1; + if (tDecodeI8(pDecoder, &pObj->igCheckUpdate) < 0) return -1; } tEndDecode(pDecoder); return 0; @@ -489,7 +491,7 @@ int32_t tEncodeSubscribeObj(void **buf, const SMqSubscribeObj *pSub) { tlen += tEncodeSMqConsumerEp(buf, pConsumerEp); cnt++; } - if(cnt != sz) return -1; + if (cnt != sz) return -1; tlen += taosEncodeArray(buf, pSub->unassignedVgs, (FEncode)tEncodeSMqVgEp); tlen += taosEncodeString(buf, pSub->dbName); return tlen; diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 8f6c7e19ed..61e9fc5366 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -297,6 +297,7 @@ static int32_t mndBuildStreamObjFromCreateReq(SMnode *pMnode, SStreamObj *pObj, pObj->triggerParam = pCreate->maxDelay; pObj->watermark = pCreate->watermark; pObj->fillHistory = pCreate->fillHistory; + pObj->igCheckUpdate = pCreate->igUpdate; memcpy(pObj->sourceDb, pCreate->sourceDB, TSDB_DB_FNAME_LEN); SDbObj *pSourceDb = mndAcquireDb(pMnode, pCreate->sourceDB); @@ -345,6 +346,7 @@ static int32_t mndBuildStreamObjFromCreateReq(SMnode *pMnode, SStreamObj *pObj, .triggerType = pObj->trigger == STREAM_TRIGGER_MAX_DELAY ? STREAM_TRIGGER_WINDOW_CLOSE : pObj->trigger, .watermark = pObj->watermark, .igExpired = pObj->igExpired, + .igCheckUpdate = pObj->igCheckUpdate, }; // using ast and param to build physical plan diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 7b9c54ab2c..9da52edf32 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -467,6 +467,7 @@ static int32_t logicWindowCopy(const SWindowLogicNode* pSrc, SWindowLogicNode* p COPY_SCALAR_FIELD(watermark); COPY_SCALAR_FIELD(deleteMark); COPY_SCALAR_FIELD(igExpired); + COPY_SCALAR_FIELD(igCheckUpdate); COPY_SCALAR_FIELD(windowAlgo); COPY_SCALAR_FIELD(inputTsOrder); COPY_SCALAR_FIELD(outputTsOrder); diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 1a4ba8e43e..c19f64bb3a 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -1553,6 +1553,7 @@ static const char* jkTableScanPhysiPlanGroupSort = "GroupSort"; static const char* jkTableScanPhysiPlanTags = "Tags"; static const char* jkTableScanPhysiPlanSubtable = "Subtable"; static const char* jkTableScanPhysiPlanAssignBlockUid = "AssignBlockUid"; +static const char* jkTableScanPhysiPlanIgnoreUpdate = "IgnoreUpdate"; static int32_t physiTableScanNodeToJson(const void* pObj, SJson* pJson) { const STableScanPhysiNode* pNode = (const STableScanPhysiNode*)pObj; @@ -1618,6 +1619,9 @@ static int32_t physiTableScanNodeToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddBoolToObject(pJson, jkTableScanPhysiPlanAssignBlockUid, pNode->assignBlockUid); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTableScanPhysiPlanIgnoreUpdate, pNode->igCheckUpdate); + } return code; } @@ -1686,6 +1690,9 @@ static int32_t jsonToPhysiTableScanNode(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = tjsonGetBoolValue(pJson, jkTableScanPhysiPlanAssignBlockUid, &pNode->assignBlockUid); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkTableScanPhysiPlanIgnoreUpdate, &pNode->igCheckUpdate); + } return code; } diff --git a/source/libs/nodes/src/nodesMsgFuncs.c b/source/libs/nodes/src/nodesMsgFuncs.c index dfe2f6c8b9..274cac405d 100644 --- a/source/libs/nodes/src/nodesMsgFuncs.c +++ b/source/libs/nodes/src/nodesMsgFuncs.c @@ -2078,6 +2078,9 @@ static int32_t physiTableScanNodeInlineToMsg(const void* pObj, STlvEncoder* pEnc if (TSDB_CODE_SUCCESS == code) { code = tlvEncodeValueBool(pEncoder, pNode->assignBlockUid); } + if (TSDB_CODE_SUCCESS == code) { + code = tlvEncodeValueI8(pEncoder, pNode->igCheckUpdate); + } return code; } @@ -2154,6 +2157,9 @@ static int32_t msgToPhysiTableScanNodeInline(STlvDecoder* pDecoder, void* pObj) if (TSDB_CODE_SUCCESS == code) { code = tlvDecodeValueBool(pDecoder, &pNode->assignBlockUid); } + if (TSDB_CODE_SUCCESS == code) { + code = tlvDecodeValueI8(pDecoder, &pNode->igCheckUpdate); + } return code; } diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index bd1823a770..a384babb94 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -705,6 +705,7 @@ static int32_t createWindowLogicNodeFinalize(SLogicPlanContext* pCxt, SSelectStm pWindow->watermark = pCxt->pPlanCxt->watermark; pWindow->deleteMark = pCxt->pPlanCxt->deleteMark; pWindow->igExpired = pCxt->pPlanCxt->igExpired; + pWindow->igCheckUpdate = pCxt->pPlanCxt->igCheckUpdate; } pWindow->inputTsOrder = ORDER_ASC; pWindow->outputTsOrder = ORDER_ASC; diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index e901297f4d..ff59087e02 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -332,6 +332,7 @@ static void scanPathOptSetScanWin(SScanLogicNode* pScan) { pScan->watermark = ((SWindowLogicNode*)pParent)->watermark; pScan->deleteMark = ((SWindowLogicNode*)pParent)->deleteMark; pScan->igExpired = ((SWindowLogicNode*)pParent)->igExpired; + pScan->igCheckUpdate = ((SWindowLogicNode*)pParent)->igCheckUpdate; } } diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index df10fe8ee3..f016ca165b 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -582,6 +582,7 @@ static int32_t createTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubp pTableScan->triggerType = pScanLogicNode->triggerType; pTableScan->watermark = pScanLogicNode->watermark; pTableScan->igExpired = pScanLogicNode->igExpired; + pTableScan->igCheckUpdate = pScanLogicNode->igCheckUpdate; pTableScan->assignBlockUid = pCxt->pPlanCxt->rSmaQuery ? true : false; int32_t code = createScanPhysiNodeFinalize(pCxt, pSubplan, pScanLogicNode, (SScanPhysiNode*)pTableScan, pPhyNode); From 57ffc1b5409847b0b905eb977e7a1275177b223e Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 8 Feb 2023 18:55:42 +0800 Subject: [PATCH 29/44] feat: add ignore update option for create stream --- source/libs/nodes/src/nodesCloneFuncs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/libs/nodes/src/nodesCloneFuncs.c b/source/libs/nodes/src/nodesCloneFuncs.c index 9da52edf32..2b1819d5c0 100644 --- a/source/libs/nodes/src/nodesCloneFuncs.c +++ b/source/libs/nodes/src/nodesCloneFuncs.c @@ -380,6 +380,7 @@ static int32_t logicScanCopy(const SScanLogicNode* pSrc, SScanLogicNode* pDst) { COPY_SCALAR_FIELD(watermark); COPY_SCALAR_FIELD(deleteMark); COPY_SCALAR_FIELD(igExpired); + COPY_SCALAR_FIELD(igCheckUpdate); CLONE_NODE_LIST_FIELD(pGroupTags); COPY_SCALAR_FIELD(groupSort); CLONE_NODE_LIST_FIELD(pTags); From 246c17d1e9c84c1480dfc3d95c649ad6747644c4 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 8 Feb 2023 22:25:40 +0800 Subject: [PATCH 30/44] test: add regression test case. --- tests/script/tsim/parser/regressiontest.sim | 42 ++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/script/tsim/parser/regressiontest.sim b/tests/script/tsim/parser/regressiontest.sim index 29937af10e..6f350b439f 100644 --- a/tests/script/tsim/parser/regressiontest.sim +++ b/tests/script/tsim/parser/regressiontest.sim @@ -15,7 +15,7 @@ $db = $dbPrefix . $i sql drop database if exists $db -x step1 step1: -sql create database $db vgroups 1; +sql create database $db vgroups 1 cachemodel 'last_row' sql use $db sql create table $tb (ts timestamp, c1 int) @@ -146,4 +146,44 @@ sql flush database $db print =====================================>TD-22007 sql select count(*) from t1 interval(10a) +sql drop table t1 + +sql create table st1 (ts timestamp, k int) tags(a int); +sql insert into t1 using st1 tags(1) values('2020-1-1 10:10:10', 0); +sql insert into t2 using st1 tags(1) values('2020-1-1 10:10:11', 1); +sql insert into t3 using st1 tags(1) values('2020-1-1 10:10:12', 2); +sql insert into t4 using st1 tags(1) values('2020-1-1 10:10:13', 3); +sql insert into t5 using st1 tags(1) values('2020-1-1 10:10:14', 4); +sql insert into t6 using st1 tags(2) values('2020-1-1 10:10:15', 5); +sql insert into t7 using st1 tags(2) values('2020-1-1 10:10:16', 6); +sql insert into t8 using st1 tags(2) values('2020-1-1 10:10:17', 7); +sql insert into t9 using st1 tags(2) values('2020-1-1 10:10:18', 8); +sql insert into t10 using st1 tags(2) values('2020-1-1 10:10:19', 9); + +sql select count(*) from st1 +if $data00 != 10 then + return -1 +endi + +sql select last_row(*) from st1 group by a +if $rows != 2 then + return -1 +endi + +if $data00 != @20-01-01 10:10:19.000@ then + return -1 +endi + +if $data01 != 9 then + return -1 +endi + +if $data10 != @20-01-01 10:10:14.000@ then + return -1 +endi + +if $data11 != 4 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT From 40987fa507ea77fe80e27a48630a1590dc9bcadb Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Thu, 9 Feb 2023 11:14:28 +0800 Subject: [PATCH 31/44] feat:do not check whether the expired data has been update --- source/libs/executor/src/scanoperator.c | 43 +++---------------- source/libs/planner/src/planLogicCreater.c | 7 +++ source/libs/planner/src/planOptimizer.c | 5 --- .../script/tsim/stream/ignoreExpiredData.sim | 2 + 4 files changed, 16 insertions(+), 41 deletions(-) diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 842098d9ff..f90cc6699b 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -1435,7 +1435,12 @@ static void checkUpdateData(SStreamScanInfo* pInfo, bool invertible, SSDataBlock dumyInfo.cur.pageId = -1; bool isClosed = false; STimeWindow win = {.skey = INT64_MIN, .ekey = INT64_MAX}; - if (tableInserted && isOverdue(tsCol[rowId], &pInfo->twAggSup)) { + bool overDue = isOverdue(tsCol[rowId], &pInfo->twAggSup); + if (pInfo->igExpired && overDue) { + continue; + } + + if (tableInserted && overDue) { win = getActiveTimeWindow(NULL, &dumyInfo, tsCol[rowId], &pInfo->interval, TSDB_ORDER_ASC); isClosed = isCloseWindow(&win, &pInfo->twAggSup); } @@ -1701,41 +1706,6 @@ static SSDataBlock* doStreamScan(SOperatorInfo* pOperator) { SStreamScanInfo* pInfo = pOperator->info; qDebug("stream scan called"); -#if 0 - SStreamState* pState = pTaskInfo->streamInfo.pState; - if (pState) { - printf(">>>>>>>> stream write backend\n"); - SWinKey key = { - .ts = 1, - .groupId = 2, - }; - char tmp[100] = "abcdefg1"; - if (streamStatePut(pState, &key, &tmp, strlen(tmp) + 1) < 0) { - ASSERT(0); - } - - key.ts = 2; - char tmp2[100] = "abcdefg2"; - if (streamStatePut(pState, &key, &tmp2, strlen(tmp2) + 1) < 0) { - ASSERT(0); - } - - key.groupId = 5; - key.ts = 1; - char tmp3[100] = "abcdefg3"; - if (streamStatePut(pState, &key, &tmp3, strlen(tmp3) + 1) < 0) { - ASSERT(0); - } - - char* val2 = NULL; - int32_t sz; - if (streamStateGet(pState, &key, (void**)&val2, &sz) < 0) { - ASSERT(0); - } - printf("stream read %s %d\n", val2, sz); - streamFreeVal(val2); - } -#endif if (pTaskInfo->streamInfo.recoverStep == STREAM_RECOVER_STEP__PREPARE1 || pTaskInfo->streamInfo.recoverStep == STREAM_RECOVER_STEP__PREPARE2) { @@ -2370,6 +2340,7 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys pInfo->partitionSup.needCalc = false; pInfo->igCheckUpdate = pTableScanNode->igCheckUpdate; pInfo->igExpired = pTableScanNode->igExpired; + pInfo->twAggSup.maxTs = INT64_MIN; setOperatorInfo(pOperator, "StreamScanOperator", QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN, false, OP_NOT_OPENED, pInfo, pTaskInfo); diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index a384babb94..bfde50761a 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -343,6 +343,13 @@ static int32_t createScanLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect pScan->node.groupAction = GROUP_ACTION_NONE; pScan->node.resultDataOrder = DATA_ORDER_LEVEL_IN_BLOCK; + if (pCxt->pPlanCxt->streamQuery) { + pScan->triggerType = pCxt->pPlanCxt->triggerType; + pScan->watermark = pCxt->pPlanCxt->watermark; + pScan->deleteMark = pCxt->pPlanCxt->deleteMark; + pScan->igExpired = pCxt->pPlanCxt->igExpired; + pScan->igCheckUpdate = pCxt->pPlanCxt->igCheckUpdate; + } // set columns to scan if (TSDB_CODE_SUCCESS == code) { diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index ff59087e02..90a7261074 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -328,11 +328,6 @@ static void scanPathOptSetScanWin(SScanLogicNode* pScan) { pScan->sliding = ((SWindowLogicNode*)pParent)->sliding; pScan->intervalUnit = ((SWindowLogicNode*)pParent)->intervalUnit; pScan->slidingUnit = ((SWindowLogicNode*)pParent)->slidingUnit; - pScan->triggerType = ((SWindowLogicNode*)pParent)->triggerType; - pScan->watermark = ((SWindowLogicNode*)pParent)->watermark; - pScan->deleteMark = ((SWindowLogicNode*)pParent)->deleteMark; - pScan->igExpired = ((SWindowLogicNode*)pParent)->igExpired; - pScan->igCheckUpdate = ((SWindowLogicNode*)pParent)->igCheckUpdate; } } diff --git a/tests/script/tsim/stream/ignoreExpiredData.sim b/tests/script/tsim/stream/ignoreExpiredData.sim index 03f574bc52..b143b7977f 100644 --- a/tests/script/tsim/stream/ignoreExpiredData.sim +++ b/tests/script/tsim/stream/ignoreExpiredData.sim @@ -52,6 +52,7 @@ sql insert into t1 values(1648791213000,1,2,3,1.0); sql insert into t1 values(1648791223001,1,2,3,1.1); sql insert into t1 values(1648791233002,2,2,3,2.1); sql insert into t1 values(1648791243003,2,2,3,3.1); +sleep 300 sql insert into t1 values(1648791200000,4,2,3,4.1); $loop_count = 0 @@ -115,6 +116,7 @@ sql create stream stream_t1 trigger at_once IGNORE EXPIRED 1 into streamtST1 as sql create stream stream_t2 trigger at_once IGNORE EXPIRED 1 into streamtST2 as select _wstart, count(*) c1, count(a) c2 , sum(a) c3 , max(b) c5, min(c) c6 from st session(ts, 10s) ; sql insert into ts1 values(1648791211000,1,2,3); sql insert into ts1 values(1648791222001,2,2,3); +sleep 300 sql insert into ts2 values(1648791211000,1,2,3); sql insert into ts2 values(1648791222001,2,2,3); From cf1c860f3790ff763dae942a6866b7d52da0891c Mon Sep 17 00:00:00 2001 From: 54liuyao <54liuyao@163.com> Date: Thu, 9 Feb 2023 11:21:51 +0800 Subject: [PATCH 32/44] ci:add test --- .../script/tsim/stream/ignoreCheckUpdate.sim | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/tests/script/tsim/stream/ignoreCheckUpdate.sim b/tests/script/tsim/stream/ignoreCheckUpdate.sim index fb631f788c..7f99c534c8 100644 --- a/tests/script/tsim/stream/ignoreCheckUpdate.sim +++ b/tests/script/tsim/stream/ignoreCheckUpdate.sim @@ -192,4 +192,94 @@ endi print step 3 end +print step 4 start + +sql drop stream if exists streams3; +sql drop database if exists test3; +sql create database test3 vgroups 4; +sql use test3; +sql create stable st(ts timestamp,a int,b int,c int) tags(ta int,tb int,tc int); +sql create table t1 using st tags(1,1,1); +sql create table t2 using st tags(2,2,2); + +print create stream streams3 trigger at_once ignore update 1 into streamt3 as select _wstart c1, count(*) c2, max(b) c3 from st interval(10s); + +sql create stream streams3 trigger at_once ignore update 1 into streamt3 as select _wstart c1, count(*) c2, max(b) c3 from st interval(10s); + +sql insert into t1 values(1648791213000,1,1,1); +sql insert into t1 values(1648791213000,2,2,2); + +sql insert into t2 values(1648791213000,1,1,1); +sql insert into t2 values(1648791213000,2,2,2); + +$loop_count = 0 + +loop0: +sleep 300 +sql select * from streamt3 order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 4 then + print =====data01=$data01 + goto loop0 +endi + +if $data02 != 2 then + print =====data02=$data02 + goto loop0 +endi + + +sql insert into t1 values(1648791213000,3,3,3); + +$loop_count = 0 + +loop1: +sleep 300 +sql select * from streamt3 order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 5 then + print =====data01=$data01 + goto loop1 +endi + +if $data02 != 3 then + print =====data02=$data02 + goto loop1 +endi + +sql insert into t2 values(1648791213000,4,4,4); + +$loop_count = 0 + +loop1: +sleep 300 +sql select * from streamt3 order by 1,2,3; + +$loop_count = $loop_count + 1 +if $loop_count == 10 then + return -1 +endi + +if $data01 != 6 then + print =====data01=$data01 + goto loop1 +endi + +if $data02 != 4 then + print =====data02=$data02 + goto loop1 +endi + +print step 4 end + system sh/stop_dnodes.sh From 0a01fbc16c69ae1e413ce75a95105878bf5b8b07 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 9 Feb 2023 14:00:03 +0800 Subject: [PATCH 33/44] fix:change uid in taosx to avoiding uid same in different db --- include/util/taoserror.h | 1 + source/client/src/clientRawBlockWrite.c | 66 ++++++++++++++++++------- source/util/src/terror.c | 1 + tests/pytest/util/dnodes.py | 2 + tests/system-test/7-tmq/tmq_taosx.py | 5 ++ 5 files changed, 57 insertions(+), 18 deletions(-) diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 21d299f28d..d8eecdfc64 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -111,6 +111,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_NOT_FOUND TAOS_DEF_ERROR_CODE(0, 0x012A) #define TSDB_CODE_NO_DISKSPACE TAOS_DEF_ERROR_CODE(0, 0x012B) #define TSDB_CODE_TIMEOUT_ERROR TAOS_DEF_ERROR_CODE(0, 0x012C) +#define TSDB_CODE_MSG_ENCODE_ERROR TAOS_DEF_ERROR_CODE(0, 0x012D) #define TSDB_CODE_APP_IS_STARTING TAOS_DEF_ERROR_CODE(0, 0x0130) // #define TSDB_CODE_APP_IS_STOPPING TAOS_DEF_ERROR_CODE(0, 0x0131) // diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c index 9a3838a6b4..8c91eacf1e 100644 --- a/source/client/src/clientRawBlockWrite.c +++ b/source/client/src/clientRawBlockWrite.c @@ -25,6 +25,10 @@ #include "tref.h" #include "ttimer.h" +static tb_uid_t processSuid(tb_uid_t suid, char* db){ + return suid + MurmurHash3_32(db, strlen(db)); +} + static char* buildCreateTableJson(SSchemaWrapper* schemaRow, SSchemaWrapper* schemaTag, char* name, int64_t id, int8_t t) { char* string = NULL; @@ -681,7 +685,7 @@ static int32_t taosCreateStb(TAOS* taos, void* meta, int32_t metaLen) { pReq.numOfColumns = req.schemaRow.nCols; pReq.numOfTags = req.schemaTag.nCols; pReq.commentLen = -1; - pReq.suid = req.suid; + pReq.suid = processSuid(req.suid, pRequest->pDb); pReq.source = TD_REQ_FROM_TAOX; pReq.igExists = true; @@ -753,7 +757,7 @@ static int32_t taosDropStb(TAOS* taos, void* meta, int32_t metaLen) { // build drop stable pReq.igNotExists = true; pReq.source = TD_REQ_FROM_TAOX; - pReq.suid = req.suid; + pReq.suid = processSuid(req.suid, pRequest->pDb); STscObj* pTscObj = pRequest->pTscObj; SName tableName = {0}; @@ -871,6 +875,7 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) { if (pCreateReq->type == TSDB_CHILD_TABLE) { STableMeta* pTableMeta = NULL; SName sName = {0}; + pCreateReq->ctb.suid = processSuid(pCreateReq->ctb.suid, pRequest->pDb); toName(pTscObj->acctId, pRequest->pDb, pCreateReq->ctb.stbName, &sName); code = catalogGetTableMeta(pCatalog, &conn, &sName, &pTableMeta); if (code != TSDB_CODE_SUCCESS) { @@ -1008,6 +1013,7 @@ static int32_t taosDropTable(TAOS* taos, void* meta, int32_t metaLen) { for (int32_t iReq = 0; iReq < req.nReqs; iReq++) { pDropReq = req.pReqs + iReq; pDropReq->igNotExists = true; + pDropReq->suid = processSuid(pDropReq->suid, pRequest->pDb); SVgroupInfo pInfo = {0}; SName pName = {0}; @@ -1922,6 +1928,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) SMqTaosxRspObj rspObj = {0}; SDecoder decoder = {0}; STableMeta* pTableMeta = NULL; + void* schemaContent = NULL; terrno = TSDB_CODE_SUCCESS; SRequestObj* pRequest = (SRequestObj*)createRequest(*(int64_t*)taos, TSDB_SQL_INSERT, 0); @@ -2008,27 +2015,49 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) SDecoder decoderTmp = {0}; SVCreateTbReq pCreateReq = {0}; - tDecoderInit(&decoderTmp, *dataTmp, *lenTmp); - if (tDecodeSVCreateTbReq(&decoderTmp, &pCreateReq) < 0) { - tDecoderClear(&decoderTmp); - taosMemoryFreeClear(pCreateReq.comment); - taosArrayDestroy(pCreateReq.ctb.tagName); - goto end; - } + do{ + tDecoderInit(&decoderTmp, *dataTmp, *lenTmp); + if (tDecodeSVCreateTbReq(&decoderTmp, &pCreateReq) < 0) { + code = TSDB_CODE_MSG_DECODE_ERROR; + break; + } - ASSERT(pCreateReq.type == TSDB_CHILD_TABLE); - if (strcmp(tbName, pCreateReq.name) == 0) { - schemaLen = *lenTmp; - schemaData = *dataTmp; + if (strcmp(tbName, pCreateReq.name) != 0) { + break; + } + + pCreateReq.ctb.suid = processSuid(pCreateReq.ctb.suid, pRequest->pDb); + + int32_t len = 0; + tEncodeSize(tEncodeSVCreateTbReq, &pCreateReq, len, code); + if(code != 0) { + code = TSDB_CODE_MSG_ENCODE_ERROR; + break; + } + taosMemoryFree(schemaContent); + schemaContent = taosMemoryMalloc(len); + if(!schemaContent) { + code = TSDB_CODE_OUT_OF_MEMORY; + break; + } + SEncoder encoder = {0}; + tEncoderInit(&encoder, schemaContent, len); + code = tEncodeSVCreateTbReq(&encoder, &pCreateReq); + if (code != 0) { + tEncoderClear(&encoder); + code = TSDB_CODE_MSG_ENCODE_ERROR; + break; + } + schemaLen = len; + schemaData = schemaContent; strcpy(pName.tname, pCreateReq.ctb.stbName); - tDecoderClear(&decoderTmp); - taosMemoryFreeClear(pCreateReq.comment); - taosArrayDestroy(pCreateReq.ctb.tagName); - break; - } + tEncoderClear(&encoder); + }while(0); tDecoderClear(&decoderTmp); taosMemoryFreeClear(pCreateReq.comment); taosArrayDestroy(pCreateReq.ctb.tagName); + if(code != 0) goto end; + if(schemaLen != 0) break; } code = catalogGetTableMeta(pCatalog, &conn, &pName, &pTableMeta); @@ -2217,6 +2246,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) destroyRequest(pRequest); taosHashCleanup(pVgHash); taosMemoryFreeClear(pTableMeta); + taosMemoryFree(schemaContent); return code; } diff --git a/source/util/src/terror.c b/source/util/src/terror.c index d610d26f97..57b1998155 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -88,6 +88,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_NEED_RETRY, "Retry needed") TAOS_DEFINE_ERROR(TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE, "Out of memory in rpc queue") TAOS_DEFINE_ERROR(TSDB_CODE_INVALID_TIMESTAMP, "Invalid timestamp format") TAOS_DEFINE_ERROR(TSDB_CODE_MSG_DECODE_ERROR, "Msg decode error") +TAOS_DEFINE_ERROR(TSDB_CODE_MSG_ENCODE_ERROR, "Msg encode error") TAOS_DEFINE_ERROR(TSDB_CODE_NO_AVAIL_DISK, "No available disk") TAOS_DEFINE_ERROR(TSDB_CODE_NOT_FOUND, "Not found") TAOS_DEFINE_ERROR(TSDB_CODE_NO_DISKSPACE, "Out of disk space") diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 6c71c5cea7..a1682f47b3 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -29,6 +29,7 @@ class TDSimClient: self.testCluster = False self.path = path self.cfgDict = { + "fqdn": "localhost", "numOfLogLines": "100000000", "locale": "en_US.UTF-8", "charset": "UTF-8", @@ -119,6 +120,7 @@ class TDDnode: self.asan = False self.remoteIP = "" self.cfgDict = { + "fqdn": "localhost", "monitor": "0", "maxShellConns": "30000", "locale": "en_US.UTF-8", diff --git a/tests/system-test/7-tmq/tmq_taosx.py b/tests/system-test/7-tmq/tmq_taosx.py index f2fbd84865..0596241ce1 100644 --- a/tests/system-test/7-tmq/tmq_taosx.py +++ b/tests/system-test/7-tmq/tmq_taosx.py @@ -194,6 +194,11 @@ class TDTestCase: tdSql.checkData(0, 2, None) tdSql.checkData(1, 1, 1) tdSql.checkData(1, 2, '{"k1":1,"k2":"hello"}') + + tdSql.query("select * from information_schema.ins_tables where table_name = 'stt4'") + uid1 = tdSql.getData(0, 5) + uid2 = tdSql.getData(1, 5) + tdSql.checkNotEqual(uid1, uid2) return def checkWal1Vgroup(self): From dc70d739bfe0cf35c9b3a2318581d9ac162172e1 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 9 Feb 2023 16:32:58 +0800 Subject: [PATCH 34/44] docs: add interp_clause to select syntax --- docs/zh/12-taos-sql/06-select.md | 6 +++++- docs/zh/12-taos-sql/10-function.md | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/zh/12-taos-sql/06-select.md b/docs/zh/12-taos-sql/06-select.md index 3b681f401c..3db61b9018 100644 --- a/docs/zh/12-taos-sql/06-select.md +++ b/docs/zh/12-taos-sql/06-select.md @@ -12,6 +12,7 @@ SELECT {DATABASE() | CLIENT_VERSION() | SERVER_VERSION() | SERVER_STATUS() | NOW SELECT [DISTINCT] select_list from_clause [WHERE condition] + [interp_clause] [partition_by_clause] [window_clause] [group_by_clause] @@ -53,8 +54,11 @@ window_clause: { | STATE_WINDOW(col) | INTERVAL(interval_val [, interval_offset]) [SLIDING (sliding_val)] [WATERMARK(watermark_val)] [FILL(fill_mod_and_val)] +interp_clause: + RANGE(ts_val, ts_val), EVERY(every_val), FILL(fill_mod_and_val) + partition_by_clause: - PARTITION BY expr [, expr] ... + PARTITION BY expr [, expr] ... group_by_clause: GROUP BY expr [, expr] ... HAVING condition diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md index c2fe0f0cb6..c44c09d10c 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 的输出时间范围根据 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 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。关于 FILL 子句如何使用请参考 [FILL 子句](../distinguished/#fill-子句) - INTERP 只能在一个时间序列内进行插值,因此当作用于超级表时必须跟 partition by tbname 一起使用。 - INTERP 可以与伪列 _irowts 一起使用,返回插值点所对应的时间戳(3.0.1.4版本以后支持)。 From 30bd177280217f79545a4b77814c529130f8ef51 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 9 Feb 2023 16:32:58 +0800 Subject: [PATCH 35/44] docs: add interp_clause to select syntax --- docs/en/12-taos-sql/06-select.md | 6 +++++- docs/en/12-taos-sql/10-function.md | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/en/12-taos-sql/06-select.md b/docs/en/12-taos-sql/06-select.md index c087a9e9fb..ed719e4d51 100644 --- a/docs/en/12-taos-sql/06-select.md +++ b/docs/en/12-taos-sql/06-select.md @@ -11,6 +11,7 @@ SELECT {DATABASE() | CLIENT_VERSION() | SERVER_VERSION() | SERVER_STATUS() | NOW SELECT [DISTINCT] select_list from_clause [WHERE condition] + [interp_clause] [partition_by_clause] [window_clause] [group_by_clause] @@ -52,8 +53,11 @@ window_clause: { | STATE_WINDOW(col) | INTERVAL(interval_val [, interval_offset]) [SLIDING (sliding_val)] [WATERMARK(watermark_val)] [FILL(fill_mod_and_val)] +interp_clause: + RANGE(ts_val, ts_val), EVERY(every_val), FILL(fill_mod_and_val) + partition_by_clause: - PARTITION BY expr [, expr] ... + PARTITION BY expr [, expr] ... group_by_clause: GROUP BY expr [, expr] ... HAVING condition diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index 1d1a4560f1..8ab5176aab 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -872,9 +872,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 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). +- 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. - Pseudo column `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.1.4). From 564e21dd21a4b93ed9fdd44caf3ebfe27e7b6e1b Mon Sep 17 00:00:00 2001 From: Ganlin Zhao <36554565+glzhao89@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:44:17 +0800 Subject: [PATCH 36/44] Update 06-select.md --- docs/en/12-taos-sql/06-select.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/12-taos-sql/06-select.md b/docs/en/12-taos-sql/06-select.md index ed719e4d51..485779f55f 100644 --- a/docs/en/12-taos-sql/06-select.md +++ b/docs/en/12-taos-sql/06-select.md @@ -11,8 +11,8 @@ SELECT {DATABASE() | CLIENT_VERSION() | SERVER_VERSION() | SERVER_STATUS() | NOW SELECT [DISTINCT] select_list from_clause [WHERE condition] - [interp_clause] [partition_by_clause] + [interp_clause] [window_clause] [group_by_clause] [order_by_clasue] From 19ee0e8ae4dc5bfd3b169fb033005b6275e86a6b Mon Sep 17 00:00:00 2001 From: Ganlin Zhao <36554565+glzhao89@users.noreply.github.com> Date: Thu, 9 Feb 2023 16:44:56 +0800 Subject: [PATCH 37/44] Update 06-select.md --- docs/zh/12-taos-sql/06-select.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/12-taos-sql/06-select.md b/docs/zh/12-taos-sql/06-select.md index 3db61b9018..b9b26279e6 100644 --- a/docs/zh/12-taos-sql/06-select.md +++ b/docs/zh/12-taos-sql/06-select.md @@ -12,8 +12,8 @@ SELECT {DATABASE() | CLIENT_VERSION() | SERVER_VERSION() | SERVER_STATUS() | NOW SELECT [DISTINCT] select_list from_clause [WHERE condition] - [interp_clause] [partition_by_clause] + [interp_clause] [window_clause] [group_by_clause] [order_by_clasue] From e6ccb777a3ac020fed1f6b9c9f5001b416db7eb5 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 9 Feb 2023 22:24:45 +0800 Subject: [PATCH 38/44] fix: taos shell show err msg twice with cloud service (#19894) --- tools/shell/src/shellWebsocket.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/shell/src/shellWebsocket.c b/tools/shell/src/shellWebsocket.c index add3ccc51f..b93cc02964 100644 --- a/tools/shell/src/shellWebsocket.c +++ b/tools/shell/src/shellWebsocket.c @@ -218,8 +218,13 @@ void shellRunSingleCommandWebsocketImp(char *command) { res = ws_query_timeout(shell.ws_conn, command, shell.args.timeout); int code = ws_errno(res); if (code != 0 && !shell.stop_query) { - et = taosGetTimestampUs(); - fprintf(stderr, "\nDB: error: %s (%.6fs)\n", ws_errstr(res), (et - st)/1E6); + // websocket interface masked off first bit from standard error number. + if (TSDB_CODE_PAR_SYNTAX_ERROR == (code|0x80000000)) { + et = taosGetTimestampUs(); + fprintf(stderr, "\nDB: error: %s (%.6fs)\n", ws_errstr(res), (et - st)/1E6); + ws_free_result(res); + return; + } if (code == TSDB_CODE_WS_SEND_TIMEOUT || code == TSDB_CODE_WS_RECV_TIMEOUT) { fprintf(stderr, "Hint: use -t to increase the timeout in seconds\n"); } else if (code == TSDB_CODE_WS_INTERNAL_ERRO || code == TSDB_CODE_WS_CLOSED) { From 0fbaf4eab068286d0221eff3ad6daf4d29174a14 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 9 Feb 2023 23:01:44 +0800 Subject: [PATCH 39/44] fix(query): set lastkey during check of valid ts. --- source/dnode/vnode/src/tsdb/tsdbRead.c | 27 +++++++------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 53e5cd7a88..348d471d3b 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -1611,9 +1611,9 @@ static int32_t buildDataBlockFromBuf(STsdbReader* pReader, STableBlockScanInfo* double elapsedTime = (taosGetTimestampUs() - st) / 1000.0; tsdbDebug("%p build data block from cache completed, elapsed time:%.2f ms, numOfRows:%d, brange:%" PRId64 - " - %" PRId64 " %s", + " - %" PRId64 ", uid:%"PRIu64", %s", pReader, elapsedTime, pBlock->info.rows, pBlock->info.window.skey, pBlock->info.window.ekey, - pReader->idStr); + pBlockScanInfo->uid, pReader->idStr); pReader->cost.buildmemBlock += elapsedTime; return code; @@ -1639,7 +1639,7 @@ static bool tryCopyDistinctRowFromFileBlock(STsdbReader* pReader, SBlockData* pB return false; } -static bool nextRowFromLastBlocks(SLastBlockReader* pLastBlockReader, STableBlockScanInfo* pBlockScanInfo, +static bool nextRowFromLastBlocks(SLastBlockReader* pLastBlockReader, STableBlockScanInfo* pScanInfo, SVersionRange* pVerRange) { while (1) { bool hasVal = tMergeTreeNext(&pLastBlockReader->mergeTree); @@ -1649,8 +1649,9 @@ static bool nextRowFromLastBlocks(SLastBlockReader* pLastBlockReader, STableBloc TSDBROW row = tMergeTreeGetRow(&pLastBlockReader->mergeTree); TSDBKEY k = TSDBROW_KEY(&row); - if (!hasBeenDropped(pBlockScanInfo->delSkyline, &pBlockScanInfo->lastBlockDelIndex, &k, pLastBlockReader->order, - pVerRange)) { + if (hasBeenDropped(pScanInfo->delSkyline, &pScanInfo->lastBlockDelIndex, &k, pLastBlockReader->order, pVerRange)) { + pScanInfo->lastKey = k.ts; + } else { return true; } } @@ -2316,6 +2317,7 @@ static bool initLastBlockReader(SLastBlockReader* pLBlockReader, STableBlockScan w.ekey = pScanInfo->lastKey + step; } + tsdbDebug("init last block reader, window:%"PRId64"-%"PRId64", uid:%"PRIu64", %s", w.skey, w.ekey, pScanInfo->uid, pReader->idStr); int32_t code = tMergeTreeOpen(&pLBlockReader->mergeTree, (pLBlockReader->order == TSDB_ORDER_DESC), pReader->pFileReader, pReader->suid, pScanInfo->uid, &w, &pLBlockReader->verRange, pLBlockReader->pInfo, false, pReader->idStr); @@ -2755,18 +2757,6 @@ static void extractOrderedTableUidList(SUidOrderCheckInfo* pOrderCheckInfo, SRea taosSort(pOrderCheckInfo->tableUidList, total, sizeof(uint64_t), uidComparFunc); } -// reset the last del file index -static void resetScanBlockLastBlockDelIndex(SReaderStatus* pStatus, int32_t order) { - void* p = taosHashIterate(pStatus->pTableMap, NULL); - while (p != NULL) { - STableBlockScanInfo* pScanInfo = *(STableBlockScanInfo**)p; - - // reset the last del file index - pScanInfo->lastBlockDelIndex = getInitialDelIndex(pScanInfo->delSkyline, order); - p = taosHashIterate(pStatus->pTableMap, p); - } -} - static int32_t initOrderCheckInfo(SUidOrderCheckInfo* pOrderCheckInfo, STsdbReader* pReader) { SReaderStatus* pStatus = &pReader->status; @@ -3082,7 +3072,6 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) { // this file does not have data files, let's start check the last block file if exists if (pBlockIter->numOfBlocks == 0) { - resetScanBlockLastBlockDelIndex(&pReader->status, pReader->order); goto _begin; } } @@ -3114,7 +3103,6 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) { // data blocks in current file are exhausted, let's try the next file now tBlockDataReset(&pReader->status.fileBlockData); resetDataBlockIterator(pBlockIter, pReader->order); - resetScanBlockLastBlockDelIndex(&pReader->status, pReader->order); goto _begin; } else { code = initForFirstBlockInFile(pReader, pBlockIter); @@ -3126,7 +3114,6 @@ static int32_t buildBlockFromFiles(STsdbReader* pReader) { // this file does not have blocks, let's start check the last block file if (pBlockIter->numOfBlocks == 0) { - resetScanBlockLastBlockDelIndex(&pReader->status, pReader->order); goto _begin; } } From 3b238524b0fcbadd163f1bcbff8656a297026ed4 Mon Sep 17 00:00:00 2001 From: xiaolei li <85657333+xleili@users.noreply.github.com> Date: Fri, 10 Feb 2023 00:30:30 +0800 Subject: [PATCH 40/44] release:update main version to 3.0.2.5 (#19898) --- cmake/cmake.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cmake.version b/cmake/cmake.version index a4c783b6c8..a30618157b 100644 --- a/cmake/cmake.version +++ b/cmake/cmake.version @@ -2,7 +2,7 @@ IF (DEFINED VERNUMBER) SET(TD_VER_NUMBER ${VERNUMBER}) ELSE () - SET(TD_VER_NUMBER "3.0.2.4") + SET(TD_VER_NUMBER "3.0.2.5") ENDIF () IF (DEFINED VERCOMPATIBLE) From 443e8e25009e50aa1b21bb626c66bc8b93701d44 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 10 Feb 2023 10:23:41 +0800 Subject: [PATCH 41/44] fix(query): add limit/offset for sys table scan operator. --- source/libs/executor/src/sysscanoperator.c | 72 +++++++++++----------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index b4da3ae710..3f9e61dbbb 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -65,7 +65,7 @@ typedef struct SSysTableScanInfo { SSDataBlock* pRes; int64_t numOfBlocks; // extract basic running information. SLoadRemoteDataInfo loadInfo; - + SLimitInfo limitInfo; int32_t tbnameSlotId; } SSysTableScanInfo; @@ -133,7 +133,6 @@ static int32_t buildSysDbTableInfo(const SSysTableScanInfo* pInfo, int32_t capac static SSDataBlock* buildInfoSchemaTableMetaBlock(char* tableName); static void destroySysScanOperator(void* param); static int32_t loadSysTableCallback(void* param, SDataBuf* pMsg, int32_t code); -static SSDataBlock* doFilterResult(SSDataBlock* pDataBlock, SFilterInfo* pFilterInfo); static __optSysFilter optSysGetFilterFunc(int32_t ctype, bool* reverse); static int32_t sysTableUserTagsFillOneTableTags(const SSysTableScanInfo* pInfo, SMetaReader* smrSuperTable, @@ -351,7 +350,7 @@ static int32_t optSysMergeRslt(SArray* mRslt, SArray* rslt); static SSDataBlock* sysTableScanFromMNode(SOperatorInfo* pOperator, SSysTableScanInfo* pInfo, const char* name, SExecTaskInfo* pTaskInfo); void extractTbnameSlotId(SSysTableScanInfo* pInfo, const SScanPhysiNode* pScanNode); -static SSDataBlock* sysTableScanFillTbName(SOperatorInfo* pOperator, const SSysTableScanInfo* pInfo, +static void sysTableScanFillTbName(SOperatorInfo* pOperator, const SSysTableScanInfo* pInfo, const char* name, SSDataBlock* pBlock); __optSysFilter optSysGetFilterFunc(int32_t ctype, bool* reverse) { if (ctype == OP_TYPE_LOWER_EQUAL || ctype == OP_TYPE_LOWER_THAN) { @@ -556,7 +555,7 @@ void relocateAndFilterSysTagsScanResult(SSysTableScanInfo* pInfo, int32_t numOfR pInfo->pRes->info.rows = numOfRows; relocateColumnData(pInfo->pRes, pInfo->matchInfo.pList, dataBlock->pDataBlock, false); - doFilterResult(pInfo->pRes, pFilterInfo); + doFilter(pInfo->pRes, pFilterInfo, NULL); blockDataCleanup(dataBlock); } @@ -975,7 +974,7 @@ static SSDataBlock* sysTableBuildUserTablesByUids(SOperatorInfo* pOperator) { pInfo->pRes->info.rows = numOfRows; relocateColumnData(pInfo->pRes, pInfo->matchInfo.pList, p->pDataBlock, false); - doFilterResult(pInfo->pRes, pOperator->exprSupp.pFilterInfo); + doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); blockDataCleanup(p); numOfRows = 0; @@ -991,7 +990,7 @@ static SSDataBlock* sysTableBuildUserTablesByUids(SOperatorInfo* pOperator) { pInfo->pRes->info.rows = numOfRows; relocateColumnData(pInfo->pRes, pInfo->matchInfo.pList, p->pDataBlock, false); - doFilterResult(pInfo->pRes, pOperator->exprSupp.pFilterInfo); + doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); blockDataCleanup(p); numOfRows = 0; @@ -1152,7 +1151,7 @@ static SSDataBlock* sysTableBuildUserTables(SOperatorInfo* pOperator) { pInfo->pRes->info.rows = numOfRows; relocateColumnData(pInfo->pRes, pInfo->matchInfo.pList, p->pDataBlock, false); - doFilterResult(pInfo->pRes, pOperator->exprSupp.pFilterInfo); + doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); blockDataCleanup(p); numOfRows = 0; @@ -1168,7 +1167,7 @@ static SSDataBlock* sysTableBuildUserTables(SOperatorInfo* pOperator) { pInfo->pRes->info.rows = numOfRows; relocateColumnData(pInfo->pRes, pInfo->matchInfo.pList, p->pDataBlock, false); - doFilterResult(pInfo->pRes, pOperator->exprSupp.pFilterInfo); + doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); blockDataCleanup(p); numOfRows = 0; @@ -1199,7 +1198,7 @@ static SSDataBlock* sysTableScanUserTables(SOperatorInfo* pOperator) { // the retrieve is executed on the mnode, so return tables that belongs to the information schema database. if (pInfo->readHandle.mnd != NULL) { buildSysDbTableInfo(pInfo, pOperator->resultInfo.capacity); - doFilterResult(pInfo->pRes, pOperator->exprSupp.pFilterInfo); + doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); pInfo->loadInfo.totalRows += pInfo->pRes->info.rows; setOperatorCompleted(pOperator); @@ -1324,6 +1323,7 @@ static SSDataBlock* doSysTableScan(SOperatorInfo* pOperator) { getDBNameFromCondition(pInfo->pCondition, dbName); sprintf(pInfo->req.db, "%d.%s", pInfo->accountId, dbName); } + SSDataBlock* pBlock = NULL; if (strncasecmp(name, TSDB_INS_TABLE_TABLES, TSDB_TABLE_FNAME_LEN) == 0) { pBlock = sysTableScanUserTables(pOperator); @@ -1336,30 +1336,37 @@ static SSDataBlock* doSysTableScan(SOperatorInfo* pOperator) { pBlock = sysTableScanFromMNode(pOperator, pInfo, name, pTaskInfo); } - return sysTableScanFillTbName(pOperator, pInfo, name, pBlock); -} - -static SSDataBlock* sysTableScanFillTbName(SOperatorInfo* pOperator, const SSysTableScanInfo* pInfo, - const char* name, SSDataBlock* pBlock) { + sysTableScanFillTbName(pOperator, pInfo, name, pBlock); if (pBlock != NULL) { - if (pInfo->tbnameSlotId != -1) { - SColumnInfoData* pColumnInfoData = (SColumnInfoData*)taosArrayGet(pBlock->pDataBlock, pInfo->tbnameSlotId); - char varTbName[TSDB_TABLE_FNAME_LEN - 1 + VARSTR_HEADER_SIZE] = {0}; - memcpy(varDataVal(varTbName), name, strlen(name)); - varDataSetLen(varTbName, strlen(name)); - for (int i = 0; i < pBlock->info.rows; ++i) { - colDataAppend(pColumnInfoData, i, varTbName, NULL); - } - doFilterResult(pBlock, pOperator->exprSupp.pFilterInfo); + bool limitReached = applyLimitOffset(&pInfo->limitInfo, pBlock, pTaskInfo); + if (limitReached) { + setOperatorCompleted(pOperator); } - } - if (pBlock && pBlock->info.rows != 0) { - return pBlock; + + return pBlock->info.rows > 0? pBlock:NULL; } else { return NULL; } } +static void sysTableScanFillTbName(SOperatorInfo* pOperator, const SSysTableScanInfo* pInfo, const char* name, + SSDataBlock* pBlock) { + if (pBlock == NULL) { + return; + } + + if (pInfo->tbnameSlotId != -1) { + SColumnInfoData* pColumnInfoData = (SColumnInfoData*)taosArrayGet(pBlock->pDataBlock, pInfo->tbnameSlotId); + char varTbName[TSDB_TABLE_FNAME_LEN - 1 + VARSTR_HEADER_SIZE] = {0}; + memcpy(varDataVal(varTbName), name, strlen(name)); + varDataSetLen(varTbName, strlen(name)); + + colDataAppendNItems(pColumnInfoData, 0, varTbName, pBlock->info.rows); + } + + doFilter(pBlock, pOperator->exprSupp.pFilterInfo, NULL); +} + static SSDataBlock* sysTableScanFromMNode(SOperatorInfo* pOperator, SSysTableScanInfo* pInfo, const char* name, SExecTaskInfo* pTaskInfo) { if (pOperator->status == OP_EXEC_DONE) { @@ -1423,7 +1430,7 @@ static SSDataBlock* sysTableScanFromMNode(SOperatorInfo* pOperator, SSysTableSca updateLoadRemoteInfo(&pInfo->loadInfo, pRsp->numOfRows, pRsp->compLen, startTs, pOperator); // todo log the filter info - doFilterResult(pInfo->pRes, pOperator->exprSupp.pFilterInfo); + doFilter(pInfo->pRes, pOperator->exprSupp.pFilterInfo, NULL); taosMemoryFree(pRsp); if (pInfo->pRes->info.rows > 0) { return pInfo->pRes; @@ -1457,13 +1464,13 @@ SOperatorInfo* createSysTableScanOperatorInfo(void* readHandle, SSystemTableScan pInfo->sysInfo = pScanPhyNode->sysInfo; pInfo->showRewrite = pScanPhyNode->showRewrite; pInfo->pRes = createDataBlockFromDescNode(pDescNode); - pInfo->pCondition = pScanNode->node.pConditions; code = filterInitFromNode(pScanNode->node.pConditions, &pOperator->exprSupp.pFilterInfo, 0); if (code != TSDB_CODE_SUCCESS) { goto _error; } + initLimitInfo(pScanPhyNode->scan.node.pLimit, pScanPhyNode->scan.node.pSlimit, &pInfo->limitInfo); initResultSizeInfo(&pOperator->resultInfo, 4096); blockDataEnsureCapacity(pInfo->pRes, pOperator->resultInfo.capacity); @@ -1556,15 +1563,6 @@ int32_t loadSysTableCallback(void* param, SDataBuf* pMsg, int32_t code) { return TSDB_CODE_SUCCESS; } -SSDataBlock* doFilterResult(SSDataBlock* pDataBlock, SFilterInfo* pFilterInfo) { - if (pFilterInfo == NULL) { - return pDataBlock->info.rows == 0 ? NULL : pDataBlock; - } - - doFilter(pDataBlock, pFilterInfo, NULL); - return pDataBlock->info.rows == 0 ? NULL : pDataBlock; -} - static int32_t sysChkFilter__Comm(SNode* pNode) { // impl SOperatorNode* pOper = (SOperatorNode*)pNode; From a22a8cbfcc0d8c2e607d1314a6cf2a981425fc3e Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 10 Feb 2023 10:31:55 +0800 Subject: [PATCH 42/44] test: add a regression test case. --- tests/script/tsim/parser/regressiontest.sim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/script/tsim/parser/regressiontest.sim b/tests/script/tsim/parser/regressiontest.sim index 6f350b439f..c08b1bbf27 100644 --- a/tests/script/tsim/parser/regressiontest.sim +++ b/tests/script/tsim/parser/regressiontest.sim @@ -186,4 +186,10 @@ if $data11 != 4 then return -1 endi +print ===============================================> TS-2613 +sql select * from information_schema.ins_databases limit 1 offset 1; +if $rows != 1 then + return -1 +endi + system sh/exec.sh -n dnode1 -s stop -x SIGINT From 20b3f0b2daef8f0822cad9937ccf8006a16e33a3 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 10 Feb 2023 11:29:01 +0800 Subject: [PATCH 43/44] docs: fix java example link (#19909) --- examples/JDBC/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/ From 4f4d39a16b07286f230313c67165c0f5a7b50a66 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 10 Feb 2023 11:32:18 +0800 Subject: [PATCH 44/44] fix(query): set correct last key. --- source/dnode/vnode/src/tsdb/tsdbRead.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 348d471d3b..6400e7534b 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -1641,6 +1641,8 @@ static bool tryCopyDistinctRowFromFileBlock(STsdbReader* pReader, SBlockData* pB static bool nextRowFromLastBlocks(SLastBlockReader* pLastBlockReader, STableBlockScanInfo* pScanInfo, SVersionRange* pVerRange) { + int32_t step = ASCENDING_TRAVERSE(pLastBlockReader->order)? 1:-1; + while (1) { bool hasVal = tMergeTreeNext(&pLastBlockReader->mergeTree); if (!hasVal) { @@ -1652,6 +1654,12 @@ static bool nextRowFromLastBlocks(SLastBlockReader* pLastBlockReader, STableBloc if (hasBeenDropped(pScanInfo->delSkyline, &pScanInfo->lastBlockDelIndex, &k, pLastBlockReader->order, pVerRange)) { pScanInfo->lastKey = k.ts; } else { + // the qualifed ts may equal to k.ts, only a greater version one. + // here we need to fallback one step. + if (pScanInfo->lastKey == k.ts) { + pScanInfo->lastKey -= step; + } + return true; } }