From e7f7c736bf7cb76dce58255599f0f3a6e0e0dec8 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Thu, 1 Dec 2022 15:48:05 +0800 Subject: [PATCH 01/64] test:add testcase of mnode clusters --- tests/system-test/0-others/compatibility.py | 1 + .../5dnode3mnodeRestartDnodeInsertData.py | 13 ++++++++ ...5dnode3mnodeRestartDnodeInsertDataAsync.py | 30 +++++-------------- .../6-cluster/clusterCommonCreate.py | 12 ++++++++ 4 files changed, 33 insertions(+), 23 deletions(-) diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index 7f52c754cf..287370f5ed 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -68,6 +68,7 @@ class TDTestCase: my_file = Path(f"{packagePath}/{packageName}") if not my_file.exists(): print(f"{packageName} is not exists") + tdLog.info(f"cd {packagePath} && wget https://www.tdengine.com/assets-download/3.0/{packageName}") os.system(f"cd {packagePath} && wget https://www.tdengine.com/assets-download/3.0/{packageName}") else: print(f"{packageName} has been exists") diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py index 94e02b77b3..392b0d7764 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py @@ -161,6 +161,19 @@ class TDTestCase: stableName= '%s_%d'%(paraDict['stbName'],i) newTdSql=tdCom.newTdSql() threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + + for i in range(5): + clusterComCreate.createUser(newTdSql,f"user{i}",f"pass{i}") + userTdSql=tdCom.newTdSql(user=f"user{i}",password=f"pass{i}") + clusterComCreate.alterUser(userTdSql,f"user{i}",f"pass{i+1}") + clusterComCreate.deleteUser(newTdSql,f"user{i}") + for j in range(5): + i=100 + clusterComCreate.createUser(newTdSql,f"user{i}",f"pass{i}") + userTdSql=tdCom.newTdSql(user=f"user{i}",password=f"pass{i}") + clusterComCreate.alterUser(userTdSql,f"user{i}",f"pass{i+1}") + clusterComCreate.deleteUser(newTdSql,f"user{i}") + for tr in threads: tr.start() for tr in threads: diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py index d6d06446a1..66c2fdd14f 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py @@ -67,29 +67,11 @@ class TDTestCase: self._async_raise(thread.ident, SystemExit) - def insertData(self,countstart,countstop): - # fisrt add data : db\stable\childtable\general table - - for couti in range(countstart,countstop): - tdLog.debug("drop database if exists db%d" %couti) - tdSql.execute("drop database if exists db%d" %couti) - print("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("use db%d" %couti) - tdSql.execute( - '''create table stb1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - tags (t1 int) - ''' - ) - tdSql.execute( - ''' - create table t1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - ''' - ) - for i in range(4): - tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + def reCreateUser(self, tdsql, count, user, passwd): + clusterComCreate.createUser(tdsql,f"{user}{count}",f"{passwd}{count}") + userTdSql=tdCom.newTdSql(user=f"{user}{count}",password=f"{passwd}{count}") + clusterComCreate.alterUser(userTdSql,f"{user}{count}",f"{passwd}{count+1}") + clusterComCreate.deleteUser(tdsql,f"{user}{count}") def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): @@ -161,6 +143,8 @@ class TDTestCase: stableName= '%s_%d'%(paraDict['stbName'],i) newTdSql=tdCom.newTdSql() threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + threads.append(threading.Thread(target=self.reCreateUser,args=(newTdSql,i,"user","passwd"))) + for tr in threads: tr.start() diff --git a/tests/system-test/6-cluster/clusterCommonCreate.py b/tests/system-test/6-cluster/clusterCommonCreate.py index 236708cf07..caf12bfbf6 100644 --- a/tests/system-test/6-cluster/clusterCommonCreate.py +++ b/tests/system-test/6-cluster/clusterCommonCreate.py @@ -142,7 +142,19 @@ class ClusterComCreate: tsql.execute("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,1, vgroups, replica)) tdLog.debug("complete to create database %s_%d"%(dbNameIndex,1)) + def createUser(self,tsql,user,password): + tdLog.info(f"create new user f{user}") + tsql.execute(f"CREATE USER {user} PASS '{password}';") + def alterUser(self,tsql,user,password): + tdLog.info(f"alter user {user} pass '{password}'") + tsql.execute(f"alter USER {user} pass '{password}' ;") + + def deleteUser(self,tsql,user): + tdLog.info(f"drop user f{user}") + tsql.execute(f"DROP USER {user} ;") + + def create_stable(self,tsql, dbName,stbName): tsql.execute("create table if not exists %s.%s (ts timestamp, c1 int, c2 int, c3 binary(16)) tags(t1 int, t2 binary(32))"%(dbName, stbName)) tdLog.debug("complete to create %s.%s" %(dbName, stbName)) From ada5f6cd2a1b7cea6cc982a420148ed63f299616 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Fri, 9 Dec 2022 13:56:58 +0800 Subject: [PATCH 02/64] test:add testcase of mutiMnode replica 3 --- .../5dnode3mnodeSep1VnodeStopDnodeCreateDb.py | 5 +- ...dnode3mnodeSep1VnodeStopDnodeInsertData.py | 18 +- ...dnode3mnodeSep1VnodeStopDnodeModifyMeta.py | 202 +++++++++++ ...5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py | 209 +++++++++++ ...5dnode3mnodeSepVnodeStopDnodeCreateUser.py | 224 ++++++++++++ .../5dnode3mnodeSeperate1VnodeStopInsert.py | 324 ------------------ .../6-cluster/clusterCommonCheck.py | 2 +- .../6-cluster/clusterCommonCreate.py | 44 ++- 8 files changed, 689 insertions(+), 339 deletions(-) create mode 100644 tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py create mode 100644 tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py create mode 100644 tests/system-test/6-cluster/5dnode3mnodeSepVnodeStopDnodeCreateUser.py delete mode 100644 tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py index 881f383b8c..b55c689eee 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py @@ -147,6 +147,9 @@ class TDTestCase: # print(f"==================={dbNameIndex},{a11111}") threads.append(threading.Thread(target=clusterComCreate.createDeltedatabases, args=(newTdSql, dbNameIndex,repeatNumber,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']))) + redbNameIndex = '%s%d'%(paraDict["dbName"],i+100) + threads.append(threading.Thread(target=clusterComCreate.createDeltedatabases, args=(newTdSql, redbNameIndex,1,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']))) + for tr in threads: tr.start() @@ -199,7 +202,7 @@ class TDTestCase: def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=4,stopRole='dnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py index 265000bdc9..296e9daeca 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py @@ -97,7 +97,7 @@ class TDTestCase: 'dropFlag': 1, 'event': '', 'vgroups': 4, - 'replica': 1, + 'replica': 3, 'stbName': 'stb', 'stbNumbers': 2, 'colPrefix': 'c', @@ -105,9 +105,9 @@ class TDTestCase: 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], 'ctbPrefix': 'ctb', - 'ctbNum': 200, + 'ctbNum': 100, 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 - "rowsPerTbl": 10000, + "rowsPerTbl": 100000, "batchNum": 5000 } @@ -198,16 +198,16 @@ class TDTestCase: clusterComCheck.checkDbRows(dbNumbers) # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) - tdSql.execute("use %s" %(paraDict["dbName"])) - tdSql.query("show stables") + # tdSql.execute("use %s" %(paraDict["dbName"])) + tdSql.query("show %s.stables"%(paraDict["dbName"])) tdSql.checkRows(paraDict["stbNumbers"]) for i in range(paraDict['stbNumbers']): - stableName= '%s_%d'%(paraDict['stbName'],i) - tdSql.query("select * from %s"%stableName) - tdSql.checkRows(rowsPerStb) + stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + tdSql.query("select count(*) from %s"%stableName) + tdSql.checkData(0,0,rowsPerStb) def run(self): # print(self.master_dnode.cfgDict) - self.fiveDnodeThreeMnode(dnodeNumbers=5,mnodeNums=3,restartNumbers=2,stopRole='dnode') + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') def stop(self): tdSql.close() diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py new file mode 100644 index 0000000000..06d626b77c --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py @@ -0,0 +1,202 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +from numpy import row_stack +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db0_0', + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 3, + 'stbName': 'stb', + 'stbNumbers': 2, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 200, + 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 + "rowsPerTbl": 1000, + "batchNum": 5000 + } + + dnodeNumbers=int(dnodeNumbers) + mnodeNums=int(mnodeNums) + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allctbNumbers=(paraDict['stbNumbers']*paraDict["ctbNum"]) + rowsPerStb=paraDict["ctbNum"]*paraDict["rowsPerTbl"] + rowsall=rowsPerStb*paraDict['stbNumbers'] + dbNumbers = 1 + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + tdLog.info("Take turns stopping Mnodes ") + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + + # create stable:stb_0 + stableName= paraDict['stbName'] + newTdSql=tdCom.newTdSql() + clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers']) + #create child table:ctb_0 + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum']) + #insert date + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + for tr in threads: + tr.start() + for tr in threads: + tr.join() + + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + clusterComCheck.checkDbRows(dbNumbers) + if i == 0 : + stableName= '%s_%d'%(paraDict['stbName'],0) + newTdSql=tdCom.newTdSql() + clusterComCreate.alterStbMetaData(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"]) + # sleep(10) + tdDnodes[i].starttaosd() + + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("123") + else: + print("456") + + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + clusterComCheck.checkDnodes(dnodeNumbers) + clusterComCheck.checkDbRows(dbNumbers) + # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) + + # tdSql.execute("use %s" %(paraDict["dbName"])) + tdSql.query("show %s.stables"%(paraDict["dbName"])) + tdSql.checkRows(paraDict["stbNumbers"]) + for i in range(paraDict['stbNumbers']): + stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + tdSql.query("select count(*) from %s"%stableName) + if i == 0 : + tdSql.checkData(0,0,rowsPerStb*2) + else: + tdSql.checkData(0,0,rowsPerStb) + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='dnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py new file mode 100644 index 0000000000..9d99980b88 --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeRCreateDb.py @@ -0,0 +1,209 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + self.replicaVar=int(replicaVar) + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def insertData(self,countstart,countstop): + # fisrt add data : db\stable\childtable\general table + + for couti in range(countstart,countstop): + tdLog.debug("drop database if exists db%d" %couti) + tdSql.execute("drop database if exists db%d" %couti) + print("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("use db%d" %couti) + tdSql.execute( + '''create table stb1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + tags (t1 int) + ''' + ) + tdSql.execute( + ''' + create table t1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + ''' + ) + for i in range(4): + tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db', + 'dbNumbers': 4, + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 3, + 'stbName': 'stb', + 'stbNumbers': 100, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 1, + } + + dnodeNumbers=int(dnodeNumbers) + dbNumbers=paraDict['dbNumbers'] + mnodeNums=int(mnodeNums) + repeatNumber = 2 + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allDbNumbers=dbNumbers + allStbNumbers=(paraDict['stbNumbers']*restartNumbers) + paraDict['replica'] = self.replicaVar + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + for i in range(dbNumbers): + dbNameIndex = '%s%d'%(paraDict["dbName"],0) + newTdSql=tdCom.newTdSql() + # a11111=paraDict["dbNumbers"] + # print(f"==================={dbNameIndex},{a11111}") + clusterComCreate.createDeltedatabases(newTdSql, dbNameIndex,repeatNumber,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + + redbNameIndex = '%s%d'%(paraDict["dbName"],100) + clusterComCreate.createDeltedatabases(newTdSql, redbNameIndex,1,paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + + + tdLog.info("Take turns stopping Mnodes ") + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("check dnodes status is ready") + else: + tdLog.info("check dnodes status is not ready") + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + tdLog.info("check dnode number:") + clusterComCheck.checkDnodes(dnodeNumbers) + tdSql.query("select * from information_schema.ins_databases") + tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) + + # tdLog.info("check DB Rows:") + # clusterComCheck.checkDbRows(allDbNumbers) + # tdLog.info("check DB Status on by on") + # for i in range(restartNumbers): + # clusterComCheck.checkDb(paraDict['dbNumbers'],restartNumbers,dbNameIndex = '%s%d'%(paraDict["dbName"],i)) + + + + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=2,stopRole='dnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSepVnodeStopDnodeCreateUser.py b/tests/system-test/6-cluster/5dnode3mnodeSepVnodeStopDnodeCreateUser.py new file mode 100644 index 0000000000..94e02b77b3 --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSepVnodeStopDnodeCreateUser.py @@ -0,0 +1,224 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +from numpy import row_stack +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + self.replicaVar = int(replicaVar) + + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def insertData(self,countstart,countstop): + # fisrt add data : db\stable\childtable\general table + + for couti in range(countstart,countstop): + tdLog.debug("drop database if exists db%d" %couti) + tdSql.execute("drop database if exists db%d" %couti) + print("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) + tdSql.execute("use db%d" %couti) + tdSql.execute( + '''create table stb1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + tags (t1 int) + ''' + ) + tdSql.execute( + ''' + create table t1 + (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) + ''' + ) + for i in range(4): + tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db0_0', + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 1, + 'stbName': 'stb', + 'stbNumbers': 2, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 200, + 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 + "rowsPerTbl": 100, + "batchNum": 5000 + } + + dnodeNumbers=int(dnodeNumbers) + mnodeNums=int(mnodeNums) + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allctbNumbers=(paraDict['stbNumbers']*paraDict["ctbNum"]) + rowsPerStb=paraDict["ctbNum"]*paraDict["rowsPerTbl"] + rowsall=rowsPerStb*paraDict['stbNumbers'] + dbNumbers = 1 + paraDict['replica'] = self.replicaVar + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + tdLog.info("Take turns stopping Mnodes ") + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + + # create stable:stb_0 + stableName= paraDict['stbName'] + newTdSql=tdCom.newTdSql() + clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers']) + #create child table:ctb_0 + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum']) + #insert data + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + for tr in threads: + tr.start() + for tr in threads: + tr.join() + + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("dnode is ready") + else: + print("dnodes is not ready") + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + clusterComCheck.checkDnodes(dnodeNumbers) + clusterComCheck.checkDbRows(dbNumbers) + # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) + + newTdSql=tdCom.newTdSql() + newTdSql.execute("reset query cache") + newTdSql.execute("use %s" %(paraDict["dbName"])) + newTdSql.query("show %s.stables"%(paraDict["dbName"])) + newTdSql.checkRows(paraDict["stbNumbers"]) + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql.query("select * from %s"%stableName) + newTdSql.checkRows(rowsPerStb) + + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=2,stopRole='dnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py deleted file mode 100644 index a34895ff42..0000000000 --- a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py +++ /dev/null @@ -1,324 +0,0 @@ -from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE -import taos -import sys -import time -import os - -from util.log import * -from util.sql import * -from util.cases import * -from util.dnodes import TDDnodes -from util.dnodes import TDDnode -from util.cluster import * -from util.common import * -sys.path.append("./7-tmq") -from tmqCommon import * - -import time -import socket -import subprocess -from multiprocessing import Process -import threading -import time -import inspect -import ctypes - -class TDTestCase: - - def init(self, conn, logSql, replicaVar=1): - tdLog.debug(f"start to excute {__file__}") - # tdSql.init(conn.cursor()) - # self.host = socket.gethostname() - - def getBuildPath(self): - selfPath = os.path.dirname(os.path.realpath(__file__)) - - if ("community" in selfPath): - projPath = selfPath[:selfPath.find("community")] - else: - projPath = selfPath[:selfPath.find("tests")] - - for root, dirs, files in os.walk(projPath): - if ("taosd" in files): - rootRealPath = os.path.dirname(os.path.realpath(root)) - if ("packaging" not in rootRealPath): - buildPath = root[:len(root) - len("/build/bin")] - break - return buildPath - - def _async_raise(self, tid, exctype): - """raises the exception, performs cleanup if needed""" - if not inspect.isclass(exctype): - exctype = type(exctype) - res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) - if res == 0: - raise ValueError("invalid thread id") - elif res != 1: - # """if it returns a number greater than one, you're in trouble, - # and you should call it again with exc=NULL to revert the effect""" - ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) - raise SystemError("PyThreadState_SetAsyncExc failed") - - def stop_thread(self,thread): - self._async_raise(thread.ident, SystemExit) - - - def insert_data(self,countstart,countstop): - # fisrt add data : db\stable\childtable\general table - - for couti in range(countstart,countstop): - tdLog.debug("drop database if exists db%d" %couti) - tdSql.execute("drop database if exists db%d" %couti) - print("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti) - tdSql.execute("use db%d" %couti) - tdSql.execute( - '''create table stb1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - tags (t1 int) - ''' - ) - tdSql.execute( - ''' - create table t1 - (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) - ''' - ) - for i in range(4): - tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') - - def checkData(self,dbname,stbname,stableCount,CtableCount,rowsPerSTable,): - tdSql.execute("use %s"%dbname) - tdSql.query("show stables") - tdSql.checkRows(stableCount) - tdSql.query("show tables") - tdSql.checkRows(CtableCount) - for i in range(stableCount): - tdSql.query("select count(*) from %s%d"%(stbname,i)) - tdSql.checkData(0,0,rowsPerSTable) - return - - def checkdnodes(self,dnodenumber): - count=0 - while count < 100: - time.sleep(1) - statusReadyBumber=0 - tdSql.query("select * from information_schema.ins_dnodes;") - if tdSql.checkRows(dnodenumber) : - print("dnode is %d nodes"%dnodenumber) - for i in range(dnodenumber): - if tdSql.queryResult[i][4] !='ready' : - status=tdSql.queryResult[i][4] - print("dnode:%d status is %s "%(i,status)) - break - else: - statusReadyBumber+=1 - print(statusReadyBumber) - if statusReadyBumber == dnodenumber : - print("all of %d mnodes is ready in 10s "%dnodenumber) - return True - break - count+=1 - else: - print("%d mnodes is not ready in 10s "%dnodenumber) - return False - - - def check3mnode(self): - count=0 - while count < 10: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='leader' : - if tdSql.queryResult[1][2]=='follower': - if tdSql.queryResult[2][2]=='follower': - print("three mnodes is ready in 10s") - break - elif tdSql.queryResult[0][2]=='follower' : - if tdSql.queryResult[1][2]=='leader': - if tdSql.queryResult[2][2]=='follower': - print("three mnodes is ready in 10s") - break - elif tdSql.queryResult[0][2]=='follower' : - if tdSql.queryResult[1][2]=='follower': - if tdSql.queryResult[2][2]=='leader': - print("three mnodes is ready in 10s") - break - count+=1 - else: - print("three mnodes is not ready in 10s ") - return -1 - - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,3,'ready') - - def check3mnode1off(self): - count=0 - while count < 10: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='offline' : - if tdSql.queryResult[1][2]=='leader': - if tdSql.queryResult[2][2]=='follower': - print("stop mnodes on dnode 2 successfully in 10s") - break - elif tdSql.queryResult[1][2]=='follower': - if tdSql.queryResult[2][2]=='leader': - print("stop mnodes on dnode 2 successfully in 10s") - break - count+=1 - else: - print("stop mnodes on dnode 2 failed in 10s ") - return -1 - tdSql.error("drop mnode on dnode 1;") - - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'offline') - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,3,'ready') - - def check3mnode2off(self): - count=0 - while count < 40: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='leader' : - if tdSql.queryResult[1][2]=='offline': - if tdSql.queryResult[2][2]=='follower': - print("stop mnodes on dnode 2 successfully in 10s") - break - count+=1 - else: - print("stop mnodes on dnode 2 failed in 10s ") - return -1 - tdSql.error("drop mnode on dnode 2;") - - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'leader') - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,2,'offline') - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,2,'follower') - tdSql.checkData(2,3,'ready') - - def check3mnode3off(self): - count=0 - while count < 10: - time.sleep(1) - tdSql.query("select * from information_schema.ins_mnodes;") - if tdSql.checkRows(3) : - print("mnode is three nodes") - if tdSql.queryResult[0][2]=='leader' : - if tdSql.queryResult[2][2]=='offline': - if tdSql.queryResult[1][2]=='follower': - print("stop mnodes on dnode 3 successfully in 10s") - break - count+=1 - else: - print("stop mnodes on dnode 3 failed in 10s") - return -1 - tdSql.error("drop mnode on dnode 3;") - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(3) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'leader') - tdSql.checkData(0,3,'ready') - tdSql.checkData(1,1,'%s:6130'%self.host) - tdSql.checkData(1,2,'follower') - tdSql.checkData(1,3,'ready') - tdSql.checkData(2,1,'%s:6230'%self.host) - tdSql.checkData(2,2,'offline') - tdSql.checkData(2,3,'ready') - - - def check5dnode(self): - tdSql.query("select * from information_schema.ins_dnodes;") - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(4,1,'%s:6430'%self.host) - tdSql.checkData(0,4,'ready') - tdSql.checkData(4,4,'ready') - - def five_dnode_three_mnode(self,dnodenumber): - tdSql.query("select * from information_schema.ins_dnodes;") - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(4,1,'%s:6430'%self.host) - tdSql.checkData(0,4,'ready') - tdSql.checkData(4,4,'ready') - tdSql.query("select * from information_schema.ins_mnodes;") - tdSql.checkRows(1) - tdSql.checkData(0,1,'%s:6030'%self.host) - tdSql.checkData(0,2,'leader') - tdSql.checkData(0,3,'ready') - - # fisr add three mnodes; - tdSql.execute("create mnode on dnode 2") - tdSql.execute("create mnode on dnode 3") - - # fisrt check statut ready - self.check3mnode() - - tdSql.error("create mnode on dnode 2") - tdSql.query("select * from information_schema.ins_dnodes;") - print(tdSql.queryResult) - tdLog.debug("stop all of mnode ") - - # seperate vnode and mnode in different dnodes. - # create database and stable - stopcount =0 - while stopcount < 2: - for i in range(dnodenumber): - # threads=[] - # threads = MyThreadFunc(self.insert_data(i*2,i*2+2)) - threads=threading.Thread(target=self.insert_data, args=(i,i+1)) - threads.start() - self.TDDnodes.stoptaosd(i+1) - self.TDDnodes.starttaosd(i+1) - - if self.checkdnodes(5): - print("123") - threads.join() - else: - print("456") - threads.join() - self.stop_thread(threads) - assert 1 == 2 ,"some dnode started failed" - return False - # self.check3mnode() - self.check3mnode() - - - stopcount+=1 - self.check3mnode() - - - def run(self): - # print(self.master_dnode.cfgDict) - self.five_dnode_three_mnode(5) - - def stop(self): - tdSql.close() - tdLog.success(f"{__file__} successfully executed") - -tdCases.addLinux(__file__, TDTestCase()) -tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/clusterCommonCheck.py b/tests/system-test/6-cluster/clusterCommonCheck.py index 7cbe9d9680..2a50e1ee31 100644 --- a/tests/system-test/6-cluster/clusterCommonCheck.py +++ b/tests/system-test/6-cluster/clusterCommonCheck.py @@ -64,7 +64,7 @@ class ClusterComCheck: dbNumbers=int(dbNumbers) count=0 while count < 5: - tdSql.query("select * from information_schema.ins_databases;") + tdSql.query("select * from information_schema.ins_databases where name!='collectd' ;") count+=1 if tdSql.checkRows(dbNumbers+2): tdLog.success("we find %d databases and expect %d in clusters! " %(tdSql.queryRows,dbNumbers+2)) diff --git a/tests/system-test/6-cluster/clusterCommonCreate.py b/tests/system-test/6-cluster/clusterCommonCreate.py index caf12bfbf6..613e017783 100644 --- a/tests/system-test/6-cluster/clusterCommonCreate.py +++ b/tests/system-test/6-cluster/clusterCommonCreate.py @@ -137,10 +137,10 @@ class ClusterComCreate: # for i in range(dbNumbers): for i in range(dbNumbers): if dropFlag == 1: - tsql.execute("drop database if exists %s_%d"%(dbNameIndex,1)) - tdLog.debug("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,1, vgroups, replica)) - tsql.execute("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,1, vgroups, replica)) - tdLog.debug("complete to create database %s_%d"%(dbNameIndex,1)) + tsql.execute("drop database if exists %s_%d"%(dbNameIndex,i)) + tdLog.debug("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,i, vgroups, replica)) + tsql.execute("create database if not exists %s_%d vgroups %d replica %d"%(dbNameIndex,i, vgroups, replica)) + tdLog.debug("complete to create database %s_%d"%(dbNameIndex,i)) def createUser(self,tsql,user,password): tdLog.info(f"create new user f{user}") @@ -214,6 +214,42 @@ class ClusterComCreate: tdLog.debug("insert data ............ [OK]") return + def alterStbMetaData(self,tsql,dbName,stbName,ctbNum,rowsPerTbl,batchNum,startTs=None): + tdLog.debug("alter Stb column ............") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} MODIFY COLUMN c3 binary(20);") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} MODIFY COLUMN c3 binary(20);") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} ADD COLUMN c4 DOUBLE;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} ADD COLUMN c4 DOUBLE;") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} DROP COLUMN c2;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} DROP COLUMN c2;") + + + tdLog.debug("start to insert data ............") + # tsql.execute("use %s" %dbName) + pre_insert = "insert into " + sql = pre_insert + + if startTs is None: + t = time.time() + startTs = int(round(t * 1000)) + #tdLog.debug("doing insert data into stable:%s rows:%d ..."%(stbName, allRows)) + for i in range(ctbNum): + sql += " %s.%s_%d values "%(dbName,stbName,i) + for j in range(rowsPerTbl): + sql += "(%d, %d,'mnode_%d', %d ) "%(startTs + j, j, j,j) + if (j > 0) and ((j%batchNum == 0) or (j == rowsPerTbl - 1)): + tsql.execute(sql) + if j < rowsPerTbl - 1: + sql = "insert into %s.%s_%d values " %(dbName,stbName,i) + else: + sql = "insert into " + #end sql + if sql != pre_insert: + #print("insert sql:%s"%sql) + tsql.execute(sql) + tdLog.debug("insert data ............ [OK]") + return + def insert_data_1(self,tsql,dbName,ctbPrefix,ctbNum,rowsPerTbl,batchNum,startTs): tdLog.debug("start to insert data ............") tsql.execute("use %s" %dbName) From 05ce8c150c06413f5f1bc5b5b77679f5dc89bab3 Mon Sep 17 00:00:00 2001 From: sunpeng Date: Mon, 12 Dec 2022 15:10:24 +0800 Subject: [PATCH 03/64] docs: update schemaless api for ttl --- docs/zh/08-connector/05-schemaless-api.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh/08-connector/05-schemaless-api.mdx b/docs/zh/08-connector/05-schemaless-api.mdx index f6d7e09212..8f0a9273b9 100644 --- a/docs/zh/08-connector/05-schemaless-api.mdx +++ b/docs/zh/08-connector/05-schemaless-api.mdx @@ -19,6 +19,7 @@ TDengine 提供了兼容 InfluxDB (v1) 和 OpenTSDB 行协议的 Schemaless API - `precision` TDengine 使用的时间精度 - `u` TDengine 用户名 - `p` TDengine 密码 +- `ttl` 自动创建的子表生命周期,以子表的第一条数据的 TTL 参数为准,不可更新。更多信息请参考[创建表文档](taos-sql/table/#创建表)的 TTL 参数 注意: 目前不支持 InfluxDB 的 token 验证方式,仅支持 Basic 验证和查询参数验证。 From 61cfca6eb9802ab0f268e9f2e22da0943f6077e4 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Wed, 14 Dec 2022 16:23:49 +0800 Subject: [PATCH 04/64] feat(query): add _isfilled pseudocolumn to indicate data is origin or filled. --- include/common/ttokendef.h | 647 +-- source/libs/parser/inc/sql.y | 1 + source/libs/parser/src/parTokenizer.c | 1 + source/libs/parser/src/sql.c | 5774 ++++++++++++++----------- 4 files changed, 3542 insertions(+), 2881 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index a09c87eea8..e0867cf37a 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -16,329 +16,330 @@ #ifndef _TD_COMMON_TOKEN_H_ #define _TD_COMMON_TOKEN_H_ -#define TK_OR 1 -#define TK_AND 2 -#define TK_UNION 3 -#define TK_ALL 4 -#define TK_MINUS 5 -#define TK_EXCEPT 6 -#define TK_INTERSECT 7 -#define TK_NK_BITAND 8 -#define TK_NK_BITOR 9 -#define TK_NK_LSHIFT 10 -#define TK_NK_RSHIFT 11 -#define TK_NK_PLUS 12 -#define TK_NK_MINUS 13 -#define TK_NK_STAR 14 -#define TK_NK_SLASH 15 -#define TK_NK_REM 16 -#define TK_NK_CONCAT 17 -#define TK_CREATE 18 -#define TK_ACCOUNT 19 -#define TK_NK_ID 20 -#define TK_PASS 21 -#define TK_NK_STRING 22 -#define TK_ALTER 23 -#define TK_PPS 24 -#define TK_TSERIES 25 -#define TK_STORAGE 26 -#define TK_STREAMS 27 -#define TK_QTIME 28 -#define TK_DBS 29 -#define TK_USERS 30 -#define TK_CONNS 31 -#define TK_STATE 32 -#define TK_USER 33 -#define TK_ENABLE 34 -#define TK_NK_INTEGER 35 -#define TK_SYSINFO 36 -#define TK_DROP 37 -#define TK_GRANT 38 -#define TK_ON 39 -#define TK_TO 40 -#define TK_REVOKE 41 -#define TK_FROM 42 -#define TK_SUBSCRIBE 43 -#define TK_NK_COMMA 44 -#define TK_READ 45 -#define TK_WRITE 46 -#define TK_NK_DOT 47 -#define TK_DNODE 48 -#define TK_PORT 49 -#define TK_DNODES 50 -#define TK_NK_IPTOKEN 51 -#define TK_FORCE 52 -#define TK_LOCAL 53 -#define TK_QNODE 54 -#define TK_BNODE 55 -#define TK_SNODE 56 -#define TK_MNODE 57 -#define TK_DATABASE 58 -#define TK_USE 59 -#define TK_FLUSH 60 -#define TK_TRIM 61 -#define TK_IF 62 -#define TK_NOT 63 -#define TK_EXISTS 64 -#define TK_BUFFER 65 -#define TK_CACHEMODEL 66 -#define TK_CACHESIZE 67 -#define TK_COMP 68 -#define TK_DURATION 69 -#define TK_NK_VARIABLE 70 -#define TK_MAXROWS 71 -#define TK_MINROWS 72 -#define TK_KEEP 73 -#define TK_PAGES 74 -#define TK_PAGESIZE 75 -#define TK_TSDB_PAGESIZE 76 -#define TK_PRECISION 77 -#define TK_REPLICA 78 -#define TK_STRICT 79 -#define TK_VGROUPS 80 -#define TK_SINGLE_STABLE 81 -#define TK_RETENTIONS 82 -#define TK_SCHEMALESS 83 -#define TK_WAL_LEVEL 84 -#define TK_WAL_FSYNC_PERIOD 85 -#define TK_WAL_RETENTION_PERIOD 86 -#define TK_WAL_RETENTION_SIZE 87 -#define TK_WAL_ROLL_PERIOD 88 -#define TK_WAL_SEGMENT_SIZE 89 -#define TK_STT_TRIGGER 90 -#define TK_TABLE_PREFIX 91 -#define TK_TABLE_SUFFIX 92 -#define TK_NK_COLON 93 -#define TK_MAX_SPEED 94 -#define TK_TABLE 95 -#define TK_NK_LP 96 -#define TK_NK_RP 97 -#define TK_STABLE 98 -#define TK_ADD 99 -#define TK_COLUMN 100 -#define TK_MODIFY 101 -#define TK_RENAME 102 -#define TK_TAG 103 -#define TK_SET 104 -#define TK_NK_EQ 105 -#define TK_USING 106 -#define TK_TAGS 107 -#define TK_COMMENT 108 -#define TK_BOOL 109 -#define TK_TINYINT 110 -#define TK_SMALLINT 111 -#define TK_INT 112 -#define TK_INTEGER 113 -#define TK_BIGINT 114 -#define TK_FLOAT 115 -#define TK_DOUBLE 116 -#define TK_BINARY 117 -#define TK_TIMESTAMP 118 -#define TK_NCHAR 119 -#define TK_UNSIGNED 120 -#define TK_JSON 121 -#define TK_VARCHAR 122 -#define TK_MEDIUMBLOB 123 -#define TK_BLOB 124 -#define TK_VARBINARY 125 -#define TK_DECIMAL 126 -#define TK_MAX_DELAY 127 -#define TK_WATERMARK 128 -#define TK_ROLLUP 129 -#define TK_TTL 130 -#define TK_SMA 131 -#define TK_DELETE_MARK 132 -#define TK_FIRST 133 -#define TK_LAST 134 -#define TK_SHOW 135 -#define TK_PRIVILEGES 136 -#define TK_DATABASES 137 -#define TK_TABLES 138 -#define TK_STABLES 139 -#define TK_MNODES 140 -#define TK_QNODES 141 -#define TK_FUNCTIONS 142 -#define TK_INDEXES 143 -#define TK_ACCOUNTS 144 -#define TK_APPS 145 -#define TK_CONNECTIONS 146 -#define TK_LICENCES 147 -#define TK_GRANTS 148 -#define TK_QUERIES 149 -#define TK_SCORES 150 -#define TK_TOPICS 151 -#define TK_VARIABLES 152 -#define TK_CLUSTER 153 -#define TK_BNODES 154 -#define TK_SNODES 155 -#define TK_TRANSACTIONS 156 -#define TK_DISTRIBUTED 157 -#define TK_CONSUMERS 158 -#define TK_SUBSCRIPTIONS 159 -#define TK_VNODES 160 -#define TK_LIKE 161 -#define TK_TBNAME 162 -#define TK_QTAGS 163 -#define TK_AS 164 -#define TK_INDEX 165 -#define TK_FUNCTION 166 -#define TK_INTERVAL 167 -#define TK_TOPIC 168 -#define TK_WITH 169 -#define TK_META 170 -#define TK_CONSUMER 171 -#define TK_GROUP 172 -#define TK_DESC 173 -#define TK_DESCRIBE 174 -#define TK_RESET 175 -#define TK_QUERY 176 -#define TK_CACHE 177 -#define TK_EXPLAIN 178 -#define TK_ANALYZE 179 -#define TK_VERBOSE 180 -#define TK_NK_BOOL 181 -#define TK_RATIO 182 -#define TK_NK_FLOAT 183 -#define TK_OUTPUTTYPE 184 -#define TK_AGGREGATE 185 -#define TK_BUFSIZE 186 -#define TK_STREAM 187 -#define TK_INTO 188 -#define TK_TRIGGER 189 -#define TK_AT_ONCE 190 -#define TK_WINDOW_CLOSE 191 -#define TK_IGNORE 192 -#define TK_EXPIRED 193 -#define TK_FILL_HISTORY 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_EVENT_WINDOW 252 -#define TK_START 253 -#define TK_SLIDING 254 -#define TK_FILL 255 -#define TK_VALUE 256 -#define TK_NONE 257 -#define TK_PREV 258 -#define TK_LINEAR 259 -#define TK_NEXT 260 -#define TK_HAVING 261 -#define TK_RANGE 262 -#define TK_EVERY 263 -#define TK_ORDER 264 -#define TK_SLIMIT 265 -#define TK_SOFFSET 266 -#define TK_LIMIT 267 -#define TK_OFFSET 268 -#define TK_ASC 269 -#define TK_NULLS 270 -#define TK_ABORT 271 -#define TK_AFTER 272 -#define TK_ATTACH 273 -#define TK_BEFORE 274 -#define TK_BEGIN 275 -#define TK_BITAND 276 -#define TK_BITNOT 277 -#define TK_BITOR 278 -#define TK_BLOCKS 279 -#define TK_CHANGE 280 -#define TK_COMMA 281 -#define TK_COMPACT 282 -#define TK_CONCAT 283 -#define TK_CONFLICT 284 -#define TK_COPY 285 -#define TK_DEFERRED 286 -#define TK_DELIMITERS 287 -#define TK_DETACH 288 -#define TK_DIVIDE 289 -#define TK_DOT 290 -#define TK_EACH 291 -#define TK_FAIL 292 -#define TK_FILE 293 -#define TK_FOR 294 -#define TK_GLOB 295 -#define TK_ID 296 -#define TK_IMMEDIATE 297 -#define TK_IMPORT 298 -#define TK_INITIALLY 299 -#define TK_INSTEAD 300 -#define TK_ISNULL 301 -#define TK_KEY 302 -#define TK_MODULES 303 -#define TK_NK_BITNOT 304 -#define TK_NK_SEMI 305 -#define TK_NOTNULL 306 -#define TK_OF 307 -#define TK_PLUS 308 -#define TK_PRIVILEGE 309 -#define TK_RAISE 310 -#define TK_REPLACE 311 -#define TK_RESTRICT 312 -#define TK_ROW 313 -#define TK_SEMI 314 -#define TK_STAR 315 -#define TK_STATEMENT 316 -#define TK_STRING 317 -#define TK_TIMES 318 -#define TK_UPDATE 319 -#define TK_VALUES 320 -#define TK_VARIABLE 321 -#define TK_VIEW 322 -#define TK_WAL 323 +#define TK_OR 1 +#define TK_AND 2 +#define TK_UNION 3 +#define TK_ALL 4 +#define TK_MINUS 5 +#define TK_EXCEPT 6 +#define TK_INTERSECT 7 +#define TK_NK_BITAND 8 +#define TK_NK_BITOR 9 +#define TK_NK_LSHIFT 10 +#define TK_NK_RSHIFT 11 +#define TK_NK_PLUS 12 +#define TK_NK_MINUS 13 +#define TK_NK_STAR 14 +#define TK_NK_SLASH 15 +#define TK_NK_REM 16 +#define TK_NK_CONCAT 17 +#define TK_CREATE 18 +#define TK_ACCOUNT 19 +#define TK_NK_ID 20 +#define TK_PASS 21 +#define TK_NK_STRING 22 +#define TK_ALTER 23 +#define TK_PPS 24 +#define TK_TSERIES 25 +#define TK_STORAGE 26 +#define TK_STREAMS 27 +#define TK_QTIME 28 +#define TK_DBS 29 +#define TK_USERS 30 +#define TK_CONNS 31 +#define TK_STATE 32 +#define TK_USER 33 +#define TK_ENABLE 34 +#define TK_NK_INTEGER 35 +#define TK_SYSINFO 36 +#define TK_DROP 37 +#define TK_GRANT 38 +#define TK_ON 39 +#define TK_TO 40 +#define TK_REVOKE 41 +#define TK_FROM 42 +#define TK_SUBSCRIBE 43 +#define TK_NK_COMMA 44 +#define TK_READ 45 +#define TK_WRITE 46 +#define TK_NK_DOT 47 +#define TK_DNODE 48 +#define TK_PORT 49 +#define TK_DNODES 50 +#define TK_NK_IPTOKEN 51 +#define TK_FORCE 52 +#define TK_LOCAL 53 +#define TK_QNODE 54 +#define TK_BNODE 55 +#define TK_SNODE 56 +#define TK_MNODE 57 +#define TK_DATABASE 58 +#define TK_USE 59 +#define TK_FLUSH 60 +#define TK_TRIM 61 +#define TK_IF 62 +#define TK_NOT 63 +#define TK_EXISTS 64 +#define TK_BUFFER 65 +#define TK_CACHEMODEL 66 +#define TK_CACHESIZE 67 +#define TK_COMP 68 +#define TK_DURATION 69 +#define TK_NK_VARIABLE 70 +#define TK_MAXROWS 71 +#define TK_MINROWS 72 +#define TK_KEEP 73 +#define TK_PAGES 74 +#define TK_PAGESIZE 75 +#define TK_TSDB_PAGESIZE 76 +#define TK_PRECISION 77 +#define TK_REPLICA 78 +#define TK_STRICT 79 +#define TK_VGROUPS 80 +#define TK_SINGLE_STABLE 81 +#define TK_RETENTIONS 82 +#define TK_SCHEMALESS 83 +#define TK_WAL_LEVEL 84 +#define TK_WAL_FSYNC_PERIOD 85 +#define TK_WAL_RETENTION_PERIOD 86 +#define TK_WAL_RETENTION_SIZE 87 +#define TK_WAL_ROLL_PERIOD 88 +#define TK_WAL_SEGMENT_SIZE 89 +#define TK_STT_TRIGGER 90 +#define TK_TABLE_PREFIX 91 +#define TK_TABLE_SUFFIX 92 +#define TK_NK_COLON 93 +#define TK_MAX_SPEED 94 +#define TK_TABLE 95 +#define TK_NK_LP 96 +#define TK_NK_RP 97 +#define TK_STABLE 98 +#define TK_ADD 99 +#define TK_COLUMN 100 +#define TK_MODIFY 101 +#define TK_RENAME 102 +#define TK_TAG 103 +#define TK_SET 104 +#define TK_NK_EQ 105 +#define TK_USING 106 +#define TK_TAGS 107 +#define TK_COMMENT 108 +#define TK_BOOL 109 +#define TK_TINYINT 110 +#define TK_SMALLINT 111 +#define TK_INT 112 +#define TK_INTEGER 113 +#define TK_BIGINT 114 +#define TK_FLOAT 115 +#define TK_DOUBLE 116 +#define TK_BINARY 117 +#define TK_TIMESTAMP 118 +#define TK_NCHAR 119 +#define TK_UNSIGNED 120 +#define TK_JSON 121 +#define TK_VARCHAR 122 +#define TK_MEDIUMBLOB 123 +#define TK_BLOB 124 +#define TK_VARBINARY 125 +#define TK_DECIMAL 126 +#define TK_MAX_DELAY 127 +#define TK_WATERMARK 128 +#define TK_ROLLUP 129 +#define TK_TTL 130 +#define TK_SMA 131 +#define TK_DELETE_MARK 132 +#define TK_FIRST 133 +#define TK_LAST 134 +#define TK_SHOW 135 +#define TK_PRIVILEGES 136 +#define TK_DATABASES 137 +#define TK_TABLES 138 +#define TK_STABLES 139 +#define TK_MNODES 140 +#define TK_QNODES 141 +#define TK_FUNCTIONS 142 +#define TK_INDEXES 143 +#define TK_ACCOUNTS 144 +#define TK_APPS 145 +#define TK_CONNECTIONS 146 +#define TK_LICENCES 147 +#define TK_GRANTS 148 +#define TK_QUERIES 149 +#define TK_SCORES 150 +#define TK_TOPICS 151 +#define TK_VARIABLES 152 +#define TK_CLUSTER 153 +#define TK_BNODES 154 +#define TK_SNODES 155 +#define TK_TRANSACTIONS 156 +#define TK_DISTRIBUTED 157 +#define TK_CONSUMERS 158 +#define TK_SUBSCRIPTIONS 159 +#define TK_VNODES 160 +#define TK_LIKE 161 +#define TK_TBNAME 162 +#define TK_QTAGS 163 +#define TK_AS 164 +#define TK_INDEX 165 +#define TK_FUNCTION 166 +#define TK_INTERVAL 167 +#define TK_TOPIC 168 +#define TK_WITH 169 +#define TK_META 170 +#define TK_CONSUMER 171 +#define TK_GROUP 172 +#define TK_DESC 173 +#define TK_DESCRIBE 174 +#define TK_RESET 175 +#define TK_QUERY 176 +#define TK_CACHE 177 +#define TK_EXPLAIN 178 +#define TK_ANALYZE 179 +#define TK_VERBOSE 180 +#define TK_NK_BOOL 181 +#define TK_RATIO 182 +#define TK_NK_FLOAT 183 +#define TK_OUTPUTTYPE 184 +#define TK_AGGREGATE 185 +#define TK_BUFSIZE 186 +#define TK_STREAM 187 +#define TK_INTO 188 +#define TK_TRIGGER 189 +#define TK_AT_ONCE 190 +#define TK_WINDOW_CLOSE 191 +#define TK_IGNORE 192 +#define TK_EXPIRED 193 +#define TK_FILL_HISTORY 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_ISFILLED 217 +#define TK_CAST 218 +#define TK_NOW 219 +#define TK_TODAY 220 +#define TK_TIMEZONE 221 +#define TK_CLIENT_VERSION 222 +#define TK_SERVER_VERSION 223 +#define TK_SERVER_STATUS 224 +#define TK_CURRENT_USER 225 +#define TK_COUNT 226 +#define TK_LAST_ROW 227 +#define TK_CASE 228 +#define TK_END 229 +#define TK_WHEN 230 +#define TK_THEN 231 +#define TK_ELSE 232 +#define TK_BETWEEN 233 +#define TK_IS 234 +#define TK_NK_LT 235 +#define TK_NK_GT 236 +#define TK_NK_LE 237 +#define TK_NK_GE 238 +#define TK_NK_NE 239 +#define TK_MATCH 240 +#define TK_NMATCH 241 +#define TK_CONTAINS 242 +#define TK_IN 243 +#define TK_JOIN 244 +#define TK_INNER 245 +#define TK_SELECT 246 +#define TK_DISTINCT 247 +#define TK_WHERE 248 +#define TK_PARTITION 249 +#define TK_BY 250 +#define TK_SESSION 251 +#define TK_STATE_WINDOW 252 +#define TK_EVENT_WINDOW 253 +#define TK_START 254 +#define TK_SLIDING 255 +#define TK_FILL 256 +#define TK_VALUE 257 +#define TK_NONE 258 +#define TK_PREV 259 +#define TK_LINEAR 260 +#define TK_NEXT 261 +#define TK_HAVING 262 +#define TK_RANGE 263 +#define TK_EVERY 264 +#define TK_ORDER 265 +#define TK_SLIMIT 266 +#define TK_SOFFSET 267 +#define TK_LIMIT 268 +#define TK_OFFSET 269 +#define TK_ASC 270 +#define TK_NULLS 271 +#define TK_ABORT 272 +#define TK_AFTER 273 +#define TK_ATTACH 274 +#define TK_BEFORE 275 +#define TK_BEGIN 276 +#define TK_BITAND 277 +#define TK_BITNOT 278 +#define TK_BITOR 279 +#define TK_BLOCKS 280 +#define TK_CHANGE 281 +#define TK_COMMA 282 +#define TK_COMPACT 283 +#define TK_CONCAT 284 +#define TK_CONFLICT 285 +#define TK_COPY 286 +#define TK_DEFERRED 287 +#define TK_DELIMITERS 288 +#define TK_DETACH 289 +#define TK_DIVIDE 290 +#define TK_DOT 291 +#define TK_EACH 292 +#define TK_FAIL 293 +#define TK_FILE 294 +#define TK_FOR 295 +#define TK_GLOB 296 +#define TK_ID 297 +#define TK_IMMEDIATE 298 +#define TK_IMPORT 299 +#define TK_INITIALLY 300 +#define TK_INSTEAD 301 +#define TK_ISNULL 302 +#define TK_KEY 303 +#define TK_MODULES 304 +#define TK_NK_BITNOT 305 +#define TK_NK_SEMI 306 +#define TK_NOTNULL 307 +#define TK_OF 308 +#define TK_PLUS 309 +#define TK_PRIVILEGE 310 +#define TK_RAISE 311 +#define TK_REPLACE 312 +#define TK_RESTRICT 313 +#define TK_ROW 314 +#define TK_SEMI 315 +#define TK_STAR 316 +#define TK_STATEMENT 317 +#define TK_STRING 318 +#define TK_TIMES 319 +#define TK_UPDATE 320 +#define TK_VALUES 321 +#define TK_VARIABLE 322 +#define TK_VIEW 323 +#define TK_WAL 324 #define TK_NK_SPACE 600 #define TK_NK_COMMENT 601 diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 343dd855e6..960bf8d94c 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -733,6 +733,7 @@ pseudo_column(A) ::= WSTART(B). pseudo_column(A) ::= WEND(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= WDURATION(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= IROWTS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } +pseudo_column(A) ::= ISFILLED(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } pseudo_column(A) ::= QTAGS(B). { A = createRawExprNode(pCxt, &B, createFunctionNode(pCxt, &B, NULL)); } function_expression(A) ::= function_name(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index 1f9e4e9ab1..94b32a3de2 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -260,6 +260,7 @@ static SKeyword keywordTable[] = { {"WRITE", TK_WRITE}, {"_C0", TK_ROWTS}, {"_IROWTS", TK_IROWTS}, + {"_ISFILLED", TK_ISFILLED}, {"_QDURATION", TK_QDURATION}, {"_QEND", TK_QEND}, {"_QSTART", TK_QSTART}, diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index c9dec76a0a..048923c64f 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,26 +104,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 459 +#define YYNOCODE 460 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOperatorType yy20; - SNode* yy74; - ENullOrder yy109; - SToken yy317; - EOrder yy326; - bool yy335; - int8_t yy449; - int64_t yy531; - EJoinType yy630; - SAlterOption yy767; - EFillMode yy828; - int32_t yy856; - SNodeList* yy874; - SDataType yy898; + SAlterOption yy5; + bool yy57; + EFillMode yy214; + EJoinType yy332; + int32_t yy340; + int8_t yy383; + SDataType yy384; + SNodeList* yy424; + EOrder yy538; + EOperatorType yy620; + SNode* yy752; + ENullOrder yy777; + SToken yy849; + int64_t yy869; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -140,16 +140,17 @@ typedef union { #define ParseCTX_STORE #define YYFALLBACK 1 #define YYNSTATE 715 -#define YYNRULE 540 -#define YYNTOKEN 324 +#define YYNRULE 541 +#define YYNRULE_WITH_ACTION 541 +#define YYNTOKEN 325 #define YY_MAX_SHIFT 714 -#define YY_MIN_SHIFTREDUCE 1057 -#define YY_MAX_SHIFTREDUCE 1596 -#define YY_ERROR_ACTION 1597 -#define YY_ACCEPT_ACTION 1598 -#define YY_NO_ACTION 1599 -#define YY_MIN_REDUCE 1600 -#define YY_MAX_REDUCE 2139 +#define YY_MIN_SHIFTREDUCE 1058 +#define YY_MAX_SHIFTREDUCE 1598 +#define YY_ERROR_ACTION 1599 +#define YY_ACCEPT_ACTION 1600 +#define YY_NO_ACTION 1601 +#define YY_MIN_REDUCE 1602 +#define YY_MAX_REDUCE 2142 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,714 +217,826 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2586) +#define YY_ACTTAB_COUNT (2983) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1954, 460, 1743, 461, 1636, 571, 590, 35, 276, 2110, - /* 10 */ 160, 1807, 45, 43, 1526, 1708, 353, 2115, 331, 1865, - /* 20 */ 362, 2110, 1377, 1600, 570, 175, 603, 1805, 354, 2111, - /* 30 */ 572, 1972, 159, 1456, 1612, 1375, 157, 2114, 1403, 586, - /* 40 */ 54, 2111, 2113, 401, 1923, 1756, 619, 124, 123, 122, - /* 50 */ 121, 120, 119, 118, 117, 116, 466, 1754, 1451, 602, - /* 60 */ 38, 37, 462, 18, 44, 42, 41, 40, 39, 1953, - /* 70 */ 1383, 171, 469, 1988, 461, 1636, 102, 1955, 623, 1957, - /* 80 */ 1958, 618, 571, 613, 1794, 547, 2110, 2056, 172, 2110, - /* 90 */ 2041, 1523, 1745, 169, 356, 2037, 14, 60, 603, 1954, - /* 100 */ 1941, 570, 175, 1937, 2116, 175, 2111, 572, 177, 2111, - /* 110 */ 572, 1937, 125, 2053, 334, 1854, 2067, 115, 711, 499, - /* 120 */ 114, 113, 112, 111, 110, 109, 108, 107, 106, 1754, - /* 130 */ 1972, 1933, 1939, 1458, 1459, 48, 1598, 1807, 620, 1933, - /* 140 */ 1939, 345, 613, 1923, 355, 619, 45, 43, 1910, 1563, - /* 150 */ 613, 1260, 1261, 1805, 362, 1731, 1377, 367, 1807, 1954, - /* 160 */ 1800, 1802, 1432, 1441, 1109, 366, 1108, 1456, 1953, 1375, - /* 170 */ 603, 1109, 1988, 1108, 1805, 102, 1955, 623, 1957, 1958, - /* 180 */ 618, 1378, 613, 1376, 180, 136, 212, 143, 2012, 2041, - /* 190 */ 1972, 260, 1451, 356, 2037, 1110, 384, 18, 586, 377, - /* 200 */ 602, 1754, 1110, 1923, 1383, 619, 1381, 1382, 602, 1431, - /* 210 */ 1434, 1435, 1436, 1437, 1438, 1439, 1440, 615, 611, 1449, - /* 220 */ 1450, 1452, 1453, 1454, 1455, 1457, 1460, 2, 1953, 60, - /* 230 */ 14, 87, 1988, 1954, 227, 102, 1955, 623, 1957, 1958, - /* 240 */ 618, 547, 613, 1402, 648, 2110, 178, 172, 82, 2041, - /* 250 */ 1090, 561, 711, 356, 2037, 44, 42, 41, 40, 39, - /* 260 */ 2116, 175, 129, 655, 1972, 2111, 572, 1458, 1459, 267, - /* 270 */ 268, 1749, 620, 64, 266, 2068, 48, 1923, 1402, 619, - /* 280 */ 45, 43, 148, 147, 652, 651, 650, 145, 362, 1092, - /* 290 */ 1377, 1095, 1096, 1954, 84, 322, 1432, 1441, 532, 583, - /* 300 */ 530, 1456, 1953, 1375, 459, 528, 1988, 464, 1642, 102, - /* 310 */ 1955, 623, 1957, 1958, 618, 1378, 613, 1376, 526, 60, - /* 320 */ 524, 2016, 1732, 2041, 1972, 1729, 1451, 356, 2037, 590, - /* 330 */ 133, 18, 620, 1522, 567, 562, 556, 1923, 1383, 619, - /* 340 */ 1381, 1382, 1866, 1431, 1434, 1435, 1436, 1437, 1438, 1439, - /* 350 */ 1440, 615, 611, 1449, 1450, 1452, 1453, 1454, 1455, 1457, - /* 360 */ 1460, 2, 1953, 11, 14, 60, 1988, 1801, 1802, 102, - /* 370 */ 1955, 623, 1957, 1958, 618, 2115, 613, 60, 178, 2110, - /* 380 */ 1807, 2130, 49, 2041, 478, 1623, 711, 356, 2037, 257, - /* 390 */ 2049, 582, 407, 126, 581, 2114, 1806, 2110, 2075, 2111, - /* 400 */ 2112, 1458, 1459, 38, 37, 603, 228, 44, 42, 41, - /* 410 */ 40, 39, 570, 175, 45, 43, 1461, 2111, 572, 125, - /* 420 */ 1313, 1314, 362, 478, 1377, 178, 504, 1954, 1530, 1923, - /* 430 */ 1432, 1441, 320, 655, 1402, 1456, 1754, 1375, 2056, 468, - /* 440 */ 38, 37, 464, 1642, 44, 42, 41, 40, 39, 1378, - /* 450 */ 566, 1376, 148, 147, 652, 651, 650, 145, 1972, 1466, - /* 460 */ 1451, 400, 187, 399, 2052, 1402, 620, 589, 178, 1354, - /* 470 */ 1355, 1923, 1383, 619, 1381, 1382, 27, 1431, 1434, 1435, - /* 480 */ 1436, 1437, 1438, 1439, 1440, 615, 611, 1449, 1450, 1452, - /* 490 */ 1453, 1454, 1455, 1457, 1460, 2, 1953, 169, 46, 79, - /* 500 */ 1988, 1403, 78, 102, 1955, 623, 1957, 1958, 618, 547, - /* 510 */ 613, 510, 509, 2110, 178, 2130, 1972, 2041, 655, 1855, - /* 520 */ 711, 356, 2037, 1622, 565, 1402, 178, 82, 2116, 175, - /* 530 */ 213, 178, 2088, 2111, 572, 1458, 1459, 148, 147, 652, - /* 540 */ 651, 650, 145, 13, 12, 164, 603, 1621, 45, 43, - /* 550 */ 1750, 495, 491, 487, 483, 210, 362, 1837, 1377, 603, - /* 560 */ 405, 682, 680, 564, 1432, 1441, 396, 1923, 1593, 1456, - /* 570 */ 1404, 1375, 1601, 406, 38, 37, 1433, 1754, 44, 42, - /* 580 */ 41, 40, 39, 1378, 2056, 1376, 1405, 398, 394, 443, - /* 590 */ 1754, 1923, 83, 115, 1451, 208, 114, 113, 112, 111, - /* 600 */ 110, 109, 108, 107, 106, 1553, 1383, 1433, 1381, 1382, - /* 610 */ 2051, 1431, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 615, - /* 620 */ 611, 1449, 1450, 1452, 1453, 1454, 1455, 1457, 1460, 2, - /* 630 */ 359, 358, 46, 2115, 1401, 603, 1177, 38, 37, 1499, - /* 640 */ 1391, 44, 42, 41, 40, 39, 657, 191, 190, 415, - /* 650 */ 1404, 1456, 157, 1384, 711, 558, 1551, 1552, 1554, 1555, - /* 660 */ 1620, 1757, 207, 201, 1592, 206, 1754, 31, 474, 1458, - /* 670 */ 1459, 1179, 1619, 38, 37, 99, 1451, 44, 42, 41, - /* 680 */ 40, 39, 45, 43, 199, 41, 40, 39, 1383, 134, - /* 690 */ 362, 11, 1377, 514, 513, 512, 714, 1746, 1432, 1441, - /* 700 */ 1405, 130, 508, 1456, 1923, 1375, 507, 603, 603, 424, - /* 710 */ 283, 1730, 506, 511, 259, 1487, 1923, 1378, 505, 1376, - /* 720 */ 1618, 429, 430, 1617, 408, 168, 1542, 1586, 1451, 1405, - /* 730 */ 237, 704, 700, 696, 692, 281, 609, 409, 1754, 1754, - /* 740 */ 1383, 135, 1381, 1382, 2012, 1431, 1434, 1435, 1436, 1437, - /* 750 */ 1438, 1439, 1440, 615, 611, 1449, 1450, 1452, 1453, 1454, - /* 760 */ 1455, 1457, 1460, 2, 1923, 1616, 14, 1923, 1739, 603, - /* 770 */ 365, 603, 100, 657, 1383, 274, 368, 11, 157, 9, - /* 780 */ 319, 1669, 1400, 476, 157, 477, 32, 1756, 711, 437, - /* 790 */ 1615, 1614, 450, 1756, 259, 449, 1492, 1095, 1096, 1392, - /* 800 */ 1754, 1387, 1754, 1458, 1459, 1611, 1610, 33, 599, 1923, - /* 810 */ 421, 669, 451, 38, 37, 423, 1609, 44, 42, 41, - /* 820 */ 40, 39, 38, 37, 1395, 1397, 44, 42, 41, 40, - /* 830 */ 39, 1608, 1432, 1441, 1923, 1923, 611, 1449, 1450, 1452, - /* 840 */ 1453, 1454, 1455, 8, 184, 262, 514, 513, 512, 1923, - /* 850 */ 1923, 1378, 93, 1376, 130, 508, 1607, 335, 1666, 507, - /* 860 */ 1923, 605, 1348, 2013, 231, 506, 511, 1850, 607, 411, - /* 870 */ 2013, 505, 2114, 236, 1747, 1923, 1381, 1382, 183, 1431, - /* 880 */ 1434, 1435, 1436, 1437, 1438, 1439, 1440, 615, 611, 1449, - /* 890 */ 1450, 1452, 1453, 1454, 1455, 1457, 1460, 2, 229, 447, - /* 900 */ 1923, 1784, 442, 441, 440, 439, 436, 435, 434, 433, - /* 910 */ 432, 428, 427, 426, 425, 336, 418, 417, 416, 1944, - /* 920 */ 413, 412, 333, 688, 687, 686, 685, 372, 583, 684, - /* 930 */ 683, 137, 678, 677, 676, 675, 674, 673, 672, 671, - /* 940 */ 150, 667, 666, 665, 371, 370, 662, 661, 660, 659, - /* 950 */ 658, 158, 1606, 1605, 1402, 235, 296, 38, 37, 133, - /* 960 */ 1377, 44, 42, 41, 40, 39, 1942, 603, 1946, 503, - /* 970 */ 294, 68, 649, 1375, 67, 1798, 603, 1937, 156, 38, - /* 980 */ 37, 1751, 1954, 44, 42, 41, 40, 39, 1850, 1850, - /* 990 */ 141, 502, 195, 456, 454, 85, 1923, 1923, 1754, 185, - /* 1000 */ 189, 653, 339, 575, 1798, 1933, 1939, 1754, 1383, 1604, - /* 1010 */ 603, 654, 327, 1972, 1798, 1741, 613, 585, 173, 2049, - /* 1020 */ 2050, 620, 131, 2054, 543, 670, 1923, 1724, 619, 60, - /* 1030 */ 1217, 645, 644, 643, 1221, 642, 1223, 1224, 641, 1226, - /* 1040 */ 638, 1754, 1232, 635, 1234, 1235, 632, 629, 1519, 290, - /* 1050 */ 1603, 1953, 1784, 1923, 1485, 1988, 711, 603, 102, 1955, - /* 1060 */ 623, 1957, 1958, 618, 340, 613, 338, 337, 101, 501, - /* 1070 */ 2130, 587, 2041, 503, 1954, 1386, 356, 2037, 603, 2061, - /* 1080 */ 1519, 583, 1656, 603, 603, 603, 603, 554, 1754, 50, - /* 1090 */ 69, 3, 271, 146, 1923, 502, 1433, 598, 600, 601, - /* 1100 */ 277, 139, 610, 127, 515, 1972, 76, 75, 404, 1754, - /* 1110 */ 1486, 182, 133, 620, 1754, 1754, 1754, 1754, 1923, 1378, - /* 1120 */ 619, 1376, 1385, 218, 220, 583, 216, 219, 603, 318, - /* 1130 */ 1595, 1596, 392, 574, 390, 386, 382, 379, 376, 578, - /* 1140 */ 77, 62, 369, 1953, 1381, 1382, 53, 1988, 241, 542, - /* 1150 */ 102, 1955, 623, 1957, 1958, 618, 133, 613, 1649, 1754, - /* 1160 */ 375, 1954, 2130, 222, 2041, 47, 221, 224, 356, 2037, - /* 1170 */ 223, 174, 2049, 2050, 1647, 131, 2054, 1737, 178, 2104, - /* 1180 */ 517, 34, 360, 1480, 1481, 1482, 1483, 1484, 1488, 1489, - /* 1190 */ 1490, 1491, 1972, 52, 1550, 1613, 520, 232, 546, 264, - /* 1200 */ 620, 243, 547, 614, 1954, 1923, 2110, 619, 142, 144, - /* 1210 */ 647, 146, 62, 13, 12, 176, 2049, 2050, 1324, 131, - /* 1220 */ 2054, 2116, 175, 1389, 2081, 576, 2111, 572, 1709, 254, - /* 1230 */ 1953, 663, 1954, 47, 1988, 1972, 47, 102, 1955, 623, - /* 1240 */ 1957, 1958, 618, 620, 613, 1477, 664, 1643, 1923, 2130, - /* 1250 */ 619, 2041, 269, 1158, 627, 356, 2037, 98, 1138, 559, - /* 1260 */ 211, 595, 273, 1972, 1210, 1493, 2060, 95, 1156, 248, - /* 1270 */ 1388, 620, 144, 1953, 1973, 1954, 1923, 1988, 619, 146, - /* 1280 */ 102, 1955, 623, 1957, 1958, 618, 1442, 613, 128, 289, - /* 1290 */ 144, 373, 2014, 1139, 2041, 1859, 706, 1637, 356, 2037, - /* 1300 */ 374, 1953, 1795, 2071, 584, 1988, 1972, 1238, 102, 1955, - /* 1310 */ 623, 1957, 1958, 618, 620, 613, 256, 253, 1, 1923, - /* 1320 */ 606, 619, 2041, 4, 378, 1242, 356, 2037, 383, 1341, - /* 1330 */ 535, 284, 1249, 332, 188, 410, 1405, 1860, 414, 445, - /* 1340 */ 1954, 1247, 547, 149, 1953, 419, 2110, 1400, 1988, 431, - /* 1350 */ 1852, 103, 1955, 623, 1957, 1958, 618, 438, 613, 452, - /* 1360 */ 444, 2116, 175, 579, 1954, 2041, 2111, 572, 446, 2040, - /* 1370 */ 2037, 1972, 547, 453, 1406, 458, 2110, 192, 455, 620, - /* 1380 */ 457, 467, 1408, 1954, 1923, 198, 619, 470, 1407, 471, - /* 1390 */ 472, 2116, 175, 1409, 200, 1972, 2111, 572, 473, 203, - /* 1400 */ 475, 205, 80, 620, 479, 1112, 81, 209, 1923, 1953, - /* 1410 */ 619, 496, 497, 1988, 1972, 498, 103, 1955, 623, 1957, - /* 1420 */ 1958, 618, 620, 613, 105, 534, 500, 1923, 1744, 619, - /* 1430 */ 2041, 321, 2072, 1953, 608, 2037, 1954, 1988, 215, 1740, - /* 1440 */ 162, 1955, 623, 1957, 1958, 618, 217, 613, 151, 152, - /* 1450 */ 1742, 1738, 621, 230, 153, 1900, 1988, 1954, 154, 103, - /* 1460 */ 1955, 623, 1957, 1958, 618, 1899, 613, 1972, 537, 538, - /* 1470 */ 536, 285, 541, 2041, 233, 617, 544, 326, 2037, 2082, - /* 1480 */ 1923, 551, 619, 557, 560, 593, 346, 2087, 1972, 239, - /* 1490 */ 242, 563, 573, 2131, 2086, 7, 620, 569, 549, 2063, - /* 1500 */ 552, 1923, 550, 619, 577, 1953, 252, 1519, 250, 1988, - /* 1510 */ 1954, 1941, 312, 1955, 623, 1957, 1958, 618, 616, 613, - /* 1520 */ 604, 2006, 1937, 249, 247, 347, 1953, 580, 132, 1404, - /* 1530 */ 1988, 2109, 588, 161, 1955, 623, 1957, 1958, 618, 2057, - /* 1540 */ 613, 1972, 165, 251, 350, 261, 591, 286, 592, 620, - /* 1550 */ 1933, 1939, 357, 1871, 1923, 1870, 619, 1869, 352, 2133, - /* 1560 */ 287, 613, 255, 1954, 596, 90, 92, 597, 288, 1755, - /* 1570 */ 59, 94, 2022, 625, 548, 2078, 1799, 291, 707, 1953, - /* 1580 */ 1725, 708, 280, 1988, 1954, 710, 103, 1955, 623, 1957, - /* 1590 */ 1958, 618, 51, 613, 1972, 315, 295, 300, 323, 293, - /* 1600 */ 2041, 324, 620, 1917, 314, 2038, 1954, 1923, 1916, 619, - /* 1610 */ 304, 73, 1915, 1914, 74, 1972, 1911, 380, 381, 1369, - /* 1620 */ 1370, 181, 385, 620, 1909, 387, 388, 389, 1923, 1908, - /* 1630 */ 619, 391, 1953, 1907, 393, 1906, 1988, 1972, 1905, 161, - /* 1640 */ 1955, 623, 1957, 1958, 618, 620, 613, 395, 1344, 397, - /* 1650 */ 1923, 1343, 619, 1953, 1882, 1881, 403, 1988, 402, 1880, - /* 1660 */ 306, 1955, 623, 1957, 1958, 618, 1879, 613, 1304, 1845, - /* 1670 */ 1844, 1842, 1954, 138, 1841, 1953, 1840, 1843, 1839, 1988, - /* 1680 */ 186, 2079, 162, 1955, 623, 1957, 1958, 618, 1838, 613, - /* 1690 */ 519, 1836, 1954, 1835, 1834, 420, 1833, 422, 1832, 1831, - /* 1700 */ 1830, 1829, 1828, 1972, 568, 529, 1827, 1826, 351, 1825, - /* 1710 */ 1824, 620, 1823, 1822, 1821, 1820, 1923, 1819, 619, 226, - /* 1720 */ 1818, 140, 1817, 1972, 1816, 1815, 1814, 1813, 1812, 1811, - /* 1730 */ 1306, 617, 1810, 448, 522, 2132, 1923, 1809, 619, 516, - /* 1740 */ 1808, 1953, 1671, 193, 225, 1988, 1185, 1954, 313, 1955, - /* 1750 */ 623, 1957, 1958, 618, 1670, 613, 1668, 1632, 71, 1098, - /* 1760 */ 196, 1953, 1097, 1954, 1631, 1988, 1895, 170, 312, 1955, - /* 1770 */ 623, 1957, 1958, 618, 194, 613, 197, 2007, 1972, 1889, - /* 1780 */ 1943, 66, 463, 361, 65, 465, 620, 1878, 72, 202, - /* 1790 */ 204, 1923, 1877, 619, 1972, 1862, 1733, 1667, 1131, 363, - /* 1800 */ 1665, 481, 620, 480, 482, 1663, 1954, 1923, 484, 619, - /* 1810 */ 486, 485, 1661, 490, 1659, 488, 1953, 489, 492, 1646, - /* 1820 */ 1988, 494, 1645, 313, 1955, 623, 1957, 1958, 618, 493, - /* 1830 */ 613, 1628, 1953, 1735, 214, 61, 1988, 1972, 1254, 313, - /* 1840 */ 1955, 623, 1957, 1958, 618, 620, 613, 1253, 1734, 1954, - /* 1850 */ 1923, 1176, 619, 1175, 679, 1174, 1168, 681, 1173, 1170, - /* 1860 */ 1657, 1169, 1167, 341, 1650, 1954, 342, 518, 1648, 343, - /* 1870 */ 521, 1627, 1626, 523, 525, 533, 1625, 527, 104, 1988, - /* 1880 */ 1972, 1359, 308, 1955, 623, 1957, 1958, 618, 620, 613, - /* 1890 */ 531, 1358, 1894, 1923, 26, 619, 1972, 1350, 1361, 1888, - /* 1900 */ 539, 1876, 1874, 55, 620, 155, 2115, 540, 1565, 1923, - /* 1910 */ 234, 619, 16, 19, 58, 344, 1954, 545, 1953, 245, - /* 1920 */ 553, 5, 1988, 30, 28, 297, 1955, 623, 1957, 1958, - /* 1930 */ 618, 246, 613, 1954, 1953, 555, 238, 1944, 1988, 6, - /* 1940 */ 240, 298, 1955, 623, 1957, 1958, 618, 1972, 613, 1549, - /* 1950 */ 163, 63, 20, 244, 21, 620, 1541, 29, 1580, 86, - /* 1960 */ 1923, 1579, 619, 1585, 1972, 348, 1584, 1583, 349, 258, - /* 1970 */ 1586, 1516, 620, 57, 1515, 166, 1875, 1923, 1873, 619, - /* 1980 */ 1872, 22, 594, 263, 1547, 1953, 1861, 265, 1954, 1988, - /* 1990 */ 17, 270, 299, 1955, 623, 1957, 1958, 618, 56, 613, - /* 2000 */ 88, 89, 1953, 91, 95, 275, 1988, 1954, 23, 305, - /* 2010 */ 1955, 623, 1957, 1958, 618, 272, 613, 1468, 10, 1972, - /* 2020 */ 12, 1467, 1393, 1991, 167, 1424, 179, 620, 624, 626, - /* 2030 */ 612, 1954, 1923, 1446, 619, 1478, 364, 1444, 1972, 36, - /* 2040 */ 622, 1443, 15, 24, 630, 25, 620, 1416, 1239, 628, - /* 2050 */ 631, 1923, 1236, 619, 1233, 633, 634, 1953, 1227, 636, - /* 2060 */ 1225, 1988, 1972, 637, 309, 1955, 623, 1957, 1958, 618, - /* 2070 */ 620, 613, 639, 1216, 646, 1923, 1953, 619, 640, 1231, - /* 2080 */ 1988, 96, 278, 301, 1955, 623, 1957, 1958, 618, 1954, - /* 2090 */ 613, 1230, 1229, 1228, 97, 1248, 1244, 656, 70, 1129, - /* 2100 */ 1953, 1164, 1163, 1162, 1988, 1954, 1161, 310, 1955, 623, - /* 2110 */ 1957, 1958, 618, 1160, 613, 1159, 1157, 1155, 1154, 1153, - /* 2120 */ 1972, 668, 1183, 279, 1149, 1151, 1150, 1148, 620, 1147, - /* 2130 */ 1146, 1145, 1144, 1923, 1180, 619, 1972, 1135, 1178, 1141, - /* 2140 */ 1664, 1140, 690, 1137, 620, 1136, 1134, 689, 1954, 1923, - /* 2150 */ 1662, 619, 691, 693, 1660, 695, 697, 694, 1953, 699, - /* 2160 */ 1658, 701, 1988, 703, 1954, 302, 1955, 623, 1957, 1958, - /* 2170 */ 618, 698, 613, 702, 1953, 282, 705, 1087, 1988, 1972, - /* 2180 */ 1644, 311, 1955, 623, 1957, 1958, 618, 620, 613, 1624, - /* 2190 */ 709, 712, 1923, 1379, 619, 1972, 292, 713, 1599, 1599, - /* 2200 */ 1599, 1599, 1599, 620, 1599, 1599, 1599, 1954, 1923, 1599, - /* 2210 */ 619, 1599, 1599, 1599, 1599, 1599, 1599, 1953, 1599, 1599, - /* 2220 */ 1599, 1988, 1599, 1954, 303, 1955, 623, 1957, 1958, 618, - /* 2230 */ 1599, 613, 1599, 1953, 1599, 1599, 1599, 1988, 1972, 1599, - /* 2240 */ 316, 1955, 623, 1957, 1958, 618, 620, 613, 1599, 1599, - /* 2250 */ 1599, 1923, 1599, 619, 1972, 1599, 1599, 1599, 1599, 1599, - /* 2260 */ 1599, 1599, 620, 1599, 1599, 1599, 1954, 1923, 1599, 619, - /* 2270 */ 1599, 1599, 1599, 1599, 1599, 1599, 1953, 1599, 1599, 1599, - /* 2280 */ 1988, 1599, 1599, 317, 1955, 623, 1957, 1958, 618, 1599, - /* 2290 */ 613, 1599, 1953, 1599, 1599, 1599, 1988, 1972, 1599, 1966, - /* 2300 */ 1955, 623, 1957, 1958, 618, 620, 613, 1599, 1599, 1599, - /* 2310 */ 1923, 1599, 619, 1599, 1599, 1599, 1599, 1954, 1599, 1599, - /* 2320 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, - /* 2330 */ 1599, 1599, 1599, 1599, 1954, 1953, 1599, 1599, 1599, 1988, - /* 2340 */ 1599, 1599, 1965, 1955, 623, 1957, 1958, 618, 1972, 613, - /* 2350 */ 1599, 1599, 1599, 1599, 1599, 1599, 620, 1599, 1599, 1599, - /* 2360 */ 1954, 1923, 1599, 619, 1599, 1972, 1599, 1599, 1599, 1599, - /* 2370 */ 1599, 1599, 1599, 620, 1599, 1599, 1599, 1599, 1923, 1599, - /* 2380 */ 619, 1599, 1599, 1599, 1599, 1599, 1953, 1599, 1599, 1599, - /* 2390 */ 1988, 1972, 1599, 1964, 1955, 623, 1957, 1958, 618, 620, - /* 2400 */ 613, 1599, 1599, 1953, 1923, 1599, 619, 1988, 1599, 1599, - /* 2410 */ 328, 1955, 623, 1957, 1958, 618, 1954, 613, 1599, 1599, - /* 2420 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1953, - /* 2430 */ 1599, 1599, 1954, 1988, 1599, 1599, 329, 1955, 623, 1957, - /* 2440 */ 1958, 618, 1599, 613, 1599, 1599, 1599, 1972, 1599, 1599, - /* 2450 */ 1599, 1599, 1599, 1599, 1599, 620, 1599, 1599, 1599, 1599, - /* 2460 */ 1923, 1599, 619, 1972, 1599, 1599, 1599, 1599, 1599, 1599, - /* 2470 */ 1599, 620, 1599, 1599, 1599, 1599, 1923, 1599, 619, 1599, - /* 2480 */ 1599, 1599, 1599, 1599, 1599, 1953, 1954, 1599, 1599, 1988, - /* 2490 */ 1599, 1599, 325, 1955, 623, 1957, 1958, 618, 1599, 613, - /* 2500 */ 1599, 1953, 1954, 1599, 1599, 1988, 1599, 1599, 330, 1955, - /* 2510 */ 623, 1957, 1958, 618, 1599, 613, 1599, 1972, 1599, 1599, - /* 2520 */ 1599, 1599, 1599, 1599, 1599, 620, 1599, 1599, 1599, 1599, - /* 2530 */ 1923, 1599, 619, 1972, 1599, 1599, 1599, 1599, 1599, 1599, - /* 2540 */ 1599, 620, 1599, 1599, 1599, 1599, 1923, 1599, 619, 1599, - /* 2550 */ 1599, 1599, 1599, 1599, 1599, 621, 1599, 1599, 1599, 1988, - /* 2560 */ 1599, 1599, 308, 1955, 623, 1957, 1958, 618, 1599, 613, - /* 2570 */ 1599, 1953, 1599, 1599, 1599, 1988, 1599, 1599, 307, 1955, - /* 2580 */ 623, 1957, 1958, 618, 1599, 613, + /* 0 */ 1956, 460, 1745, 461, 1638, 571, 590, 35, 276, 2113, + /* 10 */ 160, 1809, 45, 43, 1528, 1710, 353, 2118, 331, 1867, + /* 20 */ 362, 2113, 1378, 1602, 570, 175, 603, 1807, 354, 2114, + /* 30 */ 572, 1974, 466, 1458, 602, 1376, 157, 2117, 462, 586, + /* 40 */ 54, 2114, 2116, 401, 1925, 1758, 619, 124, 123, 122, + /* 50 */ 121, 120, 119, 118, 117, 116, 1403, 1756, 1453, 171, + /* 60 */ 38, 37, 566, 18, 44, 42, 41, 40, 39, 1955, + /* 70 */ 1384, 2059, 1796, 1991, 602, 1403, 102, 1957, 623, 1959, + /* 80 */ 1960, 618, 571, 613, 1809, 547, 2113, 478, 172, 2113, + /* 90 */ 2044, 355, 1747, 1404, 356, 2040, 14, 2056, 589, 1956, + /* 100 */ 1807, 570, 175, 1939, 2119, 175, 2114, 572, 177, 2114, + /* 110 */ 572, 44, 42, 41, 40, 39, 2070, 115, 711, 657, + /* 120 */ 114, 113, 112, 111, 110, 109, 108, 107, 106, 602, + /* 130 */ 1974, 1935, 1941, 1460, 1461, 41, 40, 39, 620, 159, + /* 140 */ 547, 1614, 613, 1925, 2113, 619, 45, 43, 82, 1565, + /* 150 */ 48, 60, 169, 1912, 362, 469, 1378, 461, 1638, 2119, + /* 160 */ 175, 1091, 1433, 1443, 2114, 572, 2118, 1458, 1955, 1376, + /* 170 */ 2113, 1752, 1991, 334, 1856, 102, 1957, 623, 1959, 1960, + /* 180 */ 618, 1379, 613, 1377, 1403, 136, 2117, 143, 2015, 2044, + /* 190 */ 2114, 2115, 1453, 356, 2040, 1404, 1178, 18, 1314, 1315, + /* 200 */ 1093, 384, 1096, 1097, 1384, 48, 1382, 1383, 1603, 1432, + /* 210 */ 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 615, 611, + /* 220 */ 1451, 1452, 1454, 1455, 1456, 1457, 1459, 1462, 2, 115, + /* 230 */ 14, 1180, 114, 113, 112, 111, 110, 109, 108, 107, + /* 240 */ 106, 514, 513, 512, 319, 1671, 1401, 260, 1809, 130, + /* 250 */ 508, 1852, 711, 437, 507, 366, 450, 603, 60, 449, + /* 260 */ 506, 511, 183, 603, 1807, 648, 505, 1460, 1461, 367, + /* 270 */ 1809, 125, 1802, 1804, 421, 365, 451, 125, 499, 423, + /* 280 */ 1734, 45, 43, 157, 504, 60, 1808, 87, 1756, 362, + /* 290 */ 2059, 1378, 1758, 603, 1756, 459, 1433, 1443, 464, 1644, + /* 300 */ 178, 178, 1458, 1110, 1376, 1109, 64, 180, 1261, 1262, + /* 310 */ 514, 513, 512, 49, 82, 1379, 2055, 1377, 130, 508, + /* 320 */ 60, 335, 468, 507, 1756, 464, 1644, 1453, 129, 506, + /* 330 */ 511, 1402, 18, 411, 1111, 505, 11, 1751, 9, 1384, + /* 340 */ 1382, 1383, 478, 1432, 1435, 1436, 1437, 1438, 1439, 1440, + /* 350 */ 1441, 1442, 615, 611, 1451, 1452, 1454, 1455, 1456, 1457, + /* 360 */ 1459, 1462, 2, 447, 11, 14, 442, 441, 440, 439, + /* 370 */ 436, 435, 434, 433, 432, 428, 427, 426, 425, 336, + /* 380 */ 418, 417, 416, 1384, 413, 412, 333, 711, 38, 37, + /* 390 */ 1625, 228, 44, 42, 41, 40, 39, 213, 60, 1110, + /* 400 */ 1406, 1109, 1460, 1461, 400, 227, 399, 169, 178, 1600, + /* 410 */ 610, 528, 164, 407, 212, 45, 43, 1463, 495, 491, + /* 420 */ 487, 483, 210, 362, 526, 1378, 524, 510, 509, 1857, + /* 430 */ 1111, 1433, 1443, 583, 1925, 178, 1458, 603, 1376, 229, + /* 440 */ 38, 37, 1786, 603, 44, 42, 41, 40, 39, 1555, + /* 450 */ 1379, 277, 1377, 320, 1355, 1356, 561, 405, 443, 83, + /* 460 */ 1733, 1453, 208, 178, 133, 84, 322, 1405, 1756, 532, + /* 470 */ 178, 530, 377, 1384, 1756, 1382, 1383, 11, 1432, 1435, + /* 480 */ 1436, 1437, 1438, 1439, 1440, 1441, 1442, 615, 611, 1451, + /* 490 */ 1452, 1454, 1455, 1456, 1457, 1459, 1462, 2, 396, 46, + /* 500 */ 558, 1553, 1554, 1556, 1557, 38, 37, 669, 1624, 44, + /* 510 */ 42, 41, 40, 39, 547, 1852, 191, 190, 2113, 398, + /* 520 */ 394, 711, 585, 173, 2052, 2053, 185, 131, 2057, 207, + /* 530 */ 201, 603, 206, 2119, 175, 474, 1460, 1461, 2114, 572, + /* 540 */ 567, 562, 556, 1741, 237, 406, 583, 1974, 178, 45, + /* 550 */ 43, 199, 1925, 1479, 519, 565, 368, 362, 1731, 1378, + /* 560 */ 327, 605, 1756, 2016, 157, 1433, 1443, 1489, 655, 529, + /* 570 */ 1458, 99, 1376, 1758, 38, 37, 1525, 133, 44, 42, + /* 580 */ 41, 40, 39, 226, 1379, 134, 1377, 148, 147, 652, + /* 590 */ 651, 650, 145, 1748, 564, 1453, 267, 268, 522, 13, + /* 600 */ 12, 266, 1487, 516, 1743, 1595, 2059, 1384, 225, 1382, + /* 610 */ 1383, 259, 1432, 1435, 1436, 1437, 1438, 1439, 1440, 1441, + /* 620 */ 1442, 615, 611, 1451, 1452, 1454, 1455, 1456, 1457, 1459, + /* 630 */ 1462, 2, 2054, 46, 1623, 1622, 257, 2052, 582, 32, + /* 640 */ 126, 581, 682, 680, 2113, 66, 38, 37, 65, 1494, + /* 650 */ 44, 42, 41, 40, 39, 711, 1096, 1097, 1488, 570, + /* 660 */ 175, 1739, 31, 1544, 2114, 572, 655, 603, 38, 37, + /* 670 */ 1460, 1461, 44, 42, 41, 40, 39, 1621, 1925, 1925, + /* 680 */ 1620, 415, 27, 45, 43, 148, 147, 652, 651, 650, + /* 690 */ 145, 362, 1406, 1378, 2118, 1501, 1803, 1804, 1756, 1433, + /* 700 */ 1443, 1532, 1594, 33, 1458, 187, 1376, 1403, 1852, 38, + /* 710 */ 37, 1405, 542, 44, 42, 41, 40, 39, 1379, 189, + /* 720 */ 1377, 1925, 1468, 135, 1925, 1732, 2015, 232, 1403, 1453, + /* 730 */ 34, 360, 1482, 1483, 1484, 1485, 1486, 1490, 1491, 1492, + /* 740 */ 1493, 1384, 79, 1382, 1383, 78, 1432, 1435, 1436, 1437, + /* 750 */ 1438, 1439, 1440, 1441, 1442, 615, 611, 1451, 1452, 1454, + /* 760 */ 1455, 1456, 1457, 1459, 1462, 2, 1619, 14, 1218, 645, + /* 770 */ 644, 643, 1222, 642, 1224, 1225, 641, 1227, 638, 1378, + /* 780 */ 1233, 635, 1235, 1236, 632, 629, 339, 657, 1588, 711, + /* 790 */ 38, 37, 1376, 714, 44, 42, 41, 40, 39, 590, + /* 800 */ 1618, 375, 93, 503, 1460, 1461, 1944, 283, 1406, 607, + /* 810 */ 1925, 2016, 1868, 2117, 1617, 1616, 1613, 1939, 655, 1524, + /* 820 */ 1612, 1611, 168, 649, 1749, 502, 1800, 1384, 704, 700, + /* 830 */ 696, 692, 281, 1433, 1443, 1668, 184, 148, 147, 652, + /* 840 */ 651, 650, 145, 547, 1925, 1935, 1941, 2113, 340, 1434, + /* 850 */ 338, 337, 1379, 501, 1377, 259, 613, 503, 1925, 1925, + /* 860 */ 1925, 1403, 2119, 175, 1925, 1925, 8, 2114, 572, 100, + /* 870 */ 1434, 653, 274, 654, 1800, 711, 1800, 1382, 1383, 502, + /* 880 */ 1432, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 615, + /* 890 */ 611, 1451, 1452, 1454, 1455, 1456, 1457, 1459, 1462, 2, + /* 900 */ 688, 687, 686, 685, 372, 599, 684, 683, 137, 678, + /* 910 */ 677, 676, 675, 674, 673, 672, 671, 150, 667, 666, + /* 920 */ 665, 371, 370, 662, 661, 660, 659, 658, 158, 1610, + /* 930 */ 1609, 614, 157, 296, 1608, 1839, 1956, 1607, 1379, 146, + /* 940 */ 1377, 1759, 262, 670, 1943, 1726, 156, 294, 68, 1943, + /* 950 */ 1658, 67, 236, 2064, 1521, 1939, 1956, 1597, 1598, 1349, + /* 960 */ 1939, 231, 603, 1382, 1383, 583, 50, 1974, 3, 195, + /* 970 */ 456, 454, 515, 1925, 1925, 586, 429, 603, 1925, 1606, + /* 980 */ 1925, 1925, 619, 1935, 1941, 345, 1615, 1974, 1935, 1941, + /* 990 */ 357, 430, 53, 1756, 613, 620, 133, 603, 1605, 613, + /* 1000 */ 1925, 290, 619, 1434, 1786, 1955, 60, 374, 1756, 1991, + /* 1010 */ 583, 476, 102, 1957, 623, 1959, 1960, 618, 218, 613, + /* 1020 */ 139, 216, 127, 1925, 172, 1955, 2044, 69, 1756, 1991, + /* 1030 */ 356, 2040, 102, 1957, 623, 1959, 1960, 618, 578, 613, + /* 1040 */ 603, 133, 1925, 1651, 2133, 101, 2044, 1956, 603, 547, + /* 1050 */ 356, 2040, 2071, 2113, 477, 174, 2052, 2053, 575, 131, + /* 1060 */ 2057, 2078, 1753, 408, 1711, 517, 603, 603, 2119, 175, + /* 1070 */ 2084, 1756, 1521, 2114, 572, 574, 409, 77, 1974, 1756, + /* 1080 */ 141, 543, 235, 76, 75, 404, 620, 424, 182, 220, + /* 1090 */ 1956, 1925, 219, 619, 13, 12, 222, 1756, 1756, 221, + /* 1100 */ 176, 2052, 2053, 647, 131, 2057, 318, 224, 62, 392, + /* 1110 */ 223, 390, 386, 382, 379, 376, 1955, 603, 1387, 1386, + /* 1120 */ 1991, 1974, 85, 102, 1957, 623, 1959, 1960, 618, 620, + /* 1130 */ 613, 587, 1649, 1956, 1925, 2133, 619, 2044, 241, 38, + /* 1140 */ 37, 356, 2040, 44, 42, 41, 40, 39, 1756, 1946, + /* 1150 */ 52, 254, 2091, 559, 520, 546, 178, 211, 248, 1955, + /* 1160 */ 1975, 1552, 1861, 1991, 1974, 98, 102, 1957, 623, 1959, + /* 1170 */ 1960, 618, 620, 613, 603, 95, 2074, 1925, 2133, 619, + /* 1180 */ 2044, 47, 264, 373, 356, 2040, 142, 603, 271, 1639, + /* 1190 */ 535, 243, 144, 603, 603, 554, 1797, 146, 1948, 584, + /* 1200 */ 62, 598, 1955, 256, 1, 1756, 1991, 600, 601, 102, + /* 1210 */ 1957, 623, 1959, 1960, 618, 1956, 613, 603, 1756, 359, + /* 1220 */ 358, 2133, 47, 2044, 1756, 1756, 47, 356, 2040, 1392, + /* 1230 */ 627, 369, 547, 144, 1325, 269, 2113, 146, 2107, 595, + /* 1240 */ 1458, 1139, 1385, 4, 253, 273, 1974, 128, 1756, 663, + /* 1250 */ 1211, 2119, 175, 1495, 620, 144, 2114, 572, 1645, 1925, + /* 1260 */ 664, 619, 378, 579, 383, 1453, 1390, 1389, 332, 1342, + /* 1270 */ 284, 1159, 188, 410, 1406, 1444, 1140, 1384, 1862, 289, + /* 1280 */ 1956, 576, 1157, 1239, 1955, 414, 1243, 445, 1991, 419, + /* 1290 */ 1250, 102, 1957, 623, 1959, 1960, 618, 1401, 613, 431, + /* 1300 */ 1248, 1854, 438, 2133, 1956, 2044, 444, 706, 149, 356, + /* 1310 */ 2040, 1974, 452, 446, 453, 192, 455, 457, 1407, 620, + /* 1320 */ 2063, 458, 467, 1409, 1925, 609, 619, 470, 471, 198, + /* 1330 */ 200, 1408, 1410, 473, 472, 1974, 475, 479, 1113, 498, + /* 1340 */ 203, 500, 205, 620, 80, 81, 209, 496, 1925, 1955, + /* 1350 */ 619, 497, 1746, 1991, 105, 321, 102, 1957, 623, 1959, + /* 1360 */ 1960, 618, 1902, 613, 1956, 215, 534, 536, 2019, 1742, + /* 1370 */ 2044, 285, 217, 1955, 356, 2040, 151, 1991, 152, 1744, + /* 1380 */ 102, 1957, 623, 1959, 1960, 618, 1740, 613, 1393, 153, + /* 1390 */ 1388, 154, 2017, 1901, 2044, 1974, 230, 541, 356, 2040, + /* 1400 */ 537, 233, 544, 620, 538, 560, 551, 1956, 1925, 2090, + /* 1410 */ 619, 2075, 593, 1396, 1398, 2085, 239, 557, 346, 563, + /* 1420 */ 242, 7, 569, 2089, 165, 552, 611, 1451, 1452, 1454, + /* 1430 */ 1455, 1456, 1457, 1955, 549, 1956, 550, 1991, 1974, 252, + /* 1440 */ 102, 1957, 623, 1959, 1960, 618, 620, 613, 2066, 580, + /* 1450 */ 347, 1925, 606, 619, 2044, 249, 577, 247, 356, 2040, + /* 1460 */ 250, 1405, 132, 251, 1521, 2060, 1974, 350, 261, 588, + /* 1470 */ 286, 591, 592, 1873, 620, 1872, 1955, 1871, 352, 1925, + /* 1480 */ 1991, 619, 287, 103, 1957, 623, 1959, 1960, 618, 596, + /* 1490 */ 613, 2112, 1956, 597, 255, 90, 2136, 2044, 288, 59, + /* 1500 */ 92, 2043, 2040, 1757, 1955, 94, 1801, 2025, 1991, 625, + /* 1510 */ 291, 103, 1957, 623, 1959, 1960, 618, 1727, 613, 707, + /* 1520 */ 280, 295, 708, 1974, 710, 2044, 51, 323, 300, 608, + /* 1530 */ 2040, 620, 73, 324, 315, 1919, 1925, 314, 619, 293, + /* 1540 */ 304, 1918, 1917, 1916, 74, 1956, 1913, 380, 381, 1370, + /* 1550 */ 1371, 181, 385, 1911, 387, 388, 389, 1910, 391, 1909, + /* 1560 */ 393, 621, 1908, 1907, 397, 1991, 395, 1956, 103, 1957, + /* 1570 */ 623, 1959, 1960, 618, 1345, 613, 1974, 1344, 1884, 1883, + /* 1580 */ 1882, 403, 2044, 402, 617, 1881, 326, 2040, 1847, 1925, + /* 1590 */ 1846, 619, 1305, 1844, 138, 1843, 1842, 1845, 1974, 1841, + /* 1600 */ 1840, 1838, 1837, 1836, 186, 420, 620, 422, 1834, 1833, + /* 1610 */ 1832, 1925, 1835, 619, 1955, 1831, 1830, 1829, 1991, 1828, + /* 1620 */ 1956, 312, 1957, 623, 1959, 1960, 618, 616, 613, 604, + /* 1630 */ 2009, 1827, 1826, 1825, 1824, 1823, 1955, 1822, 1821, 1820, + /* 1640 */ 1991, 1819, 1818, 161, 1957, 623, 1959, 1960, 618, 1817, + /* 1650 */ 613, 1974, 1816, 140, 1815, 1814, 1813, 1812, 1307, 620, + /* 1660 */ 448, 1811, 1810, 1186, 1925, 196, 619, 1673, 1672, 1670, + /* 1670 */ 1634, 193, 194, 170, 1945, 1633, 1897, 1956, 1099, 71, + /* 1680 */ 1098, 1891, 1880, 204, 548, 2081, 197, 72, 1879, 1955, + /* 1690 */ 463, 465, 202, 1991, 1864, 1735, 162, 1957, 623, 1959, + /* 1700 */ 1960, 618, 1669, 613, 1667, 1665, 480, 481, 1974, 1132, + /* 1710 */ 1663, 482, 484, 1661, 488, 1648, 620, 486, 492, 1647, + /* 1720 */ 1630, 1925, 485, 619, 490, 1737, 494, 61, 489, 214, + /* 1730 */ 1254, 1255, 1956, 1736, 493, 1177, 1176, 679, 1175, 1169, + /* 1740 */ 1659, 1174, 681, 341, 1171, 1652, 1955, 1170, 573, 2134, + /* 1750 */ 1991, 1168, 342, 103, 1957, 623, 1959, 1960, 618, 1650, + /* 1760 */ 613, 518, 521, 1974, 343, 1629, 523, 2044, 1628, 525, + /* 1770 */ 1627, 620, 2041, 527, 104, 1956, 1925, 531, 619, 1360, + /* 1780 */ 26, 1359, 1896, 1351, 55, 1890, 1362, 234, 155, 539, + /* 1790 */ 1878, 1876, 2118, 19, 540, 1956, 1567, 16, 553, 58, + /* 1800 */ 245, 1955, 555, 28, 246, 1991, 1974, 1946, 161, 1957, + /* 1810 */ 623, 1959, 1960, 618, 620, 613, 30, 545, 20, 1925, + /* 1820 */ 238, 619, 344, 240, 63, 1551, 1974, 21, 163, 5, + /* 1830 */ 1582, 244, 6, 29, 620, 1543, 1587, 86, 1581, 1925, + /* 1840 */ 1588, 619, 17, 348, 1955, 1586, 1585, 349, 1991, 1518, + /* 1850 */ 2082, 306, 1957, 623, 1959, 1960, 618, 57, 613, 1517, + /* 1860 */ 1956, 258, 56, 166, 1955, 1877, 1875, 1874, 1991, 22, + /* 1870 */ 265, 162, 1957, 623, 1959, 1960, 618, 263, 613, 1863, + /* 1880 */ 89, 1549, 270, 88, 91, 594, 275, 95, 272, 23, + /* 1890 */ 12, 1974, 1394, 1994, 612, 568, 351, 1448, 1480, 620, + /* 1900 */ 167, 1446, 1470, 36, 1925, 15, 619, 179, 1425, 624, + /* 1910 */ 626, 1956, 1445, 24, 1232, 1417, 25, 364, 630, 1240, + /* 1920 */ 1469, 10, 622, 628, 2135, 1237, 631, 633, 1234, 1955, + /* 1930 */ 634, 636, 637, 1991, 1228, 1956, 313, 1957, 623, 1959, + /* 1940 */ 1960, 618, 1974, 613, 1226, 639, 640, 278, 1217, 1231, + /* 1950 */ 617, 646, 1230, 1229, 96, 1925, 1249, 619, 97, 70, + /* 1960 */ 1245, 1130, 656, 1165, 1164, 1163, 1974, 1162, 1161, 1160, + /* 1970 */ 1158, 361, 1156, 668, 620, 1155, 1154, 1184, 1152, 1925, + /* 1980 */ 1955, 619, 1151, 279, 1991, 1150, 1149, 312, 1957, 623, + /* 1990 */ 1959, 1960, 618, 1956, 613, 1148, 2010, 1147, 1136, 1146, + /* 2000 */ 1145, 1181, 1179, 1142, 1955, 1141, 1138, 1137, 1991, 1135, + /* 2010 */ 1666, 313, 1957, 623, 1959, 1960, 618, 689, 613, 1664, + /* 2020 */ 691, 693, 695, 690, 1974, 694, 1662, 697, 699, 363, + /* 2030 */ 1660, 701, 620, 698, 703, 702, 1646, 1925, 705, 619, + /* 2040 */ 1088, 1626, 282, 709, 1601, 1380, 292, 1601, 712, 713, + /* 2050 */ 1956, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2060 */ 1601, 1601, 1955, 1601, 1601, 1601, 1991, 1601, 1601, 313, + /* 2070 */ 1957, 623, 1959, 1960, 618, 1601, 613, 1601, 1956, 1601, + /* 2080 */ 1601, 1974, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 620, + /* 2090 */ 1601, 1601, 1601, 1601, 1925, 1601, 619, 1601, 1601, 1601, + /* 2100 */ 1601, 1601, 1601, 1601, 1956, 1601, 1601, 1601, 1601, 1974, + /* 2110 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 620, 1601, 533, + /* 2120 */ 1601, 1601, 1925, 1991, 619, 1601, 308, 1957, 623, 1959, + /* 2130 */ 1960, 618, 1601, 613, 1601, 1974, 1601, 1601, 1601, 1601, + /* 2140 */ 1601, 1601, 1601, 620, 1601, 1601, 1601, 1955, 1925, 1601, + /* 2150 */ 619, 1991, 1601, 1601, 297, 1957, 623, 1959, 1960, 618, + /* 2160 */ 1601, 613, 1601, 1956, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2170 */ 1601, 1601, 1601, 1955, 1601, 1601, 1601, 1991, 1601, 1956, + /* 2180 */ 298, 1957, 623, 1959, 1960, 618, 1601, 613, 1601, 1601, + /* 2190 */ 1601, 1601, 1601, 1601, 1974, 1601, 1601, 1601, 1601, 1601, + /* 2200 */ 1601, 1601, 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, + /* 2210 */ 1974, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 620, 1601, + /* 2220 */ 1601, 1601, 1601, 1925, 1601, 619, 1601, 1601, 1601, 1601, + /* 2230 */ 1601, 1601, 1955, 1956, 1601, 1601, 1991, 1601, 1601, 299, + /* 2240 */ 1957, 623, 1959, 1960, 618, 1601, 613, 1601, 1955, 1601, + /* 2250 */ 1601, 1601, 1991, 1956, 1601, 305, 1957, 623, 1959, 1960, + /* 2260 */ 618, 1601, 613, 1601, 1974, 1601, 1601, 1601, 1601, 1601, + /* 2270 */ 1601, 1601, 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, + /* 2280 */ 1601, 1601, 1601, 1601, 1974, 1601, 1601, 1601, 1601, 1601, + /* 2290 */ 1601, 1601, 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, + /* 2300 */ 1601, 1601, 1955, 1601, 1601, 1601, 1991, 1601, 1956, 309, + /* 2310 */ 1957, 623, 1959, 1960, 618, 1601, 613, 1601, 1601, 1601, + /* 2320 */ 1601, 1601, 1955, 1601, 1601, 1956, 1991, 1601, 1601, 301, + /* 2330 */ 1957, 623, 1959, 1960, 618, 1601, 613, 1601, 1601, 1974, + /* 2340 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 620, 1601, 1601, + /* 2350 */ 1601, 1601, 1925, 1601, 619, 1601, 1974, 1601, 1601, 1601, + /* 2360 */ 1601, 1601, 1601, 1601, 620, 1601, 1601, 1601, 1956, 1925, + /* 2370 */ 1601, 619, 1601, 1601, 1601, 1601, 1601, 1955, 1601, 1601, + /* 2380 */ 1601, 1991, 1601, 1601, 310, 1957, 623, 1959, 1960, 618, + /* 2390 */ 1601, 613, 1601, 1601, 1955, 1601, 1601, 1601, 1991, 1974, + /* 2400 */ 1601, 302, 1957, 623, 1959, 1960, 618, 620, 613, 1601, + /* 2410 */ 1601, 1601, 1925, 1601, 619, 1601, 1601, 1601, 1601, 1601, + /* 2420 */ 1601, 1601, 1601, 1956, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2430 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1955, 1601, 1601, + /* 2440 */ 1601, 1991, 1601, 1601, 311, 1957, 623, 1959, 1960, 618, + /* 2450 */ 1601, 613, 1601, 1601, 1974, 1601, 1601, 1601, 1601, 1601, + /* 2460 */ 1601, 1601, 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, + /* 2470 */ 1601, 1601, 1601, 1601, 1601, 1601, 1956, 1601, 1601, 1601, + /* 2480 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2490 */ 1601, 1601, 1955, 1601, 1601, 1601, 1991, 1601, 1601, 303, + /* 2500 */ 1957, 623, 1959, 1960, 618, 1601, 613, 1974, 1601, 1601, + /* 2510 */ 1601, 1601, 1601, 1601, 1601, 620, 1601, 1601, 1601, 1601, + /* 2520 */ 1925, 1601, 619, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2530 */ 1601, 1956, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2540 */ 1601, 1601, 1601, 1601, 1601, 1955, 1601, 1956, 1601, 1991, + /* 2550 */ 1601, 1601, 316, 1957, 623, 1959, 1960, 618, 1601, 613, + /* 2560 */ 1601, 1601, 1974, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2570 */ 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, 1974, 1601, + /* 2580 */ 1601, 1601, 1601, 1601, 1601, 1601, 620, 1601, 1601, 1601, + /* 2590 */ 1601, 1925, 1601, 619, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2600 */ 1955, 1956, 1601, 1601, 1991, 1601, 1601, 317, 1957, 623, + /* 2610 */ 1959, 1960, 618, 1601, 613, 1601, 1955, 1601, 1601, 1601, + /* 2620 */ 1991, 1956, 1601, 1968, 1957, 623, 1959, 1960, 618, 1601, + /* 2630 */ 613, 1601, 1974, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2640 */ 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, 1601, 1601, + /* 2650 */ 1601, 1601, 1974, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2660 */ 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, 1601, 1601, + /* 2670 */ 1955, 1601, 1601, 1601, 1991, 1601, 1956, 1967, 1957, 623, + /* 2680 */ 1959, 1960, 618, 1601, 613, 1601, 1601, 1601, 1601, 1601, + /* 2690 */ 1955, 1601, 1601, 1956, 1991, 1601, 1601, 1966, 1957, 623, + /* 2700 */ 1959, 1960, 618, 1601, 613, 1601, 1601, 1974, 1601, 1601, + /* 2710 */ 1601, 1601, 1601, 1601, 1601, 620, 1601, 1601, 1601, 1601, + /* 2720 */ 1925, 1601, 619, 1601, 1974, 1601, 1601, 1601, 1601, 1601, + /* 2730 */ 1601, 1601, 620, 1601, 1601, 1601, 1956, 1925, 1601, 619, + /* 2740 */ 1601, 1601, 1601, 1601, 1601, 1955, 1601, 1601, 1601, 1991, + /* 2750 */ 1601, 1601, 328, 1957, 623, 1959, 1960, 618, 1601, 613, + /* 2760 */ 1601, 1601, 1955, 1601, 1601, 1601, 1991, 1974, 1601, 329, + /* 2770 */ 1957, 623, 1959, 1960, 618, 620, 613, 1601, 1601, 1601, + /* 2780 */ 1925, 1601, 619, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2790 */ 1601, 1956, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2800 */ 1601, 1601, 1601, 1601, 1601, 1955, 1601, 1601, 1601, 1991, + /* 2810 */ 1601, 1601, 325, 1957, 623, 1959, 1960, 618, 1601, 613, + /* 2820 */ 1601, 1601, 1974, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2830 */ 620, 1601, 1601, 1601, 1601, 1925, 1601, 619, 1601, 1601, + /* 2840 */ 1601, 1601, 1601, 1601, 1956, 1601, 1601, 1601, 1601, 1601, + /* 2850 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2860 */ 1955, 1601, 1601, 1601, 1991, 1601, 1601, 330, 1957, 623, + /* 2870 */ 1959, 1960, 618, 1601, 613, 1974, 1601, 1601, 1601, 1601, + /* 2880 */ 1601, 1601, 1601, 620, 1601, 1601, 1601, 1601, 1925, 1601, + /* 2890 */ 619, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1956, + /* 2900 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2910 */ 1601, 1601, 1601, 621, 1601, 1601, 1601, 1991, 1601, 1601, + /* 2920 */ 308, 1957, 623, 1959, 1960, 618, 1601, 613, 1601, 1601, + /* 2930 */ 1974, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 620, 1601, + /* 2940 */ 1601, 1601, 1601, 1925, 1601, 619, 1601, 1601, 1601, 1601, + /* 2950 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, + /* 2960 */ 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1601, 1955, 1601, + /* 2970 */ 1601, 1601, 1991, 1601, 1601, 307, 1957, 623, 1959, 1960, + /* 2980 */ 618, 1601, 613, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 327, 331, 359, 333, 334, 429, 373, 418, 419, 433, - /* 10 */ 342, 358, 12, 13, 14, 347, 383, 429, 365, 386, - /* 20 */ 20, 433, 22, 0, 448, 449, 335, 374, 350, 453, - /* 30 */ 454, 358, 326, 33, 328, 35, 358, 449, 20, 366, - /* 40 */ 349, 453, 454, 387, 371, 367, 373, 24, 25, 26, - /* 50 */ 27, 28, 29, 30, 31, 32, 14, 366, 58, 20, - /* 60 */ 8, 9, 20, 63, 12, 13, 14, 15, 16, 396, - /* 70 */ 70, 357, 331, 400, 333, 334, 403, 404, 405, 406, - /* 80 */ 407, 408, 429, 410, 370, 429, 433, 402, 415, 433, - /* 90 */ 417, 4, 360, 358, 421, 422, 96, 96, 335, 327, - /* 100 */ 360, 448, 449, 371, 448, 449, 453, 454, 435, 453, - /* 110 */ 454, 371, 349, 428, 379, 380, 443, 21, 118, 356, - /* 120 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 366, - /* 130 */ 358, 399, 400, 133, 134, 96, 324, 358, 366, 399, - /* 140 */ 400, 401, 410, 371, 365, 373, 12, 13, 0, 97, - /* 150 */ 410, 133, 134, 374, 20, 0, 22, 369, 358, 327, - /* 160 */ 372, 373, 162, 163, 20, 365, 22, 33, 396, 35, - /* 170 */ 335, 20, 400, 22, 374, 403, 404, 405, 406, 407, - /* 180 */ 408, 181, 410, 183, 349, 413, 35, 415, 416, 417, - /* 190 */ 358, 58, 58, 421, 422, 51, 48, 63, 366, 387, - /* 200 */ 20, 366, 51, 371, 70, 373, 206, 207, 20, 209, + /* 0 */ 328, 332, 360, 334, 335, 430, 374, 419, 420, 434, + /* 10 */ 343, 359, 12, 13, 14, 348, 384, 430, 366, 387, + /* 20 */ 20, 434, 22, 0, 449, 450, 336, 375, 351, 454, + /* 30 */ 455, 359, 14, 33, 20, 35, 359, 450, 20, 367, + /* 40 */ 350, 454, 455, 388, 372, 368, 374, 24, 25, 26, + /* 50 */ 27, 28, 29, 30, 31, 32, 20, 367, 58, 358, + /* 60 */ 8, 9, 20, 63, 12, 13, 14, 15, 16, 397, + /* 70 */ 70, 403, 371, 401, 20, 20, 404, 405, 406, 407, + /* 80 */ 408, 409, 430, 411, 359, 430, 434, 62, 416, 434, + /* 90 */ 418, 366, 361, 20, 422, 423, 96, 429, 388, 328, + /* 100 */ 375, 449, 450, 372, 449, 450, 454, 455, 436, 454, + /* 110 */ 455, 12, 13, 14, 15, 16, 444, 21, 118, 62, + /* 120 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 20, + /* 130 */ 359, 400, 401, 133, 134, 14, 15, 16, 367, 327, + /* 140 */ 430, 329, 411, 372, 434, 374, 12, 13, 342, 97, + /* 150 */ 96, 96, 359, 0, 20, 332, 22, 334, 335, 449, + /* 160 */ 450, 4, 162, 163, 454, 455, 430, 33, 397, 35, + /* 170 */ 434, 365, 401, 380, 381, 404, 405, 406, 407, 408, + /* 180 */ 409, 181, 411, 183, 20, 414, 450, 416, 417, 418, + /* 190 */ 454, 455, 58, 422, 423, 20, 35, 63, 162, 163, + /* 200 */ 43, 48, 45, 46, 70, 96, 206, 207, 0, 209, /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 396, 96, - /* 230 */ 96, 98, 400, 327, 128, 403, 404, 405, 406, 407, - /* 240 */ 408, 429, 410, 20, 107, 433, 245, 415, 341, 417, - /* 250 */ 4, 167, 118, 421, 422, 12, 13, 14, 15, 16, - /* 260 */ 448, 449, 355, 108, 358, 453, 454, 133, 134, 127, - /* 270 */ 128, 364, 366, 4, 132, 443, 96, 371, 20, 373, - /* 280 */ 12, 13, 127, 128, 129, 130, 131, 132, 20, 43, - /* 290 */ 22, 45, 46, 327, 188, 189, 162, 163, 192, 335, - /* 300 */ 194, 33, 396, 35, 332, 21, 400, 335, 336, 403, - /* 310 */ 404, 405, 406, 407, 408, 181, 410, 183, 34, 96, - /* 320 */ 36, 415, 0, 417, 358, 0, 58, 421, 422, 373, - /* 330 */ 366, 63, 366, 246, 250, 251, 252, 371, 70, 373, - /* 340 */ 206, 207, 386, 209, 210, 211, 212, 213, 214, 215, + /* 220 */ 220, 221, 222, 223, 224, 225, 226, 227, 228, 21, + /* 230 */ 96, 70, 24, 25, 26, 27, 28, 29, 30, 31, + /* 240 */ 32, 65, 66, 67, 18, 0, 20, 58, 359, 73, + /* 250 */ 74, 367, 118, 27, 78, 366, 30, 336, 96, 33, + /* 260 */ 84, 85, 378, 336, 375, 107, 90, 133, 134, 370, + /* 270 */ 359, 350, 373, 374, 48, 351, 50, 350, 357, 53, + /* 280 */ 0, 12, 13, 359, 357, 96, 375, 98, 367, 20, + /* 290 */ 403, 22, 368, 336, 367, 333, 162, 163, 336, 337, + /* 300 */ 246, 246, 33, 20, 35, 22, 4, 350, 133, 134, + /* 310 */ 65, 66, 67, 96, 342, 181, 429, 183, 73, 74, + /* 320 */ 96, 95, 333, 78, 367, 336, 337, 58, 356, 84, + /* 330 */ 85, 20, 63, 107, 51, 90, 230, 365, 232, 70, + /* 340 */ 206, 207, 62, 209, 210, 211, 212, 213, 214, 215, /* 350 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 360 */ 226, 227, 396, 229, 96, 96, 400, 372, 373, 403, - /* 370 */ 404, 405, 406, 407, 408, 429, 410, 96, 245, 433, - /* 380 */ 358, 415, 96, 417, 62, 327, 118, 421, 422, 425, - /* 390 */ 426, 427, 335, 429, 430, 449, 374, 433, 432, 453, - /* 400 */ 454, 133, 134, 8, 9, 335, 127, 12, 13, 14, - /* 410 */ 15, 16, 448, 449, 12, 13, 14, 453, 454, 349, - /* 420 */ 162, 163, 20, 62, 22, 245, 356, 327, 14, 371, - /* 430 */ 162, 163, 375, 108, 20, 33, 366, 35, 402, 332, - /* 440 */ 8, 9, 335, 336, 12, 13, 14, 15, 16, 181, - /* 450 */ 20, 183, 127, 128, 129, 130, 131, 132, 358, 14, - /* 460 */ 58, 180, 58, 182, 428, 20, 366, 387, 245, 190, - /* 470 */ 191, 371, 70, 373, 206, 207, 44, 209, 210, 211, - /* 480 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 490 */ 222, 223, 224, 225, 226, 227, 396, 358, 96, 95, - /* 500 */ 400, 20, 98, 403, 404, 405, 406, 407, 408, 429, - /* 510 */ 410, 344, 345, 433, 245, 415, 358, 417, 108, 380, - /* 520 */ 118, 421, 422, 327, 366, 20, 245, 341, 448, 449, - /* 530 */ 33, 245, 432, 453, 454, 133, 134, 127, 128, 129, - /* 540 */ 130, 131, 132, 1, 2, 48, 335, 327, 12, 13, - /* 550 */ 364, 54, 55, 56, 57, 58, 20, 0, 22, 335, - /* 560 */ 349, 344, 345, 405, 162, 163, 176, 371, 173, 33, - /* 570 */ 20, 35, 0, 349, 8, 9, 162, 366, 12, 13, - /* 580 */ 14, 15, 16, 181, 402, 183, 20, 197, 198, 80, - /* 590 */ 366, 371, 95, 21, 58, 98, 24, 25, 26, 27, - /* 600 */ 28, 29, 30, 31, 32, 206, 70, 162, 206, 207, - /* 610 */ 428, 209, 210, 211, 212, 213, 214, 215, 216, 217, - /* 620 */ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - /* 630 */ 12, 13, 96, 3, 20, 335, 35, 8, 9, 97, - /* 640 */ 22, 12, 13, 14, 15, 16, 62, 138, 139, 349, - /* 650 */ 20, 33, 358, 35, 118, 256, 257, 258, 259, 260, - /* 660 */ 327, 367, 165, 166, 269, 168, 366, 2, 171, 133, - /* 670 */ 134, 70, 327, 8, 9, 339, 58, 12, 13, 14, - /* 680 */ 15, 16, 12, 13, 187, 14, 15, 16, 70, 353, - /* 690 */ 20, 229, 22, 65, 66, 67, 19, 361, 162, 163, - /* 700 */ 20, 73, 74, 33, 371, 35, 78, 335, 335, 152, - /* 710 */ 33, 0, 84, 85, 164, 161, 371, 181, 90, 183, - /* 720 */ 327, 349, 349, 327, 22, 48, 97, 97, 58, 20, - /* 730 */ 164, 54, 55, 56, 57, 58, 118, 35, 366, 366, - /* 740 */ 70, 413, 206, 207, 416, 209, 210, 211, 212, 213, - /* 750 */ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - /* 760 */ 224, 225, 226, 227, 371, 327, 96, 371, 359, 335, - /* 770 */ 350, 335, 95, 62, 70, 98, 350, 229, 358, 231, - /* 780 */ 18, 0, 20, 349, 358, 349, 232, 367, 118, 27, - /* 790 */ 327, 327, 30, 367, 164, 33, 242, 45, 46, 181, - /* 800 */ 366, 183, 366, 133, 134, 327, 327, 2, 131, 371, - /* 810 */ 48, 70, 50, 8, 9, 53, 327, 12, 13, 14, - /* 820 */ 15, 16, 8, 9, 206, 207, 12, 13, 14, 15, - /* 830 */ 16, 327, 162, 163, 371, 371, 218, 219, 220, 221, - /* 840 */ 222, 223, 224, 39, 164, 168, 65, 66, 67, 371, - /* 850 */ 371, 181, 339, 183, 73, 74, 327, 95, 0, 78, - /* 860 */ 371, 414, 185, 416, 187, 84, 85, 366, 414, 107, - /* 870 */ 416, 90, 3, 164, 361, 371, 206, 207, 377, 209, - /* 880 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 890 */ 220, 221, 222, 223, 224, 225, 226, 227, 351, 137, - /* 900 */ 371, 354, 140, 141, 142, 143, 144, 145, 146, 147, - /* 910 */ 148, 149, 150, 151, 152, 153, 154, 155, 156, 47, - /* 920 */ 158, 159, 160, 65, 66, 67, 68, 69, 335, 71, - /* 930 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - /* 940 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - /* 950 */ 92, 18, 327, 327, 20, 58, 23, 8, 9, 366, - /* 960 */ 22, 12, 13, 14, 15, 16, 360, 335, 96, 108, - /* 970 */ 37, 38, 368, 35, 41, 371, 335, 371, 164, 8, - /* 980 */ 9, 349, 327, 12, 13, 14, 15, 16, 366, 366, - /* 990 */ 349, 130, 59, 60, 61, 98, 371, 371, 366, 377, - /* 1000 */ 377, 368, 37, 44, 371, 399, 400, 366, 70, 327, - /* 1010 */ 335, 368, 63, 358, 371, 359, 410, 424, 425, 426, - /* 1020 */ 427, 366, 429, 430, 349, 346, 371, 348, 373, 96, - /* 1030 */ 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - /* 1040 */ 119, 366, 121, 122, 123, 124, 125, 126, 244, 351, - /* 1050 */ 327, 396, 354, 371, 105, 400, 118, 335, 403, 404, - /* 1060 */ 405, 406, 407, 408, 99, 410, 101, 102, 135, 104, - /* 1070 */ 415, 349, 417, 108, 327, 35, 421, 422, 335, 243, - /* 1080 */ 244, 335, 0, 335, 335, 335, 335, 432, 366, 42, - /* 1090 */ 107, 44, 349, 44, 371, 130, 162, 349, 349, 349, - /* 1100 */ 349, 42, 63, 44, 22, 358, 173, 174, 175, 366, - /* 1110 */ 161, 178, 366, 366, 366, 366, 366, 366, 371, 181, - /* 1120 */ 373, 183, 35, 100, 100, 335, 103, 103, 335, 196, - /* 1130 */ 133, 134, 199, 264, 201, 202, 203, 204, 205, 44, - /* 1140 */ 157, 44, 349, 396, 206, 207, 97, 400, 44, 391, - /* 1150 */ 403, 404, 405, 406, 407, 408, 366, 410, 0, 366, - /* 1160 */ 387, 327, 415, 100, 417, 44, 103, 100, 421, 422, - /* 1170 */ 103, 425, 426, 427, 0, 429, 430, 359, 245, 432, - /* 1180 */ 22, 232, 233, 234, 235, 236, 237, 238, 239, 240, - /* 1190 */ 241, 242, 358, 164, 97, 328, 22, 359, 169, 44, - /* 1200 */ 366, 97, 429, 359, 327, 371, 433, 373, 44, 44, - /* 1210 */ 359, 44, 44, 1, 2, 425, 426, 427, 97, 429, - /* 1220 */ 430, 448, 449, 183, 381, 266, 453, 454, 347, 457, - /* 1230 */ 396, 13, 327, 44, 400, 358, 44, 403, 404, 405, - /* 1240 */ 406, 407, 408, 366, 410, 206, 13, 0, 371, 415, - /* 1250 */ 373, 417, 97, 35, 44, 421, 422, 96, 35, 446, - /* 1260 */ 337, 97, 97, 358, 97, 97, 432, 106, 35, 440, - /* 1270 */ 183, 366, 44, 396, 358, 327, 371, 400, 373, 44, - /* 1280 */ 403, 404, 405, 406, 407, 408, 97, 410, 44, 97, - /* 1290 */ 44, 337, 415, 70, 417, 381, 49, 334, 421, 422, - /* 1300 */ 387, 396, 370, 381, 431, 400, 358, 97, 403, 404, - /* 1310 */ 405, 406, 407, 408, 366, 410, 450, 423, 434, 371, - /* 1320 */ 415, 373, 417, 247, 398, 97, 421, 422, 48, 179, - /* 1330 */ 387, 389, 97, 397, 42, 378, 20, 381, 378, 161, - /* 1340 */ 327, 97, 429, 97, 396, 376, 433, 20, 400, 335, - /* 1350 */ 335, 403, 404, 405, 406, 407, 408, 378, 410, 94, - /* 1360 */ 376, 448, 449, 268, 327, 417, 453, 454, 376, 421, - /* 1370 */ 422, 358, 429, 343, 20, 329, 433, 335, 335, 366, - /* 1380 */ 335, 329, 20, 327, 371, 341, 373, 393, 20, 373, - /* 1390 */ 336, 448, 449, 20, 341, 358, 453, 454, 388, 341, - /* 1400 */ 336, 341, 341, 366, 335, 52, 341, 341, 371, 396, - /* 1410 */ 373, 338, 338, 400, 358, 329, 403, 404, 405, 406, - /* 1420 */ 407, 408, 366, 410, 335, 195, 358, 371, 358, 373, - /* 1430 */ 417, 329, 381, 396, 421, 422, 327, 400, 358, 358, - /* 1440 */ 403, 404, 405, 406, 407, 408, 358, 410, 358, 358, - /* 1450 */ 358, 358, 396, 339, 358, 371, 400, 327, 358, 403, - /* 1460 */ 404, 405, 406, 407, 408, 371, 410, 358, 186, 392, - /* 1470 */ 395, 393, 373, 417, 339, 366, 335, 421, 422, 381, - /* 1480 */ 371, 371, 373, 371, 255, 254, 371, 439, 358, 384, - /* 1490 */ 384, 371, 455, 456, 439, 261, 366, 172, 248, 442, - /* 1500 */ 263, 371, 262, 373, 265, 396, 398, 244, 437, 400, - /* 1510 */ 327, 360, 403, 404, 405, 406, 407, 408, 409, 410, - /* 1520 */ 411, 412, 371, 438, 441, 270, 396, 267, 366, 20, - /* 1530 */ 400, 452, 335, 403, 404, 405, 406, 407, 408, 402, - /* 1540 */ 410, 358, 439, 436, 336, 339, 371, 384, 371, 366, - /* 1550 */ 399, 400, 401, 371, 371, 371, 373, 371, 371, 458, - /* 1560 */ 384, 410, 451, 327, 166, 339, 339, 382, 354, 366, - /* 1570 */ 96, 96, 420, 362, 444, 445, 371, 335, 36, 396, - /* 1580 */ 348, 330, 339, 400, 327, 329, 403, 404, 405, 406, - /* 1590 */ 407, 408, 390, 410, 358, 394, 325, 352, 385, 340, - /* 1600 */ 417, 385, 366, 0, 352, 422, 327, 371, 0, 373, - /* 1610 */ 352, 188, 0, 0, 42, 358, 0, 35, 200, 35, - /* 1620 */ 35, 35, 200, 366, 0, 35, 35, 200, 371, 0, - /* 1630 */ 373, 200, 396, 0, 35, 0, 400, 358, 0, 403, - /* 1640 */ 404, 405, 406, 407, 408, 366, 410, 22, 183, 35, - /* 1650 */ 371, 181, 373, 396, 0, 0, 176, 400, 177, 0, - /* 1660 */ 403, 404, 405, 406, 407, 408, 0, 410, 47, 0, - /* 1670 */ 0, 0, 327, 42, 0, 396, 0, 0, 0, 400, - /* 1680 */ 152, 445, 403, 404, 405, 406, 407, 408, 0, 410, - /* 1690 */ 4, 0, 327, 0, 0, 35, 0, 152, 0, 0, - /* 1700 */ 0, 0, 0, 358, 447, 19, 0, 0, 363, 0, - /* 1710 */ 0, 366, 0, 0, 0, 0, 371, 0, 373, 33, - /* 1720 */ 0, 42, 0, 358, 0, 0, 0, 0, 0, 0, - /* 1730 */ 22, 366, 0, 136, 48, 456, 371, 0, 373, 53, - /* 1740 */ 0, 396, 0, 58, 58, 400, 35, 327, 403, 404, - /* 1750 */ 405, 406, 407, 408, 0, 410, 0, 0, 39, 14, - /* 1760 */ 42, 396, 14, 327, 0, 400, 0, 44, 403, 404, - /* 1770 */ 405, 406, 407, 408, 58, 410, 40, 412, 358, 0, - /* 1780 */ 47, 95, 47, 363, 98, 47, 366, 0, 39, 39, - /* 1790 */ 172, 371, 0, 373, 358, 0, 0, 0, 64, 363, - /* 1800 */ 0, 48, 366, 35, 39, 0, 327, 371, 35, 373, - /* 1810 */ 39, 48, 0, 39, 0, 35, 396, 48, 35, 0, - /* 1820 */ 400, 39, 0, 403, 404, 405, 406, 407, 408, 48, - /* 1830 */ 410, 0, 396, 0, 103, 105, 400, 358, 35, 403, - /* 1840 */ 404, 405, 406, 407, 408, 366, 410, 22, 0, 327, - /* 1850 */ 371, 35, 373, 35, 44, 35, 22, 44, 35, 35, - /* 1860 */ 0, 35, 35, 22, 0, 327, 22, 50, 0, 22, - /* 1870 */ 35, 0, 0, 35, 35, 396, 0, 22, 20, 400, - /* 1880 */ 358, 35, 403, 404, 405, 406, 407, 408, 366, 410, - /* 1890 */ 193, 35, 0, 371, 96, 373, 358, 35, 97, 0, - /* 1900 */ 22, 0, 0, 164, 366, 184, 3, 164, 97, 371, - /* 1910 */ 166, 373, 249, 44, 44, 164, 327, 170, 396, 44, - /* 1920 */ 228, 169, 400, 44, 96, 403, 404, 405, 406, 407, - /* 1930 */ 408, 47, 410, 327, 396, 253, 96, 47, 400, 169, - /* 1940 */ 97, 403, 404, 405, 406, 407, 408, 358, 410, 97, - /* 1950 */ 96, 3, 249, 96, 44, 366, 97, 96, 35, 96, - /* 1960 */ 371, 35, 373, 97, 358, 35, 35, 35, 35, 47, - /* 1970 */ 97, 97, 366, 44, 97, 47, 0, 371, 0, 373, - /* 1980 */ 0, 96, 167, 97, 97, 396, 0, 96, 327, 400, - /* 1990 */ 249, 96, 403, 404, 405, 406, 407, 408, 243, 410, - /* 2000 */ 96, 39, 396, 96, 106, 47, 400, 327, 44, 403, - /* 2010 */ 404, 405, 406, 407, 408, 165, 410, 228, 230, 358, - /* 2020 */ 2, 228, 22, 96, 47, 22, 47, 366, 107, 35, - /* 2030 */ 96, 327, 371, 97, 373, 206, 35, 97, 358, 96, - /* 2040 */ 208, 97, 96, 96, 35, 96, 366, 97, 97, 96, - /* 2050 */ 96, 371, 97, 373, 97, 35, 96, 396, 97, 35, - /* 2060 */ 97, 400, 358, 96, 403, 404, 405, 406, 407, 408, - /* 2070 */ 366, 410, 35, 22, 108, 371, 396, 373, 96, 120, - /* 2080 */ 400, 96, 44, 403, 404, 405, 406, 407, 408, 327, - /* 2090 */ 410, 120, 120, 120, 96, 35, 22, 63, 96, 64, - /* 2100 */ 396, 35, 35, 35, 400, 327, 35, 403, 404, 405, - /* 2110 */ 406, 407, 408, 35, 410, 35, 35, 35, 35, 35, - /* 2120 */ 358, 93, 70, 44, 22, 35, 35, 35, 366, 22, - /* 2130 */ 35, 35, 35, 371, 70, 373, 358, 22, 35, 35, - /* 2140 */ 0, 35, 48, 35, 366, 35, 35, 35, 327, 371, - /* 2150 */ 0, 373, 39, 35, 0, 39, 35, 48, 396, 39, - /* 2160 */ 0, 35, 400, 39, 327, 403, 404, 405, 406, 407, - /* 2170 */ 408, 48, 410, 48, 396, 22, 35, 35, 400, 358, - /* 2180 */ 0, 403, 404, 405, 406, 407, 408, 366, 410, 0, - /* 2190 */ 21, 21, 371, 22, 373, 358, 22, 20, 459, 459, - /* 2200 */ 459, 459, 459, 366, 459, 459, 459, 327, 371, 459, - /* 2210 */ 373, 459, 459, 459, 459, 459, 459, 396, 459, 459, - /* 2220 */ 459, 400, 459, 327, 403, 404, 405, 406, 407, 408, - /* 2230 */ 459, 410, 459, 396, 459, 459, 459, 400, 358, 459, - /* 2240 */ 403, 404, 405, 406, 407, 408, 366, 410, 459, 459, - /* 2250 */ 459, 371, 459, 373, 358, 459, 459, 459, 459, 459, - /* 2260 */ 459, 459, 366, 459, 459, 459, 327, 371, 459, 373, - /* 2270 */ 459, 459, 459, 459, 459, 459, 396, 459, 459, 459, - /* 2280 */ 400, 459, 459, 403, 404, 405, 406, 407, 408, 459, - /* 2290 */ 410, 459, 396, 459, 459, 459, 400, 358, 459, 403, - /* 2300 */ 404, 405, 406, 407, 408, 366, 410, 459, 459, 459, - /* 2310 */ 371, 459, 373, 459, 459, 459, 459, 327, 459, 459, - /* 2320 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2330 */ 459, 459, 459, 459, 327, 396, 459, 459, 459, 400, - /* 2340 */ 459, 459, 403, 404, 405, 406, 407, 408, 358, 410, - /* 2350 */ 459, 459, 459, 459, 459, 459, 366, 459, 459, 459, - /* 2360 */ 327, 371, 459, 373, 459, 358, 459, 459, 459, 459, - /* 2370 */ 459, 459, 459, 366, 459, 459, 459, 459, 371, 459, - /* 2380 */ 373, 459, 459, 459, 459, 459, 396, 459, 459, 459, - /* 2390 */ 400, 358, 459, 403, 404, 405, 406, 407, 408, 366, - /* 2400 */ 410, 459, 459, 396, 371, 459, 373, 400, 459, 459, - /* 2410 */ 403, 404, 405, 406, 407, 408, 327, 410, 459, 459, - /* 2420 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 396, - /* 2430 */ 459, 459, 327, 400, 459, 459, 403, 404, 405, 406, - /* 2440 */ 407, 408, 459, 410, 459, 459, 459, 358, 459, 459, - /* 2450 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 459, - /* 2460 */ 371, 459, 373, 358, 459, 459, 459, 459, 459, 459, - /* 2470 */ 459, 366, 459, 459, 459, 459, 371, 459, 373, 459, - /* 2480 */ 459, 459, 459, 459, 459, 396, 327, 459, 459, 400, - /* 2490 */ 459, 459, 403, 404, 405, 406, 407, 408, 459, 410, - /* 2500 */ 459, 396, 327, 459, 459, 400, 459, 459, 403, 404, - /* 2510 */ 405, 406, 407, 408, 459, 410, 459, 358, 459, 459, - /* 2520 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 459, - /* 2530 */ 371, 459, 373, 358, 459, 459, 459, 459, 459, 459, - /* 2540 */ 459, 366, 459, 459, 459, 459, 371, 459, 373, 459, - /* 2550 */ 459, 459, 459, 459, 459, 396, 459, 459, 459, 400, - /* 2560 */ 459, 459, 403, 404, 405, 406, 407, 408, 459, 410, - /* 2570 */ 459, 396, 459, 459, 459, 400, 459, 459, 403, 404, - /* 2580 */ 405, 406, 407, 408, 459, 410, + /* 360 */ 226, 227, 228, 137, 230, 96, 140, 141, 142, 143, + /* 370 */ 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + /* 380 */ 154, 155, 156, 70, 158, 159, 160, 118, 8, 9, + /* 390 */ 328, 127, 12, 13, 14, 15, 16, 33, 96, 20, + /* 400 */ 20, 22, 133, 134, 180, 128, 182, 359, 246, 325, + /* 410 */ 63, 21, 48, 336, 35, 12, 13, 14, 54, 55, + /* 420 */ 56, 57, 58, 20, 34, 22, 36, 345, 346, 381, + /* 430 */ 51, 162, 163, 336, 372, 246, 33, 336, 35, 352, + /* 440 */ 8, 9, 355, 336, 12, 13, 14, 15, 16, 206, + /* 450 */ 181, 350, 183, 376, 190, 191, 167, 350, 80, 95, + /* 460 */ 0, 58, 98, 246, 367, 188, 189, 20, 367, 192, + /* 470 */ 246, 194, 388, 70, 367, 206, 207, 230, 209, 210, + /* 480 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + /* 490 */ 221, 222, 223, 224, 225, 226, 227, 228, 176, 96, + /* 500 */ 257, 258, 259, 260, 261, 8, 9, 70, 328, 12, + /* 510 */ 13, 14, 15, 16, 430, 367, 138, 139, 434, 197, + /* 520 */ 198, 118, 425, 426, 427, 428, 378, 430, 431, 165, + /* 530 */ 166, 336, 168, 449, 450, 171, 133, 134, 454, 455, + /* 540 */ 251, 252, 253, 360, 164, 350, 336, 359, 246, 12, + /* 550 */ 13, 187, 372, 206, 4, 367, 351, 20, 0, 22, + /* 560 */ 63, 415, 367, 417, 359, 162, 163, 161, 108, 19, + /* 570 */ 33, 340, 35, 368, 8, 9, 4, 367, 12, 13, + /* 580 */ 14, 15, 16, 33, 181, 354, 183, 127, 128, 129, + /* 590 */ 130, 131, 132, 362, 406, 58, 127, 128, 48, 1, + /* 600 */ 2, 132, 105, 53, 360, 173, 403, 70, 58, 206, + /* 610 */ 207, 164, 209, 210, 211, 212, 213, 214, 215, 216, + /* 620 */ 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + /* 630 */ 227, 228, 429, 96, 328, 328, 426, 427, 428, 233, + /* 640 */ 430, 431, 345, 346, 434, 95, 8, 9, 98, 243, + /* 650 */ 12, 13, 14, 15, 16, 118, 45, 46, 161, 449, + /* 660 */ 450, 360, 2, 97, 454, 455, 108, 336, 8, 9, + /* 670 */ 133, 134, 12, 13, 14, 15, 16, 328, 372, 372, + /* 680 */ 328, 350, 44, 12, 13, 127, 128, 129, 130, 131, + /* 690 */ 132, 20, 20, 22, 3, 97, 373, 374, 367, 162, + /* 700 */ 163, 14, 270, 2, 33, 58, 35, 20, 367, 8, + /* 710 */ 9, 20, 392, 12, 13, 14, 15, 16, 181, 378, + /* 720 */ 183, 372, 14, 414, 372, 0, 417, 360, 20, 58, + /* 730 */ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + /* 740 */ 243, 70, 95, 206, 207, 98, 209, 210, 211, 212, + /* 750 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + /* 760 */ 223, 224, 225, 226, 227, 228, 328, 96, 109, 110, + /* 770 */ 111, 112, 113, 114, 115, 116, 117, 118, 119, 22, + /* 780 */ 121, 122, 123, 124, 125, 126, 37, 62, 97, 118, + /* 790 */ 8, 9, 35, 19, 12, 13, 14, 15, 16, 374, + /* 800 */ 328, 388, 340, 108, 133, 134, 361, 33, 20, 415, + /* 810 */ 372, 417, 387, 3, 328, 328, 328, 372, 108, 247, + /* 820 */ 328, 328, 48, 369, 362, 130, 372, 70, 54, 55, + /* 830 */ 56, 57, 58, 162, 163, 0, 164, 127, 128, 129, + /* 840 */ 130, 131, 132, 430, 372, 400, 401, 434, 99, 162, + /* 850 */ 101, 102, 181, 104, 183, 164, 411, 108, 372, 372, + /* 860 */ 372, 20, 449, 450, 372, 372, 39, 454, 455, 95, + /* 870 */ 162, 369, 98, 369, 372, 118, 372, 206, 207, 130, + /* 880 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + /* 890 */ 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + /* 900 */ 65, 66, 67, 68, 69, 131, 71, 72, 73, 74, + /* 910 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + /* 920 */ 85, 86, 87, 88, 89, 90, 91, 92, 18, 328, + /* 930 */ 328, 360, 359, 23, 328, 0, 328, 328, 181, 44, + /* 940 */ 183, 368, 168, 347, 361, 349, 164, 37, 38, 361, + /* 950 */ 0, 41, 164, 244, 245, 372, 328, 133, 134, 185, + /* 960 */ 372, 187, 336, 206, 207, 336, 42, 359, 44, 59, + /* 970 */ 60, 61, 22, 372, 372, 367, 350, 336, 372, 328, + /* 980 */ 372, 372, 374, 400, 401, 402, 329, 359, 400, 401, + /* 990 */ 402, 350, 97, 367, 411, 367, 367, 336, 328, 411, + /* 1000 */ 372, 352, 374, 162, 355, 397, 96, 388, 367, 401, + /* 1010 */ 336, 350, 404, 405, 406, 407, 408, 409, 100, 411, + /* 1020 */ 42, 103, 44, 372, 416, 397, 418, 107, 367, 401, + /* 1030 */ 422, 423, 404, 405, 406, 407, 408, 409, 44, 411, + /* 1040 */ 336, 367, 372, 0, 416, 135, 418, 328, 336, 430, + /* 1050 */ 422, 423, 444, 434, 350, 426, 427, 428, 44, 430, + /* 1060 */ 431, 433, 350, 22, 348, 22, 336, 336, 449, 450, + /* 1070 */ 382, 367, 245, 454, 455, 265, 35, 157, 359, 367, + /* 1080 */ 350, 350, 58, 173, 174, 175, 367, 152, 178, 100, + /* 1090 */ 328, 372, 103, 374, 1, 2, 100, 367, 367, 103, + /* 1100 */ 426, 427, 428, 360, 430, 431, 196, 100, 44, 199, + /* 1110 */ 103, 201, 202, 203, 204, 205, 397, 336, 35, 35, + /* 1120 */ 401, 359, 98, 404, 405, 406, 407, 408, 409, 367, + /* 1130 */ 411, 350, 0, 328, 372, 416, 374, 418, 44, 8, + /* 1140 */ 9, 422, 423, 12, 13, 14, 15, 16, 367, 47, + /* 1150 */ 164, 458, 433, 447, 22, 169, 246, 338, 441, 397, + /* 1160 */ 359, 97, 382, 401, 359, 96, 404, 405, 406, 407, + /* 1170 */ 408, 409, 367, 411, 336, 106, 382, 372, 416, 374, + /* 1180 */ 418, 44, 44, 338, 422, 423, 44, 336, 350, 335, + /* 1190 */ 388, 97, 44, 336, 336, 433, 371, 44, 96, 432, + /* 1200 */ 44, 350, 397, 451, 435, 367, 401, 350, 350, 404, + /* 1210 */ 405, 406, 407, 408, 409, 328, 411, 336, 367, 12, + /* 1220 */ 13, 416, 44, 418, 367, 367, 44, 422, 423, 22, + /* 1230 */ 44, 350, 430, 44, 97, 97, 434, 44, 433, 97, + /* 1240 */ 33, 35, 35, 248, 424, 97, 359, 44, 367, 13, + /* 1250 */ 97, 449, 450, 97, 367, 44, 454, 455, 0, 372, + /* 1260 */ 13, 374, 399, 269, 48, 58, 183, 183, 398, 179, + /* 1270 */ 390, 35, 42, 379, 20, 97, 70, 70, 382, 97, + /* 1280 */ 328, 267, 35, 97, 397, 379, 97, 161, 401, 377, + /* 1290 */ 97, 404, 405, 406, 407, 408, 409, 20, 411, 336, + /* 1300 */ 97, 336, 379, 416, 328, 418, 377, 49, 97, 422, + /* 1310 */ 423, 359, 94, 377, 344, 336, 336, 336, 20, 367, + /* 1320 */ 433, 330, 330, 20, 372, 118, 374, 394, 374, 342, + /* 1330 */ 342, 20, 20, 389, 337, 359, 337, 336, 52, 330, + /* 1340 */ 342, 359, 342, 367, 342, 342, 342, 339, 372, 397, + /* 1350 */ 374, 339, 359, 401, 336, 330, 404, 405, 406, 407, + /* 1360 */ 408, 409, 372, 411, 328, 359, 195, 396, 416, 359, + /* 1370 */ 418, 394, 359, 397, 422, 423, 359, 401, 359, 359, + /* 1380 */ 404, 405, 406, 407, 408, 409, 359, 411, 181, 359, + /* 1390 */ 183, 359, 416, 372, 418, 359, 340, 374, 422, 423, + /* 1400 */ 186, 340, 336, 367, 393, 256, 372, 328, 372, 440, + /* 1410 */ 374, 382, 255, 206, 207, 382, 385, 372, 372, 372, + /* 1420 */ 385, 262, 172, 440, 440, 264, 219, 220, 221, 222, + /* 1430 */ 223, 224, 225, 397, 249, 328, 263, 401, 359, 399, + /* 1440 */ 404, 405, 406, 407, 408, 409, 367, 411, 443, 268, + /* 1450 */ 271, 372, 416, 374, 418, 439, 266, 442, 422, 423, + /* 1460 */ 438, 20, 367, 437, 245, 403, 359, 337, 340, 336, + /* 1470 */ 385, 372, 372, 372, 367, 372, 397, 372, 372, 372, + /* 1480 */ 401, 374, 385, 404, 405, 406, 407, 408, 409, 166, + /* 1490 */ 411, 453, 328, 383, 452, 340, 459, 418, 355, 96, + /* 1500 */ 340, 422, 423, 367, 397, 96, 372, 421, 401, 363, + /* 1510 */ 336, 404, 405, 406, 407, 408, 409, 349, 411, 36, + /* 1520 */ 340, 326, 331, 359, 330, 418, 391, 386, 353, 422, + /* 1530 */ 423, 367, 188, 386, 395, 0, 372, 353, 374, 341, + /* 1540 */ 353, 0, 0, 0, 42, 328, 0, 35, 200, 35, + /* 1550 */ 35, 35, 200, 0, 35, 35, 200, 0, 200, 0, + /* 1560 */ 35, 397, 0, 0, 35, 401, 22, 328, 404, 405, + /* 1570 */ 406, 407, 408, 409, 183, 411, 359, 181, 0, 0, + /* 1580 */ 0, 176, 418, 177, 367, 0, 422, 423, 0, 372, + /* 1590 */ 0, 374, 47, 0, 42, 0, 0, 0, 359, 0, + /* 1600 */ 0, 0, 0, 0, 152, 35, 367, 152, 0, 0, + /* 1610 */ 0, 372, 0, 374, 397, 0, 0, 0, 401, 0, + /* 1620 */ 328, 404, 405, 406, 407, 408, 409, 410, 411, 412, + /* 1630 */ 413, 0, 0, 0, 0, 0, 397, 0, 0, 0, + /* 1640 */ 401, 0, 0, 404, 405, 406, 407, 408, 409, 0, + /* 1650 */ 411, 359, 0, 42, 0, 0, 0, 0, 22, 367, + /* 1660 */ 136, 0, 0, 35, 372, 42, 374, 0, 0, 0, + /* 1670 */ 0, 58, 58, 44, 47, 0, 0, 328, 14, 39, + /* 1680 */ 14, 0, 0, 172, 445, 446, 40, 39, 0, 397, + /* 1690 */ 47, 47, 39, 401, 0, 0, 404, 405, 406, 407, + /* 1700 */ 408, 409, 0, 411, 0, 0, 35, 48, 359, 64, + /* 1710 */ 0, 39, 35, 0, 35, 0, 367, 39, 35, 0, + /* 1720 */ 0, 372, 48, 374, 39, 0, 39, 105, 48, 103, + /* 1730 */ 22, 35, 328, 0, 48, 35, 35, 44, 35, 22, + /* 1740 */ 0, 35, 44, 22, 35, 0, 397, 35, 456, 457, + /* 1750 */ 401, 35, 22, 404, 405, 406, 407, 408, 409, 0, + /* 1760 */ 411, 50, 35, 359, 22, 0, 35, 418, 0, 35, + /* 1770 */ 0, 367, 423, 22, 20, 328, 372, 193, 374, 35, + /* 1780 */ 96, 35, 0, 35, 164, 0, 97, 166, 184, 22, + /* 1790 */ 0, 0, 3, 44, 164, 328, 97, 250, 229, 44, + /* 1800 */ 44, 397, 254, 96, 47, 401, 359, 47, 404, 405, + /* 1810 */ 406, 407, 408, 409, 367, 411, 44, 170, 250, 372, + /* 1820 */ 96, 374, 164, 97, 3, 97, 359, 44, 96, 169, + /* 1830 */ 35, 96, 169, 96, 367, 97, 97, 96, 35, 372, + /* 1840 */ 97, 374, 250, 35, 397, 35, 35, 35, 401, 97, + /* 1850 */ 446, 404, 405, 406, 407, 408, 409, 44, 411, 97, + /* 1860 */ 328, 47, 244, 47, 397, 0, 0, 0, 401, 96, + /* 1870 */ 96, 404, 405, 406, 407, 408, 409, 97, 411, 0, + /* 1880 */ 39, 97, 96, 96, 96, 167, 47, 106, 165, 44, + /* 1890 */ 2, 359, 22, 96, 96, 448, 364, 97, 206, 367, + /* 1900 */ 47, 97, 229, 96, 372, 96, 374, 47, 22, 107, + /* 1910 */ 35, 328, 97, 96, 120, 97, 96, 35, 35, 97, + /* 1920 */ 229, 231, 208, 96, 457, 97, 96, 35, 97, 397, + /* 1930 */ 96, 35, 96, 401, 97, 328, 404, 405, 406, 407, + /* 1940 */ 408, 409, 359, 411, 97, 35, 96, 44, 22, 120, + /* 1950 */ 367, 108, 120, 120, 96, 372, 35, 374, 96, 96, + /* 1960 */ 22, 64, 63, 35, 35, 35, 359, 35, 35, 35, + /* 1970 */ 35, 364, 35, 93, 367, 35, 35, 70, 35, 372, + /* 1980 */ 397, 374, 35, 44, 401, 22, 35, 404, 405, 406, + /* 1990 */ 407, 408, 409, 328, 411, 22, 413, 35, 22, 35, + /* 2000 */ 35, 70, 35, 35, 397, 35, 35, 35, 401, 35, + /* 2010 */ 0, 404, 405, 406, 407, 408, 409, 35, 411, 0, + /* 2020 */ 39, 35, 39, 48, 359, 48, 0, 35, 39, 364, + /* 2030 */ 0, 35, 367, 48, 39, 48, 0, 372, 35, 374, + /* 2040 */ 35, 0, 22, 21, 460, 22, 22, 460, 21, 20, + /* 2050 */ 328, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2060 */ 460, 460, 397, 460, 460, 460, 401, 460, 460, 404, + /* 2070 */ 405, 406, 407, 408, 409, 460, 411, 460, 328, 460, + /* 2080 */ 460, 359, 460, 460, 460, 460, 460, 460, 460, 367, + /* 2090 */ 460, 460, 460, 460, 372, 460, 374, 460, 460, 460, + /* 2100 */ 460, 460, 460, 460, 328, 460, 460, 460, 460, 359, + /* 2110 */ 460, 460, 460, 460, 460, 460, 460, 367, 460, 397, + /* 2120 */ 460, 460, 372, 401, 374, 460, 404, 405, 406, 407, + /* 2130 */ 408, 409, 460, 411, 460, 359, 460, 460, 460, 460, + /* 2140 */ 460, 460, 460, 367, 460, 460, 460, 397, 372, 460, + /* 2150 */ 374, 401, 460, 460, 404, 405, 406, 407, 408, 409, + /* 2160 */ 460, 411, 460, 328, 460, 460, 460, 460, 460, 460, + /* 2170 */ 460, 460, 460, 397, 460, 460, 460, 401, 460, 328, + /* 2180 */ 404, 405, 406, 407, 408, 409, 460, 411, 460, 460, + /* 2190 */ 460, 460, 460, 460, 359, 460, 460, 460, 460, 460, + /* 2200 */ 460, 460, 367, 460, 460, 460, 460, 372, 460, 374, + /* 2210 */ 359, 460, 460, 460, 460, 460, 460, 460, 367, 460, + /* 2220 */ 460, 460, 460, 372, 460, 374, 460, 460, 460, 460, + /* 2230 */ 460, 460, 397, 328, 460, 460, 401, 460, 460, 404, + /* 2240 */ 405, 406, 407, 408, 409, 460, 411, 460, 397, 460, + /* 2250 */ 460, 460, 401, 328, 460, 404, 405, 406, 407, 408, + /* 2260 */ 409, 460, 411, 460, 359, 460, 460, 460, 460, 460, + /* 2270 */ 460, 460, 367, 460, 460, 460, 460, 372, 460, 374, + /* 2280 */ 460, 460, 460, 460, 359, 460, 460, 460, 460, 460, + /* 2290 */ 460, 460, 367, 460, 460, 460, 460, 372, 460, 374, + /* 2300 */ 460, 460, 397, 460, 460, 460, 401, 460, 328, 404, + /* 2310 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 460, + /* 2320 */ 460, 460, 397, 460, 460, 328, 401, 460, 460, 404, + /* 2330 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 359, + /* 2340 */ 460, 460, 460, 460, 460, 460, 460, 367, 460, 460, + /* 2350 */ 460, 460, 372, 460, 374, 460, 359, 460, 460, 460, + /* 2360 */ 460, 460, 460, 460, 367, 460, 460, 460, 328, 372, + /* 2370 */ 460, 374, 460, 460, 460, 460, 460, 397, 460, 460, + /* 2380 */ 460, 401, 460, 460, 404, 405, 406, 407, 408, 409, + /* 2390 */ 460, 411, 460, 460, 397, 460, 460, 460, 401, 359, + /* 2400 */ 460, 404, 405, 406, 407, 408, 409, 367, 411, 460, + /* 2410 */ 460, 460, 372, 460, 374, 460, 460, 460, 460, 460, + /* 2420 */ 460, 460, 460, 328, 460, 460, 460, 460, 460, 460, + /* 2430 */ 460, 460, 460, 460, 460, 460, 460, 397, 460, 460, + /* 2440 */ 460, 401, 460, 460, 404, 405, 406, 407, 408, 409, + /* 2450 */ 460, 411, 460, 460, 359, 460, 460, 460, 460, 460, + /* 2460 */ 460, 460, 367, 460, 460, 460, 460, 372, 460, 374, + /* 2470 */ 460, 460, 460, 460, 460, 460, 328, 460, 460, 460, + /* 2480 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2490 */ 460, 460, 397, 460, 460, 460, 401, 460, 460, 404, + /* 2500 */ 405, 406, 407, 408, 409, 460, 411, 359, 460, 460, + /* 2510 */ 460, 460, 460, 460, 460, 367, 460, 460, 460, 460, + /* 2520 */ 372, 460, 374, 460, 460, 460, 460, 460, 460, 460, + /* 2530 */ 460, 328, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2540 */ 460, 460, 460, 460, 460, 397, 460, 328, 460, 401, + /* 2550 */ 460, 460, 404, 405, 406, 407, 408, 409, 460, 411, + /* 2560 */ 460, 460, 359, 460, 460, 460, 460, 460, 460, 460, + /* 2570 */ 367, 460, 460, 460, 460, 372, 460, 374, 359, 460, + /* 2580 */ 460, 460, 460, 460, 460, 460, 367, 460, 460, 460, + /* 2590 */ 460, 372, 460, 374, 460, 460, 460, 460, 460, 460, + /* 2600 */ 397, 328, 460, 460, 401, 460, 460, 404, 405, 406, + /* 2610 */ 407, 408, 409, 460, 411, 460, 397, 460, 460, 460, + /* 2620 */ 401, 328, 460, 404, 405, 406, 407, 408, 409, 460, + /* 2630 */ 411, 460, 359, 460, 460, 460, 460, 460, 460, 460, + /* 2640 */ 367, 460, 460, 460, 460, 372, 460, 374, 460, 460, + /* 2650 */ 460, 460, 359, 460, 460, 460, 460, 460, 460, 460, + /* 2660 */ 367, 460, 460, 460, 460, 372, 460, 374, 460, 460, + /* 2670 */ 397, 460, 460, 460, 401, 460, 328, 404, 405, 406, + /* 2680 */ 407, 408, 409, 460, 411, 460, 460, 460, 460, 460, + /* 2690 */ 397, 460, 460, 328, 401, 460, 460, 404, 405, 406, + /* 2700 */ 407, 408, 409, 460, 411, 460, 460, 359, 460, 460, + /* 2710 */ 460, 460, 460, 460, 460, 367, 460, 460, 460, 460, + /* 2720 */ 372, 460, 374, 460, 359, 460, 460, 460, 460, 460, + /* 2730 */ 460, 460, 367, 460, 460, 460, 328, 372, 460, 374, + /* 2740 */ 460, 460, 460, 460, 460, 397, 460, 460, 460, 401, + /* 2750 */ 460, 460, 404, 405, 406, 407, 408, 409, 460, 411, + /* 2760 */ 460, 460, 397, 460, 460, 460, 401, 359, 460, 404, + /* 2770 */ 405, 406, 407, 408, 409, 367, 411, 460, 460, 460, + /* 2780 */ 372, 460, 374, 460, 460, 460, 460, 460, 460, 460, + /* 2790 */ 460, 328, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2800 */ 460, 460, 460, 460, 460, 397, 460, 460, 460, 401, + /* 2810 */ 460, 460, 404, 405, 406, 407, 408, 409, 460, 411, + /* 2820 */ 460, 460, 359, 460, 460, 460, 460, 460, 460, 460, + /* 2830 */ 367, 460, 460, 460, 460, 372, 460, 374, 460, 460, + /* 2840 */ 460, 460, 460, 460, 328, 460, 460, 460, 460, 460, + /* 2850 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2860 */ 397, 460, 460, 460, 401, 460, 460, 404, 405, 406, + /* 2870 */ 407, 408, 409, 460, 411, 359, 460, 460, 460, 460, + /* 2880 */ 460, 460, 460, 367, 460, 460, 460, 460, 372, 460, + /* 2890 */ 374, 460, 460, 460, 460, 460, 460, 460, 460, 328, + /* 2900 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2910 */ 460, 460, 460, 397, 460, 460, 460, 401, 460, 460, + /* 2920 */ 404, 405, 406, 407, 408, 409, 460, 411, 460, 460, + /* 2930 */ 359, 460, 460, 460, 460, 460, 460, 460, 367, 460, + /* 2940 */ 460, 460, 460, 372, 460, 374, 460, 460, 460, 460, + /* 2950 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2960 */ 460, 460, 460, 460, 460, 460, 460, 460, 397, 460, + /* 2970 */ 460, 460, 401, 460, 460, 404, 405, 406, 407, 408, + /* 2980 */ 409, 460, 411, 325, 325, 325, 325, 325, 325, 325, + /* 2990 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3000 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3010 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3020 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3030 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3040 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3050 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3060 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3070 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3080 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3090 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3100 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3110 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3120 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3130 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3140 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3150 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3160 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3170 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3180 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3190 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3200 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3210 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3220 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3230 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3240 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3250 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3260 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3270 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3280 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3290 */ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, + /* 3300 */ 325, 325, 325, 325, 325, 325, 325, 325, }; #define YY_SHIFT_COUNT (714) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2189) +#define YY_SHIFT_MAX (2041) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 933, 0, 134, 0, 268, 268, 268, 268, 268, 268, - /* 10 */ 268, 268, 268, 268, 268, 402, 536, 536, 670, 536, - /* 20 */ 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, - /* 30 */ 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, - /* 40 */ 536, 536, 536, 536, 536, 536, 536, 536, 180, 223, - /* 50 */ 39, 281, 133, 1, 286, 1, 39, 39, 618, 618, - /* 60 */ 1, 618, 618, 269, 1, 188, 188, 246, 246, 258, - /* 70 */ 18, 42, 42, 188, 188, 188, 188, 188, 188, 188, - /* 80 */ 188, 188, 188, 361, 188, 188, 430, 188, 481, 188, - /* 90 */ 188, 505, 188, 188, 505, 188, 505, 505, 505, 188, - /* 100 */ 584, 762, 949, 949, 96, 628, 938, 938, 938, 938, - /* 110 */ 938, 938, 938, 938, 938, 938, 938, 938, 938, 938, - /* 120 */ 938, 938, 938, 938, 938, 965, 630, 258, 18, 322, - /* 130 */ 601, 550, 550, 550, 711, 548, 548, 601, 614, 614, - /* 140 */ 614, 137, 481, 462, 505, 704, 505, 704, 704, 137, - /* 150 */ 741, 921, 921, 921, 921, 921, 921, 921, 677, 572, - /* 160 */ 781, 566, 395, 399, 151, 84, 414, 445, 144, 680, - /* 170 */ 752, 861, 709, 836, 804, 869, 836, 1047, 87, 934, - /* 180 */ 1076, 1280, 1150, 1292, 1316, 1292, 1178, 1327, 1327, 1292, - /* 190 */ 1178, 1178, 1265, 1327, 1327, 1327, 1354, 1354, 1362, 361, - /* 200 */ 481, 361, 1368, 1373, 361, 1368, 361, 361, 361, 1327, - /* 210 */ 361, 1353, 1353, 1354, 505, 505, 505, 505, 505, 505, - /* 220 */ 505, 505, 505, 505, 505, 1327, 1354, 704, 704, 1230, - /* 230 */ 1362, 584, 1282, 481, 584, 1327, 1316, 1316, 704, 1229, - /* 240 */ 1231, 704, 1229, 1231, 704, 704, 505, 1234, 1325, 1229, - /* 250 */ 1237, 1240, 1250, 1076, 1255, 1260, 1239, 1263, 614, 1509, - /* 260 */ 1327, 1368, 584, 1231, 704, 704, 704, 704, 704, 1231, - /* 270 */ 704, 1398, 584, 137, 584, 614, 1474, 1475, 704, 741, - /* 280 */ 1327, 584, 1542, 1354, 2586, 2586, 2586, 2586, 2586, 2586, - /* 290 */ 2586, 2586, 2586, 858, 497, 23, 1686, 52, 432, 629, - /* 300 */ 155, 665, 805, 814, 325, 971, 971, 971, 971, 971, - /* 310 */ 971, 971, 971, 971, 410, 106, 243, 243, 390, 404, - /* 320 */ 509, 284, 279, 142, 142, 671, 542, 554, 671, 671, - /* 330 */ 671, 1049, 148, 702, 1059, 983, 557, 1023, 1024, 1063, - /* 340 */ 1067, 1082, 1158, 1174, 897, 1097, 1104, 997, 959, 1095, - /* 350 */ 1029, 1121, 1155, 1164, 1165, 1167, 1212, 1168, 1040, 1087, - /* 360 */ 1039, 1189, 872, 1192, 1210, 1228, 1235, 1244, 1246, 1161, - /* 370 */ 1218, 1233, 1223, 1247, 1603, 1608, 1423, 1612, 1613, 1572, - /* 380 */ 1616, 1582, 1418, 1584, 1585, 1586, 1422, 1624, 1590, 1591, - /* 390 */ 1427, 1629, 1431, 1633, 1599, 1635, 1625, 1638, 1614, 1465, - /* 400 */ 1470, 1654, 1655, 1481, 1480, 1659, 1666, 1621, 1669, 1670, - /* 410 */ 1671, 1631, 1674, 1676, 1677, 1678, 1688, 1691, 1693, 1694, - /* 420 */ 1528, 1660, 1696, 1545, 1698, 1699, 1700, 1701, 1702, 1706, - /* 430 */ 1707, 1709, 1710, 1712, 1713, 1714, 1715, 1717, 1720, 1679, - /* 440 */ 1722, 1724, 1725, 1726, 1727, 1708, 1728, 1729, 1732, 1597, - /* 450 */ 1737, 1740, 1711, 1742, 1685, 1754, 1716, 1756, 1757, 1718, - /* 460 */ 1719, 1723, 1733, 1745, 1735, 1748, 1738, 1764, 1736, 1749, - /* 470 */ 1766, 1779, 1787, 1750, 1618, 1792, 1795, 1796, 1734, 1797, - /* 480 */ 1800, 1768, 1753, 1765, 1805, 1773, 1763, 1771, 1812, 1780, - /* 490 */ 1769, 1774, 1814, 1783, 1781, 1782, 1819, 1822, 1831, 1833, - /* 500 */ 1730, 1731, 1803, 1825, 1848, 1816, 1818, 1820, 1823, 1810, - /* 510 */ 1813, 1824, 1826, 1834, 1827, 1860, 1841, 1864, 1844, 1817, - /* 520 */ 1868, 1847, 1835, 1871, 1838, 1872, 1839, 1876, 1855, 1858, - /* 530 */ 1846, 1856, 1697, 1801, 1798, 1892, 1739, 1862, 1899, 1721, - /* 540 */ 1878, 1743, 1744, 1901, 1902, 1751, 1747, 1903, 1869, 1663, - /* 550 */ 1828, 1811, 1840, 1752, 1692, 1770, 1682, 1843, 1870, 1852, - /* 560 */ 1854, 1857, 1861, 1859, 1875, 1884, 1890, 1863, 1879, 1703, - /* 570 */ 1866, 1873, 1948, 1910, 1741, 1923, 1926, 1930, 1931, 1932, - /* 580 */ 1933, 1874, 1877, 1922, 1755, 1929, 1928, 1976, 1978, 1980, - /* 590 */ 1885, 1886, 1887, 1891, 1895, 1815, 1904, 1986, 1962, 1850, - /* 600 */ 1907, 1898, 1733, 1958, 1964, 1789, 1788, 1793, 2018, 2000, - /* 610 */ 1829, 1927, 1936, 1934, 1940, 1943, 1944, 1977, 1946, 1947, - /* 620 */ 1979, 1950, 2003, 1832, 1949, 1921, 1951, 1994, 2001, 1953, - /* 630 */ 1955, 2009, 1954, 1957, 2020, 1960, 1961, 2024, 1967, 1963, - /* 640 */ 2037, 1982, 1959, 1971, 1972, 1973, 2051, 1966, 1985, 2038, - /* 650 */ 1998, 2060, 2002, 2038, 2038, 2074, 2035, 2034, 2066, 2067, - /* 660 */ 2068, 2071, 2078, 2080, 2081, 2082, 2083, 2084, 2052, 2028, - /* 670 */ 2079, 2090, 2091, 2102, 2092, 2107, 2095, 2096, 2097, 2064, - /* 680 */ 1810, 2103, 1813, 2104, 2106, 2108, 2110, 2115, 2111, 2140, - /* 690 */ 2112, 2094, 2113, 2150, 2118, 2109, 2116, 2154, 2121, 2123, - /* 700 */ 2120, 2160, 2126, 2125, 2124, 2180, 2141, 2142, 2189, 2153, - /* 710 */ 2169, 2171, 2174, 2170, 2177, + /* 0 */ 910, 0, 134, 0, 269, 269, 269, 269, 269, 269, + /* 10 */ 269, 269, 269, 269, 269, 403, 537, 537, 671, 537, + /* 20 */ 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + /* 30 */ 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + /* 40 */ 537, 537, 537, 537, 537, 537, 537, 537, 54, 55, + /* 50 */ 109, 224, 189, 162, 217, 162, 109, 109, 1207, 1207, + /* 60 */ 162, 1207, 1207, 302, 162, 14, 14, 157, 157, 36, + /* 70 */ 175, 18, 18, 14, 14, 14, 14, 14, 14, 14, + /* 80 */ 14, 14, 14, 25, 14, 14, 42, 14, 73, 14, + /* 90 */ 14, 164, 14, 14, 164, 14, 164, 164, 164, 14, + /* 100 */ 57, 226, 497, 497, 96, 176, 757, 757, 757, 757, + /* 110 */ 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, + /* 120 */ 757, 757, 757, 757, 757, 749, 691, 36, 175, 280, + /* 130 */ 161, 447, 447, 447, 725, 106, 106, 161, 311, 311, + /* 140 */ 311, 158, 73, 247, 164, 313, 164, 313, 313, 158, + /* 150 */ 437, 659, 659, 659, 659, 659, 659, 659, 774, 208, + /* 160 */ 245, 380, 432, 243, 379, 289, 687, 708, 283, 672, + /* 170 */ 611, 695, 788, 709, 827, 810, 709, 924, 572, 841, + /* 180 */ 995, 1216, 1090, 1230, 1254, 1230, 1126, 1277, 1277, 1230, + /* 190 */ 1126, 1126, 1218, 1277, 1277, 1277, 1298, 1298, 1303, 25, + /* 200 */ 73, 25, 1311, 1312, 25, 1311, 25, 25, 25, 1277, + /* 210 */ 25, 1286, 1286, 1298, 164, 164, 164, 164, 164, 164, + /* 220 */ 164, 164, 164, 164, 164, 1277, 1298, 313, 313, 1171, + /* 230 */ 1303, 57, 1214, 73, 57, 1277, 1254, 1254, 313, 1149, + /* 240 */ 1157, 313, 1149, 1157, 313, 313, 164, 1159, 1250, 1149, + /* 250 */ 1161, 1173, 1185, 995, 1179, 1181, 1190, 1219, 311, 1441, + /* 260 */ 1277, 1311, 57, 1157, 313, 313, 313, 313, 313, 1157, + /* 270 */ 313, 1323, 57, 158, 57, 311, 1403, 1409, 313, 437, + /* 280 */ 1277, 57, 1483, 1298, 2983, 2983, 2983, 2983, 2983, 2983, + /* 290 */ 2983, 2983, 2983, 835, 364, 23, 550, 52, 638, 566, + /* 300 */ 460, 660, 701, 782, 558, 1131, 1131, 1131, 1131, 1131, + /* 310 */ 1131, 1131, 1131, 1131, 710, 277, 99, 99, 322, 647, + /* 320 */ 378, 390, 264, 469, 469, 121, 598, 406, 121, 121, + /* 330 */ 121, 895, 153, 1041, 978, 920, 935, 918, 989, 996, + /* 340 */ 1007, 950, 1043, 1132, 1024, 1064, 1094, 824, 1014, 994, + /* 350 */ 986, 1137, 1138, 1142, 1148, 1153, 1093, 1156, 1083, 1084, + /* 360 */ 347, 1178, 1102, 1182, 1186, 1189, 1193, 1203, 1211, 1069, + /* 370 */ 1236, 1247, 1206, 1258, 1535, 1541, 1344, 1542, 1543, 1502, + /* 380 */ 1546, 1512, 1348, 1514, 1515, 1516, 1352, 1553, 1519, 1520, + /* 390 */ 1356, 1557, 1358, 1559, 1525, 1562, 1544, 1563, 1529, 1391, + /* 400 */ 1396, 1578, 1579, 1406, 1405, 1580, 1585, 1545, 1588, 1590, + /* 410 */ 1593, 1552, 1595, 1596, 1597, 1599, 1600, 1601, 1602, 1603, + /* 420 */ 1452, 1570, 1612, 1455, 1608, 1609, 1610, 1615, 1616, 1617, + /* 430 */ 1619, 1631, 1632, 1633, 1634, 1635, 1637, 1638, 1639, 1611, + /* 440 */ 1641, 1642, 1649, 1652, 1654, 1636, 1655, 1656, 1657, 1524, + /* 450 */ 1661, 1662, 1628, 1667, 1613, 1668, 1614, 1669, 1670, 1623, + /* 460 */ 1640, 1629, 1627, 1664, 1643, 1666, 1644, 1675, 1646, 1648, + /* 470 */ 1676, 1681, 1682, 1653, 1511, 1688, 1694, 1695, 1645, 1702, + /* 480 */ 1704, 1671, 1659, 1672, 1705, 1677, 1674, 1678, 1710, 1679, + /* 490 */ 1680, 1685, 1713, 1683, 1686, 1687, 1715, 1719, 1720, 1725, + /* 500 */ 1622, 1626, 1696, 1708, 1733, 1700, 1701, 1703, 1706, 1693, + /* 510 */ 1698, 1709, 1712, 1717, 1716, 1740, 1721, 1745, 1730, 1711, + /* 520 */ 1759, 1742, 1727, 1765, 1731, 1768, 1734, 1770, 1751, 1754, + /* 530 */ 1744, 1746, 1584, 1689, 1684, 1782, 1620, 1748, 1785, 1604, + /* 540 */ 1767, 1630, 1621, 1790, 1791, 1658, 1647, 1789, 1749, 1547, + /* 550 */ 1707, 1699, 1724, 1660, 1569, 1663, 1548, 1726, 1755, 1728, + /* 560 */ 1732, 1735, 1737, 1738, 1756, 1757, 1760, 1741, 1772, 1568, + /* 570 */ 1739, 1743, 1821, 1783, 1592, 1795, 1803, 1808, 1810, 1811, + /* 580 */ 1812, 1752, 1762, 1814, 1618, 1813, 1816, 1865, 1866, 1867, + /* 590 */ 1773, 1780, 1784, 1774, 1786, 1718, 1787, 1879, 1841, 1723, + /* 600 */ 1788, 1781, 1627, 1839, 1845, 1673, 1690, 1691, 1888, 1870, + /* 610 */ 1692, 1797, 1800, 1798, 1804, 1807, 1815, 1853, 1809, 1817, + /* 620 */ 1860, 1818, 1886, 1714, 1820, 1802, 1822, 1875, 1882, 1827, + /* 630 */ 1828, 1883, 1830, 1831, 1892, 1834, 1837, 1896, 1836, 1847, + /* 640 */ 1910, 1850, 1794, 1829, 1832, 1833, 1926, 1843, 1858, 1903, + /* 650 */ 1862, 1921, 1863, 1903, 1903, 1938, 1897, 1899, 1928, 1929, + /* 660 */ 1930, 1932, 1933, 1934, 1935, 1937, 1940, 1941, 1907, 1880, + /* 670 */ 1939, 1943, 1947, 1963, 1951, 1973, 1962, 1964, 1965, 1931, + /* 680 */ 1693, 1967, 1698, 1968, 1970, 1971, 1972, 1976, 1974, 2010, + /* 690 */ 1982, 1975, 1981, 2019, 1986, 1977, 1983, 2026, 1992, 1985, + /* 700 */ 1989, 2030, 1996, 1987, 1995, 2036, 2003, 2005, 2041, 2020, + /* 710 */ 2022, 2023, 2024, 2027, 2029, }; #define YY_REDUCE_COUNT (292) -#define YY_REDUCE_MIN (-424) -#define YY_REDUCE_MAX (2175) +#define YY_REDUCE_MIN (-425) +#define YY_REDUCE_MAX (2571) static const short yy_reduce_ofst[] = { - /* 0 */ -188, -327, -228, -168, -34, 100, 655, 747, 834, -94, - /* 10 */ 877, 905, 948, 1013, 1056, 1109, 1130, 1037, 1183, 1236, - /* 20 */ 1257, 1279, 1345, 1365, 1420, 1436, 1479, 1522, 1538, 1589, - /* 30 */ 1606, 1661, 1680, 1704, 1762, 1778, 1821, 1837, 1880, 1896, - /* 40 */ 1939, 1990, 2007, 2033, 2089, 2105, 2159, 2175, -36, -347, - /* 50 */ 593, -344, 80, 773, 913, 943, 746, 790, -260, 1151, - /* 60 */ -424, -268, 606, -412, -54, -237, 70, -330, -259, -265, - /* 70 */ -212, -28, 107, -309, -165, 211, 224, 300, 372, 373, - /* 80 */ 434, 436, 632, -93, 641, 675, 158, 722, -367, 743, - /* 90 */ 748, -322, 749, 750, -221, 751, 420, -200, 426, 793, - /* 100 */ 336, 57, -411, -411, -294, -332, 58, 196, 220, 333, - /* 110 */ 345, 393, 396, 438, 463, 464, 478, 479, 489, 504, - /* 120 */ 529, 625, 626, 682, 723, -286, -315, 139, -5, 186, - /* 130 */ 167, -315, 36, 182, 513, 447, 454, 217, 501, 622, - /* 140 */ 623, 547, -44, 328, 294, 604, 22, 633, 643, 698, - /* 150 */ 679, -357, 409, 656, 818, 838, 844, 851, 758, 867, - /* 160 */ 881, 843, 772, 813, 923, 829, 916, 916, 954, 914, - /* 170 */ 963, 932, 922, 873, 873, 866, 873, 894, 884, 916, - /* 180 */ 926, 936, 942, 957, 956, 960, 969, 1014, 1015, 979, - /* 190 */ 984, 992, 1030, 1042, 1043, 1045, 1046, 1052, 994, 1044, - /* 200 */ 1016, 1053, 1054, 1010, 1058, 1064, 1060, 1061, 1065, 1069, - /* 210 */ 1066, 1073, 1074, 1086, 1068, 1070, 1080, 1081, 1088, 1090, - /* 220 */ 1091, 1092, 1093, 1096, 1100, 1089, 1102, 1084, 1094, 1075, - /* 230 */ 1078, 1114, 1077, 1099, 1135, 1141, 1051, 1098, 1110, 1048, - /* 240 */ 1105, 1112, 1055, 1106, 1115, 1120, 916, 1057, 1083, 1103, - /* 250 */ 1085, 1071, 1107, 1108, 1101, 1079, 1111, 873, 1162, 1137, - /* 260 */ 1197, 1208, 1206, 1163, 1175, 1177, 1182, 1184, 1186, 1176, - /* 270 */ 1187, 1185, 1226, 1214, 1227, 1203, 1152, 1211, 1205, 1232, - /* 280 */ 1242, 1243, 1251, 1256, 1202, 1201, 1213, 1216, 1245, 1252, - /* 290 */ 1258, 1259, 1271, + /* 0 */ 84, -328, -229, 608, 628, 719, 762, 805, 887, 952, + /* 10 */ 976, 1036, 1079, 1107, 1164, 1217, 1239, 1292, 1349, 1404, + /* 20 */ 1447, 1467, 1532, 1583, 1607, 1665, 1722, 1750, 1776, 1835, + /* 30 */ 1851, 1905, 1925, 1980, 1997, 2040, 2095, 2148, 2203, 2219, + /* 40 */ 2273, 2293, 2348, 2365, 2408, 2463, 2516, 2571, 210, -348, + /* 50 */ 97, -345, -290, 413, 619, 802, 629, 674, 583, 588, + /* 60 */ -425, -269, 445, -413, -264, -79, -73, -331, -177, -207, + /* 70 */ -101, -38, -11, -310, -43, 107, 195, 331, 626, 641, + /* 80 */ 661, 704, 712, -28, 730, 731, 188, 781, -368, 838, + /* 90 */ 851, -323, 857, 858, -275, 101, -76, -111, 205, 881, + /* 100 */ 231, 77, -412, -412, -188, -333, 62, 180, 306, 307, + /* 110 */ 349, 352, 438, 472, 486, 487, 488, 492, 493, 601, + /* 120 */ 602, 606, 609, 651, 670, -299, -332, 48, 323, -194, + /* 130 */ 82, -332, -113, 203, 462, 146, 394, 297, -116, 148, + /* 140 */ 341, 87, 425, 309, 573, 454, -89, 502, 504, 649, + /* 150 */ 596, -358, 183, 244, 301, 367, 571, 743, 320, 657, + /* 160 */ 716, 688, 693, 706, 819, 717, 801, 801, 845, 780, + /* 170 */ 854, 825, 794, 767, 767, 752, 767, 820, 769, 801, + /* 180 */ 863, 870, 880, 894, 896, 906, 912, 963, 965, 923, + /* 190 */ 929, 936, 970, 979, 980, 981, 991, 992, 933, 987, + /* 200 */ 954, 988, 997, 944, 998, 999, 1000, 1002, 1003, 1001, + /* 210 */ 1004, 1008, 1012, 1009, 982, 993, 1006, 1010, 1013, 1017, + /* 220 */ 1019, 1020, 1027, 1030, 1032, 1018, 1025, 990, 1021, 971, + /* 230 */ 977, 1056, 1011, 1023, 1061, 1066, 1029, 1033, 1034, 969, + /* 240 */ 1031, 1045, 983, 1035, 1046, 1047, 801, 1005, 1015, 984, + /* 250 */ 1016, 1022, 1026, 1040, 1037, 1038, 1042, 767, 1095, 1062, + /* 260 */ 1133, 1130, 1128, 1085, 1099, 1100, 1101, 1103, 1105, 1097, + /* 270 */ 1106, 1110, 1155, 1143, 1160, 1136, 1086, 1146, 1134, 1168, + /* 280 */ 1174, 1180, 1191, 1194, 1135, 1139, 1141, 1147, 1175, 1184, + /* 290 */ 1187, 1198, 1195, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 10 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 20 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 30 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 40 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 50 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 60 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1853, - /* 70 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 80 */ 1597, 1597, 1597, 1675, 1597, 1597, 1597, 1597, 1597, 1597, - /* 90 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 100 */ 1673, 1846, 2043, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 110 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 120 */ 1597, 1597, 1597, 1597, 1597, 1597, 2055, 1597, 1597, 1675, - /* 130 */ 1597, 2055, 2055, 2055, 1673, 2015, 2015, 1597, 1597, 1597, - /* 140 */ 1597, 1783, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1783, - /* 150 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1890, 1597, - /* 160 */ 1597, 2080, 2134, 1597, 1597, 2083, 1597, 1597, 1597, 1858, - /* 170 */ 1597, 1736, 2070, 2047, 2061, 2118, 2048, 2045, 2064, 1597, - /* 180 */ 2074, 1597, 1883, 1851, 1597, 1851, 1848, 1597, 1597, 1851, - /* 190 */ 1848, 1848, 1727, 1597, 1597, 1597, 1597, 1597, 1597, 1675, - /* 200 */ 1597, 1675, 1597, 1597, 1675, 1597, 1675, 1675, 1675, 1597, - /* 210 */ 1675, 1654, 1654, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 220 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1903, - /* 230 */ 1597, 1673, 1892, 1597, 1673, 1597, 1597, 1597, 1597, 2091, - /* 240 */ 2089, 1597, 2091, 2089, 1597, 1597, 1597, 2103, 2099, 2091, - /* 250 */ 2107, 2105, 2076, 2074, 2137, 2124, 2120, 2061, 1597, 1597, - /* 260 */ 1597, 1597, 1673, 2089, 1597, 1597, 1597, 1597, 1597, 2089, - /* 270 */ 1597, 1597, 1673, 1597, 1673, 1597, 1597, 1752, 1597, 1597, - /* 280 */ 1597, 1673, 1629, 1597, 1885, 1896, 1868, 1868, 1786, 1786, - /* 290 */ 1786, 1676, 1602, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 300 */ 1597, 1597, 1597, 1597, 1597, 2102, 2101, 1971, 1597, 2019, - /* 310 */ 2018, 2017, 2008, 1970, 1748, 1597, 1969, 1968, 1597, 1597, - /* 320 */ 1597, 1597, 1597, 1864, 1863, 1962, 1597, 1597, 1963, 1961, - /* 330 */ 1960, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 340 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 2121, 2125, - /* 350 */ 1597, 1597, 1597, 1597, 1597, 1597, 2044, 1597, 1597, 1597, - /* 360 */ 1597, 1597, 1945, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 370 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 380 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 390 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 400 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 410 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 420 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 430 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 440 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 450 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 460 */ 1597, 1634, 1950, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 470 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 480 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 490 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 500 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1715, - /* 510 */ 1714, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 520 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 530 */ 1597, 1597, 1597, 1953, 1597, 1597, 1597, 1597, 1597, 1597, - /* 540 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 2117, 2077, 1597, - /* 550 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 560 */ 1597, 1597, 1597, 1597, 1597, 1597, 1945, 1597, 2100, 1597, - /* 570 */ 1597, 2115, 1597, 2119, 1597, 1597, 1597, 1597, 1597, 1597, - /* 580 */ 1597, 2054, 2050, 1597, 1597, 2046, 1597, 1597, 1597, 1597, - /* 590 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 600 */ 1597, 1597, 1944, 1597, 2005, 1597, 1597, 1597, 2039, 1597, - /* 610 */ 1597, 1990, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 620 */ 1597, 1953, 1597, 1956, 1597, 1597, 1597, 1597, 1597, 1780, - /* 630 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 640 */ 1597, 1597, 1765, 1763, 1762, 1761, 1597, 1758, 1597, 1793, - /* 650 */ 1597, 1597, 1597, 1789, 1788, 1597, 1597, 1597, 1597, 1597, - /* 660 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 670 */ 1695, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 680 */ 1686, 1597, 1685, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 690 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 700 */ 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, 1597, - /* 710 */ 1597, 1597, 1597, 1597, 1597, + /* 0 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 10 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 20 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 30 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 40 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 50 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 60 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1855, + /* 70 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 80 */ 1599, 1599, 1599, 1677, 1599, 1599, 1599, 1599, 1599, 1599, + /* 90 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 100 */ 1675, 1848, 2046, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 110 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 120 */ 1599, 1599, 1599, 1599, 1599, 1599, 2058, 1599, 1599, 1677, + /* 130 */ 1599, 2058, 2058, 2058, 1675, 2018, 2018, 1599, 1599, 1599, + /* 140 */ 1599, 1785, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1785, + /* 150 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1892, 1599, + /* 160 */ 1599, 2083, 2137, 1599, 1599, 2086, 1599, 1599, 1599, 1860, + /* 170 */ 1599, 1738, 2073, 2050, 2064, 2121, 2051, 2048, 2067, 1599, + /* 180 */ 2077, 1599, 1885, 1853, 1599, 1853, 1850, 1599, 1599, 1853, + /* 190 */ 1850, 1850, 1729, 1599, 1599, 1599, 1599, 1599, 1599, 1677, + /* 200 */ 1599, 1677, 1599, 1599, 1677, 1599, 1677, 1677, 1677, 1599, + /* 210 */ 1677, 1656, 1656, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 220 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1905, + /* 230 */ 1599, 1675, 1894, 1599, 1675, 1599, 1599, 1599, 1599, 2094, + /* 240 */ 2092, 1599, 2094, 2092, 1599, 1599, 1599, 2106, 2102, 2094, + /* 250 */ 2110, 2108, 2079, 2077, 2140, 2127, 2123, 2064, 1599, 1599, + /* 260 */ 1599, 1599, 1675, 2092, 1599, 1599, 1599, 1599, 1599, 2092, + /* 270 */ 1599, 1599, 1675, 1599, 1675, 1599, 1599, 1754, 1599, 1599, + /* 280 */ 1599, 1675, 1631, 1599, 1887, 1898, 1870, 1870, 1788, 1788, + /* 290 */ 1788, 1678, 1604, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 300 */ 1599, 1599, 1599, 1599, 1599, 2105, 2104, 1973, 1599, 2022, + /* 310 */ 2021, 2020, 2011, 1972, 1750, 1599, 1971, 1970, 1599, 1599, + /* 320 */ 1599, 1599, 1599, 1866, 1865, 1964, 1599, 1599, 1965, 1963, + /* 330 */ 1962, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 340 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 2124, 2128, + /* 350 */ 1599, 1599, 1599, 1599, 1599, 1599, 2047, 1599, 1599, 1599, + /* 360 */ 1599, 1599, 1947, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 370 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 380 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 390 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 400 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 410 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 420 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 430 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 440 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 450 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 460 */ 1599, 1636, 1952, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 470 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 480 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 490 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 500 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1717, + /* 510 */ 1716, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 520 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 530 */ 1599, 1599, 1599, 1955, 1599, 1599, 1599, 1599, 1599, 1599, + /* 540 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 2120, 2080, 1599, + /* 550 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 560 */ 1599, 1599, 1599, 1599, 1599, 1599, 1947, 1599, 2103, 1599, + /* 570 */ 1599, 2118, 1599, 2122, 1599, 1599, 1599, 1599, 1599, 1599, + /* 580 */ 1599, 2057, 2053, 1599, 1599, 2049, 1599, 1599, 1599, 1599, + /* 590 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 600 */ 1599, 1599, 1946, 1599, 2008, 1599, 1599, 1599, 2042, 1599, + /* 610 */ 1599, 1993, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 620 */ 1599, 1955, 1599, 1958, 1599, 1599, 1599, 1599, 1599, 1782, + /* 630 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 640 */ 1599, 1599, 1767, 1765, 1764, 1763, 1599, 1760, 1599, 1795, + /* 650 */ 1599, 1599, 1599, 1791, 1790, 1599, 1599, 1599, 1599, 1599, + /* 660 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 670 */ 1697, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 680 */ 1688, 1599, 1687, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 690 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 700 */ 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, 1599, + /* 710 */ 1599, 1599, 1599, 1599, 1599, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1160,6 +1273,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* WEND => nothing */ 0, /* WDURATION => nothing */ 0, /* IROWTS => nothing */ + 0, /* ISFILLED => nothing */ 0, /* CAST => nothing */ 0, /* NOW => nothing */ 0, /* TODAY => nothing */ @@ -1171,7 +1285,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* COUNT => nothing */ 0, /* LAST_ROW => nothing */ 0, /* CASE => nothing */ - 271, /* END => ABORT */ + 272, /* END => ABORT */ 0, /* WHEN => nothing */ 0, /* THEN => nothing */ 0, /* ELSE => nothing */ @@ -1215,58 +1329,58 @@ static const YYCODETYPE yyFallback[] = { 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ABORT => nothing */ - 271, /* AFTER => ABORT */ - 271, /* ATTACH => ABORT */ - 271, /* BEFORE => ABORT */ - 271, /* BEGIN => ABORT */ - 271, /* BITAND => ABORT */ - 271, /* BITNOT => ABORT */ - 271, /* BITOR => ABORT */ - 271, /* BLOCKS => ABORT */ - 271, /* CHANGE => ABORT */ - 271, /* COMMA => ABORT */ - 271, /* COMPACT => ABORT */ - 271, /* CONCAT => ABORT */ - 271, /* CONFLICT => ABORT */ - 271, /* COPY => ABORT */ - 271, /* DEFERRED => ABORT */ - 271, /* DELIMITERS => ABORT */ - 271, /* DETACH => ABORT */ - 271, /* DIVIDE => ABORT */ - 271, /* DOT => ABORT */ - 271, /* EACH => ABORT */ - 271, /* FAIL => ABORT */ - 271, /* FILE => ABORT */ - 271, /* FOR => ABORT */ - 271, /* GLOB => ABORT */ - 271, /* ID => ABORT */ - 271, /* IMMEDIATE => ABORT */ - 271, /* IMPORT => ABORT */ - 271, /* INITIALLY => ABORT */ - 271, /* INSTEAD => ABORT */ - 271, /* ISNULL => ABORT */ - 271, /* KEY => ABORT */ - 271, /* MODULES => ABORT */ - 271, /* NK_BITNOT => ABORT */ - 271, /* NK_SEMI => ABORT */ - 271, /* NOTNULL => ABORT */ - 271, /* OF => ABORT */ - 271, /* PLUS => ABORT */ - 271, /* PRIVILEGE => ABORT */ - 271, /* RAISE => ABORT */ - 271, /* REPLACE => ABORT */ - 271, /* RESTRICT => ABORT */ - 271, /* ROW => ABORT */ - 271, /* SEMI => ABORT */ - 271, /* STAR => ABORT */ - 271, /* STATEMENT => ABORT */ - 271, /* STRING => ABORT */ - 271, /* TIMES => ABORT */ - 271, /* UPDATE => ABORT */ - 271, /* VALUES => ABORT */ - 271, /* VARIABLE => ABORT */ - 271, /* VIEW => ABORT */ - 271, /* WAL => ABORT */ + 272, /* AFTER => ABORT */ + 272, /* ATTACH => ABORT */ + 272, /* BEFORE => ABORT */ + 272, /* BEGIN => ABORT */ + 272, /* BITAND => ABORT */ + 272, /* BITNOT => ABORT */ + 272, /* BITOR => ABORT */ + 272, /* BLOCKS => ABORT */ + 272, /* CHANGE => ABORT */ + 272, /* COMMA => ABORT */ + 272, /* COMPACT => ABORT */ + 272, /* CONCAT => ABORT */ + 272, /* CONFLICT => ABORT */ + 272, /* COPY => ABORT */ + 272, /* DEFERRED => ABORT */ + 272, /* DELIMITERS => ABORT */ + 272, /* DETACH => ABORT */ + 272, /* DIVIDE => ABORT */ + 272, /* DOT => ABORT */ + 272, /* EACH => ABORT */ + 272, /* FAIL => ABORT */ + 272, /* FILE => ABORT */ + 272, /* FOR => ABORT */ + 272, /* GLOB => ABORT */ + 272, /* ID => ABORT */ + 272, /* IMMEDIATE => ABORT */ + 272, /* IMPORT => ABORT */ + 272, /* INITIALLY => ABORT */ + 272, /* INSTEAD => ABORT */ + 272, /* ISNULL => ABORT */ + 272, /* KEY => ABORT */ + 272, /* MODULES => ABORT */ + 272, /* NK_BITNOT => ABORT */ + 272, /* NK_SEMI => ABORT */ + 272, /* NOTNULL => ABORT */ + 272, /* OF => ABORT */ + 272, /* PLUS => ABORT */ + 272, /* PRIVILEGE => ABORT */ + 272, /* RAISE => ABORT */ + 272, /* REPLACE => ABORT */ + 272, /* RESTRICT => ABORT */ + 272, /* ROW => ABORT */ + 272, /* SEMI => ABORT */ + 272, /* STAR => ABORT */ + 272, /* STATEMENT => ABORT */ + 272, /* STRING => ABORT */ + 272, /* TIMES => ABORT */ + 272, /* UPDATE => ABORT */ + 272, /* VALUES => ABORT */ + 272, /* VARIABLE => ABORT */ + 272, /* VIEW => ABORT */ + 272, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1571,248 +1685,249 @@ static const char *const yyTokenName[] = { /* 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 */ "EVENT_WINDOW", - /* 253 */ "START", - /* 254 */ "SLIDING", - /* 255 */ "FILL", - /* 256 */ "VALUE", - /* 257 */ "NONE", - /* 258 */ "PREV", - /* 259 */ "LINEAR", - /* 260 */ "NEXT", - /* 261 */ "HAVING", - /* 262 */ "RANGE", - /* 263 */ "EVERY", - /* 264 */ "ORDER", - /* 265 */ "SLIMIT", - /* 266 */ "SOFFSET", - /* 267 */ "LIMIT", - /* 268 */ "OFFSET", - /* 269 */ "ASC", - /* 270 */ "NULLS", - /* 271 */ "ABORT", - /* 272 */ "AFTER", - /* 273 */ "ATTACH", - /* 274 */ "BEFORE", - /* 275 */ "BEGIN", - /* 276 */ "BITAND", - /* 277 */ "BITNOT", - /* 278 */ "BITOR", - /* 279 */ "BLOCKS", - /* 280 */ "CHANGE", - /* 281 */ "COMMA", - /* 282 */ "COMPACT", - /* 283 */ "CONCAT", - /* 284 */ "CONFLICT", - /* 285 */ "COPY", - /* 286 */ "DEFERRED", - /* 287 */ "DELIMITERS", - /* 288 */ "DETACH", - /* 289 */ "DIVIDE", - /* 290 */ "DOT", - /* 291 */ "EACH", - /* 292 */ "FAIL", - /* 293 */ "FILE", - /* 294 */ "FOR", - /* 295 */ "GLOB", - /* 296 */ "ID", - /* 297 */ "IMMEDIATE", - /* 298 */ "IMPORT", - /* 299 */ "INITIALLY", - /* 300 */ "INSTEAD", - /* 301 */ "ISNULL", - /* 302 */ "KEY", - /* 303 */ "MODULES", - /* 304 */ "NK_BITNOT", - /* 305 */ "NK_SEMI", - /* 306 */ "NOTNULL", - /* 307 */ "OF", - /* 308 */ "PLUS", - /* 309 */ "PRIVILEGE", - /* 310 */ "RAISE", - /* 311 */ "REPLACE", - /* 312 */ "RESTRICT", - /* 313 */ "ROW", - /* 314 */ "SEMI", - /* 315 */ "STAR", - /* 316 */ "STATEMENT", - /* 317 */ "STRING", - /* 318 */ "TIMES", - /* 319 */ "UPDATE", - /* 320 */ "VALUES", - /* 321 */ "VARIABLE", - /* 322 */ "VIEW", - /* 323 */ "WAL", - /* 324 */ "cmd", - /* 325 */ "account_options", - /* 326 */ "alter_account_options", - /* 327 */ "literal", - /* 328 */ "alter_account_option", - /* 329 */ "user_name", - /* 330 */ "sysinfo_opt", - /* 331 */ "privileges", - /* 332 */ "priv_level", - /* 333 */ "priv_type_list", - /* 334 */ "priv_type", - /* 335 */ "db_name", - /* 336 */ "topic_name", - /* 337 */ "dnode_endpoint", - /* 338 */ "force_opt", - /* 339 */ "not_exists_opt", - /* 340 */ "db_options", - /* 341 */ "exists_opt", - /* 342 */ "alter_db_options", - /* 343 */ "speed_opt", - /* 344 */ "integer_list", - /* 345 */ "variable_list", - /* 346 */ "retention_list", - /* 347 */ "alter_db_option", - /* 348 */ "retention", - /* 349 */ "full_table_name", - /* 350 */ "column_def_list", - /* 351 */ "tags_def_opt", - /* 352 */ "table_options", - /* 353 */ "multi_create_clause", - /* 354 */ "tags_def", - /* 355 */ "multi_drop_clause", - /* 356 */ "alter_table_clause", - /* 357 */ "alter_table_options", - /* 358 */ "column_name", - /* 359 */ "type_name", - /* 360 */ "signed_literal", - /* 361 */ "create_subtable_clause", - /* 362 */ "specific_cols_opt", - /* 363 */ "expression_list", - /* 364 */ "drop_table_clause", - /* 365 */ "col_name_list", - /* 366 */ "table_name", - /* 367 */ "column_def", - /* 368 */ "duration_list", - /* 369 */ "rollup_func_list", - /* 370 */ "alter_table_option", - /* 371 */ "duration_literal", - /* 372 */ "rollup_func_name", - /* 373 */ "function_name", - /* 374 */ "col_name", - /* 375 */ "db_name_cond_opt", - /* 376 */ "like_pattern_opt", - /* 377 */ "table_name_cond", - /* 378 */ "from_db_opt", - /* 379 */ "tag_list_opt", - /* 380 */ "tag_item", - /* 381 */ "column_alias", - /* 382 */ "index_options", - /* 383 */ "func_list", - /* 384 */ "sliding_opt", - /* 385 */ "sma_stream_opt", - /* 386 */ "func", - /* 387 */ "query_or_subquery", - /* 388 */ "cgroup_name", - /* 389 */ "analyze_opt", - /* 390 */ "explain_options", - /* 391 */ "agg_func_opt", - /* 392 */ "bufsize_opt", - /* 393 */ "stream_name", - /* 394 */ "stream_options", - /* 395 */ "subtable_opt", - /* 396 */ "expression", - /* 397 */ "dnode_list", - /* 398 */ "where_clause_opt", - /* 399 */ "signed", - /* 400 */ "literal_func", - /* 401 */ "literal_list", - /* 402 */ "table_alias", - /* 403 */ "expr_or_subquery", - /* 404 */ "pseudo_column", - /* 405 */ "column_reference", - /* 406 */ "function_expression", - /* 407 */ "case_when_expression", - /* 408 */ "star_func", - /* 409 */ "star_func_para_list", - /* 410 */ "noarg_func", - /* 411 */ "other_para_list", - /* 412 */ "star_func_para", - /* 413 */ "when_then_list", - /* 414 */ "case_when_else_opt", - /* 415 */ "common_expression", - /* 416 */ "when_then_expr", - /* 417 */ "predicate", - /* 418 */ "compare_op", - /* 419 */ "in_op", - /* 420 */ "in_predicate_value", - /* 421 */ "boolean_value_expression", - /* 422 */ "boolean_primary", - /* 423 */ "from_clause_opt", - /* 424 */ "table_reference_list", - /* 425 */ "table_reference", - /* 426 */ "table_primary", - /* 427 */ "joined_table", - /* 428 */ "alias_opt", - /* 429 */ "subquery", - /* 430 */ "parenthesized_joined_table", - /* 431 */ "join_type", - /* 432 */ "search_condition", - /* 433 */ "query_specification", - /* 434 */ "set_quantifier_opt", - /* 435 */ "select_list", - /* 436 */ "partition_by_clause_opt", - /* 437 */ "range_opt", - /* 438 */ "every_opt", - /* 439 */ "fill_opt", - /* 440 */ "twindow_clause_opt", - /* 441 */ "group_by_clause_opt", - /* 442 */ "having_clause_opt", - /* 443 */ "select_item", - /* 444 */ "partition_list", - /* 445 */ "partition_item", - /* 446 */ "fill_mode", - /* 447 */ "group_by_list", - /* 448 */ "query_expression", - /* 449 */ "query_simple", - /* 450 */ "order_by_clause_opt", - /* 451 */ "slimit_clause_opt", - /* 452 */ "limit_clause_opt", - /* 453 */ "union_query_expression", - /* 454 */ "query_simple_or_subquery", - /* 455 */ "sort_specification_list", - /* 456 */ "sort_specification", - /* 457 */ "ordering_specification_opt", - /* 458 */ "null_ordering_opt", + /* 217 */ "ISFILLED", + /* 218 */ "CAST", + /* 219 */ "NOW", + /* 220 */ "TODAY", + /* 221 */ "TIMEZONE", + /* 222 */ "CLIENT_VERSION", + /* 223 */ "SERVER_VERSION", + /* 224 */ "SERVER_STATUS", + /* 225 */ "CURRENT_USER", + /* 226 */ "COUNT", + /* 227 */ "LAST_ROW", + /* 228 */ "CASE", + /* 229 */ "END", + /* 230 */ "WHEN", + /* 231 */ "THEN", + /* 232 */ "ELSE", + /* 233 */ "BETWEEN", + /* 234 */ "IS", + /* 235 */ "NK_LT", + /* 236 */ "NK_GT", + /* 237 */ "NK_LE", + /* 238 */ "NK_GE", + /* 239 */ "NK_NE", + /* 240 */ "MATCH", + /* 241 */ "NMATCH", + /* 242 */ "CONTAINS", + /* 243 */ "IN", + /* 244 */ "JOIN", + /* 245 */ "INNER", + /* 246 */ "SELECT", + /* 247 */ "DISTINCT", + /* 248 */ "WHERE", + /* 249 */ "PARTITION", + /* 250 */ "BY", + /* 251 */ "SESSION", + /* 252 */ "STATE_WINDOW", + /* 253 */ "EVENT_WINDOW", + /* 254 */ "START", + /* 255 */ "SLIDING", + /* 256 */ "FILL", + /* 257 */ "VALUE", + /* 258 */ "NONE", + /* 259 */ "PREV", + /* 260 */ "LINEAR", + /* 261 */ "NEXT", + /* 262 */ "HAVING", + /* 263 */ "RANGE", + /* 264 */ "EVERY", + /* 265 */ "ORDER", + /* 266 */ "SLIMIT", + /* 267 */ "SOFFSET", + /* 268 */ "LIMIT", + /* 269 */ "OFFSET", + /* 270 */ "ASC", + /* 271 */ "NULLS", + /* 272 */ "ABORT", + /* 273 */ "AFTER", + /* 274 */ "ATTACH", + /* 275 */ "BEFORE", + /* 276 */ "BEGIN", + /* 277 */ "BITAND", + /* 278 */ "BITNOT", + /* 279 */ "BITOR", + /* 280 */ "BLOCKS", + /* 281 */ "CHANGE", + /* 282 */ "COMMA", + /* 283 */ "COMPACT", + /* 284 */ "CONCAT", + /* 285 */ "CONFLICT", + /* 286 */ "COPY", + /* 287 */ "DEFERRED", + /* 288 */ "DELIMITERS", + /* 289 */ "DETACH", + /* 290 */ "DIVIDE", + /* 291 */ "DOT", + /* 292 */ "EACH", + /* 293 */ "FAIL", + /* 294 */ "FILE", + /* 295 */ "FOR", + /* 296 */ "GLOB", + /* 297 */ "ID", + /* 298 */ "IMMEDIATE", + /* 299 */ "IMPORT", + /* 300 */ "INITIALLY", + /* 301 */ "INSTEAD", + /* 302 */ "ISNULL", + /* 303 */ "KEY", + /* 304 */ "MODULES", + /* 305 */ "NK_BITNOT", + /* 306 */ "NK_SEMI", + /* 307 */ "NOTNULL", + /* 308 */ "OF", + /* 309 */ "PLUS", + /* 310 */ "PRIVILEGE", + /* 311 */ "RAISE", + /* 312 */ "REPLACE", + /* 313 */ "RESTRICT", + /* 314 */ "ROW", + /* 315 */ "SEMI", + /* 316 */ "STAR", + /* 317 */ "STATEMENT", + /* 318 */ "STRING", + /* 319 */ "TIMES", + /* 320 */ "UPDATE", + /* 321 */ "VALUES", + /* 322 */ "VARIABLE", + /* 323 */ "VIEW", + /* 324 */ "WAL", + /* 325 */ "cmd", + /* 326 */ "account_options", + /* 327 */ "alter_account_options", + /* 328 */ "literal", + /* 329 */ "alter_account_option", + /* 330 */ "user_name", + /* 331 */ "sysinfo_opt", + /* 332 */ "privileges", + /* 333 */ "priv_level", + /* 334 */ "priv_type_list", + /* 335 */ "priv_type", + /* 336 */ "db_name", + /* 337 */ "topic_name", + /* 338 */ "dnode_endpoint", + /* 339 */ "force_opt", + /* 340 */ "not_exists_opt", + /* 341 */ "db_options", + /* 342 */ "exists_opt", + /* 343 */ "alter_db_options", + /* 344 */ "speed_opt", + /* 345 */ "integer_list", + /* 346 */ "variable_list", + /* 347 */ "retention_list", + /* 348 */ "alter_db_option", + /* 349 */ "retention", + /* 350 */ "full_table_name", + /* 351 */ "column_def_list", + /* 352 */ "tags_def_opt", + /* 353 */ "table_options", + /* 354 */ "multi_create_clause", + /* 355 */ "tags_def", + /* 356 */ "multi_drop_clause", + /* 357 */ "alter_table_clause", + /* 358 */ "alter_table_options", + /* 359 */ "column_name", + /* 360 */ "type_name", + /* 361 */ "signed_literal", + /* 362 */ "create_subtable_clause", + /* 363 */ "specific_cols_opt", + /* 364 */ "expression_list", + /* 365 */ "drop_table_clause", + /* 366 */ "col_name_list", + /* 367 */ "table_name", + /* 368 */ "column_def", + /* 369 */ "duration_list", + /* 370 */ "rollup_func_list", + /* 371 */ "alter_table_option", + /* 372 */ "duration_literal", + /* 373 */ "rollup_func_name", + /* 374 */ "function_name", + /* 375 */ "col_name", + /* 376 */ "db_name_cond_opt", + /* 377 */ "like_pattern_opt", + /* 378 */ "table_name_cond", + /* 379 */ "from_db_opt", + /* 380 */ "tag_list_opt", + /* 381 */ "tag_item", + /* 382 */ "column_alias", + /* 383 */ "index_options", + /* 384 */ "func_list", + /* 385 */ "sliding_opt", + /* 386 */ "sma_stream_opt", + /* 387 */ "func", + /* 388 */ "query_or_subquery", + /* 389 */ "cgroup_name", + /* 390 */ "analyze_opt", + /* 391 */ "explain_options", + /* 392 */ "agg_func_opt", + /* 393 */ "bufsize_opt", + /* 394 */ "stream_name", + /* 395 */ "stream_options", + /* 396 */ "subtable_opt", + /* 397 */ "expression", + /* 398 */ "dnode_list", + /* 399 */ "where_clause_opt", + /* 400 */ "signed", + /* 401 */ "literal_func", + /* 402 */ "literal_list", + /* 403 */ "table_alias", + /* 404 */ "expr_or_subquery", + /* 405 */ "pseudo_column", + /* 406 */ "column_reference", + /* 407 */ "function_expression", + /* 408 */ "case_when_expression", + /* 409 */ "star_func", + /* 410 */ "star_func_para_list", + /* 411 */ "noarg_func", + /* 412 */ "other_para_list", + /* 413 */ "star_func_para", + /* 414 */ "when_then_list", + /* 415 */ "case_when_else_opt", + /* 416 */ "common_expression", + /* 417 */ "when_then_expr", + /* 418 */ "predicate", + /* 419 */ "compare_op", + /* 420 */ "in_op", + /* 421 */ "in_predicate_value", + /* 422 */ "boolean_value_expression", + /* 423 */ "boolean_primary", + /* 424 */ "from_clause_opt", + /* 425 */ "table_reference_list", + /* 426 */ "table_reference", + /* 427 */ "table_primary", + /* 428 */ "joined_table", + /* 429 */ "alias_opt", + /* 430 */ "subquery", + /* 431 */ "parenthesized_joined_table", + /* 432 */ "join_type", + /* 433 */ "search_condition", + /* 434 */ "query_specification", + /* 435 */ "set_quantifier_opt", + /* 436 */ "select_list", + /* 437 */ "partition_by_clause_opt", + /* 438 */ "range_opt", + /* 439 */ "every_opt", + /* 440 */ "fill_opt", + /* 441 */ "twindow_clause_opt", + /* 442 */ "group_by_clause_opt", + /* 443 */ "having_clause_opt", + /* 444 */ "select_item", + /* 445 */ "partition_list", + /* 446 */ "partition_item", + /* 447 */ "fill_mode", + /* 448 */ "group_by_list", + /* 449 */ "query_expression", + /* 450 */ "query_simple", + /* 451 */ "order_by_clause_opt", + /* 452 */ "slimit_clause_opt", + /* 453 */ "limit_clause_opt", + /* 454 */ "union_query_expression", + /* 455 */ "query_simple_or_subquery", + /* 456 */ "sort_specification_list", + /* 457 */ "sort_specification", + /* 458 */ "ordering_specification_opt", + /* 459 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2204,162 +2319,163 @@ static const char *const yyRuleName[] = { /* 381 */ "pseudo_column ::= WEND", /* 382 */ "pseudo_column ::= WDURATION", /* 383 */ "pseudo_column ::= IROWTS", - /* 384 */ "pseudo_column ::= QTAGS", - /* 385 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 386 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 387 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 388 */ "function_expression ::= literal_func", - /* 389 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 390 */ "literal_func ::= NOW", - /* 391 */ "noarg_func ::= NOW", - /* 392 */ "noarg_func ::= TODAY", - /* 393 */ "noarg_func ::= TIMEZONE", - /* 394 */ "noarg_func ::= DATABASE", - /* 395 */ "noarg_func ::= CLIENT_VERSION", - /* 396 */ "noarg_func ::= SERVER_VERSION", - /* 397 */ "noarg_func ::= SERVER_STATUS", - /* 398 */ "noarg_func ::= CURRENT_USER", - /* 399 */ "noarg_func ::= USER", - /* 400 */ "star_func ::= COUNT", - /* 401 */ "star_func ::= FIRST", - /* 402 */ "star_func ::= LAST", - /* 403 */ "star_func ::= LAST_ROW", - /* 404 */ "star_func_para_list ::= NK_STAR", - /* 405 */ "star_func_para_list ::= other_para_list", - /* 406 */ "other_para_list ::= star_func_para", - /* 407 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 408 */ "star_func_para ::= expr_or_subquery", - /* 409 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 410 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 411 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 412 */ "when_then_list ::= when_then_expr", - /* 413 */ "when_then_list ::= when_then_list when_then_expr", - /* 414 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 415 */ "case_when_else_opt ::=", - /* 416 */ "case_when_else_opt ::= ELSE common_expression", - /* 417 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 418 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 419 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 420 */ "predicate ::= expr_or_subquery IS NULL", - /* 421 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 422 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 423 */ "compare_op ::= NK_LT", - /* 424 */ "compare_op ::= NK_GT", - /* 425 */ "compare_op ::= NK_LE", - /* 426 */ "compare_op ::= NK_GE", - /* 427 */ "compare_op ::= NK_NE", - /* 428 */ "compare_op ::= NK_EQ", - /* 429 */ "compare_op ::= LIKE", - /* 430 */ "compare_op ::= NOT LIKE", - /* 431 */ "compare_op ::= MATCH", - /* 432 */ "compare_op ::= NMATCH", - /* 433 */ "compare_op ::= CONTAINS", - /* 434 */ "in_op ::= IN", - /* 435 */ "in_op ::= NOT IN", - /* 436 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 437 */ "boolean_value_expression ::= boolean_primary", - /* 438 */ "boolean_value_expression ::= NOT boolean_primary", - /* 439 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 440 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 441 */ "boolean_primary ::= predicate", - /* 442 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 443 */ "common_expression ::= expr_or_subquery", - /* 444 */ "common_expression ::= boolean_value_expression", - /* 445 */ "from_clause_opt ::=", - /* 446 */ "from_clause_opt ::= FROM table_reference_list", - /* 447 */ "table_reference_list ::= table_reference", - /* 448 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 449 */ "table_reference ::= table_primary", - /* 450 */ "table_reference ::= joined_table", - /* 451 */ "table_primary ::= table_name alias_opt", - /* 452 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 453 */ "table_primary ::= subquery alias_opt", - /* 454 */ "table_primary ::= parenthesized_joined_table", - /* 455 */ "alias_opt ::=", - /* 456 */ "alias_opt ::= table_alias", - /* 457 */ "alias_opt ::= AS table_alias", - /* 458 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 459 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 460 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 461 */ "join_type ::=", - /* 462 */ "join_type ::= INNER", - /* 463 */ "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", - /* 464 */ "set_quantifier_opt ::=", - /* 465 */ "set_quantifier_opt ::= DISTINCT", - /* 466 */ "set_quantifier_opt ::= ALL", - /* 467 */ "select_list ::= select_item", - /* 468 */ "select_list ::= select_list NK_COMMA select_item", - /* 469 */ "select_item ::= NK_STAR", - /* 470 */ "select_item ::= common_expression", - /* 471 */ "select_item ::= common_expression column_alias", - /* 472 */ "select_item ::= common_expression AS column_alias", - /* 473 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 474 */ "where_clause_opt ::=", - /* 475 */ "where_clause_opt ::= WHERE search_condition", - /* 476 */ "partition_by_clause_opt ::=", - /* 477 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 478 */ "partition_list ::= partition_item", - /* 479 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 480 */ "partition_item ::= expr_or_subquery", - /* 481 */ "partition_item ::= expr_or_subquery column_alias", - /* 482 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 483 */ "twindow_clause_opt ::=", - /* 484 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 485 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 486 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 487 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 488 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 489 */ "sliding_opt ::=", - /* 490 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 491 */ "fill_opt ::=", - /* 492 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 493 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 494 */ "fill_mode ::= NONE", - /* 495 */ "fill_mode ::= PREV", - /* 496 */ "fill_mode ::= NULL", - /* 497 */ "fill_mode ::= LINEAR", - /* 498 */ "fill_mode ::= NEXT", - /* 499 */ "group_by_clause_opt ::=", - /* 500 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 501 */ "group_by_list ::= expr_or_subquery", - /* 502 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 503 */ "having_clause_opt ::=", - /* 504 */ "having_clause_opt ::= HAVING search_condition", - /* 505 */ "range_opt ::=", - /* 506 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 507 */ "every_opt ::=", - /* 508 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 509 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 510 */ "query_simple ::= query_specification", - /* 511 */ "query_simple ::= union_query_expression", - /* 512 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 513 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 514 */ "query_simple_or_subquery ::= query_simple", - /* 515 */ "query_simple_or_subquery ::= subquery", - /* 516 */ "query_or_subquery ::= query_expression", - /* 517 */ "query_or_subquery ::= subquery", - /* 518 */ "order_by_clause_opt ::=", - /* 519 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 520 */ "slimit_clause_opt ::=", - /* 521 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 523 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 524 */ "limit_clause_opt ::=", - /* 525 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 527 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 528 */ "subquery ::= NK_LP query_expression NK_RP", - /* 529 */ "subquery ::= NK_LP subquery NK_RP", - /* 530 */ "search_condition ::= common_expression", - /* 531 */ "sort_specification_list ::= sort_specification", - /* 532 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 533 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 534 */ "ordering_specification_opt ::=", - /* 535 */ "ordering_specification_opt ::= ASC", - /* 536 */ "ordering_specification_opt ::= DESC", - /* 537 */ "null_ordering_opt ::=", - /* 538 */ "null_ordering_opt ::= NULLS FIRST", - /* 539 */ "null_ordering_opt ::= NULLS LAST", + /* 384 */ "pseudo_column ::= ISFILLED", + /* 385 */ "pseudo_column ::= QTAGS", + /* 386 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 387 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 388 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 389 */ "function_expression ::= literal_func", + /* 390 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 391 */ "literal_func ::= NOW", + /* 392 */ "noarg_func ::= NOW", + /* 393 */ "noarg_func ::= TODAY", + /* 394 */ "noarg_func ::= TIMEZONE", + /* 395 */ "noarg_func ::= DATABASE", + /* 396 */ "noarg_func ::= CLIENT_VERSION", + /* 397 */ "noarg_func ::= SERVER_VERSION", + /* 398 */ "noarg_func ::= SERVER_STATUS", + /* 399 */ "noarg_func ::= CURRENT_USER", + /* 400 */ "noarg_func ::= USER", + /* 401 */ "star_func ::= COUNT", + /* 402 */ "star_func ::= FIRST", + /* 403 */ "star_func ::= LAST", + /* 404 */ "star_func ::= LAST_ROW", + /* 405 */ "star_func_para_list ::= NK_STAR", + /* 406 */ "star_func_para_list ::= other_para_list", + /* 407 */ "other_para_list ::= star_func_para", + /* 408 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 409 */ "star_func_para ::= expr_or_subquery", + /* 410 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 411 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 412 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 413 */ "when_then_list ::= when_then_expr", + /* 414 */ "when_then_list ::= when_then_list when_then_expr", + /* 415 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 416 */ "case_when_else_opt ::=", + /* 417 */ "case_when_else_opt ::= ELSE common_expression", + /* 418 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 419 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 420 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 421 */ "predicate ::= expr_or_subquery IS NULL", + /* 422 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 423 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 424 */ "compare_op ::= NK_LT", + /* 425 */ "compare_op ::= NK_GT", + /* 426 */ "compare_op ::= NK_LE", + /* 427 */ "compare_op ::= NK_GE", + /* 428 */ "compare_op ::= NK_NE", + /* 429 */ "compare_op ::= NK_EQ", + /* 430 */ "compare_op ::= LIKE", + /* 431 */ "compare_op ::= NOT LIKE", + /* 432 */ "compare_op ::= MATCH", + /* 433 */ "compare_op ::= NMATCH", + /* 434 */ "compare_op ::= CONTAINS", + /* 435 */ "in_op ::= IN", + /* 436 */ "in_op ::= NOT IN", + /* 437 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 438 */ "boolean_value_expression ::= boolean_primary", + /* 439 */ "boolean_value_expression ::= NOT boolean_primary", + /* 440 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 441 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 442 */ "boolean_primary ::= predicate", + /* 443 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 444 */ "common_expression ::= expr_or_subquery", + /* 445 */ "common_expression ::= boolean_value_expression", + /* 446 */ "from_clause_opt ::=", + /* 447 */ "from_clause_opt ::= FROM table_reference_list", + /* 448 */ "table_reference_list ::= table_reference", + /* 449 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 450 */ "table_reference ::= table_primary", + /* 451 */ "table_reference ::= joined_table", + /* 452 */ "table_primary ::= table_name alias_opt", + /* 453 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 454 */ "table_primary ::= subquery alias_opt", + /* 455 */ "table_primary ::= parenthesized_joined_table", + /* 456 */ "alias_opt ::=", + /* 457 */ "alias_opt ::= table_alias", + /* 458 */ "alias_opt ::= AS table_alias", + /* 459 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 460 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 461 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 462 */ "join_type ::=", + /* 463 */ "join_type ::= INNER", + /* 464 */ "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", + /* 465 */ "set_quantifier_opt ::=", + /* 466 */ "set_quantifier_opt ::= DISTINCT", + /* 467 */ "set_quantifier_opt ::= ALL", + /* 468 */ "select_list ::= select_item", + /* 469 */ "select_list ::= select_list NK_COMMA select_item", + /* 470 */ "select_item ::= NK_STAR", + /* 471 */ "select_item ::= common_expression", + /* 472 */ "select_item ::= common_expression column_alias", + /* 473 */ "select_item ::= common_expression AS column_alias", + /* 474 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 475 */ "where_clause_opt ::=", + /* 476 */ "where_clause_opt ::= WHERE search_condition", + /* 477 */ "partition_by_clause_opt ::=", + /* 478 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 479 */ "partition_list ::= partition_item", + /* 480 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 481 */ "partition_item ::= expr_or_subquery", + /* 482 */ "partition_item ::= expr_or_subquery column_alias", + /* 483 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 484 */ "twindow_clause_opt ::=", + /* 485 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 486 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 487 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 488 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 489 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 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", }; #endif /* NDEBUG */ @@ -2486,193 +2602,193 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 324: /* cmd */ - case 327: /* literal */ - case 340: /* db_options */ - case 342: /* alter_db_options */ - case 348: /* retention */ - case 349: /* full_table_name */ - case 352: /* table_options */ - case 356: /* alter_table_clause */ - case 357: /* alter_table_options */ - case 360: /* signed_literal */ - case 361: /* create_subtable_clause */ - case 364: /* drop_table_clause */ - case 367: /* column_def */ - case 371: /* duration_literal */ - case 372: /* rollup_func_name */ - case 374: /* col_name */ - case 375: /* db_name_cond_opt */ - case 376: /* like_pattern_opt */ - case 377: /* table_name_cond */ - case 378: /* from_db_opt */ - case 380: /* tag_item */ - case 382: /* index_options */ - case 384: /* sliding_opt */ - case 385: /* sma_stream_opt */ - case 386: /* func */ - case 387: /* query_or_subquery */ - case 390: /* explain_options */ - case 394: /* stream_options */ - case 395: /* subtable_opt */ - case 396: /* expression */ - case 398: /* where_clause_opt */ - case 399: /* signed */ - case 400: /* literal_func */ - case 403: /* expr_or_subquery */ - case 404: /* pseudo_column */ - case 405: /* column_reference */ - case 406: /* function_expression */ - case 407: /* case_when_expression */ - case 412: /* star_func_para */ - case 414: /* case_when_else_opt */ - case 415: /* common_expression */ - case 416: /* when_then_expr */ - case 417: /* predicate */ - case 420: /* in_predicate_value */ - case 421: /* boolean_value_expression */ - case 422: /* boolean_primary */ - case 423: /* from_clause_opt */ - case 424: /* table_reference_list */ - case 425: /* table_reference */ - case 426: /* table_primary */ - case 427: /* joined_table */ - case 429: /* subquery */ - case 430: /* parenthesized_joined_table */ - case 432: /* search_condition */ - case 433: /* query_specification */ - case 437: /* range_opt */ - case 438: /* every_opt */ - case 439: /* fill_opt */ - case 440: /* twindow_clause_opt */ - case 442: /* having_clause_opt */ - case 443: /* select_item */ - case 445: /* partition_item */ - case 448: /* query_expression */ - case 449: /* query_simple */ - case 451: /* slimit_clause_opt */ - case 452: /* limit_clause_opt */ - case 453: /* union_query_expression */ - case 454: /* query_simple_or_subquery */ - case 456: /* sort_specification */ + case 325: /* cmd */ + case 328: /* literal */ + case 341: /* db_options */ + case 343: /* alter_db_options */ + case 349: /* retention */ + case 350: /* full_table_name */ + case 353: /* table_options */ + case 357: /* alter_table_clause */ + case 358: /* alter_table_options */ + case 361: /* signed_literal */ + case 362: /* create_subtable_clause */ + case 365: /* drop_table_clause */ + case 368: /* column_def */ + case 372: /* duration_literal */ + case 373: /* rollup_func_name */ + case 375: /* col_name */ + case 376: /* db_name_cond_opt */ + case 377: /* like_pattern_opt */ + case 378: /* table_name_cond */ + case 379: /* from_db_opt */ + case 381: /* tag_item */ + case 383: /* index_options */ + case 385: /* sliding_opt */ + case 386: /* sma_stream_opt */ + case 387: /* func */ + case 388: /* query_or_subquery */ + case 391: /* explain_options */ + case 395: /* stream_options */ + case 396: /* subtable_opt */ + case 397: /* expression */ + case 399: /* where_clause_opt */ + case 400: /* signed */ + case 401: /* literal_func */ + case 404: /* expr_or_subquery */ + case 405: /* pseudo_column */ + case 406: /* column_reference */ + case 407: /* function_expression */ + case 408: /* case_when_expression */ + case 413: /* star_func_para */ + case 415: /* case_when_else_opt */ + case 416: /* common_expression */ + case 417: /* when_then_expr */ + case 418: /* predicate */ + case 421: /* in_predicate_value */ + case 422: /* boolean_value_expression */ + case 423: /* boolean_primary */ + case 424: /* from_clause_opt */ + case 425: /* table_reference_list */ + case 426: /* table_reference */ + case 427: /* table_primary */ + case 428: /* joined_table */ + case 430: /* subquery */ + case 431: /* parenthesized_joined_table */ + case 433: /* search_condition */ + case 434: /* query_specification */ + case 438: /* range_opt */ + case 439: /* every_opt */ + case 440: /* fill_opt */ + case 441: /* twindow_clause_opt */ + case 443: /* having_clause_opt */ + case 444: /* select_item */ + case 446: /* partition_item */ + case 449: /* query_expression */ + case 450: /* query_simple */ + case 452: /* slimit_clause_opt */ + case 453: /* limit_clause_opt */ + case 454: /* union_query_expression */ + case 455: /* query_simple_or_subquery */ + case 457: /* sort_specification */ { - nodesDestroyNode((yypminor->yy74)); + nodesDestroyNode((yypminor->yy752)); } break; - case 325: /* account_options */ - case 326: /* alter_account_options */ - case 328: /* alter_account_option */ - case 343: /* speed_opt */ - case 392: /* bufsize_opt */ + case 326: /* account_options */ + case 327: /* alter_account_options */ + case 329: /* alter_account_option */ + case 344: /* speed_opt */ + case 393: /* bufsize_opt */ { } break; - case 329: /* user_name */ - case 332: /* priv_level */ - case 335: /* db_name */ - case 336: /* topic_name */ - case 337: /* dnode_endpoint */ - case 358: /* column_name */ - case 366: /* table_name */ - case 373: /* function_name */ - case 381: /* column_alias */ - case 388: /* cgroup_name */ - case 393: /* stream_name */ - case 402: /* table_alias */ - case 408: /* star_func */ - case 410: /* noarg_func */ - case 428: /* alias_opt */ + case 330: /* user_name */ + case 333: /* priv_level */ + case 336: /* db_name */ + case 337: /* topic_name */ + case 338: /* dnode_endpoint */ + case 359: /* column_name */ + case 367: /* table_name */ + case 374: /* function_name */ + case 382: /* column_alias */ + case 389: /* cgroup_name */ + case 394: /* stream_name */ + case 403: /* table_alias */ + case 409: /* star_func */ + case 411: /* noarg_func */ + case 429: /* alias_opt */ { } break; - case 330: /* sysinfo_opt */ + case 331: /* sysinfo_opt */ { } break; - case 331: /* privileges */ - case 333: /* priv_type_list */ - case 334: /* priv_type */ + case 332: /* privileges */ + case 334: /* priv_type_list */ + case 335: /* priv_type */ { } break; - case 338: /* force_opt */ - case 339: /* not_exists_opt */ - case 341: /* exists_opt */ - case 389: /* analyze_opt */ - case 391: /* agg_func_opt */ - case 434: /* set_quantifier_opt */ + case 339: /* force_opt */ + case 340: /* not_exists_opt */ + case 342: /* exists_opt */ + case 390: /* analyze_opt */ + case 392: /* agg_func_opt */ + case 435: /* set_quantifier_opt */ { } break; - case 344: /* integer_list */ - case 345: /* variable_list */ - case 346: /* retention_list */ - case 350: /* column_def_list */ - case 351: /* tags_def_opt */ - case 353: /* multi_create_clause */ - case 354: /* tags_def */ - case 355: /* multi_drop_clause */ - case 362: /* specific_cols_opt */ - case 363: /* expression_list */ - case 365: /* col_name_list */ - case 368: /* duration_list */ - case 369: /* rollup_func_list */ - case 379: /* tag_list_opt */ - case 383: /* func_list */ - case 397: /* dnode_list */ - case 401: /* literal_list */ - case 409: /* star_func_para_list */ - case 411: /* other_para_list */ - case 413: /* when_then_list */ - case 435: /* select_list */ - case 436: /* partition_by_clause_opt */ - case 441: /* group_by_clause_opt */ - case 444: /* partition_list */ - case 447: /* group_by_list */ - case 450: /* order_by_clause_opt */ - case 455: /* sort_specification_list */ + case 345: /* integer_list */ + case 346: /* variable_list */ + case 347: /* retention_list */ + case 351: /* column_def_list */ + case 352: /* tags_def_opt */ + case 354: /* multi_create_clause */ + case 355: /* tags_def */ + case 356: /* multi_drop_clause */ + case 363: /* specific_cols_opt */ + case 364: /* expression_list */ + case 366: /* col_name_list */ + case 369: /* duration_list */ + case 370: /* rollup_func_list */ + case 380: /* tag_list_opt */ + case 384: /* func_list */ + case 398: /* dnode_list */ + case 402: /* literal_list */ + case 410: /* star_func_para_list */ + case 412: /* other_para_list */ + case 414: /* when_then_list */ + case 436: /* select_list */ + case 437: /* partition_by_clause_opt */ + case 442: /* group_by_clause_opt */ + case 445: /* partition_list */ + case 448: /* group_by_list */ + case 451: /* order_by_clause_opt */ + case 456: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy874)); + nodesDestroyList((yypminor->yy424)); } break; - case 347: /* alter_db_option */ - case 370: /* alter_table_option */ + case 348: /* alter_db_option */ + case 371: /* alter_table_option */ { } break; - case 359: /* type_name */ + case 360: /* type_name */ { } break; - case 418: /* compare_op */ - case 419: /* in_op */ + case 419: /* compare_op */ + case 420: /* in_op */ { } break; - case 431: /* join_type */ + case 432: /* join_type */ { } break; - case 446: /* fill_mode */ + case 447: /* fill_mode */ { } break; - case 457: /* ordering_specification_opt */ + case 458: /* ordering_specification_opt */ { } break; - case 458: /* null_ordering_opt */ + case 459: /* null_ordering_opt */ { } @@ -2800,15 +2916,18 @@ static YYACTIONTYPE yy_find_shift_action( do{ i = yy_shift_ofst[stateno]; assert( i>=0 ); - /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ + assert( i<=YY_ACTTAB_COUNT ); + assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); assert( iLookAhead!=YYNOCODE ); assert( iLookAhead < YYNTOKEN ); i += iLookAhead; - if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ + assert( i<(int)YY_NLOOKAHEAD ); + if( yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ - if( iLookAhead %s\n", @@ -2823,16 +2942,8 @@ static YYACTIONTYPE yy_find_shift_action( #ifdef YYWILDCARD { int j = i - iLookAhead + YYWILDCARD; - if( -#if YY_SHIFT_MIN+YYWILDCARD<0 - j>=0 && -#endif -#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT - j0 - ){ + assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) ); + if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", @@ -2846,6 +2957,7 @@ static YYACTIONTYPE yy_find_shift_action( #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ + assert( i>=0 && iyytos; #ifndef NDEBUG if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ - yysize = yyRuleInfo[yyruleno].nrhs; + yysize = yyRuleInfoNRhs[yyruleno]; if( yysize ){ - fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", + fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n", yyTracePrompt, - yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); + yyruleno, yyRuleName[yyruleno], + yyrulenoyytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; @@ -3599,11 +4257,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,325,&yymsp[0].minor); + yy_destructor(yypParser,326,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,326,&yymsp[0].minor); + yy_destructor(yypParser,327,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3617,20 +4275,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,325,&yymsp[-2].minor); +{ yy_destructor(yypParser,326,&yymsp[-2].minor); { } - yy_destructor(yypParser,327,&yymsp[0].minor); + yy_destructor(yypParser,328,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,328,&yymsp[0].minor); +{ yy_destructor(yypParser,329,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,326,&yymsp[-1].minor); +{ yy_destructor(yypParser,327,&yymsp[-1].minor); { } - yy_destructor(yypParser,328,&yymsp[0].minor); + yy_destructor(yypParser,329,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3644,80 +4302,80 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,327,&yymsp[0].minor); + yy_destructor(yypParser,328,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy317, &yymsp[-1].minor.yy0, yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy849, &yymsp[-1].minor.yy0, yymsp[0].minor.yy383); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy849); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy449 = 1; } +{ yymsp[1].minor.yy383 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy449 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy383 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy869, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy869, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy531 = yymsp[0].minor.yy531; } - yymsp[0].minor.yy531 = yylhsminor.yy531; +{ yylhsminor.yy869 = yymsp[0].minor.yy869; } + yymsp[0].minor.yy869 = yylhsminor.yy869; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy531 = yymsp[-2].minor.yy531 | yymsp[0].minor.yy531; } - yymsp[-2].minor.yy531 = yylhsminor.yy531; +{ yylhsminor.yy869 = yymsp[-2].minor.yy869 | yymsp[0].minor.yy869; } + yymsp[-2].minor.yy869 = yylhsminor.yy869; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_READ; } break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_WRITE; } break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy317 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy317 = yylhsminor.yy317; +{ yylhsminor.yy849 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy849 = yylhsminor.yy849; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy317 = yymsp[-2].minor.yy317; } - yymsp[-2].minor.yy317 = yylhsminor.yy317; +{ yylhsminor.yy849 = yymsp[-2].minor.yy849; } + yymsp[-2].minor.yy849 = yylhsminor.yy849; break; case 42: /* priv_level ::= topic_name */ - case 456: /* alias_opt ::= table_alias */ yytestcase(yyruleno==456); -{ yylhsminor.yy317 = yymsp[0].minor.yy317; } - yymsp[0].minor.yy317 = yylhsminor.yy317; + case 457: /* alias_opt ::= table_alias */ yytestcase(yyruleno==457); +{ yylhsminor.yy849 = yymsp[0].minor.yy849; } + yymsp[0].minor.yy849 = yylhsminor.yy849; break; case 43: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy317, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy849, NULL); } break; case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0); } break; case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy335); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy57); } break; case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy335); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy57); } break; case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3744,35 +4402,35 @@ static YYACTIONTYPE yy_reduce( case 350: /* topic_name ::= NK_ID */ yytestcase(yyruleno==350); case 351: /* stream_name ::= NK_ID */ yytestcase(yyruleno==351); case 352: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==352); - case 391: /* noarg_func ::= NOW */ yytestcase(yyruleno==391); - case 392: /* noarg_func ::= TODAY */ yytestcase(yyruleno==392); - case 393: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==393); - case 394: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==394); - case 395: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==395); - case 396: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==396); - case 397: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==397); - case 398: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==398); - case 399: /* noarg_func ::= USER */ yytestcase(yyruleno==399); - case 400: /* star_func ::= COUNT */ yytestcase(yyruleno==400); - case 401: /* star_func ::= FIRST */ yytestcase(yyruleno==401); - case 402: /* star_func ::= LAST */ yytestcase(yyruleno==402); - case 403: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==403); -{ yylhsminor.yy317 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy317 = yylhsminor.yy317; + case 392: /* noarg_func ::= NOW */ yytestcase(yyruleno==392); + case 393: /* noarg_func ::= TODAY */ yytestcase(yyruleno==393); + case 394: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==394); + case 395: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==395); + case 396: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==396); + case 397: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==397); + case 398: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==398); + case 399: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==399); + case 400: /* noarg_func ::= USER */ yytestcase(yyruleno==400); + case 401: /* star_func ::= COUNT */ yytestcase(yyruleno==401); + case 402: /* star_func ::= FIRST */ yytestcase(yyruleno==402); + case 403: /* star_func ::= LAST */ yytestcase(yyruleno==403); + case 404: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==404); +{ yylhsminor.yy849 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy849 = yylhsminor.yy849; break; case 54: /* force_opt ::= */ case 73: /* not_exists_opt ::= */ yytestcase(yyruleno==73); case 75: /* exists_opt ::= */ yytestcase(yyruleno==75); case 283: /* analyze_opt ::= */ yytestcase(yyruleno==283); case 290: /* agg_func_opt ::= */ yytestcase(yyruleno==290); - case 464: /* set_quantifier_opt ::= */ yytestcase(yyruleno==464); -{ yymsp[1].minor.yy335 = false; } + case 465: /* set_quantifier_opt ::= */ yytestcase(yyruleno==465); +{ yymsp[1].minor.yy57 = false; } break; case 55: /* force_opt ::= FORCE */ case 284: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==284); case 291: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==291); - case 465: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==465); -{ yymsp[0].minor.yy335 = true; } + case 466: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==466); +{ yymsp[0].minor.yy57 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3805,210 +4463,210 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy335, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy57, &yymsp[-1].minor.yy849, yymsp[0].minor.yy752); } break; case 67: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; case 68: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } break; case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy752); } break; case 70: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } break; case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy856); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy340); } break; case 72: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy335 = true; } +{ yymsp[-2].minor.yy57 = true; } break; case 74: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy335 = true; } +{ yymsp[-1].minor.yy57 = true; } break; case 76: /* db_options ::= */ -{ yymsp[1].minor.yy74 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy752 = createDefaultDatabaseOptions(pCxt); } break; case 77: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 78: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 79: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 80: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 81: /* db_options ::= db_options DURATION NK_INTEGER */ case 82: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==82); -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 83: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 84: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 85: /* db_options ::= db_options KEEP integer_list */ case 86: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==86); -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_KEEP, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_KEEP, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 87: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 88: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 89: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 90: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 91: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 92: /* db_options ::= db_options STRICT NK_STRING */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 93: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 94: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 95: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_RETENTIONS, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_RETENTIONS, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 96: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 97: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 98: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 100: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-3].minor.yy752, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 102: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-3].minor.yy752, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 103: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 104: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 105: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 106: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 107: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 108: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy74 = createAlterDatabaseOptions(pCxt); yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yylhsminor.yy74, &yymsp[0].minor.yy767); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterDatabaseOptions(pCxt); yylhsminor.yy752 = setAlterDatabaseOption(pCxt, yylhsminor.yy752, &yymsp[0].minor.yy5); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 109: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy74, &yymsp[0].minor.yy767); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy752, &yymsp[0].minor.yy5); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 110: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 111: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 113: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 114: /* alter_db_option ::= KEEP integer_list */ case 115: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==115); -{ yymsp[-1].minor.yy767.type = DB_OPTION_KEEP; yymsp[-1].minor.yy767.pList = yymsp[0].minor.yy874; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_KEEP; yymsp[-1].minor.yy5.pList = yymsp[0].minor.yy424; } break; case 116: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_PAGES; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_PAGES; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 117: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 118: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_WAL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_WAL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 119: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 120: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 121: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 313: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==313); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 122: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy874 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 123: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 124: /* retention_list ::= retention */ case 146: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==146); @@ -4019,13 +4677,13 @@ static YYACTIONTYPE yy_reduce( case 254: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==254); case 265: /* func_list ::= func */ yytestcase(yyruleno==265); case 341: /* literal_list ::= signed_literal */ yytestcase(yyruleno==341); - case 406: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==406); - case 412: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==412); - case 467: /* select_list ::= select_item */ yytestcase(yyruleno==467); - case 478: /* partition_list ::= partition_item */ yytestcase(yyruleno==478); - case 531: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==531); -{ yylhsminor.yy874 = createNodeList(pCxt, yymsp[0].minor.yy74); } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 407: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==407); + case 413: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==413); + case 468: /* select_list ::= select_item */ yytestcase(yyruleno==468); + case 479: /* partition_list ::= partition_item */ yytestcase(yyruleno==479); + case 532: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==532); +{ yylhsminor.yy424 = createNodeList(pCxt, yymsp[0].minor.yy752); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 125: /* retention_list ::= retention_list NK_COMMA retention */ case 157: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==157); @@ -4034,270 +4692,270 @@ static YYACTIONTYPE yy_reduce( case 255: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==255); case 266: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==266); case 342: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==342); - case 407: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==407); - case 468: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==468); - case 479: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==479); - case 532: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==532); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; + case 408: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==408); + case 469: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==469); + case 480: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==480); + case 533: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==533); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 126: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy74 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 127: /* speed_opt ::= */ case 292: /* bufsize_opt ::= */ yytestcase(yyruleno==292); -{ yymsp[1].minor.yy856 = 0; } +{ yymsp[1].minor.yy340 = 0; } break; case 128: /* speed_opt ::= MAX_SPEED NK_INTEGER */ case 293: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==293); -{ yymsp[-1].minor.yy856 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy340 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 129: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 131: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==131); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-5].minor.yy74, yymsp[-3].minor.yy874, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy57, yymsp[-5].minor.yy752, yymsp[-3].minor.yy424, yymsp[-1].minor.yy424, yymsp[0].minor.yy752); } break; case 130: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy874); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 132: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy874); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 133: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } break; case 134: /* cmd ::= ALTER TABLE alter_table_clause */ case 315: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==315); -{ pCxt->pRootNode = yymsp[0].minor.yy74; } +{ pCxt->pRootNode = yymsp[0].minor.yy752; } break; case 135: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy74); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy752); } break; case 136: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy74 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 137: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 138: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy317); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy752, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy849); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 139: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 140: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 141: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 142: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy317); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy752, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy849); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 143: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 144: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 145: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy74 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy74, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); } - yymsp[-5].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy752, &yymsp[-2].minor.yy849, yymsp[0].minor.yy752); } + yymsp[-5].minor.yy752 = yylhsminor.yy752; break; case 147: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 150: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==150); - case 413: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==413); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); } - yymsp[-1].minor.yy874 = yylhsminor.yy874; + case 414: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==414); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-1].minor.yy424, yymsp[0].minor.yy752); } + yymsp[-1].minor.yy424 = yylhsminor.yy424; break; case 148: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy74 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy335, yymsp[-8].minor.yy74, yymsp[-6].minor.yy74, yymsp[-5].minor.yy874, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } - yymsp[-9].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy57, yymsp[-8].minor.yy752, yymsp[-6].minor.yy752, yymsp[-5].minor.yy424, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } + yymsp[-9].minor.yy752 = yylhsminor.yy752; break; case 151: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy74 = createDropTableClause(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createDropTableClause(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 152: /* specific_cols_opt ::= */ case 183: /* tags_def_opt ::= */ yytestcase(yyruleno==183); case 253: /* tag_list_opt ::= */ yytestcase(yyruleno==253); - case 476: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==476); - case 499: /* group_by_clause_opt ::= */ yytestcase(yyruleno==499); - case 518: /* order_by_clause_opt ::= */ yytestcase(yyruleno==518); -{ yymsp[1].minor.yy874 = NULL; } + case 477: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==477); + case 500: /* group_by_clause_opt ::= */ yytestcase(yyruleno==500); + case 519: /* order_by_clause_opt ::= */ yytestcase(yyruleno==519); +{ yymsp[1].minor.yy424 = NULL; } break; case 153: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy874 = yymsp[-1].minor.yy874; } +{ yymsp[-2].minor.yy424 = yymsp[-1].minor.yy424; } break; case 154: /* full_table_name ::= table_name */ -{ yylhsminor.yy74 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy317, NULL); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy849, NULL); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 155: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy74 = createRealTableNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317, NULL); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createRealTableNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849, NULL); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 158: /* column_def ::= column_name type_name */ -{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898, NULL); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384, NULL); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 159: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-2].minor.yy898, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-2].minor.yy384, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 160: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 161: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 162: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 163: /* type_name ::= INT */ case 164: /* type_name ::= INTEGER */ yytestcase(yyruleno==164); -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_INT); } break; case 165: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 166: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 167: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 168: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 169: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 170: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 171: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 172: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 173: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 174: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 175: /* type_name ::= JSON */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 176: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 177: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 178: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 179: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 180: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 182: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 184: /* tags_def_opt ::= tags_def */ - case 405: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==405); -{ yylhsminor.yy874 = yymsp[0].minor.yy874; } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 406: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==406); +{ yylhsminor.yy424 = yymsp[0].minor.yy424; } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 185: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy874 = yymsp[-1].minor.yy874; } +{ yymsp[-3].minor.yy424 = yymsp[-1].minor.yy424; } break; case 186: /* table_options ::= */ -{ yymsp[1].minor.yy74 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy752 = createDefaultTableOptions(pCxt); } break; case 187: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 188: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 189: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 190: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy874); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-4].minor.yy752, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 191: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 192: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_SMA, yymsp[-1].minor.yy874); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-4].minor.yy752, TABLE_OPTION_SMA, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 193: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 194: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy74 = createAlterTableOptions(pCxt); yylhsminor.yy74 = setTableOption(pCxt, yylhsminor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableOptions(pCxt); yylhsminor.yy752 = setTableOption(pCxt, yylhsminor.yy752, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 195: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 196: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy767.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 197: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 198: /* duration_list ::= duration_literal */ case 370: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==370); -{ yylhsminor.yy874 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 199: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 371: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==371); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 202: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy317, NULL); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[0].minor.yy849, NULL); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 203: /* rollup_func_name ::= FIRST */ case 204: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==204); case 257: /* tag_item ::= QTAGS */ yytestcase(yyruleno==257); -{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 207: /* col_name ::= column_name */ case 258: /* tag_item ::= column_name */ yytestcase(yyruleno==258); -{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy317); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy849); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 208: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -4312,13 +4970,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 212: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, OP_TYPE_LIKE); } break; case 213: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, OP_TYPE_LIKE); } break; case 214: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy74, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy752, NULL, OP_TYPE_LIKE); } break; case 215: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -4330,7 +4988,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 218: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy752, yymsp[-1].minor.yy752, OP_TYPE_EQUAL); } break; case 219: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -4349,13 +5007,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 225: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } break; case 226: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy752); } break; case 227: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy752); } break; case 228: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4374,7 +5032,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; case 234: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy752); } break; case 235: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } @@ -4389,7 +5047,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; case 239: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy752); } break; case 240: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4398,10 +5056,10 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; case 242: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy752, yymsp[-1].minor.yy752, OP_TYPE_EQUAL); } break; case 243: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74, yymsp[-3].minor.yy874); } +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752, yymsp[-3].minor.yy424); } break; case 244: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } @@ -4411,160 +5069,160 @@ static YYACTIONTYPE yy_reduce( break; case 246: /* db_name_cond_opt ::= */ case 251: /* from_db_opt ::= */ yytestcase(yyruleno==251); -{ yymsp[1].minor.yy74 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy752 = createDefaultDatabaseCondValue(pCxt); } break; case 247: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy317); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 248: /* like_pattern_opt ::= */ case 303: /* subtable_opt ::= */ yytestcase(yyruleno==303); - case 415: /* case_when_else_opt ::= */ yytestcase(yyruleno==415); - case 445: /* from_clause_opt ::= */ yytestcase(yyruleno==445); - case 474: /* where_clause_opt ::= */ yytestcase(yyruleno==474); - case 483: /* twindow_clause_opt ::= */ yytestcase(yyruleno==483); - case 489: /* sliding_opt ::= */ yytestcase(yyruleno==489); - case 491: /* fill_opt ::= */ yytestcase(yyruleno==491); - case 503: /* having_clause_opt ::= */ yytestcase(yyruleno==503); - case 505: /* range_opt ::= */ yytestcase(yyruleno==505); - case 507: /* every_opt ::= */ yytestcase(yyruleno==507); - case 520: /* slimit_clause_opt ::= */ yytestcase(yyruleno==520); - case 524: /* limit_clause_opt ::= */ yytestcase(yyruleno==524); -{ yymsp[1].minor.yy74 = NULL; } + case 416: /* case_when_else_opt ::= */ yytestcase(yyruleno==416); + case 446: /* from_clause_opt ::= */ yytestcase(yyruleno==446); + case 475: /* where_clause_opt ::= */ yytestcase(yyruleno==475); + case 484: /* twindow_clause_opt ::= */ yytestcase(yyruleno==484); + 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); +{ yymsp[1].minor.yy752 = NULL; } break; case 249: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 250: /* table_name_cond ::= table_name */ -{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy849); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 252: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); } +{ yymsp[-1].minor.yy752 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy849); } break; case 256: /* tag_item ::= TBNAME */ -{ yylhsminor.yy74 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 259: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy317), &yymsp[0].minor.yy317); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy849), &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 260: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy317), &yymsp[0].minor.yy317); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy849), &yymsp[0].minor.yy849); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 261: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy335, yymsp[-3].minor.yy74, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy57, yymsp[-3].minor.yy752, yymsp[-1].minor.yy752, NULL, yymsp[0].minor.yy752); } break; case 262: /* cmd ::= DROP INDEX exists_opt full_table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } break; case 263: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy74 = createIndexOption(pCxt, yymsp[-7].minor.yy874, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } +{ yymsp[-9].minor.yy752 = createIndexOption(pCxt, yymsp[-7].minor.yy424, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; case 264: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy74 = createIndexOption(pCxt, yymsp[-9].minor.yy874, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } +{ yymsp[-11].minor.yy752 = createIndexOption(pCxt, yymsp[-9].minor.yy424, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; case 267: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-1].minor.yy874); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-1].minor.yy424); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 268: /* sma_stream_opt ::= */ case 296: /* stream_options ::= */ yytestcase(yyruleno==296); -{ yymsp[1].minor.yy74 = createStreamOptions(pCxt); } +{ yymsp[1].minor.yy752 = createStreamOptions(pCxt); } break; case 269: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ case 300: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==300); -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 270: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 271: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 272: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy57, &yymsp[-2].minor.yy849, yymsp[0].minor.yy752); } break; case 273: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, &yymsp[0].minor.yy317, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy57, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy849, false); } break; case 274: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[0].minor.yy317, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy57, &yymsp[-5].minor.yy849, &yymsp[0].minor.yy849, true); } break; case 275: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, yymsp[0].minor.yy74, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy57, &yymsp[-3].minor.yy849, yymsp[0].minor.yy752, false); } break; case 276: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, yymsp[0].minor.yy74, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy57, &yymsp[-5].minor.yy849, yymsp[0].minor.yy752, true); } break; case 277: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; case 278: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy57, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } break; case 279: /* cmd ::= DESC full_table_name */ case 280: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==280); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy752); } break; case 281: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 282: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy335, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy57, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; case 285: /* explain_options ::= */ -{ yymsp[1].minor.yy74 = createDefaultExplainOptions(pCxt); } +{ yymsp[1].minor.yy752 = createDefaultExplainOptions(pCxt); } break; case 286: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy74 = setExplainVerbose(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setExplainVerbose(pCxt, yymsp[-2].minor.yy752, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 287: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy74 = setExplainRatio(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setExplainRatio(pCxt, yymsp[-2].minor.yy752, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 288: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-8].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy898, yymsp[0].minor.yy856); } +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy57, yymsp[-8].minor.yy57, &yymsp[-5].minor.yy849, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy384, yymsp[0].minor.yy340); } break; case 289: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; case 294: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy335, &yymsp[-7].minor.yy317, yymsp[-4].minor.yy74, yymsp[-6].minor.yy74, yymsp[-3].minor.yy874, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy57, &yymsp[-7].minor.yy849, yymsp[-4].minor.yy752, yymsp[-6].minor.yy752, yymsp[-3].minor.yy424, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } break; case 295: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; case 297: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 298: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 299: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy74)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-3].minor.yy74; } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ ((SStreamOptions*)yymsp[-3].minor.yy752)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy752)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-3].minor.yy752; } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 301: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-3].minor.yy74)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-3].minor.yy74; } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ ((SStreamOptions*)yymsp[-3].minor.yy752)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy752 = yymsp[-3].minor.yy752; } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 302: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ ((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; +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 304: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 490: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==490); - case 508: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==508); -{ yymsp[-3].minor.yy74 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy74); } + 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); +{ yymsp[-3].minor.yy752 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy752); } break; case 305: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } @@ -4582,42 +5240,42 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 310: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy874); } +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy424); } break; case 311: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 312: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +{ yymsp[-1].minor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 314: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; case 316: /* 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); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy752, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } break; case 317: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy752, NULL, yymsp[0].minor.yy752); } break; case 318: /* 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; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 319: /* 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; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 320: /* 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; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 321: /* 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; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 322: /* 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; +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 323: /* literal ::= duration_literal */ case 333: /* signed_literal ::= signed */ yytestcase(yyruleno==333); @@ -4627,184 +5285,184 @@ static YYACTIONTYPE yy_reduce( case 356: /* expression ::= column_reference */ yytestcase(yyruleno==356); case 357: /* expression ::= function_expression */ yytestcase(yyruleno==357); case 358: /* expression ::= case_when_expression */ yytestcase(yyruleno==358); - case 388: /* function_expression ::= literal_func */ yytestcase(yyruleno==388); - case 437: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==437); - case 441: /* boolean_primary ::= predicate */ yytestcase(yyruleno==441); - case 443: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==443); - case 444: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==444); - case 447: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==447); - case 449: /* table_reference ::= table_primary */ yytestcase(yyruleno==449); - case 450: /* table_reference ::= joined_table */ yytestcase(yyruleno==450); - case 454: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==454); - case 510: /* query_simple ::= query_specification */ yytestcase(yyruleno==510); - case 511: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==511); - case 514: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==514); - case 516: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==516); -{ yylhsminor.yy74 = yymsp[0].minor.yy74; } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 389: /* function_expression ::= literal_func */ yytestcase(yyruleno==389); + case 438: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==438); + case 442: /* boolean_primary ::= predicate */ yytestcase(yyruleno==442); + case 444: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==444); + case 445: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==445); + case 448: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==448); + case 450: /* table_reference ::= table_primary */ yytestcase(yyruleno==450); + case 451: /* table_reference ::= joined_table */ yytestcase(yyruleno==451); + case 455: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==455); + 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); +{ yylhsminor.yy752 = yymsp[0].minor.yy752; } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 324: /* 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; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 325: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 326: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 327: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 328: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; case 329: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 330: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 331: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 332: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 334: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 335: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 336: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 337: /* signed_literal ::= duration_literal */ case 339: /* signed_literal ::= literal_func */ yytestcase(yyruleno==339); - case 408: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==408); - case 470: /* select_item ::= common_expression */ yytestcase(yyruleno==470); - case 480: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==480); - case 515: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==515); - case 517: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==517); - case 530: /* search_condition ::= common_expression */ yytestcase(yyruleno==530); -{ yylhsminor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 409: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==409); + case 471: /* select_item ::= common_expression */ yytestcase(yyruleno==471); + case 481: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==481); + 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); +{ yylhsminor.yy752 = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 338: /* signed_literal ::= NULL */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 340: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy74 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 359: /* expression ::= NK_LP expression NK_RP */ - case 442: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==442); - case 529: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==529); -{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 443: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==443); + case 530: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==530); +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 360: /* 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)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 361: /* 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)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy752), NULL)); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 362: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 363: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 364: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 365: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 366: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 367: /* 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))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 368: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 369: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 372: /* 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; +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy849, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy849)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 373: /* 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; +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849, createColumnNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 374: /* pseudo_column ::= ROWTS */ case 375: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==375); @@ -4815,340 +5473,341 @@ static YYACTIONTYPE yy_reduce( case 381: /* pseudo_column ::= WEND */ yytestcase(yyruleno==381); case 382: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==382); case 383: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==383); - case 384: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==384); - case 390: /* literal_func ::= NOW */ yytestcase(yyruleno==390); -{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 384: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==384); + case 385: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==385); + case 391: /* literal_func ::= NOW */ yytestcase(yyruleno==391); +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 376: /* 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; +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy849)))); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 385: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 386: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==386); -{ 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; + case 386: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 387: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==387); +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-1].minor.yy424)); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 387: /* 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; + case 388: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy384)); } + yymsp[-5].minor.yy752 = yylhsminor.yy752; break; - case 389: /* 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; + case 390: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy849, NULL)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 404: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy874 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 405: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy424 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 409: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 473: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==473); -{ yylhsminor.yy74 = createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 410: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 474: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==474); +{ yylhsminor.yy752 = createColumnNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 410: /* 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; + case 411: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy424, yymsp[-1].minor.yy752)); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 411: /* 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; + case 412: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-2].minor.yy424, yymsp[-1].minor.yy752)); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; - case 414: /* 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)); } + case 415: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy752 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } break; - case 416: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } + case 417: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy752 = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); } break; - case 417: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 422: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==422); + case 418: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 423: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==423); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy20, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy620, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 418: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 419: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy752), releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; - case 419: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 420: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-5].minor.yy74 = yylhsminor.yy74; + yymsp[-5].minor.yy752 = yylhsminor.yy752; break; - case 420: /* predicate ::= expr_or_subquery IS NULL */ + case 421: /* 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)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), NULL)); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 421: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 422: /* 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)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL)); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 423: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; } + case 424: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy620 = OP_TYPE_LOWER_THAN; } break; - case 424: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_THAN; } + case 425: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy620 = OP_TYPE_GREATER_THAN; } break; - case 425: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_EQUAL; } + case 426: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy620 = OP_TYPE_LOWER_EQUAL; } break; - case 426: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_EQUAL; } + case 427: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy620 = OP_TYPE_GREATER_EQUAL; } break; - case 427: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy20 = OP_TYPE_NOT_EQUAL; } + case 428: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy620 = OP_TYPE_NOT_EQUAL; } break; - case 428: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy20 = OP_TYPE_EQUAL; } + case 429: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy620 = OP_TYPE_EQUAL; } break; - case 429: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy20 = OP_TYPE_LIKE; } + case 430: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy620 = OP_TYPE_LIKE; } break; - case 430: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_LIKE; } + case 431: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy620 = OP_TYPE_NOT_LIKE; } break; - case 431: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy20 = OP_TYPE_MATCH; } + case 432: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy620 = OP_TYPE_MATCH; } break; - case 432: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy20 = OP_TYPE_NMATCH; } + case 433: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy620 = OP_TYPE_NMATCH; } break; - case 433: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy20 = OP_TYPE_JSON_CONTAINS; } + case 434: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy620 = OP_TYPE_JSON_CONTAINS; } break; - case 434: /* in_op ::= IN */ -{ yymsp[0].minor.yy20 = OP_TYPE_IN; } + case 435: /* in_op ::= IN */ +{ yymsp[0].minor.yy620 = OP_TYPE_IN; } break; - case 435: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; } + case 436: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy620 = OP_TYPE_NOT_IN; } break; - case 436: /* 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; + case 437: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 438: /* boolean_value_expression ::= NOT boolean_primary */ + case 439: /* 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)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy752), NULL)); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 439: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 440: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 440: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 441: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 446: /* from_clause_opt ::= FROM table_reference_list */ - case 475: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==475); - case 504: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==504); -{ yymsp[-1].minor.yy74 = yymsp[0].minor.yy74; } + case 447: /* from_clause_opt ::= FROM table_reference_list */ + case 476: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==476); + case 505: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==505); +{ yymsp[-1].minor.yy752 = yymsp[0].minor.yy752; } break; - case 448: /* 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; + case 449: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy752 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, NULL); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 451: /* 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; + case 452: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy752 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 452: /* 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; + case 453: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy752 = createRealTableNode(pCxt, &yymsp[-3].minor.yy849, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 453: /* 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; + case 454: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy752 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752), &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 455: /* alias_opt ::= */ -{ yymsp[1].minor.yy317 = nil_token; } + case 456: /* alias_opt ::= */ +{ yymsp[1].minor.yy849 = nil_token; } break; - case 457: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy317 = yymsp[0].minor.yy317; } + case 458: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy849 = yymsp[0].minor.yy849; } break; - case 458: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 459: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==459); -{ yymsp[-2].minor.yy74 = yymsp[-1].minor.yy74; } + case 459: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 460: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==460); +{ yymsp[-2].minor.yy752 = yymsp[-1].minor.yy752; } break; - case 460: /* 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; + case 461: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy752 = createJoinTableNode(pCxt, yymsp[-4].minor.yy332, yymsp[-5].minor.yy752, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-5].minor.yy752 = yylhsminor.yy752; break; - case 461: /* join_type ::= */ -{ yymsp[1].minor.yy630 = JOIN_TYPE_INNER; } + case 462: /* join_type ::= */ +{ yymsp[1].minor.yy332 = JOIN_TYPE_INNER; } break; - case 462: /* join_type ::= INNER */ -{ yymsp[0].minor.yy630 = JOIN_TYPE_INNER; } + case 463: /* join_type ::= INNER */ +{ yymsp[0].minor.yy332 = JOIN_TYPE_INNER; } break; - case 463: /* 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 464: /* 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); - yymsp[-11].minor.yy74 = addPartitionByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-6].minor.yy874); - yymsp[-11].minor.yy74 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy74, yymsp[-2].minor.yy74); - yymsp[-11].minor.yy74 = addGroupByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-1].minor.yy874); - yymsp[-11].minor.yy74 = addHavingClause(pCxt, yymsp[-11].minor.yy74, yymsp[0].minor.yy74); - yymsp[-11].minor.yy74 = addRangeClause(pCxt, yymsp[-11].minor.yy74, yymsp[-5].minor.yy74); - yymsp[-11].minor.yy74 = addEveryClause(pCxt, yymsp[-11].minor.yy74, yymsp[-4].minor.yy74); - yymsp[-11].minor.yy74 = addFillClause(pCxt, yymsp[-11].minor.yy74, yymsp[-3].minor.yy74); + yymsp[-11].minor.yy752 = createSelectStmt(pCxt, yymsp[-10].minor.yy57, yymsp[-9].minor.yy424, yymsp[-8].minor.yy752); + yymsp[-11].minor.yy752 = addWhereClause(pCxt, yymsp[-11].minor.yy752, yymsp[-7].minor.yy752); + yymsp[-11].minor.yy752 = addPartitionByClause(pCxt, yymsp[-11].minor.yy752, yymsp[-6].minor.yy424); + yymsp[-11].minor.yy752 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy752, yymsp[-2].minor.yy752); + yymsp[-11].minor.yy752 = addGroupByClause(pCxt, yymsp[-11].minor.yy752, yymsp[-1].minor.yy424); + yymsp[-11].minor.yy752 = addHavingClause(pCxt, yymsp[-11].minor.yy752, yymsp[0].minor.yy752); + yymsp[-11].minor.yy752 = addRangeClause(pCxt, yymsp[-11].minor.yy752, yymsp[-5].minor.yy752); + yymsp[-11].minor.yy752 = addEveryClause(pCxt, yymsp[-11].minor.yy752, yymsp[-4].minor.yy752); + yymsp[-11].minor.yy752 = addFillClause(pCxt, yymsp[-11].minor.yy752, yymsp[-3].minor.yy752); } break; - case 466: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy335 = false; } + case 467: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy57 = false; } break; - case 469: /* select_item ::= NK_STAR */ -{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 470: /* select_item ::= NK_STAR */ +{ yylhsminor.yy752 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 471: /* select_item ::= common_expression column_alias */ - case 481: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==481); -{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + case 472: /* select_item ::= common_expression column_alias */ + case 482: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==482); +{ yylhsminor.yy752 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752), &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 472: /* select_item ::= common_expression AS column_alias */ - case 482: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==482); -{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), &yymsp[0].minor.yy317); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 473: /* select_item ::= common_expression AS column_alias */ + case 483: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==483); +{ yylhsminor.yy752 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), &yymsp[0].minor.yy849); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 477: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 500: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==500); - case 519: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==519); -{ yymsp[-2].minor.yy874 = yymsp[0].minor.yy874; } + case 478: /* 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); +{ yymsp[-2].minor.yy424 = yymsp[0].minor.yy424; } break; - case 484: /* 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)); } + case 485: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy752 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } break; - case 485: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy74 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } + case 486: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy752 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } break; - case 486: /* 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); } + case 487: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy752 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; - case 487: /* 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); } + case 488: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy752 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; - case 488: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy74 = createEventWindowNode(pCxt, yymsp[-3].minor.yy74, yymsp[0].minor.yy74); } + case 489: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy752 = createEventWindowNode(pCxt, yymsp[-3].minor.yy752, yymsp[0].minor.yy752); } break; - case 492: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy74 = createFillNode(pCxt, yymsp[-1].minor.yy828, NULL); } + case 493: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy752 = createFillNode(pCxt, yymsp[-1].minor.yy214, NULL); } break; - case 493: /* 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)); } + case 494: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy752 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } break; - case 494: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy828 = FILL_MODE_NONE; } + case 495: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy214 = FILL_MODE_NONE; } break; - case 495: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy828 = FILL_MODE_PREV; } + case 496: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy214 = FILL_MODE_PREV; } break; - case 496: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy828 = FILL_MODE_NULL; } + case 497: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy214 = FILL_MODE_NULL; } break; - case 497: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy828 = FILL_MODE_LINEAR; } + case 498: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy214 = FILL_MODE_LINEAR; } break; - case 498: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy828 = FILL_MODE_NEXT; } + case 499: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy214 = FILL_MODE_NEXT; } break; - case 501: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy874 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 502: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy424 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 502: /* 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; + case 503: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; - case 506: /* 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)); } + case 507: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy752 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } break; - case 509: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 510: /* 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); - yylhsminor.yy74 = addLimitClause(pCxt, yylhsminor.yy74, yymsp[0].minor.yy74); + yylhsminor.yy752 = addOrderByClause(pCxt, yymsp[-3].minor.yy752, yymsp[-2].minor.yy424); + yylhsminor.yy752 = addSlimitClause(pCxt, yylhsminor.yy752, yymsp[-1].minor.yy752); + yylhsminor.yy752 = addLimitClause(pCxt, yylhsminor.yy752, yymsp[0].minor.yy752); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 512: /* 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; + case 513: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy752 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 513: /* 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; + case 514: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy752 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 521: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 525: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==525); -{ yymsp[-1].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==526); +{ yymsp[-1].minor.yy752 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==526); -{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + 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); +{ yymsp[-3].minor.yy752 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 523: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 527: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==527); -{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + 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); +{ yymsp[-3].minor.yy752 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 528: /* 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; + case 529: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy752); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 533: /* 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; + case 534: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy752 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), yymsp[-1].minor.yy538, yymsp[0].minor.yy777); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 534: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy326 = ORDER_ASC; } + case 535: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy538 = ORDER_ASC; } break; - case 535: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy326 = ORDER_ASC; } + case 536: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy538 = ORDER_ASC; } break; - case 536: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy326 = ORDER_DESC; } + case 537: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy538 = ORDER_DESC; } break; - case 537: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; } + case 538: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy777 = NULL_ORDER_DEFAULT; } break; - case 538: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; } + case 539: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy777 = NULL_ORDER_FIRST; } break; - case 539: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy109 = NULL_ORDER_LAST; } + case 540: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy777 = NULL_ORDER_LAST; } break; default: break; /********** End reduce actions ************************************************/ }; - assert( yyruleno Date: Wed, 14 Dec 2022 16:23:49 +0800 Subject: [PATCH 05/64] feat(query): add _isfilled pseudocolumn to indicate data is origin or filled. --- include/libs/function/functionMgt.h | 1 + source/libs/function/src/builtins.c | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/include/libs/function/functionMgt.h b/include/libs/function/functionMgt.h index 9ca6a7a9fa..e98e341f15 100644 --- a/include/libs/function/functionMgt.h +++ b/include/libs/function/functionMgt.h @@ -120,6 +120,7 @@ typedef enum EFunctionType { FUNCTION_TYPE_WEND, FUNCTION_TYPE_WDURATION, FUNCTION_TYPE_IROWTS, + FUNCTION_TYPE_ISFILLED, FUNCTION_TYPE_TAGS, // internal function diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index 07e480ee1d..06406d158f 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -466,7 +466,7 @@ static int32_t translateStddevMerge(SFunctionNode* pFunc, char* pErrBuf, int32_t static int32_t translateWduration(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // pseudo column do not need to check parameters - pFunc->node.resType = (SDataType){.bytes = sizeof(int64_t), .type = TSDB_DATA_TYPE_BIGINT}; + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BIGINT].bytes, .type = TSDB_DATA_TYPE_BIGINT}; return TSDB_CODE_SUCCESS; } @@ -480,14 +480,21 @@ static int32_t translateNowToday(SFunctionNode* pFunc, char* pErrBuf, int32_t le return code; } - pFunc->node.resType = (SDataType){.bytes = sizeof(int64_t), .type = TSDB_DATA_TYPE_TIMESTAMP}; + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes, .type = TSDB_DATA_TYPE_TIMESTAMP}; return TSDB_CODE_SUCCESS; } static int32_t translateTimePseudoColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { // pseudo column do not need to check parameters - pFunc->node.resType = (SDataType){.bytes = sizeof(int64_t), .type = TSDB_DATA_TYPE_TIMESTAMP}; + pFunc->node.resType = (SDataType){.bytes =tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes, .type = TSDB_DATA_TYPE_TIMESTAMP}; + return TSDB_CODE_SUCCESS; +} + +static int32_t translateIsFilledPseudoColumn(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + // pseudo column do not need to check parameters + + pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes, .type = TSDB_DATA_TYPE_BOOL}; return TSDB_CODE_SUCCESS; } @@ -3254,6 +3261,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = NULL, .finalizeFunc = NULL }, + { + .name = "_isfilled", + .type = FUNCTION_TYPE_ISFILLED, + .classification = FUNC_MGT_PSEUDO_COLUMN_FUNC | FUNC_MGT_INTERP_PC_FUNC, + .translateFunc = translateIsFilledPseudoColumn, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = NULL, + .finalizeFunc = NULL + }, { .name = "_tags", .type = FUNCTION_TYPE_TAGS, From 702054c3453a26f63283c6547614c5eb585122e6 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Wed, 14 Dec 2022 16:23:49 +0800 Subject: [PATCH 06/64] feat(query): add _isfilled pseudocolumn to indicate data is origin or filled. --- include/common/ttypes.h | 1 + source/libs/executor/src/timesliceoperator.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/common/ttypes.h b/include/common/ttypes.h index 6350057c1f..d0f72fbfe5 100644 --- a/include/common/ttypes.h +++ b/include/common/ttypes.h @@ -266,6 +266,7 @@ typedef struct { #define IS_FLOAT_TYPE(_t) ((_t) == TSDB_DATA_TYPE_FLOAT || (_t) == TSDB_DATA_TYPE_DOUBLE) #define IS_INTEGER_TYPE(_t) ((IS_SIGNED_NUMERIC_TYPE(_t)) || (IS_UNSIGNED_NUMERIC_TYPE(_t))) #define IS_TIMESTAMP_TYPE(_t) ((_t) == TSDB_DATA_TYPE_TIMESTAMP) +#define IS_BOOLEAN_TYPE(_t) ((_t) == TSDB_DATA_TYPE_BOOL) #define IS_NUMERIC_TYPE(_t) ((IS_SIGNED_NUMERIC_TYPE(_t)) || (IS_UNSIGNED_NUMERIC_TYPE(_t)) || (IS_FLOAT_TYPE(_t))) #define IS_MATHABLE_TYPE(_t) \ diff --git a/source/libs/executor/src/timesliceoperator.c b/source/libs/executor/src/timesliceoperator.c index a82dc13318..8db03f99c5 100644 --- a/source/libs/executor/src/timesliceoperator.c +++ b/source/libs/executor/src/timesliceoperator.c @@ -163,6 +163,10 @@ static bool genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp if (IS_TIMESTAMP_TYPE(pExprInfo->base.resSchema.type)) { colDataAppend(pDst, rows, (char*)&pSliceInfo->current, false); continue; + } else if (IS_BOOLEAN_TYPE(pExprInfo->base.resSchema.type)) { + bool isFilled = true; + colDataAppend(pDst, pResBlock->info.rows, (char*)&isFilled, false); + continue; } int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; @@ -274,6 +278,9 @@ static void addCurrentRowToResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp* if (IS_TIMESTAMP_TYPE(pExprInfo->base.resSchema.type)) { colDataAppend(pDst, pResBlock->info.rows, (char*)&pSliceInfo->current, false); + } else if (IS_BOOLEAN_TYPE(pExprInfo->base.resSchema.type)) { + bool isFilled = false; + colDataAppend(pDst, pResBlock->info.rows, (char*)&isFilled, false); } else { int32_t srcSlot = pExprInfo->base.pParam[0].pCol->slotId; SColumnInfoData* pSrc = taosArrayGet(pSrcBlock->pDataBlock, srcSlot); From 17542879b234ed10e2f02164e11578aa8232cdce Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 15 Dec 2022 10:55:11 +0800 Subject: [PATCH 07/64] add test cases --- source/libs/planner/test/planBasicTest.cpp | 2 + tests/system-test/2-query/interp.py | 273 +++++++++++++++++---- 2 files changed, 226 insertions(+), 49 deletions(-) diff --git a/source/libs/planner/test/planBasicTest.cpp b/source/libs/planner/test/planBasicTest.cpp index 150df76416..10ab71ab0e 100644 --- a/source/libs/planner/test/planBasicTest.cpp +++ b/source/libs/planner/test/planBasicTest.cpp @@ -104,6 +104,8 @@ TEST_F(PlanBasicTest, interpFunc) { run("SELECT _IROWTS, INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); + run("SELECT _IROWTS, INTERP(c1), _ISFILLED FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); + run("SELECT TBNAME, _IROWTS, INTERP(c1) FROM t1 PARTITION BY TBNAME " "RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); } diff --git a/tests/system-test/2-query/interp.py b/tests/system-test/2-query/interp.py index ce57357abd..5077b70d72 100644 --- a/tests/system-test/2-query/interp.py +++ b/tests/system-test/2-query/interp.py @@ -362,12 +362,12 @@ class TDTestCase: tdSql.query(f"select interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:16', '2020-02-01 00:00:19') every(1s) fill(linear)") tdSql.checkRows(0) - tdLog.printNoPrefix("==========step8:test _irowts with interp") + tdLog.printNoPrefix("==========step8:test _irowts,_isfilled with interp") # fill null - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(null)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(null)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -379,9 +379,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(null)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(null)") tdSql.checkRows(13) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:04.000') tdSql.checkData(1, 0, '2020-02-01 00:00:05.000') @@ -397,9 +407,23 @@ class TDTestCase: tdSql.checkData(11, 0, '2020-02-01 00:00:15.000') tdSql.checkData(12, 0, '2020-02-01 00:00:16.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(null)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, False) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, False) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, True) + tdSql.checkData(11, 1, False) + tdSql.checkData(12, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(null)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -408,10 +432,16 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) # fill value - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(value, 1)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(value, 1)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -423,9 +453,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(value, 1)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(value, 1)") tdSql.checkRows(13) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:04.000') tdSql.checkData(1, 0, '2020-02-01 00:00:05.000') @@ -441,9 +481,23 @@ class TDTestCase: tdSql.checkData(11, 0, '2020-02-01 00:00:15.000') tdSql.checkData(12, 0, '2020-02-01 00:00:16.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(value, 1)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, False) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, False) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, True) + tdSql.checkData(11, 1, False) + tdSql.checkData(12, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(value, 1)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -452,10 +506,17 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + # fill prev - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(prev)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(prev)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -467,9 +528,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(prev)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(prev)") tdSql.checkRows(12) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:06.000') @@ -484,9 +555,22 @@ class TDTestCase: tdSql.checkData(10, 0, '2020-02-01 00:00:15.000') tdSql.checkData(11, 0, '2020-02-01 00:00:16.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(prev)") + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, False) + tdSql.checkData(11, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(prev)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -495,10 +579,16 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) # fill next - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(next)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(next)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -510,9 +600,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(next)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(next)") tdSql.checkRows(12) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:04.000') tdSql.checkData(1, 0, '2020-02-01 00:00:05.000') @@ -527,9 +627,22 @@ class TDTestCase: tdSql.checkData(10, 0, '2020-02-01 00:00:14.000') tdSql.checkData(11, 0, '2020-02-01 00:00:15.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(next)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, False) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, False) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, True) + tdSql.checkData(11, 1, False) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(next)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -538,10 +651,17 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + # fill linear - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(linear)") + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:08', '2020-02-01 00:00:12') every(500a) fill(linear)") tdSql.checkRows(9) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:08.000') tdSql.checkData(1, 0, '2020-02-01 00:00:08.500') @@ -553,9 +673,19 @@ class TDTestCase: tdSql.checkData(7, 0, '2020-02-01 00:00:11.500') tdSql.checkData(8, 0, '2020-02-01 00:00:12.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") + tdSql.checkData(0, 1, True) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, False) + tdSql.checkData(5, 1, True) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") tdSql.checkRows(11) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:06.000') @@ -569,9 +699,21 @@ class TDTestCase: tdSql.checkData(9, 0, '2020-02-01 00:00:14.000') tdSql.checkData(10, 0, '2020-02-01 00:00:15.000') - tdSql.query(f"select _irowts,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(linear)") + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) + tdSql.checkData(6, 1, True) + tdSql.checkData(7, 1, True) + tdSql.checkData(8, 1, True) + tdSql.checkData(9, 1, True) + tdSql.checkData(10, 1, False) + + tdSql.query(f"select _irowts,_isfilled,interp(c0) from {dbname}.{tbname} range('2020-02-01 00:00:05', '2020-02-01 00:00:15') every(2s) fill(linear)") tdSql.checkRows(6) - tdSql.checkCols(2) + tdSql.checkCols(3) tdSql.checkData(0, 0, '2020-02-01 00:00:05.000') tdSql.checkData(1, 0, '2020-02-01 00:00:07.000') @@ -580,28 +722,47 @@ class TDTestCase: tdSql.checkData(4, 0, '2020-02-01 00:00:13.000') tdSql.checkData(5, 0, '2020-02-01 00:00:15.000') - # multiple _irowts - tdSql.query(f"select interp(c0),_irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") - tdSql.checkRows(11) - tdSql.checkCols(2) + tdSql.checkData(0, 1, False) + tdSql.checkData(1, 1, True) + tdSql.checkData(2, 1, True) + tdSql.checkData(3, 1, True) + tdSql.checkData(4, 1, True) + tdSql.checkData(5, 1, False) - tdSql.checkData(0, 1, '2020-02-01 00:00:05.000') - tdSql.checkData(1, 1, '2020-02-01 00:00:06.000') - tdSql.checkData(2, 1, '2020-02-01 00:00:07.000') - tdSql.checkData(3, 1, '2020-02-01 00:00:08.000') - tdSql.checkData(4, 1, '2020-02-01 00:00:09.000') - tdSql.checkData(5, 1, '2020-02-01 00:00:10.000') - tdSql.checkData(6, 1, '2020-02-01 00:00:11.000') - tdSql.checkData(7, 1, '2020-02-01 00:00:12.000') - tdSql.checkData(8, 1, '2020-02-01 00:00:13.000') - tdSql.checkData(9, 1, '2020-02-01 00:00:14.000') + # multiple _irowts,_isfilled + tdSql.query(f"select interp(c0),_irowts,_isfilled from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") + tdSql.checkRows(11) + tdSql.checkCols(3) + + tdSql.checkData(0, 1, '2020-02-01 00:00:05.000') + tdSql.checkData(1, 1, '2020-02-01 00:00:06.000') + tdSql.checkData(2, 1, '2020-02-01 00:00:07.000') + tdSql.checkData(3, 1, '2020-02-01 00:00:08.000') + tdSql.checkData(4, 1, '2020-02-01 00:00:09.000') + tdSql.checkData(5, 1, '2020-02-01 00:00:10.000') + tdSql.checkData(6, 1, '2020-02-01 00:00:11.000') + tdSql.checkData(7, 1, '2020-02-01 00:00:12.000') + tdSql.checkData(8, 1, '2020-02-01 00:00:13.000') + tdSql.checkData(9, 1, '2020-02-01 00:00:14.000') tdSql.checkData(10, 1, '2020-02-01 00:00:15.000') - tdSql.query(f"select _irowts, interp(c0), interp(c0), _irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") - tdSql.checkRows(11) - tdSql.checkCols(4) + tdSql.checkData(0, 2, False) + tdSql.checkData(1, 2, True) + tdSql.checkData(2, 2, True) + tdSql.checkData(3, 2, True) + tdSql.checkData(4, 2, True) + tdSql.checkData(5, 2, False) + tdSql.checkData(6, 2, True) + tdSql.checkData(7, 2, True) + tdSql.checkData(8, 2, True) + tdSql.checkData(9, 2, True) + tdSql.checkData(10, 2, False) - cols = (0, 3) + tdSql.query(f"select _irowts, _isfilled, interp(c0), interp(c0), _isfilled, _irowts from {dbname}.{tbname} range('2020-02-01 00:00:04', '2020-02-01 00:00:16') every(1s) fill(linear)") + tdSql.checkRows(11) + tdSql.checkCols(6) + + cols = (0, 5) for i in cols: tdSql.checkData(0, i, '2020-02-01 00:00:05.000') tdSql.checkData(1, i, '2020-02-01 00:00:06.000') @@ -615,6 +776,20 @@ class TDTestCase: tdSql.checkData(9, i, '2020-02-01 00:00:14.000') tdSql.checkData(10, i, '2020-02-01 00:00:15.000') + cols = (1, 4) + for i in cols: + tdSql.checkData(0, i, False) + tdSql.checkData(1, i, True) + tdSql.checkData(2, i, True) + tdSql.checkData(3, i, True) + tdSql.checkData(4, i, True) + tdSql.checkData(5, i, False) + tdSql.checkData(6, i, True) + tdSql.checkData(7, i, True) + tdSql.checkData(8, i, True) + tdSql.checkData(9, i, True) + tdSql.checkData(10, i, False) + tdLog.printNoPrefix("==========step9:test intra block interpolation") tdSql.execute(f"drop database {dbname}"); From 33324a56ae7d8c89e8bdacb7f0d3aa12c8e64ff5 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 15 Dec 2022 11:08:43 +0800 Subject: [PATCH 08/64] add zn/en docs --- docs/en/12-taos-sql/10-function.md | 1 + docs/zh/12-taos-sql/10-function.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index f0daf4b82a..f7ea906b5e 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -877,6 +877,7 @@ INTERP(expr) - Interpolation is performed based on `FILL` parameter. - `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). +- Pseudo column `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.2.1). ### LAST diff --git a/docs/zh/12-taos-sql/10-function.md b/docs/zh/12-taos-sql/10-function.md index afe90b8a93..cb99c83cc5 100644 --- a/docs/zh/12-taos-sql/10-function.md +++ b/docs/zh/12-taos-sql/10-function.md @@ -880,6 +880,7 @@ INTERP(expr) - INTERP 根据 FILL 字段来决定在每个符合输出条件的时刻如何进行插值。 - INTERP 只能在一个时间序列内进行插值,因此当作用于超级表时必须跟 partition by tbname 一起使用。 - INTERP 可以与伪列 _irowts 一起使用,返回插值点所对应的时间戳(3.0.1.4版本以后支持)。 +- INTERP 可以与伪列 _isfilled 一起使用,显示返回结果是否为原始记录或插值算法产生的数据(3.0.2.1版本以后支持)。 ### LAST From bb6e23ed06074badaa76ad5830391afd333492e3 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 15 Dec 2022 11:13:33 +0800 Subject: [PATCH 09/64] fix typo --- docs/en/12-taos-sql/10-function.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/12-taos-sql/10-function.md b/docs/en/12-taos-sql/10-function.md index f7ea906b5e..30422ca20c 100644 --- a/docs/en/12-taos-sql/10-function.md +++ b/docs/en/12-taos-sql/10-function.md @@ -876,8 +876,8 @@ INTERP(expr) - The number of rows in the result set of `INTERP` is determined by the parameter `EVERY`. Starting from timestamp1, one interpolation is performed for every time interval specified `EVERY` parameter. The parameter `EVERY` must be an integer, with no quotes, with a time unit of: b(nanosecond), u(microsecond), a(millisecond)), s(second), m(minute), h(hour), d(day), or w(week). For example, `EVERY(500a)` will interpolate every 500 milliseconds. - Interpolation is performed based on `FILL` parameter. - `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). -- Pseudo column `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.2.1). +- Pseudocolumn `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.1.4). +- Pseudocolumn `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.2.1). ### LAST From c21911fdbffc742d63d57be7adeec4510b69a1b0 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 15 Dec 2022 16:18:48 +0800 Subject: [PATCH 10/64] fix: user auth error --- source/dnode/mnode/impl/src/mndUser.c | 8 +-- source/libs/command/src/command.c | 10 ++-- source/libs/parser/src/parAstParser.c | 57 ++++++++++++++++------ source/libs/parser/src/parAuthenticator.c | 20 ++++++++ source/libs/planner/src/planLogicCreater.c | 4 ++ 5 files changed, 74 insertions(+), 25 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndUser.c b/source/dnode/mnode/impl/src/mndUser.c index 806ba0c98e..efce6255fb 100644 --- a/source/dnode/mnode/impl/src/mndUser.c +++ b/source/dnode/mnode/impl/src/mndUser.c @@ -838,9 +838,9 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock if (pUser->superUser) { cols = 0; - SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; + char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(userName, pUser->user, pShow->pMeta->pSchemas[cols].bytes); + SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataAppend(pColInfo, numOfRows, (const char *)userName, false); char privilege[20] = {0}; @@ -859,9 +859,9 @@ static int32_t mndRetrievePrivileges(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock char *db = taosHashIterate(pUser->readDbs, NULL); while (db != NULL) { cols = 0; - SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); - char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; + char userName[TSDB_USER_LEN + VARSTR_HEADER_SIZE] = {0}; STR_WITH_MAXSIZE_TO_VARSTR(userName, pUser->user, pShow->pMeta->pSchemas[cols].bytes); + SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols++); colDataAppend(pColInfo, numOfRows, (const char *)userName, false); char privilege[20] = {0}; diff --git a/source/libs/command/src/command.c b/source/libs/command/src/command.c index 5f1b87a138..a179ec24f9 100644 --- a/source/libs/command/src/command.c +++ b/source/libs/command/src/command.c @@ -231,10 +231,6 @@ static const char* cacheModelStr(int8_t cacheModel) { return TSDB_CACHE_MODEL_NONE_STR; } -static const char* strictStr(int8_t strict) { - return TSDB_DB_STRICT_ON == strict ? TSDB_DB_STRICT_ON_STR : TSDB_DB_STRICT_OFF_STR; -} - static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbFName, SDbCfgInfo* pCfg) { blockDataEnsureCapacity(pBlock, 1); pBlock->info.rows = 1; @@ -269,11 +265,11 @@ static void setCreateDBResultIntoDataBlock(SSDataBlock* pBlock, char* dbFName, S buf2 + VARSTR_HEADER_SIZE, "CREATE DATABASE `%s` BUFFER %d CACHESIZE %d CACHEMODEL '%s' COMP %d DURATION %dm " "WAL_FSYNC_PERIOD %d MAXROWS %d MINROWS %d KEEP %dm,%dm,%dm PAGES %d PAGESIZE %d PRECISION '%s' REPLICA %d " - "STRICT '%s' WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d", + "WAL_LEVEL %d VGROUPS %d SINGLE_STABLE %d", dbFName, pCfg->buffer, pCfg->cacheSize, cacheModelStr(pCfg->cacheLast), pCfg->compression, pCfg->daysPerFile, pCfg->walFsyncPeriod, pCfg->maxRows, pCfg->minRows, pCfg->daysToKeep0, pCfg->daysToKeep1, pCfg->daysToKeep2, - pCfg->pages, pCfg->pageSize, prec, pCfg->replications, strictStr(pCfg->strict), pCfg->walLevel, - pCfg->numOfVgroups, 1 == pCfg->numOfStables); + pCfg->pages, pCfg->pageSize, prec, pCfg->replications, pCfg->walLevel, pCfg->numOfVgroups, + 1 == pCfg->numOfStables); if (retentions) { len += sprintf(buf2 + VARSTR_HEADER_SIZE + len, " RETENTIONS %s", retentions); diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index f90a42add3..92b9e67f37 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -245,6 +245,10 @@ static int32_t collectMetaKeyFromCreateTable(SCollectMetaKeyCxt* pCxt, SCreateTa if (TSDB_CODE_SUCCESS == code && NULL == pStmt->pTags) { code = reserveTableVgroupInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pStmt->tableName, pCxt->pMetaCache); } + if (TSDB_CODE_SUCCESS == code) { + code = reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, pStmt->dbName, AUTH_TYPE_WRITE, + pCxt->pMetaCache); + } return code; } @@ -261,6 +265,10 @@ static int32_t collectMetaKeyFromCreateMultiTable(SCollectMetaKeyCxt* pCxt, SCre if (TSDB_CODE_SUCCESS == code) { code = reserveTableVgroupInCache(pCxt->pParseCxt->acctId, pClause->dbName, pClause->tableName, pCxt->pMetaCache); } + if (TSDB_CODE_SUCCESS == code) { + code = reserveUserAuthInCache(pCxt->pParseCxt->acctId, pCxt->pParseCxt->pUser, pClause->dbName, AUTH_TYPE_WRITE, + pCxt->pMetaCache); + } if (TSDB_CODE_SUCCESS != code) { break; } @@ -351,38 +359,59 @@ static int32_t collectMetaKeyFromCreateStream(SCollectMetaKeyCxt* pCxt, SCreateS } static int32_t collectMetaKeyFromShowDnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_DNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_DNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowMnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowModules(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MODULES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MODULES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowQnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_QNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_QNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowSnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_SNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_SNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowBnodes(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_BNODES, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_BNODES, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowCluster(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { - return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_CLUSTER, - pCxt->pMetaCache); + if (pCxt->pParseCxt->enableSysInfo) { + return reserveTableMetaInCache(pCxt->pParseCxt->acctId, TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_CLUSTER, + pCxt->pMetaCache); + } + return TSDB_CODE_SUCCESS; } static int32_t collectMetaKeyFromShowDatabases(SCollectMetaKeyCxt* pCxt, SShowStmt* pStmt) { diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index f7ab4fccbe..33999fda52 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -104,6 +104,22 @@ static int32_t authShowCreateTable(SAuthCxt* pCxt, SShowCreateTableStmt* pStmt) return checkAuth(pCxt, pStmt->dbName, AUTH_TYPE_READ); } +static int32_t authCreateTable(SAuthCxt* pCxt, SCreateTableStmt* pStmt) { + return checkAuth(pCxt, pStmt->dbName, AUTH_TYPE_WRITE); +} + +static int32_t authCreateMultiTable(SAuthCxt* pCxt, SCreateMultiTableStmt* pStmt) { + int32_t code = TSDB_CODE_SUCCESS; + SNode* pNode = NULL; + FOREACH(pNode, pStmt->pSubTables) { + code = checkAuth(pCxt, ((SCreateSubTableClause*)pNode)->dbName, AUTH_TYPE_WRITE); + if (TSDB_CODE_SUCCESS != code) { + break; + } + } + return code; +} + static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { switch (nodeType(pStmt)) { case QUERY_NODE_SET_OPERATOR: @@ -116,6 +132,10 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { return authDelete(pCxt, (SDeleteStmt*)pStmt); case QUERY_NODE_INSERT_STMT: return authInsert(pCxt, (SInsertStmt*)pStmt); + case QUERY_NODE_CREATE_TABLE_STMT: + return authCreateTable(pCxt, (SCreateTableStmt*)pStmt); + case QUERY_NODE_CREATE_MULTI_TABLE_STMT: + return authCreateMultiTable(pCxt, (SCreateMultiTableStmt*)pStmt); case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index b05c35452b..daefa60af3 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -928,6 +928,10 @@ static int32_t createFillLogicNode(SLogicPlanContext* pCxt, SSelectStmt* pSelect code = TSDB_CODE_OUT_OF_MEMORY; } + if (TSDB_CODE_SUCCESS == code && 0 == LIST_LENGTH(pFill->node.pTargets)) { + code = createColumnByRewriteExpr(pFill->pWStartTs, &pFill->node.pTargets); + } + if (TSDB_CODE_SUCCESS == code) { *pLogicNode = (SLogicNode*)pFill; } else { From 9eeba415a3b0d97fe44bb668ab4a23896ca910f8 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Thu, 15 Dec 2022 19:08:16 +0800 Subject: [PATCH 11/64] test: add test case for leastsquares --- tests/system-test/2-query/leastsquares.py | 65 ++++++++++++++--------- 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/tests/system-test/2-query/leastsquares.py b/tests/system-test/2-query/leastsquares.py index 8ece4c46f0..1718802a82 100644 --- a/tests/system-test/2-query/leastsquares.py +++ b/tests/system-test/2-query/leastsquares.py @@ -19,12 +19,17 @@ BINARY_COL = "c8" NCHAR_COL = "c9" TS_COL = "c10" -NUM_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, ] +UINT_COL = "c11" +UBINT_COL = "c12" +USINT_COL = "c13" +UTINT_COL = "c14" + +NUM_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, UINT_COL, UBINT_COL, USINT_COL, UTINT_COL] CHAR_COL = [ BINARY_COL, NCHAR_COL, ] BOOLEAN_COL = [ BOOL_COL, ] TS_TYPE_COL = [ TS_COL, ] -ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_COL, BINARY_COL, NCHAR_COL, TS_COL ] +ALL_COL = [ INT_COL, BINT_COL, SINT_COL, TINT_COL, FLOAT_COL, DOUBLE_COL, BOOL_COL, BINARY_COL, NCHAR_COL, TS_COL, UINT_COL, UBINT_COL, USINT_COL, UTINT_COL ] DBNAME = "db" class TDTestCase: @@ -208,6 +213,13 @@ class TDTestCase: tdLog.info(f"sql: {current_sqls[i]}") tdSql.query(current_sqls[i]) + def check_result(self): + for col in NUM_COL: + tdSql.query("select leastsquares(%s, 1, 9) from %s.stb1" % (col, DBNAME)) + tdSql.checkRows(1) + res = tdSql.getData(0, 0) + if res is None: + tdLog.exit("result is not correct") def __test_current(self): # tdSql.query("explain select c1 from {dbname}.ct1") @@ -236,6 +248,7 @@ class TDTestCase: def all_test(self): self.__test_error() self.__test_current() + self.check_result() def __create_tb(self, dbname=DBNAME): @@ -243,13 +256,15 @@ class TDTestCase: create_stb_sql = f'''create table {dbname}.stb1( ts timestamp, {INT_COL} int, {BINT_COL} bigint, {SINT_COL} smallint, {TINT_COL} tinyint, {FLOAT_COL} float, {DOUBLE_COL} double, {BOOL_COL} bool, - {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp + {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp, {UINT_COL} int unsigned, + {UBINT_COL} bigint unsigned, {USINT_COL} smallint unsigned, {UTINT_COL} tinyint unsigned ) tags (t1 int) ''' create_ntb_sql = f'''create table {dbname}.nt1( ts timestamp, {INT_COL} int, {BINT_COL} bigint, {SINT_COL} smallint, {TINT_COL} tinyint, {FLOAT_COL} float, {DOUBLE_COL} double, {BOOL_COL} bool, - {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp + {BINARY_COL} binary(16), {NCHAR_COL} nchar(32), {TS_COL} timestamp, {UINT_COL} int unsigned, + {UBINT_COL} bigint unsigned, {USINT_COL} smallint unsigned, {UTINT_COL} tinyint unsigned ) ''' tdSql.execute(create_stb_sql) @@ -262,49 +277,49 @@ class TDTestCase: now_time = int(datetime.datetime.timestamp(datetime.datetime.now()) * 1000) for i in range(rows): tdSql.execute( - f"insert into {dbname}.ct1 values ( { now_time - i * 1000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i } )" + f"insert into {dbname}.ct1 values ( { now_time - i * 1000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127} )" ) tdSql.execute( - f"insert into {dbname}.ct4 values ( { now_time - i * 7776000000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i } )" + f"insert into {dbname}.ct4 values ( { now_time - i * 7776000000 }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127}, {1.11*i}, {1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127} )" ) tdSql.execute( - f"insert into {dbname}.ct2 values ( { now_time - i * 7776000000 }, {-i}, {-11111 * i}, {-111 * i % 32767 }, {-11 * i % 127}, {-1.11*i}, {-1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i } )" + f"insert into {dbname}.ct2 values ( { now_time - i * 7776000000 }, {-i}, {-11111 * i}, {-111 * i % 32767 }, {-11 * i % 127}, {-1.11*i}, {-1100.0011*i}, {i%2}, 'binary{i}', 'nchar_测试_{i}', { now_time + 1 * i }, {i}, {11111 * i}, {111 * i % 32767 }, {11 * i % 127} )" ) tdSql.execute( f'''insert into {dbname}.ct1 values - ( { now_time - rows * 5 }, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar_测试_0', { now_time + 8 } ) - ( { now_time + 10000 }, { rows }, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar_测试_9', { now_time + 9 } ) + ( { now_time - rows * 5 }, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar_测试_0', { now_time + 8 }, 0, 0, 0, 0) + ( { now_time + 10000 }, { rows }, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar_测试_9', { now_time + 9 }, 0, 0, 0, NULL ) ''' ) tdSql.execute( f'''insert into {dbname}.ct4 values - ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) ( { now_time + 5184000000}, {pow(2,31)-pow(2,15)}, {pow(2,63)-pow(2,30)}, 32767, 127, - { 3.3 * pow(10,38) }, { 1.3 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000} + { 3.3 * pow(10,38) }, { 1.3 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000}, NULL, NULL, NULL, NULL ) ( { now_time + 2592000000 }, {pow(2,31)-pow(2,16)}, {pow(2,63)-pow(2,31)}, 32766, 126, - { 3.2 * pow(10,38) }, { 1.2 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000} + { 3.2 * pow(10,38) }, { 1.2 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000}, NULL, NULL, NULL, NULL ) ''' ) tdSql.execute( f'''insert into {dbname}.ct2 values - ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) + ( { now_time - rows * 3888000000 + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time + 7776000000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) ( { now_time + 5184000000 }, { -1 * pow(2,31) + pow(2,15) }, { -1 * pow(2,63) + pow(2,30) }, -32766, -126, - { -1 * 3.2 * pow(10,38) }, { -1.2 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 } + { -1 * 3.2 * pow(10,38) }, { -1.2 * pow(10,308) }, { rows % 2 }, "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 }, NULL, NULL, NULL, NULL ) ( { now_time + 2592000000 }, { -1 * pow(2,31) + pow(2,16) }, { -1 * pow(2,63) + pow(2,31) }, -32767, -127, - { - 3.3 * pow(10,38) }, { -1.3 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 } + { - 3.3 * pow(10,38) }, { -1.3 * pow(10,308) }, { (rows-1) % 2 }, "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 }, NULL, NULL, NULL, NULL ) ''' ) @@ -312,22 +327,22 @@ class TDTestCase: for i in range(rows): insert_data = f'''insert into {dbname}.nt1 values ( { now_time - i * 3600000 }, {i}, {i * 11111}, { i % 32767 }, { i % 127}, { i * 1.11111 }, { i * 1000.1111 }, { i % 2}, - "binary_{i}", "nchar_测试_{i}", { now_time - 1000 * i } ) + "binary_{i}", "nchar_测试_{i}", { now_time - 1000 * i }, NULL, NULL, NULL, NULL ) ''' tdSql.execute(insert_data) tdSql.execute( f'''insert into {dbname}.nt1 values - ( { now_time + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - (( rows // 2 ) * 60 + 30) * 60000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) - ( { now_time - rows * 3600000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time + 10800000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - (( rows // 2 ) * 60 + 30) * 60000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) + ( { now_time - rows * 3600000 }, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ) ( { now_time + 7200000 }, { pow(2,31) - pow(2,15) }, { pow(2,63) - pow(2,30) }, 32767, 127, { 3.3 * pow(10,38) }, { 1.3 * pow(10,308) }, { rows % 2 }, - "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 } + "binary_limit-1", "nchar_测试_limit-1", { now_time - 86400000 }, NULL, NULL, NULL, NULL ) ( { now_time + 3600000 } , { pow(2,31) - pow(2,16) }, { pow(2,63) - pow(2,31) }, 32766, 126, { 3.2 * pow(10,38) }, { 1.2 * pow(10,308) }, { (rows-1) % 2 }, - "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 } + "binary_limit-2", "nchar_测试_limit-2", { now_time - 172800000 }, NULL, NULL, NULL, NULL ) ''' ) From a1415183b5ea8acbf3580e487d48bdc540aaeeec Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Fri, 16 Dec 2022 15:11:02 +0800 Subject: [PATCH 12/64] test:modify default vnodes numbers in create clusters --- tests/pytest/util/cluster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pytest/util/cluster.py b/tests/pytest/util/cluster.py index 72b7e1fddf..2607cf63c2 100644 --- a/tests/pytest/util/cluster.py +++ b/tests/pytest/util/cluster.py @@ -53,7 +53,7 @@ class ConfigureyCluster: # configure dnoe of independent mnodes if num <= self.mnodeNums and self.mnodeNums != 0 and independentMnode == True : - dnode.addExtraCfg("supportVnodes", 0) + dnode.addExtraCfg("supportVnodes", 1024) # print(dnode) self.dnodes.append(dnode) return self.dnodes From b669283aff0f370c41acf0219d56294b855b6352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Fri, 16 Dec 2022 16:13:32 +0800 Subject: [PATCH 13/64] test: add insert null and none cases --- tests/system-test/2-query/insert_null_none.py | 2579 +++++++++++++++++ 1 file changed, 2579 insertions(+) create mode 100755 tests/system-test/2-query/insert_null_none.py diff --git a/tests/system-test/2-query/insert_null_none.py b/tests/system-test/2-query/insert_null_none.py new file mode 100755 index 0000000000..cf5636fb1f --- /dev/null +++ b/tests/system-test/2-query/insert_null_none.py @@ -0,0 +1,2579 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import random +import os +import time +import taos +import subprocess +from faker import Faker +from util.log import tdLog +from util.cases import tdCases +from util.sql import tdSql +from util.dnodes import tdDnodes +from util.dnodes import * + +class TDTestCase: + updatecfgDict = {'maxSQLLength':1048576,'debugFlag': 143 ,"querySmaOptimize":1} + + def init(self, conn, logSql, replicaVar): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + self.testcasePath = os.path.split(__file__)[0] + self.testcaseFilename = os.path.split(__file__)[-1] + os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) + + self.db = "insert_null_none" + + def dropandcreateDB_random(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + tdSql.execute('''drop database if exists %s ;''' %database) + tdSql.execute('''create database %s keep 36500 ;'''%(database)) + tdSql.execute('''use %s;'''%database) + + tdSql.execute('''create stable %s.stable_1 (ts timestamp , q_int int , q_bigint bigint , q_smallint smallint , q_tinyint tinyint , q_float float , q_double double , q_bool bool , q_binary binary(100) , q_nchar nchar(100) , q_ts timestamp , \ + q_int_null int , q_bigint_null bigint , q_smallint_null smallint , q_tinyint_null tinyint, q_float_null float , q_double_null double , q_bool_null bool , q_binary_null binary(20) , q_nchar_null nchar(20) , q_ts_null timestamp) \ + tags(loc nchar(100) , t_int int , t_bigint bigint , t_smallint smallint , t_tinyint tinyint, t_bool bool , t_binary binary(100) , t_nchar nchar(100) ,t_float float , t_double double , t_ts timestamp);'''%database) + tdSql.execute('''create stable %s.stable_2 (ts timestamp , q_int int , q_bigint bigint , q_smallint smallint , q_tinyint tinyint , q_float float , q_double double , q_bool bool , q_binary binary(100) , q_nchar nchar(100) , q_ts timestamp , \ + q_int_null int , q_bigint_null bigint , q_smallint_null smallint , q_tinyint_null tinyint, q_float_null float , q_double_null double , q_bool_null bool , q_binary_null binary(20) , q_nchar_null nchar(20) , q_ts_null timestamp) \ + tags(loc nchar(100) , t_int int , t_bigint bigint , t_smallint smallint , t_tinyint tinyint, t_bool bool , t_binary binary(100) , t_nchar nchar(100) ,t_float float , t_double double , t_ts timestamp);'''%database) + + for i in range(num_random): + tdSql.execute('''create table %s.table_%d \ + (ts timestamp , q_int int , q_bigint bigint , q_smallint smallint , q_tinyint tinyint , q_float float , q_double double , q_bool bool , q_binary binary(100) , q_nchar nchar(100) , q_ts timestamp ) ;'''%(database,i)) + tdSql.execute('''create table %s.stable_1_%d using %s.stable_1 tags('stable_1_%d', '%d' , '%d', '%d' , '%d' , 1 , 'binary1.%s' , 'nchar1.%s' , '%f', '%f' ,'%d') ;''' + %(database,i,database,i,fake.random_int(min=-2147483647, max=2147483647, step=1), fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pystr() ,fake.pystr() ,fake.pyfloat(),fake.pyfloat(),fake.random_int(min=-2147483647, max=2147483647, step=1))) + + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.query("select count(*) from %s.stable_1;" %database) + tdSql.checkData(0,0,num_random*n) + tdSql.query("select count(*) from %s.table_0;"%database) + tdSql.checkData(0,0,n) + + def qint_none(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_none_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_none_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qint_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qint_none_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %s, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, 'NULL', + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qbigint_none(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), 'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), 'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_none_null(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), 'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_none_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbigint_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qbigint_none_null_value(self,database,n): + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %s, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1),'NULL', + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qsmallint_none(self,database,n): + tdLog.info("qsmallint_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_null(self,database,n): + tdLog.info("qsmallint_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_none_null(self,database,n): + tdLog.info("qsmallint_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , 'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_none_value(self,database,n): + tdLog.info("qsmallint_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qsmallint_null_value(self,database,n): + tdLog.info("qsmallint_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qsmallint_none_null_value(self,database,n): + tdLog.info("qsmallint_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , 'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %s, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) ,'NULL', fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + + def qtinyint_none(self,database,n): + tdLog.info("qtinyint_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_null(self,database,n): + tdLog.info("qtinyint_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_none_null(self,database,n): + tdLog.info("qtinyint_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_none_value(self,database,n): + tdLog.info("qtinyint_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qtinyint_null_value(self,database,n): + tdLog.info("qtinyint_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qtinyint_none_null_value(self,database,n): + tdLog.info("qtinyint_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %s, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qfloat_none(self,database,n): + tdLog.info("qfloat_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_null(self,database,n): + tdLog.info("qfloat_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , 'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_none_null(self,database,n): + tdLog.info("qfloat_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_none_value(self,database,n): + tdLog.info("qfloat_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qfloat_null_value(self,database,n): + tdLog.info("qfloat_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qfloat_none_null_value(self,database,n): + tdLog.info("qfloat_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %s, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) ,'NULL', + fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + + def qdouble_none(self,database,n): + tdLog.info("qdouble_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_null(self,database,n): + tdLog.info("qdouble_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_none_null(self,database,n): + tdLog.info("qdouble_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL' , fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_none_value(self,database,n): + tdLog.info("qdouble_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qdouble_null_value(self,database,n): + tdLog.info("qdouble_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + + def qdouble_none_null_value(self,database,n): + tdLog.info("qdouble_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + + + + + def qbinary_none(self,database,n): + tdLog.info("qbinary_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + def qbinary_null(self,database,n): + tdLog.info("qbinary_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %s, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %s, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i )) + + def qbinary_none_null(self,database,n): + tdLog.info("qbinary_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i )) + + def qbinary_none_value(self,database,n): + tdLog.info("qbinary_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbinary_null_value(self,database,n): + tdLog.info("qbinary_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL', fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , ts + i )) + + + def qbinary_none_null_value(self,database,n): + tdLog.info("qbinary_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,'NULL' , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, %s, 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat(), 'NULL' , fake.pystr() , ts + i )) + + + + def qnchar_none(self,database,n): + tdLog.info("qnchar_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + def qnchar_null(self,database,n): + tdLog.info("qnchar_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL', ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL', ts + i )) + + def qnchar_none_null(self,database,n): + tdLog.info("qnchar_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() ,'NULL', ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() ,'NULL', ts + i )) + + def qnchar_none_value(self,database,n): + tdLog.info("qnchar_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary ,q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qnchar_null_value(self,database,n): + tdLog.info("qnchar_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL', ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s',%s, %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,fake.pystr() ,'NULL', ts + i )) + + + def qnchar_none_null_value(self,database,n): + tdLog.info("qnchar_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary , q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %s , %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() , 'NULL' , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', %s , %d) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat(), fake.pystr() , 'NULL' , ts + i )) + + def qts_none(self,database,n): + tdLog.info("qts_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + def qts_null(self,database,n): + tdLog.info("qts_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr(),fake.pystr() , 'NULL')) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr(),fake.pystr() , 'NULL' )) + + def qts_none_null(self,database,n): + tdLog.info("qts_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr(),'NULL')) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr(),'NULL' )) + + def qts_none_value(self,database,n): + tdLog.info("qts_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary, q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary, q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qts_null_value(self,database,n): + tdLog.info("qts_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s','nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() ,fake.pystr(), 'NULL')) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s','nchar.%s', %s) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,fake.pystr() ,fake.pystr(),'NULL' )) + + + def qts_none_null_value(self,database,n): + tdLog.info("qts_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_bool , q_binary , q_nchar)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr())) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s') ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s' , %s) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() ,fake.pystr() ,fake.pystr() , 'NULL' )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s' , %s) ;''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat(), fake.pystr() ,fake.pystr() , 'NULL' )) + + + def qbool_none(self,database,n): + tdLog.info("qbool_none") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +1, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i )) + + def qbool_null(self,database,n): + tdLog.info("qbool_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +2, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) ,fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def qbool_none_null(self,database,n): + tdLog.info("qbool_none_null") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +3, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +4, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def qbool_none_value(self,database,n): + tdLog.info("qbool_none_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d);''' + % (database,i,ts + i*1000 + j + 5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +5, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + def qbool_null_value(self,database,n): + tdLog.info("qbool_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %d, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(), fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +6, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1), + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + + def qbool_none_null_value(self,database,n): + tdLog.info("qbool_none_null_value") + ts = 1630000000000 + num_random = 10 + fake = Faker('zh_CN') + # insert data + for i in range(num_random): + for j in range(n): + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j + 7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float, q_double , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j +7, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.random_int(min=-127, max=127, step=1) , fake.pyfloat() , fake.pyfloat(), fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double, q_bool , q_binary , q_nchar, q_ts)\ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i)) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, 0, 'binary.%s', 'nchar.%s', %d) ;''' + % (database,i,ts + i*1000 + j, fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-9223372036854775807, max=9223372036854775807, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() , fake.pyfloat() , fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.stable_1_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d );''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat(),fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + tdSql.execute('''insert into %s.table_%d (ts , q_int , q_bigint , q_smallint , q_tinyint , q_float , q_double , q_bool , q_binary , q_nchar, q_ts) \ + values(%d, %d, %d, %d, %d, %f, %f, %s, 'binary.%s', 'nchar.%s', %d );''' + % (database,i,ts + i*1000 + j + 8, + fake.random_int(min=-2147483647, max=2147483647, step=1), + fake.random_int(min=-32767, max=32767, step=1) , fake.random_int(min=-127, max=127, step=1) , fake.random_int(min=-127, max=127, step=1) , + fake.pyfloat() ,fake.pyfloat() ,'NULL', fake.pystr() , fake.pystr() , ts + i )) + + def sqls(self,database): + sql = "select * from %s.stable_1 ;" %database + tdSql.query(sql) + sql = "select * from %s.table_1 ;" %database + tdSql.query(sql) + + sql1 = "select count(*) from %s.stable_1 ;" %database + tdSql.query(sql1) + sql1_value = tdSql.getData(0,0) + + sql2 = "select count(ts) from %s.stable_1 ;" %database + self.constant_check(sql1,sql2) + + sql3 = "select count(q_int) from %s.stable_1 ;" %database + self.constant_check(sql1,sql3) + + sql4 = "select count(q_bigint) from %s.stable_1 ;" %database + self.constant_check(sql1,sql4) + + sql5 = "select count(q_smallint) from %s.stable_1 ;" %database + self.constant_check(sql1,sql5) + + sql6 = "select count(q_tinyint) from %s.stable_1 ;" %database + self.constant_check(sql1,sql6) + + sql7 = "select count(q_float) from %s.stable_1 ;" %database + self.constant_check(sql1,sql7) + + sql8 = "select count(q_double) from %s.stable_1 ;" %database + self.constant_check(sql1,sql8) + + sql9 = "select count(q_bool) from %s.stable_1 ;" %database + self.constant_check(sql1,sql9) + + sql10 = "select count(q_binary) from %s.stable_1 ;" %database + self.constant_check(sql1,sql10) + + sql11 = "select count(q_nchar) from %s.stable_1 ;" %database + self.constant_check(sql1,sql11) + + sql12 = "select count(q_ts) from %s.stable_1 ;" %database + self.constant_check(sql1,sql12) + + def check_flushdb(self,database): + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qbigint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbigint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qsmallint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qsmallint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qtinyint_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qtinyint_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qfloat_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qfloat_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qdouble_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qdouble_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbinary_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qnchar_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qts_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qts_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + self.qbool_none(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_none_null(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_none_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + self.qbool_none_null_value(database, 10); + self.sqls(database); + tdSql.execute(" flush database %s;" %database) + tdLog.info("flush database success") + self.sqls(database); + + + def constant_check(self,sql1,sql2): + tdLog.info("\n=============sql1:(%s)___sql2:(%s) ====================\n" %(sql1,sql2)) + tdSql.query(sql1) + sql1_value = tdSql.getData(0,0) + tdSql.query(sql2) + sql2_value = tdSql.getData(0,0) + self.value_check(sql1_value,sql2_value) + + def value_check(self,base_value,check_value): + if base_value==check_value: + tdLog.info(f"checkEqual success, base_value={base_value},check_value={check_value}") + elif base_value > check_value: + tdLog.info(f"checkEqual success,but count not include NULL, base_value=={base_value},check_value={check_value}") + else : + tdLog.exit(f"checkEqual error, base_value=={base_value},check_value={check_value}") + + def run(self): + + startTime = time.time() + + os.system("rm -rf %s/%s.sql" % (self.testcasePath,self.testcaseFilename)) + + self.dropandcreateDB_random("%s" %self.db, 10) + + self.check_flushdb("%s" %self.db) + + + # #taos -f sql + # startTime1 = time.time() + # print("taos -f sql start!") + # taos_cmd1 = "taos -f %s/%s.sql" % (self.testcasePath,self.testcaseFilename) + # _ = subprocess.check_output(taos_cmd1, shell=True) + # print("taos -f sql over!") + # endTime1 = time.time() + # print("total time %ds" % (endTime1 - startTime1)) + + endTime = time.time() + print("total time %ds" % (endTime - startTime)) + + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) From e52b7a5a076b358c149f91a121ddfd0fcf48a594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chappyguoxy=E2=80=9D?= <“happy_guoxy@163.com”> Date: Fri, 16 Dec 2022 16:14:51 +0800 Subject: [PATCH 14/64] test: add insert null and none cases --- tests/parallel_test/cases.task | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 5361ba356f..bfb4f47d46 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -1018,6 +1018,11 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_select.py -Q 4 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 2 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/insert_null_none.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 99-TDcase/TD-20582.py #develop test From 9542b95d6250ae1d215ba647190c16b2c5650491 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 16 Dec 2022 22:32:44 +0800 Subject: [PATCH 15/64] fix mem leak --- source/client/src/clientTmq | 0 source/client/src/clientTmq.c | 11 ++++++++++- source/libs/scheduler/src/schRemote.c | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 source/client/src/clientTmq diff --git a/source/client/src/clientTmq b/source/client/src/clientTmq new file mode 100644 index 0000000000..e69de29bb2 diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 350ecdd373..74f05056c6 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -438,6 +438,7 @@ int32_t tmqCommitCb(void* param, SDataBuf* pBuf, int32_t code) { taosMemoryFree(pParam->pOffset); taosMemoryFree(pBuf->pData); + taosMemoryFree(pBuf->pEpSet); /*tscDebug("receive offset commit cb of %s on vgId:%d, offset is %" PRId64, pParam->pOffset->subKey, pParam->->vgId, * pOffset->version);*/ @@ -724,7 +725,10 @@ void tmqAssignDelayedReportTask(void* param, void* tmrId) { } int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) { - if (pMsg && pMsg->pData) taosMemoryFree(pMsg->pData); + if (pMsg) { + taosMemoryFree(pMsg->pData); + taosMemoryFree(pMsg->pEpSet); + } return 0; } @@ -869,6 +873,8 @@ void tmqClearUnhandleMsg(tmq_t* tmq) { int32_t tmqSubscribeCb(void* param, SDataBuf* pMsg, int32_t code) { SMqSubscribeCbParam* pParam = (SMqSubscribeCbParam*)param; pParam->rspErr = code; + + taosMemoryFree(pMsg->pEpSet); tsem_post(&pParam->rspSem); return 0; } @@ -1365,6 +1371,7 @@ int32_t tmqAskEpCb(void* param, SDataBuf* pMsg, int32_t code) { taosMemoryFree(pParam); } taosMemoryFree(pMsg->pData); + taosMemoryFree(pMsg->pEpSet); terrno = TSDB_CODE_TMQ_CONSUMER_CLOSED; return -1; } @@ -1416,6 +1423,8 @@ END: } else { taosMemoryFree(pParam); } + + taosMemoryFree(pMsg->pEpSet); taosMemoryFree(pMsg->pData); return code; } diff --git a/source/libs/scheduler/src/schRemote.c b/source/libs/scheduler/src/schRemote.c index c23b461b47..b6de9383d7 100644 --- a/source/libs/scheduler/src/schRemote.c +++ b/source/libs/scheduler/src/schRemote.c @@ -456,6 +456,7 @@ int32_t schHandleLinkBrokenCallback(void *param, SDataBuf *pMsg, int32_t code) { if (head->isHbParam) { taosMemoryFree(pMsg->pData); + taosMemoryFree(pMsg->pEpSet); SSchHbCallbackParam *hbParam = (SSchHbCallbackParam *)param; SSchTrans trans = {.pTrans = hbParam->pTrans, .pHandle = NULL}; From 03c53c9531e684efe1802926d37764988ce05758 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 16 Dec 2022 22:37:24 +0800 Subject: [PATCH 16/64] fix mem leak --- source/client/src/clientTmq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index 74f05056c6..c63ddea25d 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -1172,6 +1172,8 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { if (code != 0) { tscWarn("msg discard from vgId:%d, epoch %d, since %s", vgId, epoch, terrstr()); if (pMsg->pData) taosMemoryFree(pMsg->pData); + if (pMsg->pEpSet) taosMemoryFree(pMsg->pEpSet); + if (code == TSDB_CODE_TMQ_CONSUMER_MISMATCH) { atomic_store_8(&tmq->status, TMQ_CONSUMER_STATUS__RECOVER); goto CREATE_MSG_FAIL; From 957104f3fa52a0594b8cc9f3f1df131442264985 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 18 Dec 2022 10:27:25 +0800 Subject: [PATCH 17/64] del invalid file --- source/client/src/clientTmq | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 source/client/src/clientTmq diff --git a/source/client/src/clientTmq b/source/client/src/clientTmq deleted file mode 100644 index e69de29bb2..0000000000 From 11e7c94134205f604303649875295d830f839099 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sun, 18 Dec 2022 13:11:30 +0800 Subject: [PATCH 18/64] modify test case and memleak while client quit --- examples/c/tmq.c | 34 +++++++++++++++------------- source/libs/transport/src/transCli.c | 4 ++++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/examples/c/tmq.c b/examples/c/tmq.c index 71e571d4dd..eb41ad039a 100644 --- a/examples/c/tmq.c +++ b/examples/c/tmq.c @@ -20,7 +20,7 @@ #include #include "taos.h" -static int running = 1; +static int running = 1; static int32_t msg_process(TAOS_RES* msg) { char buf[1024]; @@ -40,8 +40,8 @@ static int32_t msg_process(TAOS_RES* msg) { TAOS_FIELD* fields = taos_fetch_fields(msg); int32_t numOfFields = taos_field_count(msg); - //int32_t* length = taos_fetch_lengths(msg); - int32_t precision = taos_result_precision(msg); + // int32_t* length = taos_fetch_lengths(msg); + int32_t precision = taos_result_precision(msg); rows++; taos_print_row(buf, row, fields, numOfFields); printf("precision: %d, row content: %s\n", precision, buf); @@ -62,14 +62,12 @@ static int32_t init_env() { pRes = taos_query(pConn, "drop topic topicname"); if (taos_errno(pRes) != 0) { printf("error in drop tmqdb, reason:%s\n", taos_errstr(pRes)); - return -1; } taos_free_result(pRes); pRes = taos_query(pConn, "drop database if exists tmqdb"); if (taos_errno(pRes) != 0) { printf("error in drop tmqdb, reason:%s\n", taos_errstr(pRes)); - return -1; } taos_free_result(pRes); @@ -77,7 +75,7 @@ static int32_t init_env() { pRes = taos_query(pConn, "create database tmqdb precision 'ns'"); if (taos_errno(pRes) != 0) { printf("error in create tmqdb, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); @@ -87,7 +85,7 @@ static int32_t init_env() { pConn, "create table tmqdb.stb (ts timestamp, c1 int, c2 float, c3 varchar(16)) tags(t1 int, t3 varchar(16))"); if (taos_errno(pRes) != 0) { printf("failed to create super table stb, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); @@ -96,28 +94,28 @@ static int32_t init_env() { pRes = taos_query(pConn, "create table tmqdb.ctb0 using tmqdb.stb tags(0, 'subtable0')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "create table tmqdb.ctb1 using tmqdb.stb tags(1, 'subtable1')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb1, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "create table tmqdb.ctb2 using tmqdb.stb tags(2, 'subtable2')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb2, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "create table tmqdb.ctb3 using tmqdb.stb tags(3, 'subtable3')"); if (taos_errno(pRes) != 0) { printf("failed to create super table ctb3, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); @@ -126,33 +124,37 @@ static int32_t init_env() { pRes = taos_query(pConn, "insert into tmqdb.ctb0 values(now, 0, 0, 'a0')(now+1s, 0, 0, 'a00')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "insert into tmqdb.ctb1 values(now, 1, 1, 'a1')(now+1s, 11, 11, 'a11')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "insert into tmqdb.ctb2 values(now, 2, 2, 'a1')(now+1s, 22, 22, 'a22')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); pRes = taos_query(pConn, "insert into tmqdb.ctb3 values(now, 3, 3, 'a1')(now+1s, 33, 33, 'a33')"); if (taos_errno(pRes) != 0) { printf("failed to insert into ctb0, reason:%s\n", taos_errstr(pRes)); - return -1; + goto END; } taos_free_result(pRes); - taos_close(pConn); return 0; + +END: + taos_free_result(pRes); + taos_close(pConn); + return -1; } int32_t create_topic() { diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 6ad126162e..d144a76eb0 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -599,6 +599,10 @@ static int32_t allocConnRef(SCliConn* conn, bool update) { exh->pThrd = conn->hostThrd; exh->refId = transAddExHandle(transGetRefMgt(), exh); conn->refId = exh->refId; + + if (conn->refId == -1) { + taosMemoryFree(exh); + } return 0; } From 2e2e227dbe778491a349311873d85e30684bd639 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 18 Dec 2022 19:59:17 +0800 Subject: [PATCH 19/64] fix: remove invalid assert --- source/dnode/vnode/src/tsdb/tsdbSnapshot.c | 2 +- tests/script/tmp/data.sim | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c index c61ff343ab..266fdde2df 100644 --- a/source/dnode/vnode/src/tsdb/tsdbSnapshot.c +++ b/source/dnode/vnode/src/tsdb/tsdbSnapshot.c @@ -1109,7 +1109,7 @@ static int32_t tsdbSnapWriteData(STsdbSnapWriter* pWriter, uint8_t* pData, uint3 if (pWriter->dWriter.pWriter == NULL || pWriter->fid != fid) { if (pWriter->dWriter.pWriter) { - ASSERT(fid > pWriter->fid); + // ASSERT(fid > pWriter->fid); code = tsdbSnapWriteCloseFile(pWriter); if (code) goto _err; diff --git a/tests/script/tmp/data.sim b/tests/script/tmp/data.sim index cdabc97c09..e3bfe23c3d 100644 --- a/tests/script/tmp/data.sim +++ b/tests/script/tmp/data.sim @@ -3,6 +3,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 +system sh/deploy.sh -n dnode5 -i 5 +system sh/deploy.sh -n dnode6 -i 6 +system sh/deploy.sh -n dnode7 -i 7 system sh/cfg.sh -n dnode1 -c supportVnodes -v 0 system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start @@ -14,6 +17,9 @@ print =============== step1: create dnodes sql create dnode $hostname port 7200 sql create dnode $hostname port 7300 sql create dnode $hostname port 7400 +sql create dnode $hostname port 7500 +sql create dnode $hostname port 7600 +sql create dnode $hostname port 7700 $x = 0 step1: @@ -29,7 +35,7 @@ print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 print ===> $data30 $data31 $data32 $data33 $data24 $data35 -if $rows != 4 then +if $rows != 7 then return -1 endi if $data(1)[4] != ready then From 43e6d441bcc2bd1a88bfbc494f2ea7a11fa03140 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Sun, 18 Dec 2022 23:34:55 +0800 Subject: [PATCH 20/64] fix(shell): fixed not last word matched --- tools/shell/src/shellAuto.c | 49 ++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 01c8042c0e..b391d59725 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -969,38 +969,43 @@ bool matchVarWord(SWord* word1, SWord* word2) { // ------------------- match words -------------------------- // -// compare command cmd1 come from shellCommands , cmd2 come from user input -int32_t compareCommand(SWords* cmd1, SWords* cmd2) { - SWord* word1 = cmd1->head; - SWord* word2 = cmd2->head; +// compare command cmdPattern come from shellCommands , cmdInput come from user input +int32_t compareCommand(SWords* cmdPattern, SWords* cmdInput) { + SWord* wordPattern = cmdPattern->head; + SWord* wordInput = cmdInput->head; - if (word1 == NULL || word2 == NULL) { + if (wordPattern == NULL || wordInput == NULL) { return -1; } - for (int32_t i = 0; i < cmd1->count; i++) { - if (word1->type == WT_TEXT) { + for (int32_t i = 0; i < cmdPattern->count; i++) { + if (wordPattern->type == WT_TEXT) { // WT_TEXT match - if (word1->len == word2->len) { - if (strncasecmp(word1->word, word2->word, word1->len) != 0) return -1; - } else if (word1->len < word2->len) { + if (wordPattern->len == wordInput->len) { + if (strncasecmp(wordPattern->word, wordInput->word, wordPattern->len) != 0) return -1; + } else if (wordPattern->len < wordInput->len) { return -1; } else { - // word1->len > word2->len - if (strncasecmp(word1->word, word2->word, word2->len) == 0) { - cmd1->matchIndex = i; - cmd1->matchLen = word2->len; - return i; + // wordPattern->len > wordInput->len + if (strncasecmp(wordPattern->word, wordInput->word, wordInput->len) == 0) { + if (i + 1 == cmdInput->count) { + // last word return match + cmdPattern->matchIndex = i; + cmdPattern->matchLen = wordInput->len; + return i; + } else { + return -1; + } } else { return -1; } } } else { // WT_VAR auto match any one word - if (word2->next == NULL) { // input words last one - if (matchVarWord(word1, word2)) { - cmd1->matchIndex = i; - cmd1->matchLen = word2->len; + if (wordInput->next == NULL) { // input words last one + if (matchVarWord(wordPattern, wordInput)) { + cmdPattern->matchIndex = i; + cmdPattern->matchLen = wordInput->len; varMode = true; return i; } @@ -1009,9 +1014,9 @@ int32_t compareCommand(SWords* cmd1, SWords* cmd2) { } // move next - word1 = word1->next; - word2 = word2->next; - if (word1 == NULL || word2 == NULL) { + wordPattern = wordPattern->next; + wordInput = wordInput->next; + if (wordPattern == NULL || wordInput == NULL) { return -1; } } From 6868e5735184cb4013539b60e919da8952f40e22 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 19 Dec 2022 10:25:14 +0800 Subject: [PATCH 21/64] fix: user auth error --- source/libs/parser/src/parInsertSql.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 36420599b3..eb7a153844 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -875,18 +875,9 @@ static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt } int32_t code = checkAuth(pCxt->pComCxt, &pStmt->targetTableName, &pCxt->missCache); -#if 0 - if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - code = getTableMeta(pCxt, &pStmt->targetTableName, false, &pStmt->pTableMeta, &pCxt->missCache); - } - if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { - code = getTableVgroup(pCxt->pComCxt, pStmt, false, &pCxt->missCache); - } -#else if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { code = getTableMetaAndVgroup(pCxt, pStmt, &pCxt->missCache); } -#endif if (TSDB_CODE_SUCCESS == code && !pCxt->pComCxt->async) { code = collectUseDatabase(&pStmt->targetTableName, pStmt->pDbFNameHashObj); if (TSDB_CODE_SUCCESS == code) { @@ -1717,6 +1708,8 @@ static int32_t getTableMetaFromMetaData(const SArray* pTables, STableMeta** pMet if (1 != taosArrayGetSize(pTables)) { return TSDB_CODE_FAILED; } + + taosMemoryFreeClear(*pMeta); SMetaRes* pRes = taosArrayGet(pTables, 0); if (TSDB_CODE_SUCCESS == pRes->code) { *pMeta = tableMetaDup((const STableMeta*)pRes->pRes); From 4cfa6cea33c0a41d05e3ea93a650d238853d840e Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 19 Dec 2022 10:57:56 +0800 Subject: [PATCH 22/64] enh: tsma support first/last/count functions --- include/common/ttokendef.h | 118 +- source/libs/parser/inc/sql.y | 10 +- source/libs/parser/src/sql.c | 4685 +++++++++++++++++----------------- 3 files changed, 2429 insertions(+), 2384 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 7533cfbb02..aa277da982 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -182,65 +182,65 @@ #define TK_INDEX 164 #define TK_FUNCTION 165 #define TK_INTERVAL 166 -#define TK_TOPIC 167 -#define TK_WITH 168 -#define TK_META 169 -#define TK_CONSUMER 170 -#define TK_GROUP 171 -#define TK_DESC 172 -#define TK_DESCRIBE 173 -#define TK_RESET 174 -#define TK_QUERY 175 -#define TK_CACHE 176 -#define TK_EXPLAIN 177 -#define TK_ANALYZE 178 -#define TK_VERBOSE 179 -#define TK_NK_BOOL 180 -#define TK_RATIO 181 -#define TK_NK_FLOAT 182 -#define TK_OUTPUTTYPE 183 -#define TK_AGGREGATE 184 -#define TK_BUFSIZE 185 -#define TK_STREAM 186 -#define TK_INTO 187 -#define TK_TRIGGER 188 -#define TK_AT_ONCE 189 -#define TK_WINDOW_CLOSE 190 -#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_COUNT 167 +#define TK_LAST_ROW 168 +#define TK_TOPIC 169 +#define TK_WITH 170 +#define TK_META 171 +#define TK_CONSUMER 172 +#define TK_GROUP 173 +#define TK_DESC 174 +#define TK_DESCRIBE 175 +#define TK_RESET 176 +#define TK_QUERY 177 +#define TK_CACHE 178 +#define TK_EXPLAIN 179 +#define TK_ANALYZE 180 +#define TK_VERBOSE 181 +#define TK_NK_BOOL 182 +#define TK_RATIO 183 +#define TK_NK_FLOAT 184 +#define TK_OUTPUTTYPE 185 +#define TK_AGGREGATE 186 +#define TK_BUFSIZE 187 +#define TK_STREAM 188 +#define TK_INTO 189 +#define TK_TRIGGER 190 +#define TK_AT_ONCE 191 +#define TK_WINDOW_CLOSE 192 +#define TK_IGNORE 193 +#define TK_EXPIRED 194 +#define TK_FILL_HISTORY 195 +#define TK_SUBTABLE 196 +#define TK_KILL 197 +#define TK_CONNECTION 198 +#define TK_TRANSACTION 199 +#define TK_BALANCE 200 +#define TK_VGROUP 201 +#define TK_MERGE 202 +#define TK_REDISTRIBUTE 203 +#define TK_SPLIT 204 +#define TK_DELETE 205 +#define TK_INSERT 206 +#define TK_NULL 207 +#define TK_NK_QUESTION 208 +#define TK_NK_ARROW 209 +#define TK_ROWTS 210 +#define TK_QSTART 211 +#define TK_QEND 212 +#define TK_QDURATION 213 +#define TK_WSTART 214 +#define TK_WEND 215 +#define TK_WDURATION 216 +#define TK_IROWTS 217 +#define TK_CAST 218 +#define TK_NOW 219 +#define TK_TODAY 220 +#define TK_TIMEZONE 221 +#define TK_CLIENT_VERSION 222 +#define TK_SERVER_VERSION 223 +#define TK_SERVER_STATUS 224 +#define TK_CURRENT_USER 225 #define TK_CASE 226 #define TK_END 227 #define TK_WHEN 228 diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index e01d0243a9..aec8558d00 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -473,7 +473,15 @@ index_options(A) ::= FUNCTION NK_LP func_list(B) NK_RP INTERVAL func_list(A) ::= func(B). { A = createNodeList(pCxt, B); } func_list(A) ::= func_list(B) NK_COMMA func(C). { A = addNodeToList(pCxt, B, C); } -func(A) ::= function_name(B) NK_LP expression_list(C) NK_RP. { A = createFunctionNode(pCxt, &B, C); } +func(A) ::= sma_func_name(B) NK_LP expression_list(C) NK_RP. { A = createFunctionNode(pCxt, &B, C); } + +%type sma_func_name { SToken } +%destructor sma_func_name { } +sma_func_name(A) ::= function_name(B). { A = B; } +sma_func_name(A) ::= COUNT(B). { A = B; } +sma_func_name(A) ::= FIRST(B). { A = B; } +sma_func_name(A) ::= LAST(B). { A = B; } +sma_func_name(A) ::= LAST_ROW(B). { A = B; } sma_stream_opt(A) ::= . { A = createStreamOptions(pCxt); } sma_stream_opt(A) ::= sma_stream_opt(B) WATERMARK duration_literal(C). { ((SStreamOptions*)B)->pWatermark = releaseRawExprNode(pCxt, C); A = B; } diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index b383d02006..e8b2c122ae 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,26 +104,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 459 +#define YYNOCODE 460 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOperatorType yy20; - SNode* yy74; - ENullOrder yy109; - SToken yy317; - EOrder yy326; - bool yy335; - int8_t yy449; - int64_t yy531; - EJoinType yy630; - SAlterOption yy767; - EFillMode yy828; - int32_t yy856; - SNodeList* yy874; - SDataType yy898; + SAlterOption yy5; + bool yy57; + EFillMode yy214; + EJoinType yy332; + int32_t yy340; + int8_t yy383; + SDataType yy384; + SNodeList* yy424; + EOrder yy538; + EOperatorType yy620; + SNode* yy752; + ENullOrder yy777; + SToken yy849; + int64_t yy869; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -140,16 +140,16 @@ typedef union { #define ParseCTX_STORE #define YYFALLBACK 1 #define YYNSTATE 714 -#define YYNRULE 539 +#define YYNRULE 544 #define YYNTOKEN 324 #define YY_MAX_SHIFT 713 -#define YY_MIN_SHIFTREDUCE 1055 -#define YY_MAX_SHIFTREDUCE 1593 -#define YY_ERROR_ACTION 1594 -#define YY_ACCEPT_ACTION 1595 -#define YY_NO_ACTION 1596 -#define YY_MIN_REDUCE 1597 -#define YY_MAX_REDUCE 2135 +#define YY_MIN_SHIFTREDUCE 1060 +#define YY_MAX_SHIFTREDUCE 1603 +#define YY_ERROR_ACTION 1604 +#define YY_ACCEPT_ACTION 1605 +#define YY_NO_ACTION 1606 +#define YY_MIN_REDUCE 1607 +#define YY_MAX_REDUCE 2150 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,790 +216,810 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2968) +#define YY_ACTTAB_COUNT (3067) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 460, 354, 461, 1633, 1739, 469, 1595, 461, 1633, 157, - /* 10 */ 542, 82, 45, 43, 1523, 1937, 169, 159, 1752, 1609, - /* 20 */ 362, 1401, 1374, 38, 37, 129, 1933, 44, 42, 41, - /* 30 */ 40, 39, 602, 1453, 1745, 1372, 1666, 334, 1850, 602, - /* 40 */ 1937, 367, 38, 37, 1796, 1798, 44, 42, 41, 40, - /* 50 */ 39, 1933, 407, 1846, 1929, 1935, 345, 583, 1448, 27, - /* 60 */ 1527, 31, 1728, 18, 183, 613, 1399, 38, 37, 377, - /* 70 */ 1380, 44, 42, 41, 40, 39, 171, 1950, 1803, 1929, - /* 80 */ 1935, 357, 64, 45, 43, 355, 1399, 1741, 133, 1790, - /* 90 */ 613, 362, 320, 1374, 1801, 14, 459, 327, 1933, 464, - /* 100 */ 1639, 514, 513, 512, 1453, 365, 1372, 48, 1968, 130, - /* 110 */ 508, 547, 466, 157, 507, 2106, 586, 710, 462, 506, - /* 120 */ 511, 1919, 1752, 619, 478, 505, 1929, 1935, 566, 1448, - /* 130 */ 2112, 175, 1455, 1456, 18, 2107, 572, 613, 1482, 468, - /* 140 */ 160, 1380, 464, 1639, 583, 1704, 1949, 174, 2045, 2046, - /* 150 */ 1984, 131, 2050, 102, 1951, 623, 1953, 1954, 618, 571, - /* 160 */ 613, 1429, 1438, 2106, 259, 172, 14, 2037, 514, 513, - /* 170 */ 512, 356, 2033, 60, 478, 133, 130, 508, 570, 175, - /* 180 */ 1375, 507, 1373, 2107, 572, 177, 506, 511, 710, 605, - /* 190 */ 1938, 2009, 505, 2063, 1483, 227, 44, 42, 41, 40, - /* 200 */ 39, 1933, 1088, 1455, 1456, 1378, 1379, 1430, 1428, 1431, - /* 210 */ 1432, 1433, 1434, 1435, 1436, 1437, 615, 611, 1446, 1447, - /* 220 */ 1449, 1450, 1451, 1452, 1454, 1457, 2, 1310, 1311, 1929, - /* 230 */ 1935, 1400, 1429, 1438, 257, 2045, 582, 368, 126, 581, - /* 240 */ 613, 1090, 2106, 1093, 1094, 157, 60, 1107, 1803, 1106, - /* 250 */ 339, 1375, 1550, 1373, 1752, 84, 322, 570, 175, 532, - /* 260 */ 443, 530, 2107, 572, 1802, 34, 360, 1477, 1478, 1479, - /* 270 */ 1480, 1481, 1485, 1486, 1487, 1488, 1378, 1379, 1108, 1428, - /* 280 */ 1431, 1432, 1433, 1434, 1435, 1436, 1437, 615, 611, 1446, - /* 290 */ 1447, 1449, 1450, 1451, 1452, 1454, 1457, 2, 2111, 11, - /* 300 */ 45, 43, 558, 1548, 1549, 1551, 1552, 11, 362, 9, - /* 310 */ 1374, 340, 602, 338, 337, 1401, 501, 583, 191, 190, - /* 320 */ 503, 1453, 178, 1372, 1214, 645, 644, 643, 1218, 642, - /* 330 */ 1220, 1221, 641, 1223, 638, 1598, 1229, 635, 1231, 1232, - /* 340 */ 632, 629, 502, 1257, 1258, 260, 1448, 235, 133, 187, - /* 350 */ 2111, 18, 228, 610, 2106, 99, 115, 11, 1380, 114, - /* 360 */ 113, 112, 111, 110, 109, 108, 107, 106, 169, 134, - /* 370 */ 2110, 45, 43, 1458, 2107, 2109, 607, 1742, 2009, 362, - /* 380 */ 401, 1374, 60, 14, 87, 79, 85, 48, 78, 60, - /* 390 */ 1851, 1583, 1453, 115, 1372, 178, 114, 113, 112, 111, - /* 400 */ 110, 109, 108, 107, 106, 710, 585, 173, 2045, 2046, - /* 410 */ 49, 131, 2050, 213, 590, 1351, 1352, 1448, 590, 2111, - /* 420 */ 1455, 1456, 547, 2106, 353, 82, 2106, 1861, 164, 1380, - /* 430 */ 1107, 1862, 1106, 561, 495, 491, 487, 483, 210, 2110, - /* 440 */ 1374, 2112, 175, 2107, 2108, 212, 2107, 572, 1746, 1429, - /* 450 */ 1438, 267, 268, 1372, 46, 1597, 266, 1399, 259, 38, - /* 460 */ 37, 1108, 1803, 44, 42, 41, 40, 39, 1375, 331, - /* 470 */ 1373, 1402, 1402, 400, 83, 399, 710, 208, 1801, 124, - /* 480 */ 123, 122, 121, 120, 119, 118, 117, 116, 1380, 2052, - /* 490 */ 1620, 1455, 1456, 1378, 1379, 1474, 1428, 1431, 1432, 1433, - /* 500 */ 1434, 1435, 1436, 1437, 615, 611, 1446, 1447, 1449, 1450, - /* 510 */ 1451, 1452, 1454, 1457, 2, 2049, 567, 562, 556, 1463, - /* 520 */ 1429, 1438, 38, 37, 1484, 1399, 44, 42, 41, 40, - /* 530 */ 39, 178, 60, 571, 1919, 710, 178, 2106, 178, 1375, - /* 540 */ 396, 1373, 1400, 1968, 207, 201, 1726, 206, 35, 276, - /* 550 */ 474, 565, 570, 175, 157, 589, 1399, 2107, 572, 178, - /* 560 */ 1950, 398, 394, 1753, 1378, 1379, 199, 1428, 1431, 1432, - /* 570 */ 1433, 1434, 1435, 1436, 1437, 615, 611, 1446, 1447, 1449, - /* 580 */ 1450, 1451, 1452, 1454, 1457, 2, 45, 43, 603, 603, - /* 590 */ 564, 1968, 1797, 1798, 362, 32, 1374, 547, 1375, 620, - /* 600 */ 1373, 2106, 54, 180, 1919, 1489, 619, 1453, 657, 1372, - /* 610 */ 1560, 41, 40, 39, 237, 184, 2112, 175, 1803, 1750, - /* 620 */ 1750, 2107, 572, 1378, 1379, 366, 375, 510, 509, 1949, - /* 630 */ 2110, 603, 1448, 1984, 1801, 8, 102, 1951, 623, 1953, - /* 640 */ 1954, 618, 1727, 613, 1380, 125, 136, 2052, 143, 2008, - /* 650 */ 2037, 1950, 499, 2052, 356, 2033, 374, 45, 43, 1402, - /* 660 */ 519, 528, 1750, 603, 1619, 362, 1430, 1374, 547, 46, - /* 670 */ 13, 12, 2106, 2048, 526, 529, 524, 125, 1453, 2047, - /* 680 */ 1372, 178, 1968, 93, 504, 1846, 1174, 2112, 175, 226, - /* 690 */ 586, 710, 2107, 572, 1750, 1919, 185, 619, 547, 681, - /* 700 */ 679, 1398, 2106, 1448, 522, 1743, 1455, 1456, 1919, 516, - /* 710 */ 135, 603, 648, 2008, 225, 1380, 1618, 2112, 175, 1617, - /* 720 */ 1949, 1176, 2107, 572, 1984, 405, 1846, 102, 1951, 623, - /* 730 */ 1953, 1954, 618, 603, 613, 1429, 1438, 189, 657, 172, - /* 740 */ 14, 2037, 1750, 603, 603, 356, 2033, 406, 229, 655, - /* 750 */ 66, 1780, 649, 65, 1375, 1794, 1373, 415, 429, 503, - /* 760 */ 1919, 1616, 710, 1919, 1750, 1496, 1640, 2064, 148, 147, - /* 770 */ 652, 651, 650, 145, 1750, 1750, 1380, 1455, 1456, 1378, - /* 780 */ 1379, 502, 1428, 1431, 1432, 1433, 1434, 1435, 1436, 1437, - /* 790 */ 615, 611, 1446, 1447, 1449, 1450, 1451, 1452, 1454, 1457, - /* 800 */ 2, 319, 236, 1397, 603, 1919, 1429, 1438, 1615, 653, - /* 810 */ 437, 654, 1794, 450, 1794, 705, 449, 290, 430, 669, - /* 820 */ 1780, 670, 50, 1720, 3, 1375, 1663, 1373, 1614, 1613, - /* 830 */ 1612, 421, 146, 451, 33, 1750, 423, 1093, 1094, 1516, - /* 840 */ 38, 37, 1725, 1833, 44, 42, 41, 40, 39, 1399, - /* 850 */ 1378, 1379, 1919, 1428, 1431, 1432, 1433, 1434, 1435, 1436, - /* 860 */ 1437, 615, 611, 1446, 1447, 1449, 1450, 1451, 1452, 1454, - /* 870 */ 1457, 2, 1919, 1919, 1919, 38, 37, 335, 1735, 44, - /* 880 */ 42, 41, 40, 39, 53, 218, 2057, 1516, 216, 411, - /* 890 */ 574, 687, 686, 685, 684, 372, 1520, 683, 682, 137, - /* 900 */ 677, 676, 675, 674, 673, 672, 671, 150, 667, 666, - /* 910 */ 665, 371, 370, 662, 661, 660, 659, 658, 139, 447, - /* 920 */ 127, 1383, 442, 441, 440, 439, 436, 435, 434, 433, - /* 930 */ 432, 428, 427, 426, 425, 336, 418, 417, 416, 69, - /* 940 */ 413, 412, 333, 158, 578, 535, 38, 37, 296, 655, - /* 950 */ 44, 42, 41, 40, 39, 220, 222, 1950, 219, 221, - /* 960 */ 1611, 1608, 294, 68, 224, 1610, 67, 223, 148, 147, - /* 970 */ 652, 651, 650, 145, 1737, 38, 37, 1950, 603, 44, - /* 980 */ 42, 41, 40, 39, 195, 456, 454, 547, 1968, 77, - /* 990 */ 1430, 2106, 476, 583, 424, 575, 620, 1607, 1606, 1605, - /* 1000 */ 98, 1919, 408, 619, 1919, 1919, 2112, 175, 1968, 1750, - /* 1010 */ 95, 2107, 572, 603, 52, 409, 620, 603, 603, 546, - /* 1020 */ 60, 1919, 1604, 619, 133, 1906, 1949, 477, 62, 241, - /* 1030 */ 1984, 1747, 141, 102, 1951, 623, 1953, 1954, 618, 1590, - /* 1040 */ 613, 1919, 1919, 1919, 1750, 2126, 1949, 2037, 1750, 1750, - /* 1050 */ 1984, 356, 2033, 102, 1951, 623, 1953, 1954, 618, 101, - /* 1060 */ 613, 1382, 2071, 1539, 603, 2126, 1919, 2037, 1386, 1950, - /* 1070 */ 655, 356, 2033, 384, 1603, 1592, 1593, 1602, 543, 1733, - /* 1080 */ 1547, 243, 2084, 176, 2045, 2046, 232, 131, 2050, 148, - /* 1090 */ 147, 652, 651, 650, 145, 1750, 614, 76, 75, 404, - /* 1100 */ 1968, 156, 182, 603, 647, 603, 1705, 2077, 620, 559, - /* 1110 */ 603, 1653, 1950, 1919, 47, 619, 1601, 587, 1919, 271, - /* 1120 */ 318, 1919, 254, 392, 598, 390, 386, 382, 379, 376, - /* 1130 */ 603, 13, 12, 515, 1750, 1589, 1750, 1519, 1949, 603, - /* 1140 */ 603, 1750, 1984, 1968, 600, 102, 1951, 623, 1953, 1954, - /* 1150 */ 618, 620, 613, 601, 277, 1950, 1919, 2126, 619, 2037, - /* 1160 */ 1919, 1750, 1646, 356, 2033, 1644, 1321, 579, 1600, 178, - /* 1170 */ 1750, 1750, 38, 37, 554, 264, 44, 42, 41, 40, - /* 1180 */ 39, 1949, 603, 211, 517, 1984, 1968, 520, 102, 1951, - /* 1190 */ 623, 1953, 1954, 618, 620, 613, 369, 248, 1940, 1919, - /* 1200 */ 2126, 619, 2037, 142, 144, 146, 356, 2033, 1385, 373, - /* 1210 */ 62, 47, 1919, 1750, 1634, 47, 576, 2100, 627, 359, - /* 1220 */ 358, 144, 1950, 146, 1949, 663, 128, 269, 1984, 1388, - /* 1230 */ 144, 102, 1951, 623, 1953, 1954, 618, 664, 613, 1136, - /* 1240 */ 1453, 1969, 1381, 2126, 1855, 2037, 1942, 1155, 1791, 356, - /* 1250 */ 2033, 2067, 584, 1968, 253, 595, 273, 1207, 256, 1153, - /* 1260 */ 2056, 620, 1490, 1439, 1, 1448, 1919, 289, 619, 4, - /* 1270 */ 1235, 378, 332, 1239, 1137, 1246, 1950, 1380, 1244, 383, - /* 1280 */ 1338, 188, 149, 284, 410, 1402, 414, 445, 1856, 419, - /* 1290 */ 1397, 1949, 431, 1848, 438, 1984, 444, 446, 102, 1951, - /* 1300 */ 623, 1953, 1954, 618, 452, 613, 192, 1968, 453, 455, - /* 1310 */ 2012, 457, 2037, 1403, 1405, 620, 356, 2033, 458, 467, - /* 1320 */ 1919, 470, 619, 198, 609, 471, 1404, 200, 472, 1406, - /* 1330 */ 473, 475, 203, 479, 205, 80, 1110, 81, 209, 496, - /* 1340 */ 497, 498, 321, 105, 1896, 1949, 500, 534, 1895, 1984, - /* 1350 */ 536, 538, 102, 1951, 623, 1953, 1954, 618, 1740, 613, - /* 1360 */ 230, 215, 1950, 1736, 2010, 217, 2037, 151, 152, 1738, - /* 1370 */ 356, 2033, 1734, 153, 154, 537, 285, 541, 233, 544, - /* 1380 */ 2068, 7, 560, 2083, 2082, 593, 569, 1389, 2059, 1384, - /* 1390 */ 551, 557, 249, 1968, 247, 346, 552, 550, 2078, 563, - /* 1400 */ 165, 620, 239, 250, 549, 251, 1919, 347, 619, 580, - /* 1410 */ 577, 242, 1392, 1394, 2129, 1516, 2105, 132, 1401, 255, - /* 1420 */ 252, 588, 261, 350, 611, 1446, 1447, 1449, 1450, 1451, - /* 1430 */ 1452, 1949, 2053, 286, 591, 1984, 1950, 592, 102, 1951, - /* 1440 */ 623, 1953, 1954, 618, 1867, 613, 1866, 1865, 287, 352, - /* 1450 */ 606, 596, 2037, 597, 90, 288, 356, 2033, 92, 1751, - /* 1460 */ 59, 2018, 94, 1795, 1721, 625, 706, 1968, 291, 707, - /* 1470 */ 709, 51, 300, 315, 280, 620, 323, 314, 304, 1950, - /* 1480 */ 1919, 324, 619, 295, 293, 1913, 1912, 73, 1911, 1910, - /* 1490 */ 74, 1907, 380, 1366, 381, 1367, 181, 385, 1905, 387, - /* 1500 */ 388, 389, 1904, 391, 1903, 1949, 393, 1902, 1901, 1984, - /* 1510 */ 1968, 397, 103, 1951, 623, 1953, 1954, 618, 620, 613, - /* 1520 */ 1341, 395, 1950, 1919, 1340, 619, 2037, 402, 403, 1876, - /* 1530 */ 2036, 2033, 1878, 1877, 1875, 1841, 1840, 1301, 1838, 138, - /* 1540 */ 1837, 1836, 1839, 1835, 1834, 1832, 1831, 1830, 1949, 420, - /* 1550 */ 1950, 186, 1984, 1968, 1829, 103, 1951, 623, 1953, 1954, - /* 1560 */ 618, 620, 613, 422, 1828, 1827, 1919, 1826, 619, 2037, - /* 1570 */ 140, 1813, 1812, 608, 2033, 1825, 1824, 1823, 1822, 1821, - /* 1580 */ 1820, 1968, 1819, 1818, 1817, 1816, 1815, 1814, 1811, 617, - /* 1590 */ 1810, 621, 1809, 1808, 1919, 1984, 619, 1807, 103, 1951, - /* 1600 */ 623, 1953, 1954, 618, 1806, 613, 1805, 448, 1804, 1182, - /* 1610 */ 1668, 1303, 2037, 193, 1667, 194, 326, 2033, 1665, 1949, - /* 1620 */ 1629, 1096, 713, 1984, 1628, 170, 312, 1951, 623, 1953, - /* 1630 */ 1954, 618, 616, 613, 604, 2002, 283, 196, 1950, 71, - /* 1640 */ 1095, 1939, 197, 463, 72, 465, 1891, 1885, 1874, 204, - /* 1650 */ 202, 168, 1873, 1858, 1729, 1129, 1664, 703, 699, 695, - /* 1660 */ 691, 281, 1662, 480, 481, 1660, 484, 485, 482, 1968, - /* 1670 */ 1658, 486, 488, 489, 490, 1656, 492, 620, 493, 494, - /* 1680 */ 1643, 1950, 1919, 1642, 619, 1625, 1731, 1730, 1250, 678, - /* 1690 */ 1251, 1165, 1173, 1172, 1171, 1170, 1654, 100, 1950, 1167, - /* 1700 */ 274, 341, 1166, 61, 1647, 680, 1164, 1949, 1645, 521, - /* 1710 */ 342, 1984, 1968, 518, 161, 1951, 623, 1953, 1954, 618, - /* 1720 */ 620, 613, 343, 214, 1624, 1919, 523, 619, 1623, 1968, - /* 1730 */ 525, 1622, 527, 599, 104, 1358, 1356, 620, 1355, 26, - /* 1740 */ 531, 1890, 1919, 1884, 619, 155, 1347, 539, 1872, 1870, - /* 1750 */ 1949, 19, 1950, 2111, 1984, 548, 2074, 162, 1951, 623, - /* 1760 */ 1953, 1954, 618, 16, 613, 555, 234, 1949, 1950, 1562, - /* 1770 */ 262, 1984, 55, 240, 103, 1951, 623, 1953, 1954, 618, - /* 1780 */ 540, 613, 545, 1968, 28, 344, 553, 1345, 2037, 231, - /* 1790 */ 58, 620, 238, 2034, 1546, 245, 1919, 163, 619, 1968, - /* 1800 */ 244, 5, 6, 246, 29, 1940, 30, 620, 1538, 573, - /* 1810 */ 2127, 86, 1919, 1582, 619, 1583, 20, 63, 21, 1513, - /* 1820 */ 1577, 1949, 1576, 348, 1581, 1984, 1580, 349, 161, 1951, - /* 1830 */ 623, 1953, 1954, 618, 1512, 613, 1871, 1949, 1950, 57, - /* 1840 */ 258, 1984, 1869, 166, 306, 1951, 623, 1953, 1954, 618, - /* 1850 */ 1868, 613, 22, 1857, 1950, 263, 1544, 56, 265, 270, - /* 1860 */ 17, 88, 89, 91, 275, 23, 95, 10, 12, 1968, - /* 1870 */ 2075, 1390, 594, 1475, 1987, 612, 1465, 620, 1464, 272, - /* 1880 */ 167, 36, 1919, 1421, 619, 1968, 1443, 179, 568, 15, - /* 1890 */ 351, 622, 24, 620, 1441, 1440, 1413, 1950, 1919, 25, - /* 1900 */ 619, 1236, 626, 364, 628, 1213, 1233, 1949, 624, 630, - /* 1910 */ 631, 1984, 1230, 633, 162, 1951, 623, 1953, 1954, 618, - /* 1920 */ 634, 613, 1224, 1949, 636, 637, 639, 1984, 1968, 640, - /* 1930 */ 313, 1951, 623, 1953, 1954, 618, 617, 613, 1228, 1222, - /* 1940 */ 96, 1919, 646, 619, 278, 1245, 1227, 1226, 1225, 97, - /* 1950 */ 70, 1241, 1127, 656, 1950, 1161, 1160, 1159, 1158, 1157, - /* 1960 */ 1156, 1154, 1152, 1151, 668, 1150, 1949, 2128, 1180, 1148, - /* 1970 */ 1984, 1147, 1145, 312, 1951, 623, 1953, 1954, 618, 279, - /* 1980 */ 613, 1146, 2003, 1144, 1143, 1968, 1142, 1177, 1175, 1139, - /* 1990 */ 361, 1138, 1135, 620, 1134, 1133, 1132, 1661, 1919, 688, - /* 2000 */ 619, 690, 1659, 692, 694, 1950, 689, 1657, 693, 696, - /* 2010 */ 698, 697, 1655, 700, 701, 702, 1641, 704, 1085, 1621, - /* 2020 */ 282, 708, 711, 1949, 712, 1376, 1950, 1984, 292, 1596, - /* 2030 */ 313, 1951, 623, 1953, 1954, 618, 1968, 613, 1596, 1596, - /* 2040 */ 1596, 363, 1596, 1596, 620, 1596, 1596, 1596, 1950, 1919, - /* 2050 */ 1596, 619, 1596, 1596, 1596, 1596, 1596, 1968, 1596, 1596, - /* 2060 */ 1596, 1596, 1596, 1596, 1596, 620, 1596, 1596, 1596, 1596, - /* 2070 */ 1919, 1596, 619, 1596, 1949, 1596, 1596, 1596, 1984, 1968, - /* 2080 */ 1596, 313, 1951, 623, 1953, 1954, 618, 620, 613, 1596, - /* 2090 */ 1596, 1596, 1919, 1596, 619, 533, 1596, 1596, 1596, 1984, - /* 2100 */ 1596, 1596, 308, 1951, 623, 1953, 1954, 618, 1596, 613, - /* 2110 */ 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1949, 1596, 1596, - /* 2120 */ 1596, 1984, 1596, 1596, 297, 1951, 623, 1953, 1954, 618, - /* 2130 */ 1596, 613, 1596, 1596, 1596, 1950, 1596, 1596, 1596, 1596, - /* 2140 */ 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2150 */ 620, 1596, 1596, 1596, 1596, 1919, 1596, 619, 1596, 1596, - /* 2160 */ 1596, 1596, 1596, 1596, 1596, 1596, 1968, 1596, 1596, 1596, - /* 2170 */ 1596, 1596, 1596, 1596, 620, 1596, 1596, 1596, 1596, 1919, - /* 2180 */ 1949, 619, 1596, 1596, 1984, 1596, 1596, 298, 1951, 623, - /* 2190 */ 1953, 1954, 618, 1596, 613, 1596, 1596, 1950, 1596, 1596, - /* 2200 */ 1596, 1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596, - /* 2210 */ 1596, 299, 1951, 623, 1953, 1954, 618, 1596, 613, 1596, - /* 2220 */ 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1968, 1596, - /* 2230 */ 1596, 1596, 1596, 1596, 1596, 1596, 620, 1596, 1596, 1596, - /* 2240 */ 1596, 1919, 1596, 619, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2250 */ 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2260 */ 620, 1596, 1596, 1596, 1950, 1919, 1949, 619, 1596, 1596, - /* 2270 */ 1984, 1596, 1596, 305, 1951, 623, 1953, 1954, 618, 1596, - /* 2280 */ 613, 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2290 */ 1949, 1596, 1596, 1596, 1984, 1968, 1596, 309, 1951, 623, - /* 2300 */ 1953, 1954, 618, 620, 613, 1596, 1596, 1596, 1919, 1596, - /* 2310 */ 619, 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2320 */ 1596, 620, 1596, 1596, 1596, 1596, 1919, 1596, 619, 1596, - /* 2330 */ 1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596, - /* 2340 */ 301, 1951, 623, 1953, 1954, 618, 1596, 613, 1596, 1596, - /* 2350 */ 1596, 1949, 1596, 1596, 1950, 1984, 1596, 1596, 310, 1951, - /* 2360 */ 623, 1953, 1954, 618, 1596, 613, 1596, 1596, 1596, 1596, - /* 2370 */ 1596, 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2380 */ 1596, 1596, 1596, 1596, 1596, 1968, 1596, 1596, 1596, 1596, - /* 2390 */ 1596, 1596, 1596, 620, 1596, 1596, 1596, 1596, 1919, 1596, - /* 2400 */ 619, 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2410 */ 1596, 620, 1596, 1596, 1596, 1950, 1919, 1596, 619, 1596, - /* 2420 */ 1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596, - /* 2430 */ 302, 1951, 623, 1953, 1954, 618, 1596, 613, 1596, 1950, - /* 2440 */ 1596, 1949, 1596, 1596, 1596, 1984, 1968, 1596, 311, 1951, - /* 2450 */ 623, 1953, 1954, 618, 620, 613, 1596, 1596, 1596, 1919, - /* 2460 */ 1596, 619, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2470 */ 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 620, 1596, - /* 2480 */ 1596, 1596, 1596, 1919, 1949, 619, 1596, 1596, 1984, 1596, - /* 2490 */ 1596, 303, 1951, 623, 1953, 1954, 618, 1596, 613, 1596, - /* 2500 */ 1596, 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1949, 1596, - /* 2510 */ 1596, 1596, 1984, 1596, 1596, 316, 1951, 623, 1953, 1954, - /* 2520 */ 618, 1596, 613, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2530 */ 1596, 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2540 */ 1596, 620, 1596, 1596, 1596, 1596, 1919, 1596, 619, 1596, - /* 2550 */ 1596, 1596, 1596, 1596, 1596, 1596, 1950, 1596, 1596, 1596, - /* 2560 */ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2570 */ 1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596, 317, 1951, - /* 2580 */ 623, 1953, 1954, 618, 1596, 613, 1596, 1968, 1596, 1596, - /* 2590 */ 1596, 1596, 1596, 1596, 1596, 620, 1596, 1596, 1596, 1596, - /* 2600 */ 1919, 1596, 619, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2610 */ 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2620 */ 1596, 1596, 1596, 1596, 1596, 1949, 1950, 1596, 1596, 1984, - /* 2630 */ 1596, 1596, 1962, 1951, 623, 1953, 1954, 618, 1596, 613, - /* 2640 */ 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 620, - /* 2650 */ 1596, 1596, 1596, 1596, 1919, 1596, 619, 1968, 1596, 1596, - /* 2660 */ 1596, 1596, 1596, 1596, 1596, 620, 1596, 1596, 1596, 1950, - /* 2670 */ 1919, 1596, 619, 1596, 1596, 1596, 1596, 1596, 1596, 1949, - /* 2680 */ 1596, 1596, 1596, 1984, 1596, 1596, 1961, 1951, 623, 1953, - /* 2690 */ 1954, 618, 1596, 613, 1596, 1949, 1596, 1596, 1596, 1984, - /* 2700 */ 1968, 1596, 1960, 1951, 623, 1953, 1954, 618, 620, 613, - /* 2710 */ 1596, 1596, 1596, 1919, 1596, 619, 1596, 1596, 1596, 1596, - /* 2720 */ 1596, 1596, 1596, 1596, 1596, 1596, 1950, 1596, 1596, 1596, - /* 2730 */ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1949, 1596, - /* 2740 */ 1596, 1596, 1984, 1950, 1596, 328, 1951, 623, 1953, 1954, - /* 2750 */ 618, 1596, 613, 1596, 1596, 1596, 1596, 1968, 1596, 1596, - /* 2760 */ 1596, 1596, 1596, 1596, 1596, 620, 1596, 1596, 1596, 1950, - /* 2770 */ 1919, 1596, 619, 1596, 1968, 1596, 1596, 1596, 1596, 1596, - /* 2780 */ 1596, 1596, 620, 1596, 1596, 1596, 1596, 1919, 1596, 619, - /* 2790 */ 1596, 1596, 1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, - /* 2800 */ 1968, 1596, 329, 1951, 623, 1953, 1954, 618, 620, 613, - /* 2810 */ 1596, 1596, 1949, 1919, 1596, 619, 1984, 1596, 1596, 325, - /* 2820 */ 1951, 623, 1953, 1954, 618, 1596, 613, 1596, 1596, 1596, - /* 2830 */ 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1949, 1596, - /* 2840 */ 1596, 1596, 1984, 1596, 1596, 330, 1951, 623, 1953, 1954, - /* 2850 */ 618, 1596, 613, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2860 */ 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 620, - /* 2870 */ 1596, 1596, 1596, 1596, 1919, 1596, 619, 1596, 1596, 1596, - /* 2880 */ 1596, 1596, 1596, 1596, 1950, 1596, 1596, 1596, 1596, 1596, - /* 2890 */ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 621, - /* 2900 */ 1596, 1596, 1596, 1984, 1596, 1596, 308, 1951, 623, 1953, - /* 2910 */ 1954, 618, 1596, 613, 1596, 1968, 1596, 1596, 1596, 1596, - /* 2920 */ 1596, 1596, 1596, 620, 1596, 1596, 1596, 1596, 1919, 1596, - /* 2930 */ 619, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2940 */ 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, - /* 2950 */ 1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596, - /* 2960 */ 307, 1951, 623, 1953, 1954, 618, 1596, 613, + /* 0 */ 1749, 407, 460, 1874, 461, 1643, 469, 367, 461, 1643, + /* 10 */ 1806, 1808, 45, 43, 1533, 1952, 1872, 590, 1630, 466, + /* 20 */ 362, 1745, 1384, 38, 37, 462, 1948, 44, 42, 41, + /* 30 */ 40, 39, 169, 1463, 459, 1382, 229, 464, 1649, 1790, + /* 40 */ 571, 320, 38, 37, 2121, 1813, 44, 42, 41, 40, + /* 50 */ 39, 602, 355, 334, 1860, 1944, 1950, 345, 1458, 570, + /* 60 */ 175, 1811, 1934, 18, 2122, 572, 613, 38, 37, 1965, + /* 70 */ 1390, 44, 42, 41, 40, 39, 468, 1410, 583, 464, + /* 80 */ 1649, 38, 37, 45, 43, 44, 42, 41, 40, 39, + /* 90 */ 354, 362, 171, 1384, 1607, 14, 603, 327, 157, 1112, + /* 100 */ 1983, 1111, 2125, 27, 1463, 1800, 1382, 1762, 586, 134, + /* 110 */ 54, 1570, 602, 1934, 603, 619, 1410, 710, 125, 124, + /* 120 */ 123, 122, 121, 120, 119, 118, 117, 1760, 126, 1458, + /* 130 */ 1113, 1605, 1465, 1466, 18, 499, 35, 276, 1492, 1964, + /* 140 */ 84, 1390, 478, 1999, 64, 1760, 103, 1966, 623, 1968, + /* 150 */ 1969, 618, 602, 613, 130, 2126, 1807, 1808, 172, 2121, + /* 160 */ 2052, 1439, 1448, 1755, 356, 2048, 14, 1464, 1467, 257, + /* 170 */ 2060, 582, 1738, 127, 581, 2125, 84, 2121, 177, 2122, + /* 180 */ 2124, 2126, 1385, 2126, 1383, 2121, 2078, 48, 710, 1262, + /* 190 */ 1263, 160, 570, 175, 1493, 377, 1714, 2122, 572, 1756, + /* 200 */ 1411, 2125, 1409, 1465, 1466, 2122, 2123, 1388, 1389, 396, + /* 210 */ 1438, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 615, 611, + /* 220 */ 1456, 1457, 1459, 1460, 1461, 1462, 2, 48, 1329, 1330, + /* 230 */ 398, 394, 1439, 1448, 478, 60, 156, 547, 1464, 1467, + /* 240 */ 116, 2121, 648, 115, 114, 113, 112, 111, 110, 109, + /* 250 */ 108, 107, 339, 1385, 1560, 1383, 2127, 175, 41, 40, + /* 260 */ 39, 2122, 572, 1328, 1331, 34, 360, 1487, 1488, 1489, + /* 270 */ 1490, 1491, 1495, 1496, 1497, 1498, 1593, 60, 1388, 1389, + /* 280 */ 260, 1438, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 615, + /* 290 */ 611, 1456, 1457, 1459, 1460, 1461, 1462, 2, 169, 11, + /* 300 */ 45, 43, 558, 1558, 1559, 1561, 1562, 159, 362, 1619, + /* 310 */ 1384, 1093, 227, 340, 566, 338, 337, 60, 501, 89, + /* 320 */ 1861, 1463, 503, 1382, 1219, 645, 644, 643, 1223, 642, + /* 330 */ 1225, 1226, 641, 1228, 638, 1676, 1234, 635, 1236, 1237, + /* 340 */ 632, 629, 213, 259, 502, 1952, 1458, 1409, 1751, 401, + /* 350 */ 1095, 18, 1098, 1099, 1813, 11, 1948, 164, 1390, 1948, + /* 360 */ 365, 366, 574, 495, 491, 487, 483, 210, 157, 60, + /* 370 */ 1811, 45, 43, 1468, 86, 322, 178, 1762, 532, 362, + /* 380 */ 530, 1384, 1983, 14, 178, 1944, 1950, 357, 1944, 1950, + /* 390 */ 565, 547, 1463, 49, 1382, 2121, 613, 510, 509, 613, + /* 400 */ 514, 513, 512, 85, 1411, 710, 208, 1608, 131, 508, + /* 410 */ 2127, 175, 11, 507, 9, 2122, 572, 1458, 506, 511, + /* 420 */ 1465, 1466, 267, 268, 505, 1737, 178, 266, 116, 1390, + /* 430 */ 564, 115, 114, 113, 112, 111, 110, 109, 108, 107, + /* 440 */ 38, 37, 681, 679, 44, 42, 41, 40, 39, 1439, + /* 450 */ 1448, 368, 1412, 1813, 46, 1464, 1467, 38, 37, 157, + /* 460 */ 331, 44, 42, 41, 40, 39, 178, 2067, 1762, 1811, + /* 470 */ 1385, 1537, 1383, 207, 201, 60, 710, 1409, 206, 38, + /* 480 */ 37, 474, 657, 44, 42, 41, 40, 39, 1315, 1316, + /* 490 */ 1393, 1465, 1466, 2064, 1629, 1388, 1389, 199, 1438, 1441, + /* 500 */ 1442, 1443, 1444, 1445, 1446, 1447, 615, 611, 1456, 1457, + /* 510 */ 1459, 1460, 1461, 1462, 2, 514, 513, 512, 178, 1409, + /* 520 */ 1439, 1448, 528, 131, 508, 571, 1464, 1467, 507, 2121, + /* 530 */ 1179, 2067, 655, 506, 511, 526, 2067, 524, 1934, 505, + /* 540 */ 1408, 1385, 178, 1383, 570, 175, 100, 259, 1628, 2122, + /* 550 */ 572, 148, 147, 652, 651, 650, 145, 2063, 583, 589, + /* 560 */ 135, 400, 2062, 399, 1627, 1181, 1388, 1389, 1752, 1438, + /* 570 */ 1441, 1442, 1443, 1444, 1445, 1446, 1447, 615, 611, 1456, + /* 580 */ 1457, 1459, 1460, 1461, 1462, 2, 45, 43, 603, 134, + /* 590 */ 1384, 1473, 1934, 1843, 362, 237, 1384, 1409, 713, 52, + /* 600 */ 1874, 547, 180, 1382, 187, 2121, 546, 1463, 1934, 1382, + /* 610 */ 353, 146, 283, 1871, 590, 603, 1965, 1736, 1440, 1760, + /* 620 */ 2127, 175, 375, 1600, 178, 2122, 572, 168, 583, 405, + /* 630 */ 1953, 1856, 1458, 703, 699, 695, 691, 281, 1390, 1396, + /* 640 */ 81, 1948, 183, 80, 1390, 1856, 1760, 1983, 585, 173, + /* 650 */ 2060, 2061, 94, 132, 2065, 617, 185, 45, 43, 134, + /* 660 */ 1934, 603, 619, 53, 547, 362, 1494, 1384, 2121, 46, + /* 670 */ 1944, 1950, 1626, 101, 1753, 126, 274, 583, 1463, 657, + /* 680 */ 1382, 613, 504, 2127, 175, 710, 1964, 443, 2122, 572, + /* 690 */ 1999, 710, 1760, 312, 1966, 623, 1968, 1969, 618, 616, + /* 700 */ 613, 604, 2017, 1458, 1735, 1625, 1465, 1466, 134, 599, + /* 710 */ 44, 42, 41, 40, 39, 1390, 1934, 1599, 561, 174, + /* 720 */ 2060, 2061, 1624, 132, 2065, 136, 38, 37, 2023, 1747, + /* 730 */ 44, 42, 41, 40, 39, 1439, 1448, 32, 1440, 1623, + /* 740 */ 14, 1464, 1467, 603, 424, 191, 190, 1499, 262, 1934, + /* 750 */ 1385, 605, 1383, 2024, 13, 12, 1385, 406, 1383, 228, + /* 760 */ 1622, 607, 710, 2024, 1412, 1355, 1934, 231, 176, 2060, + /* 770 */ 2061, 1412, 132, 2065, 1760, 1388, 1389, 1465, 1466, 8, + /* 780 */ 374, 1388, 1389, 1934, 1438, 1441, 1442, 1443, 1444, 1445, + /* 790 */ 1446, 1447, 615, 611, 1456, 1457, 1459, 1460, 1461, 1462, + /* 800 */ 2, 567, 562, 556, 1934, 603, 1439, 1448, 319, 157, + /* 810 */ 1407, 655, 1464, 1467, 1549, 2072, 1526, 437, 1763, 415, + /* 820 */ 450, 1813, 547, 449, 1361, 1362, 2121, 1385, 1856, 1383, + /* 830 */ 148, 147, 652, 651, 650, 145, 1760, 1812, 421, 189, + /* 840 */ 451, 2127, 175, 423, 1409, 1621, 2122, 572, 649, 1506, + /* 850 */ 575, 1804, 1388, 1389, 610, 1438, 1441, 1442, 1443, 1444, + /* 860 */ 1445, 1446, 1447, 615, 611, 1456, 1457, 1459, 1460, 1461, + /* 870 */ 1462, 2, 1618, 653, 1617, 670, 1804, 1730, 158, 654, + /* 880 */ 1616, 31, 1804, 296, 335, 1673, 603, 38, 37, 1934, + /* 890 */ 1530, 44, 42, 41, 40, 39, 411, 294, 70, 33, + /* 900 */ 429, 69, 1615, 1098, 1099, 38, 37, 184, 1390, 44, + /* 910 */ 42, 41, 40, 39, 236, 408, 1934, 1760, 1934, 195, + /* 920 */ 456, 454, 290, 669, 1934, 1790, 447, 542, 409, 442, + /* 930 */ 441, 440, 439, 436, 435, 434, 433, 432, 428, 427, + /* 940 */ 426, 425, 336, 418, 417, 416, 1934, 413, 412, 333, + /* 950 */ 687, 686, 685, 684, 372, 60, 683, 682, 138, 677, + /* 960 */ 676, 675, 674, 673, 672, 671, 150, 667, 666, 665, + /* 970 */ 371, 370, 662, 661, 660, 659, 658, 1112, 503, 1111, + /* 980 */ 50, 1921, 3, 1526, 235, 1440, 1614, 578, 1613, 1612, + /* 990 */ 603, 603, 212, 603, 102, 603, 655, 1611, 1484, 519, + /* 1000 */ 502, 140, 1392, 128, 430, 476, 1965, 477, 1113, 1757, + /* 1010 */ 1743, 603, 535, 603, 529, 148, 147, 652, 651, 650, + /* 1020 */ 145, 1760, 1760, 87, 1760, 142, 1760, 543, 226, 384, + /* 1030 */ 1934, 232, 1934, 1934, 78, 77, 404, 1983, 1610, 182, + /* 1040 */ 614, 1934, 1760, 522, 1760, 620, 218, 647, 516, 216, + /* 1050 */ 1934, 1650, 619, 225, 547, 1602, 1603, 318, 2121, 1141, + /* 1060 */ 392, 71, 390, 386, 382, 379, 376, 603, 1965, 220, + /* 1070 */ 1715, 576, 219, 2127, 175, 62, 1964, 603, 2122, 572, + /* 1080 */ 1999, 587, 1934, 103, 1966, 623, 1968, 1969, 618, 67, + /* 1090 */ 613, 271, 66, 137, 1142, 143, 2023, 2052, 1760, 1983, + /* 1100 */ 705, 356, 2048, 603, 178, 603, 603, 586, 1760, 603, + /* 1110 */ 603, 79, 1934, 222, 619, 224, 221, 598, 223, 600, + /* 1120 */ 601, 1663, 1965, 277, 369, 241, 47, 1557, 264, 99, + /* 1130 */ 68, 1529, 1656, 1654, 1760, 144, 1760, 1760, 1964, 96, + /* 1140 */ 1760, 1760, 1999, 515, 1620, 103, 1966, 623, 1968, 1969, + /* 1150 */ 618, 1395, 613, 1983, 517, 520, 146, 172, 2092, 2052, + /* 1160 */ 254, 620, 62, 356, 2048, 211, 1934, 47, 619, 663, + /* 1170 */ 13, 12, 47, 1955, 559, 664, 248, 243, 1326, 627, + /* 1180 */ 269, 1965, 595, 144, 1984, 2079, 146, 273, 129, 373, + /* 1190 */ 144, 1160, 1964, 1865, 2082, 1644, 1999, 1158, 584, 103, + /* 1200 */ 1966, 623, 1968, 1969, 618, 1801, 613, 256, 1212, 253, + /* 1210 */ 579, 2141, 1983, 2052, 1500, 1, 378, 356, 2048, 1449, + /* 1220 */ 620, 1957, 4, 383, 289, 1934, 1348, 619, 2086, 332, + /* 1230 */ 284, 1240, 188, 410, 1412, 1244, 445, 1866, 1251, 1407, + /* 1240 */ 1249, 414, 149, 419, 431, 1858, 438, 1965, 444, 446, + /* 1250 */ 452, 1964, 192, 455, 453, 1999, 457, 1413, 103, 1966, + /* 1260 */ 623, 1968, 1969, 618, 458, 613, 467, 1965, 470, 1415, + /* 1270 */ 2141, 198, 2052, 1410, 471, 200, 356, 2048, 1983, 1414, + /* 1280 */ 472, 1416, 203, 473, 475, 479, 620, 2099, 1115, 498, + /* 1290 */ 205, 1934, 82, 619, 83, 209, 496, 500, 1983, 497, + /* 1300 */ 1750, 106, 321, 215, 1746, 534, 620, 1911, 536, 285, + /* 1310 */ 217, 1934, 537, 619, 151, 538, 230, 1964, 544, 233, + /* 1320 */ 152, 1999, 1748, 1744, 103, 1966, 623, 1968, 1969, 618, + /* 1330 */ 153, 613, 154, 560, 1910, 2098, 2141, 1964, 2052, 551, + /* 1340 */ 593, 1999, 356, 2048, 103, 1966, 623, 1968, 1969, 618, + /* 1350 */ 2083, 613, 541, 554, 2097, 239, 2141, 557, 2052, 359, + /* 1360 */ 358, 346, 356, 2048, 1965, 2093, 242, 563, 7, 1398, + /* 1370 */ 2074, 569, 552, 2115, 247, 550, 549, 580, 2144, 1526, + /* 1380 */ 1463, 2120, 1391, 577, 347, 255, 252, 133, 1411, 588, + /* 1390 */ 286, 350, 2068, 591, 592, 1983, 261, 1882, 1881, 1880, + /* 1400 */ 352, 287, 597, 620, 596, 1458, 91, 288, 1934, 93, + /* 1410 */ 619, 1761, 59, 2033, 95, 165, 250, 1390, 625, 1805, + /* 1420 */ 1731, 706, 280, 1965, 249, 251, 709, 291, 707, 51, + /* 1430 */ 315, 295, 323, 293, 1964, 324, 1928, 300, 1999, 1927, + /* 1440 */ 314, 103, 1966, 623, 1968, 1969, 618, 304, 613, 75, + /* 1450 */ 1926, 1925, 76, 2141, 1983, 2052, 1922, 380, 381, 356, + /* 1460 */ 2048, 1376, 620, 1377, 609, 181, 385, 1934, 1920, 619, + /* 1470 */ 2071, 389, 387, 388, 1919, 391, 1918, 393, 1917, 395, + /* 1480 */ 1916, 397, 1351, 1350, 1893, 1892, 402, 403, 1891, 1890, + /* 1490 */ 1306, 1851, 1850, 1964, 1848, 139, 1847, 1999, 1846, 1849, + /* 1500 */ 103, 1966, 623, 1968, 1969, 618, 1845, 613, 1844, 1842, + /* 1510 */ 1841, 1840, 2027, 1965, 2052, 186, 420, 1839, 356, 2048, + /* 1520 */ 422, 1838, 1837, 1836, 1835, 1834, 1833, 1832, 1831, 1399, + /* 1530 */ 1830, 1394, 1829, 1828, 1827, 1826, 1825, 1824, 1823, 141, + /* 1540 */ 1822, 1821, 1820, 1819, 1983, 1818, 1817, 1816, 448, 1815, + /* 1550 */ 1814, 1308, 620, 1187, 1402, 1404, 1678, 1934, 193, 619, + /* 1560 */ 1677, 194, 1675, 1639, 170, 1101, 611, 1456, 1457, 1459, + /* 1570 */ 1460, 1461, 1462, 196, 1638, 1965, 1906, 1900, 73, 1100, + /* 1580 */ 1889, 204, 1888, 1964, 197, 1868, 1739, 1999, 1674, 1672, + /* 1590 */ 103, 1966, 623, 1968, 1969, 618, 74, 613, 1965, 1954, + /* 1600 */ 463, 465, 2025, 202, 2052, 480, 1983, 481, 356, 2048, + /* 1610 */ 482, 1670, 1134, 484, 620, 1668, 485, 489, 486, 1934, + /* 1620 */ 490, 619, 488, 1666, 1653, 492, 1652, 1635, 1741, 1983, + /* 1630 */ 494, 493, 1256, 1740, 1255, 1178, 1177, 620, 1176, 1175, + /* 1640 */ 678, 1172, 1934, 680, 619, 1964, 1664, 1170, 1171, 1999, + /* 1650 */ 1657, 1169, 103, 1966, 623, 1968, 1969, 618, 341, 613, + /* 1660 */ 518, 342, 61, 214, 606, 1965, 2052, 1655, 1964, 343, + /* 1670 */ 356, 2048, 1999, 1634, 1633, 104, 1966, 623, 1968, 1969, + /* 1680 */ 618, 1632, 613, 521, 523, 527, 525, 1366, 1965, 2052, + /* 1690 */ 105, 1368, 1365, 2051, 2048, 531, 1983, 26, 1905, 1357, + /* 1700 */ 1899, 155, 539, 1887, 620, 1885, 19, 2126, 16, 1934, + /* 1710 */ 1572, 619, 28, 238, 553, 555, 240, 1556, 55, 1983, + /* 1720 */ 58, 245, 246, 30, 163, 244, 29, 620, 1548, 540, + /* 1730 */ 1955, 20, 1934, 1592, 619, 1964, 344, 234, 88, 1999, + /* 1740 */ 1593, 63, 104, 1966, 623, 1968, 1969, 618, 1587, 613, + /* 1750 */ 21, 1965, 17, 1586, 348, 1591, 2052, 1590, 621, 349, + /* 1760 */ 608, 2048, 1999, 545, 5, 104, 1966, 623, 1968, 1969, + /* 1770 */ 618, 1965, 613, 258, 1523, 6, 57, 166, 1522, 2052, + /* 1780 */ 1886, 1884, 1983, 326, 2048, 1883, 22, 1867, 263, 1554, + /* 1790 */ 620, 265, 270, 90, 65, 1934, 92, 619, 275, 272, + /* 1800 */ 594, 23, 1983, 12, 10, 1485, 1400, 96, 1453, 2002, + /* 1810 */ 620, 612, 167, 1451, 179, 1934, 36, 619, 1431, 1450, + /* 1820 */ 1475, 1964, 15, 626, 24, 1999, 364, 1423, 161, 1966, + /* 1830 */ 623, 1968, 1969, 618, 1474, 613, 25, 630, 1241, 624, + /* 1840 */ 1965, 1964, 628, 633, 1238, 1999, 1235, 631, 162, 1966, + /* 1850 */ 623, 1968, 1969, 618, 622, 613, 634, 636, 1229, 637, + /* 1860 */ 639, 56, 1227, 640, 1233, 1232, 1218, 646, 1231, 548, + /* 1870 */ 2089, 1983, 1230, 97, 278, 1250, 1246, 98, 1132, 620, + /* 1880 */ 656, 72, 1166, 1165, 1934, 1164, 619, 1163, 1162, 1185, + /* 1890 */ 1161, 1159, 1157, 1156, 1965, 1155, 668, 1153, 1152, 1151, + /* 1900 */ 573, 2142, 1150, 279, 1149, 1182, 1148, 1147, 1180, 1144, + /* 1910 */ 1964, 1965, 1143, 1140, 1999, 1138, 1139, 104, 1966, 623, + /* 1920 */ 1968, 1969, 618, 1137, 613, 1983, 1671, 688, 690, 1669, + /* 1930 */ 689, 2052, 692, 620, 693, 694, 2049, 1667, 1934, 696, + /* 1940 */ 619, 698, 1983, 1665, 700, 702, 697, 701, 1651, 704, + /* 1950 */ 620, 1090, 1631, 282, 708, 1934, 1386, 619, 292, 711, + /* 1960 */ 712, 1606, 1606, 1606, 1964, 1965, 1606, 1606, 1999, 1606, + /* 1970 */ 1606, 161, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, + /* 1980 */ 1606, 1964, 1606, 1965, 1606, 1999, 1606, 1606, 306, 1966, + /* 1990 */ 623, 1968, 1969, 618, 1606, 613, 1983, 1606, 1606, 1606, + /* 2000 */ 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, + /* 2010 */ 1606, 619, 1606, 2090, 1983, 1606, 1606, 1606, 1606, 351, + /* 2020 */ 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, + /* 2030 */ 1606, 1606, 568, 1606, 1606, 1964, 1606, 1965, 1606, 1999, + /* 2040 */ 1606, 1606, 162, 1966, 623, 1968, 1969, 618, 1606, 613, + /* 2050 */ 1606, 1606, 1606, 1964, 1606, 1965, 1606, 1999, 1606, 1606, + /* 2060 */ 313, 1966, 623, 1968, 1969, 618, 1606, 613, 1983, 1606, + /* 2070 */ 1606, 1606, 1606, 1606, 1606, 1606, 617, 1606, 1606, 1606, + /* 2080 */ 1606, 1934, 1606, 619, 1606, 1606, 1983, 1606, 1606, 1606, + /* 2090 */ 1606, 361, 1606, 1606, 620, 2143, 1606, 1606, 1606, 1934, + /* 2100 */ 1606, 619, 1606, 1606, 1606, 1606, 1606, 1964, 1606, 1606, + /* 2110 */ 1965, 1999, 1606, 1606, 312, 1966, 623, 1968, 1969, 618, + /* 2120 */ 1606, 613, 1606, 2018, 1606, 1964, 1606, 1606, 1606, 1999, + /* 2130 */ 1965, 1606, 313, 1966, 623, 1968, 1969, 618, 1606, 613, + /* 2140 */ 1606, 1983, 1606, 1606, 1606, 1606, 363, 1606, 1606, 620, + /* 2150 */ 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, + /* 2160 */ 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, + /* 2170 */ 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, + /* 2180 */ 1964, 1606, 1606, 1606, 1999, 1606, 1606, 313, 1966, 623, + /* 2190 */ 1968, 1969, 618, 1606, 613, 1606, 1606, 1965, 1606, 1606, + /* 2200 */ 533, 1606, 1606, 1606, 1999, 1606, 1606, 308, 1966, 623, + /* 2210 */ 1968, 1969, 618, 1606, 613, 1606, 1606, 1606, 1606, 1606, + /* 2220 */ 1606, 1606, 1965, 1606, 1606, 1606, 1606, 1606, 1983, 1606, + /* 2230 */ 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, + /* 2240 */ 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, 1606, 1965, + /* 2250 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2260 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1964, 619, 1606, + /* 2270 */ 1606, 1999, 1606, 1606, 297, 1966, 623, 1968, 1969, 618, + /* 2280 */ 1983, 613, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, + /* 2290 */ 1606, 1606, 1964, 1934, 1606, 619, 1999, 1606, 1606, 298, + /* 2300 */ 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, 1965, + /* 2310 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1964, + /* 2320 */ 1606, 1606, 1606, 1999, 1606, 1606, 299, 1966, 623, 1968, + /* 2330 */ 1969, 618, 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2340 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, + /* 2350 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, + /* 2360 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2370 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1964, + /* 2380 */ 1606, 1606, 1606, 1999, 1606, 1606, 305, 1966, 623, 1968, + /* 2390 */ 1969, 618, 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2400 */ 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 309, + /* 2410 */ 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, 1965, + /* 2420 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2430 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, + /* 2440 */ 1606, 1606, 1606, 1606, 1965, 1606, 1606, 1606, 1606, 1606, + /* 2450 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, + /* 2460 */ 1606, 1606, 1964, 1934, 1606, 619, 1999, 1606, 1606, 301, + /* 2470 */ 1966, 623, 1968, 1969, 618, 1983, 613, 1606, 1606, 1606, + /* 2480 */ 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1964, + /* 2490 */ 619, 1606, 1606, 1999, 1606, 1606, 310, 1966, 623, 1968, + /* 2500 */ 1969, 618, 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2510 */ 1606, 1606, 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1965, + /* 2520 */ 1606, 302, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, + /* 2530 */ 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2540 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, + /* 2550 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, + /* 2560 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, + /* 2570 */ 1606, 1965, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 311, + /* 2580 */ 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, 1964, + /* 2590 */ 1606, 1606, 1606, 1999, 1965, 1606, 303, 1966, 623, 1968, + /* 2600 */ 1969, 618, 1983, 613, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2610 */ 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, + /* 2620 */ 1606, 1606, 1606, 1965, 1606, 1983, 1606, 1606, 1606, 1606, + /* 2630 */ 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, + /* 2640 */ 619, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 316, 1966, + /* 2650 */ 623, 1968, 1969, 618, 1983, 613, 1606, 1606, 1606, 1606, + /* 2660 */ 1606, 1606, 620, 1606, 1964, 1606, 1606, 1934, 1999, 619, + /* 2670 */ 1606, 317, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, + /* 2680 */ 1606, 1965, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2690 */ 1606, 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1965, + /* 2700 */ 1977, 1966, 623, 1968, 1969, 618, 1606, 613, 1606, 1606, + /* 2710 */ 1606, 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2720 */ 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, + /* 2730 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, + /* 2740 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, + /* 2750 */ 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 1976, 1966, + /* 2760 */ 623, 1968, 1969, 618, 1965, 613, 1606, 1606, 1606, 1964, + /* 2770 */ 1606, 1606, 1606, 1999, 1606, 1606, 1975, 1966, 623, 1968, + /* 2780 */ 1969, 618, 1606, 613, 1606, 1606, 1965, 1606, 1606, 1606, + /* 2790 */ 1606, 1606, 1606, 1606, 1606, 1983, 1606, 1606, 1606, 1606, + /* 2800 */ 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, + /* 2810 */ 619, 1606, 1606, 1606, 1606, 1606, 1606, 1983, 1606, 1606, + /* 2820 */ 1606, 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, 1606, + /* 2830 */ 1934, 1606, 619, 1606, 1964, 1606, 1606, 1606, 1999, 1606, + /* 2840 */ 1606, 328, 1966, 623, 1968, 1969, 618, 1965, 613, 1606, + /* 2850 */ 1606, 1606, 1606, 1606, 1606, 1606, 1964, 1606, 1606, 1606, + /* 2860 */ 1999, 1606, 1606, 329, 1966, 623, 1968, 1969, 618, 1965, + /* 2870 */ 613, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1983, 1606, + /* 2880 */ 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, 1606, 1606, + /* 2890 */ 1606, 1934, 1606, 619, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2900 */ 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, 1606, + /* 2910 */ 1606, 1606, 1606, 1934, 1606, 619, 1606, 1964, 1606, 1606, + /* 2920 */ 1606, 1999, 1606, 1606, 325, 1966, 623, 1968, 1969, 618, + /* 2930 */ 1965, 613, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1964, + /* 2940 */ 1606, 1606, 1606, 1999, 1606, 1606, 330, 1966, 623, 1968, + /* 2950 */ 1969, 618, 1606, 613, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2960 */ 1606, 1983, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 620, + /* 2970 */ 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, 1606, 1606, + /* 2980 */ 1606, 1606, 1965, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 2990 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 3000 */ 621, 1606, 1606, 1606, 1999, 1606, 1606, 308, 1966, 623, + /* 3010 */ 1968, 1969, 618, 1983, 613, 1606, 1606, 1606, 1606, 1606, + /* 3020 */ 1606, 620, 1606, 1606, 1606, 1606, 1934, 1606, 619, 1606, + /* 3030 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 3040 */ 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, 1606, + /* 3050 */ 1606, 1606, 1964, 1606, 1606, 1606, 1999, 1606, 1606, 307, + /* 3060 */ 1966, 623, 1968, 1969, 618, 1606, 613, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 331, 350, 333, 334, 359, 331, 324, 333, 334, 358, - /* 10 */ 391, 341, 12, 13, 14, 360, 358, 326, 367, 328, - /* 20 */ 20, 20, 22, 8, 9, 355, 371, 12, 13, 14, - /* 30 */ 15, 16, 20, 33, 364, 35, 0, 379, 380, 20, - /* 40 */ 360, 369, 8, 9, 372, 373, 12, 13, 14, 15, - /* 50 */ 16, 371, 335, 366, 399, 400, 401, 335, 58, 44, - /* 60 */ 14, 2, 0, 63, 377, 410, 20, 8, 9, 387, - /* 70 */ 70, 12, 13, 14, 15, 16, 357, 327, 358, 399, - /* 80 */ 400, 401, 4, 12, 13, 365, 20, 360, 366, 370, - /* 90 */ 410, 20, 375, 22, 374, 95, 332, 63, 371, 335, - /* 100 */ 336, 65, 66, 67, 33, 350, 35, 95, 358, 73, - /* 110 */ 74, 429, 14, 358, 78, 433, 366, 117, 20, 83, - /* 120 */ 84, 371, 367, 373, 62, 89, 399, 400, 20, 58, - /* 130 */ 448, 449, 132, 133, 63, 453, 454, 410, 104, 332, - /* 140 */ 342, 70, 335, 336, 335, 347, 396, 425, 426, 427, - /* 150 */ 400, 429, 430, 403, 404, 405, 406, 407, 408, 429, - /* 160 */ 410, 161, 162, 433, 163, 415, 95, 417, 65, 66, - /* 170 */ 67, 421, 422, 95, 62, 366, 73, 74, 448, 449, - /* 180 */ 180, 78, 182, 453, 454, 435, 83, 84, 117, 414, - /* 190 */ 360, 416, 89, 443, 160, 127, 12, 13, 14, 15, - /* 200 */ 16, 371, 4, 132, 133, 205, 206, 161, 208, 209, + /* 0 */ 359, 335, 331, 373, 333, 334, 331, 369, 333, 334, + /* 10 */ 372, 373, 12, 13, 14, 360, 386, 387, 327, 14, + /* 20 */ 20, 359, 22, 8, 9, 20, 371, 12, 13, 14, + /* 30 */ 15, 16, 358, 33, 332, 35, 351, 335, 336, 354, + /* 40 */ 430, 375, 8, 9, 434, 358, 12, 13, 14, 15, + /* 50 */ 16, 20, 365, 379, 380, 400, 401, 402, 58, 449, + /* 60 */ 450, 374, 371, 63, 454, 455, 411, 8, 9, 327, + /* 70 */ 70, 12, 13, 14, 15, 16, 332, 20, 335, 335, + /* 80 */ 336, 8, 9, 12, 13, 12, 13, 14, 15, 16, + /* 90 */ 350, 20, 357, 22, 0, 95, 335, 63, 358, 20, + /* 100 */ 358, 22, 3, 44, 33, 370, 35, 367, 366, 366, + /* 110 */ 349, 96, 20, 371, 335, 373, 20, 117, 24, 25, + /* 120 */ 26, 27, 28, 29, 30, 31, 32, 366, 349, 58, + /* 130 */ 51, 324, 132, 133, 63, 356, 419, 420, 104, 397, + /* 140 */ 341, 70, 62, 401, 4, 366, 404, 405, 406, 407, + /* 150 */ 408, 409, 20, 411, 355, 430, 372, 373, 416, 434, + /* 160 */ 418, 161, 162, 364, 422, 423, 95, 167, 168, 426, + /* 170 */ 427, 428, 0, 430, 431, 450, 341, 434, 436, 454, + /* 180 */ 455, 430, 182, 3, 184, 434, 444, 95, 117, 132, + /* 190 */ 133, 342, 449, 450, 160, 388, 347, 454, 455, 364, + /* 200 */ 20, 450, 20, 132, 133, 454, 455, 207, 208, 177, /* 210 */ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - /* 220 */ 220, 221, 222, 223, 224, 225, 226, 161, 162, 399, - /* 230 */ 400, 20, 161, 162, 425, 426, 427, 350, 429, 430, - /* 240 */ 410, 43, 433, 45, 46, 358, 95, 20, 358, 22, - /* 250 */ 37, 180, 205, 182, 367, 187, 188, 448, 449, 191, - /* 260 */ 79, 193, 453, 454, 374, 231, 232, 233, 234, 235, - /* 270 */ 236, 237, 238, 239, 240, 241, 205, 206, 51, 208, - /* 280 */ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - /* 290 */ 219, 220, 221, 222, 223, 224, 225, 226, 3, 228, - /* 300 */ 12, 13, 255, 256, 257, 258, 259, 228, 20, 230, - /* 310 */ 22, 98, 20, 100, 101, 20, 103, 335, 137, 138, - /* 320 */ 107, 33, 244, 35, 108, 109, 110, 111, 112, 113, + /* 220 */ 220, 221, 222, 223, 224, 225, 226, 95, 132, 133, + /* 230 */ 198, 199, 161, 162, 62, 95, 163, 430, 167, 168, + /* 240 */ 21, 434, 106, 24, 25, 26, 27, 28, 29, 30, + /* 250 */ 31, 32, 37, 182, 207, 184, 449, 450, 14, 15, + /* 260 */ 16, 454, 455, 167, 168, 231, 232, 233, 234, 235, + /* 270 */ 236, 237, 238, 239, 240, 241, 96, 95, 207, 208, + /* 280 */ 58, 210, 211, 212, 213, 214, 215, 216, 217, 218, + /* 290 */ 219, 220, 221, 222, 223, 224, 225, 226, 358, 228, + /* 300 */ 12, 13, 255, 256, 257, 258, 259, 326, 20, 328, + /* 310 */ 22, 4, 127, 98, 20, 100, 101, 95, 103, 97, + /* 320 */ 380, 33, 107, 35, 108, 109, 110, 111, 112, 113, /* 330 */ 114, 115, 116, 117, 118, 0, 120, 121, 122, 123, - /* 340 */ 124, 125, 129, 132, 133, 58, 58, 58, 366, 58, - /* 350 */ 429, 63, 126, 63, 433, 339, 21, 228, 70, 24, - /* 360 */ 25, 26, 27, 28, 29, 30, 31, 32, 358, 353, - /* 370 */ 449, 12, 13, 14, 453, 454, 414, 361, 416, 20, - /* 380 */ 387, 22, 95, 95, 97, 94, 97, 95, 97, 95, - /* 390 */ 380, 96, 33, 21, 35, 244, 24, 25, 26, 27, - /* 400 */ 28, 29, 30, 31, 32, 117, 424, 425, 426, 427, - /* 410 */ 95, 429, 430, 33, 373, 189, 190, 58, 373, 429, - /* 420 */ 132, 133, 429, 433, 383, 341, 433, 386, 48, 70, - /* 430 */ 20, 386, 22, 166, 54, 55, 56, 57, 58, 449, - /* 440 */ 22, 448, 449, 453, 454, 35, 453, 454, 364, 161, - /* 450 */ 162, 126, 127, 35, 95, 0, 131, 20, 163, 8, - /* 460 */ 9, 51, 358, 12, 13, 14, 15, 16, 180, 365, - /* 470 */ 182, 20, 20, 179, 94, 181, 117, 97, 374, 24, - /* 480 */ 25, 26, 27, 28, 29, 30, 31, 32, 70, 402, - /* 490 */ 327, 132, 133, 205, 206, 205, 208, 209, 210, 211, + /* 340 */ 124, 125, 33, 163, 129, 360, 58, 20, 360, 388, + /* 350 */ 43, 63, 45, 46, 358, 228, 371, 48, 70, 371, + /* 360 */ 350, 365, 263, 54, 55, 56, 57, 58, 358, 95, + /* 370 */ 374, 12, 13, 14, 189, 190, 244, 367, 193, 20, + /* 380 */ 195, 22, 358, 95, 244, 400, 401, 402, 400, 401, + /* 390 */ 366, 430, 33, 95, 35, 434, 411, 344, 345, 411, + /* 400 */ 65, 66, 67, 94, 20, 117, 97, 0, 73, 74, + /* 410 */ 449, 450, 228, 78, 230, 454, 455, 58, 83, 84, + /* 420 */ 132, 133, 126, 127, 89, 0, 244, 131, 21, 70, + /* 430 */ 406, 24, 25, 26, 27, 28, 29, 30, 31, 32, + /* 440 */ 8, 9, 344, 345, 12, 13, 14, 15, 16, 161, + /* 450 */ 162, 350, 20, 358, 95, 167, 168, 8, 9, 358, + /* 460 */ 365, 12, 13, 14, 15, 16, 244, 403, 367, 374, + /* 470 */ 182, 14, 184, 164, 165, 95, 117, 20, 169, 8, + /* 480 */ 9, 172, 62, 12, 13, 14, 15, 16, 161, 162, + /* 490 */ 35, 132, 133, 429, 327, 207, 208, 188, 210, 211, /* 500 */ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - /* 510 */ 222, 223, 224, 225, 226, 428, 249, 250, 251, 14, - /* 520 */ 161, 162, 8, 9, 160, 20, 12, 13, 14, 15, - /* 530 */ 16, 244, 95, 429, 371, 117, 244, 433, 244, 180, - /* 540 */ 175, 182, 20, 358, 164, 165, 0, 167, 418, 419, - /* 550 */ 170, 366, 448, 449, 358, 387, 20, 453, 454, 244, - /* 560 */ 327, 196, 197, 367, 205, 206, 186, 208, 209, 210, + /* 510 */ 222, 223, 224, 225, 226, 65, 66, 67, 244, 20, + /* 520 */ 161, 162, 21, 73, 74, 430, 167, 168, 78, 434, + /* 530 */ 35, 403, 107, 83, 84, 34, 403, 36, 371, 89, + /* 540 */ 20, 182, 244, 184, 449, 450, 339, 163, 327, 454, + /* 550 */ 455, 126, 127, 128, 129, 130, 131, 429, 335, 388, + /* 560 */ 353, 181, 429, 183, 327, 70, 207, 208, 361, 210, /* 570 */ 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - /* 580 */ 221, 222, 223, 224, 225, 226, 12, 13, 335, 335, - /* 590 */ 405, 358, 372, 373, 20, 231, 22, 429, 180, 366, - /* 600 */ 182, 433, 349, 349, 371, 241, 373, 33, 62, 35, - /* 610 */ 96, 14, 15, 16, 163, 163, 448, 449, 358, 366, - /* 620 */ 366, 453, 454, 205, 206, 365, 387, 344, 345, 396, - /* 630 */ 3, 335, 58, 400, 374, 39, 403, 404, 405, 406, - /* 640 */ 407, 408, 0, 410, 70, 349, 413, 402, 415, 416, - /* 650 */ 417, 327, 356, 402, 421, 422, 387, 12, 13, 20, - /* 660 */ 4, 21, 366, 335, 327, 20, 161, 22, 429, 95, - /* 670 */ 1, 2, 433, 428, 34, 19, 36, 349, 33, 428, - /* 680 */ 35, 244, 358, 339, 356, 366, 35, 448, 449, 33, - /* 690 */ 366, 117, 453, 454, 366, 371, 377, 373, 429, 344, - /* 700 */ 345, 20, 433, 58, 48, 361, 132, 133, 371, 53, - /* 710 */ 413, 335, 106, 416, 58, 70, 327, 448, 449, 327, - /* 720 */ 396, 70, 453, 454, 400, 349, 366, 403, 404, 405, - /* 730 */ 406, 407, 408, 335, 410, 161, 162, 377, 62, 415, - /* 740 */ 95, 417, 366, 335, 335, 421, 422, 349, 351, 107, - /* 750 */ 94, 354, 368, 97, 180, 371, 182, 349, 349, 107, - /* 760 */ 371, 327, 117, 371, 366, 96, 0, 443, 126, 127, - /* 770 */ 128, 129, 130, 131, 366, 366, 70, 132, 133, 205, - /* 780 */ 206, 129, 208, 209, 210, 211, 212, 213, 214, 215, + /* 580 */ 221, 222, 223, 224, 225, 226, 12, 13, 335, 366, + /* 590 */ 22, 14, 371, 0, 20, 163, 22, 20, 19, 163, + /* 600 */ 373, 430, 349, 35, 58, 434, 170, 33, 371, 35, + /* 610 */ 383, 44, 33, 386, 387, 335, 327, 0, 161, 366, + /* 620 */ 449, 450, 388, 174, 244, 454, 455, 48, 335, 349, + /* 630 */ 360, 366, 58, 54, 55, 56, 57, 58, 70, 184, + /* 640 */ 94, 371, 377, 97, 70, 366, 366, 358, 425, 426, + /* 650 */ 427, 428, 339, 430, 431, 366, 377, 12, 13, 366, + /* 660 */ 371, 335, 373, 96, 430, 20, 160, 22, 434, 95, + /* 670 */ 400, 401, 327, 94, 361, 349, 97, 335, 33, 62, + /* 680 */ 35, 411, 356, 449, 450, 117, 397, 79, 454, 455, + /* 690 */ 401, 117, 366, 404, 405, 406, 407, 408, 409, 410, + /* 700 */ 411, 412, 413, 58, 0, 327, 132, 133, 366, 130, + /* 710 */ 12, 13, 14, 15, 16, 70, 371, 268, 166, 426, + /* 720 */ 427, 428, 327, 430, 431, 414, 8, 9, 417, 359, + /* 730 */ 12, 13, 14, 15, 16, 161, 162, 231, 161, 327, + /* 740 */ 95, 167, 168, 335, 151, 137, 138, 241, 169, 371, + /* 750 */ 182, 415, 184, 417, 1, 2, 182, 349, 184, 126, + /* 760 */ 327, 415, 117, 417, 20, 186, 371, 188, 426, 427, + /* 770 */ 428, 20, 430, 431, 366, 207, 208, 132, 133, 39, + /* 780 */ 388, 207, 208, 371, 210, 211, 212, 213, 214, 215, /* 790 */ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - /* 800 */ 226, 18, 163, 20, 335, 371, 161, 162, 327, 368, - /* 810 */ 27, 368, 371, 30, 371, 49, 33, 351, 349, 70, - /* 820 */ 354, 346, 42, 348, 44, 180, 0, 182, 327, 327, - /* 830 */ 327, 48, 44, 50, 2, 366, 53, 45, 46, 243, - /* 840 */ 8, 9, 0, 0, 12, 13, 14, 15, 16, 20, - /* 850 */ 205, 206, 371, 208, 209, 210, 211, 212, 213, 214, + /* 800 */ 226, 249, 250, 251, 371, 335, 161, 162, 18, 358, + /* 810 */ 20, 107, 167, 168, 96, 242, 243, 27, 367, 349, + /* 820 */ 30, 358, 430, 33, 191, 192, 434, 182, 366, 184, + /* 830 */ 126, 127, 128, 129, 130, 131, 366, 374, 48, 377, + /* 840 */ 50, 449, 450, 53, 20, 327, 454, 455, 368, 96, + /* 850 */ 44, 371, 207, 208, 63, 210, 211, 212, 213, 214, /* 860 */ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - /* 870 */ 225, 226, 371, 371, 371, 8, 9, 94, 359, 12, - /* 880 */ 13, 14, 15, 16, 96, 99, 242, 243, 102, 106, - /* 890 */ 263, 65, 66, 67, 68, 69, 4, 71, 72, 73, - /* 900 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - /* 910 */ 84, 85, 86, 87, 88, 89, 90, 91, 42, 136, - /* 920 */ 44, 35, 139, 140, 141, 142, 143, 144, 145, 146, - /* 930 */ 147, 148, 149, 150, 151, 152, 153, 154, 155, 106, - /* 940 */ 157, 158, 159, 18, 44, 387, 8, 9, 23, 107, - /* 950 */ 12, 13, 14, 15, 16, 99, 99, 327, 102, 102, - /* 960 */ 327, 327, 37, 38, 99, 328, 41, 102, 126, 127, - /* 970 */ 128, 129, 130, 131, 359, 8, 9, 327, 335, 12, - /* 980 */ 13, 14, 15, 16, 59, 60, 61, 429, 358, 156, - /* 990 */ 161, 433, 349, 335, 151, 44, 366, 327, 327, 327, - /* 1000 */ 95, 371, 22, 373, 371, 371, 448, 449, 358, 366, - /* 1010 */ 105, 453, 454, 335, 163, 35, 366, 335, 335, 168, - /* 1020 */ 95, 371, 327, 373, 366, 0, 396, 349, 44, 44, - /* 1030 */ 400, 349, 349, 403, 404, 405, 406, 407, 408, 172, - /* 1040 */ 410, 371, 371, 371, 366, 415, 396, 417, 366, 366, - /* 1050 */ 400, 421, 422, 403, 404, 405, 406, 407, 408, 134, - /* 1060 */ 410, 35, 432, 96, 335, 415, 371, 417, 182, 327, - /* 1070 */ 107, 421, 422, 48, 327, 132, 133, 327, 349, 359, - /* 1080 */ 96, 96, 432, 425, 426, 427, 359, 429, 430, 126, - /* 1090 */ 127, 128, 129, 130, 131, 366, 359, 172, 173, 174, - /* 1100 */ 358, 163, 177, 335, 359, 335, 347, 381, 366, 446, - /* 1110 */ 335, 0, 327, 371, 44, 373, 327, 349, 371, 349, - /* 1120 */ 195, 371, 457, 198, 349, 200, 201, 202, 203, 204, - /* 1130 */ 335, 1, 2, 22, 366, 268, 366, 245, 396, 335, - /* 1140 */ 335, 366, 400, 358, 349, 403, 404, 405, 406, 407, - /* 1150 */ 408, 366, 410, 349, 349, 327, 371, 415, 373, 417, - /* 1160 */ 371, 366, 0, 421, 422, 0, 96, 267, 327, 244, - /* 1170 */ 366, 366, 8, 9, 432, 44, 12, 13, 14, 15, - /* 1180 */ 16, 396, 335, 337, 22, 400, 358, 22, 403, 404, - /* 1190 */ 405, 406, 407, 408, 366, 410, 349, 440, 47, 371, - /* 1200 */ 415, 373, 417, 44, 44, 44, 421, 422, 182, 337, - /* 1210 */ 44, 44, 371, 366, 334, 44, 265, 432, 44, 12, - /* 1220 */ 13, 44, 327, 44, 396, 13, 44, 96, 400, 22, - /* 1230 */ 44, 403, 404, 405, 406, 407, 408, 13, 410, 35, - /* 1240 */ 33, 358, 35, 415, 381, 417, 95, 35, 370, 421, - /* 1250 */ 422, 381, 431, 358, 423, 96, 96, 96, 450, 35, - /* 1260 */ 432, 366, 96, 96, 434, 58, 371, 96, 373, 246, - /* 1270 */ 96, 398, 397, 96, 70, 96, 327, 70, 96, 48, - /* 1280 */ 178, 42, 96, 389, 378, 20, 378, 160, 381, 376, - /* 1290 */ 20, 396, 335, 335, 378, 400, 376, 376, 403, 404, - /* 1300 */ 405, 406, 407, 408, 93, 410, 335, 358, 343, 335, - /* 1310 */ 415, 335, 417, 20, 20, 366, 421, 422, 329, 329, - /* 1320 */ 371, 393, 373, 341, 117, 373, 20, 341, 336, 20, - /* 1330 */ 388, 336, 341, 335, 341, 341, 52, 341, 341, 338, - /* 1340 */ 338, 329, 329, 335, 371, 396, 358, 194, 371, 400, - /* 1350 */ 395, 392, 403, 404, 405, 406, 407, 408, 358, 410, - /* 1360 */ 339, 358, 327, 358, 415, 358, 417, 358, 358, 358, - /* 1370 */ 421, 422, 358, 358, 358, 185, 393, 373, 339, 335, - /* 1380 */ 381, 260, 254, 439, 439, 253, 171, 180, 442, 182, - /* 1390 */ 371, 371, 438, 358, 441, 371, 262, 261, 381, 371, - /* 1400 */ 439, 366, 384, 437, 247, 436, 371, 269, 373, 266, - /* 1410 */ 264, 384, 205, 206, 458, 243, 452, 366, 20, 451, - /* 1420 */ 398, 335, 339, 336, 217, 218, 219, 220, 221, 222, - /* 1430 */ 223, 396, 402, 384, 371, 400, 327, 371, 403, 404, - /* 1440 */ 405, 406, 407, 408, 371, 410, 371, 371, 384, 371, - /* 1450 */ 415, 165, 417, 382, 339, 354, 421, 422, 339, 366, - /* 1460 */ 95, 420, 95, 371, 348, 362, 36, 358, 335, 330, - /* 1470 */ 329, 390, 352, 394, 339, 366, 385, 352, 352, 327, - /* 1480 */ 371, 385, 373, 325, 340, 0, 0, 187, 0, 0, - /* 1490 */ 42, 0, 35, 35, 199, 35, 35, 199, 0, 35, - /* 1500 */ 35, 199, 0, 199, 0, 396, 35, 0, 0, 400, - /* 1510 */ 358, 35, 403, 404, 405, 406, 407, 408, 366, 410, - /* 1520 */ 182, 22, 327, 371, 180, 373, 417, 176, 175, 0, - /* 1530 */ 421, 422, 0, 0, 0, 0, 0, 47, 0, 42, - /* 1540 */ 0, 0, 0, 0, 0, 0, 0, 0, 396, 35, - /* 1550 */ 327, 151, 400, 358, 0, 403, 404, 405, 406, 407, - /* 1560 */ 408, 366, 410, 151, 0, 0, 371, 0, 373, 417, - /* 1570 */ 42, 0, 0, 421, 422, 0, 0, 0, 0, 0, - /* 1580 */ 0, 358, 0, 0, 0, 0, 0, 0, 0, 366, - /* 1590 */ 0, 396, 0, 0, 371, 400, 373, 0, 403, 404, - /* 1600 */ 405, 406, 407, 408, 0, 410, 0, 135, 0, 35, - /* 1610 */ 0, 22, 417, 58, 0, 58, 421, 422, 0, 396, - /* 1620 */ 0, 14, 19, 400, 0, 44, 403, 404, 405, 406, - /* 1630 */ 407, 408, 409, 410, 411, 412, 33, 42, 327, 39, - /* 1640 */ 14, 47, 40, 47, 39, 47, 0, 0, 0, 171, - /* 1650 */ 39, 48, 0, 0, 0, 64, 0, 54, 55, 56, - /* 1660 */ 57, 58, 0, 35, 48, 0, 35, 48, 39, 358, - /* 1670 */ 0, 39, 35, 48, 39, 0, 35, 366, 48, 39, - /* 1680 */ 0, 327, 371, 0, 373, 0, 0, 0, 22, 44, - /* 1690 */ 35, 22, 35, 35, 35, 35, 0, 94, 327, 35, - /* 1700 */ 97, 22, 35, 104, 0, 44, 35, 396, 0, 35, - /* 1710 */ 22, 400, 358, 50, 403, 404, 405, 406, 407, 408, - /* 1720 */ 366, 410, 22, 102, 0, 371, 35, 373, 0, 358, - /* 1730 */ 35, 0, 22, 130, 20, 96, 35, 366, 35, 95, - /* 1740 */ 192, 0, 371, 0, 373, 183, 35, 22, 0, 0, - /* 1750 */ 396, 44, 327, 3, 400, 444, 445, 403, 404, 405, - /* 1760 */ 406, 407, 408, 248, 410, 252, 165, 396, 327, 96, - /* 1770 */ 167, 400, 163, 96, 403, 404, 405, 406, 407, 408, - /* 1780 */ 163, 410, 169, 358, 95, 163, 227, 184, 417, 186, - /* 1790 */ 44, 366, 95, 422, 96, 44, 371, 95, 373, 358, - /* 1800 */ 95, 168, 168, 47, 95, 47, 44, 366, 96, 455, - /* 1810 */ 456, 95, 371, 96, 373, 96, 248, 3, 44, 96, - /* 1820 */ 35, 396, 35, 35, 35, 400, 35, 35, 403, 404, - /* 1830 */ 405, 406, 407, 408, 96, 410, 0, 396, 327, 44, - /* 1840 */ 47, 400, 0, 47, 403, 404, 405, 406, 407, 408, - /* 1850 */ 0, 410, 95, 0, 327, 96, 96, 242, 95, 95, - /* 1860 */ 248, 95, 39, 95, 47, 44, 105, 229, 2, 358, - /* 1870 */ 445, 22, 166, 205, 95, 95, 227, 366, 227, 164, - /* 1880 */ 47, 95, 371, 22, 373, 358, 96, 47, 447, 95, - /* 1890 */ 363, 207, 95, 366, 96, 96, 96, 327, 371, 95, - /* 1900 */ 373, 96, 35, 35, 95, 22, 96, 396, 106, 35, - /* 1910 */ 95, 400, 96, 35, 403, 404, 405, 406, 407, 408, - /* 1920 */ 95, 410, 96, 396, 35, 95, 35, 400, 358, 95, - /* 1930 */ 403, 404, 405, 406, 407, 408, 366, 410, 119, 96, - /* 1940 */ 95, 371, 107, 373, 44, 35, 119, 119, 119, 95, - /* 1950 */ 95, 22, 64, 63, 327, 35, 35, 35, 35, 35, - /* 1960 */ 35, 35, 35, 35, 92, 35, 396, 456, 70, 35, - /* 1970 */ 400, 35, 22, 403, 404, 405, 406, 407, 408, 44, - /* 1980 */ 410, 35, 412, 35, 35, 358, 35, 70, 35, 35, - /* 1990 */ 363, 35, 35, 366, 35, 22, 35, 0, 371, 35, - /* 2000 */ 373, 39, 0, 35, 39, 327, 48, 0, 48, 35, - /* 2010 */ 39, 48, 0, 35, 48, 39, 0, 35, 35, 0, - /* 2020 */ 22, 21, 21, 396, 20, 22, 327, 400, 22, 459, - /* 2030 */ 403, 404, 405, 406, 407, 408, 358, 410, 459, 459, - /* 2040 */ 459, 363, 459, 459, 366, 459, 459, 459, 327, 371, - /* 2050 */ 459, 373, 459, 459, 459, 459, 459, 358, 459, 459, - /* 2060 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 459, - /* 2070 */ 371, 459, 373, 459, 396, 459, 459, 459, 400, 358, - /* 2080 */ 459, 403, 404, 405, 406, 407, 408, 366, 410, 459, - /* 2090 */ 459, 459, 371, 459, 373, 396, 459, 459, 459, 400, - /* 2100 */ 459, 459, 403, 404, 405, 406, 407, 408, 459, 410, - /* 2110 */ 459, 327, 459, 459, 459, 459, 459, 396, 459, 459, - /* 2120 */ 459, 400, 459, 459, 403, 404, 405, 406, 407, 408, - /* 2130 */ 459, 410, 459, 459, 459, 327, 459, 459, 459, 459, - /* 2140 */ 459, 459, 358, 459, 459, 459, 459, 459, 459, 459, - /* 2150 */ 366, 459, 459, 459, 459, 371, 459, 373, 459, 459, - /* 2160 */ 459, 459, 459, 459, 459, 459, 358, 459, 459, 459, - /* 2170 */ 459, 459, 459, 459, 366, 459, 459, 459, 459, 371, - /* 2180 */ 396, 373, 459, 459, 400, 459, 459, 403, 404, 405, - /* 2190 */ 406, 407, 408, 459, 410, 459, 459, 327, 459, 459, - /* 2200 */ 459, 459, 459, 459, 396, 459, 459, 459, 400, 459, - /* 2210 */ 459, 403, 404, 405, 406, 407, 408, 459, 410, 459, - /* 2220 */ 459, 327, 459, 459, 459, 459, 459, 459, 358, 459, - /* 2230 */ 459, 459, 459, 459, 459, 459, 366, 459, 459, 459, - /* 2240 */ 459, 371, 459, 373, 459, 459, 459, 459, 459, 459, - /* 2250 */ 459, 459, 358, 459, 459, 459, 459, 459, 459, 459, - /* 2260 */ 366, 459, 459, 459, 327, 371, 396, 373, 459, 459, - /* 2270 */ 400, 459, 459, 403, 404, 405, 406, 407, 408, 459, - /* 2280 */ 410, 459, 327, 459, 459, 459, 459, 459, 459, 459, - /* 2290 */ 396, 459, 459, 459, 400, 358, 459, 403, 404, 405, - /* 2300 */ 406, 407, 408, 366, 410, 459, 459, 459, 371, 459, - /* 2310 */ 373, 459, 459, 358, 459, 459, 459, 459, 459, 459, - /* 2320 */ 459, 366, 459, 459, 459, 459, 371, 459, 373, 459, - /* 2330 */ 459, 459, 459, 396, 459, 459, 459, 400, 459, 459, - /* 2340 */ 403, 404, 405, 406, 407, 408, 459, 410, 459, 459, - /* 2350 */ 459, 396, 459, 459, 327, 400, 459, 459, 403, 404, - /* 2360 */ 405, 406, 407, 408, 459, 410, 459, 459, 459, 459, - /* 2370 */ 459, 459, 327, 459, 459, 459, 459, 459, 459, 459, - /* 2380 */ 459, 459, 459, 459, 459, 358, 459, 459, 459, 459, - /* 2390 */ 459, 459, 459, 366, 459, 459, 459, 459, 371, 459, - /* 2400 */ 373, 459, 459, 358, 459, 459, 459, 459, 459, 459, - /* 2410 */ 459, 366, 459, 459, 459, 327, 371, 459, 373, 459, - /* 2420 */ 459, 459, 459, 396, 459, 459, 459, 400, 459, 459, - /* 2430 */ 403, 404, 405, 406, 407, 408, 459, 410, 459, 327, - /* 2440 */ 459, 396, 459, 459, 459, 400, 358, 459, 403, 404, - /* 2450 */ 405, 406, 407, 408, 366, 410, 459, 459, 459, 371, - /* 2460 */ 459, 373, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2470 */ 358, 459, 459, 459, 459, 459, 459, 459, 366, 459, - /* 2480 */ 459, 459, 459, 371, 396, 373, 459, 459, 400, 459, - /* 2490 */ 459, 403, 404, 405, 406, 407, 408, 459, 410, 459, - /* 2500 */ 459, 459, 327, 459, 459, 459, 459, 459, 396, 459, - /* 2510 */ 459, 459, 400, 459, 459, 403, 404, 405, 406, 407, - /* 2520 */ 408, 459, 410, 459, 459, 459, 459, 459, 459, 459, - /* 2530 */ 459, 459, 459, 358, 459, 459, 459, 459, 459, 459, - /* 2540 */ 459, 366, 459, 459, 459, 459, 371, 459, 373, 459, - /* 2550 */ 459, 459, 459, 459, 459, 459, 327, 459, 459, 459, - /* 2560 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2570 */ 459, 396, 459, 459, 459, 400, 459, 459, 403, 404, - /* 2580 */ 405, 406, 407, 408, 459, 410, 459, 358, 459, 459, - /* 2590 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 459, - /* 2600 */ 371, 459, 373, 459, 459, 459, 459, 459, 459, 459, - /* 2610 */ 327, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2620 */ 459, 459, 459, 459, 459, 396, 327, 459, 459, 400, - /* 2630 */ 459, 459, 403, 404, 405, 406, 407, 408, 459, 410, - /* 2640 */ 459, 358, 459, 459, 459, 459, 459, 459, 459, 366, - /* 2650 */ 459, 459, 459, 459, 371, 459, 373, 358, 459, 459, - /* 2660 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 327, - /* 2670 */ 371, 459, 373, 459, 459, 459, 459, 459, 459, 396, - /* 2680 */ 459, 459, 459, 400, 459, 459, 403, 404, 405, 406, - /* 2690 */ 407, 408, 459, 410, 459, 396, 459, 459, 459, 400, - /* 2700 */ 358, 459, 403, 404, 405, 406, 407, 408, 366, 410, - /* 2710 */ 459, 459, 459, 371, 459, 373, 459, 459, 459, 459, - /* 2720 */ 459, 459, 459, 459, 459, 459, 327, 459, 459, 459, - /* 2730 */ 459, 459, 459, 459, 459, 459, 459, 459, 396, 459, - /* 2740 */ 459, 459, 400, 327, 459, 403, 404, 405, 406, 407, - /* 2750 */ 408, 459, 410, 459, 459, 459, 459, 358, 459, 459, - /* 2760 */ 459, 459, 459, 459, 459, 366, 459, 459, 459, 327, - /* 2770 */ 371, 459, 373, 459, 358, 459, 459, 459, 459, 459, - /* 2780 */ 459, 459, 366, 459, 459, 459, 459, 371, 459, 373, - /* 2790 */ 459, 459, 459, 459, 459, 396, 459, 459, 459, 400, - /* 2800 */ 358, 459, 403, 404, 405, 406, 407, 408, 366, 410, - /* 2810 */ 459, 459, 396, 371, 459, 373, 400, 459, 459, 403, - /* 2820 */ 404, 405, 406, 407, 408, 459, 410, 459, 459, 459, - /* 2830 */ 327, 459, 459, 459, 459, 459, 459, 459, 396, 459, - /* 2840 */ 459, 459, 400, 459, 459, 403, 404, 405, 406, 407, - /* 2850 */ 408, 459, 410, 459, 459, 459, 459, 459, 459, 459, - /* 2860 */ 459, 358, 459, 459, 459, 459, 459, 459, 459, 366, - /* 2870 */ 459, 459, 459, 459, 371, 459, 373, 459, 459, 459, - /* 2880 */ 459, 459, 459, 459, 327, 459, 459, 459, 459, 459, - /* 2890 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 396, - /* 2900 */ 459, 459, 459, 400, 459, 459, 403, 404, 405, 406, - /* 2910 */ 407, 408, 459, 410, 459, 358, 459, 459, 459, 459, - /* 2920 */ 459, 459, 459, 366, 459, 459, 459, 459, 371, 459, - /* 2930 */ 373, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2940 */ 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - /* 2950 */ 459, 459, 459, 396, 459, 459, 459, 400, 459, 459, - /* 2960 */ 403, 404, 405, 406, 407, 408, 459, 410, + /* 870 */ 225, 226, 327, 368, 327, 346, 371, 348, 18, 368, + /* 880 */ 327, 2, 371, 23, 94, 0, 335, 8, 9, 371, + /* 890 */ 4, 12, 13, 14, 15, 16, 106, 37, 38, 2, + /* 900 */ 349, 41, 327, 45, 46, 8, 9, 163, 70, 12, + /* 910 */ 13, 14, 15, 16, 163, 22, 371, 366, 371, 59, + /* 920 */ 60, 61, 351, 70, 371, 354, 136, 392, 35, 139, + /* 930 */ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + /* 940 */ 150, 151, 152, 153, 154, 155, 371, 157, 158, 159, + /* 950 */ 65, 66, 67, 68, 69, 95, 71, 72, 73, 74, + /* 960 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + /* 970 */ 85, 86, 87, 88, 89, 90, 91, 20, 107, 22, + /* 980 */ 42, 0, 44, 243, 58, 161, 327, 44, 327, 327, + /* 990 */ 335, 335, 35, 335, 134, 335, 107, 327, 207, 4, + /* 1000 */ 129, 42, 35, 44, 349, 349, 327, 349, 51, 349, + /* 1010 */ 359, 335, 388, 335, 19, 126, 127, 128, 129, 130, + /* 1020 */ 131, 366, 366, 97, 366, 349, 366, 349, 33, 48, + /* 1030 */ 371, 359, 371, 371, 174, 175, 176, 358, 327, 179, + /* 1040 */ 359, 371, 366, 48, 366, 366, 99, 359, 53, 102, + /* 1050 */ 371, 0, 373, 58, 430, 132, 133, 197, 434, 35, + /* 1060 */ 200, 106, 202, 203, 204, 205, 206, 335, 327, 99, + /* 1070 */ 347, 265, 102, 449, 450, 44, 397, 335, 454, 455, + /* 1080 */ 401, 349, 371, 404, 405, 406, 407, 408, 409, 94, + /* 1090 */ 411, 349, 97, 414, 70, 416, 417, 418, 366, 358, + /* 1100 */ 49, 422, 423, 335, 244, 335, 335, 366, 366, 335, + /* 1110 */ 335, 156, 371, 99, 373, 99, 102, 349, 102, 349, + /* 1120 */ 349, 0, 327, 349, 349, 44, 44, 96, 44, 95, + /* 1130 */ 44, 245, 0, 0, 366, 44, 366, 366, 397, 105, + /* 1140 */ 366, 366, 401, 22, 328, 404, 405, 406, 407, 408, + /* 1150 */ 409, 184, 411, 358, 22, 22, 44, 416, 381, 418, + /* 1160 */ 458, 366, 44, 422, 423, 337, 371, 44, 373, 13, + /* 1170 */ 1, 2, 44, 47, 447, 13, 441, 96, 96, 44, + /* 1180 */ 96, 327, 96, 44, 358, 444, 44, 96, 44, 337, + /* 1190 */ 44, 35, 397, 381, 381, 334, 401, 35, 432, 404, + /* 1200 */ 405, 406, 407, 408, 409, 370, 411, 451, 96, 424, + /* 1210 */ 267, 416, 358, 418, 96, 435, 399, 422, 423, 96, + /* 1220 */ 366, 95, 246, 48, 96, 371, 180, 373, 433, 398, + /* 1230 */ 390, 96, 42, 378, 20, 96, 160, 381, 96, 20, + /* 1240 */ 96, 378, 96, 376, 335, 335, 378, 327, 376, 376, + /* 1250 */ 93, 397, 335, 335, 343, 401, 335, 20, 404, 405, + /* 1260 */ 406, 407, 408, 409, 329, 411, 329, 327, 394, 20, + /* 1270 */ 416, 341, 418, 20, 373, 341, 422, 423, 358, 20, + /* 1280 */ 336, 20, 341, 389, 336, 335, 366, 433, 52, 329, + /* 1290 */ 341, 371, 341, 373, 341, 341, 338, 358, 358, 338, + /* 1300 */ 358, 335, 329, 358, 358, 196, 366, 371, 396, 394, + /* 1310 */ 358, 371, 187, 373, 358, 393, 339, 397, 335, 339, + /* 1320 */ 358, 401, 358, 358, 404, 405, 406, 407, 408, 409, + /* 1330 */ 358, 411, 358, 254, 371, 440, 416, 397, 418, 371, + /* 1340 */ 253, 401, 422, 423, 404, 405, 406, 407, 408, 409, + /* 1350 */ 381, 411, 373, 433, 440, 384, 416, 371, 418, 12, + /* 1360 */ 13, 371, 422, 423, 327, 381, 384, 371, 260, 22, + /* 1370 */ 443, 173, 262, 433, 442, 261, 247, 266, 459, 243, + /* 1380 */ 33, 453, 35, 264, 269, 452, 399, 366, 20, 335, + /* 1390 */ 384, 336, 403, 371, 371, 358, 339, 371, 371, 371, + /* 1400 */ 371, 384, 382, 366, 165, 58, 339, 354, 371, 339, + /* 1410 */ 373, 366, 95, 421, 95, 440, 438, 70, 362, 371, + /* 1420 */ 348, 36, 339, 327, 439, 437, 329, 335, 330, 391, + /* 1430 */ 395, 325, 385, 340, 397, 385, 0, 352, 401, 0, + /* 1440 */ 352, 404, 405, 406, 407, 408, 409, 352, 411, 189, + /* 1450 */ 0, 0, 42, 416, 358, 418, 0, 35, 201, 422, + /* 1460 */ 423, 35, 366, 35, 117, 35, 201, 371, 0, 373, + /* 1470 */ 433, 201, 35, 35, 0, 201, 0, 35, 0, 22, + /* 1480 */ 0, 35, 184, 182, 0, 0, 178, 177, 0, 0, + /* 1490 */ 47, 0, 0, 397, 0, 42, 0, 401, 0, 0, + /* 1500 */ 404, 405, 406, 407, 408, 409, 0, 411, 0, 0, + /* 1510 */ 0, 0, 416, 327, 418, 151, 35, 0, 422, 423, + /* 1520 */ 151, 0, 0, 0, 0, 0, 0, 0, 0, 182, + /* 1530 */ 0, 184, 0, 0, 0, 0, 0, 0, 0, 42, + /* 1540 */ 0, 0, 0, 0, 358, 0, 0, 0, 135, 0, + /* 1550 */ 0, 22, 366, 35, 207, 208, 0, 371, 58, 373, + /* 1560 */ 0, 58, 0, 0, 44, 14, 219, 220, 221, 222, + /* 1570 */ 223, 224, 225, 42, 0, 327, 0, 0, 39, 14, + /* 1580 */ 0, 173, 0, 397, 40, 0, 0, 401, 0, 0, + /* 1590 */ 404, 405, 406, 407, 408, 409, 39, 411, 327, 47, + /* 1600 */ 47, 47, 416, 39, 418, 35, 358, 48, 422, 423, + /* 1610 */ 39, 0, 64, 35, 366, 0, 48, 48, 39, 371, + /* 1620 */ 39, 373, 35, 0, 0, 35, 0, 0, 0, 358, + /* 1630 */ 39, 48, 35, 0, 22, 35, 35, 366, 35, 35, + /* 1640 */ 44, 35, 371, 44, 373, 397, 0, 22, 35, 401, + /* 1650 */ 0, 35, 404, 405, 406, 407, 408, 409, 22, 411, + /* 1660 */ 50, 22, 104, 102, 416, 327, 418, 0, 397, 22, + /* 1670 */ 422, 423, 401, 0, 0, 404, 405, 406, 407, 408, + /* 1680 */ 409, 0, 411, 35, 35, 22, 35, 35, 327, 418, + /* 1690 */ 20, 96, 35, 422, 423, 194, 358, 95, 0, 35, + /* 1700 */ 0, 185, 22, 0, 366, 0, 44, 3, 248, 371, + /* 1710 */ 96, 373, 95, 95, 227, 252, 96, 96, 163, 358, + /* 1720 */ 44, 44, 47, 44, 95, 95, 95, 366, 96, 163, + /* 1730 */ 47, 248, 371, 96, 373, 397, 163, 165, 95, 401, + /* 1740 */ 96, 3, 404, 405, 406, 407, 408, 409, 35, 411, + /* 1750 */ 44, 327, 248, 35, 35, 35, 418, 35, 397, 35, + /* 1760 */ 422, 423, 401, 171, 170, 404, 405, 406, 407, 408, + /* 1770 */ 409, 327, 411, 47, 96, 170, 44, 47, 96, 418, + /* 1780 */ 0, 0, 358, 422, 423, 0, 95, 0, 96, 96, + /* 1790 */ 366, 95, 95, 39, 95, 371, 95, 373, 47, 164, + /* 1800 */ 166, 44, 358, 2, 229, 207, 22, 105, 96, 95, + /* 1810 */ 366, 95, 47, 96, 47, 371, 95, 373, 22, 96, + /* 1820 */ 227, 397, 95, 35, 95, 401, 35, 96, 404, 405, + /* 1830 */ 406, 407, 408, 409, 227, 411, 95, 35, 96, 106, + /* 1840 */ 327, 397, 95, 35, 96, 401, 96, 95, 404, 405, + /* 1850 */ 406, 407, 408, 409, 209, 411, 95, 35, 96, 95, + /* 1860 */ 35, 242, 96, 95, 119, 119, 22, 107, 119, 445, + /* 1870 */ 446, 358, 119, 95, 44, 35, 22, 95, 64, 366, + /* 1880 */ 63, 95, 35, 35, 371, 35, 373, 35, 35, 70, + /* 1890 */ 35, 35, 35, 35, 327, 35, 92, 35, 35, 35, + /* 1900 */ 456, 457, 22, 44, 35, 70, 35, 35, 35, 35, + /* 1910 */ 397, 327, 35, 35, 401, 22, 35, 404, 405, 406, + /* 1920 */ 407, 408, 409, 35, 411, 358, 0, 35, 39, 0, + /* 1930 */ 48, 418, 35, 366, 48, 39, 423, 0, 371, 35, + /* 1940 */ 373, 39, 358, 0, 35, 39, 48, 48, 0, 35, + /* 1950 */ 366, 35, 0, 22, 21, 371, 22, 373, 22, 21, + /* 1960 */ 20, 460, 460, 460, 397, 327, 460, 460, 401, 460, + /* 1970 */ 460, 404, 405, 406, 407, 408, 409, 460, 411, 460, + /* 1980 */ 460, 397, 460, 327, 460, 401, 460, 460, 404, 405, + /* 1990 */ 406, 407, 408, 409, 460, 411, 358, 460, 460, 460, + /* 2000 */ 460, 460, 460, 460, 366, 460, 460, 460, 460, 371, + /* 2010 */ 460, 373, 460, 446, 358, 460, 460, 460, 460, 363, + /* 2020 */ 460, 460, 366, 460, 460, 460, 460, 371, 460, 373, + /* 2030 */ 460, 460, 448, 460, 460, 397, 460, 327, 460, 401, + /* 2040 */ 460, 460, 404, 405, 406, 407, 408, 409, 460, 411, + /* 2050 */ 460, 460, 460, 397, 460, 327, 460, 401, 460, 460, + /* 2060 */ 404, 405, 406, 407, 408, 409, 460, 411, 358, 460, + /* 2070 */ 460, 460, 460, 460, 460, 460, 366, 460, 460, 460, + /* 2080 */ 460, 371, 460, 373, 460, 460, 358, 460, 460, 460, + /* 2090 */ 460, 363, 460, 460, 366, 457, 460, 460, 460, 371, + /* 2100 */ 460, 373, 460, 460, 460, 460, 460, 397, 460, 460, + /* 2110 */ 327, 401, 460, 460, 404, 405, 406, 407, 408, 409, + /* 2120 */ 460, 411, 460, 413, 460, 397, 460, 460, 460, 401, + /* 2130 */ 327, 460, 404, 405, 406, 407, 408, 409, 460, 411, + /* 2140 */ 460, 358, 460, 460, 460, 460, 363, 460, 460, 366, + /* 2150 */ 460, 460, 460, 460, 371, 460, 373, 460, 460, 460, + /* 2160 */ 460, 358, 460, 460, 460, 460, 460, 460, 460, 366, + /* 2170 */ 460, 460, 460, 460, 371, 460, 373, 460, 460, 460, + /* 2180 */ 397, 460, 460, 460, 401, 460, 460, 404, 405, 406, + /* 2190 */ 407, 408, 409, 460, 411, 460, 460, 327, 460, 460, + /* 2200 */ 397, 460, 460, 460, 401, 460, 460, 404, 405, 406, + /* 2210 */ 407, 408, 409, 460, 411, 460, 460, 460, 460, 460, + /* 2220 */ 460, 460, 327, 460, 460, 460, 460, 460, 358, 460, + /* 2230 */ 460, 460, 460, 460, 460, 460, 366, 460, 460, 460, + /* 2240 */ 460, 371, 460, 373, 460, 460, 460, 460, 460, 327, + /* 2250 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, + /* 2260 */ 460, 366, 460, 460, 460, 460, 371, 397, 373, 460, + /* 2270 */ 460, 401, 460, 460, 404, 405, 406, 407, 408, 409, + /* 2280 */ 358, 411, 460, 460, 460, 460, 460, 460, 366, 460, + /* 2290 */ 460, 460, 397, 371, 460, 373, 401, 460, 460, 404, + /* 2300 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 327, + /* 2310 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 397, + /* 2320 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, + /* 2330 */ 408, 409, 327, 411, 460, 460, 460, 460, 460, 460, + /* 2340 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, + /* 2350 */ 460, 460, 460, 371, 460, 373, 460, 460, 460, 460, + /* 2360 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, + /* 2370 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 397, + /* 2380 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, + /* 2390 */ 408, 409, 327, 411, 460, 460, 460, 460, 460, 460, + /* 2400 */ 460, 460, 397, 460, 460, 460, 401, 460, 460, 404, + /* 2410 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 327, + /* 2420 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, + /* 2430 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 460, + /* 2440 */ 460, 460, 460, 460, 327, 460, 460, 460, 460, 460, + /* 2450 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, + /* 2460 */ 460, 460, 397, 371, 460, 373, 401, 460, 460, 404, + /* 2470 */ 405, 406, 407, 408, 409, 358, 411, 460, 460, 460, + /* 2480 */ 460, 460, 460, 366, 460, 460, 460, 460, 371, 397, + /* 2490 */ 373, 460, 460, 401, 460, 460, 404, 405, 406, 407, + /* 2500 */ 408, 409, 327, 411, 460, 460, 460, 460, 460, 460, + /* 2510 */ 460, 460, 460, 460, 397, 460, 460, 460, 401, 327, + /* 2520 */ 460, 404, 405, 406, 407, 408, 409, 460, 411, 460, + /* 2530 */ 460, 460, 460, 358, 460, 460, 460, 460, 460, 460, + /* 2540 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 460, + /* 2550 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, + /* 2560 */ 460, 460, 460, 371, 460, 373, 460, 460, 460, 460, + /* 2570 */ 460, 327, 397, 460, 460, 460, 401, 460, 460, 404, + /* 2580 */ 405, 406, 407, 408, 409, 460, 411, 460, 460, 397, + /* 2590 */ 460, 460, 460, 401, 327, 460, 404, 405, 406, 407, + /* 2600 */ 408, 409, 358, 411, 460, 460, 460, 460, 460, 460, + /* 2610 */ 366, 460, 460, 460, 460, 371, 460, 373, 460, 460, + /* 2620 */ 460, 460, 460, 327, 460, 358, 460, 460, 460, 460, + /* 2630 */ 460, 460, 460, 366, 460, 460, 460, 460, 371, 460, + /* 2640 */ 373, 397, 460, 460, 460, 401, 460, 460, 404, 405, + /* 2650 */ 406, 407, 408, 409, 358, 411, 460, 460, 460, 460, + /* 2660 */ 460, 460, 366, 460, 397, 460, 460, 371, 401, 373, + /* 2670 */ 460, 404, 405, 406, 407, 408, 409, 460, 411, 460, + /* 2680 */ 460, 327, 460, 460, 460, 460, 460, 460, 460, 460, + /* 2690 */ 460, 460, 460, 397, 460, 460, 460, 401, 460, 327, + /* 2700 */ 404, 405, 406, 407, 408, 409, 460, 411, 460, 460, + /* 2710 */ 460, 460, 358, 460, 460, 460, 460, 460, 460, 460, + /* 2720 */ 366, 460, 460, 460, 460, 371, 460, 373, 460, 460, + /* 2730 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, + /* 2740 */ 460, 460, 460, 371, 460, 373, 460, 460, 460, 460, + /* 2750 */ 460, 397, 460, 460, 460, 401, 460, 460, 404, 405, + /* 2760 */ 406, 407, 408, 409, 327, 411, 460, 460, 460, 397, + /* 2770 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, + /* 2780 */ 408, 409, 460, 411, 460, 460, 327, 460, 460, 460, + /* 2790 */ 460, 460, 460, 460, 460, 358, 460, 460, 460, 460, + /* 2800 */ 460, 460, 460, 366, 460, 460, 460, 460, 371, 460, + /* 2810 */ 373, 460, 460, 460, 460, 460, 460, 358, 460, 460, + /* 2820 */ 460, 460, 460, 460, 460, 366, 460, 460, 460, 460, + /* 2830 */ 371, 460, 373, 460, 397, 460, 460, 460, 401, 460, + /* 2840 */ 460, 404, 405, 406, 407, 408, 409, 327, 411, 460, + /* 2850 */ 460, 460, 460, 460, 460, 460, 397, 460, 460, 460, + /* 2860 */ 401, 460, 460, 404, 405, 406, 407, 408, 409, 327, + /* 2870 */ 411, 460, 460, 460, 460, 460, 460, 460, 358, 460, + /* 2880 */ 460, 460, 460, 460, 460, 460, 366, 460, 460, 460, + /* 2890 */ 460, 371, 460, 373, 460, 460, 460, 460, 460, 460, + /* 2900 */ 358, 460, 460, 460, 460, 460, 460, 460, 366, 460, + /* 2910 */ 460, 460, 460, 371, 460, 373, 460, 397, 460, 460, + /* 2920 */ 460, 401, 460, 460, 404, 405, 406, 407, 408, 409, + /* 2930 */ 327, 411, 460, 460, 460, 460, 460, 460, 460, 397, + /* 2940 */ 460, 460, 460, 401, 460, 460, 404, 405, 406, 407, + /* 2950 */ 408, 409, 460, 411, 460, 460, 460, 460, 460, 460, + /* 2960 */ 460, 358, 460, 460, 460, 460, 460, 460, 460, 366, + /* 2970 */ 460, 460, 460, 460, 371, 460, 373, 460, 460, 460, + /* 2980 */ 460, 460, 327, 460, 460, 460, 460, 460, 460, 460, + /* 2990 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 3000 */ 397, 460, 460, 460, 401, 460, 460, 404, 405, 406, + /* 3010 */ 407, 408, 409, 358, 411, 460, 460, 460, 460, 460, + /* 3020 */ 460, 366, 460, 460, 460, 460, 371, 460, 373, 460, + /* 3030 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 3040 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, + /* 3050 */ 460, 460, 397, 460, 460, 460, 401, 460, 460, 404, + /* 3060 */ 405, 406, 407, 408, 409, 460, 411, }; #define YY_SHIFT_COUNT (713) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (2019) +#define YY_SHIFT_MAX (1952) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 925, 0, 71, 0, 288, 288, 288, 288, 288, 288, + /* 0 */ 860, 0, 71, 0, 288, 288, 288, 288, 288, 288, /* 10 */ 288, 288, 288, 288, 288, 359, 574, 574, 645, 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, 574, 574, 292, 437, - /* 50 */ 12, 294, 287, 151, 315, 151, 12, 12, 1207, 1207, - /* 60 */ 151, 1207, 1207, 78, 151, 19, 19, 198, 198, 66, - /* 70 */ 211, 98, 98, 19, 19, 19, 19, 19, 19, 19, - /* 80 */ 19, 19, 19, 112, 19, 19, 108, 19, 522, 19, - /* 90 */ 19, 536, 19, 19, 536, 19, 536, 536, 536, 19, - /* 100 */ 676, 783, 34, 34, 372, 103, 418, 418, 418, 418, - /* 110 */ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, - /* 120 */ 418, 418, 418, 418, 418, 213, 295, 66, 211, 62, - /* 130 */ 651, 1, 1, 1, 546, 79, 79, 651, 681, 681, - /* 140 */ 681, 606, 522, 129, 536, 706, 536, 706, 706, 606, - /* 150 */ 749, 216, 216, 216, 216, 216, 216, 216, 1603, 335, - /* 160 */ 36, 451, 867, 47, 410, 267, 46, 505, 227, 452, - /* 170 */ 792, 652, 639, 644, 596, 627, 644, 780, 892, 829, - /* 180 */ 1023, 1231, 1102, 1239, 1265, 1239, 1127, 1270, 1270, 1239, - /* 190 */ 1127, 1127, 1211, 1270, 1270, 1270, 1293, 1293, 1294, 112, - /* 200 */ 522, 112, 1306, 1309, 112, 1306, 112, 112, 112, 1270, - /* 210 */ 112, 1284, 1284, 1293, 536, 536, 536, 536, 536, 536, - /* 220 */ 536, 536, 536, 536, 536, 1270, 1293, 706, 706, 1153, - /* 230 */ 1294, 676, 1190, 522, 676, 1270, 1265, 1265, 706, 1128, - /* 240 */ 1132, 706, 1128, 1132, 706, 706, 536, 1121, 1215, 1128, - /* 250 */ 1134, 1136, 1157, 1023, 1138, 1143, 1146, 1172, 681, 1398, - /* 260 */ 1270, 1306, 676, 1132, 706, 706, 706, 706, 706, 1132, - /* 270 */ 706, 1286, 676, 606, 676, 681, 1365, 1367, 706, 749, - /* 280 */ 1270, 676, 1430, 1293, 2968, 2968, 2968, 2968, 2968, 2968, - /* 290 */ 2968, 2968, 2968, 826, 380, 455, 656, 514, 15, 967, - /* 300 */ 642, 59, 832, 938, 842, 1164, 1164, 1164, 1164, 1164, - /* 310 */ 1164, 1164, 1164, 1164, 963, 68, 184, 184, 365, 291, - /* 320 */ 181, 640, 226, 325, 325, 597, 669, 364, 597, 597, - /* 330 */ 597, 788, 1025, 980, 876, 833, 843, 786, 856, 857, - /* 340 */ 865, 1111, 1162, 1165, 289, 984, 985, 943, 951, 900, - /* 350 */ 851, 1070, 1131, 1159, 1160, 1161, 1130, 1166, 886, 1026, - /* 360 */ 290, 1167, 1151, 1171, 1174, 1177, 1179, 1182, 1186, 905, - /* 370 */ 1212, 1224, 1204, 766, 1485, 1486, 1300, 1488, 1489, 1448, - /* 380 */ 1491, 1457, 1295, 1458, 1460, 1461, 1298, 1498, 1464, 1465, - /* 390 */ 1302, 1502, 1304, 1504, 1471, 1507, 1499, 1508, 1476, 1338, - /* 400 */ 1344, 1532, 1533, 1351, 1353, 1529, 1534, 1490, 1535, 1536, - /* 410 */ 1538, 1497, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, - /* 420 */ 1400, 1514, 1554, 1412, 1564, 1565, 1567, 1575, 1576, 1577, - /* 430 */ 1578, 1579, 1580, 1582, 1583, 1584, 1585, 1586, 1587, 1528, - /* 440 */ 1571, 1572, 1588, 1590, 1592, 1589, 1593, 1597, 1604, 1472, - /* 450 */ 1606, 1608, 1574, 1610, 1555, 1614, 1557, 1618, 1620, 1595, - /* 460 */ 1600, 1581, 1594, 1607, 1596, 1626, 1598, 1624, 1602, 1605, - /* 470 */ 1646, 1647, 1648, 1611, 1478, 1652, 1653, 1654, 1591, 1656, - /* 480 */ 1662, 1628, 1616, 1629, 1665, 1631, 1619, 1632, 1670, 1637, - /* 490 */ 1625, 1635, 1675, 1641, 1630, 1640, 1680, 1683, 1685, 1686, - /* 500 */ 1599, 1621, 1655, 1666, 1687, 1657, 1658, 1659, 1660, 1645, - /* 510 */ 1661, 1664, 1667, 1669, 1671, 1696, 1679, 1704, 1688, 1663, - /* 520 */ 1708, 1700, 1674, 1724, 1691, 1728, 1695, 1731, 1710, 1714, - /* 530 */ 1701, 1703, 1548, 1639, 1644, 1741, 1609, 1711, 1743, 1562, - /* 540 */ 1725, 1617, 1601, 1748, 1749, 1622, 1613, 1750, 1707, 1515, - /* 550 */ 1689, 1673, 1697, 1633, 1559, 1634, 1513, 1677, 1746, 1698, - /* 560 */ 1702, 1705, 1709, 1712, 1751, 1756, 1758, 1716, 1762, 1568, - /* 570 */ 1717, 1719, 1814, 1774, 1612, 1785, 1787, 1788, 1789, 1791, - /* 580 */ 1792, 1723, 1738, 1793, 1615, 1795, 1796, 1836, 1842, 1850, - /* 590 */ 1757, 1759, 1760, 1763, 1764, 1706, 1766, 1853, 1823, 1715, - /* 600 */ 1768, 1761, 1594, 1817, 1821, 1649, 1638, 1651, 1866, 1849, - /* 610 */ 1668, 1779, 1790, 1780, 1798, 1786, 1799, 1833, 1794, 1797, - /* 620 */ 1840, 1800, 1861, 1684, 1804, 1802, 1805, 1867, 1868, 1809, - /* 630 */ 1810, 1874, 1815, 1816, 1878, 1825, 1826, 1889, 1830, 1843, - /* 640 */ 1891, 1834, 1819, 1827, 1828, 1829, 1883, 1835, 1845, 1900, - /* 650 */ 1854, 1910, 1855, 1900, 1900, 1929, 1888, 1890, 1920, 1921, - /* 660 */ 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1930, 1898, 1872, - /* 670 */ 1935, 1934, 1936, 1946, 1950, 1948, 1949, 1951, 1917, 1645, - /* 680 */ 1953, 1661, 1954, 1956, 1957, 1959, 1973, 1961, 1997, 1964, - /* 690 */ 1958, 1962, 2002, 1968, 1960, 1965, 2007, 1974, 1963, 1971, - /* 700 */ 2012, 1978, 1966, 1976, 2016, 1982, 1983, 2019, 1998, 2000, - /* 710 */ 2003, 2006, 2001, 2004, + /* 40 */ 574, 574, 574, 574, 574, 574, 574, 574, 132, 182, + /* 50 */ 92, 380, 222, 274, 298, 274, 92, 92, 1347, 1347, + /* 60 */ 274, 1347, 1347, 140, 274, 96, 31, 31, 96, 307, + /* 70 */ 307, 327, 57, 5, 5, 31, 31, 31, 31, 31, + /* 80 */ 31, 31, 31, 31, 31, 80, 31, 31, 294, 31, + /* 90 */ 31, 31, 499, 31, 31, 499, 31, 499, 499, 499, + /* 100 */ 31, 420, 790, 34, 34, 219, 450, 568, 568, 568, + /* 110 */ 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, + /* 120 */ 568, 568, 568, 568, 568, 568, 215, 180, 327, 57, + /* 130 */ 172, 495, 384, 384, 384, 617, 184, 184, 495, 520, + /* 140 */ 520, 520, 136, 127, 499, 838, 499, 838, 838, 136, + /* 150 */ 853, 216, 216, 216, 216, 216, 216, 216, 579, 407, + /* 160 */ 335, 432, 449, 47, 957, 552, 457, 577, 79, 744, + /* 170 */ 858, 871, 751, 573, 740, 99, 573, 938, 886, 824, + /* 180 */ 976, 1175, 1046, 1190, 1214, 1190, 1076, 1219, 1219, 1190, + /* 190 */ 1076, 1076, 1157, 1219, 1219, 1219, 1237, 1237, 1249, 80, + /* 200 */ 1253, 80, 1259, 1261, 80, 1259, 80, 80, 80, 1219, + /* 210 */ 80, 1236, 1236, 1237, 499, 499, 499, 499, 499, 499, + /* 220 */ 499, 499, 499, 499, 499, 1219, 1237, 838, 838, 1109, + /* 230 */ 1249, 420, 1125, 1253, 420, 1219, 1214, 1214, 838, 1079, + /* 240 */ 1087, 838, 1079, 1087, 838, 838, 499, 1108, 1198, 1079, + /* 250 */ 1110, 1114, 1129, 976, 1115, 1111, 1119, 1136, 520, 1368, + /* 260 */ 1219, 1259, 420, 1087, 838, 838, 838, 838, 838, 1087, + /* 270 */ 838, 1239, 420, 136, 420, 520, 1317, 1319, 838, 853, + /* 280 */ 1219, 420, 1385, 1237, 3067, 3067, 3067, 3067, 3067, 3067, + /* 290 */ 3067, 3067, 3067, 885, 309, 94, 995, 15, 59, 718, + /* 300 */ 425, 879, 897, 73, 704, 471, 471, 471, 471, 471, + /* 310 */ 471, 471, 471, 471, 889, 185, 698, 698, 32, 546, + /* 320 */ 608, 501, 633, 296, 296, 244, 753, 506, 244, 244, + /* 330 */ 244, 567, 981, 893, 959, 955, 593, 947, 970, 1014, + /* 340 */ 1016, 1121, 1132, 1133, 926, 1031, 1081, 923, 806, 943, + /* 350 */ 436, 1082, 1084, 1086, 1091, 1112, 1169, 1118, 455, 967, + /* 360 */ 791, 1123, 1126, 1128, 1135, 1139, 1142, 1144, 1146, 1034, + /* 370 */ 1156, 1162, 1024, 1051, 1436, 1439, 1260, 1450, 1451, 1410, + /* 380 */ 1456, 1422, 1257, 1426, 1428, 1430, 1265, 1468, 1437, 1438, + /* 390 */ 1270, 1474, 1274, 1476, 1442, 1478, 1457, 1480, 1446, 1298, + /* 400 */ 1301, 1484, 1485, 1308, 1310, 1488, 1489, 1443, 1491, 1492, + /* 410 */ 1494, 1453, 1496, 1498, 1499, 1506, 1508, 1509, 1510, 1511, + /* 420 */ 1364, 1481, 1517, 1369, 1521, 1522, 1523, 1524, 1525, 1526, + /* 430 */ 1527, 1528, 1530, 1532, 1533, 1534, 1535, 1536, 1537, 1497, + /* 440 */ 1538, 1540, 1541, 1542, 1543, 1529, 1545, 1546, 1547, 1413, + /* 450 */ 1549, 1550, 1518, 1556, 1500, 1560, 1503, 1562, 1563, 1531, + /* 460 */ 1539, 1520, 1552, 1551, 1553, 1565, 1554, 1574, 1544, 1557, + /* 470 */ 1576, 1577, 1580, 1564, 1408, 1582, 1585, 1586, 1548, 1588, + /* 480 */ 1589, 1570, 1559, 1571, 1611, 1578, 1568, 1579, 1615, 1587, + /* 490 */ 1569, 1581, 1623, 1590, 1583, 1591, 1624, 1626, 1627, 1628, + /* 500 */ 1558, 1561, 1597, 1612, 1633, 1600, 1601, 1603, 1604, 1596, + /* 510 */ 1599, 1606, 1613, 1625, 1616, 1646, 1636, 1650, 1639, 1610, + /* 520 */ 1667, 1647, 1648, 1673, 1649, 1674, 1651, 1681, 1663, 1670, + /* 530 */ 1652, 1657, 1501, 1595, 1602, 1698, 1555, 1664, 1700, 1516, + /* 540 */ 1680, 1566, 1572, 1703, 1705, 1573, 1592, 1704, 1662, 1460, + /* 550 */ 1617, 1614, 1618, 1594, 1487, 1605, 1463, 1620, 1676, 1621, + /* 560 */ 1629, 1630, 1631, 1632, 1677, 1675, 1683, 1643, 1679, 1483, + /* 570 */ 1637, 1644, 1738, 1706, 1504, 1713, 1718, 1719, 1720, 1722, + /* 580 */ 1724, 1678, 1682, 1726, 1619, 1732, 1730, 1780, 1781, 1785, + /* 590 */ 1691, 1692, 1693, 1696, 1697, 1634, 1699, 1787, 1754, 1635, + /* 600 */ 1701, 1702, 1552, 1751, 1757, 1593, 1575, 1607, 1801, 1784, + /* 610 */ 1598, 1714, 1712, 1716, 1717, 1721, 1723, 1765, 1727, 1729, + /* 620 */ 1767, 1731, 1796, 1645, 1741, 1733, 1742, 1788, 1791, 1747, + /* 630 */ 1748, 1802, 1752, 1750, 1808, 1761, 1762, 1822, 1764, 1766, + /* 640 */ 1825, 1768, 1745, 1746, 1749, 1753, 1844, 1760, 1778, 1830, + /* 650 */ 1782, 1840, 1786, 1830, 1830, 1854, 1814, 1817, 1847, 1848, + /* 660 */ 1850, 1852, 1853, 1855, 1856, 1857, 1858, 1860, 1819, 1804, + /* 670 */ 1859, 1862, 1863, 1864, 1880, 1869, 1871, 1872, 1835, 1596, + /* 680 */ 1873, 1599, 1874, 1877, 1878, 1881, 1893, 1888, 1926, 1892, + /* 690 */ 1882, 1889, 1929, 1897, 1886, 1896, 1937, 1904, 1898, 1902, + /* 700 */ 1943, 1909, 1899, 1906, 1948, 1914, 1916, 1952, 1931, 1933, + /* 710 */ 1934, 1936, 1938, 1940, }; #define YY_REDUCE_COUNT (292) -#define YY_REDUCE_MIN (-381) -#define YY_REDUCE_MAX (2557) +#define YY_REDUCE_MIN (-390) +#define YY_REDUCE_MAX (2655) static const short yy_reduce_ofst[] = { - /* 0 */ -318, -250, 233, 324, 630, 650, 742, 785, 828, 895, - /* 10 */ 949, 1035, 1109, 1152, 1195, 1223, 1311, 1354, 1371, 1425, - /* 20 */ 1441, 1511, 1527, 1570, 1627, 1678, 1699, 1721, 1784, 1808, - /* 30 */ 1870, 1894, 1937, 1955, 2027, 2045, 2088, 2112, 2175, 2229, - /* 40 */ 2283, 2299, 2342, 2399, 2416, 2442, 2503, 2557, -191, 104, - /* 50 */ -18, -7, 168, 239, 269, 558, -278, 658, -345, -320, - /* 60 */ -270, -273, -170, -79, -10, 296, 328, -331, -326, -342, - /* 70 */ -328, -236, -193, 253, 254, 376, 398, 408, 409, 469, - /* 80 */ 643, 678, 682, -330, 683, 729, 185, 768, 41, 770, - /* 90 */ 775, -349, 795, 804, -280, 805, -245, 260, -113, 847, - /* 100 */ 16, -283, 130, 130, -309, -202, 163, 337, 389, 392, - /* 110 */ 434, 481, 501, 502, 503, 633, 634, 670, 671, 672, - /* 120 */ 695, 747, 750, 789, 841, -281, 87, 10, 220, 84, - /* 130 */ 283, 87, 245, 251, 344, -225, -38, 355, -313, 319, - /* 140 */ 360, 397, 45, 297, 196, 384, -110, 441, 443, 466, - /* 150 */ 475, -355, 519, 615, 720, 727, 737, 745, -381, 637, - /* 160 */ 759, 726, 665, 663, 846, 757, 883, 883, 872, 863, - /* 170 */ 880, 878, 870, 821, 821, 808, 821, 831, 830, 883, - /* 180 */ 873, 875, 894, 906, 907, 908, 913, 957, 958, 916, - /* 190 */ 920, 921, 965, 971, 974, 976, 989, 990, 928, 982, - /* 200 */ 952, 986, 992, 942, 991, 995, 993, 994, 996, 998, - /* 210 */ 997, 1001, 1002, 1012, 988, 1000, 1003, 1005, 1007, 1009, - /* 220 */ 1010, 1011, 1014, 1015, 1016, 1008, 1013, 973, 977, 955, - /* 230 */ 983, 1021, 959, 1004, 1039, 1044, 999, 1017, 1019, 944, - /* 240 */ 1018, 1020, 945, 1027, 1024, 1028, 883, 946, 953, 961, - /* 250 */ 954, 966, 969, 1022, 956, 964, 968, 821, 1051, 1030, - /* 260 */ 1086, 1087, 1083, 1049, 1063, 1066, 1073, 1075, 1076, 1064, - /* 270 */ 1078, 1071, 1115, 1101, 1119, 1093, 1041, 1103, 1092, 1116, - /* 280 */ 1133, 1135, 1139, 1141, 1081, 1079, 1091, 1096, 1120, 1125, - /* 290 */ 1126, 1144, 1158, + /* 0 */ -193, -258, 679, 741, 795, 854, 920, 940, 1037, 1096, + /* 10 */ 1186, 1248, 1271, 1338, 1361, 289, 1424, 1444, 1513, 1567, + /* 20 */ 1584, 1638, 1656, 1710, 1728, 1783, 1803, 1870, 1895, 1922, + /* 30 */ 1982, 2005, 2065, 2092, 2117, 2175, 2192, 2244, 2267, 2296, + /* 40 */ 2354, 2372, 2437, 2459, 2520, 2542, 2603, 2655, -257, 95, + /* 50 */ 223, -39, 171, 234, 392, 624, 293, 342, -345, -15, + /* 60 */ -390, -12, 270, -275, -249, 227, -221, 326, -370, -329, + /* 70 */ -325, -326, -362, -298, -256, -239, 253, 280, 408, 470, + /* 80 */ 551, 655, 656, 658, 660, -201, 676, 678, 24, 732, + /* 90 */ 742, 768, -260, 770, 771, -313, 774, 10, -4, 101, + /* 100 */ 775, 207, -334, -283, -283, -19, -151, -309, 167, 221, + /* 110 */ 237, 345, 378, 395, 412, 433, 518, 545, 547, 553, + /* 120 */ 575, 659, 661, 662, 670, 711, -265, 64, -60, -216, + /* 130 */ -165, 53, 64, 128, 133, 313, 336, 346, 98, 265, + /* 140 */ 279, 462, -315, 311, 451, 480, 463, 505, 511, 571, + /* 150 */ 529, -359, -338, 370, 651, 672, 681, 688, 535, 816, + /* 160 */ 723, 777, 702, 727, 828, 735, 826, 826, 852, 812, + /* 170 */ 861, 835, 813, 766, 766, 756, 766, 785, 780, 826, + /* 180 */ 817, 831, 840, 855, 856, 863, 867, 909, 910, 868, + /* 190 */ 872, 873, 911, 917, 918, 921, 935, 937, 874, 930, + /* 200 */ 901, 934, 944, 894, 941, 948, 949, 951, 953, 950, + /* 210 */ 954, 958, 961, 960, 939, 942, 945, 946, 952, 956, + /* 220 */ 962, 964, 965, 972, 974, 966, 973, 936, 963, 912, + /* 230 */ 915, 977, 922, 979, 980, 983, 969, 984, 968, 895, + /* 240 */ 971, 986, 914, 982, 990, 996, 826, 927, 932, 975, + /* 250 */ 985, 978, 988, 987, 919, 928, 933, 766, 1021, 989, + /* 260 */ 1054, 1055, 1057, 1006, 1022, 1023, 1026, 1027, 1028, 1017, + /* 270 */ 1029, 1020, 1067, 1053, 1070, 1045, 992, 1056, 1048, 1072, + /* 280 */ 1092, 1083, 1098, 1097, 1038, 1035, 1047, 1050, 1085, 1088, + /* 290 */ 1095, 1093, 1106, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 10 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 20 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 30 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 40 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 50 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 60 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1849, - /* 70 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 80 */ 1594, 1594, 1594, 1672, 1594, 1594, 1594, 1594, 1594, 1594, - /* 90 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 100 */ 1670, 1842, 2039, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 110 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 120 */ 1594, 1594, 1594, 1594, 1594, 1594, 2051, 1594, 1594, 1672, - /* 130 */ 1594, 2051, 2051, 2051, 1670, 2011, 2011, 1594, 1594, 1594, - /* 140 */ 1594, 1779, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1779, - /* 150 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1886, 1594, - /* 160 */ 1594, 2076, 2130, 1594, 1594, 2079, 1594, 1594, 1594, 1854, - /* 170 */ 1594, 1732, 2066, 2043, 2057, 2114, 2044, 2041, 2060, 1594, - /* 180 */ 2070, 1594, 1879, 1847, 1594, 1847, 1844, 1594, 1594, 1847, - /* 190 */ 1844, 1844, 1723, 1594, 1594, 1594, 1594, 1594, 1594, 1672, - /* 200 */ 1594, 1672, 1594, 1594, 1672, 1594, 1672, 1672, 1672, 1594, - /* 210 */ 1672, 1651, 1651, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 220 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1899, - /* 230 */ 1594, 1670, 1888, 1594, 1670, 1594, 1594, 1594, 1594, 2087, - /* 240 */ 2085, 1594, 2087, 2085, 1594, 1594, 1594, 2099, 2095, 2087, - /* 250 */ 2103, 2101, 2072, 2070, 2133, 2120, 2116, 2057, 1594, 1594, - /* 260 */ 1594, 1594, 1670, 2085, 1594, 1594, 1594, 1594, 1594, 2085, - /* 270 */ 1594, 1594, 1670, 1594, 1670, 1594, 1594, 1748, 1594, 1594, - /* 280 */ 1594, 1670, 1626, 1594, 1881, 1892, 1864, 1864, 1782, 1782, - /* 290 */ 1782, 1673, 1599, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 300 */ 1594, 1594, 1594, 1594, 1594, 2098, 2097, 1967, 1594, 2015, - /* 310 */ 2014, 2013, 2004, 1966, 1744, 1594, 1965, 1964, 1594, 1594, - /* 320 */ 1594, 1594, 1594, 1860, 1859, 1958, 1594, 1594, 1959, 1957, - /* 330 */ 1956, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 340 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 2117, 2121, - /* 350 */ 1594, 1594, 1594, 1594, 1594, 1594, 2040, 1594, 1594, 1594, - /* 360 */ 1594, 1594, 1941, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 370 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 380 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 390 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 400 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 410 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 420 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 430 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 440 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 450 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 460 */ 1594, 1631, 1946, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 470 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 480 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 490 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 500 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1711, - /* 510 */ 1710, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 520 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 530 */ 1594, 1594, 1594, 1949, 1594, 1594, 1594, 1594, 1594, 1594, - /* 540 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 2113, 2073, 1594, - /* 550 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 560 */ 1594, 1594, 1594, 1594, 1594, 1594, 1941, 1594, 2096, 1594, - /* 570 */ 1594, 2111, 1594, 2115, 1594, 1594, 1594, 1594, 1594, 1594, - /* 580 */ 1594, 2050, 2046, 1594, 1594, 2042, 1594, 1594, 1594, 1594, - /* 590 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 600 */ 1594, 1594, 1940, 1594, 2001, 1594, 1594, 1594, 2035, 1594, - /* 610 */ 1594, 1986, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 620 */ 1594, 1949, 1594, 1952, 1594, 1594, 1594, 1594, 1594, 1776, - /* 630 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 640 */ 1594, 1594, 1761, 1759, 1758, 1757, 1594, 1754, 1594, 1789, - /* 650 */ 1594, 1594, 1594, 1785, 1784, 1594, 1594, 1594, 1594, 1594, - /* 660 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 670 */ 1691, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1683, - /* 680 */ 1594, 1682, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 690 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 700 */ 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, - /* 710 */ 1594, 1594, 1594, 1594, + /* 0 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 10 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 20 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 30 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 40 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 50 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 60 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 70 */ 1604, 1859, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 80 */ 1604, 1604, 1604, 1604, 1604, 1682, 1604, 1604, 1604, 1604, + /* 90 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 100 */ 1604, 1680, 1852, 2054, 1604, 1604, 1604, 1604, 1604, 1604, + /* 110 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 120 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 2066, 1604, 1604, + /* 130 */ 1682, 1604, 2066, 2066, 2066, 1680, 2026, 2026, 1604, 1604, + /* 140 */ 1604, 1604, 1789, 1604, 1604, 1604, 1604, 1604, 1604, 1789, + /* 150 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1901, 1604, + /* 160 */ 1604, 2091, 2145, 1604, 1604, 2094, 1604, 1604, 1604, 1864, + /* 170 */ 1604, 1742, 2081, 2058, 2072, 2129, 2059, 2056, 2075, 1604, + /* 180 */ 2085, 1604, 1894, 1857, 1604, 1857, 1854, 1604, 1604, 1857, + /* 190 */ 1854, 1854, 1733, 1604, 1604, 1604, 1604, 1604, 1604, 1682, + /* 200 */ 1604, 1682, 1604, 1604, 1682, 1604, 1682, 1682, 1682, 1604, + /* 210 */ 1682, 1661, 1661, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 220 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1914, + /* 230 */ 1604, 1680, 1903, 1604, 1680, 1604, 1604, 1604, 1604, 2102, + /* 240 */ 2100, 1604, 2102, 2100, 1604, 1604, 1604, 2114, 2110, 2102, + /* 250 */ 2118, 2116, 2087, 2085, 2148, 2135, 2131, 2072, 1604, 1604, + /* 260 */ 1604, 1604, 1680, 2100, 1604, 1604, 1604, 1604, 1604, 2100, + /* 270 */ 1604, 1604, 1680, 1604, 1680, 1604, 1604, 1758, 1604, 1604, + /* 280 */ 1604, 1680, 1636, 1604, 1896, 1907, 1879, 1879, 1792, 1792, + /* 290 */ 1792, 1683, 1609, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 300 */ 1604, 1604, 1604, 1604, 1604, 2113, 2112, 1982, 1604, 2030, + /* 310 */ 2029, 2028, 2019, 1981, 1754, 1604, 1980, 1979, 1604, 1604, + /* 320 */ 1604, 1604, 1604, 1870, 1869, 1973, 1604, 1604, 1974, 1972, + /* 330 */ 1971, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 340 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 2132, 2136, + /* 350 */ 1604, 1604, 1604, 1604, 1604, 1604, 2055, 1604, 1604, 1604, + /* 360 */ 1604, 1604, 1956, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 370 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 380 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 390 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 400 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 410 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 420 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 430 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 440 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 450 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 460 */ 1604, 1641, 1961, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 470 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 480 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 490 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 500 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1721, + /* 510 */ 1720, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 520 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 530 */ 1604, 1604, 1604, 1964, 1604, 1604, 1604, 1604, 1604, 1604, + /* 540 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 2128, 2088, 1604, + /* 550 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 560 */ 1604, 1604, 1604, 1604, 1604, 1604, 1956, 1604, 2111, 1604, + /* 570 */ 1604, 2126, 1604, 2130, 1604, 1604, 1604, 1604, 1604, 1604, + /* 580 */ 1604, 2065, 2061, 1604, 1604, 2057, 1604, 1604, 1604, 1604, + /* 590 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 600 */ 1604, 1604, 1955, 1604, 2016, 1604, 1604, 1604, 2050, 1604, + /* 610 */ 1604, 2001, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 620 */ 1604, 1964, 1604, 1967, 1604, 1604, 1604, 1604, 1604, 1786, + /* 630 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 640 */ 1604, 1604, 1771, 1769, 1768, 1767, 1604, 1764, 1604, 1799, + /* 650 */ 1604, 1604, 1604, 1795, 1794, 1604, 1604, 1604, 1604, 1604, + /* 660 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 670 */ 1701, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1693, + /* 680 */ 1604, 1692, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 690 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 700 */ 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, 1604, + /* 710 */ 1604, 1604, 1604, 1604, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1186,6 +1206,8 @@ static const YYCODETYPE yyFallback[] = { 0, /* INDEX => nothing */ 0, /* FUNCTION => nothing */ 0, /* INTERVAL => nothing */ + 0, /* COUNT => nothing */ + 0, /* LAST_ROW => nothing */ 0, /* TOPIC => nothing */ 0, /* WITH => nothing */ 0, /* META => nothing */ @@ -1243,8 +1265,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* SERVER_VERSION => nothing */ 0, /* SERVER_STATUS => nothing */ 0, /* CURRENT_USER => nothing */ - 0, /* COUNT => nothing */ - 0, /* LAST_ROW => nothing */ 0, /* CASE => nothing */ 270, /* END => ABORT */ 0, /* WHEN => nothing */ @@ -1597,65 +1617,65 @@ static const char *const yyTokenName[] = { /* 164 */ "INDEX", /* 165 */ "FUNCTION", /* 166 */ "INTERVAL", - /* 167 */ "TOPIC", - /* 168 */ "WITH", - /* 169 */ "META", - /* 170 */ "CONSUMER", - /* 171 */ "GROUP", - /* 172 */ "DESC", - /* 173 */ "DESCRIBE", - /* 174 */ "RESET", - /* 175 */ "QUERY", - /* 176 */ "CACHE", - /* 177 */ "EXPLAIN", - /* 178 */ "ANALYZE", - /* 179 */ "VERBOSE", - /* 180 */ "NK_BOOL", - /* 181 */ "RATIO", - /* 182 */ "NK_FLOAT", - /* 183 */ "OUTPUTTYPE", - /* 184 */ "AGGREGATE", - /* 185 */ "BUFSIZE", - /* 186 */ "STREAM", - /* 187 */ "INTO", - /* 188 */ "TRIGGER", - /* 189 */ "AT_ONCE", - /* 190 */ "WINDOW_CLOSE", - /* 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", + /* 167 */ "COUNT", + /* 168 */ "LAST_ROW", + /* 169 */ "TOPIC", + /* 170 */ "WITH", + /* 171 */ "META", + /* 172 */ "CONSUMER", + /* 173 */ "GROUP", + /* 174 */ "DESC", + /* 175 */ "DESCRIBE", + /* 176 */ "RESET", + /* 177 */ "QUERY", + /* 178 */ "CACHE", + /* 179 */ "EXPLAIN", + /* 180 */ "ANALYZE", + /* 181 */ "VERBOSE", + /* 182 */ "NK_BOOL", + /* 183 */ "RATIO", + /* 184 */ "NK_FLOAT", + /* 185 */ "OUTPUTTYPE", + /* 186 */ "AGGREGATE", + /* 187 */ "BUFSIZE", + /* 188 */ "STREAM", + /* 189 */ "INTO", + /* 190 */ "TRIGGER", + /* 191 */ "AT_ONCE", + /* 192 */ "WINDOW_CLOSE", + /* 193 */ "IGNORE", + /* 194 */ "EXPIRED", + /* 195 */ "FILL_HISTORY", + /* 196 */ "SUBTABLE", + /* 197 */ "KILL", + /* 198 */ "CONNECTION", + /* 199 */ "TRANSACTION", + /* 200 */ "BALANCE", + /* 201 */ "VGROUP", + /* 202 */ "MERGE", + /* 203 */ "REDISTRIBUTE", + /* 204 */ "SPLIT", + /* 205 */ "DELETE", + /* 206 */ "INSERT", + /* 207 */ "NULL", + /* 208 */ "NK_QUESTION", + /* 209 */ "NK_ARROW", + /* 210 */ "ROWTS", + /* 211 */ "QSTART", + /* 212 */ "QEND", + /* 213 */ "QDURATION", + /* 214 */ "WSTART", + /* 215 */ "WEND", + /* 216 */ "WDURATION", + /* 217 */ "IROWTS", + /* 218 */ "CAST", + /* 219 */ "NOW", + /* 220 */ "TODAY", + /* 221 */ "TIMEZONE", + /* 222 */ "CLIENT_VERSION", + /* 223 */ "SERVER_VERSION", + /* 224 */ "SERVER_STATUS", + /* 225 */ "CURRENT_USER", /* 226 */ "CASE", /* 227 */ "END", /* 228 */ "WHEN", @@ -1817,78 +1837,79 @@ static const char *const yyTokenName[] = { /* 384 */ "sliding_opt", /* 385 */ "sma_stream_opt", /* 386 */ "func", - /* 387 */ "query_or_subquery", - /* 388 */ "cgroup_name", - /* 389 */ "analyze_opt", - /* 390 */ "explain_options", - /* 391 */ "agg_func_opt", - /* 392 */ "bufsize_opt", - /* 393 */ "stream_name", - /* 394 */ "stream_options", - /* 395 */ "subtable_opt", - /* 396 */ "expression", - /* 397 */ "dnode_list", - /* 398 */ "where_clause_opt", - /* 399 */ "signed", - /* 400 */ "literal_func", - /* 401 */ "literal_list", - /* 402 */ "table_alias", - /* 403 */ "expr_or_subquery", - /* 404 */ "pseudo_column", - /* 405 */ "column_reference", - /* 406 */ "function_expression", - /* 407 */ "case_when_expression", - /* 408 */ "star_func", - /* 409 */ "star_func_para_list", - /* 410 */ "noarg_func", - /* 411 */ "other_para_list", - /* 412 */ "star_func_para", - /* 413 */ "when_then_list", - /* 414 */ "case_when_else_opt", - /* 415 */ "common_expression", - /* 416 */ "when_then_expr", - /* 417 */ "predicate", - /* 418 */ "compare_op", - /* 419 */ "in_op", - /* 420 */ "in_predicate_value", - /* 421 */ "boolean_value_expression", - /* 422 */ "boolean_primary", - /* 423 */ "from_clause_opt", - /* 424 */ "table_reference_list", - /* 425 */ "table_reference", - /* 426 */ "table_primary", - /* 427 */ "joined_table", - /* 428 */ "alias_opt", - /* 429 */ "subquery", - /* 430 */ "parenthesized_joined_table", - /* 431 */ "join_type", - /* 432 */ "search_condition", - /* 433 */ "query_specification", - /* 434 */ "set_quantifier_opt", - /* 435 */ "select_list", - /* 436 */ "partition_by_clause_opt", - /* 437 */ "range_opt", - /* 438 */ "every_opt", - /* 439 */ "fill_opt", - /* 440 */ "twindow_clause_opt", - /* 441 */ "group_by_clause_opt", - /* 442 */ "having_clause_opt", - /* 443 */ "select_item", - /* 444 */ "partition_list", - /* 445 */ "partition_item", - /* 446 */ "fill_mode", - /* 447 */ "group_by_list", - /* 448 */ "query_expression", - /* 449 */ "query_simple", - /* 450 */ "order_by_clause_opt", - /* 451 */ "slimit_clause_opt", - /* 452 */ "limit_clause_opt", - /* 453 */ "union_query_expression", - /* 454 */ "query_simple_or_subquery", - /* 455 */ "sort_specification_list", - /* 456 */ "sort_specification", - /* 457 */ "ordering_specification_opt", - /* 458 */ "null_ordering_opt", + /* 387 */ "sma_func_name", + /* 388 */ "query_or_subquery", + /* 389 */ "cgroup_name", + /* 390 */ "analyze_opt", + /* 391 */ "explain_options", + /* 392 */ "agg_func_opt", + /* 393 */ "bufsize_opt", + /* 394 */ "stream_name", + /* 395 */ "stream_options", + /* 396 */ "subtable_opt", + /* 397 */ "expression", + /* 398 */ "dnode_list", + /* 399 */ "where_clause_opt", + /* 400 */ "signed", + /* 401 */ "literal_func", + /* 402 */ "literal_list", + /* 403 */ "table_alias", + /* 404 */ "expr_or_subquery", + /* 405 */ "pseudo_column", + /* 406 */ "column_reference", + /* 407 */ "function_expression", + /* 408 */ "case_when_expression", + /* 409 */ "star_func", + /* 410 */ "star_func_para_list", + /* 411 */ "noarg_func", + /* 412 */ "other_para_list", + /* 413 */ "star_func_para", + /* 414 */ "when_then_list", + /* 415 */ "case_when_else_opt", + /* 416 */ "common_expression", + /* 417 */ "when_then_expr", + /* 418 */ "predicate", + /* 419 */ "compare_op", + /* 420 */ "in_op", + /* 421 */ "in_predicate_value", + /* 422 */ "boolean_value_expression", + /* 423 */ "boolean_primary", + /* 424 */ "from_clause_opt", + /* 425 */ "table_reference_list", + /* 426 */ "table_reference", + /* 427 */ "table_primary", + /* 428 */ "joined_table", + /* 429 */ "alias_opt", + /* 430 */ "subquery", + /* 431 */ "parenthesized_joined_table", + /* 432 */ "join_type", + /* 433 */ "search_condition", + /* 434 */ "query_specification", + /* 435 */ "set_quantifier_opt", + /* 436 */ "select_list", + /* 437 */ "partition_by_clause_opt", + /* 438 */ "range_opt", + /* 439 */ "every_opt", + /* 440 */ "fill_opt", + /* 441 */ "twindow_clause_opt", + /* 442 */ "group_by_clause_opt", + /* 443 */ "having_clause_opt", + /* 444 */ "select_item", + /* 445 */ "partition_list", + /* 446 */ "partition_item", + /* 447 */ "fill_mode", + /* 448 */ "group_by_list", + /* 449 */ "query_expression", + /* 450 */ "query_simple", + /* 451 */ "order_by_clause_opt", + /* 452 */ "slimit_clause_opt", + /* 453 */ "limit_clause_opt", + /* 454 */ "union_query_expression", + /* 455 */ "query_simple_or_subquery", + /* 456 */ "sort_specification_list", + /* 457 */ "sort_specification", + /* 458 */ "ordering_specification_opt", + /* 459 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2162,279 +2183,284 @@ static const char *const yyRuleName[] = { /* 263 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt", /* 264 */ "func_list ::= func", /* 265 */ "func_list ::= func_list NK_COMMA func", - /* 266 */ "func ::= function_name NK_LP expression_list NK_RP", - /* 267 */ "sma_stream_opt ::=", - /* 268 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", - /* 269 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", - /* 270 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", - /* 271 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", - /* 272 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", - /* 273 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", - /* 274 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", - /* 275 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", - /* 276 */ "cmd ::= DROP TOPIC exists_opt topic_name", - /* 277 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", - /* 278 */ "cmd ::= DESC full_table_name", - /* 279 */ "cmd ::= DESCRIBE full_table_name", - /* 280 */ "cmd ::= RESET QUERY CACHE", - /* 281 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", - /* 282 */ "analyze_opt ::=", - /* 283 */ "analyze_opt ::= ANALYZE", - /* 284 */ "explain_options ::=", - /* 285 */ "explain_options ::= explain_options VERBOSE NK_BOOL", - /* 286 */ "explain_options ::= explain_options RATIO NK_FLOAT", - /* 287 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", - /* 288 */ "cmd ::= DROP FUNCTION exists_opt function_name", - /* 289 */ "agg_func_opt ::=", - /* 290 */ "agg_func_opt ::= AGGREGATE", - /* 291 */ "bufsize_opt ::=", - /* 292 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", - /* 293 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery", - /* 294 */ "cmd ::= DROP STREAM exists_opt stream_name", - /* 295 */ "stream_options ::=", - /* 296 */ "stream_options ::= stream_options TRIGGER AT_ONCE", - /* 297 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", - /* 298 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", - /* 299 */ "stream_options ::= stream_options WATERMARK duration_literal", - /* 300 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", - /* 301 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", - /* 302 */ "subtable_opt ::=", - /* 303 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", - /* 304 */ "cmd ::= KILL CONNECTION NK_INTEGER", - /* 305 */ "cmd ::= KILL QUERY NK_STRING", - /* 306 */ "cmd ::= KILL TRANSACTION NK_INTEGER", - /* 307 */ "cmd ::= BALANCE VGROUP", - /* 308 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", - /* 309 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", - /* 310 */ "cmd ::= SPLIT VGROUP NK_INTEGER", - /* 311 */ "dnode_list ::= DNODE NK_INTEGER", - /* 312 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", - /* 313 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", - /* 314 */ "cmd ::= query_or_subquery", - /* 315 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", - /* 316 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", - /* 317 */ "literal ::= NK_INTEGER", - /* 318 */ "literal ::= NK_FLOAT", - /* 319 */ "literal ::= NK_STRING", - /* 320 */ "literal ::= NK_BOOL", - /* 321 */ "literal ::= TIMESTAMP NK_STRING", - /* 322 */ "literal ::= duration_literal", - /* 323 */ "literal ::= NULL", - /* 324 */ "literal ::= NK_QUESTION", - /* 325 */ "duration_literal ::= NK_VARIABLE", - /* 326 */ "signed ::= NK_INTEGER", - /* 327 */ "signed ::= NK_PLUS NK_INTEGER", - /* 328 */ "signed ::= NK_MINUS NK_INTEGER", - /* 329 */ "signed ::= NK_FLOAT", - /* 330 */ "signed ::= NK_PLUS NK_FLOAT", - /* 331 */ "signed ::= NK_MINUS NK_FLOAT", - /* 332 */ "signed_literal ::= signed", - /* 333 */ "signed_literal ::= NK_STRING", - /* 334 */ "signed_literal ::= NK_BOOL", - /* 335 */ "signed_literal ::= TIMESTAMP NK_STRING", - /* 336 */ "signed_literal ::= duration_literal", - /* 337 */ "signed_literal ::= NULL", - /* 338 */ "signed_literal ::= literal_func", - /* 339 */ "signed_literal ::= NK_QUESTION", - /* 340 */ "literal_list ::= signed_literal", - /* 341 */ "literal_list ::= literal_list NK_COMMA signed_literal", - /* 342 */ "db_name ::= NK_ID", - /* 343 */ "table_name ::= NK_ID", - /* 344 */ "column_name ::= NK_ID", - /* 345 */ "function_name ::= NK_ID", - /* 346 */ "table_alias ::= NK_ID", - /* 347 */ "column_alias ::= NK_ID", - /* 348 */ "user_name ::= NK_ID", - /* 349 */ "topic_name ::= NK_ID", - /* 350 */ "stream_name ::= NK_ID", - /* 351 */ "cgroup_name ::= NK_ID", - /* 352 */ "expr_or_subquery ::= expression", - /* 353 */ "expression ::= literal", - /* 354 */ "expression ::= pseudo_column", - /* 355 */ "expression ::= column_reference", - /* 356 */ "expression ::= function_expression", - /* 357 */ "expression ::= case_when_expression", - /* 358 */ "expression ::= NK_LP expression NK_RP", - /* 359 */ "expression ::= NK_PLUS expr_or_subquery", - /* 360 */ "expression ::= NK_MINUS expr_or_subquery", - /* 361 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", - /* 362 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", - /* 363 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", - /* 364 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", - /* 365 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", - /* 366 */ "expression ::= column_reference NK_ARROW NK_STRING", - /* 367 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", - /* 368 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", - /* 369 */ "expression_list ::= expr_or_subquery", - /* 370 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", - /* 371 */ "column_reference ::= column_name", - /* 372 */ "column_reference ::= table_name NK_DOT column_name", - /* 373 */ "pseudo_column ::= ROWTS", - /* 374 */ "pseudo_column ::= TBNAME", - /* 375 */ "pseudo_column ::= table_name NK_DOT TBNAME", - /* 376 */ "pseudo_column ::= QSTART", - /* 377 */ "pseudo_column ::= QEND", - /* 378 */ "pseudo_column ::= QDURATION", - /* 379 */ "pseudo_column ::= WSTART", - /* 380 */ "pseudo_column ::= WEND", - /* 381 */ "pseudo_column ::= WDURATION", - /* 382 */ "pseudo_column ::= IROWTS", - /* 383 */ "pseudo_column ::= QTAGS", - /* 384 */ "function_expression ::= function_name NK_LP expression_list NK_RP", - /* 385 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", - /* 386 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", - /* 387 */ "function_expression ::= literal_func", - /* 388 */ "literal_func ::= noarg_func NK_LP NK_RP", - /* 389 */ "literal_func ::= NOW", - /* 390 */ "noarg_func ::= NOW", - /* 391 */ "noarg_func ::= TODAY", - /* 392 */ "noarg_func ::= TIMEZONE", - /* 393 */ "noarg_func ::= DATABASE", - /* 394 */ "noarg_func ::= CLIENT_VERSION", - /* 395 */ "noarg_func ::= SERVER_VERSION", - /* 396 */ "noarg_func ::= SERVER_STATUS", - /* 397 */ "noarg_func ::= CURRENT_USER", - /* 398 */ "noarg_func ::= USER", - /* 399 */ "star_func ::= COUNT", - /* 400 */ "star_func ::= FIRST", - /* 401 */ "star_func ::= LAST", - /* 402 */ "star_func ::= LAST_ROW", - /* 403 */ "star_func_para_list ::= NK_STAR", - /* 404 */ "star_func_para_list ::= other_para_list", - /* 405 */ "other_para_list ::= star_func_para", - /* 406 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 407 */ "star_func_para ::= expr_or_subquery", - /* 408 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 409 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", - /* 410 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", - /* 411 */ "when_then_list ::= when_then_expr", - /* 412 */ "when_then_list ::= when_then_list when_then_expr", - /* 413 */ "when_then_expr ::= WHEN common_expression THEN common_expression", - /* 414 */ "case_when_else_opt ::=", - /* 415 */ "case_when_else_opt ::= ELSE common_expression", - /* 416 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", - /* 417 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", - /* 418 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", - /* 419 */ "predicate ::= expr_or_subquery IS NULL", - /* 420 */ "predicate ::= expr_or_subquery IS NOT NULL", - /* 421 */ "predicate ::= expr_or_subquery in_op in_predicate_value", - /* 422 */ "compare_op ::= NK_LT", - /* 423 */ "compare_op ::= NK_GT", - /* 424 */ "compare_op ::= NK_LE", - /* 425 */ "compare_op ::= NK_GE", - /* 426 */ "compare_op ::= NK_NE", - /* 427 */ "compare_op ::= NK_EQ", - /* 428 */ "compare_op ::= LIKE", - /* 429 */ "compare_op ::= NOT LIKE", - /* 430 */ "compare_op ::= MATCH", - /* 431 */ "compare_op ::= NMATCH", - /* 432 */ "compare_op ::= CONTAINS", - /* 433 */ "in_op ::= IN", - /* 434 */ "in_op ::= NOT IN", - /* 435 */ "in_predicate_value ::= NK_LP literal_list NK_RP", - /* 436 */ "boolean_value_expression ::= boolean_primary", - /* 437 */ "boolean_value_expression ::= NOT boolean_primary", - /* 438 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 439 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 440 */ "boolean_primary ::= predicate", - /* 441 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 442 */ "common_expression ::= expr_or_subquery", - /* 443 */ "common_expression ::= boolean_value_expression", - /* 444 */ "from_clause_opt ::=", - /* 445 */ "from_clause_opt ::= FROM table_reference_list", - /* 446 */ "table_reference_list ::= table_reference", - /* 447 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 448 */ "table_reference ::= table_primary", - /* 449 */ "table_reference ::= joined_table", - /* 450 */ "table_primary ::= table_name alias_opt", - /* 451 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 452 */ "table_primary ::= subquery alias_opt", - /* 453 */ "table_primary ::= parenthesized_joined_table", - /* 454 */ "alias_opt ::=", - /* 455 */ "alias_opt ::= table_alias", - /* 456 */ "alias_opt ::= AS table_alias", - /* 457 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 458 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 459 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 460 */ "join_type ::=", - /* 461 */ "join_type ::= INNER", - /* 462 */ "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", - /* 463 */ "set_quantifier_opt ::=", - /* 464 */ "set_quantifier_opt ::= DISTINCT", - /* 465 */ "set_quantifier_opt ::= ALL", - /* 466 */ "select_list ::= select_item", - /* 467 */ "select_list ::= select_list NK_COMMA select_item", - /* 468 */ "select_item ::= NK_STAR", - /* 469 */ "select_item ::= common_expression", - /* 470 */ "select_item ::= common_expression column_alias", - /* 471 */ "select_item ::= common_expression AS column_alias", - /* 472 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 473 */ "where_clause_opt ::=", - /* 474 */ "where_clause_opt ::= WHERE search_condition", - /* 475 */ "partition_by_clause_opt ::=", - /* 476 */ "partition_by_clause_opt ::= PARTITION BY partition_list", - /* 477 */ "partition_list ::= partition_item", - /* 478 */ "partition_list ::= partition_list NK_COMMA partition_item", - /* 479 */ "partition_item ::= expr_or_subquery", - /* 480 */ "partition_item ::= expr_or_subquery column_alias", - /* 481 */ "partition_item ::= expr_or_subquery AS column_alias", - /* 482 */ "twindow_clause_opt ::=", - /* 483 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 484 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", - /* 485 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 486 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 487 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", - /* 488 */ "sliding_opt ::=", - /* 489 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 490 */ "fill_opt ::=", - /* 491 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 492 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 493 */ "fill_mode ::= NONE", - /* 494 */ "fill_mode ::= PREV", - /* 495 */ "fill_mode ::= NULL", - /* 496 */ "fill_mode ::= LINEAR", - /* 497 */ "fill_mode ::= NEXT", - /* 498 */ "group_by_clause_opt ::=", - /* 499 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 500 */ "group_by_list ::= expr_or_subquery", - /* 501 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", - /* 502 */ "having_clause_opt ::=", - /* 503 */ "having_clause_opt ::= HAVING search_condition", - /* 504 */ "range_opt ::=", - /* 505 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", - /* 506 */ "every_opt ::=", - /* 507 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", - /* 508 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 509 */ "query_simple ::= query_specification", - /* 510 */ "query_simple ::= union_query_expression", - /* 511 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", - /* 512 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", - /* 513 */ "query_simple_or_subquery ::= query_simple", - /* 514 */ "query_simple_or_subquery ::= subquery", - /* 515 */ "query_or_subquery ::= query_expression", - /* 516 */ "query_or_subquery ::= subquery", - /* 517 */ "order_by_clause_opt ::=", - /* 518 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 519 */ "slimit_clause_opt ::=", - /* 520 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 521 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 523 */ "limit_clause_opt ::=", - /* 524 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 525 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 527 */ "subquery ::= NK_LP query_expression NK_RP", - /* 528 */ "subquery ::= NK_LP subquery NK_RP", - /* 529 */ "search_condition ::= common_expression", - /* 530 */ "sort_specification_list ::= sort_specification", - /* 531 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 532 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", - /* 533 */ "ordering_specification_opt ::=", - /* 534 */ "ordering_specification_opt ::= ASC", - /* 535 */ "ordering_specification_opt ::= DESC", - /* 536 */ "null_ordering_opt ::=", - /* 537 */ "null_ordering_opt ::= NULLS FIRST", - /* 538 */ "null_ordering_opt ::= NULLS LAST", + /* 266 */ "func ::= sma_func_name NK_LP expression_list NK_RP", + /* 267 */ "sma_func_name ::= function_name", + /* 268 */ "sma_func_name ::= COUNT", + /* 269 */ "sma_func_name ::= FIRST", + /* 270 */ "sma_func_name ::= LAST", + /* 271 */ "sma_func_name ::= LAST_ROW", + /* 272 */ "sma_stream_opt ::=", + /* 273 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal", + /* 274 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal", + /* 275 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal", + /* 276 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery", + /* 277 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", + /* 278 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name", + /* 279 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", + /* 280 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name", + /* 281 */ "cmd ::= DROP TOPIC exists_opt topic_name", + /* 282 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", + /* 283 */ "cmd ::= DESC full_table_name", + /* 284 */ "cmd ::= DESCRIBE full_table_name", + /* 285 */ "cmd ::= RESET QUERY CACHE", + /* 286 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery", + /* 287 */ "analyze_opt ::=", + /* 288 */ "analyze_opt ::= ANALYZE", + /* 289 */ "explain_options ::=", + /* 290 */ "explain_options ::= explain_options VERBOSE NK_BOOL", + /* 291 */ "explain_options ::= explain_options RATIO NK_FLOAT", + /* 292 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", + /* 293 */ "cmd ::= DROP FUNCTION exists_opt function_name", + /* 294 */ "agg_func_opt ::=", + /* 295 */ "agg_func_opt ::= AGGREGATE", + /* 296 */ "bufsize_opt ::=", + /* 297 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", + /* 298 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery", + /* 299 */ "cmd ::= DROP STREAM exists_opt stream_name", + /* 300 */ "stream_options ::=", + /* 301 */ "stream_options ::= stream_options TRIGGER AT_ONCE", + /* 302 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", + /* 303 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", + /* 304 */ "stream_options ::= stream_options WATERMARK duration_literal", + /* 305 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER", + /* 306 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER", + /* 307 */ "subtable_opt ::=", + /* 308 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP", + /* 309 */ "cmd ::= KILL CONNECTION NK_INTEGER", + /* 310 */ "cmd ::= KILL QUERY NK_STRING", + /* 311 */ "cmd ::= KILL TRANSACTION NK_INTEGER", + /* 312 */ "cmd ::= BALANCE VGROUP", + /* 313 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", + /* 314 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", + /* 315 */ "cmd ::= SPLIT VGROUP NK_INTEGER", + /* 316 */ "dnode_list ::= DNODE NK_INTEGER", + /* 317 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", + /* 318 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", + /* 319 */ "cmd ::= query_or_subquery", + /* 320 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery", + /* 321 */ "cmd ::= INSERT INTO full_table_name query_or_subquery", + /* 322 */ "literal ::= NK_INTEGER", + /* 323 */ "literal ::= NK_FLOAT", + /* 324 */ "literal ::= NK_STRING", + /* 325 */ "literal ::= NK_BOOL", + /* 326 */ "literal ::= TIMESTAMP NK_STRING", + /* 327 */ "literal ::= duration_literal", + /* 328 */ "literal ::= NULL", + /* 329 */ "literal ::= NK_QUESTION", + /* 330 */ "duration_literal ::= NK_VARIABLE", + /* 331 */ "signed ::= NK_INTEGER", + /* 332 */ "signed ::= NK_PLUS NK_INTEGER", + /* 333 */ "signed ::= NK_MINUS NK_INTEGER", + /* 334 */ "signed ::= NK_FLOAT", + /* 335 */ "signed ::= NK_PLUS NK_FLOAT", + /* 336 */ "signed ::= NK_MINUS NK_FLOAT", + /* 337 */ "signed_literal ::= signed", + /* 338 */ "signed_literal ::= NK_STRING", + /* 339 */ "signed_literal ::= NK_BOOL", + /* 340 */ "signed_literal ::= TIMESTAMP NK_STRING", + /* 341 */ "signed_literal ::= duration_literal", + /* 342 */ "signed_literal ::= NULL", + /* 343 */ "signed_literal ::= literal_func", + /* 344 */ "signed_literal ::= NK_QUESTION", + /* 345 */ "literal_list ::= signed_literal", + /* 346 */ "literal_list ::= literal_list NK_COMMA signed_literal", + /* 347 */ "db_name ::= NK_ID", + /* 348 */ "table_name ::= NK_ID", + /* 349 */ "column_name ::= NK_ID", + /* 350 */ "function_name ::= NK_ID", + /* 351 */ "table_alias ::= NK_ID", + /* 352 */ "column_alias ::= NK_ID", + /* 353 */ "user_name ::= NK_ID", + /* 354 */ "topic_name ::= NK_ID", + /* 355 */ "stream_name ::= NK_ID", + /* 356 */ "cgroup_name ::= NK_ID", + /* 357 */ "expr_or_subquery ::= expression", + /* 358 */ "expression ::= literal", + /* 359 */ "expression ::= pseudo_column", + /* 360 */ "expression ::= column_reference", + /* 361 */ "expression ::= function_expression", + /* 362 */ "expression ::= case_when_expression", + /* 363 */ "expression ::= NK_LP expression NK_RP", + /* 364 */ "expression ::= NK_PLUS expr_or_subquery", + /* 365 */ "expression ::= NK_MINUS expr_or_subquery", + /* 366 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery", + /* 367 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery", + /* 368 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery", + /* 369 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery", + /* 370 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery", + /* 371 */ "expression ::= column_reference NK_ARROW NK_STRING", + /* 372 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery", + /* 373 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery", + /* 374 */ "expression_list ::= expr_or_subquery", + /* 375 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery", + /* 376 */ "column_reference ::= column_name", + /* 377 */ "column_reference ::= table_name NK_DOT column_name", + /* 378 */ "pseudo_column ::= ROWTS", + /* 379 */ "pseudo_column ::= TBNAME", + /* 380 */ "pseudo_column ::= table_name NK_DOT TBNAME", + /* 381 */ "pseudo_column ::= QSTART", + /* 382 */ "pseudo_column ::= QEND", + /* 383 */ "pseudo_column ::= QDURATION", + /* 384 */ "pseudo_column ::= WSTART", + /* 385 */ "pseudo_column ::= WEND", + /* 386 */ "pseudo_column ::= WDURATION", + /* 387 */ "pseudo_column ::= IROWTS", + /* 388 */ "pseudo_column ::= QTAGS", + /* 389 */ "function_expression ::= function_name NK_LP expression_list NK_RP", + /* 390 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", + /* 391 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP", + /* 392 */ "function_expression ::= literal_func", + /* 393 */ "literal_func ::= noarg_func NK_LP NK_RP", + /* 394 */ "literal_func ::= NOW", + /* 395 */ "noarg_func ::= NOW", + /* 396 */ "noarg_func ::= TODAY", + /* 397 */ "noarg_func ::= TIMEZONE", + /* 398 */ "noarg_func ::= DATABASE", + /* 399 */ "noarg_func ::= CLIENT_VERSION", + /* 400 */ "noarg_func ::= SERVER_VERSION", + /* 401 */ "noarg_func ::= SERVER_STATUS", + /* 402 */ "noarg_func ::= CURRENT_USER", + /* 403 */ "noarg_func ::= USER", + /* 404 */ "star_func ::= COUNT", + /* 405 */ "star_func ::= FIRST", + /* 406 */ "star_func ::= LAST", + /* 407 */ "star_func ::= LAST_ROW", + /* 408 */ "star_func_para_list ::= NK_STAR", + /* 409 */ "star_func_para_list ::= other_para_list", + /* 410 */ "other_para_list ::= star_func_para", + /* 411 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 412 */ "star_func_para ::= expr_or_subquery", + /* 413 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 414 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END", + /* 415 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END", + /* 416 */ "when_then_list ::= when_then_expr", + /* 417 */ "when_then_list ::= when_then_list when_then_expr", + /* 418 */ "when_then_expr ::= WHEN common_expression THEN common_expression", + /* 419 */ "case_when_else_opt ::=", + /* 420 */ "case_when_else_opt ::= ELSE common_expression", + /* 421 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery", + /* 422 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery", + /* 423 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery", + /* 424 */ "predicate ::= expr_or_subquery IS NULL", + /* 425 */ "predicate ::= expr_or_subquery IS NOT NULL", + /* 426 */ "predicate ::= expr_or_subquery in_op in_predicate_value", + /* 427 */ "compare_op ::= NK_LT", + /* 428 */ "compare_op ::= NK_GT", + /* 429 */ "compare_op ::= NK_LE", + /* 430 */ "compare_op ::= NK_GE", + /* 431 */ "compare_op ::= NK_NE", + /* 432 */ "compare_op ::= NK_EQ", + /* 433 */ "compare_op ::= LIKE", + /* 434 */ "compare_op ::= NOT LIKE", + /* 435 */ "compare_op ::= MATCH", + /* 436 */ "compare_op ::= NMATCH", + /* 437 */ "compare_op ::= CONTAINS", + /* 438 */ "in_op ::= IN", + /* 439 */ "in_op ::= NOT IN", + /* 440 */ "in_predicate_value ::= NK_LP literal_list NK_RP", + /* 441 */ "boolean_value_expression ::= boolean_primary", + /* 442 */ "boolean_value_expression ::= NOT boolean_primary", + /* 443 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 444 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 445 */ "boolean_primary ::= predicate", + /* 446 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 447 */ "common_expression ::= expr_or_subquery", + /* 448 */ "common_expression ::= boolean_value_expression", + /* 449 */ "from_clause_opt ::=", + /* 450 */ "from_clause_opt ::= FROM table_reference_list", + /* 451 */ "table_reference_list ::= table_reference", + /* 452 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 453 */ "table_reference ::= table_primary", + /* 454 */ "table_reference ::= joined_table", + /* 455 */ "table_primary ::= table_name alias_opt", + /* 456 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 457 */ "table_primary ::= subquery alias_opt", + /* 458 */ "table_primary ::= parenthesized_joined_table", + /* 459 */ "alias_opt ::=", + /* 460 */ "alias_opt ::= table_alias", + /* 461 */ "alias_opt ::= AS table_alias", + /* 462 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 463 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 464 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 465 */ "join_type ::=", + /* 466 */ "join_type ::= INNER", + /* 467 */ "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", + /* 468 */ "set_quantifier_opt ::=", + /* 469 */ "set_quantifier_opt ::= DISTINCT", + /* 470 */ "set_quantifier_opt ::= ALL", + /* 471 */ "select_list ::= select_item", + /* 472 */ "select_list ::= select_list NK_COMMA select_item", + /* 473 */ "select_item ::= NK_STAR", + /* 474 */ "select_item ::= common_expression", + /* 475 */ "select_item ::= common_expression column_alias", + /* 476 */ "select_item ::= common_expression AS column_alias", + /* 477 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 478 */ "where_clause_opt ::=", + /* 479 */ "where_clause_opt ::= WHERE search_condition", + /* 480 */ "partition_by_clause_opt ::=", + /* 481 */ "partition_by_clause_opt ::= PARTITION BY partition_list", + /* 482 */ "partition_list ::= partition_item", + /* 483 */ "partition_list ::= partition_list NK_COMMA partition_item", + /* 484 */ "partition_item ::= expr_or_subquery", + /* 485 */ "partition_item ::= expr_or_subquery column_alias", + /* 486 */ "partition_item ::= expr_or_subquery AS column_alias", + /* 487 */ "twindow_clause_opt ::=", + /* 488 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 489 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP", + /* 490 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 491 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 492 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition", + /* 493 */ "sliding_opt ::=", + /* 494 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 495 */ "fill_opt ::=", + /* 496 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 497 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 498 */ "fill_mode ::= NONE", + /* 499 */ "fill_mode ::= PREV", + /* 500 */ "fill_mode ::= NULL", + /* 501 */ "fill_mode ::= LINEAR", + /* 502 */ "fill_mode ::= NEXT", + /* 503 */ "group_by_clause_opt ::=", + /* 504 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 505 */ "group_by_list ::= expr_or_subquery", + /* 506 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery", + /* 507 */ "having_clause_opt ::=", + /* 508 */ "having_clause_opt ::= HAVING search_condition", + /* 509 */ "range_opt ::=", + /* 510 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP", + /* 511 */ "every_opt ::=", + /* 512 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP", + /* 513 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 514 */ "query_simple ::= query_specification", + /* 515 */ "query_simple ::= union_query_expression", + /* 516 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery", + /* 517 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery", + /* 518 */ "query_simple_or_subquery ::= query_simple", + /* 519 */ "query_simple_or_subquery ::= subquery", + /* 520 */ "query_or_subquery ::= query_expression", + /* 521 */ "query_or_subquery ::= subquery", + /* 522 */ "order_by_clause_opt ::=", + /* 523 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 524 */ "slimit_clause_opt ::=", + /* 525 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 526 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 527 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 528 */ "limit_clause_opt ::=", + /* 529 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 530 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 531 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 532 */ "subquery ::= NK_LP query_expression NK_RP", + /* 533 */ "subquery ::= NK_LP subquery NK_RP", + /* 534 */ "search_condition ::= common_expression", + /* 535 */ "sort_specification_list ::= sort_specification", + /* 536 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 537 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt", + /* 538 */ "ordering_specification_opt ::=", + /* 539 */ "ordering_specification_opt ::= ASC", + /* 540 */ "ordering_specification_opt ::= DESC", + /* 541 */ "null_ordering_opt ::=", + /* 542 */ "null_ordering_opt ::= NULLS FIRST", + /* 543 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -2586,59 +2612,59 @@ static void yy_destructor( case 384: /* sliding_opt */ case 385: /* sma_stream_opt */ case 386: /* func */ - case 387: /* query_or_subquery */ - case 390: /* explain_options */ - case 394: /* stream_options */ - case 395: /* subtable_opt */ - case 396: /* expression */ - case 398: /* where_clause_opt */ - case 399: /* signed */ - case 400: /* literal_func */ - case 403: /* expr_or_subquery */ - case 404: /* pseudo_column */ - case 405: /* column_reference */ - case 406: /* function_expression */ - case 407: /* case_when_expression */ - case 412: /* star_func_para */ - case 414: /* case_when_else_opt */ - case 415: /* common_expression */ - case 416: /* when_then_expr */ - case 417: /* predicate */ - case 420: /* in_predicate_value */ - case 421: /* boolean_value_expression */ - case 422: /* boolean_primary */ - case 423: /* from_clause_opt */ - case 424: /* table_reference_list */ - case 425: /* table_reference */ - case 426: /* table_primary */ - case 427: /* joined_table */ - case 429: /* subquery */ - case 430: /* parenthesized_joined_table */ - case 432: /* search_condition */ - case 433: /* query_specification */ - case 437: /* range_opt */ - case 438: /* every_opt */ - case 439: /* fill_opt */ - case 440: /* twindow_clause_opt */ - case 442: /* having_clause_opt */ - case 443: /* select_item */ - case 445: /* partition_item */ - case 448: /* query_expression */ - case 449: /* query_simple */ - case 451: /* slimit_clause_opt */ - case 452: /* limit_clause_opt */ - case 453: /* union_query_expression */ - case 454: /* query_simple_or_subquery */ - case 456: /* sort_specification */ + case 388: /* query_or_subquery */ + case 391: /* explain_options */ + case 395: /* stream_options */ + case 396: /* subtable_opt */ + case 397: /* expression */ + case 399: /* where_clause_opt */ + case 400: /* signed */ + case 401: /* literal_func */ + case 404: /* expr_or_subquery */ + case 405: /* pseudo_column */ + case 406: /* column_reference */ + case 407: /* function_expression */ + case 408: /* case_when_expression */ + case 413: /* star_func_para */ + case 415: /* case_when_else_opt */ + case 416: /* common_expression */ + case 417: /* when_then_expr */ + case 418: /* predicate */ + case 421: /* in_predicate_value */ + case 422: /* boolean_value_expression */ + case 423: /* boolean_primary */ + case 424: /* from_clause_opt */ + case 425: /* table_reference_list */ + case 426: /* table_reference */ + case 427: /* table_primary */ + case 428: /* joined_table */ + case 430: /* subquery */ + case 431: /* parenthesized_joined_table */ + case 433: /* search_condition */ + case 434: /* query_specification */ + case 438: /* range_opt */ + case 439: /* every_opt */ + case 440: /* fill_opt */ + case 441: /* twindow_clause_opt */ + case 443: /* having_clause_opt */ + case 444: /* select_item */ + case 446: /* partition_item */ + case 449: /* query_expression */ + case 450: /* query_simple */ + case 452: /* slimit_clause_opt */ + case 453: /* limit_clause_opt */ + case 454: /* union_query_expression */ + case 455: /* query_simple_or_subquery */ + case 457: /* sort_specification */ { - nodesDestroyNode((yypminor->yy74)); + nodesDestroyNode((yypminor->yy752)); } break; case 325: /* account_options */ case 326: /* alter_account_options */ case 328: /* alter_account_option */ case 343: /* speed_opt */ - case 392: /* bufsize_opt */ + case 393: /* bufsize_opt */ { } @@ -2652,12 +2678,13 @@ static void yy_destructor( case 366: /* table_name */ case 373: /* function_name */ case 381: /* column_alias */ - case 388: /* cgroup_name */ - case 393: /* stream_name */ - case 402: /* table_alias */ - case 408: /* star_func */ - case 410: /* noarg_func */ - case 428: /* alias_opt */ + case 387: /* sma_func_name */ + case 389: /* cgroup_name */ + case 394: /* stream_name */ + case 403: /* table_alias */ + case 409: /* star_func */ + case 411: /* noarg_func */ + case 429: /* alias_opt */ { } @@ -2677,9 +2704,9 @@ static void yy_destructor( case 338: /* force_opt */ case 339: /* not_exists_opt */ case 341: /* exists_opt */ - case 389: /* analyze_opt */ - case 391: /* agg_func_opt */ - case 434: /* set_quantifier_opt */ + case 390: /* analyze_opt */ + case 392: /* agg_func_opt */ + case 435: /* set_quantifier_opt */ { } @@ -2699,20 +2726,20 @@ static void yy_destructor( case 369: /* rollup_func_list */ case 379: /* tag_list_opt */ case 383: /* func_list */ - case 397: /* dnode_list */ - case 401: /* literal_list */ - case 409: /* star_func_para_list */ - case 411: /* other_para_list */ - case 413: /* when_then_list */ - case 435: /* select_list */ - case 436: /* partition_by_clause_opt */ - case 441: /* group_by_clause_opt */ - case 444: /* partition_list */ - case 447: /* group_by_list */ - case 450: /* order_by_clause_opt */ - case 455: /* sort_specification_list */ + case 398: /* dnode_list */ + case 402: /* literal_list */ + case 410: /* star_func_para_list */ + case 412: /* other_para_list */ + case 414: /* when_then_list */ + case 436: /* select_list */ + case 437: /* partition_by_clause_opt */ + case 442: /* group_by_clause_opt */ + case 445: /* partition_list */ + case 448: /* group_by_list */ + case 451: /* order_by_clause_opt */ + case 456: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy874)); + nodesDestroyList((yypminor->yy424)); } break; case 347: /* alter_db_option */ @@ -2726,28 +2753,28 @@ static void yy_destructor( } break; - case 418: /* compare_op */ - case 419: /* in_op */ + case 419: /* compare_op */ + case 420: /* in_op */ { } break; - case 431: /* join_type */ + case 432: /* join_type */ { } break; - case 446: /* fill_mode */ + case 447: /* fill_mode */ { } break; - case 457: /* ordering_specification_opt */ + case 458: /* ordering_specification_opt */ { } break; - case 458: /* null_ordering_opt */ + case 459: /* null_ordering_opt */ { } @@ -3312,279 +3339,284 @@ static const struct { { 382, -12 }, /* (263) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ { 383, -1 }, /* (264) func_list ::= func */ { 383, -3 }, /* (265) func_list ::= func_list NK_COMMA func */ - { 386, -4 }, /* (266) func ::= function_name NK_LP expression_list NK_RP */ - { 385, 0 }, /* (267) sma_stream_opt ::= */ - { 385, -3 }, /* (268) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - { 385, -3 }, /* (269) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ - { 385, -3 }, /* (270) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ - { 324, -6 }, /* (271) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ - { 324, -7 }, /* (272) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 324, -9 }, /* (273) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 324, -7 }, /* (274) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 324, -9 }, /* (275) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 324, -4 }, /* (276) cmd ::= DROP TOPIC exists_opt topic_name */ - { 324, -7 }, /* (277) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 324, -2 }, /* (278) cmd ::= DESC full_table_name */ - { 324, -2 }, /* (279) cmd ::= DESCRIBE full_table_name */ - { 324, -3 }, /* (280) cmd ::= RESET QUERY CACHE */ - { 324, -4 }, /* (281) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ - { 389, 0 }, /* (282) analyze_opt ::= */ - { 389, -1 }, /* (283) analyze_opt ::= ANALYZE */ - { 390, 0 }, /* (284) explain_options ::= */ - { 390, -3 }, /* (285) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 390, -3 }, /* (286) explain_options ::= explain_options RATIO NK_FLOAT */ - { 324, -10 }, /* (287) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 324, -4 }, /* (288) cmd ::= DROP FUNCTION exists_opt function_name */ - { 391, 0 }, /* (289) agg_func_opt ::= */ - { 391, -1 }, /* (290) agg_func_opt ::= AGGREGATE */ - { 392, 0 }, /* (291) bufsize_opt ::= */ - { 392, -2 }, /* (292) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 324, -11 }, /* (293) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ - { 324, -4 }, /* (294) cmd ::= DROP STREAM exists_opt stream_name */ - { 394, 0 }, /* (295) stream_options ::= */ - { 394, -3 }, /* (296) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 394, -3 }, /* (297) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 394, -4 }, /* (298) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 394, -3 }, /* (299) stream_options ::= stream_options WATERMARK duration_literal */ - { 394, -4 }, /* (300) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ - { 394, -3 }, /* (301) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ - { 395, 0 }, /* (302) subtable_opt ::= */ - { 395, -4 }, /* (303) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - { 324, -3 }, /* (304) cmd ::= KILL CONNECTION NK_INTEGER */ - { 324, -3 }, /* (305) cmd ::= KILL QUERY NK_STRING */ - { 324, -3 }, /* (306) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 324, -2 }, /* (307) cmd ::= BALANCE VGROUP */ - { 324, -4 }, /* (308) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 324, -4 }, /* (309) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 324, -3 }, /* (310) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 397, -2 }, /* (311) dnode_list ::= DNODE NK_INTEGER */ - { 397, -3 }, /* (312) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 324, -4 }, /* (313) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 324, -1 }, /* (314) cmd ::= query_or_subquery */ - { 324, -7 }, /* (315) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ - { 324, -4 }, /* (316) cmd ::= INSERT INTO full_table_name query_or_subquery */ - { 327, -1 }, /* (317) literal ::= NK_INTEGER */ - { 327, -1 }, /* (318) literal ::= NK_FLOAT */ - { 327, -1 }, /* (319) literal ::= NK_STRING */ - { 327, -1 }, /* (320) literal ::= NK_BOOL */ - { 327, -2 }, /* (321) literal ::= TIMESTAMP NK_STRING */ - { 327, -1 }, /* (322) literal ::= duration_literal */ - { 327, -1 }, /* (323) literal ::= NULL */ - { 327, -1 }, /* (324) literal ::= NK_QUESTION */ - { 371, -1 }, /* (325) duration_literal ::= NK_VARIABLE */ - { 399, -1 }, /* (326) signed ::= NK_INTEGER */ - { 399, -2 }, /* (327) signed ::= NK_PLUS NK_INTEGER */ - { 399, -2 }, /* (328) signed ::= NK_MINUS NK_INTEGER */ - { 399, -1 }, /* (329) signed ::= NK_FLOAT */ - { 399, -2 }, /* (330) signed ::= NK_PLUS NK_FLOAT */ - { 399, -2 }, /* (331) signed ::= NK_MINUS NK_FLOAT */ - { 360, -1 }, /* (332) signed_literal ::= signed */ - { 360, -1 }, /* (333) signed_literal ::= NK_STRING */ - { 360, -1 }, /* (334) signed_literal ::= NK_BOOL */ - { 360, -2 }, /* (335) signed_literal ::= TIMESTAMP NK_STRING */ - { 360, -1 }, /* (336) signed_literal ::= duration_literal */ - { 360, -1 }, /* (337) signed_literal ::= NULL */ - { 360, -1 }, /* (338) signed_literal ::= literal_func */ - { 360, -1 }, /* (339) signed_literal ::= NK_QUESTION */ - { 401, -1 }, /* (340) literal_list ::= signed_literal */ - { 401, -3 }, /* (341) literal_list ::= literal_list NK_COMMA signed_literal */ - { 335, -1 }, /* (342) db_name ::= NK_ID */ - { 366, -1 }, /* (343) table_name ::= NK_ID */ - { 358, -1 }, /* (344) column_name ::= NK_ID */ - { 373, -1 }, /* (345) function_name ::= NK_ID */ - { 402, -1 }, /* (346) table_alias ::= NK_ID */ - { 381, -1 }, /* (347) column_alias ::= NK_ID */ - { 329, -1 }, /* (348) user_name ::= NK_ID */ - { 336, -1 }, /* (349) topic_name ::= NK_ID */ - { 393, -1 }, /* (350) stream_name ::= NK_ID */ - { 388, -1 }, /* (351) cgroup_name ::= NK_ID */ - { 403, -1 }, /* (352) expr_or_subquery ::= expression */ - { 396, -1 }, /* (353) expression ::= literal */ - { 396, -1 }, /* (354) expression ::= pseudo_column */ - { 396, -1 }, /* (355) expression ::= column_reference */ - { 396, -1 }, /* (356) expression ::= function_expression */ - { 396, -1 }, /* (357) expression ::= case_when_expression */ - { 396, -3 }, /* (358) expression ::= NK_LP expression NK_RP */ - { 396, -2 }, /* (359) expression ::= NK_PLUS expr_or_subquery */ - { 396, -2 }, /* (360) expression ::= NK_MINUS expr_or_subquery */ - { 396, -3 }, /* (361) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ - { 396, -3 }, /* (362) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ - { 396, -3 }, /* (363) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ - { 396, -3 }, /* (364) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ - { 396, -3 }, /* (365) expression ::= expr_or_subquery NK_REM expr_or_subquery */ - { 396, -3 }, /* (366) expression ::= column_reference NK_ARROW NK_STRING */ - { 396, -3 }, /* (367) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ - { 396, -3 }, /* (368) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ - { 363, -1 }, /* (369) expression_list ::= expr_or_subquery */ - { 363, -3 }, /* (370) expression_list ::= expression_list NK_COMMA expr_or_subquery */ - { 405, -1 }, /* (371) column_reference ::= column_name */ - { 405, -3 }, /* (372) column_reference ::= table_name NK_DOT column_name */ - { 404, -1 }, /* (373) pseudo_column ::= ROWTS */ - { 404, -1 }, /* (374) pseudo_column ::= TBNAME */ - { 404, -3 }, /* (375) pseudo_column ::= table_name NK_DOT TBNAME */ - { 404, -1 }, /* (376) pseudo_column ::= QSTART */ - { 404, -1 }, /* (377) pseudo_column ::= QEND */ - { 404, -1 }, /* (378) pseudo_column ::= QDURATION */ - { 404, -1 }, /* (379) pseudo_column ::= WSTART */ - { 404, -1 }, /* (380) pseudo_column ::= WEND */ - { 404, -1 }, /* (381) pseudo_column ::= WDURATION */ - { 404, -1 }, /* (382) pseudo_column ::= IROWTS */ - { 404, -1 }, /* (383) pseudo_column ::= QTAGS */ - { 406, -4 }, /* (384) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 406, -4 }, /* (385) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 406, -6 }, /* (386) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ - { 406, -1 }, /* (387) function_expression ::= literal_func */ - { 400, -3 }, /* (388) literal_func ::= noarg_func NK_LP NK_RP */ - { 400, -1 }, /* (389) literal_func ::= NOW */ - { 410, -1 }, /* (390) noarg_func ::= NOW */ - { 410, -1 }, /* (391) noarg_func ::= TODAY */ - { 410, -1 }, /* (392) noarg_func ::= TIMEZONE */ - { 410, -1 }, /* (393) noarg_func ::= DATABASE */ - { 410, -1 }, /* (394) noarg_func ::= CLIENT_VERSION */ - { 410, -1 }, /* (395) noarg_func ::= SERVER_VERSION */ - { 410, -1 }, /* (396) noarg_func ::= SERVER_STATUS */ - { 410, -1 }, /* (397) noarg_func ::= CURRENT_USER */ - { 410, -1 }, /* (398) noarg_func ::= USER */ - { 408, -1 }, /* (399) star_func ::= COUNT */ - { 408, -1 }, /* (400) star_func ::= FIRST */ - { 408, -1 }, /* (401) star_func ::= LAST */ - { 408, -1 }, /* (402) star_func ::= LAST_ROW */ - { 409, -1 }, /* (403) star_func_para_list ::= NK_STAR */ - { 409, -1 }, /* (404) star_func_para_list ::= other_para_list */ - { 411, -1 }, /* (405) other_para_list ::= star_func_para */ - { 411, -3 }, /* (406) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 412, -1 }, /* (407) star_func_para ::= expr_or_subquery */ - { 412, -3 }, /* (408) star_func_para ::= table_name NK_DOT NK_STAR */ - { 407, -4 }, /* (409) case_when_expression ::= CASE when_then_list case_when_else_opt END */ - { 407, -5 }, /* (410) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ - { 413, -1 }, /* (411) when_then_list ::= when_then_expr */ - { 413, -2 }, /* (412) when_then_list ::= when_then_list when_then_expr */ - { 416, -4 }, /* (413) when_then_expr ::= WHEN common_expression THEN common_expression */ - { 414, 0 }, /* (414) case_when_else_opt ::= */ - { 414, -2 }, /* (415) case_when_else_opt ::= ELSE common_expression */ - { 417, -3 }, /* (416) predicate ::= expr_or_subquery compare_op expr_or_subquery */ - { 417, -5 }, /* (417) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ - { 417, -6 }, /* (418) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ - { 417, -3 }, /* (419) predicate ::= expr_or_subquery IS NULL */ - { 417, -4 }, /* (420) predicate ::= expr_or_subquery IS NOT NULL */ - { 417, -3 }, /* (421) predicate ::= expr_or_subquery in_op in_predicate_value */ - { 418, -1 }, /* (422) compare_op ::= NK_LT */ - { 418, -1 }, /* (423) compare_op ::= NK_GT */ - { 418, -1 }, /* (424) compare_op ::= NK_LE */ - { 418, -1 }, /* (425) compare_op ::= NK_GE */ - { 418, -1 }, /* (426) compare_op ::= NK_NE */ - { 418, -1 }, /* (427) compare_op ::= NK_EQ */ - { 418, -1 }, /* (428) compare_op ::= LIKE */ - { 418, -2 }, /* (429) compare_op ::= NOT LIKE */ - { 418, -1 }, /* (430) compare_op ::= MATCH */ - { 418, -1 }, /* (431) compare_op ::= NMATCH */ - { 418, -1 }, /* (432) compare_op ::= CONTAINS */ - { 419, -1 }, /* (433) in_op ::= IN */ - { 419, -2 }, /* (434) in_op ::= NOT IN */ - { 420, -3 }, /* (435) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 421, -1 }, /* (436) boolean_value_expression ::= boolean_primary */ - { 421, -2 }, /* (437) boolean_value_expression ::= NOT boolean_primary */ - { 421, -3 }, /* (438) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 421, -3 }, /* (439) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 422, -1 }, /* (440) boolean_primary ::= predicate */ - { 422, -3 }, /* (441) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 415, -1 }, /* (442) common_expression ::= expr_or_subquery */ - { 415, -1 }, /* (443) common_expression ::= boolean_value_expression */ - { 423, 0 }, /* (444) from_clause_opt ::= */ - { 423, -2 }, /* (445) from_clause_opt ::= FROM table_reference_list */ - { 424, -1 }, /* (446) table_reference_list ::= table_reference */ - { 424, -3 }, /* (447) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 425, -1 }, /* (448) table_reference ::= table_primary */ - { 425, -1 }, /* (449) table_reference ::= joined_table */ - { 426, -2 }, /* (450) table_primary ::= table_name alias_opt */ - { 426, -4 }, /* (451) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 426, -2 }, /* (452) table_primary ::= subquery alias_opt */ - { 426, -1 }, /* (453) table_primary ::= parenthesized_joined_table */ - { 428, 0 }, /* (454) alias_opt ::= */ - { 428, -1 }, /* (455) alias_opt ::= table_alias */ - { 428, -2 }, /* (456) alias_opt ::= AS table_alias */ - { 430, -3 }, /* (457) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 430, -3 }, /* (458) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 427, -6 }, /* (459) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 431, 0 }, /* (460) join_type ::= */ - { 431, -1 }, /* (461) join_type ::= INNER */ - { 433, -12 }, /* (462) 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 }, /* (463) set_quantifier_opt ::= */ - { 434, -1 }, /* (464) set_quantifier_opt ::= DISTINCT */ - { 434, -1 }, /* (465) set_quantifier_opt ::= ALL */ - { 435, -1 }, /* (466) select_list ::= select_item */ - { 435, -3 }, /* (467) select_list ::= select_list NK_COMMA select_item */ - { 443, -1 }, /* (468) select_item ::= NK_STAR */ - { 443, -1 }, /* (469) select_item ::= common_expression */ - { 443, -2 }, /* (470) select_item ::= common_expression column_alias */ - { 443, -3 }, /* (471) select_item ::= common_expression AS column_alias */ - { 443, -3 }, /* (472) select_item ::= table_name NK_DOT NK_STAR */ - { 398, 0 }, /* (473) where_clause_opt ::= */ - { 398, -2 }, /* (474) where_clause_opt ::= WHERE search_condition */ - { 436, 0 }, /* (475) partition_by_clause_opt ::= */ - { 436, -3 }, /* (476) partition_by_clause_opt ::= PARTITION BY partition_list */ - { 444, -1 }, /* (477) partition_list ::= partition_item */ - { 444, -3 }, /* (478) partition_list ::= partition_list NK_COMMA partition_item */ - { 445, -1 }, /* (479) partition_item ::= expr_or_subquery */ - { 445, -2 }, /* (480) partition_item ::= expr_or_subquery column_alias */ - { 445, -3 }, /* (481) partition_item ::= expr_or_subquery AS column_alias */ - { 440, 0 }, /* (482) twindow_clause_opt ::= */ - { 440, -6 }, /* (483) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 440, -4 }, /* (484) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ - { 440, -6 }, /* (485) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 440, -8 }, /* (486) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 440, -7 }, /* (487) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ - { 384, 0 }, /* (488) sliding_opt ::= */ - { 384, -4 }, /* (489) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 439, 0 }, /* (490) fill_opt ::= */ - { 439, -4 }, /* (491) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 439, -6 }, /* (492) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 446, -1 }, /* (493) fill_mode ::= NONE */ - { 446, -1 }, /* (494) fill_mode ::= PREV */ - { 446, -1 }, /* (495) fill_mode ::= NULL */ - { 446, -1 }, /* (496) fill_mode ::= LINEAR */ - { 446, -1 }, /* (497) fill_mode ::= NEXT */ - { 441, 0 }, /* (498) group_by_clause_opt ::= */ - { 441, -3 }, /* (499) group_by_clause_opt ::= GROUP BY group_by_list */ - { 447, -1 }, /* (500) group_by_list ::= expr_or_subquery */ - { 447, -3 }, /* (501) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ - { 442, 0 }, /* (502) having_clause_opt ::= */ - { 442, -2 }, /* (503) having_clause_opt ::= HAVING search_condition */ - { 437, 0 }, /* (504) range_opt ::= */ - { 437, -6 }, /* (505) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ - { 438, 0 }, /* (506) every_opt ::= */ - { 438, -4 }, /* (507) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 448, -4 }, /* (508) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 449, -1 }, /* (509) query_simple ::= query_specification */ - { 449, -1 }, /* (510) query_simple ::= union_query_expression */ - { 453, -4 }, /* (511) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ - { 453, -3 }, /* (512) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ - { 454, -1 }, /* (513) query_simple_or_subquery ::= query_simple */ - { 454, -1 }, /* (514) query_simple_or_subquery ::= subquery */ - { 387, -1 }, /* (515) query_or_subquery ::= query_expression */ - { 387, -1 }, /* (516) query_or_subquery ::= subquery */ - { 450, 0 }, /* (517) order_by_clause_opt ::= */ - { 450, -3 }, /* (518) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 451, 0 }, /* (519) slimit_clause_opt ::= */ - { 451, -2 }, /* (520) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 451, -4 }, /* (521) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 451, -4 }, /* (522) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 452, 0 }, /* (523) limit_clause_opt ::= */ - { 452, -2 }, /* (524) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 452, -4 }, /* (525) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 452, -4 }, /* (526) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 429, -3 }, /* (527) subquery ::= NK_LP query_expression NK_RP */ - { 429, -3 }, /* (528) subquery ::= NK_LP subquery NK_RP */ - { 432, -1 }, /* (529) search_condition ::= common_expression */ - { 455, -1 }, /* (530) sort_specification_list ::= sort_specification */ - { 455, -3 }, /* (531) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 456, -3 }, /* (532) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ - { 457, 0 }, /* (533) ordering_specification_opt ::= */ - { 457, -1 }, /* (534) ordering_specification_opt ::= ASC */ - { 457, -1 }, /* (535) ordering_specification_opt ::= DESC */ - { 458, 0 }, /* (536) null_ordering_opt ::= */ - { 458, -2 }, /* (537) null_ordering_opt ::= NULLS FIRST */ - { 458, -2 }, /* (538) null_ordering_opt ::= NULLS LAST */ + { 386, -4 }, /* (266) func ::= sma_func_name NK_LP expression_list NK_RP */ + { 387, -1 }, /* (267) sma_func_name ::= function_name */ + { 387, -1 }, /* (268) sma_func_name ::= COUNT */ + { 387, -1 }, /* (269) sma_func_name ::= FIRST */ + { 387, -1 }, /* (270) sma_func_name ::= LAST */ + { 387, -1 }, /* (271) sma_func_name ::= LAST_ROW */ + { 385, 0 }, /* (272) sma_stream_opt ::= */ + { 385, -3 }, /* (273) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + { 385, -3 }, /* (274) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ + { 385, -3 }, /* (275) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ + { 324, -6 }, /* (276) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ + { 324, -7 }, /* (277) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 324, -9 }, /* (278) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 324, -7 }, /* (279) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 324, -9 }, /* (280) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 324, -4 }, /* (281) cmd ::= DROP TOPIC exists_opt topic_name */ + { 324, -7 }, /* (282) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 324, -2 }, /* (283) cmd ::= DESC full_table_name */ + { 324, -2 }, /* (284) cmd ::= DESCRIBE full_table_name */ + { 324, -3 }, /* (285) cmd ::= RESET QUERY CACHE */ + { 324, -4 }, /* (286) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ + { 390, 0 }, /* (287) analyze_opt ::= */ + { 390, -1 }, /* (288) analyze_opt ::= ANALYZE */ + { 391, 0 }, /* (289) explain_options ::= */ + { 391, -3 }, /* (290) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 391, -3 }, /* (291) explain_options ::= explain_options RATIO NK_FLOAT */ + { 324, -10 }, /* (292) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 324, -4 }, /* (293) cmd ::= DROP FUNCTION exists_opt function_name */ + { 392, 0 }, /* (294) agg_func_opt ::= */ + { 392, -1 }, /* (295) agg_func_opt ::= AGGREGATE */ + { 393, 0 }, /* (296) bufsize_opt ::= */ + { 393, -2 }, /* (297) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 324, -11 }, /* (298) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ + { 324, -4 }, /* (299) cmd ::= DROP STREAM exists_opt stream_name */ + { 395, 0 }, /* (300) stream_options ::= */ + { 395, -3 }, /* (301) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 395, -3 }, /* (302) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 395, -4 }, /* (303) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 395, -3 }, /* (304) stream_options ::= stream_options WATERMARK duration_literal */ + { 395, -4 }, /* (305) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ + { 395, -3 }, /* (306) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ + { 396, 0 }, /* (307) subtable_opt ::= */ + { 396, -4 }, /* (308) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + { 324, -3 }, /* (309) cmd ::= KILL CONNECTION NK_INTEGER */ + { 324, -3 }, /* (310) cmd ::= KILL QUERY NK_STRING */ + { 324, -3 }, /* (311) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 324, -2 }, /* (312) cmd ::= BALANCE VGROUP */ + { 324, -4 }, /* (313) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 324, -4 }, /* (314) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 324, -3 }, /* (315) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 398, -2 }, /* (316) dnode_list ::= DNODE NK_INTEGER */ + { 398, -3 }, /* (317) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 324, -4 }, /* (318) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 324, -1 }, /* (319) cmd ::= query_or_subquery */ + { 324, -7 }, /* (320) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ + { 324, -4 }, /* (321) cmd ::= INSERT INTO full_table_name query_or_subquery */ + { 327, -1 }, /* (322) literal ::= NK_INTEGER */ + { 327, -1 }, /* (323) literal ::= NK_FLOAT */ + { 327, -1 }, /* (324) literal ::= NK_STRING */ + { 327, -1 }, /* (325) literal ::= NK_BOOL */ + { 327, -2 }, /* (326) literal ::= TIMESTAMP NK_STRING */ + { 327, -1 }, /* (327) literal ::= duration_literal */ + { 327, -1 }, /* (328) literal ::= NULL */ + { 327, -1 }, /* (329) literal ::= NK_QUESTION */ + { 371, -1 }, /* (330) duration_literal ::= NK_VARIABLE */ + { 400, -1 }, /* (331) signed ::= NK_INTEGER */ + { 400, -2 }, /* (332) signed ::= NK_PLUS NK_INTEGER */ + { 400, -2 }, /* (333) signed ::= NK_MINUS NK_INTEGER */ + { 400, -1 }, /* (334) signed ::= NK_FLOAT */ + { 400, -2 }, /* (335) signed ::= NK_PLUS NK_FLOAT */ + { 400, -2 }, /* (336) signed ::= NK_MINUS NK_FLOAT */ + { 360, -1 }, /* (337) signed_literal ::= signed */ + { 360, -1 }, /* (338) signed_literal ::= NK_STRING */ + { 360, -1 }, /* (339) signed_literal ::= NK_BOOL */ + { 360, -2 }, /* (340) signed_literal ::= TIMESTAMP NK_STRING */ + { 360, -1 }, /* (341) signed_literal ::= duration_literal */ + { 360, -1 }, /* (342) signed_literal ::= NULL */ + { 360, -1 }, /* (343) signed_literal ::= literal_func */ + { 360, -1 }, /* (344) signed_literal ::= NK_QUESTION */ + { 402, -1 }, /* (345) literal_list ::= signed_literal */ + { 402, -3 }, /* (346) literal_list ::= literal_list NK_COMMA signed_literal */ + { 335, -1 }, /* (347) db_name ::= NK_ID */ + { 366, -1 }, /* (348) table_name ::= NK_ID */ + { 358, -1 }, /* (349) column_name ::= NK_ID */ + { 373, -1 }, /* (350) function_name ::= NK_ID */ + { 403, -1 }, /* (351) table_alias ::= NK_ID */ + { 381, -1 }, /* (352) column_alias ::= NK_ID */ + { 329, -1 }, /* (353) user_name ::= NK_ID */ + { 336, -1 }, /* (354) topic_name ::= NK_ID */ + { 394, -1 }, /* (355) stream_name ::= NK_ID */ + { 389, -1 }, /* (356) cgroup_name ::= NK_ID */ + { 404, -1 }, /* (357) expr_or_subquery ::= expression */ + { 397, -1 }, /* (358) expression ::= literal */ + { 397, -1 }, /* (359) expression ::= pseudo_column */ + { 397, -1 }, /* (360) expression ::= column_reference */ + { 397, -1 }, /* (361) expression ::= function_expression */ + { 397, -1 }, /* (362) expression ::= case_when_expression */ + { 397, -3 }, /* (363) expression ::= NK_LP expression NK_RP */ + { 397, -2 }, /* (364) expression ::= NK_PLUS expr_or_subquery */ + { 397, -2 }, /* (365) expression ::= NK_MINUS expr_or_subquery */ + { 397, -3 }, /* (366) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + { 397, -3 }, /* (367) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + { 397, -3 }, /* (368) expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + { 397, -3 }, /* (369) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + { 397, -3 }, /* (370) expression ::= expr_or_subquery NK_REM expr_or_subquery */ + { 397, -3 }, /* (371) expression ::= column_reference NK_ARROW NK_STRING */ + { 397, -3 }, /* (372) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + { 397, -3 }, /* (373) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + { 363, -1 }, /* (374) expression_list ::= expr_or_subquery */ + { 363, -3 }, /* (375) expression_list ::= expression_list NK_COMMA expr_or_subquery */ + { 406, -1 }, /* (376) column_reference ::= column_name */ + { 406, -3 }, /* (377) column_reference ::= table_name NK_DOT column_name */ + { 405, -1 }, /* (378) pseudo_column ::= ROWTS */ + { 405, -1 }, /* (379) pseudo_column ::= TBNAME */ + { 405, -3 }, /* (380) pseudo_column ::= table_name NK_DOT TBNAME */ + { 405, -1 }, /* (381) pseudo_column ::= QSTART */ + { 405, -1 }, /* (382) pseudo_column ::= QEND */ + { 405, -1 }, /* (383) pseudo_column ::= QDURATION */ + { 405, -1 }, /* (384) pseudo_column ::= WSTART */ + { 405, -1 }, /* (385) pseudo_column ::= WEND */ + { 405, -1 }, /* (386) pseudo_column ::= WDURATION */ + { 405, -1 }, /* (387) pseudo_column ::= IROWTS */ + { 405, -1 }, /* (388) pseudo_column ::= QTAGS */ + { 407, -4 }, /* (389) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 407, -4 }, /* (390) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 407, -6 }, /* (391) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ + { 407, -1 }, /* (392) function_expression ::= literal_func */ + { 401, -3 }, /* (393) literal_func ::= noarg_func NK_LP NK_RP */ + { 401, -1 }, /* (394) literal_func ::= NOW */ + { 411, -1 }, /* (395) noarg_func ::= NOW */ + { 411, -1 }, /* (396) noarg_func ::= TODAY */ + { 411, -1 }, /* (397) noarg_func ::= TIMEZONE */ + { 411, -1 }, /* (398) noarg_func ::= DATABASE */ + { 411, -1 }, /* (399) noarg_func ::= CLIENT_VERSION */ + { 411, -1 }, /* (400) noarg_func ::= SERVER_VERSION */ + { 411, -1 }, /* (401) noarg_func ::= SERVER_STATUS */ + { 411, -1 }, /* (402) noarg_func ::= CURRENT_USER */ + { 411, -1 }, /* (403) noarg_func ::= USER */ + { 409, -1 }, /* (404) star_func ::= COUNT */ + { 409, -1 }, /* (405) star_func ::= FIRST */ + { 409, -1 }, /* (406) star_func ::= LAST */ + { 409, -1 }, /* (407) star_func ::= LAST_ROW */ + { 410, -1 }, /* (408) star_func_para_list ::= NK_STAR */ + { 410, -1 }, /* (409) star_func_para_list ::= other_para_list */ + { 412, -1 }, /* (410) other_para_list ::= star_func_para */ + { 412, -3 }, /* (411) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 413, -1 }, /* (412) star_func_para ::= expr_or_subquery */ + { 413, -3 }, /* (413) star_func_para ::= table_name NK_DOT NK_STAR */ + { 408, -4 }, /* (414) case_when_expression ::= CASE when_then_list case_when_else_opt END */ + { 408, -5 }, /* (415) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ + { 414, -1 }, /* (416) when_then_list ::= when_then_expr */ + { 414, -2 }, /* (417) when_then_list ::= when_then_list when_then_expr */ + { 417, -4 }, /* (418) when_then_expr ::= WHEN common_expression THEN common_expression */ + { 415, 0 }, /* (419) case_when_else_opt ::= */ + { 415, -2 }, /* (420) case_when_else_opt ::= ELSE common_expression */ + { 418, -3 }, /* (421) predicate ::= expr_or_subquery compare_op expr_or_subquery */ + { 418, -5 }, /* (422) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + { 418, -6 }, /* (423) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + { 418, -3 }, /* (424) predicate ::= expr_or_subquery IS NULL */ + { 418, -4 }, /* (425) predicate ::= expr_or_subquery IS NOT NULL */ + { 418, -3 }, /* (426) predicate ::= expr_or_subquery in_op in_predicate_value */ + { 419, -1 }, /* (427) compare_op ::= NK_LT */ + { 419, -1 }, /* (428) compare_op ::= NK_GT */ + { 419, -1 }, /* (429) compare_op ::= NK_LE */ + { 419, -1 }, /* (430) compare_op ::= NK_GE */ + { 419, -1 }, /* (431) compare_op ::= NK_NE */ + { 419, -1 }, /* (432) compare_op ::= NK_EQ */ + { 419, -1 }, /* (433) compare_op ::= LIKE */ + { 419, -2 }, /* (434) compare_op ::= NOT LIKE */ + { 419, -1 }, /* (435) compare_op ::= MATCH */ + { 419, -1 }, /* (436) compare_op ::= NMATCH */ + { 419, -1 }, /* (437) compare_op ::= CONTAINS */ + { 420, -1 }, /* (438) in_op ::= IN */ + { 420, -2 }, /* (439) in_op ::= NOT IN */ + { 421, -3 }, /* (440) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 422, -1 }, /* (441) boolean_value_expression ::= boolean_primary */ + { 422, -2 }, /* (442) boolean_value_expression ::= NOT boolean_primary */ + { 422, -3 }, /* (443) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 422, -3 }, /* (444) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 423, -1 }, /* (445) boolean_primary ::= predicate */ + { 423, -3 }, /* (446) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 416, -1 }, /* (447) common_expression ::= expr_or_subquery */ + { 416, -1 }, /* (448) common_expression ::= boolean_value_expression */ + { 424, 0 }, /* (449) from_clause_opt ::= */ + { 424, -2 }, /* (450) from_clause_opt ::= FROM table_reference_list */ + { 425, -1 }, /* (451) table_reference_list ::= table_reference */ + { 425, -3 }, /* (452) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 426, -1 }, /* (453) table_reference ::= table_primary */ + { 426, -1 }, /* (454) table_reference ::= joined_table */ + { 427, -2 }, /* (455) table_primary ::= table_name alias_opt */ + { 427, -4 }, /* (456) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 427, -2 }, /* (457) table_primary ::= subquery alias_opt */ + { 427, -1 }, /* (458) table_primary ::= parenthesized_joined_table */ + { 429, 0 }, /* (459) alias_opt ::= */ + { 429, -1 }, /* (460) alias_opt ::= table_alias */ + { 429, -2 }, /* (461) alias_opt ::= AS table_alias */ + { 431, -3 }, /* (462) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 431, -3 }, /* (463) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 428, -6 }, /* (464) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 432, 0 }, /* (465) join_type ::= */ + { 432, -1 }, /* (466) join_type ::= INNER */ + { 434, -12 }, /* (467) 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 */ + { 435, 0 }, /* (468) set_quantifier_opt ::= */ + { 435, -1 }, /* (469) set_quantifier_opt ::= DISTINCT */ + { 435, -1 }, /* (470) set_quantifier_opt ::= ALL */ + { 436, -1 }, /* (471) select_list ::= select_item */ + { 436, -3 }, /* (472) select_list ::= select_list NK_COMMA select_item */ + { 444, -1 }, /* (473) select_item ::= NK_STAR */ + { 444, -1 }, /* (474) select_item ::= common_expression */ + { 444, -2 }, /* (475) select_item ::= common_expression column_alias */ + { 444, -3 }, /* (476) select_item ::= common_expression AS column_alias */ + { 444, -3 }, /* (477) select_item ::= table_name NK_DOT NK_STAR */ + { 399, 0 }, /* (478) where_clause_opt ::= */ + { 399, -2 }, /* (479) where_clause_opt ::= WHERE search_condition */ + { 437, 0 }, /* (480) partition_by_clause_opt ::= */ + { 437, -3 }, /* (481) partition_by_clause_opt ::= PARTITION BY partition_list */ + { 445, -1 }, /* (482) partition_list ::= partition_item */ + { 445, -3 }, /* (483) partition_list ::= partition_list NK_COMMA partition_item */ + { 446, -1 }, /* (484) partition_item ::= expr_or_subquery */ + { 446, -2 }, /* (485) partition_item ::= expr_or_subquery column_alias */ + { 446, -3 }, /* (486) partition_item ::= expr_or_subquery AS column_alias */ + { 441, 0 }, /* (487) twindow_clause_opt ::= */ + { 441, -6 }, /* (488) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 441, -4 }, /* (489) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ + { 441, -6 }, /* (490) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 441, -8 }, /* (491) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 441, -7 }, /* (492) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ + { 384, 0 }, /* (493) sliding_opt ::= */ + { 384, -4 }, /* (494) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 440, 0 }, /* (495) fill_opt ::= */ + { 440, -4 }, /* (496) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 440, -6 }, /* (497) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 447, -1 }, /* (498) fill_mode ::= NONE */ + { 447, -1 }, /* (499) fill_mode ::= PREV */ + { 447, -1 }, /* (500) fill_mode ::= NULL */ + { 447, -1 }, /* (501) fill_mode ::= LINEAR */ + { 447, -1 }, /* (502) fill_mode ::= NEXT */ + { 442, 0 }, /* (503) group_by_clause_opt ::= */ + { 442, -3 }, /* (504) group_by_clause_opt ::= GROUP BY group_by_list */ + { 448, -1 }, /* (505) group_by_list ::= expr_or_subquery */ + { 448, -3 }, /* (506) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ + { 443, 0 }, /* (507) having_clause_opt ::= */ + { 443, -2 }, /* (508) having_clause_opt ::= HAVING search_condition */ + { 438, 0 }, /* (509) range_opt ::= */ + { 438, -6 }, /* (510) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ + { 439, 0 }, /* (511) every_opt ::= */ + { 439, -4 }, /* (512) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 449, -4 }, /* (513) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 450, -1 }, /* (514) query_simple ::= query_specification */ + { 450, -1 }, /* (515) query_simple ::= union_query_expression */ + { 454, -4 }, /* (516) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ + { 454, -3 }, /* (517) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ + { 455, -1 }, /* (518) query_simple_or_subquery ::= query_simple */ + { 455, -1 }, /* (519) query_simple_or_subquery ::= subquery */ + { 388, -1 }, /* (520) query_or_subquery ::= query_expression */ + { 388, -1 }, /* (521) query_or_subquery ::= subquery */ + { 451, 0 }, /* (522) order_by_clause_opt ::= */ + { 451, -3 }, /* (523) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 452, 0 }, /* (524) slimit_clause_opt ::= */ + { 452, -2 }, /* (525) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 452, -4 }, /* (526) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 452, -4 }, /* (527) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 453, 0 }, /* (528) limit_clause_opt ::= */ + { 453, -2 }, /* (529) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 453, -4 }, /* (530) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 453, -4 }, /* (531) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 430, -3 }, /* (532) subquery ::= NK_LP query_expression NK_RP */ + { 430, -3 }, /* (533) subquery ::= NK_LP subquery NK_RP */ + { 433, -1 }, /* (534) search_condition ::= common_expression */ + { 456, -1 }, /* (535) sort_specification_list ::= sort_specification */ + { 456, -3 }, /* (536) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 457, -3 }, /* (537) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ + { 458, 0 }, /* (538) ordering_specification_opt ::= */ + { 458, -1 }, /* (539) ordering_specification_opt ::= ASC */ + { 458, -1 }, /* (540) ordering_specification_opt ::= DESC */ + { 459, 0 }, /* (541) null_ordering_opt ::= */ + { 459, -2 }, /* (542) null_ordering_opt ::= NULLS FIRST */ + { 459, -2 }, /* (543) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3721,77 +3753,78 @@ static YYACTIONTYPE yy_reduce( yy_destructor(yypParser,327,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy317, &yymsp[-1].minor.yy0, yymsp[0].minor.yy449); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy849, &yymsp[-1].minor.yy0, yymsp[0].minor.yy383); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy849, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy849); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy449 = 1; } +{ yymsp[1].minor.yy383 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy449 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy383 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy869, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy869, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36); -{ yylhsminor.yy531 = yymsp[0].minor.yy531; } - yymsp[0].minor.yy531 = yylhsminor.yy531; +{ yylhsminor.yy869 = yymsp[0].minor.yy869; } + yymsp[0].minor.yy869 = yylhsminor.yy869; break; case 35: /* privileges ::= SUBSCRIBE */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_SUBSCRIBE; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_SUBSCRIBE; } break; case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy531 = yymsp[-2].minor.yy531 | yymsp[0].minor.yy531; } - yymsp[-2].minor.yy531 = yylhsminor.yy531; +{ yylhsminor.yy869 = yymsp[-2].minor.yy869 | yymsp[0].minor.yy869; } + yymsp[-2].minor.yy869 = yylhsminor.yy869; break; case 38: /* priv_type ::= READ */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_READ; } break; case 39: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy869 = PRIVILEGE_TYPE_WRITE; } break; case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy317 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy317 = yylhsminor.yy317; +{ yylhsminor.yy849 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy849 = yylhsminor.yy849; break; case 41: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy317 = yymsp[-2].minor.yy317; } - yymsp[-2].minor.yy317 = yylhsminor.yy317; +{ yylhsminor.yy849 = yymsp[-2].minor.yy849; } + yymsp[-2].minor.yy849 = yylhsminor.yy849; break; case 42: /* priv_level ::= topic_name */ - case 455: /* alias_opt ::= table_alias */ yytestcase(yyruleno==455); -{ yylhsminor.yy317 = yymsp[0].minor.yy317; } - yymsp[0].minor.yy317 = yylhsminor.yy317; + case 267: /* sma_func_name ::= function_name */ yytestcase(yyruleno==267); + case 460: /* alias_opt ::= table_alias */ yytestcase(yyruleno==460); +{ yylhsminor.yy849 = yymsp[0].minor.yy849; } + yymsp[0].minor.yy849 = yylhsminor.yy849; break; case 43: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy317, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy849, NULL); } break; case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0); } break; case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy335); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy57); } break; case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy335); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy57); } break; case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3808,45 +3841,49 @@ 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 342: /* db_name ::= NK_ID */ yytestcase(yyruleno==342); - case 343: /* table_name ::= NK_ID */ yytestcase(yyruleno==343); - case 344: /* column_name ::= NK_ID */ yytestcase(yyruleno==344); - case 345: /* function_name ::= NK_ID */ yytestcase(yyruleno==345); - case 346: /* table_alias ::= NK_ID */ yytestcase(yyruleno==346); - case 347: /* column_alias ::= NK_ID */ yytestcase(yyruleno==347); - case 348: /* user_name ::= NK_ID */ yytestcase(yyruleno==348); - case 349: /* topic_name ::= NK_ID */ yytestcase(yyruleno==349); - case 350: /* stream_name ::= NK_ID */ yytestcase(yyruleno==350); - case 351: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==351); - case 390: /* noarg_func ::= NOW */ yytestcase(yyruleno==390); - case 391: /* noarg_func ::= TODAY */ yytestcase(yyruleno==391); - case 392: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==392); - case 393: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==393); - case 394: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==394); - case 395: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==395); - case 396: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==396); - case 397: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==397); - case 398: /* noarg_func ::= USER */ yytestcase(yyruleno==398); - case 399: /* star_func ::= COUNT */ yytestcase(yyruleno==399); - case 400: /* star_func ::= FIRST */ yytestcase(yyruleno==400); - case 401: /* star_func ::= LAST */ yytestcase(yyruleno==401); - case 402: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==402); -{ yylhsminor.yy317 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy317 = yylhsminor.yy317; + case 268: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==268); + case 269: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==269); + case 270: /* sma_func_name ::= LAST */ yytestcase(yyruleno==270); + case 271: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==271); + case 347: /* db_name ::= NK_ID */ yytestcase(yyruleno==347); + case 348: /* table_name ::= NK_ID */ yytestcase(yyruleno==348); + case 349: /* column_name ::= NK_ID */ yytestcase(yyruleno==349); + case 350: /* function_name ::= NK_ID */ yytestcase(yyruleno==350); + case 351: /* table_alias ::= NK_ID */ yytestcase(yyruleno==351); + case 352: /* column_alias ::= NK_ID */ yytestcase(yyruleno==352); + case 353: /* user_name ::= NK_ID */ yytestcase(yyruleno==353); + case 354: /* topic_name ::= NK_ID */ yytestcase(yyruleno==354); + case 355: /* stream_name ::= NK_ID */ yytestcase(yyruleno==355); + case 356: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==356); + case 395: /* noarg_func ::= NOW */ yytestcase(yyruleno==395); + case 396: /* noarg_func ::= TODAY */ yytestcase(yyruleno==396); + case 397: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==397); + case 398: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==398); + case 399: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==399); + case 400: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==400); + case 401: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==401); + case 402: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==402); + case 403: /* noarg_func ::= USER */ yytestcase(yyruleno==403); + case 404: /* star_func ::= COUNT */ yytestcase(yyruleno==404); + case 405: /* star_func ::= FIRST */ yytestcase(yyruleno==405); + case 406: /* star_func ::= LAST */ yytestcase(yyruleno==406); + case 407: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==407); +{ yylhsminor.yy849 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy849 = yylhsminor.yy849; break; case 54: /* force_opt ::= */ case 73: /* not_exists_opt ::= */ yytestcase(yyruleno==73); case 75: /* exists_opt ::= */ yytestcase(yyruleno==75); - case 282: /* analyze_opt ::= */ yytestcase(yyruleno==282); - case 289: /* agg_func_opt ::= */ yytestcase(yyruleno==289); - case 463: /* set_quantifier_opt ::= */ yytestcase(yyruleno==463); -{ yymsp[1].minor.yy335 = false; } + case 287: /* analyze_opt ::= */ yytestcase(yyruleno==287); + case 294: /* agg_func_opt ::= */ yytestcase(yyruleno==294); + case 468: /* set_quantifier_opt ::= */ yytestcase(yyruleno==468); +{ yymsp[1].minor.yy57 = false; } break; case 55: /* force_opt ::= FORCE */ - case 283: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==283); - case 290: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==290); - case 464: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==464); -{ yymsp[0].minor.yy335 = true; } + case 288: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==288); + case 295: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==295); + case 469: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==469); +{ yymsp[0].minor.yy57 = true; } break; case 56: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3879,206 +3916,206 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy335, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy57, &yymsp[-1].minor.yy849, yymsp[0].minor.yy752); } break; case 67: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; case 68: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } break; case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy752); } break; case 70: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } break; case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy856); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy340); } break; case 72: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy335 = true; } +{ yymsp[-2].minor.yy57 = true; } break; case 74: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy335 = true; } +{ yymsp[-1].minor.yy57 = true; } break; case 76: /* db_options ::= */ -{ yymsp[1].minor.yy74 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy752 = createDefaultDatabaseOptions(pCxt); } break; case 77: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 78: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 79: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 80: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 81: /* db_options ::= db_options DURATION NK_INTEGER */ case 82: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==82); -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 83: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 84: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 85: /* db_options ::= db_options KEEP integer_list */ case 86: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==86); -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_KEEP, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_KEEP, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 87: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 88: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 89: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 90: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 91: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 92: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 93: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 94: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_RETENTIONS, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_RETENTIONS, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 95: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 96: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 97: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 98: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-3].minor.yy752, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 100: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-3].minor.yy752, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 102: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 103: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 104: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 105: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 106: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */ -{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setDatabaseOption(pCxt, yymsp[-2].minor.yy752, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 107: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy74 = createAlterDatabaseOptions(pCxt); yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yylhsminor.yy74, &yymsp[0].minor.yy767); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterDatabaseOptions(pCxt); yylhsminor.yy752 = setAlterDatabaseOption(pCxt, yylhsminor.yy752, &yymsp[0].minor.yy5); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 108: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy74, &yymsp[0].minor.yy767); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy752, &yymsp[0].minor.yy5); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 109: /* alter_db_option ::= BUFFER NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 110: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 111: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 112: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 113: /* alter_db_option ::= KEEP integer_list */ case 114: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==114); -{ yymsp[-1].minor.yy767.type = DB_OPTION_KEEP; yymsp[-1].minor.yy767.pList = yymsp[0].minor.yy874; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_KEEP; yymsp[-1].minor.yy5.pList = yymsp[0].minor.yy424; } break; case 115: /* alter_db_option ::= PAGES NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_PAGES; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_PAGES; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 116: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 117: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_WAL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_WAL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 118: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 119: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 120: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ - case 312: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==312); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; + case 317: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==317); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 121: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy874 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 122: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 123: /* retention_list ::= retention */ case 145: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==145); @@ -4088,14 +4125,14 @@ 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 264: /* func_list ::= func */ yytestcase(yyruleno==264); - case 340: /* literal_list ::= signed_literal */ yytestcase(yyruleno==340); - case 405: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==405); - case 411: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==411); - case 466: /* select_list ::= select_item */ yytestcase(yyruleno==466); - case 477: /* partition_list ::= partition_item */ yytestcase(yyruleno==477); - case 530: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==530); -{ yylhsminor.yy874 = createNodeList(pCxt, yymsp[0].minor.yy74); } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 345: /* literal_list ::= signed_literal */ yytestcase(yyruleno==345); + case 410: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==410); + case 416: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==416); + case 471: /* select_list ::= select_item */ yytestcase(yyruleno==471); + case 482: /* partition_list ::= partition_item */ yytestcase(yyruleno==482); + case 535: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==535); +{ yylhsminor.yy424 = createNodeList(pCxt, yymsp[0].minor.yy752); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 124: /* retention_list ::= retention_list NK_COMMA retention */ case 156: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==156); @@ -4103,271 +4140,271 @@ 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 265: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==265); - case 341: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==341); - case 406: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==406); - case 467: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==467); - case 478: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==478); - case 531: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==531); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; + case 346: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==346); + case 411: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==411); + case 472: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==472); + case 483: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==483); + case 536: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==536); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 125: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy74 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 126: /* speed_opt ::= */ - case 291: /* bufsize_opt ::= */ yytestcase(yyruleno==291); -{ yymsp[1].minor.yy856 = 0; } + case 296: /* bufsize_opt ::= */ yytestcase(yyruleno==296); +{ yymsp[1].minor.yy340 = 0; } break; case 127: /* speed_opt ::= MAX_SPEED NK_INTEGER */ - case 292: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==292); -{ yymsp[-1].minor.yy856 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } + case 297: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==297); +{ yymsp[-1].minor.yy340 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 128: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 130: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==130); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-5].minor.yy74, yymsp[-3].minor.yy874, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy57, yymsp[-5].minor.yy752, yymsp[-3].minor.yy424, yymsp[-1].minor.yy424, yymsp[0].minor.yy752); } break; case 129: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy874); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 131: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy874); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy424); } break; case 132: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } break; case 133: /* cmd ::= ALTER TABLE alter_table_clause */ - case 314: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==314); -{ pCxt->pRootNode = yymsp[0].minor.yy74; } + case 319: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==319); +{ pCxt->pRootNode = yymsp[0].minor.yy752; } break; case 134: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy74); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy752); } break; case 135: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy74 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 136: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 137: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy317); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy752, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy849); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 138: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 139: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 140: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 141: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy317); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy752, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy849); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 142: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 143: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy752, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 144: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy74 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy74, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); } - yymsp[-5].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy752, &yymsp[-2].minor.yy849, yymsp[0].minor.yy752); } + yymsp[-5].minor.yy752 = yylhsminor.yy752; 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 412: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==412); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); } - yymsp[-1].minor.yy874 = yylhsminor.yy874; + case 417: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==417); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-1].minor.yy424, yymsp[0].minor.yy752); } + yymsp[-1].minor.yy424 = yylhsminor.yy424; break; case 147: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy74 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy335, yymsp[-8].minor.yy74, yymsp[-6].minor.yy74, yymsp[-5].minor.yy874, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); } - yymsp[-9].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy57, yymsp[-8].minor.yy752, yymsp[-6].minor.yy752, yymsp[-5].minor.yy424, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } + yymsp[-9].minor.yy752 = yylhsminor.yy752; break; case 150: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy74 = createDropTableClause(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createDropTableClause(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 151: /* specific_cols_opt ::= */ case 182: /* tags_def_opt ::= */ yytestcase(yyruleno==182); case 252: /* tag_list_opt ::= */ yytestcase(yyruleno==252); - case 475: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==475); - case 498: /* group_by_clause_opt ::= */ yytestcase(yyruleno==498); - case 517: /* order_by_clause_opt ::= */ yytestcase(yyruleno==517); -{ yymsp[1].minor.yy874 = NULL; } + case 480: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==480); + case 503: /* group_by_clause_opt ::= */ yytestcase(yyruleno==503); + case 522: /* order_by_clause_opt ::= */ yytestcase(yyruleno==522); +{ yymsp[1].minor.yy424 = NULL; } break; case 152: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy874 = yymsp[-1].minor.yy874; } +{ yymsp[-2].minor.yy424 = yymsp[-1].minor.yy424; } break; case 153: /* full_table_name ::= table_name */ -{ yylhsminor.yy74 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy317, NULL); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy849, NULL); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 154: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy74 = createRealTableNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317, NULL); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createRealTableNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849, NULL); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 157: /* column_def ::= column_name type_name */ -{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898, NULL); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy849, yymsp[0].minor.yy384, NULL); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 158: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-2].minor.yy898, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-2].minor.yy384, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; case 159: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 160: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 161: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 162: /* type_name ::= INT */ case 163: /* type_name ::= INTEGER */ yytestcase(yyruleno==163); -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_INT); } break; case 164: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 165: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 166: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 167: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 168: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 169: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 170: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 171: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 172: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 173: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy384 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 174: /* type_name ::= JSON */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 175: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 176: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 177: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 178: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy384 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 179: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 180: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy384 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 183: /* tags_def_opt ::= tags_def */ - case 404: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==404); -{ yylhsminor.yy874 = yymsp[0].minor.yy874; } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 409: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==409); +{ yylhsminor.yy424 = yymsp[0].minor.yy424; } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 184: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy874 = yymsp[-1].minor.yy874; } +{ yymsp[-3].minor.yy424 = yymsp[-1].minor.yy424; } break; case 185: /* table_options ::= */ -{ yymsp[1].minor.yy74 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy752 = createDefaultTableOptions(pCxt); } break; case 186: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 187: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 188: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 189: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy874); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-4].minor.yy752, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 190: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 191: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_SMA, yymsp[-1].minor.yy874); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-4].minor.yy752, TABLE_OPTION_SMA, yymsp[-1].minor.yy424); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; case 192: /* table_options ::= table_options DELETE_MARK duration_list */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy874); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-2].minor.yy752, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy424); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 193: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy74 = createAlterTableOptions(pCxt); yylhsminor.yy74 = setTableOption(pCxt, yylhsminor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createAlterTableOptions(pCxt); yylhsminor.yy752 = setTableOption(pCxt, yylhsminor.yy752, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 194: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setTableOption(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy5.type, &yymsp[0].minor.yy5.val); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 195: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy767.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 196: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy767.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy5.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy5.val = yymsp[0].minor.yy0; } break; case 197: /* duration_list ::= duration_literal */ - case 369: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==369); -{ yylhsminor.yy874 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 374: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==374); +{ yylhsminor.yy424 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; case 198: /* duration_list ::= duration_list NK_COMMA duration_literal */ - case 370: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==370); -{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); } - yymsp[-2].minor.yy874 = yylhsminor.yy874; + case 375: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==375); +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; case 201: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy317, NULL); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[0].minor.yy849, NULL); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 202: /* rollup_func_name ::= FIRST */ case 203: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==203); case 256: /* tag_item ::= QTAGS */ yytestcase(yyruleno==256); -{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 206: /* col_name ::= column_name */ case 257: /* tag_item ::= column_name */ yytestcase(yyruleno==257); -{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy317); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy849); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 207: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -4382,13 +4419,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 211: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, OP_TYPE_LIKE); } break; case 212: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, OP_TYPE_LIKE); } break; case 213: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy74, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy752, NULL, OP_TYPE_LIKE); } break; case 214: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -4400,7 +4437,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 217: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy752, yymsp[-1].minor.yy752, OP_TYPE_EQUAL); } break; case 218: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -4419,13 +4456,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 224: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy317); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy849); } break; case 225: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy752); } break; case 226: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy752); } break; case 227: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4444,7 +4481,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); } break; case 233: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy752); } break; case 234: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); } @@ -4459,7 +4496,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; case 238: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy752); } break; case 239: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4468,10 +4505,10 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; case 241: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy752, yymsp[-1].minor.yy752, OP_TYPE_EQUAL); } break; case 242: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74, yymsp[-3].minor.yy874); } +{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752, yymsp[-3].minor.yy424); } break; case 243: /* cmd ::= SHOW VNODES NK_INTEGER */ { pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); } @@ -4481,736 +4518,736 @@ static YYACTIONTYPE yy_reduce( break; case 245: /* db_name_cond_opt ::= */ case 250: /* from_db_opt ::= */ yytestcase(yyruleno==250); -{ yymsp[1].minor.yy74 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy752 = createDefaultDatabaseCondValue(pCxt); } break; case 246: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy317); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 247: /* like_pattern_opt ::= */ - case 302: /* subtable_opt ::= */ yytestcase(yyruleno==302); - case 414: /* case_when_else_opt ::= */ yytestcase(yyruleno==414); - case 444: /* from_clause_opt ::= */ yytestcase(yyruleno==444); - case 473: /* where_clause_opt ::= */ yytestcase(yyruleno==473); - case 482: /* twindow_clause_opt ::= */ yytestcase(yyruleno==482); - case 488: /* sliding_opt ::= */ yytestcase(yyruleno==488); - case 490: /* fill_opt ::= */ yytestcase(yyruleno==490); - case 502: /* having_clause_opt ::= */ yytestcase(yyruleno==502); - case 504: /* range_opt ::= */ yytestcase(yyruleno==504); - case 506: /* every_opt ::= */ yytestcase(yyruleno==506); - case 519: /* slimit_clause_opt ::= */ yytestcase(yyruleno==519); - case 523: /* limit_clause_opt ::= */ yytestcase(yyruleno==523); -{ yymsp[1].minor.yy74 = NULL; } + case 307: /* subtable_opt ::= */ yytestcase(yyruleno==307); + case 419: /* case_when_else_opt ::= */ yytestcase(yyruleno==419); + case 449: /* from_clause_opt ::= */ yytestcase(yyruleno==449); + case 478: /* where_clause_opt ::= */ yytestcase(yyruleno==478); + case 487: /* twindow_clause_opt ::= */ yytestcase(yyruleno==487); + case 493: /* sliding_opt ::= */ yytestcase(yyruleno==493); + case 495: /* fill_opt ::= */ yytestcase(yyruleno==495); + case 507: /* having_clause_opt ::= */ yytestcase(yyruleno==507); + case 509: /* range_opt ::= */ yytestcase(yyruleno==509); + case 511: /* every_opt ::= */ yytestcase(yyruleno==511); + case 524: /* slimit_clause_opt ::= */ yytestcase(yyruleno==524); + case 528: /* limit_clause_opt ::= */ yytestcase(yyruleno==528); +{ yymsp[1].minor.yy752 = NULL; } break; case 248: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 249: /* table_name_cond ::= table_name */ -{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy849); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 251: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); } +{ yymsp[-1].minor.yy752 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy849); } break; case 255: /* tag_item ::= TBNAME */ -{ yylhsminor.yy74 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; case 258: /* tag_item ::= column_name column_alias */ -{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy317), &yymsp[0].minor.yy317); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy849), &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; case 259: /* tag_item ::= column_name AS column_alias */ -{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy317), &yymsp[0].minor.yy317); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; +{ yylhsminor.yy752 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy849), &yymsp[0].minor.yy849); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; case 260: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy335, yymsp[-3].minor.yy74, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy57, yymsp[-3].minor.yy752, yymsp[-1].minor.yy752, NULL, yymsp[0].minor.yy752); } break; case 261: /* cmd ::= DROP INDEX exists_opt full_table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy57, yymsp[0].minor.yy752); } break; case 262: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy74 = createIndexOption(pCxt, yymsp[-7].minor.yy874, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } +{ yymsp[-9].minor.yy752 = createIndexOption(pCxt, yymsp[-7].minor.yy424, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; case 263: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy74 = createIndexOption(pCxt, yymsp[-9].minor.yy874, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } +{ yymsp[-11].minor.yy752 = createIndexOption(pCxt, yymsp[-9].minor.yy424, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; - case 266: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-1].minor.yy874); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + case 266: /* func ::= sma_func_name NK_LP expression_list NK_RP */ +{ yylhsminor.yy752 = createFunctionNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-1].minor.yy424); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 267: /* sma_stream_opt ::= */ - case 295: /* stream_options ::= */ yytestcase(yyruleno==295); -{ yymsp[1].minor.yy74 = createStreamOptions(pCxt); } + case 272: /* sma_stream_opt ::= */ + case 300: /* stream_options ::= */ yytestcase(yyruleno==300); +{ yymsp[1].minor.yy752 = createStreamOptions(pCxt); } break; - case 268: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ - case 299: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==299); -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 273: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */ + case 304: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==304); +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 269: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 274: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 270: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 275: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */ +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 271: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); } + case 276: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */ +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy57, &yymsp[-2].minor.yy849, yymsp[0].minor.yy752); } break; - case 272: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, &yymsp[0].minor.yy317, false); } + case 277: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy57, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy849, false); } break; - case 273: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[0].minor.yy317, true); } + case 278: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy57, &yymsp[-5].minor.yy849, &yymsp[0].minor.yy849, true); } break; - case 274: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, yymsp[0].minor.yy74, false); } + case 279: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy57, &yymsp[-3].minor.yy849, yymsp[0].minor.yy752, false); } break; - case 275: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, yymsp[0].minor.yy74, true); } + case 280: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy57, &yymsp[-5].minor.yy849, yymsp[0].minor.yy752, true); } break; - case 276: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } + case 281: /* cmd ::= DROP TOPIC exists_opt topic_name */ +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; - case 277: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); } + case 282: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy57, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849); } break; - case 278: /* cmd ::= DESC full_table_name */ - case 279: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==279); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy74); } + case 283: /* cmd ::= DESC full_table_name */ + case 284: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==284); +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy752); } break; - case 280: /* cmd ::= RESET QUERY CACHE */ + case 285: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; - case 281: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy335, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } + case 286: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */ +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy57, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; - case 284: /* explain_options ::= */ -{ yymsp[1].minor.yy74 = createDefaultExplainOptions(pCxt); } + case 289: /* explain_options ::= */ +{ yymsp[1].minor.yy752 = createDefaultExplainOptions(pCxt); } break; - case 285: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy74 = setExplainVerbose(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 290: /* explain_options ::= explain_options VERBOSE NK_BOOL */ +{ yylhsminor.yy752 = setExplainVerbose(pCxt, yymsp[-2].minor.yy752, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 286: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy74 = setExplainRatio(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 291: /* explain_options ::= explain_options RATIO NK_FLOAT */ +{ yylhsminor.yy752 = setExplainRatio(pCxt, yymsp[-2].minor.yy752, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 287: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-8].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy898, yymsp[0].minor.yy856); } + case 292: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy57, yymsp[-8].minor.yy57, &yymsp[-5].minor.yy849, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy384, yymsp[0].minor.yy340); } break; - case 288: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } + case 293: /* cmd ::= DROP FUNCTION exists_opt function_name */ +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; - case 293: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy335, &yymsp[-7].minor.yy317, yymsp[-4].minor.yy74, yymsp[-6].minor.yy74, yymsp[-3].minor.yy874, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); } + case 298: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */ +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy57, &yymsp[-7].minor.yy849, yymsp[-4].minor.yy752, yymsp[-6].minor.yy752, yymsp[-3].minor.yy424, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } break; - case 294: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); } + case 299: /* cmd ::= DROP STREAM exists_opt stream_name */ +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy57, &yymsp[0].minor.yy849); } break; - case 296: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 301: /* stream_options ::= stream_options TRIGGER AT_ONCE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 297: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy74 = yymsp[-2].minor.yy74; } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 302: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 298: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy74)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-3].minor.yy74; } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + case 303: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ +{ ((SStreamOptions*)yymsp[-3].minor.yy752)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy752)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); yylhsminor.yy752 = yymsp[-3].minor.yy752; } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 300: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ -{ ((SStreamOptions*)yymsp[-3].minor.yy74)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-3].minor.yy74; } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + case 305: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */ +{ ((SStreamOptions*)yymsp[-3].minor.yy752)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy752 = yymsp[-3].minor.yy752; } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 301: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ -{ ((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; + case 306: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */ +{ ((SStreamOptions*)yymsp[-2].minor.yy752)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy752 = yymsp[-2].minor.yy752; } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 303: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ - case 489: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==489); - case 507: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==507); -{ yymsp[-3].minor.yy74 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy74); } + case 308: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */ + case 494: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==494); + case 512: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==512); +{ yymsp[-3].minor.yy752 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy752); } break; - case 304: /* cmd ::= KILL CONNECTION NK_INTEGER */ + case 309: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; - case 305: /* cmd ::= KILL QUERY NK_STRING */ + case 310: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 306: /* cmd ::= KILL TRANSACTION NK_INTEGER */ + case 311: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; - case 307: /* cmd ::= BALANCE VGROUP */ + case 312: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; - case 308: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + case 313: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 309: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy874); } + case 314: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy424); } break; - case 310: /* cmd ::= SPLIT VGROUP NK_INTEGER */ + case 315: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; - case 311: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + case 316: /* dnode_list ::= DNODE NK_INTEGER */ +{ yymsp[-1].minor.yy424 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; - case 313: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); } + case 318: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; - case 315: /* 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); } + case 320: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */ +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy752, yymsp[-2].minor.yy424, yymsp[0].minor.yy752); } break; - case 316: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); } + case 321: /* cmd ::= INSERT INTO full_table_name query_or_subquery */ +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy752, NULL, yymsp[0].minor.yy752); } break; - case 317: /* 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; + case 322: /* literal ::= NK_INTEGER */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 318: /* 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; + case 323: /* literal ::= NK_FLOAT */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 319: /* 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; + case 324: /* literal ::= NK_STRING */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 320: /* 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; + case 325: /* literal ::= NK_BOOL */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 321: /* 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; + case 326: /* literal ::= TIMESTAMP NK_STRING */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 322: /* literal ::= duration_literal */ - case 332: /* signed_literal ::= signed */ yytestcase(yyruleno==332); - case 352: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==352); - case 353: /* expression ::= literal */ yytestcase(yyruleno==353); - case 354: /* expression ::= pseudo_column */ yytestcase(yyruleno==354); - case 355: /* expression ::= column_reference */ yytestcase(yyruleno==355); - case 356: /* expression ::= function_expression */ yytestcase(yyruleno==356); - case 357: /* expression ::= case_when_expression */ yytestcase(yyruleno==357); - case 387: /* function_expression ::= literal_func */ yytestcase(yyruleno==387); - case 436: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==436); - case 440: /* boolean_primary ::= predicate */ yytestcase(yyruleno==440); - case 442: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==442); - case 443: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==443); - case 446: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==446); - case 448: /* table_reference ::= table_primary */ yytestcase(yyruleno==448); - case 449: /* table_reference ::= joined_table */ yytestcase(yyruleno==449); - case 453: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==453); - case 509: /* query_simple ::= query_specification */ yytestcase(yyruleno==509); - case 510: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==510); - case 513: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==513); - case 515: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==515); -{ yylhsminor.yy74 = yymsp[0].minor.yy74; } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 327: /* literal ::= duration_literal */ + case 337: /* signed_literal ::= signed */ yytestcase(yyruleno==337); + case 357: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==357); + case 358: /* expression ::= literal */ yytestcase(yyruleno==358); + case 359: /* expression ::= pseudo_column */ yytestcase(yyruleno==359); + case 360: /* expression ::= column_reference */ yytestcase(yyruleno==360); + case 361: /* expression ::= function_expression */ yytestcase(yyruleno==361); + case 362: /* expression ::= case_when_expression */ yytestcase(yyruleno==362); + case 392: /* function_expression ::= literal_func */ yytestcase(yyruleno==392); + case 441: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==441); + case 445: /* boolean_primary ::= predicate */ yytestcase(yyruleno==445); + case 447: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==447); + case 448: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==448); + case 451: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==451); + case 453: /* table_reference ::= table_primary */ yytestcase(yyruleno==453); + case 454: /* table_reference ::= joined_table */ yytestcase(yyruleno==454); + case 458: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==458); + case 514: /* query_simple ::= query_specification */ yytestcase(yyruleno==514); + case 515: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==515); + case 518: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==518); + case 520: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==520); +{ yylhsminor.yy752 = yymsp[0].minor.yy752; } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 323: /* 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; + case 328: /* literal ::= NULL */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 324: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 329: /* literal ::= NK_QUESTION */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 325: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 330: /* duration_literal ::= NK_VARIABLE */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 326: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 331: /* signed ::= NK_INTEGER */ +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 327: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + case 332: /* signed ::= NK_PLUS NK_INTEGER */ +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; - case 328: /* signed ::= NK_MINUS NK_INTEGER */ + case 333: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 329: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 334: /* signed ::= NK_FLOAT */ +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 330: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + case 335: /* signed ::= NK_PLUS NK_FLOAT */ +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; - case 331: /* signed ::= NK_MINUS NK_FLOAT */ + case 336: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 333: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 338: /* signed_literal ::= NK_STRING */ +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 334: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 339: /* signed_literal ::= NK_BOOL */ +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 335: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } + case 340: /* signed_literal ::= TIMESTAMP NK_STRING */ +{ yymsp[-1].minor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; - case 336: /* signed_literal ::= duration_literal */ - case 338: /* signed_literal ::= literal_func */ yytestcase(yyruleno==338); - case 407: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==407); - case 469: /* select_item ::= common_expression */ yytestcase(yyruleno==469); - case 479: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==479); - case 514: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==514); - case 516: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==516); - case 529: /* search_condition ::= common_expression */ yytestcase(yyruleno==529); -{ yylhsminor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 341: /* signed_literal ::= duration_literal */ + case 343: /* signed_literal ::= literal_func */ yytestcase(yyruleno==343); + case 412: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==412); + case 474: /* select_item ::= common_expression */ yytestcase(yyruleno==474); + case 484: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==484); + case 519: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==519); + case 521: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==521); + case 534: /* search_condition ::= common_expression */ yytestcase(yyruleno==534); +{ yylhsminor.yy752 = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 337: /* signed_literal ::= NULL */ -{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 342: /* signed_literal ::= NULL */ +{ yylhsminor.yy752 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 339: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy74 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 344: /* signed_literal ::= NK_QUESTION */ +{ yylhsminor.yy752 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 358: /* expression ::= NK_LP expression NK_RP */ - case 441: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==441); - case 528: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==528); -{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 363: /* expression ::= NK_LP expression NK_RP */ + case 446: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==446); + case 533: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==533); +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 359: /* expression ::= NK_PLUS expr_or_subquery */ + case 364: /* 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)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 360: /* expression ::= NK_MINUS expr_or_subquery */ + case 365: /* 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)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy752), NULL)); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 361: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */ + case 366: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 362: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */ + case 367: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 363: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */ + case 368: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 364: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */ + case 369: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 365: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */ + case 370: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 366: /* expression ::= column_reference NK_ARROW NK_STRING */ + case 371: /* 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))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 367: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */ + case 372: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 368: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */ + case 373: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 371: /* 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; + case 376: /* column_reference ::= column_name */ +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy849, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy849)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 372: /* 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; + case 377: /* column_reference ::= table_name NK_DOT column_name */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849, createColumnNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy849)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 373: /* pseudo_column ::= ROWTS */ - case 374: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==374); - case 376: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==376); - case 377: /* pseudo_column ::= QEND */ yytestcase(yyruleno==377); - case 378: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==378); - case 379: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==379); - case 380: /* pseudo_column ::= WEND */ yytestcase(yyruleno==380); - case 381: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==381); - case 382: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==382); - case 383: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==383); - case 389: /* literal_func ::= NOW */ yytestcase(yyruleno==389); -{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 378: /* pseudo_column ::= ROWTS */ + case 379: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==379); + case 381: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==381); + case 382: /* pseudo_column ::= QEND */ yytestcase(yyruleno==382); + case 383: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==383); + case 384: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==384); + case 385: /* pseudo_column ::= WEND */ yytestcase(yyruleno==385); + case 386: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==386); + case 387: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==387); + case 388: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==388); + case 394: /* literal_func ::= NOW */ yytestcase(yyruleno==394); +{ yylhsminor.yy752 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 375: /* 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; + case 380: /* pseudo_column ::= table_name NK_DOT TBNAME */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy849)))); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 384: /* function_expression ::= function_name NK_LP expression_list NK_RP */ - case 385: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==385); -{ 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; + case 389: /* function_expression ::= function_name NK_LP expression_list NK_RP */ + case 390: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==390); +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy849, yymsp[-1].minor.yy424)); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 386: /* 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; + case 391: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy384)); } + yymsp[-5].minor.yy752 = yylhsminor.yy752; break; - case 388: /* 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; + case 393: /* literal_func ::= noarg_func NK_LP NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy849, NULL)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 403: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy874 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 408: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy424 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 408: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 472: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==472); -{ yylhsminor.yy74 = createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 413: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 477: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==477); +{ yylhsminor.yy752 = createColumnNode(pCxt, &yymsp[-2].minor.yy849, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 409: /* 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; + case 414: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy424, yymsp[-1].minor.yy752)); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 410: /* 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; + case 415: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-2].minor.yy424, yymsp[-1].minor.yy752)); } + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; - case 413: /* 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)); } + case 418: /* when_then_expr ::= WHEN common_expression THEN common_expression */ +{ yymsp[-3].minor.yy752 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752)); } break; - case 415: /* case_when_else_opt ::= ELSE common_expression */ -{ yymsp[-1].minor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); } + case 420: /* case_when_else_opt ::= ELSE common_expression */ +{ yymsp[-1].minor.yy752 = releaseRawExprNode(pCxt, yymsp[0].minor.yy752); } break; - case 416: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ - case 421: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==421); + case 421: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */ + case 426: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==426); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy20, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy620, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 417: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */ + case 422: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy752), releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-4].minor.yy74 = yylhsminor.yy74; + yymsp[-4].minor.yy752 = yylhsminor.yy752; break; - case 418: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */ + case 423: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-5].minor.yy74 = yylhsminor.yy74; + yymsp[-5].minor.yy752 = yylhsminor.yy752; break; - case 419: /* predicate ::= expr_or_subquery IS NULL */ + case 424: /* 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)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), NULL)); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 420: /* predicate ::= expr_or_subquery IS NOT NULL */ + case 425: /* 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)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL)); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 422: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; } + case 427: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy620 = OP_TYPE_LOWER_THAN; } break; - case 423: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_THAN; } + case 428: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy620 = OP_TYPE_GREATER_THAN; } break; - case 424: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_EQUAL; } + case 429: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy620 = OP_TYPE_LOWER_EQUAL; } break; - case 425: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_EQUAL; } + case 430: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy620 = OP_TYPE_GREATER_EQUAL; } break; - case 426: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy20 = OP_TYPE_NOT_EQUAL; } + case 431: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy620 = OP_TYPE_NOT_EQUAL; } break; - case 427: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy20 = OP_TYPE_EQUAL; } + case 432: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy620 = OP_TYPE_EQUAL; } break; - case 428: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy20 = OP_TYPE_LIKE; } + case 433: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy620 = OP_TYPE_LIKE; } break; - case 429: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_LIKE; } + case 434: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy620 = OP_TYPE_NOT_LIKE; } break; - case 430: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy20 = OP_TYPE_MATCH; } + case 435: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy620 = OP_TYPE_MATCH; } break; - case 431: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy20 = OP_TYPE_NMATCH; } + case 436: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy620 = OP_TYPE_NMATCH; } break; - case 432: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy20 = OP_TYPE_JSON_CONTAINS; } + case 437: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy620 = OP_TYPE_JSON_CONTAINS; } break; - case 433: /* in_op ::= IN */ -{ yymsp[0].minor.yy20 = OP_TYPE_IN; } + case 438: /* in_op ::= IN */ +{ yymsp[0].minor.yy620 = OP_TYPE_IN; } break; - case 434: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; } + case 439: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy620 = OP_TYPE_NOT_IN; } break; - case 435: /* 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; + case 440: /* in_predicate_value ::= NK_LP literal_list NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 437: /* boolean_value_expression ::= NOT boolean_primary */ + case 442: /* 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)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy752), NULL)); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 438: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 443: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 439: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 444: /* 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); - yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy752); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy752); + yylhsminor.yy752 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 445: /* from_clause_opt ::= FROM table_reference_list */ - case 474: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==474); - case 503: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==503); -{ yymsp[-1].minor.yy74 = yymsp[0].minor.yy74; } + case 450: /* from_clause_opt ::= FROM table_reference_list */ + case 479: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==479); + case 508: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==508); +{ yymsp[-1].minor.yy752 = yymsp[0].minor.yy752; } break; - case 447: /* 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; + case 452: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy752 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy752, yymsp[0].minor.yy752, NULL); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 450: /* 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; + case 455: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy752 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 451: /* 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; + case 456: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy752 = createRealTableNode(pCxt, &yymsp[-3].minor.yy849, &yymsp[-1].minor.yy849, &yymsp[0].minor.yy849); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 452: /* 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; + case 457: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy752 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752), &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 454: /* alias_opt ::= */ -{ yymsp[1].minor.yy317 = nil_token; } + case 459: /* alias_opt ::= */ +{ yymsp[1].minor.yy849 = nil_token; } break; - case 456: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy317 = yymsp[0].minor.yy317; } + case 461: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy849 = yymsp[0].minor.yy849; } break; - case 457: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 458: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==458); -{ yymsp[-2].minor.yy74 = yymsp[-1].minor.yy74; } + case 462: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 463: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==463); +{ yymsp[-2].minor.yy752 = yymsp[-1].minor.yy752; } break; - case 459: /* 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; + case 464: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy752 = createJoinTableNode(pCxt, yymsp[-4].minor.yy332, yymsp[-5].minor.yy752, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-5].minor.yy752 = yylhsminor.yy752; break; - case 460: /* join_type ::= */ -{ yymsp[1].minor.yy630 = JOIN_TYPE_INNER; } + case 465: /* join_type ::= */ +{ yymsp[1].minor.yy332 = JOIN_TYPE_INNER; } break; - case 461: /* join_type ::= INNER */ -{ yymsp[0].minor.yy630 = JOIN_TYPE_INNER; } + case 466: /* join_type ::= INNER */ +{ yymsp[0].minor.yy332 = JOIN_TYPE_INNER; } break; - case 462: /* 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 467: /* 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); - yymsp[-11].minor.yy74 = addPartitionByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-6].minor.yy874); - yymsp[-11].minor.yy74 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy74, yymsp[-2].minor.yy74); - yymsp[-11].minor.yy74 = addGroupByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-1].minor.yy874); - yymsp[-11].minor.yy74 = addHavingClause(pCxt, yymsp[-11].minor.yy74, yymsp[0].minor.yy74); - yymsp[-11].minor.yy74 = addRangeClause(pCxt, yymsp[-11].minor.yy74, yymsp[-5].minor.yy74); - yymsp[-11].minor.yy74 = addEveryClause(pCxt, yymsp[-11].minor.yy74, yymsp[-4].minor.yy74); - yymsp[-11].minor.yy74 = addFillClause(pCxt, yymsp[-11].minor.yy74, yymsp[-3].minor.yy74); + yymsp[-11].minor.yy752 = createSelectStmt(pCxt, yymsp[-10].minor.yy57, yymsp[-9].minor.yy424, yymsp[-8].minor.yy752); + yymsp[-11].minor.yy752 = addWhereClause(pCxt, yymsp[-11].minor.yy752, yymsp[-7].minor.yy752); + yymsp[-11].minor.yy752 = addPartitionByClause(pCxt, yymsp[-11].minor.yy752, yymsp[-6].minor.yy424); + yymsp[-11].minor.yy752 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy752, yymsp[-2].minor.yy752); + yymsp[-11].minor.yy752 = addGroupByClause(pCxt, yymsp[-11].minor.yy752, yymsp[-1].minor.yy424); + yymsp[-11].minor.yy752 = addHavingClause(pCxt, yymsp[-11].minor.yy752, yymsp[0].minor.yy752); + yymsp[-11].minor.yy752 = addRangeClause(pCxt, yymsp[-11].minor.yy752, yymsp[-5].minor.yy752); + yymsp[-11].minor.yy752 = addEveryClause(pCxt, yymsp[-11].minor.yy752, yymsp[-4].minor.yy752); + yymsp[-11].minor.yy752 = addFillClause(pCxt, yymsp[-11].minor.yy752, yymsp[-3].minor.yy752); } break; - case 465: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy335 = false; } + case 470: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy57 = false; } break; - case 468: /* select_item ::= NK_STAR */ -{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy74 = yylhsminor.yy74; + case 473: /* select_item ::= NK_STAR */ +{ yylhsminor.yy752 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy752 = yylhsminor.yy752; break; - case 470: /* select_item ::= common_expression column_alias */ - case 480: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==480); -{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); } - yymsp[-1].minor.yy74 = yylhsminor.yy74; + case 475: /* select_item ::= common_expression column_alias */ + case 485: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==485); +{ yylhsminor.yy752 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752), &yymsp[0].minor.yy849); } + yymsp[-1].minor.yy752 = yylhsminor.yy752; break; - case 471: /* select_item ::= common_expression AS column_alias */ - case 481: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==481); -{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), &yymsp[0].minor.yy317); } - yymsp[-2].minor.yy74 = yylhsminor.yy74; + case 476: /* select_item ::= common_expression AS column_alias */ + case 486: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==486); +{ yylhsminor.yy752 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), &yymsp[0].minor.yy849); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 476: /* partition_by_clause_opt ::= PARTITION BY partition_list */ - case 499: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==499); - case 518: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==518); -{ yymsp[-2].minor.yy874 = yymsp[0].minor.yy874; } + case 481: /* partition_by_clause_opt ::= PARTITION BY partition_list */ + case 504: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==504); + case 523: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==523); +{ yymsp[-2].minor.yy424 = yymsp[0].minor.yy424; } break; - case 483: /* 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)); } + case 488: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy752 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } break; - case 484: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ -{ yymsp[-3].minor.yy74 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); } + case 489: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */ +{ yymsp[-3].minor.yy752 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } break; - case 485: /* 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); } + case 490: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy752 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), NULL, yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; - case 486: /* 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); } + case 491: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy752 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy752), releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), yymsp[-1].minor.yy752, yymsp[0].minor.yy752); } break; - case 487: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ -{ yymsp[-6].minor.yy74 = createEventWindowNode(pCxt, yymsp[-3].minor.yy74, yymsp[0].minor.yy74); } + case 492: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */ +{ yymsp[-6].minor.yy752 = createEventWindowNode(pCxt, yymsp[-3].minor.yy752, yymsp[0].minor.yy752); } break; - case 491: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy74 = createFillNode(pCxt, yymsp[-1].minor.yy828, NULL); } + case 496: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy752 = createFillNode(pCxt, yymsp[-1].minor.yy214, NULL); } break; - case 492: /* 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)); } + case 497: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy752 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy424)); } break; - case 493: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy828 = FILL_MODE_NONE; } + case 498: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy214 = FILL_MODE_NONE; } break; - case 494: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy828 = FILL_MODE_PREV; } + case 499: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy214 = FILL_MODE_PREV; } break; - case 495: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy828 = FILL_MODE_NULL; } + case 500: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy214 = FILL_MODE_NULL; } break; - case 496: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy828 = FILL_MODE_LINEAR; } + case 501: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy214 = FILL_MODE_LINEAR; } break; - case 497: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy828 = FILL_MODE_NEXT; } + case 502: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy214 = FILL_MODE_NEXT; } break; - case 500: /* group_by_list ::= expr_or_subquery */ -{ yylhsminor.yy874 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); } - yymsp[0].minor.yy874 = yylhsminor.yy874; + case 505: /* group_by_list ::= expr_or_subquery */ +{ yylhsminor.yy424 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } + yymsp[0].minor.yy424 = yylhsminor.yy424; break; - case 501: /* 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; + case 506: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */ +{ yylhsminor.yy424 = addNodeToList(pCxt, yymsp[-2].minor.yy424, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy752))); } + yymsp[-2].minor.yy424 = yylhsminor.yy424; break; - case 505: /* 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)); } + case 510: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */ +{ yymsp[-5].minor.yy752 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy752), releaseRawExprNode(pCxt, yymsp[-1].minor.yy752)); } break; - case 508: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 513: /* 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); - yylhsminor.yy74 = addLimitClause(pCxt, yylhsminor.yy74, yymsp[0].minor.yy74); + yylhsminor.yy752 = addOrderByClause(pCxt, yymsp[-3].minor.yy752, yymsp[-2].minor.yy424); + yylhsminor.yy752 = addSlimitClause(pCxt, yylhsminor.yy752, yymsp[-1].minor.yy752); + yylhsminor.yy752 = addLimitClause(pCxt, yylhsminor.yy752, yymsp[0].minor.yy752); } - yymsp[-3].minor.yy74 = yylhsminor.yy74; + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 511: /* 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; + case 516: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */ +{ yylhsminor.yy752 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-3].minor.yy752 = yylhsminor.yy752; break; - case 512: /* 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; + case 517: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */ +{ yylhsminor.yy752 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy752, yymsp[0].minor.yy752); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 520: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 524: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==524); -{ yymsp[-1].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 525: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 529: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==529); +{ yymsp[-1].minor.yy752 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 521: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 525: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==525); -{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 526: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 530: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==530); +{ yymsp[-3].minor.yy752 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==526); -{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 527: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 531: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==531); +{ yymsp[-3].minor.yy752 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 527: /* 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; + case 532: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy752 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy752); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 532: /* 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; + case 537: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy752 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy752), yymsp[-1].minor.yy538, yymsp[0].minor.yy777); } + yymsp[-2].minor.yy752 = yylhsminor.yy752; break; - case 533: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy326 = ORDER_ASC; } + case 538: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy538 = ORDER_ASC; } break; - case 534: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy326 = ORDER_ASC; } + case 539: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy538 = ORDER_ASC; } break; - case 535: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy326 = ORDER_DESC; } + case 540: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy538 = ORDER_DESC; } break; - case 536: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; } + case 541: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy777 = NULL_ORDER_DEFAULT; } break; - case 537: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; } + case 542: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy777 = NULL_ORDER_FIRST; } break; - case 538: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy109 = NULL_ORDER_LAST; } + case 543: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy777 = NULL_ORDER_LAST; } break; default: break; From a21810814033fdf13ae82e6b18bef80ad20649aa Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Sat, 17 Dec 2022 19:12:30 +0800 Subject: [PATCH 23/64] fix: allow to rollback sync log buffer beyond startIndex with refill --- source/libs/sync/src/syncPipeline.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/source/libs/sync/src/syncPipeline.c b/source/libs/sync/src/syncPipeline.c index 7bd8d75dd1..675ffca734 100644 --- a/source/libs/sync/src/syncPipeline.c +++ b/source/libs/sync/src/syncPipeline.c @@ -275,6 +275,8 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt SyncIndex index = pEntry->index; SyncIndex prevIndex = pEntry->index - 1; SyncTerm lastMatchTerm = syncLogBufferGetLastMatchTerm(pBuf); + SSyncRaftEntry* pExist = NULL; + bool inBuf = true; if (index <= pBuf->commitIndex) { sTrace("vgId:%d, already committed. index: %" PRId64 ", term: %" PRId64 ". log buffer: [%" PRId64 " %" PRId64 @@ -306,10 +308,9 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt } // check current in buffer - SSyncRaftEntry* pExist = pBuf->entries[index % pBuf->size].pItem; + pExist = syncLogBufferGetOneEntry(pBuf, pNode, index, &inBuf); if (pExist != NULL) { ASSERT(pEntry->index == pExist->index); - if (pEntry->term != pExist->term) { (void)syncLogBufferRollback(pBuf, pNode, index); } else { @@ -317,14 +318,15 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt " %" PRId64 " %" PRId64 ", %" PRId64 ")", pNode->vgId, pEntry->index, pEntry->term, pBuf->startIndex, pBuf->commitIndex, pBuf->matchIndex, pBuf->endIndex); - SyncTerm existPrevTerm = pBuf->entries[index % pBuf->size].prevLogTerm; - ASSERT(pEntry->term == pExist->term && prevTerm == existPrevTerm); + SyncTerm existPrevTerm = syncLogReplMgrGetPrevLogTerm(NULL, pNode, index); + ASSERT(pEntry->term == pExist->term && (pEntry->index > pBuf->matchIndex || prevTerm == existPrevTerm)); ret = 0; goto _out; } } // update + ASSERT(pBuf->entries[index % pBuf->size].pItem == NULL); SSyncLogBufEntry tmp = {.pItem = pEntry, .prevLogIndex = prevIndex, .prevLogTerm = prevTerm}; pEntry = NULL; pBuf->entries[index % pBuf->size] = tmp; @@ -337,6 +339,10 @@ int32_t syncLogBufferAccept(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt _out: syncEntryDestroy(pEntry); + if (!inBuf) { + syncEntryDestroy(pExist); + pExist = NULL; + } syncLogBufferValidate(pBuf); taosThreadMutexUnlock(&pBuf->mutex); return ret; @@ -1003,6 +1009,16 @@ int32_t syncLogBufferRollback(SSyncLogBuffer* pBuf, SSyncNode* pNode, SyncIndex lastVer = pNode->pLogStore->syncLogLastIndex(pNode->pLogStore); ASSERT(toIndex == lastVer + 1); + // refill buffer on need + if (toIndex <= pBuf->startIndex) { + int32_t ret = syncLogBufferInitWithoutLock(pBuf, pNode); + if (ret < 0) { + sError("vgId:%d, failed to refill sync log buffer since %s", pNode->vgId, terrstr()); + return -1; + } + } + + ASSERT(pBuf->endIndex == toIndex); syncLogBufferValidate(pBuf); return 0; } From a59e98b8b4065b12772e0000388c31487fb212d8 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 19 Dec 2022 11:17:51 +0800 Subject: [PATCH 24/64] fix(tdb): rollback in-memory pages --- source/libs/tdb/src/db/tdbPCache.c | 28 +++++++++++++++++++++++++++- source/libs/tdb/src/db/tdbPager.c | 1 + source/libs/tdb/src/inc/tdbInt.h | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/source/libs/tdb/src/db/tdbPCache.c b/source/libs/tdb/src/db/tdbPCache.c index b67fe562eb..30dcb05f80 100644 --- a/source/libs/tdb/src/db/tdbPCache.c +++ b/source/libs/tdb/src/db/tdbPCache.c @@ -192,6 +192,28 @@ SPage *tdbPCacheFetch(SPCache *pCache, const SPgid *pPgid, TXN *pTxn) { return pPage; } +void tdbPCacheMarkFree(SPCache *pCache, SPage *pPage) { + tdbPCacheLock(pCache); + tdbPCacheRemovePageFromHash(pCache, pPage); + pPage->isFree = 1; + tdbPCacheUnlock(pCache); +} + +static void tdbPCacheFreePage(SPCache *pCache, SPage *pPage) { + if (pPage->id < pCache->nPages) { + pPage->pFreeNext = pCache->pFree; + pCache->pFree = pPage; + pPage->isFree = 0; + ++pCache->nFree; + tdbTrace("pcache/free page %p/%d/%d", pPage, TDB_PAGE_PGNO(pPage), pPage->id); + } else { + tdbTrace("pcache destroy page: %p/%d/%d", pPage, TDB_PAGE_PGNO(pPage), pPage->id); + + tdbPCacheRemovePageFromHash(pCache, pPage); + tdbPageDestroy(pPage, tdbDefaultFree, NULL); + } +} + void tdbPCacheRelease(SPCache *pCache, SPage *pPage, TXN *pTxn) { i32 nRef; @@ -209,7 +231,11 @@ void tdbPCacheRelease(SPCache *pCache, SPage *pPage, TXN *pTxn) { // nRef = tdbGetPageRef(pPage); // if (nRef == 0) { if (pPage->isLocal) { - tdbPCacheUnpinPage(pCache, pPage); + if (!pPage->isFree) { + tdbPCacheUnpinPage(pCache, pPage); + } else { + tdbPCacheFreePage(pCache, pPage); + } } else { if (TDB_TXN_IS_WRITE(pTxn)) { // remove from hash diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index 648e99d6a5..23ab0004b9 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -524,6 +524,7 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { tRBTreeDrop(&pPager->rbt, (SRBTreeNode *)pPage); hashset_remove(pTxn->jPageSet, (void *)((long)TDB_PAGE_PGNO(pPage))); + tdbPCacheMarkFree(pPager->pCache, pPage); tdbPCacheRelease(pPager->pCache, pPage, pTxn); } diff --git a/source/libs/tdb/src/inc/tdbInt.h b/source/libs/tdb/src/inc/tdbInt.h index 055a8a1062..ab9c5995ec 100644 --- a/source/libs/tdb/src/inc/tdbInt.h +++ b/source/libs/tdb/src/inc/tdbInt.h @@ -205,6 +205,7 @@ int tdbPagerRollback(SPager *pPager); u8 isAnchor; \ u8 isLocal; \ u8 isDirty; \ + u8 isFree; \ volatile i32 nRef; \ i32 id; \ SPage *pFreeNext; \ @@ -222,6 +223,7 @@ int tdbPCacheClose(SPCache *pCache); int tdbPCacheAlter(SPCache *pCache, int32_t nPage); SPage *tdbPCacheFetch(SPCache *pCache, const SPgid *pPgid, TXN *pTxn); void tdbPCacheRelease(SPCache *pCache, SPage *pPage, TXN *pTxn); +void tdbPCacheMarkFree(SPCache *pCache, SPage *pPage); int tdbPCacheGetPageSize(SPCache *pCache); // tdbPage.c ==================================== From 4e4b3661ea1bbd809f3c8407d0b77163d0cb11eb Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 19 Dec 2022 11:39:41 +0800 Subject: [PATCH 25/64] fix(tdb): rollback in-memory pages --- source/libs/tdb/src/db/tdbPCache.c | 28 +++++++++++++++++++++++++++- source/libs/tdb/src/db/tdbPager.c | 1 + source/libs/tdb/src/inc/tdbInt.h | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/source/libs/tdb/src/db/tdbPCache.c b/source/libs/tdb/src/db/tdbPCache.c index b67fe562eb..30dcb05f80 100644 --- a/source/libs/tdb/src/db/tdbPCache.c +++ b/source/libs/tdb/src/db/tdbPCache.c @@ -192,6 +192,28 @@ SPage *tdbPCacheFetch(SPCache *pCache, const SPgid *pPgid, TXN *pTxn) { return pPage; } +void tdbPCacheMarkFree(SPCache *pCache, SPage *pPage) { + tdbPCacheLock(pCache); + tdbPCacheRemovePageFromHash(pCache, pPage); + pPage->isFree = 1; + tdbPCacheUnlock(pCache); +} + +static void tdbPCacheFreePage(SPCache *pCache, SPage *pPage) { + if (pPage->id < pCache->nPages) { + pPage->pFreeNext = pCache->pFree; + pCache->pFree = pPage; + pPage->isFree = 0; + ++pCache->nFree; + tdbTrace("pcache/free page %p/%d/%d", pPage, TDB_PAGE_PGNO(pPage), pPage->id); + } else { + tdbTrace("pcache destroy page: %p/%d/%d", pPage, TDB_PAGE_PGNO(pPage), pPage->id); + + tdbPCacheRemovePageFromHash(pCache, pPage); + tdbPageDestroy(pPage, tdbDefaultFree, NULL); + } +} + void tdbPCacheRelease(SPCache *pCache, SPage *pPage, TXN *pTxn) { i32 nRef; @@ -209,7 +231,11 @@ void tdbPCacheRelease(SPCache *pCache, SPage *pPage, TXN *pTxn) { // nRef = tdbGetPageRef(pPage); // if (nRef == 0) { if (pPage->isLocal) { - tdbPCacheUnpinPage(pCache, pPage); + if (!pPage->isFree) { + tdbPCacheUnpinPage(pCache, pPage); + } else { + tdbPCacheFreePage(pCache, pPage); + } } else { if (TDB_TXN_IS_WRITE(pTxn)) { // remove from hash diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index 648e99d6a5..23ab0004b9 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -524,6 +524,7 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { tRBTreeDrop(&pPager->rbt, (SRBTreeNode *)pPage); hashset_remove(pTxn->jPageSet, (void *)((long)TDB_PAGE_PGNO(pPage))); + tdbPCacheMarkFree(pPager->pCache, pPage); tdbPCacheRelease(pPager->pCache, pPage, pTxn); } diff --git a/source/libs/tdb/src/inc/tdbInt.h b/source/libs/tdb/src/inc/tdbInt.h index 055a8a1062..ab9c5995ec 100644 --- a/source/libs/tdb/src/inc/tdbInt.h +++ b/source/libs/tdb/src/inc/tdbInt.h @@ -205,6 +205,7 @@ int tdbPagerRollback(SPager *pPager); u8 isAnchor; \ u8 isLocal; \ u8 isDirty; \ + u8 isFree; \ volatile i32 nRef; \ i32 id; \ SPage *pFreeNext; \ @@ -222,6 +223,7 @@ int tdbPCacheClose(SPCache *pCache); int tdbPCacheAlter(SPCache *pCache, int32_t nPage); SPage *tdbPCacheFetch(SPCache *pCache, const SPgid *pPgid, TXN *pTxn); void tdbPCacheRelease(SPCache *pCache, SPage *pPage, TXN *pTxn); +void tdbPCacheMarkFree(SPCache *pCache, SPage *pPage); int tdbPCacheGetPageSize(SPCache *pCache); // tdbPage.c ==================================== From 3f1cda0aca0ef7d11496c57c6ce1575a4d72aa75 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Mon, 19 Dec 2022 14:04:20 +0800 Subject: [PATCH 26/64] Update 04-stable.md --- docs/zh/12-taos-sql/04-stable.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/12-taos-sql/04-stable.md b/docs/zh/12-taos-sql/04-stable.md index bd32da68ae..7856c2eac1 100644 --- a/docs/zh/12-taos-sql/04-stable.md +++ b/docs/zh/12-taos-sql/04-stable.md @@ -139,10 +139,10 @@ alter_table_option: { - ADD COLUMN:添加列。 - DROP COLUMN:删除列。 -- MODIFY COLUMN:修改列定义,如果数据列的类型是可变长类型,那么可以使用此指令修改其宽度,只能改大,不能改小。 +- MODIFY COLUMN:修改列的宽度,数据列的类型必须是可变长类型的nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 - ADD TAG:给超级表添加一个标签。 - DROP TAG:删除超级表的一个标签。从超级表删除某个标签后,该超级表下的所有子表也会自动删除该标签。 -- MODIFY TAG:修改超级表的一个标签的定义。如果标签的类型是可变长类型,那么可以使用此指令修改其宽度,只能改大,不能改小。 +- MODIFY TAG:修改超级表的一个标签的列宽度。标签的类型只能为可变长类型的 nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 - RENAME TAG:修改超级表的一个标签的名称。从超级表修改某个标签名后,该超级表下的所有子表也会自动更新该标签名。 ### 增加列 From 5fed2a8a99c361955d64ea3875112229d6825ec8 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Mon, 19 Dec 2022 14:08:49 +0800 Subject: [PATCH 27/64] Update 04-stable.md --- docs/zh/12-taos-sql/04-stable.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/12-taos-sql/04-stable.md b/docs/zh/12-taos-sql/04-stable.md index 7856c2eac1..c5933228de 100644 --- a/docs/zh/12-taos-sql/04-stable.md +++ b/docs/zh/12-taos-sql/04-stable.md @@ -139,10 +139,10 @@ alter_table_option: { - ADD COLUMN:添加列。 - DROP COLUMN:删除列。 -- MODIFY COLUMN:修改列的宽度,数据列的类型必须是可变长类型的nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 +- MODIFY COLUMN:修改列的宽度,数据列的类型必须是 nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 - ADD TAG:给超级表添加一个标签。 - DROP TAG:删除超级表的一个标签。从超级表删除某个标签后,该超级表下的所有子表也会自动删除该标签。 -- MODIFY TAG:修改超级表的一个标签的列宽度。标签的类型只能为可变长类型的 nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 +- MODIFY TAG:修改超级表的一个标签的列宽度。标签的类型只能是 nchar 和 binary,使用此指令可以修改其宽度,只能改大,不能改小。 - RENAME TAG:修改超级表的一个标签的名称。从超级表修改某个标签名后,该超级表下的所有子表也会自动更新该标签名。 ### 增加列 From 30db4f9582dbd113bebea927b6f9313c18255458 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 19 Dec 2022 14:45:22 +0800 Subject: [PATCH 28/64] fix(tdb): rollback befor commit btree root page --- source/libs/tdb/src/db/tdbPager.c | 6 +++--- source/libs/tdb/src/db/tdbTable.c | 20 ++++++++++---------- source/libs/tdb/src/inc/tdbInt.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index 23ab0004b9..2c7faad7f1 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -830,7 +830,7 @@ static int tdbPagerPWritePageToDB(SPager *pPager, SPage *pPage) { return 0; } -static int tdbPagerRestore(SPager *pPager, SBTree *pBt, const char *jFileName) { +static int tdbPagerRestore(SPager *pPager, const char *jFileName) { int ret = 0; SPgno journalSize = 0; u8 *pageBuf = NULL; @@ -908,7 +908,7 @@ static int tdbPagerRestore(SPager *pPager, SBTree *pBt, const char *jFileName) { return 0; } -int tdbPagerRestoreJournals(SPager *pPager, SBTree *pBt) { +int tdbPagerRestoreJournals(SPager *pPager) { tdbDirEntryPtr pDirEntry; tdbDirPtr pDir = taosOpenDir(pPager->pEnv->dbName); if (pDir == NULL) { @@ -919,7 +919,7 @@ int tdbPagerRestoreJournals(SPager *pPager, SBTree *pBt) { while ((pDirEntry = tdbReadDir(pDir)) != NULL) { char *name = tdbDirEntryBaseName(tdbGetDirEntryName(pDirEntry)); if (strncmp(TDB_MAINDB_NAME "-journal", name, 16) == 0) { - if (tdbPagerRestore(pPager, pBt, name) < 0) { + if (tdbPagerRestore(pPager, name) < 0) { tdbCloseDir(&pDir); tdbError("failed to restore file due to %s. jFileName:%s", strerror(errno), name); diff --git a/source/libs/tdb/src/db/tdbTable.c b/source/libs/tdb/src/db/tdbTable.c index c5c2d6aebe..2950169979 100644 --- a/source/libs/tdb/src/db/tdbTable.c +++ b/source/libs/tdb/src/db/tdbTable.c @@ -107,6 +107,16 @@ int tdbTbOpen(const char *tbname, int keyLen, int valLen, tdb_cmpr_fn_t keyCmprF ASSERT(pPager != NULL); + if (rollback) { + tdbPagerRollback(pPager); + } else { + ret = tdbPagerRestoreJournals(pPager); + if (ret < 0) { + tdbOsFree(pTb); + return -1; + } + } + // pTb->pBt ret = tdbBtreeOpen(keyLen, valLen, pPager, tbname, pgno, keyCmprFn, pEnv, &(pTb->pBt)); if (ret < 0) { @@ -114,16 +124,6 @@ int tdbTbOpen(const char *tbname, int keyLen, int valLen, tdb_cmpr_fn_t keyCmprF return -1; } - if (rollback) { - tdbPagerRollback(pPager); - } else { - ret = tdbPagerRestoreJournals(pPager, pTb->pBt); - if (ret < 0) { - tdbOsFree(pTb); - return -1; - } - } - *ppTb = pTb; return 0; } diff --git a/source/libs/tdb/src/inc/tdbInt.h b/source/libs/tdb/src/inc/tdbInt.h index ab9c5995ec..45e01e83f3 100644 --- a/source/libs/tdb/src/inc/tdbInt.h +++ b/source/libs/tdb/src/inc/tdbInt.h @@ -197,7 +197,7 @@ int tdbPagerFetchPage(SPager *pPager, SPgno *ppgno, SPage **ppPage, int (*initP TXN *pTxn); void tdbPagerReturnPage(SPager *pPager, SPage *pPage, TXN *pTxn); int tdbPagerAllocPage(SPager *pPager, SPgno *ppgno); -int tdbPagerRestoreJournals(SPager *pPager, SBTree *pBt); +int tdbPagerRestoreJournals(SPager *pPager); int tdbPagerRollback(SPager *pPager); // tdbPCache.c ==================================== From 8369fef53c57cc6088757c13d214cf95c67ed619 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 19 Dec 2022 15:25:58 +0800 Subject: [PATCH 29/64] fix(tdb): zero page if ncells is zero when init page --- source/libs/tdb/src/db/tdbPage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/libs/tdb/src/db/tdbPage.c b/source/libs/tdb/src/db/tdbPage.c index ac2725d8ec..50dc8e0a65 100644 --- a/source/libs/tdb/src/db/tdbPage.c +++ b/source/libs/tdb/src/db/tdbPage.c @@ -111,6 +111,9 @@ void tdbPageZero(SPage *pPage, u8 szAmHdr, int (*xCellSize)(const SPage *, SCell void tdbPageInit(SPage *pPage, u8 szAmHdr, int (*xCellSize)(const SPage *, SCell *, int, TXN *, SBTree *pBt)) { tdbTrace("page/init: %p %" PRIu8 " %p", pPage, szAmHdr, xCellSize); pPage->pPageHdr = pPage->pData + szAmHdr; + if (TDB_PAGE_NCELLS(pPage) == 0) { + return tdbPageZero(pPage, szAmHdr, xCellSize); + } pPage->pCellIdx = pPage->pPageHdr + TDB_PAGE_HDR_SIZE(pPage); pPage->pFreeStart = pPage->pCellIdx + TDB_PAGE_OFFSET_SIZE(pPage) * TDB_PAGE_NCELLS(pPage); pPage->pFreeEnd = pPage->pData + TDB_PAGE_CCELLS(pPage); From 0f60ddb3cd08c0283a95bb07ccbbb4111d09bddb Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 19 Dec 2022 15:51:12 +0800 Subject: [PATCH 30/64] fix(query): fix error. --- examples/c/asyncdemo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/c/asyncdemo.c b/examples/c/asyncdemo.c index 83d217769b..c86cd44354 100644 --- a/examples/c/asyncdemo.c +++ b/examples/c/asyncdemo.c @@ -35,7 +35,7 @@ int64_t st, et; typedef struct { int id; TAOS *taos; - char name[16]; + char name[32]; time_t timeStamp; int value; int rowsInserted; From 1eea4101f14303604b944f7ea00989f3b183430c Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 19 Dec 2022 16:40:08 +0800 Subject: [PATCH 31/64] tdb/pager: new trace log for abort operation --- source/libs/tdb/src/db/tdbPager.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index 2c7faad7f1..09c2206111 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -471,6 +471,8 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { return -1; } + tdbTrace("tdb/abort: pgno:%p,", pPager); + for (int pgIndex = 0; pgIndex < journalSize; ++pgIndex) { // read pgno & the page from journal SPgno pgno; @@ -481,6 +483,8 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { return -1; } + tdbTrace("tdb/abort: pgno:%d,", pgno); + ret = tdbOsRead(jfd, pageBuf, pPager->pageSize); if (ret < 0) { tdbOsFree(pageBuf); @@ -578,12 +582,12 @@ int tdbPagerFlushPage(SPager *pPager, TXN *pTxn) { return -1; } - tdbTrace("tdb/flush:%p, %d/%d/%d", pPager, pPager->dbOrigSize, pPager->dbFileSize, maxPgno); + tdbTrace("tdb/flush:%p, pgno:%d, %d/%d/%d", pPager, pgno, pPager->dbOrigSize, pPager->dbFileSize, maxPgno); pPager->dbOrigSize = maxPgno; pPage->isDirty = 0; - tdbTrace("pager/flush drop page: %p %d from dirty tree: %p", pPage, TDB_PAGE_PGNO(pPage), &pPager->rbt); + tdbTrace("pager/flush drop page: %p, pgno:%d, from dirty tree: %p", pPage, TDB_PAGE_PGNO(pPage), &pPager->rbt); tRBTreeDrop(&pPager->rbt, (SRBTreeNode *)pPage); tdbPCacheRelease(pPager->pCache, pPage, pTxn); From f6d953e62d32524ea2239bb2dafafbc23a2b499e Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 19 Dec 2022 16:40:40 +0800 Subject: [PATCH 32/64] fix: disable insert csv statements on cloud services --- include/client/taos.h | 15 +++++++++------ include/common/tglobal.h | 1 + source/client/src/clientEnv.c | 3 +++ source/common/src/tglobal.c | 7 ++++--- source/libs/parser/src/parInsertSql.c | 4 ++++ 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/include/client/taos.h b/include/client/taos.h index 379363c51d..647f906d4f 100644 --- a/include/client/taos.h +++ b/include/client/taos.h @@ -59,6 +59,7 @@ typedef enum { TSDB_OPTION_TIMEZONE, TSDB_OPTION_CONFIGDIR, TSDB_OPTION_SHELL_ACTIVITY_TIMER, + TSDB_OPTION_USE_ADAPTER, TSDB_MAX_OPTIONS } TSDB_OPTION; @@ -218,7 +219,7 @@ DLL_EXPORT const void *taos_get_raw_block(TAOS_RES *res); DLL_EXPORT int taos_get_db_route_info(TAOS *taos, const char *db, TAOS_DB_ROUTE_INFO *dbInfo); DLL_EXPORT int taos_get_table_vgId(TAOS *taos, const char *db, const char *table, int *vgId); -DLL_EXPORT int taos_load_table_info(TAOS *taos, const char *tableNameList); +DLL_EXPORT int taos_load_table_info(TAOS *taos, const char *tableNameList); /* --------------------------schemaless INTERFACE------------------------------- */ @@ -229,13 +230,14 @@ DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len int precision); DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int64_t reqid); -DLL_EXPORT TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int32_t ttl); +DLL_EXPORT TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, + int32_t ttl); DLL_EXPORT TAOS_RES *taos_schemaless_insert_ttl_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, - int precision, int32_t ttl, int64_t reqid); + int precision, int32_t ttl, int64_t reqid); DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, - int precision, int32_t ttl); + int precision, int32_t ttl); DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, - int protocol, int precision, int32_t ttl, int64_t reqid); + int protocol, int precision, int32_t ttl, int64_t reqid); /* --------------------------TMQ INTERFACE------------------------------- */ @@ -308,7 +310,8 @@ DLL_EXPORT tmq_res_t tmq_get_res_type(TAOS_RES *res); DLL_EXPORT int32_t tmq_get_raw(TAOS_RES *res, tmq_raw_data *raw); DLL_EXPORT int32_t tmq_write_raw(TAOS *taos, tmq_raw_data raw); DLL_EXPORT int taos_write_raw_block(TAOS *taos, int numOfRows, char *pData, const char *tbname); -DLL_EXPORT int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const char* tbname, TAOS_FIELD *fields, int numFields); +DLL_EXPORT int taos_write_raw_block_with_fields(TAOS *taos, int rows, char *pData, const char *tbname, + TAOS_FIELD *fields, int numFields); DLL_EXPORT void tmq_free_raw(tmq_raw_data raw); // Returning null means error. Returned result need to be freed by tmq_free_json_meta DLL_EXPORT char *tmq_get_json_meta(TAOS_RES *res); diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 92672311d0..9e8a139b31 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -101,6 +101,7 @@ extern int32_t tsRedirectPeriod; extern int32_t tsRedirectFactor; extern int32_t tsRedirectMaxPeriod; extern int32_t tsMaxRetryWaitTime; +extern bool tsUseAdapter; // client extern int32_t tsMinSlidingTime; diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 2cb337fc4c..64e1fd908a 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -469,6 +469,9 @@ int taos_options_imp(TSDB_OPTION option, const char *str) { case TSDB_OPTION_TIMEZONE: pItem = cfgGetItem(pCfg, "timezone"); break; + case TSDB_OPTION_USE_ADAPTER: + pItem = cfgGetItem(pCfg, "useAdapter"); + break; default: break; } diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index f57d59fb41..9caf0cc33e 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -96,6 +96,7 @@ int32_t tsRedirectPeriod = 10; int32_t tsRedirectFactor = 2; int32_t tsRedirectMaxPeriod = 1000; int32_t tsMaxRetryWaitTime = 10000; +bool tsUseAdapter = false; /* * denote if the server needs to compress response message at the application layer to client, including query rsp, @@ -201,9 +202,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) { int32_t taosSetTfsCfg(SConfig *pCfg); #endif -struct SConfig *taosGetCfg() { - return tsCfg; -} +struct SConfig *taosGetCfg() { return tsCfg; } static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *inputCfgDir, const char *envFile, char *apolloUrl) { @@ -314,6 +313,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) { if (cfgAddInt32(pCfg, "smlBatchSize", tsSmlBatchSize, 1, INT32_MAX, true) != 0) return -1; if (cfgAddInt32(pCfg, "maxMemUsedByInsert", tsMaxMemUsedByInsert, 1, INT32_MAX, true) != 0) return -1; if (cfgAddInt32(pCfg, "maxRetryWaitTime", tsMaxRetryWaitTime, 0, 86400000, 0) != 0) return -1; + if (cfgAddBool(pCfg, "useAdapter", tsUseAdapter, true) != 0) return -1; tsNumOfTaskQueueThreads = tsNumOfCores / 2; tsNumOfTaskQueueThreads = TMAX(tsNumOfTaskQueueThreads, 4); @@ -668,6 +668,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) { tsQueryNodeChunkSize = cfgGetItem(pCfg, "queryNodeChunkSize")->i32; tsQueryUseNodeAllocator = cfgGetItem(pCfg, "queryUseNodeAllocator")->bval; tsKeepColumnName = cfgGetItem(pCfg, "keepColumnName")->bval; + tsUseAdapter = cfgGetItem(pCfg, "useAdapter")->bval; tsMaxRetryWaitTime = cfgGetItem(pCfg, "maxRetryWaitTime")->i32; return 0; diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index 159fc966c1..98c6aed829 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -1494,6 +1494,10 @@ static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* p static int32_t parseFileClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, SToken* pToken) { + if (tsUseAdapter) { + return buildInvalidOperationMsg(&pCxt->msg, "proxy mode does not support csv loading"); + } + NEXT_TOKEN(pStmt->pSql, *pToken); if (0 == pToken->n || (TK_NK_STRING != pToken->type && TK_NK_ID != pToken->type)) { return buildSyntaxErrMsg(&pCxt->msg, "file path is required following keyword FILE", pToken->z); From b6caecea282941f9cf1d884066f242369c616165 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 19 Dec 2022 17:11:08 +0800 Subject: [PATCH 33/64] tdb/pager: seek jfd to file begin when abort --- source/libs/tdb/src/db/tdbPager.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/libs/tdb/src/db/tdbPager.c b/source/libs/tdb/src/db/tdbPager.c index 09c2206111..b554170b39 100644 --- a/source/libs/tdb/src/db/tdbPager.c +++ b/source/libs/tdb/src/db/tdbPager.c @@ -466,12 +466,18 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) { return -1; } + if (tdbOsLSeek(jfd, 0L, SEEK_SET) < 0) { + tdbError("failed to lseek jfd due to %s. file:%s, offset:0", strerror(errno), pPager->dbFileName); + terrno = TAOS_SYSTEM_ERROR(errno); + return -1; + } + u8 *pageBuf = tdbOsCalloc(1, pPager->pageSize); if (pageBuf == NULL) { return -1; } - tdbTrace("tdb/abort: pgno:%p,", pPager); + tdbDebug("tdb/abort: pager:%p,", pPager); for (int pgIndex = 0; pgIndex < journalSize; ++pgIndex) { // read pgno & the page from journal From aad6151cbd1cf8ffcdc74537974fe7f46aa471ab Mon Sep 17 00:00:00 2001 From: sunpeng Date: Mon, 19 Dec 2022 17:24:42 +0800 Subject: [PATCH 34/64] docs: update go tmq demo (#19018) --- docs/examples/go/sub/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/go/sub/main.go b/docs/examples/go/sub/main.go index 7721eed134..3aa2fed729 100644 --- a/docs/examples/go/sub/main.go +++ b/docs/examples/go/sub/main.go @@ -24,7 +24,7 @@ func main() { if err != nil { panic(err) } - _, err = db.Exec("create topic if not exists example_tmq_topic with meta as DATABASE example_tmq") + _, err = db.Exec("create topic if not exists example_tmq_topic as DATABASE example_tmq") if err != nil { panic(err) } From 4a95bb1133990ee5ddfc5e0c3b8086c9338276a8 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 19 Dec 2022 17:26:33 +0800 Subject: [PATCH 35/64] fix: taosbenchmark delay time for windows (#19011) * fix: taosbenchmark delay time for windows * test: remove taosbenchmark deprecated paramter * fix: update taos-tools 261fcca --- cmake/taostools_CMakeLists.txt.in | 2 +- tests/develop-test/5-taos-tools/taosbenchmark/commandline.py | 2 +- .../5-taos-tools/taosbenchmark/invalid_commandline.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 7247200fe7..0cc57d1246 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 4a4027c + GIT_TAG 261fcca SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py b/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py index 163cdd0055..ba296584ba 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/commandline.py @@ -56,7 +56,7 @@ class TDTestCase: def run(self): binPath = self.getPath() - cmd = "%s -F 7 -H 9 -n 10 -t 2 -x -y -M -C -d newtest -l 5 -A binary,nchar\(31\) -b tinyint,binary\(23\),bool,nchar -w 29 -E -m $%%^*" %binPath + cmd = "%s -F 7 -n 10 -t 2 -x -y -M -C -d newtest -l 5 -A binary,nchar\(31\) -b tinyint,binary\(23\),bool,nchar -w 29 -E -m $%%^*" %binPath tdLog.info("%s" % cmd) os.system("%s" % cmd) tdSql.execute("use newtest") diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py b/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py index e5a2551e63..d706eea068 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/invalid_commandline.py @@ -53,7 +53,7 @@ class TDTestCase: def run(self): binPath = self.getPath() - cmd = "%s -F abc -P abc -I abc -T abc -H abc -i abc -S abc -B abc -r abc -t abc -n abc -l abc -w abc -w 16385 -R abc -O abc -a abc -n 2 -t 2 -r 1 -y" %binPath + cmd = "%s -F abc -P abc -I abc -T abc -i abc -S abc -B abc -r abc -t abc -n abc -l abc -w abc -w 16385 -R abc -O abc -a abc -n 2 -t 2 -r 1 -y" %binPath tdLog.info("%s" % cmd) os.system("%s" % cmd) tdSql.query("select count(*) from test.meters") From cb5a32866fdacddb0a08cf4700db22b2333938f0 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Mon, 19 Dec 2022 18:41:33 +0800 Subject: [PATCH 36/64] fix: taosbenchmark disorder rec dup (#19014) * fix: update taos-tools 45eef77 * fix: update taos-tools 8376384 * fix: taosbenchmark disorder sample * test: remove deprecated param * fix: update taos-tools 83515dc * fix: examples/c/asyncdemo.c compile error --- cmake/taostools_CMakeLists.txt.in | 2 +- examples/c/asyncdemo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index c5fe95da58..0cc57d1246 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG b20c9d1 + GIT_TAG 261fcca SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE diff --git a/examples/c/asyncdemo.c b/examples/c/asyncdemo.c index 83d217769b..c86cd44354 100644 --- a/examples/c/asyncdemo.c +++ b/examples/c/asyncdemo.c @@ -35,7 +35,7 @@ int64_t st, et; typedef struct { int id; TAOS *taos; - char name[16]; + char name[32]; time_t timeStamp; int value; int rowsInserted; From 3bacd1efbff5865b4d0e04e5f208258e496531e5 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 19 Dec 2022 19:24:58 +0800 Subject: [PATCH 37/64] test:add testcase of mutiMnode replica 3 --- tests/parallel_test/cases.task | 4 + ...dnode3mnodeSep1VnodeStopMnodeModifyMeta.py | 207 ++++++++++++++++++ .../6-cluster/clusterCommonCreate.py | 12 +- 3 files changed, 222 insertions(+), 1 deletion(-) create mode 100644 tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 4cbba106ba..9c63f99b05 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -647,6 +647,9 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py -N 6 -M 3 -n 3 + +,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeModifyMeta.py -N 6 -M 3 +,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py -N 6 -M 3 @@ -657,6 +660,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertData.py -N 6 -M 3 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py -N 6 -M 3 -n 3 + ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeAdd1Ddnoe.py -N 7 -M 3 -C 6 -n 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 6-cluster/5dnode3mnodeDrop.py -N 5 diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py new file mode 100644 index 0000000000..3e4dc2483f --- /dev/null +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeModifyMeta.py @@ -0,0 +1,207 @@ +from ssl import ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE +from numpy import row_stack +import taos +import sys +import time +import os + +from util.log import * +from util.sql import * +from util.cases import * +from util.dnodes import TDDnodes +from util.dnodes import TDDnode +from util.cluster import * +sys.path.append("./6-cluster") +from clusterCommonCreate import * +from clusterCommonCheck import clusterComCheck + +import time +import socket +import subprocess +from multiprocessing import Process +import threading +import time +import inspect +import ctypes + +class TDTestCase: + + def init(self, conn, logSql, replicaVar=1): + tdLog.debug(f"start to excute {__file__}") + self.TDDnodes = None + tdSql.init(conn.cursor()) + self.host = socket.gethostname() + + + def getBuildPath(self): + selfPath = os.path.dirname(os.path.realpath(__file__)) + + if ("community" in selfPath): + projPath = selfPath[:selfPath.find("community")] + else: + projPath = selfPath[:selfPath.find("tests")] + + for root, dirs, files in os.walk(projPath): + if ("taosd" in files): + rootRealPath = os.path.dirname(os.path.realpath(root)) + if ("packaging" not in rootRealPath): + buildPath = root[:len(root) - len("/build/bin")] + break + return buildPath + + def _async_raise(self, tid, exctype): + """raises the exception, performs cleanup if needed""" + if not inspect.isclass(exctype): + exctype = type(exctype) + res = ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, ctypes.py_object(exctype)) + if res == 0: + raise ValueError("invalid thread id") + elif res != 1: + # """if it returns a number greater than one, you're in trouble, + # and you should call it again with exc=NULL to revert the effect""" + ctypes.pythonapi.PyThreadState_SetAsyncExc(tid, None) + raise SystemError("PyThreadState_SetAsyncExc failed") + + def stopThread(self,thread): + self._async_raise(thread.ident, SystemExit) + + + def fiveDnodeThreeMnode(self,dnodeNumbers,mnodeNums,restartNumbers,stopRole): + tdLog.printNoPrefix("======== test case 1: ") + paraDict = {'dbName': 'db0_0', + 'dropFlag': 1, + 'event': '', + 'vgroups': 4, + 'replica': 3, + 'stbName': 'stb', + 'stbNumbers': 2, + 'colPrefix': 'c', + 'tagPrefix': 't', + 'colSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'tagSchema': [{'type': 'INT', 'count':1}, {'type': 'binary', 'len':20, 'count':1}], + 'ctbPrefix': 'ctb', + 'ctbNum': 200, + 'startTs': 1640966400000, # 2022-01-01 00:00:00.000 + "rowsPerTbl": 1000, + "batchNum": 5000 + } + + dnodeNumbers=int(dnodeNumbers) + mnodeNums=int(mnodeNums) + vnodeNumbers = int(dnodeNumbers-mnodeNums) + allctbNumbers=(paraDict['stbNumbers']*paraDict["ctbNum"]) + rowsPerStb=paraDict["ctbNum"]*paraDict["rowsPerTbl"] + rowsall=rowsPerStb*paraDict['stbNumbers'] + dbNumbers = 1 + + tdLog.info("first check dnode and mnode") + tdSql.query("select * from information_schema.ins_dnodes;") + tdSql.checkData(0,1,'%s:6030'%self.host) + tdSql.checkData(4,1,'%s:6430'%self.host) + clusterComCheck.checkDnodes(dnodeNumbers) + + #check mnode status + tdLog.info("check mnode status") + clusterComCheck.checkMnodeStatus(mnodeNums) + + # add some error operations and + tdLog.info("Confirm the status of the dnode again") + tdSql.error("create mnode on dnode 2") + tdSql.query("select * from information_schema.ins_dnodes;") + print(tdSql.queryResult) + clusterComCheck.checkDnodes(dnodeNumbers) + + # create database and stable + clusterComCreate.create_database(tdSql, paraDict["dbName"],paraDict["dropFlag"], paraDict["vgroups"],paraDict['replica']) + tdLog.info("Take turns stopping Mnodes ") + + tdDnodes=cluster.dnodes + stopcount =0 + threads=[] + + # create stable:stb_0 + stableName= paraDict['stbName'] + newTdSql=tdCom.newTdSql() + clusterComCreate.create_stables(newTdSql, paraDict["dbName"],stableName,paraDict['stbNumbers']) + #create child table:ctb_0 + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + clusterComCreate.create_ctable(newTdSql, paraDict["dbName"],stableName,stableName, paraDict['ctbNum']) + #insert date + for i in range(paraDict['stbNumbers']): + stableName= '%s_%d'%(paraDict['stbName'],i) + newTdSql=tdCom.newTdSql() + threads.append(threading.Thread(target=clusterComCreate.insert_data, args=(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"],paraDict["startTs"]))) + for tr in threads: + tr.start() + for tr in threads: + tr.join() + + while stopcount < restartNumbers: + tdLog.info(" restart loop: %d"%stopcount ) + if stopRole == "mnode": + for i in range(mnodeNums): + tdDnodes[i].stoptaosd() + if i == 0 : + stableName= '%s_%d'%(paraDict['stbName'],0) + newTdSql=tdCom.newTdSql() + clusterComCreate.alterStbMetaData(newTdSql, paraDict["dbName"],stableName,paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"]) + elif i == 1 : + tdSql.execute("ALTER TABLE db0_0.stb_0_0 SET TAG t1r=10000;") + # sleep(10) + tdDnodes[i].starttaosd() + # sleep(10) + elif stopRole == "vnode": + for i in range(vnodeNumbers): + tdDnodes[i+mnodeNums].stoptaosd() + # sleep(10) + tdDnodes[i+mnodeNums].starttaosd() + # sleep(10) + elif stopRole == "dnode": + for i in range(dnodeNumbers): + tdDnodes[i].stoptaosd() + clusterComCheck.checkDbRows(dbNumbers) + + # sleep(10) + tdDnodes[i].starttaosd() + + + # dnodeNumbers don't include database of schema + if clusterComCheck.checkDnodes(dnodeNumbers): + tdLog.info("123") + else: + print("456") + + self.stopThread(threads) + tdLog.exit("one or more of dnodes failed to start ") + # self.check3mnode() + stopcount+=1 + + + clusterComCheck.checkDnodes(dnodeNumbers) + clusterComCheck.checkDbRows(dbNumbers) + # clusterComCheck.checkDb(dbNumbers,1,paraDict["dbName"]) + + # tdSql.execute("use %s" %(paraDict["dbName"])) + tdSql.query("select t1r from db0_0.stb_0_0 limit 1;") + tdSql.checkData(0,0,10000) + tdSql.query("show %s.stables"%(paraDict["dbName"])) + tdSql.checkRows(paraDict["stbNumbers"]) + for i in range(paraDict['stbNumbers']): + stableName= '%s.%s_%d'%(paraDict["dbName"],paraDict['stbName'],i) + tdSql.query("select count(*) from %s"%stableName) + if i == 0 : + tdSql.checkData(0,0,rowsPerStb*2) + else: + tdSql.checkData(0,0,rowsPerStb) + def run(self): + # print(self.master_dnode.cfgDict) + self.fiveDnodeThreeMnode(dnodeNumbers=6,mnodeNums=3,restartNumbers=1,stopRole='mnode') + + def stop(self): + tdSql.close() + tdLog.success(f"{__file__} successfully executed") + +tdCases.addLinux(__file__, TDTestCase()) +tdCases.addWindows(__file__, TDTestCase()) diff --git a/tests/system-test/6-cluster/clusterCommonCreate.py b/tests/system-test/6-cluster/clusterCommonCreate.py index 613e017783..6e699e2396 100644 --- a/tests/system-test/6-cluster/clusterCommonCreate.py +++ b/tests/system-test/6-cluster/clusterCommonCreate.py @@ -222,7 +222,17 @@ class ClusterComCreate: tsql.execute(f" ALTER STABLE {dbName}.{stbName} ADD COLUMN c4 DOUBLE;") tdLog.debug(f"ALTER STABLE {dbName}.{stbName} DROP COLUMN c2;") tsql.execute(f" ALTER STABLE {dbName}.{stbName} DROP COLUMN c2;") - + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} RENAME TAG t1 t1r;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} RENAME TAG t1 t1r;") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} DROP TAG t2;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} DROP TAG t2;") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} ADD TAG t2 binary(32) ;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} ADD TAG t2 binary(32);") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} MODIFY TAG t2 binary(34) ;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} MODIFY TAG t2 binary(34);") + tdLog.debug(f"ALTER STABLE {dbName}.{stbName} ADD TAG t3 double ;") + tsql.execute(f" ALTER STABLE {dbName}.{stbName} ADD TAG t3 double;") + tsql.error(f" ALTER STABLE {dbName}.{stbName} ADD TAG t2 double;") tdLog.debug("start to insert data ............") # tsql.execute("use %s" %dbName) From a1c2361d2dc25ebbc845ef8a0f9ad79588af54a0 Mon Sep 17 00:00:00 2001 From: chenhaoran Date: Mon, 19 Dec 2022 19:31:02 +0800 Subject: [PATCH 38/64] ci:add release compilation test of mac --- Jenkinsfile2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile2 b/Jenkinsfile2 index 80f6b8e9e7..1920d8da17 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -173,7 +173,7 @@ def pre_test_build_mac() { ''' sh ''' cd ${WK}/debug - cmake .. -DBUILD_TEST=true -DBUILD_HTTPS=false + cmake .. -DBUILD_TEST=true -DBUILD_HTTPS=false -DCMAKE_BUILD_TYPE=Release make -j10 ctest -j10 || exit 7 ''' From 0b56b4af24d45919d765c661880ebdc3e0a54df8 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 19 Dec 2022 20:29:44 +0800 Subject: [PATCH 39/64] fix: add log for snapshot writer rollback --- source/dnode/vnode/src/meta/metaSnapshot.c | 3 +++ source/dnode/vnode/src/meta/metaTable.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/source/dnode/vnode/src/meta/metaSnapshot.c b/source/dnode/vnode/src/meta/metaSnapshot.c index 974f8a9218..054e785980 100644 --- a/source/dnode/vnode/src/meta/metaSnapshot.c +++ b/source/dnode/vnode/src/meta/metaSnapshot.c @@ -161,7 +161,10 @@ int32_t metaSnapWriterClose(SMetaSnapWriter** ppWriter, int8_t rollback) { SMetaSnapWriter* pWriter = *ppWriter; if (rollback) { + metaInfo("vgId:%d, meta snapshot writer close and rollback start ", TD_VID(pWriter->pMeta->pVnode)); code = metaAbort(pWriter->pMeta); + metaInfo("vgId:%d, meta snapshot writer close and rollback finished, code:0x%x", TD_VID(pWriter->pMeta->pVnode), + code); if (code) goto _err; } else { code = metaCommit(pWriter->pMeta, pWriter->pMeta->txn); diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 722a93137c..dc295ae5e7 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -710,6 +710,9 @@ int metaUpdateCtimeIdx(SMeta *pMeta, const SMetaEntry *pME) { if (metaBuildCtimeIdxKey(&ctimeKey, pME) < 0) { return 0; } + metaDebug("vgId:%d, start to save ctime:%" PRId64 " uid:%" PRId64 " ct:%" PRId64, TD_VID(pMeta->pVnode), pME->version, + pME->uid, ctimeKey.ctime); + return tdbTbInsert(pMeta->pCtimeIdx, &ctimeKey, sizeof(ctimeKey), NULL, 0, pMeta->txn); } From 4837dc6661449dba6cbc4b495390f582cc283ae1 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 19 Dec 2022 21:01:24 +0800 Subject: [PATCH 40/64] fix: avoid double-free in usedb req while db in creating state --- source/dnode/mnode/impl/inc/mndDef.h | 1 + source/dnode/mnode/impl/src/mndTrans.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 3c42f7b832..4e93a1d96e 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -174,6 +174,7 @@ typedef struct { void* param; char opername[TSDB_TRANS_OPER_LEN]; SArray* pRpcArray; + SRWLatch lockRpcArray; } STrans; typedef struct { diff --git a/source/dnode/mnode/impl/src/mndTrans.c b/source/dnode/mnode/impl/src/mndTrans.c index d2fc2dc9b1..b92be19741 100644 --- a/source/dnode/mnode/impl/src/mndTrans.c +++ b/source/dnode/mnode/impl/src/mndTrans.c @@ -628,6 +628,7 @@ STrans *mndTransCreate(SMnode *pMnode, ETrnPolicy policy, ETrnConflct conflict, pTrans->undoActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); pTrans->commitActions = taosArrayInit(TRANS_ARRAY_SIZE, sizeof(STransAction)); pTrans->pRpcArray = taosArrayInit(1, sizeof(SRpcHandleInfo)); + taosInitRWLatch(&pTrans->lockRpcArray); if (pTrans->redoActions == NULL || pTrans->undoActions == NULL || pTrans->commitActions == NULL || pTrans->pRpcArray == NULL) { @@ -737,12 +738,14 @@ int32_t mndSetRpcInfoForDbTrans(SMnode *pMnode, SRpcMsg *pMsg, EOperType oper, c if (pTrans->oper == oper) { if (strcasecmp(dbname, pTrans->dbname) == 0) { mInfo("trans:%d, db:%s oper:%d matched with input", pTrans->id, dbname, oper); + taosWLockLatch(&pTrans->lockRpcArray); if (pTrans->pRpcArray == NULL) { - pTrans->pRpcArray = taosArrayInit(1, sizeof(SRpcHandleInfo)); + pTrans->pRpcArray = taosArrayInit(4, sizeof(SRpcHandleInfo)); } if (pTrans->pRpcArray != NULL && taosArrayPush(pTrans->pRpcArray, &pMsg->info) != NULL) { code = 0; } + taosWUnLockLatch(&pTrans->lockRpcArray); sdbRelease(pMnode->pSdb, pTrans); break; @@ -944,8 +947,12 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { pTrans->failedTimes, code); } + taosWLockLatch(&pTrans->lockRpcArray); int32_t size = taosArrayGetSize(pTrans->pRpcArray); - if (size <= 0) return; + if (size <= 0) { + taosWUnLockLatch(&pTrans->lockRpcArray); + return; + } for (int32_t i = 0; i < size; ++i) { SRpcHandleInfo *pInfo = taosArrayGet(pTrans->pRpcArray, i); @@ -997,6 +1004,7 @@ static void mndTransSendRpcRsp(SMnode *pMnode, STrans *pTrans) { } } taosArrayClear(pTrans->pRpcArray); + taosWUnLockLatch(&pTrans->lockRpcArray); } int32_t mndTransProcessRsp(SRpcMsg *pRsp) { From 23c7fa73f05660c89e1b87395ad823fd4d3df36d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 19 Dec 2022 21:39:26 +0800 Subject: [PATCH 41/64] fix mem leak --- source/client/src/clientImpl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 807c752873..d792896b2d 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -739,6 +739,7 @@ int32_t handleSubmitExecRes(SRequestObj* pRequest, void* res, SCatalog* pCatalog SArray* pArray = NULL; SSubmitRsp* pRsp = (SSubmitRsp*)res; if (pRsp->nBlocks <= 0) { + taosMemoryFreeClear(pRsp->pBlocks); return TSDB_CODE_SUCCESS; } From c6e6f307ad2f715a4a1bf96c8e00a390a5b239f7 Mon Sep 17 00:00:00 2001 From: Xuefeng Tan <1172915550@qq.com> Date: Mon, 19 Dec 2022 23:27:17 +0800 Subject: [PATCH 42/64] enh(taosAdapter): return 502 when Unable to establish connection error occurs (#19026) --- cmake/taosadapter_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in index 75679a8ff5..2a9b4553ac 100644 --- a/cmake/taosadapter_CMakeLists.txt.in +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taosadapter ExternalProject_Add(taosadapter GIT_REPOSITORY https://github.com/taosdata/taosadapter.git - GIT_TAG 566540d + GIT_TAG 4dfc4d1 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 247342c454e21e8d4f6614ed754a103a14408e0f Mon Sep 17 00:00:00 2001 From: Xuefeng Tan <1172915550@qq.com> Date: Tue, 20 Dec 2022 09:00:23 +0800 Subject: [PATCH 43/64] enh(taosAdapter): return 502 when Unable to establish connection error occurs (#19028) --- cmake/taosadapter_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in index 75679a8ff5..2a9b4553ac 100644 --- a/cmake/taosadapter_CMakeLists.txt.in +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taosadapter ExternalProject_Add(taosadapter GIT_REPOSITORY https://github.com/taosdata/taosadapter.git - GIT_TAG 566540d + GIT_TAG 4dfc4d1 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From d39268ee8adf1e563eea2b13bf2d245a1a66aa83 Mon Sep 17 00:00:00 2001 From: sunpeng Date: Tue, 20 Dec 2022 11:05:32 +0800 Subject: [PATCH 44/64] enh: java connector support get table vgid (#18981) * java connector support get table vgid * add export to com_taosdata_jdbc_TSDBJNIConnector.h --- .../jni/com_taosdata_jdbc_TSDBJNIConnector.h | 8 +++ source/client/src/clientJniConnector.c | 65 ++++++++++++++++++- 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h b/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h index 3b728a3142..a88bf0f7a6 100644 --- a/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h +++ b/source/client/jni/com_taosdata_jdbc_TSDBJNIConnector.h @@ -260,6 +260,14 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_insertLinesImp(JN JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_schemalessInsertImp(JNIEnv *, jobject, jobjectArray, jlong, jint, jint); +/** + * Class: com_taosdata_jdbc_TSDBJNIConnector + * Method: getTableVgID + * Signature: (Ljava/lang/String;Ljava/lang/String)Lcom/taosdata/jdbc/VGroupIDResp + */ +JNIEXPORT jobject JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getTableVgID(JNIEnv *, jobject, jlong, jstring, + jstring, jobject); + #ifdef __cplusplus } #endif diff --git a/source/client/src/clientJniConnector.c b/source/client/src/clientJniConnector.c index 34fc480432..859d4ec80f 100644 --- a/source/client/src/clientJniConnector.c +++ b/source/client/src/clientJniConnector.c @@ -488,7 +488,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchRowImp(JNIEn numOfFields); return JNI_FETCH_END; } else { - jniDebug("jobj:%p, conn:%p, interrupted query. fetch row error code: %d, msg:%s", jobj, tscon, code, taos_errstr(result)); + jniDebug("jobj:%p, conn:%p, interrupted query. fetch row error code: %d, msg:%s", jobj, tscon, code, + taos_errstr(result)); return JNI_RESULT_SET_NULL; } } @@ -583,7 +584,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchBlockImp(JNI jniDebug("jobj:%p, conn:%p, resultset:%p, no data to retrieve", jobj, tscon, (void *)res); return JNI_FETCH_END; } else { - jniError("jobj:%p, conn:%p, query interrupted. fetch block error code:%d, msg:%s", jobj, tscon, error_code, taos_errstr(tres)); + jniError("jobj:%p, conn:%p, query interrupted. fetch block error code:%d, msg:%s", jobj, tscon, error_code, + taos_errstr(tres)); return JNI_RESULT_SET_NULL; } } @@ -1028,3 +1030,62 @@ JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_schemalessInsert } return (jlong)tres; } + +// TABLE_VG_ID_FID_CACHE cache resp object for getTableVgID +typedef struct TABLE_VG_ID_FIELD_CACHE { + int cached; + jclass clazz; + jfieldID codeField; + jfieldID vgIDField; +} TABLE_VG_ID_FIELD_CACHE; + +TABLE_VG_ID_FIELD_CACHE tableVgIdFieldCache; + +void cacheTableVgIDField(JNIEnv *env, jobject jobj) { + if (tableVgIdFieldCache.cached) { + return; + } + + tableVgIdFieldCache.clazz = (*env)->GetObjectClass(env, jobj); + tableVgIdFieldCache.codeField = (*env)->GetFieldID(env, tableVgIdFieldCache.clazz, "code", "I"); + tableVgIdFieldCache.vgIDField = (*env)->GetFieldID(env, tableVgIdFieldCache.clazz, "vgID", "I"); + tableVgIdFieldCache.cached = 1; +} + +JNIEXPORT jobject JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getTableVgID(JNIEnv *env, jobject jobj, jlong conn, + jstring jdb, jstring jtable, + jobject resp) { + if (!tableVgIdFieldCache.cached) { + cacheTableVgIDField(env, resp); + } + + TAOS *taos = (TAOS *)conn; + if (taos == NULL) { + jniError("jobj:%p, connection already closed", jobj); + (*env)->SetIntField(env, resp, tableVgIdFieldCache.codeField, JNI_CONNECTION_NULL); + return resp; + } + + const char *db = NULL; + const char *table = NULL; + int vgID = 0; + + if (jdb != NULL) { + db = (*env)->GetStringUTFChars(env, jdb, NULL); + } + if (jtable != NULL) { + table = (*env)->GetStringUTFChars(env, jtable, NULL); + } + + int code = taos_get_table_vgId(taos, db, table, &vgID); + if (db != NULL) { + (*env)->ReleaseStringUTFChars(env, jdb, db); + } + if (table != NULL) { + (*env)->ReleaseStringUTFChars(env, jtable, table); + } + + (*env)->SetIntField(env, resp, tableVgIdFieldCache.codeField, code); + (*env)->SetIntField(env, resp, tableVgIdFieldCache.vgIDField, vgID); + return resp; +} From c6701221d6eec8f9406da95ae2be979572b87f79 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 20 Dec 2022 12:46:26 +0800 Subject: [PATCH 45/64] enh: improve unit tests --- source/libs/nodes/src/nodesCodeFuncs.c | 230 ++++++++++++++++++++++++- 1 file changed, 225 insertions(+), 5 deletions(-) diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 38884a37e0..a93ea4bbcd 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -99,6 +99,10 @@ const char* nodesNodeName(ENodeType type) { return "DropDatabaseStmt"; case QUERY_NODE_ALTER_DATABASE_STMT: return "AlterDatabaseStmt"; + case QUERY_NODE_FLUSH_DATABASE_STMT: + return "FlushDatabaseStmt"; + case QUERY_NODE_TRIM_DATABASE_STMT: + return "TrimDatabaseStmt"; case QUERY_NODE_CREATE_TABLE_STMT: return "CreateTableStmt"; case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: @@ -143,6 +147,8 @@ const char* nodesNodeName(ENodeType type) { return "DropTopicStmt"; case QUERY_NODE_ALTER_LOCAL_STMT: return "AlterLocalStmt"; + case QUERY_NODE_SPLIT_VGROUP_STMT: + return "SplitVgroupStmt"; case QUERY_NODE_SHOW_DNODES_STMT: return "ShowDnodesStmt"; case QUERY_NODE_SHOW_MNODES_STMT: @@ -181,8 +187,14 @@ const char* nodesNodeName(ENodeType type) { return "ShowConsumersStmt"; case QUERY_NODE_SHOW_QUERIES_STMT: return "ShowQueriesStmt"; + case QUERY_NODE_SHOW_VARIABLES_STMT: + return "ShowVariablesStmt"; case QUERY_NODE_SHOW_VNODES_STMT: return "ShowVnodeStmt"; + case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: + return "ShowUserPrivilegesStmt"; + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + return "ShowTableTagsStmt"; case QUERY_NODE_DELETE_STMT: return "DeleteStmt"; case QUERY_NODE_INSERT_STMT: @@ -4423,6 +4435,31 @@ static int32_t jsonToAlterDatabaseStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkTrimDatabaseStmtDbName = "DbName"; +static const char* jkTrimDatabaseStmtMaxSpeed = "MaxSpeed"; + +static int32_t trimDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const STrimDatabaseStmt* pNode = (const STrimDatabaseStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkTrimDatabaseStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTrimDatabaseStmtMaxSpeed, pNode->maxSpeed); + } + + return code; +} + +static int32_t jsonToTrimDatabaseStmt(const SJson* pJson, void* pObj) { + STrimDatabaseStmt* pNode = (STrimDatabaseStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkTrimDatabaseStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkTrimDatabaseStmtMaxSpeed, &pNode->maxSpeed); + } + + return code; +} + static const char* jkAlterTableStmtDbName = "DbName"; static const char* jkAlterTableStmtTableName = "TableName"; static const char* jkAlterTableStmtAlterType = "AlterType"; @@ -4490,6 +4527,18 @@ static int32_t jsonToAlterTableStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkUseDatabaseStmtDbName = "DbName"; + +static int32_t useDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const SUseDatabaseStmt* pNode = (const SUseDatabaseStmt*)pObj; + return tjsonAddStringToObject(pJson, jkUseDatabaseStmtDbName, pNode->dbName); +} + +static int32_t jsonToUseDatabaseStmt(const SJson* pJson, void* pObj) { + SUseDatabaseStmt* pNode = (SUseDatabaseStmt*)pObj; + return tjsonGetStringValue(pJson, jkUseDatabaseStmtDbName, pNode->dbName); +} + static const char* jkAlterDnodeStmtDnodeId = "DnodeId"; static const char* jkAlterDnodeStmtConfig = "Config"; static const char* jkAlterDnodeStmtValue = "Value"; @@ -4561,6 +4610,135 @@ static int32_t jsonToCreateTopicStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkSplitVgroupStmtVgroupId = "VgroupId"; + +static int32_t splitVgroupStmtToJson(const void* pObj, SJson* pJson) { + const SSplitVgroupStmt* pNode = (const SSplitVgroupStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkSplitVgroupStmtVgroupId, pNode->vgId); +} + +static int32_t jsonToSplitVgroupStmt(const SJson* pJson, void* pObj) { + SSplitVgroupStmt* pNode = (SSplitVgroupStmt*)pObj; + return tjsonGetIntValue(pJson, jkSplitVgroupStmtVgroupId, &pNode->vgId); +} + +static const char* jkShowStmtDbName = "DbName"; +static const char* jkShowStmtTbName = "TbName"; +static const char* jkShowStmtTableCondType = "TableCondType"; + +static int32_t showStmtToJson(const void* pObj, SJson* pJson) { + const SShowStmt* pNode = (const SShowStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowStmtDbName, nodeToJson, pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowStmtTbName, nodeToJson, pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkShowStmtTableCondType, pNode->tableCondType); + } + + return code; +} + +static int32_t jsonToShowStmt(const SJson* pJson, void* pObj) { + SShowStmt* pNode = (SShowStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowStmtDbName, &pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowStmtTbName, &pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + tjsonGetNumberValue(pJson, jkShowStmtTableCondType, pNode->tableCondType, code); + } + + return code; +} + +static int32_t showDatabasesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowDatabasesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showTablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowTablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showTagsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowTagsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showUsersStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowUsersStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showVgroupsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowVgroupsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showVariablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowVariablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static const char* jkShowVnodesStmtDnodeId = "DnodeId"; +static const char* jkShowVnodesStmtDnodeEndpoint = "DnodeEndpoint"; + +static int32_t showVnodesStmtToJson(const void* pObj, SJson* pJson) { + const SShowVnodesStmt* pNode = (const SShowVnodesStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowVnodesStmtDnodeId, nodeToJson, pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowVnodesStmtDnodeEndpoint, nodeToJson, pNode->pDnodeEndpoint); + } + + return code; +} + +static int32_t jsonToShowVnodesStmt(const SJson* pJson, void* pObj) { + SShowVnodesStmt* pNode = (SShowVnodesStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowVnodesStmtDnodeId, &pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowVnodesStmtDnodeEndpoint, &pNode->pDnodeEndpoint); + } + + return code; +} + +static int32_t showUserPrivilegesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowUserPrivilegesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static const char* jkShowTableTagsStmtDbName = "DbName"; +static const char* jkShowTableTagsStmtTbName = "TbName"; +static const char* jkShowTableTagsStmtTags = "Tags"; + +static int32_t showTableTagsStmtToJson(const void* pObj, SJson* pJson) { + const SShowTableTagsStmt* pNode = (const SShowTableTagsStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowTableTagsStmtDbName, nodeToJson, pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowTableTagsStmtTbName, nodeToJson, pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkShowTableTagsStmtTags, pNode->pTags); + } + + return code; +} + +static int32_t jsonToShowTableTagsStmt(const SJson* pJson, void* pObj) { + SShowTableTagsStmt* pNode = (SShowTableTagsStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowTableTagsStmtDbName, &pNode->pDbName); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowTableTagsStmtTbName, &pNode->pTbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkShowTableTagsStmtTags, &pNode->pTags); + } + + return code; +} + static const char* jkDeleteStmtFromTable = "FromTable"; static const char* jkDeleteStmtWhere = "Where"; static const char* jkDeleteStmtCountFunc = "CountFunc"; @@ -4693,20 +4871,38 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { break; case QUERY_NODE_ALTER_DATABASE_STMT: return alterDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_TRIM_DATABASE_STMT: + return trimDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TABLE_STMT: break; case QUERY_NODE_ALTER_TABLE_STMT: return alterTableStmtToJson(pObj, pJson); case QUERY_NODE_USE_DATABASE_STMT: - break; + return useDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_DNODE_STMT: return alterDnodeStmtToJson(pObj, pJson); - case QUERY_NODE_SHOW_DATABASES_STMT: - case QUERY_NODE_SHOW_TABLES_STMT: - case QUERY_NODE_SHOW_TAGS_STMT: - break; case QUERY_NODE_CREATE_TOPIC_STMT: return createTopicStmtToJson(pObj, pJson); + case QUERY_NODE_SPLIT_VGROUP_STMT: + return splitVgroupStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_DATABASES_STMT: + return showDatabasesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TABLES_STMT: + return showTablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TAGS_STMT: + return showTagsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_USERS_STMT: + return showUsersStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_VGROUPS_STMT: + return showVgroupsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_VARIABLES_STMT: + return showVariablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_VNODES_STMT: + return showVnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: + return showUserPrivilegesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + return showTableTagsStmtToJson(pObj, pJson); case QUERY_NODE_DELETE_STMT: return deleteStmtToJson(pObj, pJson); case QUERY_NODE_LOGIC_PLAN_SCAN: @@ -4867,12 +5063,36 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToSelectStmt(pJson, pObj); case QUERY_NODE_ALTER_DATABASE_STMT: return jsonToAlterDatabaseStmt(pJson, pObj); + case QUERY_NODE_TRIM_DATABASE_STMT: + return jsonToTrimDatabaseStmt(pJson, pObj); case QUERY_NODE_ALTER_TABLE_STMT: return jsonToAlterTableStmt(pJson, pObj); + case QUERY_NODE_USE_DATABASE_STMT: + return jsonToUseDatabaseStmt(pJson, pObj); case QUERY_NODE_ALTER_DNODE_STMT: return jsonToAlterDnodeStmt(pJson, pObj); case QUERY_NODE_CREATE_TOPIC_STMT: return jsonToCreateTopicStmt(pJson, pObj); + case QUERY_NODE_SPLIT_VGROUP_STMT: + return jsonToSplitVgroupStmt(pJson, pObj); + case QUERY_NODE_SHOW_DATABASES_STMT: + return jsonToShowDatabasesStmt(pJson, pObj); + case QUERY_NODE_SHOW_TABLES_STMT: + return jsonToShowTablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_TAGS_STMT: + return jsonToShowTagsStmt(pJson, pObj); + case QUERY_NODE_SHOW_USERS_STMT: + return jsonToShowUsersStmt(pJson, pObj); + case QUERY_NODE_SHOW_VGROUPS_STMT: + return jsonToShowVgroupsStmt(pJson, pObj); + case QUERY_NODE_SHOW_VARIABLES_STMT: + return jsonToShowVariablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_VNODES_STMT: + return jsonToShowVnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: + return jsonToShowUserPrivilegesStmt(pJson, pObj); + case QUERY_NODE_SHOW_TABLE_TAGS_STMT: + return jsonToShowTableTagsStmt(pJson, pObj); case QUERY_NODE_DELETE_STMT: return jsonToDeleteStmt(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_SCAN: From 9bf1ae58ac5250c34dc06bafadfa2043bbac6c9b Mon Sep 17 00:00:00 2001 From: jiajingbin Date: Tue, 20 Dec 2022 15:30:03 +0800 Subject: [PATCH 46/64] docs: update default trigger mode --- docs/en/12-taos-sql/14-stream.md | 2 +- docs/zh/12-taos-sql/14-stream.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/12-taos-sql/14-stream.md b/docs/en/12-taos-sql/14-stream.md index c47d2da0eb..e70e962668 100644 --- a/docs/en/12-taos-sql/14-stream.md +++ b/docs/en/12-taos-sql/14-stream.md @@ -108,7 +108,7 @@ SHOW STREAMS; When you create a stream, you can use the TRIGGER parameter to specify triggering conditions for it. -For non-windowed processing, triggering occurs in real time. For windowed processing, there are three methods of triggering: +For non-windowed processing, triggering occurs in real time. For windowed processing, there are three methods of triggering,the default value is AT_ONCE: 1. AT_ONCE: triggers on write diff --git a/docs/zh/12-taos-sql/14-stream.md b/docs/zh/12-taos-sql/14-stream.md index a70d559a86..9e2fde526e 100644 --- a/docs/zh/12-taos-sql/14-stream.md +++ b/docs/zh/12-taos-sql/14-stream.md @@ -114,7 +114,7 @@ SELECT * from information_schema.`ins_streams`; 在创建流时,可以通过 TRIGGER 指令指定流式计算的触发模式。 -对于非窗口计算,流式计算的触发是实时的;对于窗口计算,目前提供 3 种触发模式: +对于非窗口计算,流式计算的触发是实时的;对于窗口计算,目前提供 3 种触发模式,默认为 AT_ONCE: 1. AT_ONCE:写入立即触发 From ad7f9b274ba231f440f07b2cd730fdf0ea093905 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Tue, 20 Dec 2022 16:53:08 +0800 Subject: [PATCH 47/64] enh: improve unit tests --- include/libs/nodes/cmdnodes.h | 2 +- include/libs/nodes/nodes.h | 2 +- include/libs/nodes/querynodes.h | 4 +- source/client/src/clientEnv.c | 2 +- source/client/src/clientImpl.c | 6 +- source/client/src/clientRawBlockWrite.c | 48 +- source/client/src/clientSml.c | 68 ++- source/libs/nodes/src/nodesCodeFuncs.c | 565 +++++++++++++++++- source/libs/nodes/src/nodesUtilFuncs.c | 8 +- source/libs/parser/src/parAstCreater.c | 2 +- source/libs/parser/src/parAuthenticator.c | 2 +- source/libs/parser/src/parInsertSql.c | 102 ++-- source/libs/parser/src/parInsertStmt.c | 7 +- source/libs/parser/src/parTranslater.c | 10 +- .../parser/test/parAlterToBalanceTest.cpp | 4 +- source/libs/planner/src/planLogicCreater.c | 6 +- 16 files changed, 705 insertions(+), 133 deletions(-) diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index b1054e7b85..6ea76a991a 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -225,7 +225,7 @@ typedef struct SAlterUserStmt { typedef struct SDropUserStmt { ENodeType type; - char useName[TSDB_USER_LEN]; + char userName[TSDB_USER_LEN]; } SDropUserStmt; typedef struct SCreateDnodeStmt { diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 1f266cd0ef..d023e0df63 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -117,7 +117,7 @@ typedef enum ENodeType { // Statement nodes are used in parser and planner module. QUERY_NODE_SET_OPERATOR = 100, QUERY_NODE_SELECT_STMT, - QUERY_NODE_VNODE_MODIF_STMT, + QUERY_NODE_VNODE_MODIFY_STMT, QUERY_NODE_CREATE_DATABASE_STMT, QUERY_NODE_DROP_DATABASE_STMT, QUERY_NODE_ALTER_DATABASE_STMT, diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 5805f4968b..ff3e708e77 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -364,7 +364,7 @@ typedef struct SVgDataBlocks { typedef void (*FFreeDataBlockHash)(SHashObj*); typedef void (*FFreeDataBlockArray)(SArray*); -typedef struct SVnodeModifOpStmt { +typedef struct SVnodeModifyOpStmt { ENodeType nodeType; ENodeType sqlNodeType; SArray* pDataBlocks; // data block for each vgroup, SArray. @@ -388,7 +388,7 @@ typedef struct SVnodeModifOpStmt { FFreeDataBlockArray freeArrayFunc; bool usingTableProcessing; bool fileProcessing; -} SVnodeModifOpStmt; +} SVnodeModifyOpStmt; typedef struct SExplainOptions { ENodeType type; diff --git a/source/client/src/clientEnv.c b/source/client/src/clientEnv.c index 2cb337fc4c..949f028327 100644 --- a/source/client/src/clientEnv.c +++ b/source/client/src/clientEnv.c @@ -76,7 +76,7 @@ static void deregisterRequest(SRequestObj *pRequest) { "current:%d, app current:%d", pRequest->self, pTscObj->id, pRequest->requestId, duration / 1000.0, num, currentInst); - if (QUERY_NODE_VNODE_MODIF_STMT == pRequest->stmtType) { + if (QUERY_NODE_VNODE_MODIFY_STMT == pRequest->stmtType) { // tscPerf("insert duration %" PRId64 "us: syntax:%" PRId64 "us, ctg:%" PRId64 "us, semantic:%" PRId64 // "us, exec:%" PRId64 "us", // duration, pRequest->metric.syntaxEnd - pRequest->metric.syntaxStart, diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 807c752873..aef8ec1bde 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -875,7 +875,7 @@ int32_t handleQueryExecRsp(SRequestObj* pRequest) { } static bool incompletaFileParsing(SNode* pStmt) { - return QUERY_NODE_VNODE_MODIF_STMT != nodeType(pStmt) ? false : ((SVnodeModifOpStmt*)pStmt)->fileProcessing; + return QUERY_NODE_VNODE_MODIFY_STMT != nodeType(pStmt) ? false : ((SVnodeModifyOpStmt*)pStmt)->fileProcessing; } // todo refacto the error code mgmt @@ -954,7 +954,7 @@ SRequestObj* launchQueryImpl(SRequestObj* pRequest, SQuery* pQuery, bool keepQue if (pQuery->pRoot && !pRequest->inRetry) { STscObj* pTscObj = pRequest->pTscObj; SAppClusterSummary* pActivity = &pTscObj->pAppInfo->summary; - if (QUERY_NODE_VNODE_MODIF_STMT == pQuery->pRoot->type) { + if (QUERY_NODE_VNODE_MODIFY_STMT == pQuery->pRoot->type) { atomic_add_fetch_64((int64_t*)&pActivity->numOfInsertsReq, 1); } else if (QUERY_NODE_SELECT_STMT == pQuery->pRoot->type) { atomic_add_fetch_64((int64_t*)&pActivity->numOfQueryReq, 1); @@ -1059,7 +1059,7 @@ static int32_t asyncExecSchQuery(SRequestObj* pRequest, SQuery* pQuery, SMetaDat } if (TSDB_CODE_SUCCESS == code && !pRequest->validateOnly) { SArray* pNodeList = NULL; - if (QUERY_NODE_VNODE_MODIF_STMT != nodeType(pQuery->pRoot)) { + if (QUERY_NODE_VNODE_MODIFY_STMT != nodeType(pQuery->pRoot)) { buildAsyncExecNodeList(pRequest, &pNodeList, pMnodeList, pResultMeta); } diff --git a/source/client/src/clientRawBlockWrite.c b/source/client/src/clientRawBlockWrite.c index 150194aa27..0b5f670c15 100644 --- a/source/client/src/clientRawBlockWrite.c +++ b/source/client/src/clientRawBlockWrite.c @@ -1211,7 +1211,8 @@ static void destroyVgHash(void* data) { taosMemoryFreeClear(vgData->data); } -int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const char* tbname, TAOS_FIELD *fields, int numFields){ +int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const char* tbname, TAOS_FIELD* fields, + int numFields) { int32_t code = TSDB_CODE_SUCCESS; STableMeta* pTableMeta = NULL; SQuery* pQuery = NULL; @@ -1267,14 +1268,14 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch uint16_t fLen = 0; int32_t rowSize = 0; int16_t nVar = 0; - for (int i = 0; i < pTableMeta->tableInfo.numOfColumns; i++) { - SSchema* schema = pTableMeta->schema + i; - fLen += TYPE_BYTES[schema->type]; - rowSize += schema->bytes; - if (IS_VAR_DATA_TYPE(schema->type)) { - nVar++; - } + for (int i = 0; i < pTableMeta->tableInfo.numOfColumns; i++) { + SSchema* schema = pTableMeta->schema + i; + fLen += TYPE_BYTES[schema->type]; + rowSize += schema->bytes; + if (IS_VAR_DATA_TYPE(schema->type)) { + nVar++; } + } fLen -= sizeof(TSKEY); @@ -1294,7 +1295,8 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch tdSRowSetTpInfo(&rb, numOfCols, fLen); int32_t dataLen = 0; - // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column length | + // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column + // length | char* pStart = pData + getVersion1BlockMetaSize(pData, numFields); int32_t* colLength = (int32_t*)pStart; pStart += sizeof(int32_t) * numFields; @@ -1326,9 +1328,9 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch for (int32_t k = 0; k < numOfCols; k++) { const SSchema* pColumn = &pTableMeta->schema[k]; int32_t* index = taosHashGet(schemaHash, pColumn->name, strlen(pColumn->name)); - if (!index) { // add none + if (!index) { // add none tdAppendColValToRow(&rb, pColumn->colId, pColumn->type, TD_VTYPE_NONE, NULL, false, offset, k); - }else{ + } else { if (IS_VAR_DATA_TYPE(pColumn->type)) { if (pCol[*index].offset[j] != -1) { char* data = pCol[*index].pData + pCol[*index].offset[j]; @@ -1377,13 +1379,13 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); nodeStmt->pDataBlocks = taosArrayInit(1, POINTER_BYTES); SVgDataBlocks* dst = taosMemoryCalloc(1, sizeof(SVgDataBlocks)); @@ -1406,7 +1408,7 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch launchQueryImpl(pRequest, pQuery, true, NULL); code = pRequest->code; - end: +end: taosMemoryFreeClear(pTableMeta); qDestroyQuery(pQuery); taosMemoryFree(subReq); @@ -1495,7 +1497,8 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname) tdSRowSetTpInfo(&rb, numOfCols, fLen); int32_t dataLen = 0; - // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column length | + // | version | total length | total rows | total columns | flag seg| block group id | column schema | each column + // length | char* pStart = pData + getVersion1BlockMetaSize(pData, numOfCols); int32_t* colLength = (int32_t*)pStart; pStart += sizeof(int32_t) * numOfCols; @@ -1568,13 +1571,13 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname) pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); nodeStmt->pDataBlocks = taosArrayInit(1, POINTER_BYTES); SVgDataBlocks* dst = taosMemoryCalloc(1, sizeof(SVgDataBlocks)); @@ -1825,13 +1828,13 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) { pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); int32_t numOfVg = taosHashGetSize(pVgHash); nodeStmt->pDataBlocks = taosArrayInit(numOfVg, POINTER_BYTES); @@ -1873,7 +1876,6 @@ end: return code; } - static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) { int32_t code = TSDB_CODE_SUCCESS; SHashObj* pVgHash = NULL; @@ -2131,13 +2133,13 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->haveResultSet = false; pQuery->msgType = TDMT_VND_SUBMIT; - pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + pQuery->pRoot = (SNode*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pQuery->pRoot) { uError("create pQuery->pRoot error"); code = TSDB_CODE_OUT_OF_MEMORY; goto end; } - SVnodeModifOpStmt* nodeStmt = (SVnodeModifOpStmt*)(pQuery->pRoot); + SVnodeModifyOpStmt* nodeStmt = (SVnodeModifyOpStmt*)(pQuery->pRoot); int32_t numOfVg = taosHashGetSize(pVgHash); nodeStmt->pDataBlocks = taosArrayInit(numOfVg, POINTER_BYTES); @@ -2167,7 +2169,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen) launchQueryImpl(pRequest, pQuery, true, NULL); code = pRequest->code; - end: +end: tDeleteSTaosxRsp(&rspObj.rsp); rspObj.resInfo.pRspMsg = NULL; doFreeReqResultInfo(&rspObj.resInfo); diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index a4e943da32..8c77ef664a 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -163,9 +163,9 @@ typedef struct { SMLProtocolType protocol; int8_t precision; - bool dataFormat; // true means that the name and order of keys in each line are the same(only for influx protocol) - bool isRawLine; - int32_t ttl; + bool dataFormat; // true means that the name and order of keys in each line are the same(only for influx protocol) + bool isRawLine; + int32_t ttl; SHashObj *childTables; SHashObj *superTables; @@ -183,20 +183,20 @@ typedef struct { SHashObj *dumplicateKey; // for dumplicate key SArray *colsContainer; // for cols parse, if dataFormat == false - cJSON *root; // for parse json + cJSON *root; // for parse json } SSmlHandle; //================================================================================================= //================================================================================================= static volatile int64_t linesSmlHandleId = 0; static int64_t smlGenId() { - int64_t id; + int64_t id; - do { - id = atomic_add_fetch_64(&linesSmlHandleId, 1); + do { + id = atomic_add_fetch_64(&linesSmlHandleId, 1); } while (id == 0); - return id; + return id; } static inline bool smlDoubleToInt64OverFlow(double num) { @@ -606,7 +606,7 @@ static int32_t smlModifyDBSchemas(SSmlHandle *info) { end: taosHashCleanup(hashTmp); taosMemoryFreeClear(pTableMeta); -// catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1); + // catalogRefreshTableMeta(info->pCatalog, &conn, &pName, 1); return code; } @@ -1534,7 +1534,7 @@ static SSmlHandle *smlBuildSmlInfo(STscObj *pTscObj, SRequestObj *request, SMLPr info->pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; info->pQuery->haveResultSet = false; info->pQuery->msgType = TDMT_VND_SUBMIT; - info->pQuery->pRoot = (SNode *)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + info->pQuery->pRoot = (SNode *)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == info->pQuery->pRoot) { uError("SML:0x%" PRIx64 " create info->pQuery->pRoot error", info->id); goto cleanup; @@ -2079,7 +2079,8 @@ static int32_t smlParseJSONString(SSmlHandle *info, cJSON *root, SSmlTableInfo * static int32_t smlParseInfluxLine(SSmlHandle *info, const char *sql, const int len) { SSmlLineInfo elements = {0}; - uDebug("SML:0x%" PRIx64 " smlParseInfluxLine raw:%d, len:%d, sql:%s", info->id, info->isRawLine, len, (info->isRawLine ? "rawdata" : sql)); + uDebug("SML:0x%" PRIx64 " smlParseInfluxLine raw:%d, len:%d, sql:%s", info->id, info->isRawLine, len, + (info->isRawLine ? "rawdata" : sql)); int ret = smlParseInfluxString(sql, sql + len, &elements, &info->msgBuf); if (ret != TSDB_CODE_SUCCESS) { @@ -2371,15 +2372,16 @@ static int32_t smlInsertData(SSmlHandle *info) { } static void smlPrintStatisticInfo(SSmlHandle *info) { - uError("SML:0x%" PRIx64 - " smlInsertLines result, code:%d,lineNum:%d,stable num:%d,ctable num:%d,create stable num:%d,alter stable tag num:%d,alter stable col num:%d \ + uError( + "SML:0x%" PRIx64 + " smlInsertLines result, code:%d,lineNum:%d,stable num:%d,ctable num:%d,create stable num:%d,alter stable tag num:%d,alter stable col num:%d \ parse cost:%" PRId64 ",schema cost:%" PRId64 ",bind cost:%" PRId64 ",rpc cost:%" PRId64 ",total cost:%" PRId64 - "", - info->id, info->cost.code, info->cost.lineNum, info->cost.numOfSTables, info->cost.numOfCTables, - info->cost.numOfCreateSTables, info->cost.numOfAlterTagSTables, info->cost.numOfAlterColSTables, - info->cost.schemaTime - info->cost.parseTime, - info->cost.insertBindTime - info->cost.schemaTime, info->cost.insertRpcTime - info->cost.insertBindTime, - info->cost.endTime - info->cost.insertRpcTime, info->cost.endTime - info->cost.parseTime); + "", + info->id, info->cost.code, info->cost.lineNum, info->cost.numOfSTables, info->cost.numOfCTables, + info->cost.numOfCreateSTables, info->cost.numOfAlterTagSTables, info->cost.numOfAlterColSTables, + info->cost.schemaTime - info->cost.parseTime, info->cost.insertBindTime - info->cost.schemaTime, + info->cost.insertRpcTime - info->cost.insertBindTime, info->cost.endTime - info->cost.insertRpcTime, + info->cost.endTime - info->cost.parseTime); } static int32_t smlParseLine(SSmlHandle *info, char *lines[], char *rawLine, char *rawLineEnd, int numLines) { @@ -2593,7 +2595,7 @@ TAOS_RES *taos_schemaless_insert_inner(SRequestObj *request, char *lines[], char } info->isRawLine = (rawLine == NULL); - info->ttl = ttl; + info->ttl = ttl; int32_t perBatch = tsSmlBatchSize; @@ -2684,16 +2686,19 @@ TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int pr return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, TSDB_DEFAULT_TABLE_TTL, 0); } -TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int32_t ttl) { +TAOS_RES *taos_schemaless_insert_ttl(TAOS *taos, char *lines[], int numLines, int protocol, int precision, + int32_t ttl) { return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, ttl, 0); } -TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision, int64_t reqid) { - return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, TSDB_DEFAULT_TABLE_TTL, reqid); +TAOS_RES *taos_schemaless_insert_with_reqid(TAOS *taos, char *lines[], int numLines, int protocol, int precision, + int64_t reqid) { + return taos_schemaless_insert_ttl_with_reqid(taos, lines, numLines, protocol, precision, TSDB_DEFAULT_TABLE_TTL, + reqid); } TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, - int precision, int32_t ttl, int64_t reqid) { + int precision, int32_t ttl, int64_t reqid) { if (NULL == taos) { terrno = TSDB_CODE_TSC_DISCONNECTED; return NULL; @@ -2727,13 +2732,18 @@ TAOS_RES *taos_schemaless_insert_raw_ttl_with_reqid(TAOS *taos, char *lines, int return taos_schemaless_insert_inner(request, NULL, lines, lines + len, numLines, protocol, precision, ttl); } -TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int64_t reqid) { - return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, TSDB_DEFAULT_TABLE_TTL, reqid); +TAOS_RES *taos_schemaless_insert_raw_with_reqid(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, + int precision, int64_t reqid) { + return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, + TSDB_DEFAULT_TABLE_TTL, reqid); } -TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision, int32_t ttl) { +TAOS_RES *taos_schemaless_insert_raw_ttl(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, + int precision, int32_t ttl) { return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, ttl, 0); } -TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, int precision) { - return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, TSDB_DEFAULT_TABLE_TTL, 0); +TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len, int32_t *totalRows, int protocol, + int precision) { + return taos_schemaless_insert_raw_ttl_with_reqid(taos, lines, len, totalRows, protocol, precision, + TSDB_DEFAULT_TABLE_TTL, 0); } diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index a93ea4bbcd..af0b325f84 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -91,7 +91,7 @@ const char* nodesNodeName(ENodeType type) { return "SetOperator"; case QUERY_NODE_SELECT_STMT: return "SelectStmt"; - case QUERY_NODE_VNODE_MODIF_STMT: + case QUERY_NODE_VNODE_MODIFY_STMT: return "VnodeModifStmt"; case QUERY_NODE_CREATE_DATABASE_STMT: return "CreateDatabaseStmt"; @@ -141,12 +141,18 @@ const char* nodesNodeName(ENodeType type) { return "CreateQnodeStmt"; case QUERY_NODE_DROP_QNODE_STMT: return "DropQnodeStmt"; + case QUERY_NODE_DROP_SNODE_STMT: + return "DropSnodeStmt"; + case QUERY_NODE_DROP_MNODE_STMT: + return "DropMnodeStmt"; case QUERY_NODE_CREATE_TOPIC_STMT: return "CreateTopicStmt"; case QUERY_NODE_DROP_TOPIC_STMT: return "DropTopicStmt"; case QUERY_NODE_ALTER_LOCAL_STMT: return "AlterLocalStmt"; + case QUERY_NODE_DROP_STREAM_STMT: + return "DropStreamStmt"; case QUERY_NODE_SPLIT_VGROUP_STMT: return "SplitVgroupStmt"; case QUERY_NODE_SHOW_DNODES_STMT: @@ -161,6 +167,8 @@ const char* nodesNodeName(ENodeType type) { return "ShowSnodesStmt"; case QUERY_NODE_SHOW_BNODES_STMT: return "ShowBnodesStmt"; + case QUERY_NODE_SHOW_CLUSTER_STMT: + return "ShowClusterStmt"; case QUERY_NODE_SHOW_DATABASES_STMT: return "ShowDatabaseStmt"; case QUERY_NODE_SHOW_FUNCTIONS_STMT: @@ -189,10 +197,26 @@ const char* nodesNodeName(ENodeType type) { return "ShowQueriesStmt"; case QUERY_NODE_SHOW_VARIABLES_STMT: return "ShowVariablesStmt"; + case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: + return "ShowDnodeVariablesStmt"; + case QUERY_NODE_SHOW_TRANSACTIONS_STMT: + return "ShowTransactionsStmt"; + case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: + return "ShowSubscriptionsStmt"; case QUERY_NODE_SHOW_VNODES_STMT: return "ShowVnodeStmt"; case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: return "ShowUserPrivilegesStmt"; + case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: + return "ShowCreateDatabasesStmt"; + case QUERY_NODE_SHOW_CREATE_TABLE_STMT: + return "ShowCreateTablesStmt"; + case QUERY_NODE_SHOW_CREATE_STABLE_STMT: + return "ShowCreateStablesStmt"; + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + return "ShowTableDistributedStmt"; + case QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT: + return "ShowLocalVariablesStmt"; case QUERY_NODE_SHOW_TABLE_TAGS_STMT: return "ShowTableTagsStmt"; case QUERY_NODE_DELETE_STMT: @@ -3581,6 +3605,51 @@ static int32_t jsonToTempTableNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkJoinTableJoinType = "JoinType"; +static const char* jkJoinTableLeft = "Left"; +static const char* jkJoinTableRight = "Right"; +static const char* jkJoinTableOnCond = "OnCond"; + +static int32_t joinTableNodeToJson(const void* pObj, SJson* pJson) { + const SJoinTableNode* pNode = (const SJoinTableNode*)pObj; + + int32_t code = tableNodeToJson(pObj, pJson); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkJoinTableJoinType, pNode->joinType); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkJoinTableLeft, nodeToJson, pNode->pLeft); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkJoinTableRight, nodeToJson, pNode->pRight); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkJoinTableOnCond, nodeToJson, pNode->pOnCond); + } + + return code; +} + +static int32_t jsonToJoinTableNode(const SJson* pJson, void* pObj) { + SJoinTableNode* pNode = (SJoinTableNode*)pObj; + + int32_t code = jsonToTableNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + tjsonGetNumberValue(pJson, jkJoinTableJoinType, pNode->joinType, code); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinTableLeft, &pNode->pLeft); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinTableRight, &pNode->pRight); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinTableOnCond, &pNode->pOnCond); + } + + return code; +} + static const char* jkGroupingSetType = "GroupingSetType"; static const char* jkGroupingSetParameter = "Parameters"; @@ -4410,6 +4479,39 @@ static int32_t jsonToSelectStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkVnodeModifyOpStmtSqlNodeType = "SqlNodeType"; +static const char* jkVnodeModifyOpStmtTotalRowsNum = "TotalRowsNum"; +static const char* jkVnodeModifyOpStmtTotalTbNum = "TotalTbNum"; + +static int32_t vnodeModifyStmtToJson(const void* pObj, SJson* pJson) { + const SVnodeModifyOpStmt* pNode = (const SVnodeModifyOpStmt*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkVnodeModifyOpStmtSqlNodeType, pNode->sqlNodeType); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkVnodeModifyOpStmtTotalRowsNum, pNode->totalRowsNum); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkVnodeModifyOpStmtTotalTbNum, pNode->totalTbNum); + } + + return code; +} + +static int32_t jsonToVnodeModifyStmt(const SJson* pJson, void* pObj) { + SVnodeModifyOpStmt* pNode = (SVnodeModifyOpStmt*)pObj; + + int32_t code = TSDB_CODE_SUCCESS; + tjsonGetNumberValue(pJson, jkVnodeModifyOpStmtSqlNodeType, pNode->sqlNodeType, code); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkVnodeModifyOpStmtTotalRowsNum, &pNode->totalRowsNum); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkVnodeModifyOpStmtTotalTbNum, &pNode->totalTbNum); + } + + return code; +} + static const char* jkAlterDatabaseStmtDbName = "DbName"; static const char* jkAlterDatabaseStmtOptions = "Options"; @@ -4460,6 +4562,82 @@ static int32_t jsonToTrimDatabaseStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropTableClauseDbName = "DbName"; +static const char* jkDropTableClauseTableName = "TableName"; +static const char* jkDropTableClauseIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropTableClauseToJson(const void* pObj, SJson* pJson) { + const SDropTableClause* pNode = (const SDropTableClause*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropTableClauseDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropTableClauseTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropTableClauseIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropTableClause(const SJson* pJson, void* pObj) { + SDropTableClause* pNode = (SDropTableClause*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropTableClauseDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropTableClauseTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropTableClauseIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + +static const char* jkDropTableStmtTables = "Tables"; + +static int32_t dropTableStmtToJson(const void* pObj, SJson* pJson) { + const SDropTableStmt* pNode = (const SDropTableStmt*)pObj; + return nodeListToJson(pJson, jkDropTableStmtTables, pNode->pTables); +} + +static int32_t jsonToDropTableStmt(const SJson* pJson, void* pObj) { + SDropTableStmt* pNode = (SDropTableStmt*)pObj; + return jsonToNodeList(pJson, jkDropTableStmtTables, &pNode->pTables); +} + +static const char* jkDropSuperTableStmtDbName = "DbName"; +static const char* jkDropSuperTableStmtTableName = "TableName"; +static const char* jkDropSuperTableStmtIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropStableStmtToJson(const void* pObj, SJson* pJson) { + const SDropSuperTableStmt* pNode = (const SDropSuperTableStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropSuperTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropSuperTableStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropSuperTableStmtIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropStableStmt(const SJson* pJson, void* pObj) { + SDropSuperTableStmt* pNode = (SDropSuperTableStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropSuperTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropSuperTableStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropSuperTableStmtIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + static const char* jkAlterTableStmtDbName = "DbName"; static const char* jkAlterTableStmtTableName = "TableName"; static const char* jkAlterTableStmtAlterType = "AlterType"; @@ -4527,6 +4705,18 @@ static int32_t jsonToAlterTableStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropUserStmtUserName = "UserName"; + +static int32_t dropUserStmtToJson(const void* pObj, SJson* pJson) { + const SDropUserStmt* pNode = (const SDropUserStmt*)pObj; + return tjsonAddStringToObject(pJson, jkDropUserStmtUserName, pNode->userName); +} + +static int32_t jsonToDropUserStmt(const SJson* pJson, void* pObj) { + SDropUserStmt* pNode = (SDropUserStmt*)pObj; + return tjsonGetStringValue(pJson, jkDropUserStmtUserName, pNode->userName); +} + static const char* jkUseDatabaseStmtDbName = "DbName"; static int32_t useDatabaseStmtToJson(const void* pObj, SJson* pJson) { @@ -4571,6 +4761,69 @@ static int32_t jsonToAlterDnodeStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropComponentNodeStmtDnodeId = "DnodeId"; + +static int32_t dropComponentNodeStmtToJson(const void* pObj, SJson* pJson) { + const SDropComponentNodeStmt* pNode = (const SDropComponentNodeStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkDropComponentNodeStmtDnodeId, pNode->dnodeId); +} + +static int32_t jsonToDropComponentNodeStmt(const SJson* pJson, void* pObj) { + SDropComponentNodeStmt* pNode = (SDropComponentNodeStmt*)pObj; + return tjsonGetIntValue(pJson, jkDropComponentNodeStmtDnodeId, &pNode->dnodeId); +} + +static int32_t dropQnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } + +static int32_t jsonToDropQnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } + +static int32_t dropSnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } + +static int32_t jsonToDropSnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } + +static int32_t dropMnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } + +static int32_t jsonToDropMnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } + +static const char* jkDropDnodeStmtDnodeId = "DnodeId"; +static const char* jkDropDnodeStmtFqdn = "Fqdn"; +static const char* jkDropDnodeStmtPort = "Port"; +static const char* jkDropDnodeStmtForce = "Force"; + +static int32_t dropDnodeStmtToJson(const void* pObj, SJson* pJson) { + const SDropDnodeStmt* pNode = (const SDropDnodeStmt*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkDropDnodeStmtDnodeId, pNode->dnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropDnodeStmtFqdn, pNode->fqdn); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkDropDnodeStmtPort, pNode->port); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropDnodeStmtForce, pNode->force); + } + + return code; +} + +static int32_t jsonToDropDnodeStmt(const SJson* pJson, void* pObj) { + SDropDnodeStmt* pNode = (SDropDnodeStmt*)pObj; + + int32_t code = tjsonGetIntValue(pJson, jkDropDnodeStmtDnodeId, &pNode->dnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropDnodeStmtFqdn, pNode->fqdn); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkDropDnodeStmtPort, &pNode->port); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropDnodeStmtForce, &pNode->force); + } + + return code; +} + static const char* jkCreateTopicStmtTopicName = "TopicName"; static const char* jkCreateTopicStmtSubscribeDbName = "SubscribeDbName"; static const char* jkCreateTopicStmtIgnoreExists = "IgnoreExists"; @@ -4610,6 +4863,56 @@ static int32_t jsonToCreateTopicStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropTopicStmtTopicName = "TopicName"; +static const char* jkDropTopicStmtIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropTopicStmtToJson(const void* pObj, SJson* pJson) { + const SDropTopicStmt* pNode = (const SDropTopicStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropTopicStmtTopicName, pNode->topicName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropTopicStmtIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropTopicStmt(const SJson* pJson, void* pObj) { + SDropTopicStmt* pNode = (SDropTopicStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropTopicStmtTopicName, pNode->topicName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropTopicStmtIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + +static const char* jkDropStreamStmtStreamName = "StreamName"; +static const char* jkDropStreamStmtIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropStreamStmtToJson(const void* pObj, SJson* pJson) { + const SDropStreamStmt* pNode = (const SDropStreamStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropStreamStmtStreamName, pNode->streamName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropStreamStmtIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropStreamStmt(const SJson* pJson, void* pObj) { + SDropStreamStmt* pNode = (SDropStreamStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropStreamStmtStreamName, pNode->streamName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropStreamStmtIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + static const char* jkSplitVgroupStmtVgroupId = "VgroupId"; static int32_t splitVgroupStmtToJson(const void* pObj, SJson* pJson) { @@ -4654,10 +4957,42 @@ static int32_t jsonToShowStmt(const SJson* pJson, void* pObj) { return code; } +static int32_t showDnodesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowDnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showMnodesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowMnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showQnodesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowQnodesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showClusterStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowClusterStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static int32_t showDatabasesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } static int32_t jsonToShowDatabasesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static int32_t showFunctionsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowFunctionsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showIndexesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowIndexesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showStablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowStablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showStreamsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowStreamsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static int32_t showTablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } static int32_t jsonToShowTablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } @@ -4674,10 +5009,47 @@ static int32_t showVgroupsStmtToJson(const void* pObj, SJson* pJson) { return sh static int32_t jsonToShowVgroupsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static int32_t showConsumersStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowConsumersStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static int32_t showVariablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } static int32_t jsonToShowVariablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static const char* jkShowDnodeVariablesStmtDnodeId = "DnodeId"; +static const char* jkShowDnodeVariablesStmtLikePattern = "LikePattern"; + +static int32_t showDnodeVariablesStmtToJson(const void* pObj, SJson* pJson) { + const SShowDnodeVariablesStmt* pNode = (const SShowDnodeVariablesStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkShowDnodeVariablesStmtDnodeId, nodeToJson, pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkShowDnodeVariablesStmtLikePattern, nodeToJson, pNode->pLikePattern); + } + + return code; +} + +static int32_t jsonToShowDnodeVariablesStmt(const SJson* pJson, void* pObj) { + SShowDnodeVariablesStmt* pNode = (SShowDnodeVariablesStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkShowDnodeVariablesStmtDnodeId, &pNode->pDnodeId); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkShowDnodeVariablesStmtLikePattern, &pNode->pLikePattern); + } + + return code; +} + +static int32_t showTransactionsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowTransactionsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + +static int32_t showSubscriptionsStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowSubscriptionsStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static const char* jkShowVnodesStmtDnodeId = "DnodeId"; static const char* jkShowVnodesStmtDnodeEndpoint = "DnodeEndpoint"; @@ -4707,6 +5079,80 @@ static int32_t showUserPrivilegesStmtToJson(const void* pObj, SJson* pJson) { re static int32_t jsonToShowUserPrivilegesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } +static const char* jkShowCreateDatabaseStmtDbName = "DbName"; + +static int32_t showCreateDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const SShowCreateDatabaseStmt* pNode = (const SShowCreateDatabaseStmt*)pObj; + return tjsonAddStringToObject(pJson, jkShowCreateDatabaseStmtDbName, pNode->dbName); +} + +static int32_t jsonToShowCreateDatabaseStmt(const SJson* pJson, void* pObj) { + SShowCreateDatabaseStmt* pNode = (SShowCreateDatabaseStmt*)pObj; + return tjsonGetStringValue(pJson, jkShowCreateDatabaseStmtDbName, pNode->dbName); +} + +static const char* jkShowCreateTableStmtDbName = "DbName"; +static const char* jkShowCreateTableStmtTableName = "TableName"; + +static int32_t showCreateTableStmtToJson(const void* pObj, SJson* pJson) { + const SShowCreateTableStmt* pNode = (const SShowCreateTableStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkShowCreateTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkShowCreateTableStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t jsonToShowCreateTableStmt(const SJson* pJson, void* pObj) { + SShowCreateTableStmt* pNode = (SShowCreateTableStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkShowCreateTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkShowCreateTableStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t showCreateStableStmtToJson(const void* pObj, SJson* pJson) { + return showCreateTableStmtToJson(pObj, pJson); +} + +static int32_t jsonToShowCreateStableStmt(const SJson* pJson, void* pObj) { + return jsonToShowCreateTableStmt(pJson, pObj); +} + +static const char* jkShowTableDistributedStmtDbName = "DbName"; +static const char* jkShowTableDistributedStmtTableName = "TableName"; + +static int32_t showTableDistributedStmtToJson(const void* pObj, SJson* pJson) { + const SShowTableDistributedStmt* pNode = (const SShowTableDistributedStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkShowTableDistributedStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkShowTableDistributedStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t jsonToShowTableDistributedStmt(const SJson* pJson, void* pObj) { + SShowTableDistributedStmt* pNode = (SShowTableDistributedStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkShowTableDistributedStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkShowTableDistributedStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t showLocalVariablesStmtToJson(const void* pObj, SJson* pJson) { return showStmtToJson(pObj, pJson); } + +static int32_t jsonToShowLocalVariablesStmt(const SJson* pJson, void* pObj) { return jsonToShowStmt(pJson, pObj); } + static const char* jkShowTableTagsStmtDbName = "DbName"; static const char* jkShowTableTagsStmtTbName = "TbName"; static const char* jkShowTableTagsStmtTags = "Tags"; @@ -4823,7 +5269,7 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_TEMP_TABLE: return tempTableNodeToJson(pObj, pJson); case QUERY_NODE_JOIN_TABLE: - break; + return joinTableNodeToJson(pObj, pJson); case QUERY_NODE_GROUPING_SET: return groupingSetNodeToJson(pObj, pJson); case QUERY_NODE_ORDER_BY_EXPR: @@ -4866,7 +5312,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return setOperatorToJson(pObj, pJson); case QUERY_NODE_SELECT_STMT: return selectStmtToJson(pObj, pJson); - case QUERY_NODE_VNODE_MODIF_STMT: + case QUERY_NODE_VNODE_MODIFY_STMT: + return vnodeModifyStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_DATABASE_STMT: break; case QUERY_NODE_ALTER_DATABASE_STMT: @@ -4875,18 +5322,54 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return trimDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TABLE_STMT: break; + case QUERY_NODE_DROP_TABLE_CLAUSE: + return dropTableClauseToJson(pObj, pJson); + case QUERY_NODE_DROP_TABLE_STMT: + return dropTableStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_SUPER_TABLE_STMT: + return dropStableStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_TABLE_STMT: return alterTableStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_USER_STMT: + return dropUserStmtToJson(pObj, pJson); case QUERY_NODE_USE_DATABASE_STMT: return useDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_DNODE_STMT: + return dropDnodeStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_DNODE_STMT: return alterDnodeStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_QNODE_STMT: + return dropQnodeStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_SNODE_STMT: + return dropSnodeStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_MNODE_STMT: + return dropMnodeStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TOPIC_STMT: return createTopicStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_TOPIC_STMT: + return dropTopicStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_STREAM_STMT: + return dropStreamStmtToJson(pObj, pJson); case QUERY_NODE_SPLIT_VGROUP_STMT: return splitVgroupStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_DNODES_STMT: + return showDnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_MNODES_STMT: + return showMnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_QNODES_STMT: + return showQnodesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CLUSTER_STMT: + return showClusterStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_DATABASES_STMT: return showDatabasesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_FUNCTIONS_STMT: + return showFunctionsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_INDEXES_STMT: + return showIndexesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_STABLES_STMT: + return showStablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_STREAMS_STMT: + return showStreamsStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_TABLES_STMT: return showTablesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_TAGS_STMT: @@ -4895,12 +5378,30 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return showUsersStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_VGROUPS_STMT: return showVgroupsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CONSUMERS_STMT: + return showConsumersStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_VARIABLES_STMT: return showVariablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: + return showDnodeVariablesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TRANSACTIONS_STMT: + return showTransactionsStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: + return showSubscriptionsStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_VNODES_STMT: return showVnodesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: return showUserPrivilegesStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: + return showCreateDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CREATE_TABLE_STMT: + return showCreateTableStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_CREATE_STABLE_STMT: + return showCreateStableStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + return showTableDistributedStmtToJson(pObj, pJson); + case QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT: + return showLocalVariablesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_TABLE_TAGS_STMT: return showTableTagsStmtToJson(pObj, pJson); case QUERY_NODE_DELETE_STMT: @@ -5023,6 +5524,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToRealTableNode(pJson, pObj); case QUERY_NODE_TEMP_TABLE: return jsonToTempTableNode(pJson, pObj); + case QUERY_NODE_JOIN_TABLE: + return jsonToJoinTableNode(pJson, pObj); case QUERY_NODE_GROUPING_SET: return jsonToGroupingSetNode(pJson, pObj); case QUERY_NODE_ORDER_BY_EXPR: @@ -5061,22 +5564,60 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToSetOperator(pJson, pObj); case QUERY_NODE_SELECT_STMT: return jsonToSelectStmt(pJson, pObj); + case QUERY_NODE_VNODE_MODIFY_STMT: + return jsonToVnodeModifyStmt(pJson, pObj); case QUERY_NODE_ALTER_DATABASE_STMT: return jsonToAlterDatabaseStmt(pJson, pObj); case QUERY_NODE_TRIM_DATABASE_STMT: return jsonToTrimDatabaseStmt(pJson, pObj); + case QUERY_NODE_DROP_TABLE_CLAUSE: + return jsonToDropTableClause(pJson, pObj); + case QUERY_NODE_DROP_TABLE_STMT: + return jsonToDropTableStmt(pJson, pObj); + case QUERY_NODE_DROP_SUPER_TABLE_STMT: + return jsonToDropStableStmt(pJson, pObj); case QUERY_NODE_ALTER_TABLE_STMT: return jsonToAlterTableStmt(pJson, pObj); + case QUERY_NODE_DROP_USER_STMT: + return jsonToDropUserStmt(pJson, pObj); case QUERY_NODE_USE_DATABASE_STMT: return jsonToUseDatabaseStmt(pJson, pObj); + case QUERY_NODE_DROP_DNODE_STMT: + return jsonToDropDnodeStmt(pJson, pObj); case QUERY_NODE_ALTER_DNODE_STMT: return jsonToAlterDnodeStmt(pJson, pObj); + case QUERY_NODE_DROP_QNODE_STMT: + return jsonToDropQnodeStmt(pJson, pObj); + case QUERY_NODE_DROP_SNODE_STMT: + return jsonToDropSnodeStmt(pJson, pObj); + case QUERY_NODE_DROP_MNODE_STMT: + return jsonToDropMnodeStmt(pJson, pObj); case QUERY_NODE_CREATE_TOPIC_STMT: return jsonToCreateTopicStmt(pJson, pObj); + case QUERY_NODE_DROP_TOPIC_STMT: + return jsonToDropTopicStmt(pJson, pObj); + case QUERY_NODE_DROP_STREAM_STMT: + return jsonToDropStreamStmt(pJson, pObj); case QUERY_NODE_SPLIT_VGROUP_STMT: return jsonToSplitVgroupStmt(pJson, pObj); + case QUERY_NODE_SHOW_DNODES_STMT: + return jsonToShowDnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_MNODES_STMT: + return jsonToShowMnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_QNODES_STMT: + return jsonToShowQnodesStmt(pJson, pObj); + case QUERY_NODE_SHOW_CLUSTER_STMT: + return jsonToShowClusterStmt(pJson, pObj); case QUERY_NODE_SHOW_DATABASES_STMT: return jsonToShowDatabasesStmt(pJson, pObj); + case QUERY_NODE_SHOW_FUNCTIONS_STMT: + return jsonToShowFunctionsStmt(pJson, pObj); + case QUERY_NODE_SHOW_INDEXES_STMT: + return jsonToShowIndexesStmt(pJson, pObj); + case QUERY_NODE_SHOW_STABLES_STMT: + return jsonToShowStablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_STREAMS_STMT: + return jsonToShowStreamsStmt(pJson, pObj); case QUERY_NODE_SHOW_TABLES_STMT: return jsonToShowTablesStmt(pJson, pObj); case QUERY_NODE_SHOW_TAGS_STMT: @@ -5085,12 +5626,30 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToShowUsersStmt(pJson, pObj); case QUERY_NODE_SHOW_VGROUPS_STMT: return jsonToShowVgroupsStmt(pJson, pObj); + case QUERY_NODE_SHOW_CONSUMERS_STMT: + return jsonToShowConsumersStmt(pJson, pObj); case QUERY_NODE_SHOW_VARIABLES_STMT: return jsonToShowVariablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: + return jsonToShowDnodeVariablesStmt(pJson, pObj); + case QUERY_NODE_SHOW_TRANSACTIONS_STMT: + return jsonToShowTransactionsStmt(pJson, pObj); + case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: + return jsonToShowSubscriptionsStmt(pJson, pObj); case QUERY_NODE_SHOW_VNODES_STMT: return jsonToShowVnodesStmt(pJson, pObj); case QUERY_NODE_SHOW_USER_PRIVILEGES_STMT: return jsonToShowUserPrivilegesStmt(pJson, pObj); + case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: + return jsonToShowCreateDatabaseStmt(pJson, pObj); + case QUERY_NODE_SHOW_CREATE_TABLE_STMT: + return jsonToShowCreateTableStmt(pJson, pObj); + case QUERY_NODE_SHOW_CREATE_STABLE_STMT: + return jsonToShowCreateStableStmt(pJson, pObj); + case QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT: + return jsonToShowTableDistributedStmt(pJson, pObj); + case QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT: + return jsonToShowLocalVariablesStmt(pJson, pObj); case QUERY_NODE_SHOW_TABLE_TAGS_STMT: return jsonToShowTableTagsStmt(pJson, pObj); case QUERY_NODE_DELETE_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 7980c58dcf..1981272785 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -305,8 +305,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SSetOperator)); case QUERY_NODE_SELECT_STMT: return makeNode(type, sizeof(SSelectStmt)); - case QUERY_NODE_VNODE_MODIF_STMT: - return makeNode(type, sizeof(SVnodeModifOpStmt)); + case QUERY_NODE_VNODE_MODIFY_STMT: + return makeNode(type, sizeof(SVnodeModifyOpStmt)); case QUERY_NODE_CREATE_DATABASE_STMT: return makeNode(type, sizeof(SCreateDatabaseStmt)); case QUERY_NODE_DROP_DATABASE_STMT: @@ -818,8 +818,8 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode((SNode*)pStmt->pSlimit); break; } - case QUERY_NODE_VNODE_MODIF_STMT: { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pNode; + case QUERY_NODE_VNODE_MODIFY_STMT: { + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pNode; destroyVgDataBlockArray(pStmt->pDataBlocks); taosMemoryFreeClear(pStmt->pTableMeta); taosHashCleanup(pStmt->pVgroupsHashObj); diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 446f758ed7..3307f560dc 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1474,7 +1474,7 @@ SNode* createDropUserStmt(SAstCreateContext* pCxt, SToken* pUserName) { } SDropUserStmt* pStmt = (SDropUserStmt*)nodesMakeNode(QUERY_NODE_DROP_USER_STMT); CHECK_OUT_OF_MEM(pStmt); - COPY_STRING_FORM_ID_TOKEN(pStmt->useName, pUserName); + COPY_STRING_FORM_ID_TOKEN(pStmt->userName, pUserName); return (SNode*)pStmt; } diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index f7ab4fccbe..f7950da0d3 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -78,7 +78,7 @@ static int32_t authSetOperator(SAuthCxt* pCxt, SSetOperator* pSetOper) { } static int32_t authDropUser(SAuthCxt* pCxt, SDropUserStmt* pStmt) { - if (!pCxt->pParseCxt->isSuperUser || 0 == strcmp(pStmt->useName, TSDB_DEFAULT_USER)) { + if (!pCxt->pParseCxt->isSuperUser || 0 == strcmp(pStmt->userName, TSDB_DEFAULT_USER)) { return TSDB_CODE_PAR_PERMISSION_DENIED; } return TSDB_CODE_SUCCESS; diff --git a/source/libs/parser/src/parInsertSql.c b/source/libs/parser/src/parInsertSql.c index a6bead89aa..6b716f2064 100644 --- a/source/libs/parser/src/parInsertSql.c +++ b/source/libs/parser/src/parInsertSql.c @@ -155,7 +155,7 @@ static int32_t ignoreUsingClause(SInsertParseContext* pCxt, const char** pSql) { return code; } -static int32_t parseDuplicateUsingClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pDuplicate) { +static int32_t parseDuplicateUsingClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool* pDuplicate) { *pDuplicate = false; char tbFName[TSDB_TABLE_FNAME_LEN]; @@ -518,7 +518,7 @@ static int32_t parseTagToken(const char** end, SToken* pToken, SSchema* pSchema, // input pStmt->pSql: [(tag1_name, ...)] TAGS (tag1_value, ...) ... // output pStmt->pSql: TAGS (tag1_value, ...) ... -static int32_t parseBoundTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseBoundTagsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SSchema* pTagsSchema = getTableTagSchema(pStmt->pTableMeta); insSetBoundColumnInfo(&pCxt->tags, pTagsSchema, getNumOfTags(pStmt->pTableMeta)); @@ -533,7 +533,7 @@ static int32_t parseBoundTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt return parseBoundColumns(pCxt, &pStmt->pSql, true, &pCxt->tags, pTagsSchema); } -static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SSchema* pTagSchema, SToken* pToken, +static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SSchema* pTagSchema, SToken* pToken, SArray* pTagName, SArray* pTagVals, STag** pTag) { if (!isNullValue(pTagSchema->type, pToken)) { taosArrayPush(pTagName, pTagSchema->name); @@ -561,7 +561,7 @@ static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt return code; } -static void buildCreateTbReq(SVnodeModifOpStmt* pStmt, STag* pTag, SArray* pTagName) { +static void buildCreateTbReq(SVnodeModifyOpStmt* pStmt, STag* pTag, SArray* pTagName) { insBuildCreateTbReq(&pStmt->createTblReq, pStmt->targetTableName.tname, pTag, pStmt->pTableMeta->suid, pStmt->usingTableName.tname, pTagName, pStmt->pTableMeta->tableInfo.numOfTags, TSDB_DEFAULT_TABLE_TTL); @@ -591,7 +591,7 @@ static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMs } // pSql -> tag1_value, ...) -static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { int32_t code = TSDB_CODE_SUCCESS; SSchema* pSchema = getTableTagSchema(pStmt->pTableMeta); SArray* pTagVals = taosArrayInit(pCxt->tags.numOfBound, sizeof(STagVal)); @@ -649,7 +649,7 @@ static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* // input pStmt->pSql: TAGS (tag1_value, ...) [table_options] ... // output pStmt->pSql: [table_options] ... -static int32_t parseTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseTagsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; NEXT_TOKEN(pStmt->pSql, token); if (TK_TAGS != token.type) { @@ -673,7 +673,7 @@ static int32_t parseTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt return code; } -static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { pStmt->pTableMeta->suid = pStmt->pTableMeta->uid; pStmt->pTableMeta->uid = pStmt->totalTbNum; pStmt->pTableMeta->tableType = TSDB_CHILD_TABLE; @@ -688,7 +688,7 @@ static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStm return taosHashPut(pStmt->pSubTableHashObj, tbFName, strlen(tbFName), &pBackup, POINTER_BYTES); } -static int32_t parseTableOptions(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseTableOptions(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { do { int32_t index = 0; SToken token; @@ -731,7 +731,7 @@ static int32_t parseTableOptions(SInsertParseContext* pCxt, SVnodeModifOpStmt* p // output pStmt->pSql: // 1. [(field1_name, ...)] // 2. VALUES ... | FILE ... -static int32_t parseUsingClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseUsingClauseBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (!pStmt->usingTableProcessing || pCxt->usingDuplicateTable) { return TSDB_CODE_SUCCESS; } @@ -805,7 +805,7 @@ static int32_t getTableMeta(SInsertParseContext* pCxt, SName* pTbName, bool isSt return code; } -static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool isStb, bool* pMissCache) { +static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool isStb, bool* pMissCache) { int32_t code = TSDB_CODE_SUCCESS; SVgroupInfo vg; bool exists = true; @@ -830,7 +830,7 @@ static int32_t getTableVgroup(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, boo return code; } -static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pMissCache) { +static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool* pMissCache) { SVgroupInfo vg; int32_t code = catalogGetCachedTableVgMeta(pCxt->pCatalog, &pStmt->targetTableName, &vg, &pStmt->pTableMeta); if (TSDB_CODE_SUCCESS == code) { @@ -842,7 +842,7 @@ static int32_t getTableMetaAndVgroupImpl(SParseContext* pCxt, SVnodeModifOpStmt* return code; } -static int32_t getTableMetaAndVgroup(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, bool* pMissCache) { +static int32_t getTableMetaAndVgroup(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, bool* pMissCache) { SParseContext* pComCxt = pCxt->pComCxt; int32_t code = TSDB_CODE_SUCCESS; if (pComCxt->async) { @@ -868,7 +868,7 @@ static int32_t collectUseDatabase(const SName* pName, SHashObj* pDbs) { return taosHashPut(pDbs, dbFName, strlen(dbFName), dbFName, sizeof(dbFName)); } -static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (pCxt->forceUpdate) { pCxt->missCache = true; return TSDB_CODE_SUCCESS; @@ -896,11 +896,11 @@ static int32_t getTargetTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt return code; } -static int32_t preParseUsingTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t preParseUsingTableName(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { return insCreateSName(&pStmt->usingTableName, pTbName, pCxt->pComCxt->acctId, pCxt->pComCxt->db, &pCxt->msg); } -static int32_t getUsingTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t getUsingTableSchema(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (pCxt->forceUpdate) { pCxt->missCache = true; return TSDB_CODE_SUCCESS; @@ -922,7 +922,7 @@ static int32_t getUsingTableSchema(SInsertParseContext* pCxt, SVnodeModifOpStmt* return code; } -static int32_t parseUsingTableNameImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseUsingTableNameImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; NEXT_TOKEN(pStmt->pSql, token); int32_t code = preParseUsingTableName(pCxt, pStmt, &token); @@ -941,7 +941,7 @@ static int32_t parseUsingTableNameImpl(SInsertParseContext* pCxt, SVnodeModifOpS // output pStmt->pSql: // 1. [(tag1_name, ...)] TAGS (tag1_value, ...) [table_options]] ... // 2. VALUES ... | FILE ... -static int32_t parseUsingTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseUsingTableName(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; int32_t index = 0; NEXT_TOKEN_KEEP_SQL(pStmt->pSql, token, index); @@ -959,7 +959,7 @@ static int32_t parseUsingTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* return code; } -static int32_t preParseTargetTableName(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t preParseTargetTableName(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { return insCreateSName(&pStmt->targetTableName, pTbName, pCxt->pComCxt->acctId, pCxt->pComCxt->db, &pCxt->msg); } @@ -970,7 +970,7 @@ static int32_t preParseTargetTableName(SInsertParseContext* pCxt, SVnodeModifOpS // output pStmt->pSql: // 1. [ USING ... ] ... // 2. VALUES ... | FILE ... -static int32_t preParseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t preParseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; int32_t index = 0; NEXT_TOKEN_KEEP_SQL(pStmt->pSql, token, index); @@ -984,7 +984,7 @@ static int32_t preParseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModif return skipParentheses(pCxt, &pStmt->pSql); } -static int32_t getTableDataBlocks(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks** pDataBuf) { +static int32_t getTableDataBlocks(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks** pDataBuf) { if (pCxt->pComCxt->async) { uint64_t uid = pStmt->pTableMeta->uid; if (pStmt->usingTableProcessing) { @@ -1002,7 +1002,7 @@ static int32_t getTableDataBlocks(SInsertParseContext* pCxt, SVnodeModifOpStmt* pDataBuf, NULL, &pStmt->createTblReq); } -static int32_t parseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, +static int32_t parseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf) { SToken token; int32_t index = 0; @@ -1029,7 +1029,7 @@ static int32_t parseBoundColumnsClause(SInsertParseContext* pCxt, SVnodeModifOpS // 1. [(tag1_name, ...)] ... // 2. VALUES ... | FILE ... // output pStmt->pSql: VALUES ... | FILE ... -static int32_t parseSchemaClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, +static int32_t parseSchemaClauseBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks** pDataBuf) { int32_t code = parseUsingClauseBottom(pCxt, pStmt); if (TSDB_CODE_SUCCESS == code) { @@ -1045,7 +1045,7 @@ static int32_t parseSchemaClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpS // output pStmt->pSql: // 1. [(tag1_name, ...)] ... // 2. VALUES ... | FILE ... -static int32_t parseSchemaClauseTop(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t parseSchemaClauseTop(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { int32_t code = preParseTargetTableName(pCxt, pStmt, pTbName); if (TSDB_CODE_SUCCESS == code) { // option: [(field1_name, ...)] @@ -1337,7 +1337,7 @@ static int32_t allocateMemIfNeed(STableDataBlocks* pDataBlock, int32_t rowSize, } // pSql -> (field1_value, ...) [(field1_value2, ...) ...] -static int32_t parseValues(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseValues(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, int32_t maxRows, int32_t* pNumOfRows, SToken* pToken) { int32_t code = insInitRowBuilder(&pDataBuf->rowBuilder, pDataBuf->pTableMeta->sversion, &pDataBuf->boundColumnInfo); @@ -1383,7 +1383,7 @@ static int32_t parseValues(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, } // VALUES (field1_value, ...) [(field1_value2, ...) ...] -static int32_t parseValuesClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseValuesClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, SToken* pToken) { int32_t maxNumOfRows = 0; int32_t numOfRows = 0; @@ -1403,7 +1403,7 @@ static int32_t parseValuesClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* p return code; } -static int32_t parseCsvFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseCsvFile(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, int maxRows, int32_t* pNumOfRows) { int32_t code = insInitRowBuilder(&pDataBuf->rowBuilder, pDataBuf->pTableMeta->sversion, &pDataBuf->boundColumnInfo); @@ -1461,7 +1461,7 @@ static int32_t parseCsvFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, return code; } -static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf) { +static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf) { int32_t maxNumOfRows = 0; int32_t numOfRows = 0; int32_t code = allocateMemIfNeed(pDataBuf, insGetExtendedRowSize(pDataBuf), &maxNumOfRows); @@ -1485,7 +1485,7 @@ static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifOpStm return code; } -static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pFilePath, +static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pFilePath, STableDataBlocks* pDataBuf) { char filePathStr[TSDB_FILENAME_LEN] = {0}; if (TK_NK_STRING == pFilePath->type) { @@ -1501,7 +1501,7 @@ static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* p return parseDataFromFileImpl(pCxt, pStmt, pDataBuf); } -static int32_t parseFileClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf, +static int32_t parseFileClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf, SToken* pToken) { NEXT_TOKEN(pStmt->pSql, *pToken); if (0 == pToken->n || (TK_NK_STRING != pToken->type && TK_NK_ID != pToken->type)) { @@ -1511,7 +1511,7 @@ static int32_t parseFileClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt } // VALUES (field1_value, ...) [(field1_value2, ...) ...] | FILE csv_file_path -static int32_t parseDataClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, STableDataBlocks* pDataBuf) { +static int32_t parseDataClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, STableDataBlocks* pDataBuf) { SToken token; NEXT_TOKEN(pStmt->pSql, token); switch (token.type) { @@ -1528,7 +1528,7 @@ static int32_t parseDataClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt // input pStmt->pSql: // 1. [(tag1_name, ...)] ... // 2. VALUES ... | FILE ... -static int32_t parseInsertTableClauseBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertTableClauseBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { STableDataBlocks* pDataBuf = NULL; int32_t code = parseSchemaClauseBottom(pCxt, pStmt, &pDataBuf); if (TSDB_CODE_SUCCESS == code) { @@ -1537,7 +1537,7 @@ static int32_t parseInsertTableClauseBottom(SInsertParseContext* pCxt, SVnodeMod return code; } -static void resetEnvPreTable(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static void resetEnvPreTable(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { destroyBoundColumnInfo(&pCxt->tags); taosMemoryFreeClear(pStmt->pTableMeta); tdDestroySVCreateTbReq(&pStmt->createTblReq); @@ -1549,7 +1549,7 @@ static void resetEnvPreTable(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt } // input pStmt->pSql: [(field1_name, ...)] [ USING ... ] VALUES ... | FILE ... -static int32_t parseInsertTableClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName) { +static int32_t parseInsertTableClause(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName) { resetEnvPreTable(pCxt, pStmt); int32_t code = parseSchemaClauseTop(pCxt, pStmt, pTbName); if (TSDB_CODE_SUCCESS == code && !pCxt->missCache) { @@ -1558,7 +1558,7 @@ static int32_t parseInsertTableClause(SInsertParseContext* pCxt, SVnodeModifOpSt return code; } -static int32_t checkTableClauseFirstToken(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SToken* pTbName, +static int32_t checkTableClauseFirstToken(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pTbName, bool* pHasData) { // no data in the sql string anymore. if (0 == pTbName->n) { @@ -1597,7 +1597,7 @@ static int32_t checkTableClauseFirstToken(SInsertParseContext* pCxt, SVnodeModif return TSDB_CODE_SUCCESS; } -static int32_t setStmtInfo(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t setStmtInfo(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SParsedDataColInfo* tags = taosMemoryMalloc(sizeof(pCxt->tags)); if (NULL == tags) { return TSDB_CODE_OUT_OF_MEMORY; @@ -1615,7 +1615,7 @@ static int32_t setStmtInfo(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) return code; } -static int32_t parseInsertBodyBottom(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertBodyBottom(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (TSDB_QUERY_HAS_TYPE(pStmt->insertType, TSDB_QUERY_TYPE_STMT_INSERT)) { return setStmtInfo(pCxt, pStmt); } @@ -1636,7 +1636,7 @@ static int32_t parseInsertBodyBottom(SInsertParseContext* pCxt, SVnodeModifOpStm // [(field1_name, ...)] // VALUES (field1_value, ...) [(field1_value2, ...) ...] | FILE csv_file_path // [...]; -static int32_t parseInsertBody(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertBody(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { SToken token; int32_t code = TSDB_CODE_SUCCESS; bool hasData = true; @@ -1659,7 +1659,7 @@ static int32_t parseInsertBody(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt static void destroySubTableHashElem(void* p) { taosMemoryFree(*(STableMeta**)p); } static int32_t createVnodeModifOpStmt(SInsertParseContext* pCxt, bool reentry, SNode** pOutput) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (NULL == pStmt) { return TSDB_CODE_OUT_OF_MEMORY; } @@ -1736,7 +1736,7 @@ static int32_t getTableMetaFromMetaData(const SArray* pTables, STableMeta** pMet return pRes->code; } -static int32_t getTableVgroupFromMetaData(const SArray* pTables, SVnodeModifOpStmt* pStmt, bool isStb) { +static int32_t getTableVgroupFromMetaData(const SArray* pTables, SVnodeModifyOpStmt* pStmt, bool isStb) { if (1 != taosArrayGetSize(pTables)) { return TSDB_CODE_FAILED; } @@ -1755,7 +1755,7 @@ static int32_t getTableVgroupFromMetaData(const SArray* pTables, SVnodeModifOpSt } static int32_t getTableSchemaFromMetaData(SInsertParseContext* pCxt, const SMetaData* pMetaData, - SVnodeModifOpStmt* pStmt, bool isStb) { + SVnodeModifyOpStmt* pStmt, bool isStb) { int32_t code = checkAuthFromMetaData(pMetaData->pUser); if (TSDB_CODE_SUCCESS == code) { code = getTableMetaFromMetaData(pMetaData->pTableMeta, &pStmt->pTableMeta); @@ -1788,7 +1788,7 @@ static void clearCatalogReq(SCatalogReq* pCatalogReq) { } static int32_t setVnodeModifOpStmt(SInsertParseContext* pCxt, SCatalogReq* pCatalogReq, const SMetaData* pMetaData, - SVnodeModifOpStmt* pStmt) { + SVnodeModifyOpStmt* pStmt) { clearCatalogReq(pCatalogReq); if (pStmt->usingTableProcessing) { @@ -1802,7 +1802,7 @@ static int32_t resetVnodeModifOpStmt(SInsertParseContext* pCxt, SQuery* pQuery) int32_t code = createVnodeModifOpStmt(pCxt, true, &pQuery->pRoot); if (TSDB_CODE_SUCCESS == code) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; (*pCxt->pComCxt->pStmtCb->getExecInfoFn)(pCxt->pComCxt->pStmtCb->pStmt, &pStmt->pVgroupsHashObj, &pStmt->pTableBlockHashObj); @@ -1831,7 +1831,7 @@ static int32_t initInsertQuery(SInsertParseContext* pCxt, SCatalogReq* pCatalogR return resetVnodeModifOpStmt(pCxt, *pQuery); } - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)(*pQuery)->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)(*pQuery)->pRoot; if (!pStmt->fileProcessing) { return setVnodeModifOpStmt(pCxt, pCatalogReq, pMetaData, pStmt); @@ -1841,7 +1841,7 @@ static int32_t initInsertQuery(SInsertParseContext* pCxt, SCatalogReq* pCatalogR } static int32_t setRefreshMate(SQuery* pQuery) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; if (taosHashGetSize(pStmt->pTableNameHashObj) > 0) { taosArrayDestroy(pQuery->pTableList); @@ -1872,7 +1872,7 @@ static int32_t setRefreshMate(SQuery* pQuery) { // [(field1_name, ...)] // VALUES (field1_value, ...) [(field1_value2, ...) ...] | FILE csv_file_path // [...]; -static int32_t parseInsertSqlFromStart(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlFromStart(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { int32_t code = skipInsertInto(&pStmt->pSql, &pCxt->msg); if (TSDB_CODE_SUCCESS == code) { code = parseInsertBody(pCxt, pStmt); @@ -1880,7 +1880,7 @@ static int32_t parseInsertSqlFromStart(SInsertParseContext* pCxt, SVnodeModifOpS return code; } -static int32_t parseInsertSqlFromCsv(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlFromCsv(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { STableDataBlocks* pDataBuf = NULL; int32_t code = getTableDataBlocks(pCxt, pStmt, &pDataBuf); if (TSDB_CODE_SUCCESS == code) { @@ -1898,7 +1898,7 @@ static int32_t parseInsertSqlFromCsv(SInsertParseContext* pCxt, SVnodeModifOpStm return code; } -static int32_t parseInsertSqlFromTable(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlFromTable(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { int32_t code = parseInsertTableClauseBottom(pCxt, pStmt); if (TSDB_CODE_SUCCESS == code) { code = parseInsertBody(pCxt, pStmt); @@ -1906,7 +1906,7 @@ static int32_t parseInsertSqlFromTable(SInsertParseContext* pCxt, SVnodeModifOpS return code; } -static int32_t parseInsertSqlImpl(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) { +static int32_t parseInsertSqlImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt) { if (pStmt->pSql == pCxt->pComCxt->pSql || NULL != pCxt->pComCxt->pStmtCb) { return parseInsertSqlFromStart(pCxt, pStmt); } @@ -1958,7 +1958,7 @@ static int32_t buildInsertUserAuthReq(const char* pUser, SName* pName, SArray** return TSDB_CODE_SUCCESS; } -static int32_t buildInsertCatalogReq(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt, SCatalogReq* pCatalogReq) { +static int32_t buildInsertCatalogReq(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SCatalogReq* pCatalogReq) { int32_t code = buildInsertUserAuthReq(pCxt->pComCxt->pUser, &pStmt->targetTableName, &pCatalogReq->pUser); if (TSDB_CODE_SUCCESS == code) { if (0 == pStmt->usingTableName.type) { @@ -1974,7 +1974,7 @@ static int32_t buildInsertCatalogReq(SInsertParseContext* pCxt, SVnodeModifOpStm } static int32_t setNextStageInfo(SInsertParseContext* pCxt, SQuery* pQuery, SCatalogReq* pCatalogReq) { - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; if (pCxt->missCache) { parserDebug("0x%" PRIx64 " %d rows of %d tables have been inserted before cache miss", pCxt->pComCxt->requestId, pStmt->totalRowsNum, pStmt->totalTbNum); @@ -1999,7 +1999,7 @@ int32_t parseInsertSql(SParseContext* pCxt, SQuery** pQuery, SCatalogReq* pCatal int32_t code = initInsertQuery(&context, pCatalogReq, pMetaData, pQuery); if (TSDB_CODE_SUCCESS == code) { - code = parseInsertSqlImpl(&context, (SVnodeModifOpStmt*)(*pQuery)->pRoot); + code = parseInsertSqlImpl(&context, (SVnodeModifyOpStmt*)(*pQuery)->pRoot); } if (TSDB_CODE_SUCCESS == code) { code = setNextStageInfo(&context, *pQuery, pCatalogReq); diff --git a/source/libs/parser/src/parInsertStmt.c b/source/libs/parser/src/parInsertStmt.c index 4ed72e6c14..e10b195d34 100644 --- a/source/libs/parser/src/parInsertStmt.c +++ b/source/libs/parser/src/parInsertStmt.c @@ -37,7 +37,7 @@ int32_t qBuildStmtOutput(SQuery* pQuery, SHashObj* pVgHash, SHashObj* pBlockHash code = insMergeTableDataBlocks(pBlockHash, &pVgDataBlocks); } if (TSDB_CODE_SUCCESS == code) { - code = insBuildOutput(pVgHash, pVgDataBlocks, &((SVnodeModifOpStmt*)pQuery->pRoot)->pDataBlocks); + code = insBuildOutput(pVgHash, pVgDataBlocks, &((SVnodeModifyOpStmt*)pQuery->pRoot)->pDataBlocks); } insDestroyBlockArrayList(pVgDataBlocks); return code; @@ -47,7 +47,7 @@ int32_t qBindStmtTagsValue(void* pBlock, void* boundTags, int64_t suid, const ch TAOS_MULTI_BIND* bind, char* msgBuf, int32_t msgBufLen) { STableDataBlocks* pDataBlock = (STableDataBlocks*)pBlock; SMsgBuf pBuf = {.buf = msgBuf, .len = msgBufLen}; - int32_t code = TSDB_CODE_SUCCESS; + int32_t code = TSDB_CODE_SUCCESS; SParsedDataColInfo* tags = (SParsedDataColInfo*)boundTags; if (NULL == tags) { return TSDB_CODE_APP_ERROR; @@ -137,7 +137,8 @@ int32_t qBindStmtTagsValue(void* pBlock, void* boundTags, int64_t suid, const ch } SVCreateTbReq tbReq = {0}; - insBuildCreateTbReq(&tbReq, tName, pTag, suid, sTableName, tagName, pDataBlock->pTableMeta->tableInfo.numOfTags, TSDB_DEFAULT_TABLE_TTL); + insBuildCreateTbReq(&tbReq, tName, pTag, suid, sTableName, tagName, pDataBlock->pTableMeta->tableInfo.numOfTags, + TSDB_DEFAULT_TABLE_TTL); code = insBuildCreateTbMsg(pDataBlock, &tbReq); tdDestroySVCreateTbReq(&tbReq); diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 3f66a4f8de..1f00d17be1 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -352,7 +352,7 @@ static int32_t getTableMetaImpl(STranslateContext* pCxt, const SName* pName, STa code = catalogGetTableMeta(pParCxt->pCatalog, &conn, pName, pMeta); } } - if (TSDB_CODE_SUCCESS != code) { + if (TSDB_CODE_SUCCESS != code && TSDB_CODE_TSC_INVALID_TABLE_NAME != code) { parserError("0x%" PRIx64 " catalogGetTableMeta error, code:%s, dbName:%s, tbName:%s", pCxt->pParseCxt->requestId, tstrerror(code), pName->dbname, pName->tname); } @@ -5110,7 +5110,7 @@ static int32_t translateAlterUser(STranslateContext* pCxt, SAlterUserStmt* pStmt static int32_t translateDropUser(STranslateContext* pCxt, SDropUserStmt* pStmt) { SDropUserReq dropReq = {0}; - strcpy(dropReq.user, pStmt->useName); + strcpy(dropReq.user, pStmt->userName); return buildCmdMsg(pCxt, TDMT_MND_DROP_USER, (FSerializeFunc)tSerializeSDropUserReq, &dropReq); } @@ -6645,7 +6645,7 @@ static void destroyCreateTbReqBatch(void* data) { } int32_t rewriteToVnodeModifyOpStmt(SQuery* pQuery, SArray* pBufArray) { - SVnodeModifOpStmt* pNewStmt = (SVnodeModifOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIF_STMT); + SVnodeModifyOpStmt* pNewStmt = (SVnodeModifyOpStmt*)nodesMakeNode(QUERY_NODE_VNODE_MODIFY_STMT); if (pNewStmt == NULL) { return TSDB_CODE_OUT_OF_MEMORY; } @@ -7734,9 +7734,9 @@ static int32_t setQuery(STranslateContext* pCxt, SQuery* pQuery) { pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; pQuery->msgType = TDMT_VND_SUBMIT; break; - case QUERY_NODE_VNODE_MODIF_STMT: + case QUERY_NODE_VNODE_MODIFY_STMT: pQuery->execMode = QUERY_EXEC_MODE_SCHEDULE; - pQuery->msgType = toMsgType(((SVnodeModifOpStmt*)pQuery->pRoot)->sqlNodeType); + pQuery->msgType = toMsgType(((SVnodeModifyOpStmt*)pQuery->pRoot)->sqlNodeType); break; case QUERY_NODE_DESCRIBE_STMT: case QUERY_NODE_SHOW_CREATE_DATABASE_STMT: diff --git a/source/libs/parser/test/parAlterToBalanceTest.cpp b/source/libs/parser/test/parAlterToBalanceTest.cpp index ba1ba9fc83..51a7bbb0a5 100644 --- a/source/libs/parser/test/parAlterToBalanceTest.cpp +++ b/source/libs/parser/test/parAlterToBalanceTest.cpp @@ -504,8 +504,8 @@ TEST_F(ParserInitialATest, alterTable) { }; setCheckDdlFunc([&](const SQuery* pQuery, ParserStage stage) { - ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_VNODE_MODIF_STMT); - SVnodeModifOpStmt* pStmt = (SVnodeModifOpStmt*)pQuery->pRoot; + ASSERT_EQ(nodeType(pQuery->pRoot), QUERY_NODE_VNODE_MODIFY_STMT); + SVnodeModifyOpStmt* pStmt = (SVnodeModifyOpStmt*)pQuery->pRoot; ASSERT_EQ(pStmt->sqlNodeType, QUERY_NODE_ALTER_TABLE_STMT); ASSERT_NE(pStmt->pDataBlocks, nullptr); diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 205c70e0df..352483f661 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -1396,7 +1396,7 @@ static int32_t getMsgType(ENodeType sqlType) { return TDMT_VND_SUBMIT; } -static int32_t createVnodeModifLogicNode(SLogicPlanContext* pCxt, SVnodeModifOpStmt* pStmt, SLogicNode** pLogicNode) { +static int32_t createVnodeModifLogicNode(SLogicPlanContext* pCxt, SVnodeModifyOpStmt* pStmt, SLogicNode** pLogicNode) { SVnodeModifyLogicNode* pModif = (SVnodeModifyLogicNode*)nodesMakeNode(QUERY_NODE_LOGIC_PLAN_VNODE_MODIFY); if (NULL == pModif) { return TSDB_CODE_OUT_OF_MEMORY; @@ -1580,8 +1580,8 @@ static int32_t createQueryLogicNode(SLogicPlanContext* pCxt, SNode* pStmt, SLogi switch (nodeType(pStmt)) { case QUERY_NODE_SELECT_STMT: return createSelectLogicNode(pCxt, (SSelectStmt*)pStmt, pLogicNode); - case QUERY_NODE_VNODE_MODIF_STMT: - return createVnodeModifLogicNode(pCxt, (SVnodeModifOpStmt*)pStmt, pLogicNode); + case QUERY_NODE_VNODE_MODIFY_STMT: + return createVnodeModifLogicNode(pCxt, (SVnodeModifyOpStmt*)pStmt, pLogicNode); case QUERY_NODE_EXPLAIN_STMT: return createQueryLogicNode(pCxt, ((SExplainStmt*)pStmt)->pQuery, pLogicNode); case QUERY_NODE_SET_OPERATOR: From c27c487c4be212dcf16bab012a45f9fec57a180f Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Tue, 20 Dec 2022 20:15:39 +0800 Subject: [PATCH 48/64] fix: release script support macos (#19047) --- packaging/release.sh | 13 ++++++++--- packaging/tools/makeclient.sh | 8 +++---- packaging/tools/makepkg.sh | 43 +++++++++++++++++++++++++++-------- 3 files changed, 48 insertions(+), 16 deletions(-) diff --git a/packaging/release.sh b/packaging/release.sh index a3334e734d..7a8a08352f 100755 --- a/packaging/release.sh +++ b/packaging/release.sh @@ -3,7 +3,7 @@ # Generate the deb package for ubuntu, or rpm package for centos, or tar.gz package for other linux os set -e -#set -x +# set -x # release.sh -v [cluster | edge] # -c [aarch32 | aarch64 | x64 | x86 | mips64 | loongarch64...] @@ -96,6 +96,8 @@ while getopts "hv:V:c:o:l:s:d:a:n:m:H:" arg; do esac done +osType=$(uname) + echo "verMode=${verMode} verType=${verType} cpuType=${cpuType} osType=${osType} pagMode=${pagMode} soMode=${soMode} dbName=${dbName} allocator=${allocator} verNumber=${verNumber} verNumberComp=${verNumberComp} httpdBuild=${httpdBuild}" curr_dir=$(pwd) @@ -233,7 +235,12 @@ else exit 1 fi -CORES=$(grep -c ^processor /proc/cpuinfo) +ostype=`uname` +if [ "${ostype}" == "Darwin" ]; then + CORES=$(sysctl -n hw.ncpu) +else + CORES=$(grep -c ^processor /proc/cpuinfo) +fi if [[ "$allocator" == "jemalloc" ]]; then # jemalloc need compile first, so disable parallel build @@ -306,7 +313,7 @@ if [ "$osType" != "Darwin" ]; then ${csudo}./makeclient.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} else - # only make client for Darwin cd ${script_dir}/tools + ./makepkg.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${verNumberComp} ${dbName} ./makeclient.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} fi diff --git a/packaging/tools/makeclient.sh b/packaging/tools/makeclient.sh index edec338c55..db28de8dec 100755 --- a/packaging/tools/makeclient.sh +++ b/packaging/tools/makeclient.sh @@ -2,7 +2,7 @@ # # Generate tar.gz package for linux client in all os system set -e -#set -x +# set -x curr_dir=$(pwd) compile_dir=$1 @@ -249,9 +249,9 @@ if [ "$osType" != "Darwin" ]; then tar -zcv -f "$(basename ${pkg_name}).tar.gz" $(basename ${install_dir}) --remove-files || : else tar -zcv -f "$(basename ${pkg_name}).tar.gz" $(basename ${install_dir}) || : - mv "$(basename ${pkg_name}).tar.gz" .. - rm -rf ./* - mv ../"$(basename ${pkg_name}).tar.gz" . +# mv "$(basename ${pkg_name}).tar.gz" .. + rm -rf ${install_dir} ||: +# mv ../"$(basename ${pkg_name}).tar.gz" . fi cd ${curr_dir} diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 4169bed3eb..f30a8a637e 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -3,7 +3,7 @@ # Generate tar.gz package for all os system set -e -#set -x +# set -x curr_dir=$(pwd) compile_dir=$1 @@ -74,14 +74,16 @@ else tdinsight_caches="" cd ${build_dir}/bin/ && \ chmod +x TDinsight.sh - tdinsight_caches=$(./TDinsight.sh --download-only | xargs -i printf "${build_dir}/bin/{} ") + ./TDinsight.sh --download-only ||: +# tdinsight_caches=$(./TDinsight.sh --download-only | xargs -I printf "${build_dir}/bin/{} ") cd $orig_pwd echo "TDinsight caches: $tdinsight_caches" taostools_bin_files=" ${build_dir}/bin/taosdump \ ${build_dir}/bin/taosBenchmark \ ${build_dir}/bin/TDinsight.sh \ - $tdinsight_caches" + ${build_dir}/bin/tdengine-datasource.zip \ + ${build_dir}/bin/tdengine-datasource.zip.md5sum" [ -f ${build_dir}/bin/taosx ] && taosx_bin="${build_dir}/bin/taosx" bin_files="${build_dir}/bin/${serverName} \ @@ -96,8 +98,13 @@ else ${script_dir}/taosd-dump-cfg.gdb" fi -lib_files="${build_dir}/lib/libtaos.so.${version}" -wslib_files="${build_dir}/lib/libtaosws.so" +if [ "$osType" == "Darwin" ]; then + lib_files="${build_dir}/lib/libtaos.${version}.dylib" + wslib_files="${build_dir}/lib/libtaosws.dylib" +else + lib_files="${build_dir}/lib/libtaos.so.${version}" + wslib_files="${build_dir}/lib/libtaosws.so" +fi header_files="${code_dir}/include/client/taos.h ${code_dir}/include/common/taosdef.h ${code_dir}/include/util/taoserror.h ${code_dir}/include/libs/function/taosudf.h" wsheader_files="${build_dir}/include/taosws.h" @@ -226,7 +233,12 @@ if [ "$verMode" == "cloud" ]; then fi cd ${install_dir} -tar -zcv -f ${tarName} * --remove-files || : +if [ "$osType" != "Darwin" ]; then + tar -zcv -f ${tarName} * --remove-files || : +else + tar -zcv -f ${tarName} * || : +fi + exitcode=$? if [ "$exitcode" != "0" ]; then echo "tar ${tarName} error !!!" @@ -288,7 +300,7 @@ if [[ $dbName == "taos" ]]; then if [ "$verMode" == "cluster" ] || [ "$verMode" == "cloud" ]; then if [ -d "${web_dir}/admin" ] ; then mkdir -p ${install_dir}/share/ - cp ${web_dir}/admin ${install_dir}/share/ -r + cp -Rfap ${web_dir}/admin ${install_dir}/share/ cp ${web_dir}/png/taos.png ${install_dir}/share/admin/images/taos.png else echo "directory not found for enterprise release: ${web_dir}/admin" @@ -362,7 +374,15 @@ if [ "$pagMode" == "lite" ]; then pkg_name=${pkg_name}-Lite fi -tar -zcv -f "$(basename ${pkg_name}).tar.gz" "$(basename ${install_dir})" --remove-files || : + +if [ "$osType" != "Darwin" ]; then + tar -zcv -f "$(basename ${pkg_name}).tar.gz" "$(basename ${install_dir})" --remove-files || : +else + tar -zcv -f "$(basename ${pkg_name}).tar.gz" "$(basename ${install_dir})" || : + rm -rf ${install_dir} ||: + ([ -d build-taoskeeper ] && rm -rf build-taoskeeper ) ||: +fi + exitcode=$? if [ "$exitcode" != "0" ]; then echo "tar ${pkg_name}.tar.gz error !!!" @@ -371,7 +391,12 @@ fi if [ -n "${taostools_bin_files}" ]; then wget https://github.com/taosdata/grafanaplugin/releases/latest/download/TDinsight.sh -O ${taostools_install_dir}/bin/TDinsight.sh && echo "TDinsight.sh downloaded!"|| echo "failed to download TDinsight.sh" - tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" --remove-files || : + if [ "$osType" != "Darwin" ]; then + tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" --remove-files || : + else + tar -zcv -f "$(basename ${taostools_pkg_name}).tar.gz" "$(basename ${taostools_install_dir})" || : + rm -rf ${taostools_install_dir} ||: + fi exitcode=$? if [ "$exitcode" != "0" ]; then echo "tar ${taostools_pkg_name}.tar.gz error !!!" From b4fa29d515b82d19ddd131166e399c73eb634ddc Mon Sep 17 00:00:00 2001 From: sunpeng Date: Wed, 21 Dec 2022 13:48:13 +0800 Subject: [PATCH 49/64] enh: update taosadapter (#19051) --- cmake/taosadapter_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taosadapter_CMakeLists.txt.in b/cmake/taosadapter_CMakeLists.txt.in index 2a9b4553ac..a47b3b0feb 100644 --- a/cmake/taosadapter_CMakeLists.txt.in +++ b/cmake/taosadapter_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taosadapter ExternalProject_Add(taosadapter GIT_REPOSITORY https://github.com/taosdata/taosadapter.git - GIT_TAG 4dfc4d1 + GIT_TAG f0c1753 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From aecd05cf34adcab8346b513e853f24bf6c5b88aa Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 21 Dec 2022 13:51:06 +0800 Subject: [PATCH 50/64] enh: improve unit tests --- include/libs/nodes/cmdnodes.h | 8 +- include/libs/nodes/nodes.h | 2 +- source/libs/nodes/src/nodesCodeFuncs.c | 552 ++++++++++++++++++++- source/libs/nodes/src/nodesUtilFuncs.c | 8 +- source/libs/parser/src/parAstCreater.c | 6 +- source/libs/parser/src/parAstParser.c | 6 +- source/libs/parser/src/parTranslater.c | 8 +- source/libs/planner/src/planLogicCreater.c | 2 +- 8 files changed, 569 insertions(+), 23 deletions(-) diff --git a/include/libs/nodes/cmdnodes.h b/include/libs/nodes/cmdnodes.h index 6ea76a991a..66988ff135 100644 --- a/include/libs/nodes/cmdnodes.h +++ b/include/libs/nodes/cmdnodes.h @@ -171,10 +171,10 @@ typedef struct SCreateSubTableClause { STableOptions* pOptions; } SCreateSubTableClause; -typedef struct SCreateMultiTableStmt { +typedef struct SCreateMultiTablesStmt { ENodeType type; SNodeList* pSubTables; -} SCreateMultiTableStmt; +} SCreateMultiTablesStmt; typedef struct SDropTableClause { ENodeType type; @@ -209,14 +209,14 @@ typedef struct SAlterTableStmt { typedef struct SCreateUserStmt { ENodeType type; - char useName[TSDB_USER_LEN]; + char userName[TSDB_USER_LEN]; char password[TSDB_USET_PASSWORD_LEN]; int8_t sysinfo; } SCreateUserStmt; typedef struct SAlterUserStmt { ENodeType type; - char useName[TSDB_USER_LEN]; + char userName[TSDB_USER_LEN]; int8_t alterType; char password[TSDB_USET_PASSWORD_LEN]; int8_t enable; diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index d023e0df63..e111f36077 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -125,7 +125,7 @@ typedef enum ENodeType { QUERY_NODE_TRIM_DATABASE_STMT, QUERY_NODE_CREATE_TABLE_STMT, QUERY_NODE_CREATE_SUBTABLE_CLAUSE, - QUERY_NODE_CREATE_MULTI_TABLE_STMT, + QUERY_NODE_CREATE_MULTI_TABLES_STMT, QUERY_NODE_DROP_TABLE_CLAUSE, QUERY_NODE_DROP_TABLE_STMT, QUERY_NODE_DROP_SUPER_TABLE_STMT, diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index af0b325f84..bab62a9054 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -79,6 +79,8 @@ const char* nodesNodeName(ENodeType type) { return "TableOptions"; case QUERY_NODE_INDEX_OPTIONS: return "IndexOptions"; + case QUERY_NODE_STREAM_OPTIONS: + return "StreamOptions"; case QUERY_NODE_LEFT_VALUE: return "LeftValue"; case QUERY_NODE_WHEN_THEN: @@ -107,7 +109,7 @@ const char* nodesNodeName(ENodeType type) { return "CreateTableStmt"; case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: return "CreateSubtableClause"; - case QUERY_NODE_CREATE_MULTI_TABLE_STMT: + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: return "CreateMultiTableStmt"; case QUERY_NODE_DROP_TABLE_CLAUSE: return "DropTableClause"; @@ -141,6 +143,8 @@ const char* nodesNodeName(ENodeType type) { return "CreateQnodeStmt"; case QUERY_NODE_DROP_QNODE_STMT: return "DropQnodeStmt"; + case QUERY_NODE_CREATE_SNODE_STMT: + return "CreateSnodeStmt"; case QUERY_NODE_DROP_SNODE_STMT: return "DropSnodeStmt"; case QUERY_NODE_DROP_MNODE_STMT: @@ -149,8 +153,14 @@ const char* nodesNodeName(ENodeType type) { return "CreateTopicStmt"; case QUERY_NODE_DROP_TOPIC_STMT: return "DropTopicStmt"; + case QUERY_NODE_DROP_CGROUP_STMT: + return "DropConsumerGroupStmt"; case QUERY_NODE_ALTER_LOCAL_STMT: return "AlterLocalStmt"; + case QUERY_NODE_DESCRIBE_STMT: + return "DescribeStmt"; + case QUERY_NODE_CREATE_STREAM_STMT: + return "CreateStreamStmt"; case QUERY_NODE_DROP_STREAM_STMT: return "DropStreamStmt"; case QUERY_NODE_SPLIT_VGROUP_STMT: @@ -4004,6 +4014,45 @@ static int32_t jsonToSlotDescNode(const SJson* pJson, void* pObj) { return code; } +static const char* jkColumnDefColName = "ColName"; +static const char* jkColumnDefDataType = "DataType"; +static const char* jkColumnDefComments = "Comments"; +static const char* jkColumnDefSma = "Sma"; + +static int32_t columnDefNodeToJson(const void* pObj, SJson* pJson) { + const SColumnDefNode* pNode = (const SColumnDefNode*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkColumnDefColName, pNode->colName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkColumnDefDataType, dataTypeToJson, &pNode->dataType); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkColumnDefComments, pNode->comments); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkColumnDefSma, pNode->sma); + } + + return code; +} + +static int32_t jsonToColumnDefNode(const SJson* pJson, void* pObj) { + SColumnDefNode* pNode = (SColumnDefNode*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkColumnDefColName, pNode->colName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonToObject(pJson, jkColumnDefDataType, jsonToDataType, &pNode->dataType); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkColumnDefComments, pNode->comments); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkColumnDefSma, &pNode->sma); + } + + return code; +} + static const char* jkDownstreamSourceAddr = "Addr"; static const char* jkDownstreamSourceTaskId = "TaskId"; static const char* jkDownstreamSourceSchedId = "SchedId"; @@ -4194,6 +4243,119 @@ static int32_t jsonToDatabaseOptions(const SJson* pJson, void* pObj) { return code; } +static const char* jkTableOptionsComment = "Comment"; +static const char* jkTableOptionsMaxDelay = "MaxDelay"; +static const char* jkTableOptionsWatermark = "Watermark"; +static const char* jkTableOptionsDeleteMark = "DeleteMark"; +static const char* jkTableOptionsRollupFuncs = "RollupFuncs"; +static const char* jkTableOptionsTtl = "Ttl"; +static const char* jkTableOptionsSma = "Sma"; + +static int32_t tableOptionsToJson(const void* pObj, SJson* pJson) { + const STableOptions* pNode = (const STableOptions*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkTableOptionsComment, pNode->comment); + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkTableOptionsMaxDelay, pNode->pMaxDelay); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkTableOptionsWatermark, pNode->pWatermark); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkTableOptionsDeleteMark, pNode->pDeleteMark); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkTableOptionsRollupFuncs, pNode->pRollupFuncs); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTableOptionsTtl, pNode->ttl); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkTableOptionsSma, pNode->pSma); + } + + return code; +} + +static int32_t jsonToTableOptions(const SJson* pJson, void* pObj) { + STableOptions* pNode = (STableOptions*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkTableOptionsComment, pNode->comment); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkTableOptionsMaxDelay, &pNode->pMaxDelay); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkTableOptionsWatermark, &pNode->pWatermark); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkTableOptionsDeleteMark, &pNode->pDeleteMark); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkTableOptionsRollupFuncs, &pNode->pRollupFuncs); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkTableOptionsTtl, &pNode->ttl); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkTableOptionsSma, &pNode->pSma); + } + + return code; +} + +static const char* jkStreamOptionsTriggerType = "TriggerType"; +static const char* jkStreamOptionsDelay = "Delay"; +static const char* jkStreamOptionsWatermark = "Watermark"; +static const char* jkStreamOptionsDeleteMark = "DeleteMark"; +static const char* jkStreamOptionsFillHistory = "FillHistory"; +static const char* jkStreamOptionsIgnoreExpired = "IgnoreExpired"; + +static int32_t streamOptionsToJson(const void* pObj, SJson* pJson) { + const SStreamOptions* pNode = (const SStreamOptions*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkStreamOptionsTriggerType, pNode->triggerType); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkStreamOptionsDelay, nodeToJson, pNode->pDelay); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkStreamOptionsWatermark, nodeToJson, pNode->pWatermark); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkStreamOptionsDeleteMark, nodeToJson, pNode->pDeleteMark); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkStreamOptionsFillHistory, pNode->fillHistory); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkStreamOptionsIgnoreExpired, pNode->ignoreExpired); + } + + return code; +} + +static int32_t jsonToStreamOptions(const SJson* pJson, void* pObj) { + SStreamOptions* pNode = (SStreamOptions*)pObj; + + int32_t code = tjsonGetTinyIntValue(pJson, jkStreamOptionsTriggerType, &pNode->triggerType); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkStreamOptionsDelay, &pNode->pDelay); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkStreamOptionsWatermark, &pNode->pWatermark); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkStreamOptionsDeleteMark, &pNode->pDeleteMark); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkStreamOptionsFillHistory, &pNode->fillHistory); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkStreamOptionsIgnoreExpired, &pNode->ignoreExpired); + } + + return code; +} + static const char* jkWhenThenWhen = "When"; static const char* jkWhenThenThen = "Then"; @@ -4562,6 +4724,138 @@ static int32_t jsonToTrimDatabaseStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkCreateTableStmtDbName = "DbName"; +static const char* jkCreateTableStmtTableName = "TableName"; +static const char* jkCreateTableStmtIgnoreExists = "IgnoreExists"; +static const char* jkCreateTableStmtCols = "Cols"; +static const char* jkCreateTableStmtTags = "Tags"; +static const char* jkCreateTableStmtOptions = "Options"; + +static int32_t createTableStmtToJson(const void* pObj, SJson* pJson) { + const SCreateTableStmt* pNode = (const SCreateTableStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkCreateTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateTableStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkCreateTableStmtIgnoreExists, pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkCreateTableStmtCols, pNode->pCols); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkCreateTableStmtTags, pNode->pTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkCreateTableStmtOptions, nodeToJson, pNode->pOptions); + } + + return code; +} + +static int32_t jsonToCreateTableStmt(const SJson* pJson, void* pObj) { + SCreateTableStmt* pNode = (SCreateTableStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkCreateTableStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateTableStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkCreateTableStmtIgnoreExists, &pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkCreateTableStmtCols, &pNode->pCols); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkCreateTableStmtTags, &pNode->pTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkCreateTableStmtOptions, (SNode**)&pNode->pOptions); + } + + return code; +} + +static const char* jkCreateSubTableClauseDbName = "DbName"; +static const char* jkCreateSubTableClauseTableName = "TableName"; +static const char* jkCreateSubTableClauseUseDbName = "UseDbName"; +static const char* jkCreateSubTableClauseUseTableName = "UseTableName"; +static const char* jkCreateSubTableClauseIgnoreExists = "IgnoreExists"; +static const char* jkCreateSubTableClauseSpecificTags = "SpecificTags"; +static const char* jkCreateSubTableClauseValsOfTags = "ValsOfTags"; +static const char* jkCreateSubTableClauseOptions = "Options"; + +static int32_t createSubTableClauseToJson(const void* pObj, SJson* pJson) { + const SCreateSubTableClause* pNode = (const SCreateSubTableClause*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkCreateSubTableClauseDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateSubTableClauseTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateSubTableClauseUseDbName, pNode->useDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateSubTableClauseUseTableName, pNode->useTableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkCreateSubTableClauseIgnoreExists, pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkCreateSubTableClauseSpecificTags, pNode->pSpecificTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkCreateSubTableClauseValsOfTags, pNode->pValsOfTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkCreateSubTableClauseOptions, nodeToJson, pNode->pOptions); + } + + return code; +} + +static int32_t jsonToCreateSubTableClause(const SJson* pJson, void* pObj) { + SCreateSubTableClause* pNode = (SCreateSubTableClause*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkCreateSubTableClauseDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateSubTableClauseTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateSubTableClauseUseDbName, pNode->useDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateSubTableClauseUseTableName, pNode->useTableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkCreateSubTableClauseIgnoreExists, &pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkCreateSubTableClauseSpecificTags, &pNode->pSpecificTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkCreateSubTableClauseValsOfTags, &pNode->pValsOfTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkCreateSubTableClauseOptions, (SNode**)&pNode->pOptions); + } + + return code; +} + +static const char* jkCreateMultiTablesStmtSubTables = "SubTables"; + +static int32_t createMultiTablesStmtToJson(const void* pObj, SJson* pJson) { + const SCreateMultiTablesStmt* pNode = (const SCreateMultiTablesStmt*)pObj; + return nodeListToJson(pJson, jkCreateMultiTablesStmtSubTables, pNode->pSubTables); +} + +static int32_t jsonToCreateMultiTablesStmt(const SJson* pJson, void* pObj) { + SCreateMultiTablesStmt* pNode = (SCreateMultiTablesStmt*)pObj; + return jsonToNodeList(pJson, jkCreateMultiTablesStmtSubTables, &pNode->pSubTables); +} + static const char* jkDropTableClauseDbName = "DbName"; static const char* jkDropTableClauseTableName = "TableName"; static const char* jkDropTableClauseIgnoreNotExists = "IgnoreNotExists"; @@ -4705,6 +4999,38 @@ static int32_t jsonToAlterTableStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkCreateUserStmtUserName = "UserName"; +static const char* jkCreateUserStmtPassword = "Password"; +static const char* jkCreateUserStmtSysinfo = "Sysinfo"; + +static int32_t createUserStmtToJson(const void* pObj, SJson* pJson) { + const SCreateUserStmt* pNode = (const SCreateUserStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkCreateUserStmtUserName, pNode->userName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateUserStmtPassword, pNode->password); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkCreateUserStmtSysinfo, pNode->sysinfo); + } + + return code; +} + +static int32_t jsonToCreateUserStmt(const SJson* pJson, void* pObj) { + SCreateUserStmt* pNode = (SCreateUserStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkCreateUserStmtUserName, pNode->userName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateUserStmtPassword, pNode->password); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkCreateUserStmtSysinfo, &pNode->sysinfo); + } + + return code; +} + static const char* jkDropUserStmtUserName = "UserName"; static int32_t dropUserStmtToJson(const void* pObj, SJson* pJson) { @@ -4761,6 +5087,38 @@ static int32_t jsonToAlterDnodeStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropIndexStmtIgnoreNotExists = "IgnoreNotExists"; +static const char* jkDropIndexStmtIndexDbName = "IndexDbName"; +static const char* jkDropIndexStmtIndexName = "IndexName"; + +static int32_t dropIndexStmtToJson(const void* pObj, SJson* pJson) { + const SDropIndexStmt* pNode = (const SDropIndexStmt*)pObj; + + int32_t code = tjsonAddBoolToObject(pJson, jkDropIndexStmtIgnoreNotExists, pNode->ignoreNotExists); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropIndexStmtIndexDbName, pNode->indexDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropIndexStmtIndexName, pNode->indexName); + } + + return code; +} + +static int32_t jsonToDropIndexStmt(const SJson* pJson, void* pObj) { + SDropIndexStmt* pNode = (SDropIndexStmt*)pObj; + + int32_t code = tjsonGetBoolValue(pJson, jkDropIndexStmtIgnoreNotExists, &pNode->ignoreNotExists); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropIndexStmtIndexDbName, pNode->indexDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropIndexStmtIndexName, pNode->indexName); + } + + return code; +} + static const char* jkDropComponentNodeStmtDnodeId = "DnodeId"; static int32_t dropComponentNodeStmtToJson(const void* pObj, SJson* pJson) { @@ -4777,6 +5135,26 @@ static int32_t dropQnodeStmtToJson(const void* pObj, SJson* pJson) { return drop static int32_t jsonToDropQnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } +static const char* jkCreateComponentNodeStmtDnodeId = "DnodeId"; + +static int32_t createComponentNodeStmtToJson(const void* pObj, SJson* pJson) { + const SCreateComponentNodeStmt* pNode = (const SCreateComponentNodeStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkCreateComponentNodeStmtDnodeId, pNode->dnodeId); +} + +static int32_t jsonToCreateComponentNodeStmt(const SJson* pJson, void* pObj) { + SCreateComponentNodeStmt* pNode = (SCreateComponentNodeStmt*)pObj; + return tjsonGetIntValue(pJson, jkCreateComponentNodeStmtDnodeId, &pNode->dnodeId); +} + +static int32_t createSnodeStmtToJson(const void* pObj, SJson* pJson) { + return createComponentNodeStmtToJson(pObj, pJson); +} + +static int32_t jsonToCreateSnodeStmt(const SJson* pJson, void* pObj) { + return jsonToCreateComponentNodeStmt(pJson, pObj); +} + static int32_t dropSnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } static int32_t jsonToDropSnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } @@ -4888,6 +5266,130 @@ static int32_t jsonToDropTopicStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkDropCGroupStmtTopicName = "TopicName"; +static const char* jkDropCGroupStmtConsumerGroup = "ConsumerGroup"; +static const char* jkDropCGroupStmtIgnoreNotExists = "IgnoreNotExists"; + +static int32_t dropConsumerGroupStmtToJson(const void* pObj, SJson* pJson) { + const SDropCGroupStmt* pNode = (const SDropCGroupStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDropCGroupStmtTopicName, pNode->topicName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDropCGroupStmtConsumerGroup, pNode->cgroup); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkDropCGroupStmtIgnoreNotExists, pNode->ignoreNotExists); + } + + return code; +} + +static int32_t jsonToDropConsumerGroupStmt(const SJson* pJson, void* pObj) { + SDropCGroupStmt* pNode = (SDropCGroupStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDropCGroupStmtTopicName, pNode->topicName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDropCGroupStmtConsumerGroup, pNode->cgroup); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkDropCGroupStmtIgnoreNotExists, &pNode->ignoreNotExists); + } + + return code; +} + +static const char* jkDescribeStmtDbName = "DbName"; +static const char* jkDescribeStmtTableName = "TableName"; + +static int32_t describeStmtToJson(const void* pObj, SJson* pJson) { + const SDescribeStmt* pNode = (const SDescribeStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkDescribeStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkDescribeStmtTableName, pNode->tableName); + } + + return code; +} + +static int32_t jsonToDescribeStmt(const SJson* pJson, void* pObj) { + SDescribeStmt* pNode = (SDescribeStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkDescribeStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkDescribeStmtTableName, pNode->tableName); + } + + return code; +} + +static const char* jkCreateStreamStmtStreamName = "StreamName"; +static const char* jkCreateStreamStmtTargetDbName = "TargetDbName"; +static const char* jkCreateStreamStmtTargetTabName = "TargetTabName"; +static const char* jkCreateStreamStmtIgnoreExists = "IgnoreExists"; +static const char* jkCreateStreamStmtOptions = "Options"; +static const char* jkCreateStreamStmtQuery = "Query"; +static const char* jkCreateStreamStmtTags = "Tags"; +static const char* jkCreateStreamStmtSubtable = "Subtable"; + +static int32_t createStreamStmtToJson(const void* pObj, SJson* pJson) { + const SCreateStreamStmt* pNode = (const SCreateStreamStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkCreateStreamStmtStreamName, pNode->streamName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateStreamStmtTargetDbName, pNode->targetDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateStreamStmtTargetTabName, pNode->targetTabName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkCreateStreamStmtIgnoreExists, pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkCreateStreamStmtOptions, nodeToJson, pNode->pOptions); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkCreateStreamStmtQuery, nodeToJson, pNode->pQuery); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkCreateStreamStmtTags, pNode->pTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkCreateStreamStmtSubtable, nodeToJson, pNode->pSubtable); + } + + return code; +} + +static int32_t jsonToCreateStreamStmt(const SJson* pJson, void* pObj) { + SCreateStreamStmt* pNode = (SCreateStreamStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkCreateStreamStmtStreamName, pNode->streamName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateStreamStmtTargetDbName, pNode->targetDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateStreamStmtTargetTabName, pNode->targetTabName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkCreateStreamStmtIgnoreExists, &pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkCreateStreamStmtOptions, (SNode**)&pNode->pOptions); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkCreateStreamStmtQuery, &pNode->pQuery); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkCreateStreamStmtTags, &pNode->pTags); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkCreateStreamStmtSubtable, &pNode->pSubtable); + } + + return code; +} + static const char* jkDropStreamStmtStreamName = "StreamName"; static const char* jkDropStreamStmtIgnoreNotExists = "IgnoreNotExists"; @@ -5295,11 +5797,15 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_SLOT_DESC: return slotDescNodeToJson(pObj, pJson); case QUERY_NODE_COLUMN_DEF: - break; + return columnDefNodeToJson(pObj, pJson); case QUERY_NODE_DOWNSTREAM_SOURCE: return downstreamSourceNodeToJson(pObj, pJson); case QUERY_NODE_DATABASE_OPTIONS: return databaseOptionsToJson(pObj, pJson); + case QUERY_NODE_TABLE_OPTIONS: + return tableOptionsToJson(pObj, pJson); + case QUERY_NODE_STREAM_OPTIONS: + return streamOptionsToJson(pObj, pJson); case QUERY_NODE_LEFT_VALUE: return TSDB_CODE_SUCCESS; // SLeftValueNode has no fields to serialize. case QUERY_NODE_WHEN_THEN: @@ -5321,7 +5827,11 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_TRIM_DATABASE_STMT: return trimDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TABLE_STMT: - break; + return createTableStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: + return createSubTableClauseToJson(pObj, pJson); + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: + return createMultiTablesStmtToJson(pObj, pJson); case QUERY_NODE_DROP_TABLE_CLAUSE: return dropTableClauseToJson(pObj, pJson); case QUERY_NODE_DROP_TABLE_STMT: @@ -5330,6 +5840,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return dropStableStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_TABLE_STMT: return alterTableStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_USER_STMT: + return createUserStmtToJson(pObj, pJson); case QUERY_NODE_DROP_USER_STMT: return dropUserStmtToJson(pObj, pJson); case QUERY_NODE_USE_DATABASE_STMT: @@ -5338,8 +5850,12 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return dropDnodeStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_DNODE_STMT: return alterDnodeStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_INDEX_STMT: + return dropIndexStmtToJson(pObj, pJson); case QUERY_NODE_DROP_QNODE_STMT: return dropQnodeStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_SNODE_STMT: + return createSnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_SNODE_STMT: return dropSnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_MNODE_STMT: @@ -5348,6 +5864,12 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return createTopicStmtToJson(pObj, pJson); case QUERY_NODE_DROP_TOPIC_STMT: return dropTopicStmtToJson(pObj, pJson); + case QUERY_NODE_DROP_CGROUP_STMT: + return dropConsumerGroupStmtToJson(pObj, pJson); + case QUERY_NODE_DESCRIBE_STMT: + return describeStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_STREAM_STMT: + return createStreamStmtToJson(pObj, pJson); case QUERY_NODE_DROP_STREAM_STMT: return dropStreamStmtToJson(pObj, pJson); case QUERY_NODE_SPLIT_VGROUP_STMT: @@ -5548,10 +6070,16 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDataBlockDescNode(pJson, pObj); case QUERY_NODE_SLOT_DESC: return jsonToSlotDescNode(pJson, pObj); + case QUERY_NODE_COLUMN_DEF: + return jsonToColumnDefNode(pJson, pObj); case QUERY_NODE_DOWNSTREAM_SOURCE: return jsonToDownstreamSourceNode(pJson, pObj); case QUERY_NODE_DATABASE_OPTIONS: return jsonToDatabaseOptions(pJson, pObj); + case QUERY_NODE_TABLE_OPTIONS: + return jsonToTableOptions(pJson, pObj); + case QUERY_NODE_STREAM_OPTIONS: + return jsonToStreamOptions(pJson, pObj); case QUERY_NODE_LEFT_VALUE: return TSDB_CODE_SUCCESS; // SLeftValueNode has no fields to deserialize. case QUERY_NODE_WHEN_THEN: @@ -5570,6 +6098,12 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToAlterDatabaseStmt(pJson, pObj); case QUERY_NODE_TRIM_DATABASE_STMT: return jsonToTrimDatabaseStmt(pJson, pObj); + case QUERY_NODE_CREATE_TABLE_STMT: + return jsonToCreateTableStmt(pJson, pObj); + case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: + return jsonToCreateSubTableClause(pJson, pObj); + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: + return jsonToCreateMultiTablesStmt(pJson, pObj); case QUERY_NODE_DROP_TABLE_CLAUSE: return jsonToDropTableClause(pJson, pObj); case QUERY_NODE_DROP_TABLE_STMT: @@ -5578,6 +6112,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDropStableStmt(pJson, pObj); case QUERY_NODE_ALTER_TABLE_STMT: return jsonToAlterTableStmt(pJson, pObj); + case QUERY_NODE_CREATE_USER_STMT: + return jsonToCreateUserStmt(pJson, pObj); case QUERY_NODE_DROP_USER_STMT: return jsonToDropUserStmt(pJson, pObj); case QUERY_NODE_USE_DATABASE_STMT: @@ -5586,8 +6122,12 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDropDnodeStmt(pJson, pObj); case QUERY_NODE_ALTER_DNODE_STMT: return jsonToAlterDnodeStmt(pJson, pObj); + case QUERY_NODE_DROP_INDEX_STMT: + return jsonToDropIndexStmt(pJson, pObj); case QUERY_NODE_DROP_QNODE_STMT: return jsonToDropQnodeStmt(pJson, pObj); + case QUERY_NODE_CREATE_SNODE_STMT: + return jsonToCreateSnodeStmt(pJson, pObj); case QUERY_NODE_DROP_SNODE_STMT: return jsonToDropSnodeStmt(pJson, pObj); case QUERY_NODE_DROP_MNODE_STMT: @@ -5596,6 +6136,12 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToCreateTopicStmt(pJson, pObj); case QUERY_NODE_DROP_TOPIC_STMT: return jsonToDropTopicStmt(pJson, pObj); + case QUERY_NODE_DROP_CGROUP_STMT: + return jsonToDropConsumerGroupStmt(pJson, pObj); + case QUERY_NODE_DESCRIBE_STMT: + return jsonToDescribeStmt(pJson, pObj); + case QUERY_NODE_CREATE_STREAM_STMT: + return jsonToCreateStreamStmt(pJson, pObj); case QUERY_NODE_DROP_STREAM_STMT: return jsonToDropStreamStmt(pJson, pObj); case QUERY_NODE_SPLIT_VGROUP_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index 1981272785..38203e61b0 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -321,8 +321,8 @@ SNode* nodesMakeNode(ENodeType type) { return makeNode(type, sizeof(SCreateTableStmt)); case QUERY_NODE_CREATE_SUBTABLE_CLAUSE: return makeNode(type, sizeof(SCreateSubTableClause)); - case QUERY_NODE_CREATE_MULTI_TABLE_STMT: - return makeNode(type, sizeof(SCreateMultiTableStmt)); + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: + return makeNode(type, sizeof(SCreateMultiTablesStmt)); case QUERY_NODE_DROP_TABLE_CLAUSE: return makeNode(type, sizeof(SDropTableClause)); case QUERY_NODE_DROP_TABLE_STMT: @@ -861,8 +861,8 @@ void nodesDestroyNode(SNode* pNode) { nodesDestroyNode((SNode*)pStmt->pOptions); break; } - case QUERY_NODE_CREATE_MULTI_TABLE_STMT: - nodesDestroyList(((SCreateMultiTableStmt*)pNode)->pSubTables); + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: + nodesDestroyList(((SCreateMultiTablesStmt*)pNode)->pSubTables); break; case QUERY_NODE_DROP_TABLE_CLAUSE: // no pointer field break; diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 3307f560dc..6e6fdd64b2 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1208,7 +1208,7 @@ SNode* createCreateSubTableClause(SAstCreateContext* pCxt, bool ignoreExists, SN SNode* createCreateMultiTableStmt(SAstCreateContext* pCxt, SNodeList* pSubTables) { CHECK_PARSER_STATUS(pCxt); - SCreateMultiTableStmt* pStmt = (SCreateMultiTableStmt*)nodesMakeNode(QUERY_NODE_CREATE_MULTI_TABLE_STMT); + SCreateMultiTablesStmt* pStmt = (SCreateMultiTablesStmt*)nodesMakeNode(QUERY_NODE_CREATE_MULTI_TABLES_STMT); CHECK_OUT_OF_MEM(pStmt); pStmt->pSubTables = pSubTables; return (SNode*)pStmt; @@ -1430,7 +1430,7 @@ SNode* createCreateUserStmt(SAstCreateContext* pCxt, SToken* pUserName, const ST } SCreateUserStmt* pStmt = (SCreateUserStmt*)nodesMakeNode(QUERY_NODE_CREATE_USER_STMT); CHECK_OUT_OF_MEM(pStmt); - COPY_STRING_FORM_ID_TOKEN(pStmt->useName, pUserName); + COPY_STRING_FORM_ID_TOKEN(pStmt->userName, pUserName); strcpy(pStmt->password, password); pStmt->sysinfo = sysinfo; return (SNode*)pStmt; @@ -1443,7 +1443,7 @@ SNode* createAlterUserStmt(SAstCreateContext* pCxt, SToken* pUserName, int8_t al } SAlterUserStmt* pStmt = (SAlterUserStmt*)nodesMakeNode(QUERY_NODE_ALTER_USER_STMT); CHECK_OUT_OF_MEM(pStmt); - COPY_STRING_FORM_ID_TOKEN(pStmt->useName, pUserName); + COPY_STRING_FORM_ID_TOKEN(pStmt->userName, pUserName); pStmt->alterType = alterType; switch (alterType) { case TSDB_ALTER_USER_PASSWD: { diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index f90a42add3..2a5fff0ad2 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -248,7 +248,7 @@ static int32_t collectMetaKeyFromCreateTable(SCollectMetaKeyCxt* pCxt, SCreateTa return code; } -static int32_t collectMetaKeyFromCreateMultiTable(SCollectMetaKeyCxt* pCxt, SCreateMultiTableStmt* pStmt) { +static int32_t collectMetaKeyFromCreateMultiTable(SCollectMetaKeyCxt* pCxt, SCreateMultiTablesStmt* pStmt) { int32_t code = TSDB_CODE_SUCCESS; SNode* pNode = NULL; FOREACH(pNode, pStmt->pSubTables) { @@ -584,8 +584,8 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromFlushDatabase(pCxt, (SFlushDatabaseStmt*)pStmt); case QUERY_NODE_CREATE_TABLE_STMT: return collectMetaKeyFromCreateTable(pCxt, (SCreateTableStmt*)pStmt); - case QUERY_NODE_CREATE_MULTI_TABLE_STMT: - return collectMetaKeyFromCreateMultiTable(pCxt, (SCreateMultiTableStmt*)pStmt); + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: + return collectMetaKeyFromCreateMultiTable(pCxt, (SCreateMultiTablesStmt*)pStmt); case QUERY_NODE_DROP_TABLE_STMT: return collectMetaKeyFromDropTable(pCxt, (SDropTableStmt*)pStmt); case QUERY_NODE_ALTER_TABLE_STMT: diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 1f00d17be1..a5bb660c37 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -5083,7 +5083,7 @@ static int32_t translateUseDatabase(STranslateContext* pCxt, SUseDatabaseStmt* p static int32_t translateCreateUser(STranslateContext* pCxt, SCreateUserStmt* pStmt) { SCreateUserReq createReq = {0}; - strcpy(createReq.user, pStmt->useName); + strcpy(createReq.user, pStmt->userName); createReq.createType = 0; createReq.superUser = 0; createReq.sysInfo = pStmt->sysinfo; @@ -5095,7 +5095,7 @@ static int32_t translateCreateUser(STranslateContext* pCxt, SCreateUserStmt* pSt static int32_t translateAlterUser(STranslateContext* pCxt, SAlterUserStmt* pStmt) { SAlterUserReq alterReq = {0}; - strcpy(alterReq.user, pStmt->useName); + strcpy(alterReq.user, pStmt->userName); alterReq.alterType = pStmt->alterType; alterReq.superUser = 0; alterReq.enable = pStmt->enable; @@ -7029,7 +7029,7 @@ SArray* serializeVgroupsCreateTableBatch(SHashObj* pVgroupHashmap) { } static int32_t rewriteCreateMultiTable(STranslateContext* pCxt, SQuery* pQuery) { - SCreateMultiTableStmt* pStmt = (SCreateMultiTableStmt*)pQuery->pRoot; + SCreateMultiTablesStmt* pStmt = (SCreateMultiTablesStmt*)pQuery->pRoot; SHashObj* pVgroupHashmap = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), false, HASH_NO_LOCK); if (NULL == pVgroupHashmap) { @@ -7637,7 +7637,7 @@ static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { code = rewriteCreateTable(pCxt, pQuery); } break; - case QUERY_NODE_CREATE_MULTI_TABLE_STMT: + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: code = rewriteCreateMultiTable(pCxt, pQuery); break; case QUERY_NODE_DROP_TABLE_STMT: diff --git a/source/libs/planner/src/planLogicCreater.c b/source/libs/planner/src/planLogicCreater.c index 352483f661..5c5daaa33b 100644 --- a/source/libs/planner/src/planLogicCreater.c +++ b/source/libs/planner/src/planLogicCreater.c @@ -1382,7 +1382,7 @@ static int32_t createSetOperatorLogicNode(SLogicPlanContext* pCxt, SSetOperator* static int32_t getMsgType(ENodeType sqlType) { switch (sqlType) { case QUERY_NODE_CREATE_TABLE_STMT: - case QUERY_NODE_CREATE_MULTI_TABLE_STMT: + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: return TDMT_VND_CREATE_TABLE; case QUERY_NODE_DROP_TABLE_STMT: return TDMT_VND_DROP_TABLE; From 2a7de0cd46f7fe9dfa1450979c0df083d5d23d66 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 21 Dec 2022 11:34:24 +0800 Subject: [PATCH 51/64] refactor: remove assert --- include/common/tcommon.h | 19 +-- include/libs/stream/streamState.h | 4 + source/dnode/vnode/src/tq/tq.c | 112 +++++++++--------- source/dnode/vnode/src/tq/tqExec.c | 28 +++-- source/dnode/vnode/src/tq/tqMeta.c | 50 ++++---- source/dnode/vnode/src/tq/tqOffset.c | 19 ++- source/dnode/vnode/src/tq/tqOffsetSnapshot.c | 24 ++-- source/dnode/vnode/src/tq/tqPush.c | 14 +-- source/dnode/vnode/src/tq/tqRead.c | 34 ++---- source/dnode/vnode/src/tq/tqSink.c | 10 +- source/dnode/vnode/src/tq/tqSnapshot.c | 2 - source/dnode/vnode/src/tq/tqStreamStateSnap.c | 3 - source/dnode/vnode/src/tq/tqStreamTaskSnap.c | 11 +- source/libs/executor/src/scanoperator.c | 74 +++++++++--- source/libs/stream/src/streamState.c | 20 +++- source/libs/wal/src/walRef.c | 1 + 16 files changed, 228 insertions(+), 197 deletions(-) diff --git a/include/common/tcommon.h b/include/common/tcommon.h index f74795a250..aad69862f0 100644 --- a/include/common/tcommon.h +++ b/include/common/tcommon.h @@ -195,7 +195,7 @@ typedef struct SDataBlockInfo { uint32_t capacity; SBlockID id; int16_t hasVarCol; - int16_t dataLoad; // denote if the data is loaded or not + int16_t dataLoad; // denote if the data is loaded or not // TODO: optimize and remove following int64_t version; // used for stream, and need serialization @@ -204,8 +204,9 @@ typedef struct SDataBlockInfo { STimeWindow calWin; // used for stream, do not serialize TSKEY watermark; // used for stream - char parTbName[TSDB_TABLE_NAME_LEN]; // used for stream partition - STag* pTag; // used for stream partition + char parTbName[TSDB_TABLE_NAME_LEN]; // used for stream partition + int32_t tagLen; + void* pTag; // used for stream partition } SDataBlockInfo; typedef struct SSDataBlock { @@ -239,22 +240,22 @@ typedef struct SVarColAttr { // pBlockAgg->numOfNull == info.rows, all data are null // pBlockAgg->numOfNull == 0, no data are null. typedef struct SColumnInfoData { - char* pData; // the corresponding block data in memory + char* pData; // the corresponding block data in memory union { char* nullbitmap; // bitmap, one bit for each item in the list SVarColAttr varmeta; }; - SColumnInfo info; // column info - bool hasNull; // if current column data has null value. + SColumnInfo info; // column info + bool hasNull; // if current column data has null value. } SColumnInfoData; typedef struct SQueryTableDataCond { uint64_t suid; - int32_t order; // desc|asc order to iterate the data block + int32_t order; // desc|asc order to iterate the data block int32_t numOfCols; SColumnInfo* colList; - int32_t* pSlotList; // the column output destation slot, and it may be null - int32_t type; // data block load type: + int32_t* pSlotList; // the column output destation slot, and it may be null + int32_t type; // data block load type: STimeWindow twindows; int64_t startVersion; int64_t endVersion; diff --git a/include/libs/stream/streamState.h b/include/libs/stream/streamState.h index 8fdac0da7f..d7bc151ecc 100644 --- a/include/libs/stream/streamState.h +++ b/include/libs/stream/streamState.h @@ -35,6 +35,7 @@ typedef struct STdbState { TTB* pFillStateDb; // todo refactor TTB* pSessionStateDb; TTB* pParNameDb; + TTB* pParTagDb; TXN* txn; } STdbState; @@ -108,6 +109,9 @@ int32_t streamStateCurPrev(SStreamState* pState, SStreamStateCur* pCur); int32_t streamStatePutParName(SStreamState* pState, int64_t groupId, const char* tbname); int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal); +int32_t streamStatePutParTag(SStreamState* pState, int64_t groupId, const void* tag, int32_t tagLen); +int32_t streamStateGetParTag(SStreamState* pState, int64_t groupId, void** tagVal, int32_t* tagLen); + #if 0 char* streamStateSessionDump(SStreamState* pState); #endif diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 4a941b3c20..222339d387 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -92,21 +92,21 @@ STQ* tqOpen(const char* path, SVnode* pVnode) { taosHashSetFreeFp(pTq->pCheckInfo, (FDelete)tDeleteSTqCheckInfo); if (tqMetaOpen(pTq) < 0) { - ASSERT(0); + return NULL; } pTq->pOffsetStore = tqOffsetOpen(pTq); if (pTq->pOffsetStore == NULL) { - ASSERT(0); + return NULL; } pTq->pStreamMeta = streamMetaOpen(path, pTq, (FTaskExpand*)tqExpandTask, pTq->pVnode->config.vgId); if (pTq->pStreamMeta == NULL) { - ASSERT(0); + return NULL; } if (streamLoadTasks(pTq->pStreamMeta) < 0) { - ASSERT(0); + return NULL; } return pTq; @@ -166,19 +166,17 @@ int32_t tqSendMetaPollRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry) { SMqDataRsp* pRsp = &pPushEntry->dataRsp; - ASSERT(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); - ASSERT(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); +#if 0 + A(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); + A(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); - ASSERT(!pRsp->withSchema); - ASSERT(taosArrayGetSize(pRsp->blockSchema) == 0); + A(!pRsp->withSchema); + A(taosArrayGetSize(pRsp->blockSchema) == 0); if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { - /*if (pRsp->blockNum > 0) {*/ - /*ASSERT(pRsp->rspOffset.version > pRsp->reqOffset.version);*/ - /*} else {*/ - ASSERT(pRsp->rspOffset.version > pRsp->reqOffset.version); - /*}*/ + A(pRsp->rspOffset.version > pRsp->reqOffset.version); } +#endif int32_t len = 0; int32_t code = 0; @@ -223,19 +221,21 @@ int32_t tqPushDataRsp(STQ* pTq, STqPushEntry* pPushEntry) { } int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, const SMqDataRsp* pRsp) { - ASSERT(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); - ASSERT(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); +#if 0 + A(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); + A(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); - ASSERT(!pRsp->withSchema); - ASSERT(taosArrayGetSize(pRsp->blockSchema) == 0); + A(!pRsp->withSchema); + A(taosArrayGetSize(pRsp->blockSchema) == 0); if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { if (pRsp->blockNum > 0) { - ASSERT(pRsp->rspOffset.version > pRsp->reqOffset.version); + A(pRsp->rspOffset.version > pRsp->reqOffset.version); } else { - ASSERT(pRsp->rspOffset.version >= pRsp->reqOffset.version); + A(pRsp->rspOffset.version >= pRsp->reqOffset.version); } } +#endif int32_t len = 0; int32_t code = 0; @@ -279,22 +279,24 @@ int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, con } int32_t tqSendTaosxRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, const STaosxRsp* pRsp) { - ASSERT(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); - ASSERT(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); +#if 0 + A(taosArrayGetSize(pRsp->blockData) == pRsp->blockNum); + A(taosArrayGetSize(pRsp->blockDataLen) == pRsp->blockNum); if (pRsp->withSchema) { - ASSERT(taosArrayGetSize(pRsp->blockSchema) == pRsp->blockNum); + A(taosArrayGetSize(pRsp->blockSchema) == pRsp->blockNum); } else { - ASSERT(taosArrayGetSize(pRsp->blockSchema) == 0); + A(taosArrayGetSize(pRsp->blockSchema) == 0); } if (pRsp->reqOffset.type == TMQ_OFFSET__LOG) { if (pRsp->blockNum > 0) { - ASSERT(pRsp->rspOffset.version > pRsp->reqOffset.version); + A(pRsp->rspOffset.version > pRsp->reqOffset.version); } else { - ASSERT(pRsp->rspOffset.version >= pRsp->reqOffset.version); + A(pRsp->rspOffset.version >= pRsp->reqOffset.version); } } +#endif int32_t len = 0; int32_t code = 0; @@ -348,7 +350,6 @@ int32_t tqProcessOffsetCommitReq(STQ* pTq, int64_t version, char* msg, int32_t m SDecoder decoder; tDecoderInit(&decoder, msg, msgLen); if (tDecodeSTqOffset(&decoder, &offset) < 0) { - ASSERT(0); return -1; } tDecoderClear(&decoder); @@ -362,8 +363,8 @@ int32_t tqProcessOffsetCommitReq(STQ* pTq, int64_t version, char* msg, int32_t m if (offset.val.version + 1 == version) { offset.val.version += 1; } - } else { - ASSERT(0); + /*} else {*/ + /*A(0);*/ } STqOffset* pOffset = tqOffsetRead(pTq->pOffsetStore, offset.subKey); if (pOffset != NULL && tqOffsetLessOrEqual(&offset, pOffset)) { @@ -371,7 +372,6 @@ int32_t tqProcessOffsetCommitReq(STQ* pTq, int64_t version, char* msg, int32_t m } if (tqOffsetWrite(pTq->pOffsetStore, &offset) < 0) { - ASSERT(0); return -1; } @@ -434,7 +434,7 @@ static int32_t tqInitDataRsp(SMqDataRsp* pRsp, const SMqPollReq* pReq, int8_t su } #endif - ASSERT(subType == TOPIC_SUB_TYPE__COLUMN); + /*A(subType == TOPIC_SUB_TYPE__COLUMN);*/ pRsp->withSchema = false; return 0; @@ -473,7 +473,6 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { // 1.find handle STqHandle* pHandle = taosHashGet(pTq->pHandle, req.subKey, strlen(req.subKey)); - /*ASSERT(pHandle);*/ if (pHandle == NULL) { tqError("tmq poll: no consumer handle for consumer:%" PRId64 ", in vgId:%d, subkey %s", consumerId, TD_VID(pTq->pVnode), req.subKey); @@ -560,7 +559,9 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { tqInitDataRsp(&dataRsp, &req, pHandle->execHandle.subType); // lock taosWLockLatch(&pTq->pushLock); - tqScanData(pTq, pHandle, &dataRsp, &fetchOffsetNew); + if (tqScanData(pTq, pHandle, &dataRsp, &fetchOffsetNew) < 0) { + return -1; + } #if 1 if (dataRsp.blockNum == 0 && dataRsp.reqOffset.type == TMQ_OFFSET__LOG && @@ -599,7 +600,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { } // for taosx - ASSERT(pHandle->execHandle.subType != TOPIC_SUB_TYPE__COLUMN); + /*A(pHandle->execHandle.subType != TOPIC_SUB_TYPE__COLUMN);*/ SMqMetaRsp metaRsp = {0}; @@ -607,7 +608,9 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { tqInitTaosxRsp(&taosxRsp, &req); if (fetchOffsetNew.type != TMQ_OFFSET__LOG) { - tqScanTaosx(pTq, pHandle, &taosxRsp, &metaRsp, &fetchOffsetNew); + if (tqScanTaosx(pTq, pHandle, &taosxRsp, &metaRsp, &fetchOffsetNew) < 0) { + return -1; + } if (metaRsp.metaRspLen > 0) { if (tqSendMetaPollRsp(pTq, pMsg, &req, &metaRsp) < 0) { @@ -690,8 +693,8 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) { } } else { - ASSERT(pHandle->fetchMeta); - ASSERT(IS_META_MSG(pHead->msgType)); + /*A(pHandle->fetchMeta);*/ + /*A(IS_META_MSG(pHead->msgType));*/ tqDebug("fetch meta msg, ver:%" PRId64 ", type:%d", pHead->version, pHead->msgType); tqOffsetResetToLog(&metaRsp.rspOffset, fetchVer); metaRsp.resMsgType = pHead->msgType; @@ -808,7 +811,6 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t version, char* msg, int32_t msgL // TODO version should be assigned and refed during preprocess SWalRef* pRef = walRefCommittedVer(pTq->pVnode->pWal); if (pRef == NULL) { - ASSERT(0); return -1; } int64_t ver = pRef->refVer; @@ -829,12 +831,12 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t version, char* msg, int32_t msgL pHandle->execHandle.task = qCreateQueueExecTaskInfo(pHandle->execHandle.execCol.qmsg, &handle, &pHandle->execHandle.numOfCols, NULL); - ASSERT(pHandle->execHandle.task); + /*A(pHandle->execHandle.task);*/ void* scanner = NULL; qExtractStreamScanner(pHandle->execHandle.task, &scanner); - ASSERT(scanner); + /*A(scanner);*/ pHandle->execHandle.pExecReader = qExtractReaderFromStreamScanner(scanner); - ASSERT(pHandle->execHandle.pExecReader); + /*A(pHandle->execHandle.pExecReader);*/ } else if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__DB) { pHandle->pWalReader = walOpenReader(pTq->pVnode->pWal, NULL); pHandle->execHandle.pExecReader = tqOpenReader(pTq->pVnode); @@ -867,19 +869,14 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t version, char* msg, int32_t msgL taosHashPut(pTq->pHandle, req.subKey, strlen(req.subKey), pHandle, sizeof(STqHandle)); tqDebug("try to persist handle %s consumer %" PRId64, req.subKey, pHandle->consumerId); if (tqMetaSaveHandle(pTq, req.subKey, pHandle) < 0) { - // TODO - ASSERT(0); } } else { - /*ASSERT(pExec->consumerId == req.oldConsumerId);*/ // TODO handle qmsg and exec modification atomic_store_32(&pHandle->epoch, -1); atomic_store_64(&pHandle->consumerId, req.newConsumerId); atomic_add_fetch_32(&pHandle->epoch, 1); taosMemoryFree(req.qmsg); if (tqMetaSaveHandle(pTq, req.subKey, pHandle) < 0) { - // TODO - ASSERT(0); } // close handle } @@ -888,9 +885,11 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t version, char* msg, int32_t msgL } int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) { +#if 0 if (pTask->taskLevel == TASK_LEVEL__AGG) { - ASSERT(taosArrayGetSize(pTask->childEpInfo) != 0); + A(taosArrayGetSize(pTask->childEpInfo) != 0); } +#endif pTask->refCnt = 1; pTask->schedStatus = TASK_SCHED_STATUS__INACTIVE; @@ -927,7 +926,9 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) { .pStateBackend = pTask->pState, }; pTask->exec.executor = qCreateStreamExecTaskInfo(pTask->exec.qmsg, &handle); - ASSERT(pTask->exec.executor); + if (pTask->exec.executor == NULL) { + return -1; + } } else if (pTask->taskLevel == TASK_LEVEL__AGG) { pTask->pState = streamStateOpen(pTq->pStreamMeta->path, pTask, false, -1, -1); @@ -940,7 +941,9 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) { .pStateBackend = pTask->pState, }; pTask->exec.executor = qCreateStreamExecTaskInfo(pTask->exec.qmsg, &mgHandle); - ASSERT(pTask->exec.executor); + if (pTask->exec.executor == NULL) { + return -1; + } } // sink @@ -952,12 +955,12 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask, int64_t ver) { pTask->tbSink.vnode = pTq->pVnode; pTask->tbSink.tbSinkFunc = tqSinkToTablePipeline; - ASSERT(pTask->tbSink.pSchemaWrapper); - ASSERT(pTask->tbSink.pSchemaWrapper->pSchema); + /*A(pTask->tbSink.pSchemaWrapper);*/ + /*A(pTask->tbSink.pSchemaWrapper->pSchema);*/ pTask->tbSink.pTSchema = tdGetSTSChemaFromSSChema(pTask->tbSink.pSchemaWrapper->pSchema, pTask->tbSink.pSchemaWrapper->nCols, 1); - ASSERT(pTask->tbSink.pTSchema); + /*A(pTask->tbSink.pTSchema);*/ } streamSetupTrigger(pTask); @@ -1003,7 +1006,8 @@ int32_t tqProcessStreamTaskCheckReq(STQ* pTq, SRpcMsg* pMsg) { int32_t len; tEncodeSize(tEncodeSStreamTaskCheckRsp, &rsp, len, code); if (code < 0) { - ASSERT(0); + tqError("unable to encode rsp %d", __LINE__); + return -1; } void* buf = rpcMallocCont(sizeof(SMsgHead) + len); ((SMsgHead*)buf)->vgId = htonl(req.upstreamNodeId); @@ -1096,12 +1100,10 @@ int32_t tqProcessTaskRecover1Req(STQ* pTq, SRpcMsg* pMsg) { if (pTask == NULL) { return -1; } - ASSERT(pReq->taskId == pTask->taskId); // check param int64_t fillVer1 = pTask->startVer; if (fillVer1 <= 0) { - ASSERT(0); streamMetaReleaseTask(pTq->pStreamMeta, pTask); return -1; } @@ -1296,7 +1298,7 @@ int32_t tqProcessDelReq(STQ* pTq, void* pReq, int32_t len, int64_t ver) { } int32_t ref = atomic_sub_fetch_32(pRef, 1); - ASSERT(ref >= 0); + /*A(ref >= 0);*/ if (ref == 0) { blockDataDestroy(pDelBlock); taosMemoryFree(pRef); diff --git a/source/dnode/vnode/src/tq/tqExec.c b/source/dnode/vnode/src/tq/tqExec.c index 093186ebbb..426fceb7ed 100644 --- a/source/dnode/vnode/src/tq/tqExec.c +++ b/source/dnode/vnode/src/tq/tqExec.c @@ -29,7 +29,6 @@ int32_t tqAddBlockDataToRsp(const SSDataBlock* pBlock, SMqDataRsp* pRsp, int32_t int32_t actualLen = blockEncode(pBlock, pRetrieve->data, numOfCols); actualLen += sizeof(SRetrieveTableRsp); - ASSERT(actualLen <= dataStrLen); taosArrayPush(pRsp->blockDataLen, &actualLen); taosArrayPush(pRsp->blockData, &buf); return 0; @@ -62,7 +61,6 @@ static int32_t tqAddTbNameToRsp(const STQ* pTq, int64_t uid, SMqDataRsp* pRsp, i int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffsetVal* pOffset) { const STqExecHandle* pExec = &pHandle->execHandle; - ASSERT(pExec->subType == TOPIC_SUB_TYPE__COLUMN); qTaskInfo_t task = pExec->task; @@ -87,7 +85,8 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs uint64_t ts = 0; tqDebug("vgId:%d, tmq task start to execute", pTq->pVnode->config.vgId); if (qExecTask(task, &pDataBlock, &ts) < 0) { - ASSERT(0); + tqError("vgId:%d task exec error since %s", pTq->pVnode->config.vgId, terrstr()); + return -1; } tqDebug("vgId:%d, tmq task executed, get %p", pTq->pVnode->config.vgId, pDataBlock); @@ -105,10 +104,14 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs } if (qStreamExtractOffset(task, &pRsp->rspOffset) < 0) { - ASSERT(0); return -1; } - ASSERT(pRsp->rspOffset.type != 0); + + if (pRsp->rspOffset.type == 0) { + tqError("expected rsp offset: type %d %" PRId64 " %" PRId64 " %" PRId64, pRsp->rspOffset.type, pRsp->rspOffset.ts, + pRsp->rspOffset.uid, pRsp->rspOffset.version); + return -1; + } if (pRsp->withTbName) { if (pRsp->rspOffset.type == TMQ_OFFSET__LOG) { @@ -118,7 +121,6 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs pRsp->withTbName = false; } } - ASSERT(pRsp->withSchema == false); return 0; } @@ -148,7 +150,8 @@ int32_t tqScanTaosx(STQ* pTq, const STqHandle* pHandle, STaosxRsp* pRsp, SMqMeta uint64_t ts = 0; tqDebug("tmqsnap task start to execute"); if (qExecTask(task, &pDataBlock, &ts) < 0) { - ASSERT(0); + tqError("vgId:%d task exec error since %s", pTq->pVnode->config.vgId, terrstr()); + return -1; } tqDebug("tmqsnap task execute end, get %p", pDataBlock); @@ -215,17 +218,20 @@ int32_t tqScanTaosx(STQ* pTq, const STqHandle* pHandle, STaosxRsp* pRsp, SMqMeta break; } - if (qStreamExtractOffset(task, &pRsp->rspOffset) < 0) { - ASSERT(0); + qStreamExtractOffset(task, &pRsp->rspOffset); + + if (pRsp->rspOffset.type == 0) { + tqError("expected rsp offset: type %d %" PRId64 " %" PRId64 " %" PRId64, pRsp->rspOffset.type, pRsp->rspOffset.ts, + pRsp->rspOffset.uid, pRsp->rspOffset.version); + return -1; } - ASSERT(pRsp->rspOffset.type != 0); return 0; } int32_t tqTaosxScanLog(STQ* pTq, STqHandle* pHandle, SSubmitReq* pReq, STaosxRsp* pRsp) { STqExecHandle* pExec = &pHandle->execHandle; - ASSERT(pExec->subType != TOPIC_SUB_TYPE__COLUMN); + /*A(pExec->subType != TOPIC_SUB_TYPE__COLUMN);*/ SArray* pBlocks = taosArrayInit(0, sizeof(SSDataBlock)); SArray* pSchemas = taosArrayInit(0, sizeof(void*)); diff --git a/source/dnode/vnode/src/tq/tqMeta.c b/source/dnode/vnode/src/tq/tqMeta.c index f476f58b56..05ed8d7348 100644 --- a/source/dnode/vnode/src/tq/tqMeta.c +++ b/source/dnode/vnode/src/tq/tqMeta.c @@ -71,17 +71,14 @@ int32_t tDecodeSTqHandle(SDecoder* pDecoder, STqHandle* pHandle) { int32_t tqMetaOpen(STQ* pTq) { if (tdbOpen(pTq->path, 16 * 1024, 1, &pTq->pMetaDB, 0) < 0) { - ASSERT(0); return -1; } if (tdbTbOpen("tq.db", -1, -1, NULL, pTq->pMetaDB, &pTq->pExecStore, 0) < 0) { - ASSERT(0); return -1; } if (tdbTbOpen("tq.check.db", -1, -1, NULL, pTq->pMetaDB, &pTq->pCheckStore, 0) < 0) { - ASSERT(0); return -1; } @@ -135,19 +132,19 @@ int32_t tqMetaDeleteCheckInfo(STQ* pTq, const char* key) { if (tdbBegin(pTq->pMetaDB, &txn, tdbDefaultMalloc, tdbDefaultFree, NULL, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED) < 0) { - ASSERT(0); + return -1; } if (tdbTbDelete(pTq->pCheckStore, key, (int)strlen(key), txn) < 0) { - /*ASSERT(0);*/ + tqWarn("vgId:%d, tq try delete checkinfo failed %s", pTq->pVnode->config.vgId, key); } if (tdbCommit(pTq->pMetaDB, txn) < 0) { - ASSERT(0); + return -1; } if (tdbPostCommit(pTq->pMetaDB, txn) < 0) { - ASSERT(0); + return -1; } return 0; @@ -156,7 +153,6 @@ int32_t tqMetaDeleteCheckInfo(STQ* pTq, const char* key) { int32_t tqMetaRestoreCheckInfo(STQ* pTq) { TBC* pCur = NULL; if (tdbTbcOpen(pTq->pCheckStore, &pCur, NULL) < 0) { - ASSERT(0); return -1; } @@ -197,40 +193,42 @@ int32_t tqMetaSaveHandle(STQ* pTq, const char* key, const STqHandle* pHandle) { int32_t code; int32_t vlen; tEncodeSize(tEncodeSTqHandle, pHandle, vlen, code); - ASSERT(code == 0); + if (code < 0) { + return -1; + } tqDebug("tq save %s(%d) consumer %" PRId64 " vgId:%d", pHandle->subKey, (int32_t)strlen(pHandle->subKey), pHandle->consumerId, TD_VID(pTq->pVnode)); void* buf = taosMemoryCalloc(1, vlen); if (buf == NULL) { - ASSERT(0); + return -1; } SEncoder encoder; tEncoderInit(&encoder, buf, vlen); if (tEncodeSTqHandle(&encoder, pHandle) < 0) { - ASSERT(0); + return -1; } TXN* txn; if (tdbBegin(pTq->pMetaDB, &txn, tdbDefaultMalloc, tdbDefaultFree, NULL, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED) < 0) { - ASSERT(0); + return -1; } if (tdbTbUpsert(pTq->pExecStore, key, (int)strlen(key), buf, vlen, txn) < 0) { - ASSERT(0); + return -1; } if (tdbCommit(pTq->pMetaDB, txn) < 0) { - ASSERT(0); + return -1; } if (tdbPostCommit(pTq->pMetaDB, txn) < 0) { - ASSERT(0); + return -1; } tEncoderClear(&encoder); @@ -243,19 +241,18 @@ int32_t tqMetaDeleteHandle(STQ* pTq, const char* key) { if (tdbBegin(pTq->pMetaDB, &txn, tdbDefaultMalloc, tdbDefaultFree, NULL, TDB_TXN_WRITE | TDB_TXN_READ_UNCOMMITTED) < 0) { - ASSERT(0); + return -1; } if (tdbTbDelete(pTq->pExecStore, key, (int)strlen(key), txn) < 0) { - /*ASSERT(0);*/ } if (tdbCommit(pTq->pMetaDB, txn) < 0) { - ASSERT(0); + return -1; } if (tdbPostCommit(pTq->pMetaDB, txn) < 0) { - ASSERT(0); + return -1; } return 0; @@ -264,7 +261,6 @@ int32_t tqMetaDeleteHandle(STQ* pTq, const char* key) { int32_t tqMetaRestoreHandle(STQ* pTq) { TBC* pCur = NULL; if (tdbTbcOpen(pTq->pExecStore, &pCur, NULL) < 0) { - ASSERT(0); return -1; } @@ -284,7 +280,6 @@ int32_t tqMetaRestoreHandle(STQ* pTq) { handle.pRef = walOpenRef(pTq->pVnode->pWal); if (handle.pRef == NULL) { - ASSERT(0); return -1; } walRefVer(handle.pRef, handle.snapshotVer); @@ -300,12 +295,19 @@ int32_t tqMetaRestoreHandle(STQ* pTq) { if (handle.execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { handle.execHandle.task = qCreateQueueExecTaskInfo(handle.execHandle.execCol.qmsg, &reader, &handle.execHandle.numOfCols, NULL); - ASSERT(handle.execHandle.task); + if (handle.execHandle.task == NULL) { + tqError("cannot create exec task for %s", handle.subKey); + return -1; + } void* scanner = NULL; qExtractStreamScanner(handle.execHandle.task, &scanner); - ASSERT(scanner); + if (scanner == NULL) { + tqError("cannot extract stream scanner for %s", handle.subKey); + } handle.execHandle.pExecReader = qExtractReaderFromStreamScanner(scanner); - ASSERT(handle.execHandle.pExecReader); + if (handle.execHandle.pExecReader == NULL) { + tqError("cannot extract exec reader for %s", handle.subKey); + } } else if (handle.execHandle.subType == TOPIC_SUB_TYPE__DB) { handle.pWalReader = walOpenReader(pTq->pVnode->pWal, NULL); handle.execHandle.pExecReader = tqOpenReader(pTq->pVnode); diff --git a/source/dnode/vnode/src/tq/tqOffset.c b/source/dnode/vnode/src/tq/tqOffset.c index dd56c165fd..5a4d414ab7 100644 --- a/source/dnode/vnode/src/tq/tqOffset.c +++ b/source/dnode/vnode/src/tq/tqOffset.c @@ -40,26 +40,23 @@ int32_t tqOffsetRestoreFromFile(STqOffsetStore* pStore, const char* fname) { if (code == 0) { break; } else { - ASSERT(0); - // TODO handle error + return -1; } } int32_t size = htonl(head.size); void* memBuf = taosMemoryCalloc(1, size); if ((code = taosReadFile(pFile, memBuf, size)) != size) { - ASSERT(0); - // TODO handle error + return -1; } STqOffset offset; SDecoder decoder; tDecoderInit(&decoder, memBuf, size); if (tDecodeSTqOffset(&decoder, &offset) < 0) { - ASSERT(0); + return -1; } tDecoderClear(&decoder); if (taosHashPut(pStore->pHash, offset.subKey, strlen(offset.subKey), &offset, sizeof(STqOffset)) < 0) { - ASSERT(0); - // TODO + return -1; } taosMemoryFree(memBuf); } @@ -85,7 +82,9 @@ STqOffsetStore* tqOffsetOpen(STQ* pTq) { } char* fname = tqOffsetBuildFName(pStore->pTq->path, 0); if (tqOffsetRestoreFromFile(pStore, fname) < 0) { - ASSERT(0); + taosMemoryFree(fname); + taosMemoryFree(pStore); + return NULL; } taosMemoryFree(fname); return pStore; @@ -124,7 +123,6 @@ int32_t tqOffsetCommitFile(STqOffsetStore* pStore) { const char* sysErrStr = strerror(errno); tqError("vgId:%d, cannot open file %s when commit offset since %s", pStore->pTq->pVnode->config.vgId, fname, sysErrStr); - ASSERT(0); return -1; } taosMemoryFree(fname); @@ -136,9 +134,7 @@ int32_t tqOffsetCommitFile(STqOffsetStore* pStore) { int32_t bodyLen; int32_t code; tEncodeSize(tEncodeSTqOffset, pOffset, bodyLen, code); - ASSERT(code == 0); if (code < 0) { - ASSERT(0); taosHashCancelIterate(pStore->pHash, pIter); return -1; } @@ -154,7 +150,6 @@ int32_t tqOffsetCommitFile(STqOffsetStore* pStore) { // write file int64_t writeLen; if ((writeLen = taosWriteFile(pFile, buf, totLen)) != totLen) { - ASSERT(0); tqError("write offset incomplete, len %d, write len %" PRId64, bodyLen, writeLen); taosHashCancelIterate(pStore->pHash, pIter); taosMemoryFree(buf); diff --git a/source/dnode/vnode/src/tq/tqOffsetSnapshot.c b/source/dnode/vnode/src/tq/tqOffsetSnapshot.c index b63ff8af1d..2413a792c6 100644 --- a/source/dnode/vnode/src/tq/tqOffsetSnapshot.c +++ b/source/dnode/vnode/src/tq/tqOffsetSnapshot.c @@ -56,24 +56,28 @@ int32_t tqOffsetSnapRead(STqOffsetReader* pReader, uint8_t** ppData) { TdFilePtr pFile = taosOpenFile(fname, TD_FILE_READ); if (pFile == NULL) { taosMemoryFree(fname); - return 0; + return -1; } int64_t sz = 0; if (taosStatFile(fname, &sz, NULL) < 0) { - ASSERT(0); + taosCloseFile(&pFile); + taosMemoryFree(fname); + return -1; } taosMemoryFree(fname); SSnapDataHdr* buf = taosMemoryCalloc(1, sz + sizeof(SSnapDataHdr)); if (buf == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; + taosCloseFile(&pFile); return terrno; } void* abuf = POINTER_SHIFT(buf, sizeof(SSnapDataHdr)); int64_t contLen = taosReadFile(pFile, abuf, sz); if (contLen != sz) { - ASSERT(0); + taosCloseFile(&pFile); + taosMemoryFree(buf); return -1; } buf->size = sz; @@ -122,14 +126,17 @@ int32_t tqOffsetWriterClose(STqOffsetWriter** ppWriter, int8_t rollback) { if (rollback) { if (taosRemoveFile(pWriter->fname) < 0) { - ASSERT(0); + taosMemoryFree(fname); + return -1; } } else { if (taosRenameFile(pWriter->fname, fname) < 0) { - ASSERT(0); + taosMemoryFree(fname); + return -1; } if (tqOffsetRestoreFromFile(pTq->pOffsetStore, fname) < 0) { - ASSERT(0); + taosMemoryFree(fname); + return -1; } } taosMemoryFree(fname); @@ -146,14 +153,13 @@ int32_t tqOffsetSnapWrite(STqOffsetWriter* pWriter, uint8_t* pData, uint32_t nDa TdFilePtr pFile = taosOpenFile(pWriter->fname, TD_FILE_CREATE | TD_FILE_WRITE); SSnapDataHdr* pHdr = (SSnapDataHdr*)pData; int64_t size = pHdr->size; - ASSERT(size == nData - sizeof(SSnapDataHdr)); if (pFile) { int64_t contLen = taosWriteFile(pFile, pHdr->data, size); if (contLen != size) { - ASSERT(0); + taosCloseFile(&pFile); + return -1; } } else { - ASSERT(0); return -1; } return 0; diff --git a/source/dnode/vnode/src/tq/tqPush.c b/source/dnode/vnode/src/tq/tqPush.c index f89bc20362..63c3c25218 100644 --- a/source/dnode/vnode/src/tq/tqPush.c +++ b/source/dnode/vnode/src/tq/tqPush.c @@ -25,9 +25,7 @@ void tqTmrRspFunc(void* param, void* tmrId) { static int32_t tqLoopExecFromQueue(STQ* pTq, STqHandle* pHandle, SStreamDataSubmit** ppSubmit, SMqDataRsp* pRsp) { SStreamDataSubmit* pSubmit = *ppSubmit; while (pSubmit != NULL) { - ASSERT(pSubmit->ver == pHandle->pushHandle.processedVer + 1); if (tqLogScanExec(pTq, &pHandle->execHandle, pSubmit->data, pRsp, 0) < 0) { - /*ASSERT(0);*/ } // update processed atomic_store_64(&pHandle->pushHandle.processedVer, pSubmit->ver); @@ -160,8 +158,7 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ if (msgType == TDMT_VND_SUBMIT) { tqLogScanExec(pTq, &pHandle->execHandle, pReq, &rsp, workerId); } else { - // TODO - ASSERT(0); + tqError("tq push unexpected msg type %d", msgType); } if (rsp.blockNum == 0) { @@ -169,9 +166,6 @@ int32_t tqPushMsgNew(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_ continue; } - ASSERT(taosArrayGetSize(rsp.blockData) == rsp.blockNum); - ASSERT(taosArrayGetSize(rsp.blockDataLen) == rsp.blockNum); - rsp.rspOffset = fetchOffset; int32_t tlen = sizeof(SMqRspHead) + tEncodeSMqDataBlkRsp(NULL, &rsp); @@ -263,7 +257,7 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) SSDataBlock* pDataBlock = NULL; uint64_t ts = 0; if (qExecTask(task, &pDataBlock, &ts) < 0) { - ASSERT(0); + tqDebug("vgId:%d, tq exec error since %s", pTq->pVnode->config.vgId, terrstr()); } if (pDataBlock == NULL) { @@ -282,7 +276,7 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) // remove from hash size_t kLen; void* key = taosHashGetKey(pIter, &kLen); - void* keyCopy = taosMemoryMalloc(kLen); + void* keyCopy = taosMemoryCalloc(1, kLen + 1); memcpy(keyCopy, key, kLen); taosArrayPush(cachedKeys, &keyCopy); @@ -296,7 +290,7 @@ int tqPushMsg(STQ* pTq, void* msg, int32_t msgLen, tmsg_t msgType, int64_t ver) void* key = taosArrayGetP(cachedKeys, i); size_t kLen = *(size_t*)taosArrayGet(cachedKeyLens, i); if (taosHashRemove(pTq->pPushMgr, key, kLen) != 0) { - ASSERT(0); + tqError("vgId:%d, tq push hash remove key error, key: %s", pTq->pVnode->config.vgId, (char*)key); } } taosArrayDestroyP(cachedKeys, (FDelete)taosMemoryFree); diff --git a/source/dnode/vnode/src/tq/tqRead.c b/source/dnode/vnode/src/tq/tqRead.c index 46b31bc5b0..e5392bbd02 100644 --- a/source/dnode/vnode/src/tq/tqRead.c +++ b/source/dnode/vnode/src/tq/tqRead.c @@ -176,8 +176,6 @@ bool isValValidForTable(STqHandle* pHandle, SWalCont* pHead) { goto end; } realTbSuid = req.suid; - } else { - ASSERT(0); } end: @@ -206,7 +204,6 @@ int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalCkHea code = walFetchBody(pHandle->pWalReader, ppCkHead); if (code < 0) { - ASSERT(0); *fetchOffset = offset; code = -1; goto END; @@ -220,7 +217,6 @@ int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalCkHea if (IS_META_MSG(pHead->msgType)) { code = walFetchBody(pHandle->pWalReader, ppCkHead); if (code < 0) { - ASSERT(0); *fetchOffset = offset; code = -1; goto END; @@ -238,7 +234,6 @@ int64_t tqFetchLog(STQ* pTq, STqHandle* pHandle, int64_t* fetchOffset, SWalCkHea } code = walSkipFetchBody(pHandle->pWalReader, *ppCkHead); if (code < 0) { - ASSERT(0); *fetchOffset = offset; code = -1; goto END; @@ -297,11 +292,8 @@ void tqCloseReader(STqReader* pReader) { int32_t tqSeekVer(STqReader* pReader, int64_t ver) { if (walReadSeekVer(pReader->pWalReader, ver) < 0) { - ASSERT(pReader->pWalReader->curInvalid); - ASSERT(pReader->pWalReader->curVersion == ver); return -1; } - ASSERT(pReader->pWalReader->curVersion == ver); return 0; } @@ -317,7 +309,6 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { ret->offset.version = pReader->ver; ret->fetchType = FETCH_TYPE__NONE; tqDebug("return offset %" PRId64 ", no more valid", ret->offset.version); - ASSERT(ret->offset.version >= 0); return -1; } void* body = pReader->pWalReader->pHead->head.body; @@ -340,7 +331,6 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { memset(&ret->data, 0, sizeof(SSDataBlock)); int32_t code = tqRetrieveDataBlock(&ret->data, pReader); if (code != 0 || ret->data.info.rows == 0) { - ASSERT(0); continue; } ret->fetchType = FETCH_TYPE__DATA; @@ -351,7 +341,6 @@ int32_t tqNextBlock(STqReader* pReader, SFetchRet* ret) { if (fromProcessedMsg) { ret->offset.type = TMQ_OFFSET__LOG; ret->offset.version = pReader->ver; - ASSERT(pReader->ver >= 0); ret->fetchType = FETCH_TYPE__SEP; tqDebug("return offset %" PRId64 ", processed finish", ret->offset.version); return 0; @@ -434,7 +423,6 @@ bool tqNextDataBlockFilterOut(STqReader* pHandle, SHashObj* filterOutUids) { } if (pHandle->pBlock == NULL) return false; - ASSERT(pHandle->tbIdHash == NULL); void* ret = taosHashGet(filterOutUids, &pHandle->msgIter.uid, sizeof(int64_t)); if (ret == NULL) { return true; @@ -453,7 +441,6 @@ int32_t tqRetrieveDataBlock(SSDataBlock* pBlock, STqReader* pReader) { if (pReader->pSchema == NULL) { tqWarn("cannot found tsschema for table: uid:%" PRId64 " (suid:%" PRId64 "), version %d, possibly dropped table", pReader->msgIter.uid, pReader->msgIter.suid, pReader->cachedSchemaVer); - /*ASSERT(0);*/ pReader->cachedSchemaSuid = 0; terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; return -1; @@ -464,7 +451,6 @@ int32_t tqRetrieveDataBlock(SSDataBlock* pBlock, STqReader* pReader) { if (pReader->pSchemaWrapper == NULL) { tqWarn("cannot found schema wrapper for table: suid:%" PRId64 ", version %d, possibly dropped table", pReader->msgIter.uid, pReader->cachedSchemaVer); - /*ASSERT(0);*/ pReader->cachedSchemaSuid = 0; terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; return -1; @@ -567,7 +553,6 @@ int32_t tqRetrieveTaosxBlock(STqReader* pReader, SArray* blocks, SArray* schemas if (pReader->pSchema == NULL) { tqWarn("cannot found tsschema for table: uid:%" PRId64 " (suid:%" PRId64 "), version %d, possibly dropped table", pReader->msgIter.uid, pReader->msgIter.suid, pReader->cachedSchemaVer); - /*ASSERT(0);*/ pReader->cachedSchemaSuid = 0; terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; return -1; @@ -578,7 +563,6 @@ int32_t tqRetrieveTaosxBlock(STqReader* pReader, SArray* blocks, SArray* schemas if (pReader->pSchemaWrapper == NULL) { tqWarn("cannot found schema wrapper for table: suid:%" PRId64 ", version %d, possibly dropped table", pReader->msgIter.uid, pReader->cachedSchemaVer); - /*ASSERT(0);*/ pReader->cachedSchemaSuid = 0; terrno = TSDB_CODE_TQ_TABLE_SCHEMA_NOT_FOUND; return -1; @@ -671,8 +655,6 @@ int32_t tqRetrieveTaosxBlock(STqReader* pReader, SArray* blocks, SArray* schemas break; } - ASSERT(sVal.valType != TD_VTYPE_NONE); - if (colDataAppend(pColData, curRow, sVal.val, sVal.valType == TD_VTYPE_NULL) < 0) { goto FAIL; } @@ -732,8 +714,6 @@ int tqReaderAddTbUidList(STqReader* pReader, const SArray* tbUidList) { } int tqReaderRemoveTbUidList(STqReader* pReader, const SArray* tbUidList) { - ASSERT(pReader->tbIdHash != NULL); - for (int32_t i = 0; i < taosArrayGetSize(tbUidList); i++) { int64_t* pKey = (int64_t*)taosArrayGet(tbUidList, i); taosHashRemove(pReader->tbIdHash, pKey, sizeof(int64_t)); @@ -750,7 +730,10 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) { STqHandle* pExec = (STqHandle*)pIter; if (pExec->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) { int32_t code = qUpdateQualifiedTableId(pExec->execHandle.task, tbUidList, isAdd); - ASSERT(code == 0); + if (code != 0) { + tqError("update qualified table error for %s", pExec->subKey); + continue; + } } else if (pExec->execHandle.subType == TOPIC_SUB_TYPE__DB) { if (!isAdd) { int32_t sz = taosArrayGetSize(tbUidList); @@ -769,7 +752,7 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) { int32_t code = metaGetTableEntryByUidCache(&mr, *id); if (code != TSDB_CODE_SUCCESS) { - qError("failed to get table meta, uid:%" PRIu64 " code:%s", *id, tstrerror(terrno)); + tqError("failed to get table meta, uid:%" PRIu64 " code:%s", *id, tstrerror(terrno)); continue; } @@ -790,8 +773,6 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) { } else { // TODO handle delete table from stb } - } else { - ASSERT(0); } } while (1) { @@ -800,7 +781,10 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList, bool isAdd) { SStreamTask* pTask = *(SStreamTask**)pIter; if (pTask->taskLevel == TASK_LEVEL__SOURCE) { int32_t code = qUpdateQualifiedTableId(pTask->exec.executor, tbUidList, isAdd); - ASSERT(code == 0); + if (code != 0) { + tqError("update qualified table error for stream task %d", pTask->taskId); + continue; + } } } return 0; diff --git a/source/dnode/vnode/src/tq/tqSink.c b/source/dnode/vnode/src/tq/tqSink.c index 5907be576a..078b50db68 100644 --- a/source/dnode/vnode/src/tq/tqSink.c +++ b/source/dnode/vnode/src/tq/tqSink.c @@ -19,7 +19,6 @@ int32_t tqBuildDeleteReq(SVnode* pVnode, const char* stbFullName, const SSDataBlock* pDataBlock, SBatchDeleteReq* deleteReq) { - ASSERT(pDataBlock->info.type == STREAM_DELETE_RESULT); int32_t totRow = pDataBlock->info.rows; SColumnInfoData* pStartTsCol = taosArrayGet(pDataBlock->pDataBlock, START_TS_COLUMN_INDEX); SColumnInfoData* pEndTsCol = taosArrayGet(pDataBlock->pDataBlock, END_TS_COLUMN_INDEX); @@ -334,8 +333,8 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d int32_t code; tEncodeSize(tEncodeSBatchDeleteReq, &deleteReq, len, code); if (code < 0) { - // - ASSERT(0); + terrno = TSDB_CODE_OUT_OF_MEMORY; + return; } SEncoder encoder; void* serializedDeleteReq = rpcMallocCont(len + sizeof(SMsgHead)); @@ -559,7 +558,6 @@ void tqSinkToTableMerge(SStreamTask* pTask, void* vnode, int64_t ver, void* data tqDebug("vgId:%d, task %d write into table, block num: %d", TD_VID(pVnode), pTask->taskId, (int32_t)pRes->size); - ASSERT(pTask->tbSink.pTSchema); deleteReq.deleteReqs = taosArrayInit(0, sizeof(SSingleDeleteReq)); SSubmitReq* submitReq = tqBlockToSubmit(pVnode, pRes, pTask->tbSink.pTSchema, pTask->tbSink.pSchemaWrapper, true, pTask->tbSink.stbUid, pTask->tbSink.stbFullName, &deleteReq); @@ -570,10 +568,6 @@ void tqSinkToTableMerge(SStreamTask* pTask, void* vnode, int64_t ver, void* data int32_t code; int32_t len; tEncodeSize(tEncodeSBatchDeleteReq, &deleteReq, len, code); - if (code < 0) { - // - ASSERT(0); - } SEncoder encoder; void* serializedDeleteReq = rpcMallocCont(len + sizeof(SMsgHead)); void* abuf = POINTER_SHIFT(serializedDeleteReq, sizeof(SMsgHead)); diff --git a/source/dnode/vnode/src/tq/tqSnapshot.c b/source/dnode/vnode/src/tq/tqSnapshot.c index d811d943ed..ab7093a701 100644 --- a/source/dnode/vnode/src/tq/tqSnapshot.c +++ b/source/dnode/vnode/src/tq/tqSnapshot.c @@ -100,8 +100,6 @@ int32_t tqSnapRead(STqSnapReader* pReader, uint8_t** ppData) { } } - ASSERT(pVal && vLen); - *ppData = taosMemoryMalloc(sizeof(SSnapDataHdr) + vLen); if (*ppData == NULL) { code = TSDB_CODE_OUT_OF_MEMORY; diff --git a/source/dnode/vnode/src/tq/tqStreamStateSnap.c b/source/dnode/vnode/src/tq/tqStreamStateSnap.c index b1f00bdf74..ab7093a701 100644 --- a/source/dnode/vnode/src/tq/tqStreamStateSnap.c +++ b/source/dnode/vnode/src/tq/tqStreamStateSnap.c @@ -100,8 +100,6 @@ int32_t tqSnapRead(STqSnapReader* pReader, uint8_t** ppData) { } } - ASSERT(pVal && vLen); - *ppData = taosMemoryMalloc(sizeof(SSnapDataHdr) + vLen); if (*ppData == NULL) { code = TSDB_CODE_OUT_OF_MEMORY; @@ -168,7 +166,6 @@ int32_t tqSnapWriterClose(STqSnapWriter** ppWriter, int8_t rollback) { if (rollback) { tdbAbort(pWriter->pTq->pMetaDB, pWriter->txn); - ASSERT(0); } else { code = tdbCommit(pWriter->pTq->pMetaDB, pWriter->txn); if (code) goto _err; diff --git a/source/dnode/vnode/src/tq/tqStreamTaskSnap.c b/source/dnode/vnode/src/tq/tqStreamTaskSnap.c index 305378bc93..ab7093a701 100644 --- a/source/dnode/vnode/src/tq/tqStreamTaskSnap.c +++ b/source/dnode/vnode/src/tq/tqStreamTaskSnap.c @@ -100,8 +100,6 @@ int32_t tqSnapRead(STqSnapReader* pReader, uint8_t** ppData) { } } - ASSERT(pVal && vLen); - *ppData = taosMemoryMalloc(sizeof(SSnapDataHdr) + vLen); if (*ppData == NULL) { code = TSDB_CODE_OUT_OF_MEMORY; @@ -146,7 +144,7 @@ int32_t tqSnapWriterOpen(STQ* pTq, int64_t sver, int64_t ever, STqSnapWriter** p pWriter->sver = sver; pWriter->ever = ever; - if (tdbBegin(pTq->pMetaStore, &pWriter->txn, tdbDefaultMalloc, tdbDefaultFree, NULL, 0) < 0) { + if (tdbBegin(pTq->pMetaDB, &pWriter->txn, tdbDefaultMalloc, tdbDefaultFree, NULL, 0) < 0) { code = -1; taosMemoryFree(pWriter); goto _err; @@ -167,12 +165,11 @@ int32_t tqSnapWriterClose(STqSnapWriter** ppWriter, int8_t rollback) { STQ* pTq = pWriter->pTq; if (rollback) { - tdbAbort(pWriter->pTq->pMetaStore, pWriter->txn); - ASSERT(0); + tdbAbort(pWriter->pTq->pMetaDB, pWriter->txn); } else { - code = tdbCommit(pWriter->pTq->pMetaStore, pWriter->txn); + code = tdbCommit(pWriter->pTq->pMetaDB, pWriter->txn); if (code) goto _err; - code = tdbPostCommit(pWriter->pTq->pMetaStore, pWriter->txn); + code = tdbPostCommit(pWriter->pTq->pMetaDB, pWriter->txn); if (code) goto _err; } diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index d074ceede8..1414d3b4ab 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -768,8 +768,8 @@ static SSDataBlock* doTableScan(SOperatorInfo* pOperator) { tableListGetGroupList(pTaskInfo->pTableInfoList, pInfo->currentGroupId, &pList, &num); ASSERT(pInfo->base.dataReader == NULL); - int32_t code = tsdbReaderOpen(pInfo->base.readHandle.vnode, &pInfo->base.cond, pList, num, - pInfo->pResBlock, (STsdbReader**)&pInfo->base.dataReader, GET_TASKID(pTaskInfo)); + int32_t code = tsdbReaderOpen(pInfo->base.readHandle.vnode, &pInfo->base.cond, pList, num, pInfo->pResBlock, + (STsdbReader**)&pInfo->base.dataReader, GET_TASKID(pTaskInfo)); if (code != TSDB_CODE_SUCCESS) { T_LONG_JMP(pTaskInfo->env, code); } @@ -986,8 +986,8 @@ static SSDataBlock* readPreVersionData(SOperatorInfo* pTableScanOp, uint64_t tbU SSDataBlock* pBlock = pTableScanInfo->pResBlock; STsdbReader* pReader = NULL; - int32_t code = tsdbReaderOpen(pTableScanInfo->base.readHandle.vnode, &cond, &tblInfo, 1, pBlock, (STsdbReader**)&pReader, - GET_TASKID(pTaskInfo)); + int32_t code = tsdbReaderOpen(pTableScanInfo->base.readHandle.vnode, &cond, &tblInfo, 1, pBlock, + (STsdbReader**)&pReader, GET_TASKID(pTaskInfo)); if (code != TSDB_CODE_SUCCESS) { terrno = code; T_LONG_JMP(pTaskInfo->env, code); @@ -995,7 +995,7 @@ static SSDataBlock* readPreVersionData(SOperatorInfo* pTableScanOp, uint64_t tbU } if (tsdbNextDataBlock(pReader)) { - /*SSDataBlock* p = */tsdbRetrieveDataBlock(pReader, NULL); + /*SSDataBlock* p = */ tsdbRetrieveDataBlock(pReader, NULL); doSetTagColumnData(&pTableScanInfo->base, pBlock, pTaskInfo, pBlock->info.rows); pBlock->info.id.groupId = getTableGroupId(pTaskInfo->pTableInfoList, pBlock->info.id.uid); } @@ -1224,7 +1224,7 @@ static int32_t generateIntervalScanRange(SStreamScanInfo* pInfo, SSDataBlock* pS SColumnInfoData* pSrcUidCol = taosArrayGet(pSrcBlock->pDataBlock, UID_COLUMN_INDEX); SColumnInfoData* pSrcGpCol = taosArrayGet(pSrcBlock->pDataBlock, GROUPID_COLUMN_INDEX); - uint64_t* srcUidData = (uint64_t*)pSrcUidCol->pData; + uint64_t* srcUidData = (uint64_t*)pSrcUidCol->pData; ASSERT(pSrcStartTsCol->info.type == TSDB_DATA_TYPE_TIMESTAMP); TSKEY* srcStartTsCol = (TSKEY*)pSrcStartTsCol->pData; TSKEY* srcEndTsCol = (TSKEY*)pSrcEndTsCol->pData; @@ -1347,6 +1347,36 @@ static int32_t generateScanRange(SStreamScanInfo* pInfo, SSDataBlock* pSrcBlock, return code; } +#if 0 +void calBlockTag(SStreamScanInfo* pInfo, SSDataBlock* pBlock) { + SExprSupp* pTagCalSup = &pInfo->tagCalSup; + SStreamState* pState = pInfo->pStreamScanOp->pTaskInfo->streamInfo.pState; + if (pTagCalSup == NULL || pTagCalSup->numOfExprs == 0) return; + if (pBlock == NULL || pBlock->info.rows == 0) return; + + void* tag = NULL; + int32_t tagLen = 0; + if (streamStateGetParTag(pState, pBlock->info.id.groupId, &tag, &tagLen) == 0) { + pBlock->info.tagLen = tagLen; + void* pTag = taosMemoryRealloc(pBlock->info.pTag, tagLen); + if (pTag == NULL) { + tdbFree(tag); + taosMemoryFree(pBlock->info.pTag); + pBlock->info.pTag = NULL; + pBlock->info.tagLen = 0; + return; + } + pBlock->info.pTag = pTag; + memcpy(pBlock->info.pTag, tag, tagLen); + tdbFree(tag); + return; + } else { + pBlock->info.pTag = NULL; + } + tdbFree(tag); +} +#endif + void calBlockTbName(SStreamScanInfo* pInfo, SSDataBlock* pBlock) { SExprSupp* pTbNameCalSup = &pInfo->tbnameCalSup; SStreamState* pState = pInfo->pStreamScanOp->pTaskInfo->streamInfo.pState; @@ -1354,10 +1384,12 @@ void calBlockTbName(SStreamScanInfo* pInfo, SSDataBlock* pBlock) { if (pBlock == NULL || pBlock->info.rows == 0) return; void* tbname = NULL; - if (streamStateGetParName(pInfo->pStreamScanOp->pTaskInfo->streamInfo.pState, pBlock->info.id.groupId, &tbname) < 0) { - pBlock->info.parTbName[0] = 0; - } else { + if (streamStateGetParName(pState, pBlock->info.id.groupId, &tbname) == 0) { memcpy(pBlock->info.parTbName, tbname, TSDB_TABLE_NAME_LEN); + tdbFree(tbname); + return; + } else { + pBlock->info.parTbName[0] = 0; } tdbFree(tbname); @@ -2285,7 +2317,8 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys if (pHandle->initTableReader) { pTSInfo->scanMode = TABLE_SCAN__TABLE_ORDER; pTSInfo->base.dataReader = NULL; - code = tsdbReaderOpen(pHandle->vnode, &pTSInfo->base.cond, pList, num, pTSInfo->pResBlock, &pTSInfo->base.dataReader, NULL); + code = tsdbReaderOpen(pHandle->vnode, &pTSInfo->base.cond, pList, num, pTSInfo->pResBlock, + &pTSInfo->base.dataReader, NULL); if (code != 0) { terrno = code; destroyTableScanOperatorInfo(pTableScanOp); @@ -2355,7 +2388,8 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys pOperator->exprSupp.numOfExprs = taosArrayGetSize(pInfo->pRes->pDataBlock); __optr_fn_t nextFn = pTaskInfo->execModel == OPTR_EXEC_MODEL_STREAM ? doStreamScan : doQueueScan; - pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, nextFn, NULL, destroyStreamScanOperatorInfo, optrDefaultBufFn, NULL); + pOperator->fpSet = + createOperatorFpSet(optrDummyOpenFn, nextFn, NULL, destroyStreamScanOperatorInfo, optrDefaultBufFn, NULL); return pOperator; @@ -2492,7 +2526,8 @@ SOperatorInfo* createTagScanOperatorInfo(SReadHandle* pReadHandle, STagScanPhysi initResultSizeInfo(&pOperator->resultInfo, 4096); blockDataEnsureCapacity(pInfo->pRes, pOperator->resultInfo.capacity); - pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, doTagScan, NULL, destroyTagScanOperatorInfo, optrDefaultBufFn, NULL); + pOperator->fpSet = + createOperatorFpSet(optrDummyOpenFn, doTagScan, NULL, destroyTagScanOperatorInfo, optrDefaultBufFn, NULL); return pOperator; @@ -2513,11 +2548,12 @@ static SSDataBlock* getTableDataBlockImpl(void* param) { SQueryTableDataCond* pQueryCond = taosArrayGet(pInfo->queryConds, readIdx); - int64_t st = taosGetTimestampUs(); - void* p = tableListGetInfo(pTaskInfo->pTableInfoList, readIdx + pInfo->tableStartIndex); + int64_t st = taosGetTimestampUs(); + void* p = tableListGetInfo(pTaskInfo->pTableInfoList, readIdx + pInfo->tableStartIndex); SReadHandle* pHandle = &pInfo->base.readHandle; - int32_t code = tsdbReaderOpen(pHandle->vnode, pQueryCond, p, 1, pBlock, &pInfo->base.dataReader, GET_TASKID(pTaskInfo)); + int32_t code = + tsdbReaderOpen(pHandle->vnode, pQueryCond, p, 1, pBlock, &pInfo->base.dataReader, GET_TASKID(pTaskInfo)); if (code != 0) { T_LONG_JMP(pTaskInfo->env, code); } @@ -2915,8 +2951,8 @@ static void buildVnodeGroupedNtbTableCount(STableCountScanOperatorInfo* SSDataBlock* pRes, char* dbName); static void buildVnodeFilteredTbCount(SOperatorInfo* pOperator, STableCountScanOperatorInfo* pInfo, STableCountScanSupp* pSupp, SSDataBlock* pRes, char* dbName); -static void buildVnodeGroupedTableCount(SOperatorInfo* pOperator, STableCountScanOperatorInfo* pInfo, - STableCountScanSupp* pSupp, SSDataBlock* pRes, int32_t vgId, char* dbName); +static void buildVnodeGroupedTableCount(SOperatorInfo* pOperator, STableCountScanOperatorInfo* pInfo, + STableCountScanSupp* pSupp, SSDataBlock* pRes, int32_t vgId, char* dbName); static SSDataBlock* buildVnodeDbTableCount(SOperatorInfo* pOperator, STableCountScanOperatorInfo* pInfo, STableCountScanSupp* pSupp, SSDataBlock* pRes); static void buildSysDbGroupedTableCount(SOperatorInfo* pOperator, STableCountScanOperatorInfo* pInfo, @@ -3041,8 +3077,8 @@ SOperatorInfo* createTableCountScanOperatorInfo(SReadHandle* readHandle, STableC setOperatorInfo(pOperator, "TableCountScanOperator", QUERY_NODE_PHYSICAL_PLAN_TABLE_COUNT_SCAN, false, OP_NOT_OPENED, pInfo, pTaskInfo); - pOperator->fpSet = - createOperatorFpSet(optrDummyOpenFn, doTableCountScan, NULL, destoryTableCountScanOperator, optrDefaultBufFn, NULL); + pOperator->fpSet = createOperatorFpSet(optrDummyOpenFn, doTableCountScan, NULL, destoryTableCountScanOperator, + optrDefaultBufFn, NULL); return pOperator; _error: diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index af1d738de0..cf388da92c 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -159,6 +159,11 @@ SStreamState* streamStateOpen(char* path, SStreamTask* pTask, bool specPath, int goto _err; } + if (tdbTbOpen("partag.state.db", sizeof(int64_t), -1, NULL, pState->pTdbState->db, &pState->pTdbState->pParTagDb, 0) < + 0) { + goto _err; + } + if (streamStateBegin(pState) < 0) { goto _err; } @@ -173,6 +178,7 @@ _err: tdbTbClose(pState->pTdbState->pFillStateDb); tdbTbClose(pState->pTdbState->pSessionStateDb); tdbTbClose(pState->pTdbState->pParNameDb); + tdbTbClose(pState->pTdbState->pParTagDb); tdbClose(pState->pTdbState->db); streamStateDestroy(pState); return NULL; @@ -186,6 +192,7 @@ void streamStateClose(SStreamState* pState) { tdbTbClose(pState->pTdbState->pFillStateDb); tdbTbClose(pState->pTdbState->pSessionStateDb); tdbTbClose(pState->pTdbState->pParNameDb); + tdbTbClose(pState->pTdbState->pParTagDb); tdbClose(pState->pTdbState->db); streamStateDestroy(pState); @@ -821,10 +828,17 @@ _end: return res; } +int32_t streamStatePutParTag(SStreamState* pState, int64_t groupId, const void* tag, int32_t tagLen) { + return tdbTbUpsert(pState->pTdbState->pParTagDb, &groupId, sizeof(int64_t), tag, tagLen, pState->pTdbState->txn); +} + +int32_t streamStateGetParTag(SStreamState* pState, int64_t groupId, void** tagVal, int32_t* tagLen) { + return tdbTbGet(pState->pTdbState->pParTagDb, &groupId, sizeof(int64_t), tagVal, tagLen); +} + int32_t streamStatePutParName(SStreamState* pState, int64_t groupId, const char tbname[TSDB_TABLE_NAME_LEN]) { - tdbTbUpsert(pState->pTdbState->pParNameDb, &groupId, sizeof(int64_t), tbname, TSDB_TABLE_NAME_LEN, - pState->pTdbState->txn); - return 0; + return tdbTbUpsert(pState->pTdbState->pParNameDb, &groupId, sizeof(int64_t), tbname, TSDB_TABLE_NAME_LEN, + pState->pTdbState->txn); } int32_t streamStateGetParName(SStreamState* pState, int64_t groupId, void** pVal) { diff --git a/source/libs/wal/src/walRef.c b/source/libs/wal/src/walRef.c index e86111109c..2200454018 100644 --- a/source/libs/wal/src/walRef.c +++ b/source/libs/wal/src/walRef.c @@ -80,6 +80,7 @@ void walUnrefVer(SWalRef *pRef) { SWalRef *walRefCommittedVer(SWal *pWal) { SWalRef *pRef = walOpenRef(pWal); if (pRef == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } taosThreadMutexLock(&pWal->mutex); From 50729f0cc414b1b489b4c776b9985a8792f34576 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 21 Dec 2022 14:16:28 +0800 Subject: [PATCH 52/64] refactor: remove assert --- source/client/src/clientTmq.c | 9 -------- source/libs/wal/src/walMeta.c | 31 +++++++++++---------------- source/libs/wal/src/walRead.c | 19 ----------------- source/libs/wal/src/walRef.c | 4 ++-- source/libs/wal/src/walSeek.c | 7 ++----- source/libs/wal/src/walWrite.c | 38 +++++++--------------------------- 6 files changed, 24 insertions(+), 84 deletions(-) diff --git a/source/client/src/clientTmq.c b/source/client/src/clientTmq.c index c63ddea25d..1dd8117c1e 100644 --- a/source/client/src/clientTmq.c +++ b/source/client/src/clientTmq.c @@ -530,7 +530,6 @@ static int32_t tmqSendCommitReq(tmq_t* tmq, SMqClientVg* pVg, SMqClientTopic* pT int32_t tmqCommitMsgImpl(tmq_t* tmq, const TAOS_RES* msg, int8_t async, tmq_commit_cb* userCb, void* userParam) { char* topic; int32_t vgId; - ASSERT(msg != NULL); if (TD_RES_TMQ(msg)) { SMqRspObj* pRspObj = (SMqRspObj*)msg; topic = pRspObj->topic; @@ -809,8 +808,6 @@ int32_t tmqHandleAllDelayedTask(tmq_t* tmq) { taosTmrReset(tmqAssignDelayedCommitTask, tmq->autoCommitInterval, pRefId, tmqMgmt.timer, &tmq->commitTimer); } else if (*pTaskType == TMQ_DELAYED_TASK__REPORT) { - } else { - ASSERT(0); } taosFreeQitem(pTaskType); } @@ -953,10 +950,6 @@ tmq_t* tmq_consumer_new(tmq_conf_t* conf, char* errstr, int32_t errstrLen) { const char* user = conf->user == NULL ? TSDB_DEFAULT_USER : conf->user; const char* pass = conf->pass == NULL ? TSDB_DEFAULT_PASS : conf->pass; - ASSERT(user); - ASSERT(pass); - ASSERT(conf->groupId[0]); - pTmq->clientTopics = taosArrayInit(0, sizeof(SMqClientTopic)); pTmq->mqueue = taosOpenQueue(); pTmq->qall = taosAllocateQall(); @@ -1247,8 +1240,6 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) { tDecodeSTaosxRsp(&decoder, &pRspWrapper->taosxRsp); tDecoderClear(&decoder); memcpy(&pRspWrapper->taosxRsp, pMsg->pData, sizeof(SMqRspHead)); - } else { - ASSERT(0); } taosMemoryFree(pMsg->pData); diff --git a/source/libs/wal/src/walMeta.c b/source/libs/wal/src/walMeta.c index 8e6628bb21..3031bf8736 100644 --- a/source/libs/wal/src/walMeta.c +++ b/source/libs/wal/src/walMeta.c @@ -25,7 +25,7 @@ bool FORCE_INLINE walLogExist(SWal* pWal, int64_t ver) { } bool FORCE_INLINE walIsEmpty(SWal* pWal) { - return (pWal->vers.firstVer == -1 || pWal->vers.lastVer < pWal->vers.firstVer); // [firstVer, lastVer + 1) + return (pWal->vers.firstVer == -1 || pWal->vers.lastVer < pWal->vers.firstVer); // [firstVer, lastVer + 1) } int64_t FORCE_INLINE walGetFirstVer(SWal* pWal) { return pWal->vers.firstVer; } @@ -49,7 +49,6 @@ static FORCE_INLINE int walBuildTmpMetaName(SWal* pWal, char* buf) { static FORCE_INLINE int64_t walScanLogGetLastVer(SWal* pWal, int32_t fileIdx) { int32_t sz = taosArrayGetSize(pWal->fileInfoSet); terrno = TSDB_CODE_SUCCESS; - ASSERT(fileIdx >= 0 && fileIdx < sz); SWalFileInfo* pFileInfo = taosArrayGet(pWal->fileInfoSet, fileIdx); char fnameStr[WAL_FILE_LEN]; @@ -101,7 +100,6 @@ static FORCE_INLINE int64_t walScanLogGetLastVer(SWal* pWal, int32_t fileIdx) { offsetBackward = offset; } - ASSERT(offset <= end); readSize = end - offset; capacity = readSize + sizeof(magic); @@ -257,7 +255,6 @@ static void walRebuildFileInfoSet(SArray* metaLogList, SArray* actualLogList) { SWalFileInfo* pLogInfo = taosArrayGet(actualLogList, i); while (j < metaFileNum) { SWalFileInfo* pMetaInfo = taosArrayGet(metaLogList, j); - ASSERT(pMetaInfo != NULL); if (pMetaInfo->firstVer < pLogInfo->firstVer) { j++; } else if (pMetaInfo->firstVer == pLogInfo->firstVer) { @@ -385,7 +382,6 @@ int walCheckAndRepairMeta(SWal* pWal) { taosArrayDestroy(actualLog); int32_t sz = taosArrayGetSize(pWal->fileInfoSet); - ASSERT(sz == actualFileNum); // scan and determine the lastVer int32_t fileIdx = sz; @@ -403,8 +399,6 @@ int walCheckAndRepairMeta(SWal* pWal) { return -1; } - ASSERT(pFileInfo->firstVer >= 0); - if (pFileInfo->lastVer >= pFileInfo->firstVer && fileSize == pFileInfo->fileSize) { totSize += pFileInfo->fileSize; continue; @@ -417,7 +411,6 @@ int walCheckAndRepairMeta(SWal* pWal) { wError("failed to scan wal last ver since %s", terrstr()); return -1; } - ASSERT(pFileInfo->fileSize == 0); // remove the empty wal log, and its idx wInfo("vgId:%d, wal remove empty file %s", pWal->cfg.vgId, fnameStr); taosRemoveFile(fnameStr); @@ -477,8 +470,7 @@ int walReadLogHead(TdFilePtr pLogFile, int64_t offset, SWalCkHead* pCkHead) { } int walCheckAndRepairIdxFile(SWal* pWal, int32_t fileIdx) { - int32_t sz = taosArrayGetSize(pWal->fileInfoSet); - ASSERT(fileIdx >= 0 && fileIdx < sz); + int32_t sz = taosArrayGetSize(pWal->fileInfoSet); SWalFileInfo* pFileInfo = taosArrayGet(pWal->fileInfoSet, fileIdx); char fnameStr[WAL_FILE_LEN]; walBuildIdxName(pWal, pFileInfo->firstVer, fnameStr); @@ -492,7 +484,6 @@ int walCheckAndRepairIdxFile(SWal* pWal, int32_t fileIdx) { return -1; } - ASSERT(pFileInfo->fileSize > 0 && pFileInfo->firstVer >= 0 && pFileInfo->lastVer >= pFileInfo->firstVer); if (fileSize == (pFileInfo->lastVer - pFileInfo->firstVer + 1) * sizeof(SWalIdxEntry)) { return 0; } @@ -556,7 +547,7 @@ int walCheckAndRepairIdxFile(SWal* pWal, int32_t fileIdx) { } offset += sizeof(SWalIdxEntry); - ASSERT(offset == (idxEntry.ver - pFileInfo->firstVer + 1) * sizeof(SWalIdxEntry)); + /*A(offset == (idxEntry.ver - pFileInfo->firstVer + 1) * sizeof(SWalIdxEntry));*/ // ftruncate idx file if (offset < fileSize) { @@ -577,7 +568,7 @@ int walCheckAndRepairIdxFile(SWal* pWal, int32_t fileIdx) { } while (idxEntry.ver < pFileInfo->lastVer) { - ASSERT(idxEntry.ver == ckHead.head.version); + /*A(idxEntry.ver == ckHead.head.version);*/ idxEntry.ver += 1; idxEntry.offset += sizeof(SWalCkHead) + ckHead.head.bodyLen; @@ -649,8 +640,7 @@ int walRollFileInfo(SWal* pWal) { } char* walMetaSerialize(SWal* pWal) { - char buf[30]; - ASSERT(pWal->fileInfoSet); + char buf[30]; int sz = taosArrayGetSize(pWal->fileInfoSet); cJSON* pRoot = cJSON_CreateObject(); cJSON* pMeta = cJSON_CreateObject(); @@ -707,7 +697,7 @@ char* walMetaSerialize(SWal* pWal) { } int walMetaDeserialize(SWal* pWal, const char* bytes) { - ASSERT(taosArrayGetSize(pWal->fileInfoSet) == 0); + /*A(taosArrayGetSize(pWal->fileInfoSet) == 0);*/ cJSON *pRoot, *pMeta, *pFiles, *pInfoJson, *pField; pRoot = cJSON_Parse(bytes); if (!pRoot) goto _err; @@ -823,7 +813,9 @@ int walSaveMeta(SWal* pWal) { // flush to a tmpfile n = walBuildTmpMetaName(pWal, tmpFnameStr); - ASSERT(n < sizeof(tmpFnameStr) && "Buffer overflow of file name"); + if (n < sizeof(tmpFnameStr)) { + return -1; + } TdFilePtr pMetaFile = taosOpenFile(tmpFnameStr, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_TRUNC); if (pMetaFile == NULL) { @@ -854,7 +846,9 @@ int walSaveMeta(SWal* pWal) { // rename it n = walBuildMetaName(pWal, metaVer + 1, fnameStr); - ASSERT(n < sizeof(fnameStr) && "Buffer overflow of file name"); + if (n < sizeof(fnameStr)) { + goto _err; + } if (taosRenameFile(tmpFnameStr, fnameStr) < 0) { wError("failed to rename file due to %s. dest:%s", strerror(errno), fnameStr); @@ -877,7 +871,6 @@ _err: } int walLoadMeta(SWal* pWal) { - ASSERT(pWal->fileInfoSet->size == 0); // find existing meta file int metaVer = walFindCurMetaVer(pWal); if (metaVer == -1) { diff --git a/source/libs/wal/src/walRead.c b/source/libs/wal/src/walRead.c index ed02d29e3b..a89c4bb546 100644 --- a/source/libs/wal/src/walRead.c +++ b/source/libs/wal/src/walRead.c @@ -97,7 +97,6 @@ int32_t walNextValidMsg(SWalReader *pReader) { return -1; } fetchVer++; - ASSERT(fetchVer == pReader->curVersion); } } pReader->curStopped = 1; @@ -132,7 +131,6 @@ static int64_t walReadSeekFilePos(SWalReader *pReader, int64_t fileFirstVer, int return -1; } - ASSERT(entry.ver == ver); ret = taosLSeekFile(pLogTFile, entry.offset, SEEK_SET); if (ret < 0) { terrno = TAOS_SYSTEM_ERROR(errno); @@ -241,7 +239,6 @@ static int32_t walFetchHeadNew(SWalReader *pRead, int64_t fetchVer) { if (pRead->curInvalid || pRead->curVersion != fetchVer) { if (walReadSeekVer(pRead, fetchVer) < 0) { - ASSERT(0); pRead->curVersion = fetchVer; pRead->curInvalid = 1; return -1; @@ -262,7 +259,6 @@ static int32_t walFetchHeadNew(SWalReader *pRead, int64_t fetchVer) { } else { terrno = TSDB_CODE_WAL_FILE_CORRUPTED; } - ASSERT(0); pRead->curInvalid = 1; return -1; } @@ -299,7 +295,6 @@ static int32_t walFetchBodyNew(SWalReader *pRead) { terrno = TSDB_CODE_WAL_FILE_CORRUPTED; } pRead->curInvalid = 1; - ASSERT(0); return -1; } @@ -308,7 +303,6 @@ static int32_t walFetchBodyNew(SWalReader *pRead) { pRead->pHead->head.version, ver); pRead->curInvalid = 1; terrno = TSDB_CODE_WAL_FILE_CORRUPTED; - ASSERT(0); return -1; } @@ -316,7 +310,6 @@ static int32_t walFetchBodyNew(SWalReader *pRead) { wError("vgId:%d, wal fetch body error:%" PRId64 ", since body checksum not passed", pRead->pWal->cfg.vgId, ver); pRead->curInvalid = 1; terrno = TSDB_CODE_WAL_FILE_CORRUPTED; - ASSERT(0); return -1; } @@ -328,14 +321,10 @@ static int32_t walFetchBodyNew(SWalReader *pRead) { static int32_t walSkipFetchBodyNew(SWalReader *pRead) { int64_t code; - ASSERT(pRead->curVersion == pRead->pHead->head.version); - ASSERT(pRead->curInvalid == 0); - code = taosLSeekFile(pRead->pLogFile, pRead->pHead->head.bodyLen, SEEK_CUR); if (code < 0) { terrno = TAOS_SYSTEM_ERROR(errno); pRead->curInvalid = 1; - ASSERT(0); return -1; } @@ -384,7 +373,6 @@ int32_t walFetchHead(SWalReader *pRead, int64_t ver, SWalCkHead *pHead) { } else { terrno = TSDB_CODE_WAL_FILE_CORRUPTED; } - ASSERT(0); pRead->curInvalid = 1; return -1; } @@ -410,9 +398,6 @@ int32_t walSkipFetchBody(SWalReader *pRead, const SWalCkHead *pHead) { pRead->pWal->cfg.vgId, pHead->head.version, pRead->pWal->vers.firstVer, pRead->pWal->vers.commitVer, pRead->pWal->vers.lastVer, pRead->pWal->vers.appliedVer); - ASSERT(pRead->curVersion == pHead->head.version); - ASSERT(pRead->curInvalid == 0); - code = taosLSeekFile(pRead->pLogFile, pHead->head.bodyLen, SEEK_CUR); if (code < 0) { terrno = TAOS_SYSTEM_ERROR(errno); @@ -447,7 +432,6 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) { if (pReadHead->bodyLen != taosReadFile(pRead->pLogFile, pReadHead->body, pReadHead->bodyLen)) { if (pReadHead->bodyLen < 0) { - ASSERT(0); terrno = TAOS_SYSTEM_ERROR(errno); wError("vgId:%d, wal fetch body error:%" PRId64 ", read request index:%" PRId64 ", since %s", pRead->pWal->cfg.vgId, pReadHead->version, ver, tstrerror(terrno)); @@ -457,12 +441,10 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) { terrno = TSDB_CODE_WAL_FILE_CORRUPTED; } pRead->curInvalid = 1; - ASSERT(0); return -1; } if (pReadHead->version != ver) { - ASSERT(0); wError("vgId:%d, wal fetch body error, index:%" PRId64 ", read request index:%" PRId64, pRead->pWal->cfg.vgId, pReadHead->version, ver); pRead->curInvalid = 1; @@ -471,7 +453,6 @@ int32_t walFetchBody(SWalReader *pRead, SWalCkHead **ppHead) { } if (walValidBodyCksum(*ppHead) != 0) { - ASSERT(0); wError("vgId:%d, wal fetch body error, index:%" PRId64 ", since body checksum not passed", pRead->pWal->cfg.vgId, ver); pRead->curInvalid = 1; diff --git a/source/libs/wal/src/walRef.c b/source/libs/wal/src/walRef.c index 2200454018..fa04ba3e58 100644 --- a/source/libs/wal/src/walRef.c +++ b/source/libs/wal/src/walRef.c @@ -61,7 +61,7 @@ int32_t walRefVer(SWalRef *pRef, int64_t ver) { SWalFileInfo tmpInfo; tmpInfo.firstVer = ver; SWalFileInfo *pRet = taosArraySearch(pWal->fileInfoSet, &tmpInfo, compareWalFileInfo, TD_LE); - ASSERT(pRet != NULL); + /*A(pRet != NULL);*/ pRef->refFile = pRet->firstVer; taosThreadMutexUnlock(&pWal->mutex); @@ -92,7 +92,7 @@ SWalRef *walRefCommittedVer(SWal *pWal) { SWalFileInfo tmpInfo; tmpInfo.firstVer = ver; SWalFileInfo *pRet = taosArraySearch(pWal->fileInfoSet, &tmpInfo, compareWalFileInfo, TD_LE); - ASSERT(pRet != NULL); + /*A(pRet != NULL);*/ pRef->refFile = pRet->firstVer; taosThreadMutexUnlock(&pWal->mutex); diff --git a/source/libs/wal/src/walSeek.c b/source/libs/wal/src/walSeek.c index 2cb6614b01..cbfd0ef741 100644 --- a/source/libs/wal/src/walSeek.c +++ b/source/libs/wal/src/walSeek.c @@ -40,7 +40,6 @@ static int64_t walSeekWritePos(SWal* pWal, int64_t ver) { terrno = TAOS_SYSTEM_ERROR(errno); return -1; } - ASSERT(entry.ver == ver); code = taosLSeekFile(pLogTFile, entry.offset, SEEK_SET); if (code < 0) { terrno = TAOS_SYSTEM_ERROR(errno); @@ -53,8 +52,7 @@ static int64_t walSeekWritePos(SWal* pWal, int64_t ver) { int walInitWriteFile(SWal* pWal) { TdFilePtr pIdxTFile, pLogTFile; SWalFileInfo* pRet = taosArrayGetLast(pWal->fileInfoSet); - ASSERT(pRet != NULL); - int64_t fileFirstVer = pRet->firstVer; + int64_t fileFirstVer = pRet->firstVer; char fnameStr[WAL_FILE_LEN]; walBuildIdxName(pWal, fileFirstVer, fnameStr); @@ -109,9 +107,8 @@ int64_t walChangeWrite(SWal* pWal, int64_t ver) { tmpInfo.firstVer = ver; // bsearch in fileSet int32_t idx = taosArraySearchIdx(pWal->fileInfoSet, &tmpInfo, compareWalFileInfo, TD_LE); - ASSERT(idx != -1); + /*A(idx != -1);*/ SWalFileInfo* pFileInfo = taosArrayGet(pWal->fileInfoSet, idx); - /*ASSERT(pFileInfo != NULL);*/ int64_t fileFirstVer = pFileInfo->firstVer; walBuildIdxName(pWal, fileFirstVer, fnameStr); diff --git a/source/libs/wal/src/walWrite.c b/source/libs/wal/src/walWrite.c index a5c7bf1abd..4233c089a4 100644 --- a/source/libs/wal/src/walWrite.c +++ b/source/libs/wal/src/walWrite.c @@ -87,12 +87,10 @@ int32_t walApplyVer(SWal *pWal, int64_t ver) { } int32_t walCommit(SWal *pWal, int64_t ver) { - ASSERT(pWal->vers.commitVer >= pWal->vers.snapshotVer); - ASSERT(pWal->vers.commitVer <= pWal->vers.lastVer); if (ver < pWal->vers.commitVer) { return 0; } - if (ver > pWal->vers.lastVer) { + if (ver > pWal->vers.lastVer || pWal->vers.commitVer < pWal->vers.snapshotVer) { terrno = TSDB_CODE_WAL_INVALID_VER; return -1; } @@ -138,25 +136,21 @@ int32_t walRollback(SWal *pWal, int64_t ver) { TdFilePtr pIdxFile = taosOpenFile(fnameStr, TD_FILE_WRITE | TD_FILE_READ | TD_FILE_APPEND); if (pIdxFile == NULL) { - ASSERT(0); taosThreadMutexUnlock(&pWal->mutex); return -1; } int64_t idxOff = walGetVerIdxOffset(pWal, ver); code = taosLSeekFile(pIdxFile, idxOff, SEEK_SET); if (code < 0) { - ASSERT(0); taosThreadMutexUnlock(&pWal->mutex); return -1; } // read idx file and get log file pos SWalIdxEntry entry; if (taosReadFile(pIdxFile, &entry, sizeof(SWalIdxEntry)) != sizeof(SWalIdxEntry)) { - ASSERT(0); taosThreadMutexUnlock(&pWal->mutex); return -1; } - ASSERT(entry.ver == ver); walBuildLogName(pWal, walGetCurFileFirstVer(pWal), fnameStr); TdFilePtr pLogFile = taosOpenFile(fnameStr, TD_FILE_WRITE | TD_FILE_READ | TD_FILE_APPEND); @@ -176,24 +170,19 @@ int32_t walRollback(SWal *pWal, int64_t ver) { } // validate offset SWalCkHead head; - ASSERT(taosValidFile(pLogFile)); - int64_t size = taosReadFile(pLogFile, &head, sizeof(SWalCkHead)); + int64_t size = taosReadFile(pLogFile, &head, sizeof(SWalCkHead)); if (size != sizeof(SWalCkHead)) { - ASSERT(0); taosThreadMutexUnlock(&pWal->mutex); return -1; } code = walValidHeadCksum(&head); - ASSERT(code == 0); if (code != 0) { terrno = TSDB_CODE_WAL_FILE_CORRUPTED; - ASSERT(0); taosThreadMutexUnlock(&pWal->mutex); return -1; } if (head.head.version != ver) { - ASSERT(0); terrno = TSDB_CODE_WAL_FILE_CORRUPTED; taosThreadMutexUnlock(&pWal->mutex); return -1; @@ -202,22 +191,22 @@ int32_t walRollback(SWal *pWal, int64_t ver) { // truncate old files code = taosFtruncateFile(pLogFile, entry.offset); if (code < 0) { - ASSERT(0); terrno = TAOS_SYSTEM_ERROR(errno); taosThreadMutexUnlock(&pWal->mutex); return -1; } code = taosFtruncateFile(pIdxFile, idxOff); if (code < 0) { - ASSERT(0); terrno = TAOS_SYSTEM_ERROR(errno); taosThreadMutexUnlock(&pWal->mutex); return -1; } pWal->vers.lastVer = ver - 1; +#if 0 if (pWal->vers.lastVer < pWal->vers.firstVer) { - ASSERT(pWal->vers.lastVer == pWal->vers.firstVer - 1); + A(pWal->vers.lastVer == pWal->vers.firstVer - 1); } +#endif ((SWalFileInfo *)taosArrayGetLast(pWal->fileInfoSet))->lastVer = ver - 1; ((SWalFileInfo *)taosArrayGetLast(pWal->fileInfoSet))->fileSize = entry.offset; taosCloseFile(&pIdxFile); @@ -386,7 +375,8 @@ int32_t walEndSnapshot(SWal *pWal) { walBuildIdxName(pWal, pInfo->firstVer, fnameStr); wDebug("vgId:%d, wal remove file %s", pWal->cfg.vgId, fnameStr); if (taosRemoveFile(fnameStr) < 0 && errno != ENOENT) { - ASSERT(0); + wError("vgId:%d, failed to remove idx file %s due to %s", pWal->cfg.vgId, fnameStr, strerror(errno)); + goto END; } } taosArrayClear(pWal->toDeleteFiles); @@ -441,7 +431,6 @@ int32_t walRollImpl(SWal *pWal) { pWal->pIdxFile = pIdxFile; pWal->pLogFile = pLogFile; pWal->writeCur = taosArrayGetSize(pWal->fileInfoSet) - 1; - ASSERT(pWal->writeCur >= 0); pWal->lastRollSeq = walGetSeq(); @@ -458,8 +447,7 @@ END: static int32_t walWriteIndex(SWal *pWal, int64_t ver, int64_t offset) { SWalIdxEntry entry = {.ver = ver, .offset = offset}; SWalFileInfo *pFileInfo = walGetCurFileInfo(pWal); - ASSERT(pFileInfo != NULL); - ASSERT(pFileInfo->firstVer >= 0); + int64_t idxOffset = (entry.ver - pFileInfo->firstVer) * sizeof(SWalIdxEntry); wDebug("vgId:%d, write index, index:%" PRId64 ", offset:%" PRId64 ", at %" PRId64, pWal->cfg.vgId, ver, offset, idxOffset); @@ -476,7 +464,6 @@ static int32_t walWriteIndex(SWal *pWal, int64_t ver, int64_t offset) { if (endOffset < 0) { wFatal("vgId:%d, failed to seek end of idxfile due to %s. ver:%" PRId64 "", pWal->cfg.vgId, strerror(errno), ver); } - ASSERT(endOffset == idxOffset + sizeof(SWalIdxEntry) && "Offset of idx entries misaligned"); return 0; } @@ -486,9 +473,7 @@ static FORCE_INLINE int32_t walWriteImpl(SWal *pWal, int64_t index, tmsg_t msgTy int64_t offset = walGetCurFileOffset(pWal); SWalFileInfo *pFileInfo = walGetCurFileInfo(pWal); - ASSERT(pFileInfo != NULL); - ASSERT(pFileInfo->firstVer != -1); pWal->writeHead.head.version = index; pWal->writeHead.head.bodyLen = bodyLen; pWal->writeHead.head.msgType = msgType; @@ -525,7 +510,6 @@ static FORCE_INLINE int32_t walWriteImpl(SWal *pWal, int64_t index, tmsg_t msgTy // set status if (pWal->vers.firstVer == -1) { - ASSERT(index == 0); pWal->vers.firstVer = 0; } pWal->vers.lastVer = index; @@ -541,7 +525,6 @@ END: wFatal("vgId:%d, failed to ftruncate logfile to offset:%" PRId64 " during recovery due to %s", pWal->cfg.vgId, offset, strerror(errno)); terrno = TAOS_SYSTEM_ERROR(errno); - ASSERT(0 && "failed to recover from error"); } int64_t idxOffset = (index - pFileInfo->firstVer) * sizeof(SWalIdxEntry); @@ -549,7 +532,6 @@ END: wFatal("vgId:%d, failed to ftruncate idxfile to offset:%" PRId64 "during recovery due to %s", pWal->cfg.vgId, idxOffset, strerror(errno)); terrno = TAOS_SYSTEM_ERROR(errno); - ASSERT(0 && "failed to recover from error"); } return -1; } @@ -576,8 +558,6 @@ int64_t walAppendLog(SWal *pWal, int64_t index, tmsg_t msgType, SWalSyncInfo syn } } - ASSERT(pWal->pLogFile != NULL && pWal->pIdxFile != NULL && pWal->writeCur >= 0); - if (walWriteImpl(pWal, index, msgType, syncMeta, body, bodyLen) < 0) { taosThreadMutexUnlock(&pWal->mutex); return -1; @@ -614,8 +594,6 @@ int32_t walWriteWithSyncInfo(SWal *pWal, int64_t index, tmsg_t msgType, SWalSync } } - ASSERT(pWal->pIdxFile != NULL && pWal->pLogFile != NULL && pWal->writeCur >= 0); - if (walWriteImpl(pWal, index, msgType, syncMeta, body, bodyLen) < 0) { taosThreadMutexUnlock(&pWal->mutex); return -1; From 27c7e23397506962e6cf0258eba55fcaa26cbef2 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 21 Dec 2022 14:26:27 +0800 Subject: [PATCH 53/64] refactor: remove assert --- source/dnode/mnode/impl/src/mndConsumer.c | 41 +++++++++-------- source/dnode/mnode/impl/src/mndScheduler.c | 51 +++++++++++----------- source/dnode/mnode/impl/src/mndStream.c | 15 +------ 3 files changed, 47 insertions(+), 60 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndConsumer.c b/source/dnode/mnode/impl/src/mndConsumer.c index 37e2c35225..cf2386348e 100644 --- a/source/dnode/mnode/impl/src/mndConsumer.c +++ b/source/dnode/mnode/impl/src/mndConsumer.c @@ -133,7 +133,10 @@ static int32_t mndProcessConsumerRecoverMsg(SRpcMsg *pMsg) { SMnode *pMnode = pMsg->info.node; SMqConsumerRecoverMsg *pRecoverMsg = pMsg->pCont; SMqConsumerObj *pConsumer = mndAcquireConsumer(pMnode, pRecoverMsg->consumerId); - ASSERT(pConsumer); + if (pConsumer == NULL) { + mError("cannot find consumer %" PRId64 " when processing consumer recover msg", pRecoverMsg->consumerId); + return -1; + } mInfo("receive consumer recover msg, consumer id %" PRId64 ", status %s", pRecoverMsg->consumerId, mndConsumerStatusName(pConsumer->status)); @@ -381,8 +384,6 @@ static int32_t mndProcessAskEpReq(SRpcMsg *pMsg) { return -1; } - ASSERT(strcmp(req.cgroup, pConsumer->cgroup) == 0); - atomic_store_32(&pConsumer->hbStatus, 0); // 1. check consumer status @@ -428,9 +429,8 @@ static int32_t mndProcessAskEpReq(SRpcMsg *pMsg) { for (int32_t i = 0; i < numOfTopics; i++) { char *topic = taosArrayGetP(pConsumer->currentTopics, i); SMqSubscribeObj *pSub = mndAcquireSubscribe(pMnode, pConsumer->cgroup, topic); - // txn guarantees pSub is created - ASSERT(pSub); + taosRLockLatch(&pSub->lock); SMqSubTopicEp topicEp = {0}; @@ -438,7 +438,6 @@ static int32_t mndProcessAskEpReq(SRpcMsg *pMsg) { // 2.1 fetch topic schema SMqTopicObj *pTopic = mndAcquireTopic(pMnode, topic); - ASSERT(pTopic); taosRLockLatch(&pTopic->lock); tstrncpy(topicEp.db, pTopic->db, TSDB_DB_FNAME_LEN); topicEp.schema.nCols = pTopic->schema.nCols; @@ -775,8 +774,8 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, taosWLockLatch(&pOldConsumer->lock); if (pNewConsumer->updateType == CONSUMER_UPDATE__MODIFY) { - ASSERT(taosArrayGetSize(pOldConsumer->rebNewTopics) == 0); - ASSERT(taosArrayGetSize(pOldConsumer->rebRemovedTopics) == 0); + /*A(taosArrayGetSize(pOldConsumer->rebNewTopics) == 0);*/ + /*A(taosArrayGetSize(pOldConsumer->rebRemovedTopics) == 0);*/ if (taosArrayGetSize(pNewConsumer->rebNewTopics) == 0 && taosArrayGetSize(pNewConsumer->rebRemovedTopics) == 0) { pOldConsumer->status = MQ_CONSUMER_STATUS__READY; @@ -798,8 +797,8 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, pOldConsumer->status = MQ_CONSUMER_STATUS__MODIFY; } } else if (pNewConsumer->updateType == CONSUMER_UPDATE__LOST) { - ASSERT(taosArrayGetSize(pOldConsumer->rebNewTopics) == 0); - ASSERT(taosArrayGetSize(pOldConsumer->rebRemovedTopics) == 0); + /*A(taosArrayGetSize(pOldConsumer->rebNewTopics) == 0);*/ + /*A(taosArrayGetSize(pOldConsumer->rebRemovedTopics) == 0);*/ int32_t sz = taosArrayGetSize(pOldConsumer->currentTopics); /*pOldConsumer->rebRemovedTopics = taosArrayInit(sz, sizeof(void *));*/ @@ -812,8 +811,8 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, pOldConsumer->status = MQ_CONSUMER_STATUS__LOST; } else if (pNewConsumer->updateType == CONSUMER_UPDATE__RECOVER) { - ASSERT(taosArrayGetSize(pOldConsumer->currentTopics) == 0); - ASSERT(taosArrayGetSize(pOldConsumer->rebNewTopics) == 0); + /*A(taosArrayGetSize(pOldConsumer->currentTopics) == 0);*/ + /*A(taosArrayGetSize(pOldConsumer->rebNewTopics) == 0);*/ int32_t sz = taosArrayGetSize(pOldConsumer->assignedTopics); for (int32_t i = 0; i < sz; i++) { @@ -830,15 +829,15 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, pOldConsumer->rebalanceTime = pNewConsumer->upTime; } else if (pNewConsumer->updateType == CONSUMER_UPDATE__ADD) { - ASSERT(taosArrayGetSize(pNewConsumer->rebNewTopics) == 1); - ASSERT(taosArrayGetSize(pNewConsumer->rebRemovedTopics) == 0); + /*A(taosArrayGetSize(pNewConsumer->rebNewTopics) == 1);*/ + /*A(taosArrayGetSize(pNewConsumer->rebRemovedTopics) == 0);*/ char *addedTopic = strdup(taosArrayGetP(pNewConsumer->rebNewTopics, 0)); // not exist in current topic -#if 1 +#if 0 for (int32_t i = 0; i < taosArrayGetSize(pOldConsumer->currentTopics); i++) { char *topic = taosArrayGetP(pOldConsumer->currentTopics, i); - ASSERT(strcmp(topic, addedTopic) != 0); + A(strcmp(topic, addedTopic) != 0); } #endif @@ -879,15 +878,15 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, atomic_add_fetch_32(&pOldConsumer->epoch, 1); } else if (pNewConsumer->updateType == CONSUMER_UPDATE__REMOVE) { - ASSERT(taosArrayGetSize(pNewConsumer->rebNewTopics) == 0); - ASSERT(taosArrayGetSize(pNewConsumer->rebRemovedTopics) == 1); + /*A(taosArrayGetSize(pNewConsumer->rebNewTopics) == 0);*/ + /*A(taosArrayGetSize(pNewConsumer->rebRemovedTopics) == 1);*/ char *removedTopic = taosArrayGetP(pNewConsumer->rebRemovedTopics, 0); // not exist in new topic -#if 1 +#if 0 for (int32_t i = 0; i < taosArrayGetSize(pOldConsumer->rebNewTopics); i++) { char *topic = taosArrayGetP(pOldConsumer->rebNewTopics, i); - ASSERT(strcmp(topic, removedTopic) != 0); + A(strcmp(topic, removedTopic) != 0); } #endif @@ -913,7 +912,7 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer, } } // must find the topic - ASSERT(i < sz); + /*A(i < sz);*/ // set status if (taosArrayGetSize(pOldConsumer->rebNewTopics) == 0 && taosArrayGetSize(pOldConsumer->rebRemovedTopics) == 0) { diff --git a/source/dnode/mnode/impl/src/mndScheduler.c b/source/dnode/mnode/impl/src/mndScheduler.c index af1a29def0..bdef8000bd 100644 --- a/source/dnode/mnode/impl/src/mndScheduler.c +++ b/source/dnode/mnode/impl/src/mndScheduler.c @@ -115,13 +115,11 @@ int32_t mndAddDispatcherToInnerTask(SMnode* pMnode, SStreamObj* pStream, SStream if (pStream->fixedSinkVgId == 0) { SDbObj* pDb = mndAcquireDb(pMnode, pStream->targetDb); - ASSERT(pDb); if (pDb->cfg.numOfVgroups > 1) { isShuffle = true; pTask->outputType = TASK_OUTPUT__SHUFFLE_DISPATCH; pTask->dispatchMsgType = TDMT_STREAM_TASK_DISPATCH; if (mndExtractDbInfo(pMnode, pDb, &pTask->shuffleDispatcher.dbInfo, NULL) < 0) { - ASSERT(0); return -1; } } @@ -140,9 +138,7 @@ int32_t mndAddDispatcherToInnerTask(SMnode* pMnode, SStreamObj* pStream, SStream for (int32_t j = 0; j < sinkLvSize; j++) { SStreamTask* pLastLevelTask = taosArrayGetP(sinkLv, j); if (pLastLevelTask->nodeId == pVgInfo->vgId) { - ASSERT(pVgInfo->vgId > 0); pVgInfo->taskId = pLastLevelTask->taskId; - ASSERT(pVgInfo->taskId != 0); break; } } @@ -152,7 +148,6 @@ int32_t mndAddDispatcherToInnerTask(SMnode* pMnode, SStreamObj* pStream, SStream pTask->dispatchMsgType = TDMT_STREAM_TASK_DISPATCH; SArray* pArray = taosArrayGetP(pStream->tasks, 0); // one sink only - ASSERT(taosArrayGetSize(pArray) == 1); SStreamTask* lastLevelTask = taosArrayGetP(pArray, 0); pTask->fixedEpDispatcher.taskId = lastLevelTask->taskId; pTask->fixedEpDispatcher.nodeId = lastLevelTask->nodeId; @@ -170,7 +165,6 @@ int32_t mndAssignTaskToVg(SMnode* pMnode, SStreamTask* pTask, SSubplan* plan, co plan->execNode.epSet = pTask->epSet; if (qSubPlanToString(plan, &pTask->exec.qmsg, &msgLen) < 0) { - ASSERT(0); terrno = TSDB_CODE_QRY_INVALID_INPUT; return -1; } @@ -195,7 +189,6 @@ int32_t mndAssignTaskToSnode(SMnode* pMnode, SStreamTask* pTask, SSubplan* plan, plan->execNode.epSet = pTask->epSet; if (qSubPlanToString(plan, &pTask->exec.qmsg, &msgLen) < 0) { - ASSERT(0); terrno = TSDB_CODE_QRY_INVALID_INPUT; return -1; } @@ -222,8 +215,6 @@ int32_t mndAddShuffleSinkTasksToStream(SMnode* pMnode, SStreamObj* pStream) { void* pIter = NULL; SArray* tasks = taosArrayGetP(pStream->tasks, 0); - ASSERT(taosArrayGetSize(pStream->tasks) == 1); - while (1) { SVgObj* pVgroup = NULL; pIter = sdbFetch(pSdb, SDB_VGROUP, pIter, (void**)&pVgroup); @@ -257,7 +248,10 @@ int32_t mndAddShuffleSinkTasksToStream(SMnode* pMnode, SStreamObj* pStream) { pTask->tbSink.stbUid = pStream->targetStbUid; memcpy(pTask->tbSink.stbFullName, pStream->targetSTbName, TSDB_TABLE_FNAME_LEN); pTask->tbSink.pSchemaWrapper = tCloneSSchemaWrapper(&pStream->outputSchema); - ASSERT(pTask->tbSink.pSchemaWrapper); + if (pTask->tbSink.pSchemaWrapper == NULL) { + terrno = TSDB_CODE_OUT_OF_MEMORY; + return -1; + } } sdbRelease(pSdb, pVgroup); } @@ -265,7 +259,6 @@ int32_t mndAddShuffleSinkTasksToStream(SMnode* pMnode, SStreamObj* pStream) { } int32_t mndAddFixedSinkTaskToStream(SMnode* pMnode, SStreamObj* pStream) { - ASSERT(pStream->fixedSinkVgId != 0); SArray* tasks = taosArrayGetP(pStream->tasks, 0); SStreamTask* pTask = tNewSStreamTask(pStream->uid); if (pTask == NULL) { @@ -275,8 +268,6 @@ int32_t mndAddFixedSinkTaskToStream(SMnode* pMnode, SStreamObj* pStream) { pTask->fillHistory = pStream->fillHistory; mndAddTaskToTaskSet(tasks, pTask); - ASSERT(pStream->fixedSinkVg.vgId == pStream->fixedSinkVgId); - pTask->nodeId = pStream->fixedSinkVgId; #if 0 SVgObj* pVgroup = mndAcquireVgroup(pMnode, pStream->fixedSinkVgId); @@ -311,13 +302,16 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) { return -1; } int32_t planTotLevel = LIST_LENGTH(pPlan->pSubplans); - ASSERT(planTotLevel <= 2); + pStream->tasks = taosArrayInit(planTotLevel, sizeof(void*)); bool hasExtraSink = false; bool externalTargetDB = strcmp(pStream->sourceDb, pStream->targetDb) != 0; SDbObj* pDbObj = mndAcquireDb(pMnode, pStream->targetDb); - ASSERT(pDbObj != NULL); + if (pDbObj == NULL) { + terrno = TSDB_CODE_QRY_INVALID_INPUT; + return -1; + } bool multiTarget = pDbObj->cfg.numOfVgroups > 1; sdbRelease(pSdb, pDbObj); @@ -351,7 +345,10 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) { SNodeListNode* inner = (SNodeListNode*)nodesListGetNode(pPlan->pSubplans, 0); SSubplan* plan = (SSubplan*)nodesListGetNode(inner->pNodeList, 0); - ASSERT(plan->subplanType == SUBPLAN_TYPE_MERGE); + if (plan->subplanType != SUBPLAN_TYPE_MERGE) { + terrno = TSDB_CODE_QRY_INVALID_INPUT; + return -1; + } pInnerTask = tNewSStreamTask(pStream->uid); if (pInnerTask == NULL) { @@ -409,7 +406,10 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) { SNodeListNode* inner = (SNodeListNode*)nodesListGetNode(pPlan->pSubplans, 1); SSubplan* plan = (SSubplan*)nodesListGetNode(inner->pNodeList, 0); - ASSERT(plan->subplanType == SUBPLAN_TYPE_SCAN); + if (plan->subplanType != SUBPLAN_TYPE_SCAN) { + terrno = TSDB_CODE_QRY_INVALID_INPUT; + return -1; + } void* pIter = NULL; while (1) { @@ -471,9 +471,15 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) { taosArrayPush(pStream->tasks, &taskOneLevel); SNodeListNode* inner = (SNodeListNode*)nodesListGetNode(pPlan->pSubplans, 0); - ASSERT(LIST_LENGTH(inner->pNodeList) == 1); + if (LIST_LENGTH(inner->pNodeList) != 1) { + terrno = TSDB_CODE_QRY_INVALID_INPUT; + return -1; + } SSubplan* plan = (SSubplan*)nodesListGetNode(inner->pNodeList, 0); - ASSERT(plan->subplanType == SUBPLAN_TYPE_SCAN); + if (plan->subplanType != SUBPLAN_TYPE_SCAN) { + terrno = TSDB_CODE_QRY_INVALID_INPUT; + return -1; + } void* pIter = NULL; while (1) { @@ -550,9 +556,6 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib plan = (SSubplan*)nodesListGetNode(inner->pNodeList, 0); } - ASSERT(pSub->unassignedVgs); - ASSERT(taosHashGetSize(pSub->consumerHash) == 0); - void* pIter = NULL; while (1) { pIter = sdbFetch(pSdb, SDB_VGROUP, pIter, (void**)&pVgroup); @@ -590,10 +593,6 @@ int32_t mndSchedInitSubEp(SMnode* pMnode, const SMqTopicObj* pTopic, SMqSubscrib sdbRelease(pSdb, pVgroup); } - ASSERT(pSub->unassignedVgs->size > 0); - - ASSERT(taosHashGetSize(pSub->consumerHash) == 0); - qDestroyQueryPlan(pPlan); return 0; diff --git a/source/dnode/mnode/impl/src/mndStream.c b/source/dnode/mnode/impl/src/mndStream.c index 05c0594339..10ecd56280 100644 --- a/source/dnode/mnode/impl/src/mndStream.c +++ b/source/dnode/mnode/impl/src/mndStream.c @@ -326,13 +326,11 @@ static int32_t mndBuildStreamObjFromCreateReq(SMnode *pMnode, SStreamObj *pObj, // deserialize ast if (nodesStringToNode(pObj->ast, &pAst) < 0) { - /*ASSERT(0);*/ goto FAIL; } // extract output schema from ast if (qExtractResultSchema(pAst, (int32_t *)&pObj->outputSchema.nCols, &pObj->outputSchema.pSchema) != 0) { - /*ASSERT(0);*/ goto FAIL; } @@ -347,13 +345,11 @@ static int32_t mndBuildStreamObjFromCreateReq(SMnode *pMnode, SStreamObj *pObj, // using ast and param to build physical plan if (qCreateQueryPlan(&cxt, &pPlan, NULL) < 0) { - /*ASSERT(0);*/ goto FAIL; } // save physcial plan if (nodesNodeToString((SNode *)pPlan, false, &pObj->physicalPlan, NULL) != 0) { - /*ASSERT(0);*/ goto FAIL; } @@ -361,7 +357,7 @@ static int32_t mndBuildStreamObjFromCreateReq(SMnode *pMnode, SStreamObj *pObj, if (pCreate->numOfTags) { pObj->tagSchema.pSchema = taosMemoryCalloc(pCreate->numOfTags, sizeof(SSchema)); } - ASSERT(pCreate->numOfTags == taosArrayGetSize(pCreate->pTags)); + /*A(pCreate->numOfTags == taosArrayGetSize(pCreate->pTags));*/ for (int32_t i = 0; i < pCreate->numOfTags; i++) { SField *pField = taosArrayGet(pCreate->pTags, i); pObj->tagSchema.pSchema[i].colId = pObj->outputSchema.nCols + i + 1; @@ -378,9 +374,6 @@ FAIL: } int32_t mndPersistTaskDeployReq(STrans *pTrans, const SStreamTask *pTask) { - if (pTask->taskLevel == TASK_LEVEL__AGG) { - ASSERT(taosArrayGetSize(pTask->childEpInfo) != 0); - } SEncoder encoder; tEncoderInit(&encoder, NULL, 0); tEncodeSStreamTask(&encoder, pTask); @@ -545,8 +538,6 @@ _OVER: } static int32_t mndPersistTaskDropReq(STrans *pTrans, SStreamTask *pTask) { - ASSERT(pTask->nodeId != 0); - // vnode /*if (pTask->nodeId > 0) {*/ SVDropStreamTaskReq *pReq = taosMemoryCalloc(1, sizeof(SVDropStreamTaskReq)); @@ -800,10 +791,9 @@ static int32_t mndProcessStreamDoCheckpoint(SRpcMsg *pReq) { int32_t sz = taosArrayGetSize(pLevel); for (int32_t j = 0; j < sz; j++) { SStreamTask *pTask = taosArrayGetP(pLevel, j); - ASSERT(pTask->nodeId > 0); + /*A(pTask->nodeId > 0);*/ SVgObj *pVgObj = mndAcquireVgroup(pMnode, pTask->nodeId); if (pVgObj == NULL) { - ASSERT(0); taosRUnLockLatch(&pStream->lock); mndReleaseStream(pMnode, pStream); mndTransDrop(pTrans); @@ -863,7 +853,6 @@ static int32_t mndProcessDropStreamReq(SRpcMsg *pReq) { SMDropStreamReq dropReq = {0}; if (tDeserializeSMDropStreamReq(pReq->pCont, pReq->contLen, &dropReq) < 0) { - ASSERT(0); terrno = TSDB_CODE_INVALID_MSG; return -1; } From 58220485d4749aae03f9a64fe2b05f3dcaed3012 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 21 Dec 2022 14:33:43 +0800 Subject: [PATCH 54/64] merge 3.0 --- source/libs/parser/src/parAuthenticator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libs/parser/src/parAuthenticator.c b/source/libs/parser/src/parAuthenticator.c index 4a2806511d..fe82ce8706 100644 --- a/source/libs/parser/src/parAuthenticator.c +++ b/source/libs/parser/src/parAuthenticator.c @@ -108,7 +108,7 @@ static int32_t authCreateTable(SAuthCxt* pCxt, SCreateTableStmt* pStmt) { return checkAuth(pCxt, pStmt->dbName, AUTH_TYPE_WRITE); } -static int32_t authCreateMultiTable(SAuthCxt* pCxt, SCreateMultiTableStmt* pStmt) { +static int32_t authCreateMultiTable(SAuthCxt* pCxt, SCreateMultiTablesStmt* pStmt) { int32_t code = TSDB_CODE_SUCCESS; SNode* pNode = NULL; FOREACH(pNode, pStmt->pSubTables) { @@ -134,8 +134,8 @@ static int32_t authQuery(SAuthCxt* pCxt, SNode* pStmt) { return authInsert(pCxt, (SInsertStmt*)pStmt); case QUERY_NODE_CREATE_TABLE_STMT: return authCreateTable(pCxt, (SCreateTableStmt*)pStmt); - case QUERY_NODE_CREATE_MULTI_TABLE_STMT: - return authCreateMultiTable(pCxt, (SCreateMultiTableStmt*)pStmt); + case QUERY_NODE_CREATE_MULTI_TABLES_STMT: + return authCreateMultiTable(pCxt, (SCreateMultiTablesStmt*)pStmt); case QUERY_NODE_SHOW_DNODES_STMT: case QUERY_NODE_SHOW_MNODES_STMT: case QUERY_NODE_SHOW_MODULES_STMT: From 4b7eb1e6373a1d7b022f634163d7af392feb0276 Mon Sep 17 00:00:00 2001 From: xinsheng Ren <285808407@qq.com> Date: Wed, 21 Dec 2022 15:25:27 +0800 Subject: [PATCH 55/64] fix/mac_m1_enterprise (#19062) Co-authored-by: facetosea <25808407@qq.com> --- cmake/cmake.define | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/cmake.define b/cmake/cmake.define index 7410c92525..542b4b4489 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -124,7 +124,9 @@ ELSE () ENDIF () INCLUDE(CheckCCompilerFlag) - IF (("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_C_COMPILER_ID}" MATCHES "AppleClang")) + IF (TD_ARM_64 OR TD_ARM_32) + SET(COMPILER_SUPPORT_SSE42 false) + ELSEIF (("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_C_COMPILER_ID}" MATCHES "AppleClang")) SET(COMPILER_SUPPORT_SSE42 true) MESSAGE(STATUS "Always enable sse4.2 for Clang/AppleClang") ELSE() From 6cbcbd14021a6d231c854b1ce7fa6ec24f867aba Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Wed, 21 Dec 2022 15:37:50 +0800 Subject: [PATCH 56/64] remove assert --- source/libs/wal/src/walMeta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/wal/src/walMeta.c b/source/libs/wal/src/walMeta.c index 3031bf8736..da8cf24627 100644 --- a/source/libs/wal/src/walMeta.c +++ b/source/libs/wal/src/walMeta.c @@ -813,7 +813,7 @@ int walSaveMeta(SWal* pWal) { // flush to a tmpfile n = walBuildTmpMetaName(pWal, tmpFnameStr); - if (n < sizeof(tmpFnameStr)) { + if (n >= sizeof(tmpFnameStr)) { return -1; } @@ -846,7 +846,7 @@ int walSaveMeta(SWal* pWal) { // rename it n = walBuildMetaName(pWal, metaVer + 1, fnameStr); - if (n < sizeof(fnameStr)) { + if (n >= sizeof(fnameStr)) { goto _err; } From 72fe37888fcc035a312483e0562d7db06313186f Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Wed, 21 Dec 2022 17:24:54 +0800 Subject: [PATCH 57/64] enh: improve unit tests --- source/libs/nodes/src/nodesCodeFuncs.c | 600 ++++++++++++++++++++++++- 1 file changed, 583 insertions(+), 17 deletions(-) diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index bab62a9054..45d65d5ea1 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -79,6 +79,8 @@ const char* nodesNodeName(ENodeType type) { return "TableOptions"; case QUERY_NODE_INDEX_OPTIONS: return "IndexOptions"; + case QUERY_NODE_EXPLAIN_OPTIONS: + return "ExplainOptions"; case QUERY_NODE_STREAM_OPTIONS: return "StreamOptions"; case QUERY_NODE_LEFT_VALUE: @@ -147,6 +149,8 @@ const char* nodesNodeName(ENodeType type) { return "CreateSnodeStmt"; case QUERY_NODE_DROP_SNODE_STMT: return "DropSnodeStmt"; + case QUERY_NODE_CREATE_MNODE_STMT: + return "CreateMnodeStmt"; case QUERY_NODE_DROP_MNODE_STMT: return "DropMnodeStmt"; case QUERY_NODE_CREATE_TOPIC_STMT: @@ -157,14 +161,26 @@ const char* nodesNodeName(ENodeType type) { return "DropConsumerGroupStmt"; case QUERY_NODE_ALTER_LOCAL_STMT: return "AlterLocalStmt"; + case QUERY_NODE_EXPLAIN_STMT: + return "ExplainStmt"; case QUERY_NODE_DESCRIBE_STMT: return "DescribeStmt"; case QUERY_NODE_CREATE_STREAM_STMT: return "CreateStreamStmt"; case QUERY_NODE_DROP_STREAM_STMT: return "DropStreamStmt"; + case QUERY_NODE_BALANCE_VGROUP_STMT: + return "BalanceVgroupStmt"; + case QUERY_NODE_MERGE_VGROUP_STMT: + return "MergeVgroupStmt"; + case QUERY_NODE_REDISTRIBUTE_VGROUP_STMT: + return "RedistributeVgroupStmt"; case QUERY_NODE_SPLIT_VGROUP_STMT: return "SplitVgroupStmt"; + case QUERY_NODE_GRANT_STMT: + return "GrantStmt"; + case QUERY_NODE_REVOKE_STMT: + return "RevokeStmt"; case QUERY_NODE_SHOW_DNODES_STMT: return "ShowDnodesStmt"; case QUERY_NODE_SHOW_MNODES_STMT: @@ -1410,6 +1426,23 @@ static int32_t logicJoinNodeToJson(const void* pObj, SJson* pJson) { return code; } +static int32_t jsonToLogicJoinNode(const SJson* pJson, void* pObj) { + SJoinLogicNode* pNode = (SJoinLogicNode*)pObj; + + int32_t code = jsonToLogicPlanNode(pJson, pObj); + if (TSDB_CODE_SUCCESS == code) { + tjsonGetNumberValue(pJson, jkJoinLogicPlanJoinType, pNode->joinType, code); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinLogicPlanMergeCondition, &pNode->pMergeCondition); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkJoinLogicPlanOnConditions, &pNode->pOnConditions); + } + + return code; +} + static const char* jkPhysiPlanOutputDataBlockDesc = "OutputDataBlockDesc"; static const char* jkPhysiPlanConditions = "Conditions"; static const char* jkPhysiPlanChildren = "Children"; @@ -4303,6 +4336,77 @@ static int32_t jsonToTableOptions(const SJson* pJson, void* pObj) { return code; } +static const char* jkIndexOptionsFuncs = "Funcs"; +static const char* jkIndexOptionsInterval = "Interval"; +static const char* jkIndexOptionsOffset = "Offset"; +static const char* jkIndexOptionsSliding = "Sliding"; +static const char* jkIndexOptionsStreamOptions = "StreamOptions"; + +static int32_t indexOptionsToJson(const void* pObj, SJson* pJson) { + const SIndexOptions* pNode = (const SIndexOptions*)pObj; + + int32_t code = nodeListToJson(pJson, jkIndexOptionsFuncs, pNode->pFuncs); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkIndexOptionsInterval, nodeToJson, pNode->pInterval); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkIndexOptionsOffset, nodeToJson, pNode->pOffset); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkIndexOptionsSliding, nodeToJson, pNode->pSliding); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkIndexOptionsStreamOptions, nodeToJson, pNode->pStreamOptions); + } + + return code; +} + +static int32_t jsonToIndexOptions(const SJson* pJson, void* pObj) { + SIndexOptions* pNode = (SIndexOptions*)pObj; + + int32_t code = jsonToNodeList(pJson, jkIndexOptionsFuncs, &pNode->pFuncs); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkIndexOptionsInterval, &pNode->pInterval); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkIndexOptionsOffset, &pNode->pOffset); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkIndexOptionsSliding, &pNode->pSliding); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkIndexOptionsStreamOptions, &pNode->pStreamOptions); + } + + return code; +} + +static const char* jkExplainOptionsVerbose = "Verbose"; +static const char* jkExplainOptionsRatio = "Ratio"; + +static int32_t explainOptionsToJson(const void* pObj, SJson* pJson) { + const SExplainOptions* pNode = (const SExplainOptions*)pObj; + + int32_t code = tjsonAddBoolToObject(pJson, jkExplainOptionsVerbose, pNode->verbose); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddDoubleToObject(pJson, jkExplainOptionsRatio, pNode->ratio); + } + + return code; +} + +static int32_t jsonToExplainOptions(const SJson* pJson, void* pObj) { + SExplainOptions* pNode = (SExplainOptions*)pObj; + + int32_t code = tjsonGetBoolValue(pJson, jkExplainOptionsVerbose, &pNode->verbose); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetDoubleValue(pJson, jkExplainOptionsRatio, &pNode->ratio); + } + + return code; +} + static const char* jkStreamOptionsTriggerType = "TriggerType"; static const char* jkStreamOptionsDelay = "Delay"; static const char* jkStreamOptionsWatermark = "Watermark"; @@ -4674,6 +4778,38 @@ static int32_t jsonToVnodeModifyStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkCreateDatabaseStmtDbName = "DbName"; +static const char* jkCreateDatabaseStmtIgnoreExists = "IgnoreExists"; +static const char* jkCreateDatabaseStmtOptions = "Options"; + +static int32_t createDatabaseStmtToJson(const void* pObj, SJson* pJson) { + const SCreateDatabaseStmt* pNode = (const SCreateDatabaseStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkCreateDatabaseStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkCreateDatabaseStmtIgnoreExists, pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkCreateDatabaseStmtOptions, nodeToJson, pNode->pOptions); + } + + return code; +} + +static int32_t jsonToCreateDatabaseStmt(const SJson* pJson, void* pObj) { + SCreateDatabaseStmt* pNode = (SCreateDatabaseStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkCreateDatabaseStmtDbName, pNode->dbName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkCreateDatabaseStmtIgnoreExists, &pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkCreateDatabaseStmtOptions, (SNode**)&pNode->pOptions); + } + + return code; +} + static const char* jkAlterDatabaseStmtDbName = "DbName"; static const char* jkAlterDatabaseStmtOptions = "Options"; @@ -4999,6 +5135,10 @@ static int32_t jsonToAlterTableStmt(const SJson* pJson, void* pObj) { return code; } +static int32_t alterStableStmtToJson(const void* pObj, SJson* pJson) { return alterTableStmtToJson(pObj, pJson); } + +static int32_t jsonToAlterStableStmt(const SJson* pJson, void* pObj) { return jsonToAlterTableStmt(pJson, pObj); } + static const char* jkCreateUserStmtUserName = "UserName"; static const char* jkCreateUserStmtPassword = "Password"; static const char* jkCreateUserStmtSysinfo = "Sysinfo"; @@ -5031,6 +5171,52 @@ static int32_t jsonToCreateUserStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkAlterUserStmtUserName = "UserName"; +static const char* jkAlterUserStmtAlterType = "AlterType"; +static const char* jkAlterUserStmtPassword = "Password"; +static const char* jkAlterUserStmtEnable = "Enable"; +static const char* jkAlterUserStmtSysinfo = "Sysinfo"; + +static int32_t alterUserStmtToJson(const void* pObj, SJson* pJson) { + const SAlterUserStmt* pNode = (const SAlterUserStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkAlterUserStmtUserName, pNode->userName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkAlterUserStmtAlterType, pNode->alterType); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkAlterUserStmtPassword, pNode->password); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkAlterUserStmtEnable, pNode->enable); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkAlterUserStmtSysinfo, pNode->sysinfo); + } + + return code; +} + +static int32_t jsonToAlterUserStmt(const SJson* pJson, void* pObj) { + SAlterUserStmt* pNode = (SAlterUserStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkAlterUserStmtUserName, pNode->userName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkAlterUserStmtAlterType, &pNode->alterType); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkAlterUserStmtPassword, pNode->password); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkAlterUserStmtEnable, &pNode->enable); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetTinyIntValue(pJson, jkAlterUserStmtSysinfo, &pNode->sysinfo); + } + + return code; +} + static const char* jkDropUserStmtUserName = "UserName"; static int32_t dropUserStmtToJson(const void* pObj, SJson* pJson) { @@ -5055,6 +5241,31 @@ static int32_t jsonToUseDatabaseStmt(const SJson* pJson, void* pObj) { return tjsonGetStringValue(pJson, jkUseDatabaseStmtDbName, pNode->dbName); } +static const char* jkCreateDnodeStmtFqdn = "Fqdn"; +static const char* jkCreateDnodeStmtPort = "Port"; + +static int32_t createDnodeStmtToJson(const void* pObj, SJson* pJson) { + const SCreateDnodeStmt* pNode = (const SCreateDnodeStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkCreateDnodeStmtFqdn, pNode->fqdn); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkCreateDnodeStmtPort, pNode->port); + } + + return code; +} + +static int32_t jsonToCreateDnodeStmt(const SJson* pJson, void* pObj) { + SCreateDnodeStmt* pNode = (SCreateDnodeStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkCreateDnodeStmtFqdn, pNode->fqdn); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkCreateDnodeStmtPort, &pNode->port); + } + + return code; +} + static const char* jkAlterDnodeStmtDnodeId = "DnodeId"; static const char* jkAlterDnodeStmtConfig = "Config"; static const char* jkAlterDnodeStmtValue = "Value"; @@ -5087,6 +5298,74 @@ static int32_t jsonToAlterDnodeStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkCreateIndexStmtIndexType = "IndexType"; +static const char* jkCreateIndexStmtIgnoreExists = "IgnoreExists"; +static const char* jkCreateIndexStmtIndexDbName = "IndexDbName"; +static const char* jkCreateIndexStmtIndexName = "indexName"; +static const char* jkCreateIndexStmtDbName = "DbName"; +static const char* jkCreateIndexStmtTableName = "TableName"; +static const char* jkCreateIndexStmtCols = "Cols"; +static const char* jkCreateIndexStmtOptions = "Options"; + +static int32_t createIndexStmtToJson(const void* pObj, SJson* pJson) { + const SCreateIndexStmt* pNode = (const SCreateIndexStmt*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkCreateIndexStmtIndexType, pNode->indexType); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddBoolToObject(pJson, jkCreateIndexStmtIgnoreExists, pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateIndexStmtIndexDbName, pNode->indexDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateIndexStmtIndexName, pNode->indexName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateIndexStmtDbName, pNode->dbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkCreateIndexStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkCreateIndexStmtCols, pNode->pCols); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkCreateIndexStmtOptions, nodeToJson, pNode->pOptions); + } + + return code; +} + +static int32_t jsonToCreateIndexStmt(const SJson* pJson, void* pObj) { + SCreateIndexStmt* pNode = (SCreateIndexStmt*)pObj; + + int32_t code = TSDB_CODE_SUCCESS; + tjsonGetNumberValue(pJson, jkCreateIndexStmtIndexType, pNode->indexType, code); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBoolValue(pJson, jkCreateIndexStmtIgnoreExists, &pNode->ignoreExists); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateIndexStmtIndexDbName, pNode->indexDbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateIndexStmtIndexName, pNode->indexName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateIndexStmtDbName, pNode->dbName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkCreateIndexStmtTableName, pNode->tableName); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkCreateIndexStmtCols, &pNode->pCols); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkCreateIndexStmtOptions, (SNode**)&pNode->pOptions); + } + + return code; +} + static const char* jkDropIndexStmtIgnoreNotExists = "IgnoreNotExists"; static const char* jkDropIndexStmtIndexDbName = "IndexDbName"; static const char* jkDropIndexStmtIndexName = "IndexName"; @@ -5119,22 +5398,6 @@ static int32_t jsonToDropIndexStmt(const SJson* pJson, void* pObj) { return code; } -static const char* jkDropComponentNodeStmtDnodeId = "DnodeId"; - -static int32_t dropComponentNodeStmtToJson(const void* pObj, SJson* pJson) { - const SDropComponentNodeStmt* pNode = (const SDropComponentNodeStmt*)pObj; - return tjsonAddIntegerToObject(pJson, jkDropComponentNodeStmtDnodeId, pNode->dnodeId); -} - -static int32_t jsonToDropComponentNodeStmt(const SJson* pJson, void* pObj) { - SDropComponentNodeStmt* pNode = (SDropComponentNodeStmt*)pObj; - return tjsonGetIntValue(pJson, jkDropComponentNodeStmtDnodeId, &pNode->dnodeId); -} - -static int32_t dropQnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } - -static int32_t jsonToDropQnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } - static const char* jkCreateComponentNodeStmtDnodeId = "DnodeId"; static int32_t createComponentNodeStmtToJson(const void* pObj, SJson* pJson) { @@ -5147,6 +5410,30 @@ static int32_t jsonToCreateComponentNodeStmt(const SJson* pJson, void* pObj) { return tjsonGetIntValue(pJson, jkCreateComponentNodeStmtDnodeId, &pNode->dnodeId); } +static const char* jkDropComponentNodeStmtDnodeId = "DnodeId"; + +static int32_t dropComponentNodeStmtToJson(const void* pObj, SJson* pJson) { + const SDropComponentNodeStmt* pNode = (const SDropComponentNodeStmt*)pObj; + return tjsonAddIntegerToObject(pJson, jkDropComponentNodeStmtDnodeId, pNode->dnodeId); +} + +static int32_t jsonToDropComponentNodeStmt(const SJson* pJson, void* pObj) { + SDropComponentNodeStmt* pNode = (SDropComponentNodeStmt*)pObj; + return tjsonGetIntValue(pJson, jkDropComponentNodeStmtDnodeId, &pNode->dnodeId); +} + +static int32_t createQnodeStmtToJson(const void* pObj, SJson* pJson) { + return createComponentNodeStmtToJson(pObj, pJson); +} + +static int32_t jsonToCreateQnodeStmt(const SJson* pJson, void* pObj) { + return jsonToCreateComponentNodeStmt(pJson, pObj); +} + +static int32_t dropQnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } + +static int32_t jsonToDropQnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } + static int32_t createSnodeStmtToJson(const void* pObj, SJson* pJson) { return createComponentNodeStmtToJson(pObj, pJson); } @@ -5159,6 +5446,14 @@ static int32_t dropSnodeStmtToJson(const void* pObj, SJson* pJson) { return drop static int32_t jsonToDropSnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } +static int32_t createMnodeStmtToJson(const void* pObj, SJson* pJson) { + return createComponentNodeStmtToJson(pObj, pJson); +} + +static int32_t jsonToCreateMnodeStmt(const SJson* pJson, void* pObj) { + return jsonToCreateComponentNodeStmt(pJson, pObj); +} + static int32_t dropMnodeStmtToJson(const void* pObj, SJson* pJson) { return dropComponentNodeStmtToJson(pObj, pJson); } static int32_t jsonToDropMnodeStmt(const SJson* pJson, void* pObj) { return jsonToDropComponentNodeStmt(pJson, pObj); } @@ -5298,6 +5593,63 @@ static int32_t jsonToDropConsumerGroupStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkAlterLocalStmtConfig = "Config"; +static const char* jkAlterLocalStmtValue = "Value"; + +static int32_t alterLocalStmtToJson(const void* pObj, SJson* pJson) { + const SAlterLocalStmt* pNode = (const SAlterLocalStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkAlterLocalStmtConfig, pNode->config); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkAlterLocalStmtValue, pNode->value); + } + + return code; +} + +static int32_t jsonToAlterLocalStmt(const SJson* pJson, void* pObj) { + SAlterLocalStmt* pNode = (SAlterLocalStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkAlterLocalStmtConfig, pNode->config); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkAlterLocalStmtValue, pNode->value); + } + + return code; +} + +static const char* jkExplainStmtAnalyze = "Analyze"; +static const char* jkExplainStmtOptions = "Options"; +static const char* jkExplainStmtQuery = "Query"; + +static int32_t explainStmtToJson(const void* pObj, SJson* pJson) { + const SExplainStmt* pNode = (const SExplainStmt*)pObj; + + int32_t code = tjsonAddBoolToObject(pJson, jkExplainStmtAnalyze, pNode->analyze); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkExplainStmtOptions, nodeToJson, pNode->pOptions); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkExplainStmtQuery, nodeToJson, pNode->pQuery); + } + + return code; +} + +static int32_t jsonToExplainStmt(const SJson* pJson, void* pObj) { + SExplainStmt* pNode = (SExplainStmt*)pObj; + + int32_t code = tjsonGetBoolValue(pJson, jkExplainStmtAnalyze, &pNode->analyze); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkExplainStmtOptions, (SNode**)&pNode->pOptions); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkExplainStmtQuery, &pNode->pQuery); + } + + return code; +} + static const char* jkDescribeStmtDbName = "DbName"; static const char* jkDescribeStmtTableName = "TableName"; @@ -5415,6 +5767,77 @@ static int32_t jsonToDropStreamStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkMergeVgroupStmtVgroupId1 = "VgroupId1"; +static const char* jkMergeVgroupStmtVgroupId2 = "VgroupId2"; + +static int32_t mergeVgroupStmtToJson(const void* pObj, SJson* pJson) { + const SMergeVgroupStmt* pNode = (const SMergeVgroupStmt*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkMergeVgroupStmtVgroupId1, pNode->vgId1); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkMergeVgroupStmtVgroupId2, pNode->vgId2); + } + + return code; +} + +static int32_t jsonToMergeVgroupStmt(const SJson* pJson, void* pObj) { + SMergeVgroupStmt* pNode = (SMergeVgroupStmt*)pObj; + + int32_t code = tjsonGetIntValue(pJson, jkMergeVgroupStmtVgroupId1, &pNode->vgId1); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkMergeVgroupStmtVgroupId2, &pNode->vgId2); + } + + return code; +} + +static const char* jkRedistributeVgroupStmtVgroupId = "VgroupId"; +static const char* jkRedistributeVgroupStmtDnodeId1 = "DnodeId1"; +static const char* jkRedistributeVgroupStmtDnodeId2 = "DnodeId2"; +static const char* jkRedistributeVgroupStmtDnodeId3 = "DnodeId3"; +static const char* jkRedistributeVgroupStmtDnodes = "Dnodes"; + +static int32_t redistributeVgroupStmtToJson(const void* pObj, SJson* pJson) { + const SRedistributeVgroupStmt* pNode = (const SRedistributeVgroupStmt*)pObj; + + int32_t code = tjsonAddIntegerToObject(pJson, jkRedistributeVgroupStmtVgroupId, pNode->vgId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkRedistributeVgroupStmtDnodeId1, pNode->dnodeId1); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkRedistributeVgroupStmtDnodeId2, pNode->dnodeId2); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkRedistributeVgroupStmtDnodeId3, pNode->dnodeId3); + } + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkRedistributeVgroupStmtDnodes, pNode->pDnodes); + } + + return code; +} + +static int32_t jsonToRedistributeVgroupStmt(const SJson* pJson, void* pObj) { + SRedistributeVgroupStmt* pNode = (SRedistributeVgroupStmt*)pObj; + + int32_t code = tjsonGetIntValue(pJson, jkRedistributeVgroupStmtVgroupId, &pNode->vgId); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkRedistributeVgroupStmtDnodeId1, &pNode->dnodeId1); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkRedistributeVgroupStmtDnodeId2, &pNode->dnodeId2); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetIntValue(pJson, jkRedistributeVgroupStmtDnodeId3, &pNode->dnodeId3); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkRedistributeVgroupStmtDnodes, &pNode->pDnodes); + } + + return code; +} + static const char* jkSplitVgroupStmtVgroupId = "VgroupId"; static int32_t splitVgroupStmtToJson(const void* pObj, SJson* pJson) { @@ -5427,6 +5850,42 @@ static int32_t jsonToSplitVgroupStmt(const SJson* pJson, void* pObj) { return tjsonGetIntValue(pJson, jkSplitVgroupStmtVgroupId, &pNode->vgId); } +static const char* jkGrantStmtUserName = "UserName"; +static const char* jkGrantStmtObjName = "ObjName"; +static const char* jkGrantStmtPrivileges = "Privileges"; + +static int32_t grantStmtToJson(const void* pObj, SJson* pJson) { + const SGrantStmt* pNode = (const SGrantStmt*)pObj; + + int32_t code = tjsonAddStringToObject(pJson, jkGrantStmtUserName, pNode->userName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddStringToObject(pJson, jkGrantStmtObjName, pNode->objName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkGrantStmtPrivileges, pNode->privileges); + } + + return code; +} + +static int32_t jsonToGrantStmt(const SJson* pJson, void* pObj) { + SGrantStmt* pNode = (SGrantStmt*)pObj; + + int32_t code = tjsonGetStringValue(pJson, jkGrantStmtUserName, pNode->userName); + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetStringValue(pJson, jkGrantStmtObjName, pNode->objName); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetBigIntValue(pJson, jkGrantStmtPrivileges, &pNode->privileges); + } + + return code; +} + +static int32_t revokeStmtToJson(const void* pObj, SJson* pJson) { return grantStmtToJson(pObj, pJson); } + +static int32_t jsonToRevokeStmt(const SJson* pJson, void* pObj) { return jsonToGrantStmt(pJson, pObj); } + static const char* jkShowStmtDbName = "DbName"; static const char* jkShowStmtTbName = "TbName"; static const char* jkShowStmtTableCondType = "TableCondType"; @@ -5754,6 +6213,45 @@ static int32_t jsonToDeleteStmt(const SJson* pJson, void* pObj) { return code; } +static const char* jkInsertStmtTable = "Table"; +static const char* jkInsertStmtCols = "Cols"; +static const char* jkInsertStmtQuery = "Query"; +static const char* jkInsertStmtPrecision = "Precision"; + +static int32_t insertStmtToJson(const void* pObj, SJson* pJson) { + const SInsertStmt* pNode = (const SInsertStmt*)pObj; + + int32_t code = tjsonAddObject(pJson, jkInsertStmtTable, nodeToJson, pNode->pTable); + if (TSDB_CODE_SUCCESS == code) { + code = nodeListToJson(pJson, jkInsertStmtCols, pNode->pCols); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddObject(pJson, jkInsertStmtQuery, nodeToJson, pNode->pQuery); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkInsertStmtPrecision, pNode->precision); + } + + return code; +} + +static int32_t jsonToInsertStmt(const SJson* pJson, void* pObj) { + SInsertStmt* pNode = (SInsertStmt*)pObj; + + int32_t code = jsonToNodeObject(pJson, jkInsertStmtTable, &pNode->pTable); + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeList(pJson, jkInsertStmtCols, &pNode->pCols); + } + if (TSDB_CODE_SUCCESS == code) { + code = jsonToNodeObject(pJson, jkInsertStmtQuery, &pNode->pQuery); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetUTinyIntValue(pJson, jkInsertStmtPrecision, &pNode->precision); + } + + return code; +} + static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { switch (nodeType(pObj)) { case QUERY_NODE_COLUMN: @@ -5804,6 +6302,10 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return databaseOptionsToJson(pObj, pJson); case QUERY_NODE_TABLE_OPTIONS: return tableOptionsToJson(pObj, pJson); + case QUERY_NODE_INDEX_OPTIONS: + return indexOptionsToJson(pObj, pJson); + case QUERY_NODE_EXPLAIN_OPTIONS: + return explainOptionsToJson(pObj, pJson); case QUERY_NODE_STREAM_OPTIONS: return streamOptionsToJson(pObj, pJson); case QUERY_NODE_LEFT_VALUE: @@ -5821,7 +6323,7 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { case QUERY_NODE_VNODE_MODIFY_STMT: return vnodeModifyStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_DATABASE_STMT: - break; + return createDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_DATABASE_STMT: return alterDatabaseStmtToJson(pObj, pJson); case QUERY_NODE_TRIM_DATABASE_STMT: @@ -5840,24 +6342,36 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return dropStableStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_TABLE_STMT: return alterTableStmtToJson(pObj, pJson); + case QUERY_NODE_ALTER_SUPER_TABLE_STMT: + return alterStableStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_USER_STMT: return createUserStmtToJson(pObj, pJson); + case QUERY_NODE_ALTER_USER_STMT: + return alterUserStmtToJson(pObj, pJson); case QUERY_NODE_DROP_USER_STMT: return dropUserStmtToJson(pObj, pJson); case QUERY_NODE_USE_DATABASE_STMT: return useDatabaseStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_DNODE_STMT: + return createDnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_DNODE_STMT: return dropDnodeStmtToJson(pObj, pJson); case QUERY_NODE_ALTER_DNODE_STMT: return alterDnodeStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_INDEX_STMT: + return createIndexStmtToJson(pObj, pJson); case QUERY_NODE_DROP_INDEX_STMT: return dropIndexStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_QNODE_STMT: + return createQnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_QNODE_STMT: return dropQnodeStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_SNODE_STMT: return createSnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_SNODE_STMT: return dropSnodeStmtToJson(pObj, pJson); + case QUERY_NODE_CREATE_MNODE_STMT: + return createMnodeStmtToJson(pObj, pJson); case QUERY_NODE_DROP_MNODE_STMT: return dropMnodeStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_TOPIC_STMT: @@ -5866,14 +6380,28 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return dropTopicStmtToJson(pObj, pJson); case QUERY_NODE_DROP_CGROUP_STMT: return dropConsumerGroupStmtToJson(pObj, pJson); + case QUERY_NODE_ALTER_LOCAL_STMT: + return alterLocalStmtToJson(pObj, pJson); + case QUERY_NODE_EXPLAIN_STMT: + return explainStmtToJson(pObj, pJson); case QUERY_NODE_DESCRIBE_STMT: return describeStmtToJson(pObj, pJson); case QUERY_NODE_CREATE_STREAM_STMT: return createStreamStmtToJson(pObj, pJson); case QUERY_NODE_DROP_STREAM_STMT: return dropStreamStmtToJson(pObj, pJson); + case QUERY_NODE_BALANCE_VGROUP_STMT: + return TSDB_CODE_SUCCESS; // SBalanceVgroupStmt has no fields to serialize. + case QUERY_NODE_MERGE_VGROUP_STMT: + return mergeVgroupStmtToJson(pObj, pJson); + case QUERY_NODE_REDISTRIBUTE_VGROUP_STMT: + return redistributeVgroupStmtToJson(pObj, pJson); case QUERY_NODE_SPLIT_VGROUP_STMT: return splitVgroupStmtToJson(pObj, pJson); + case QUERY_NODE_GRANT_STMT: + return grantStmtToJson(pObj, pJson); + case QUERY_NODE_REVOKE_STMT: + return revokeStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_DNODES_STMT: return showDnodesStmtToJson(pObj, pJson); case QUERY_NODE_SHOW_MNODES_STMT: @@ -5928,6 +6456,8 @@ static int32_t specificNodeToJson(const void* pObj, SJson* pJson) { return showTableTagsStmtToJson(pObj, pJson); case QUERY_NODE_DELETE_STMT: return deleteStmtToJson(pObj, pJson); + case QUERY_NODE_INSERT_STMT: + return insertStmtToJson(pObj, pJson); case QUERY_NODE_LOGIC_PLAN_SCAN: return logicScanNodeToJson(pObj, pJson); case QUERY_NODE_LOGIC_PLAN_JOIN: @@ -6078,6 +6608,10 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDatabaseOptions(pJson, pObj); case QUERY_NODE_TABLE_OPTIONS: return jsonToTableOptions(pJson, pObj); + case QUERY_NODE_INDEX_OPTIONS: + return jsonToIndexOptions(pJson, pObj); + case QUERY_NODE_EXPLAIN_OPTIONS: + return jsonToExplainOptions(pJson, pObj); case QUERY_NODE_STREAM_OPTIONS: return jsonToStreamOptions(pJson, pObj); case QUERY_NODE_LEFT_VALUE: @@ -6094,6 +6628,8 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToSelectStmt(pJson, pObj); case QUERY_NODE_VNODE_MODIFY_STMT: return jsonToVnodeModifyStmt(pJson, pObj); + case QUERY_NODE_CREATE_DATABASE_STMT: + return jsonToCreateDatabaseStmt(pJson, pObj); case QUERY_NODE_ALTER_DATABASE_STMT: return jsonToAlterDatabaseStmt(pJson, pObj); case QUERY_NODE_TRIM_DATABASE_STMT: @@ -6112,24 +6648,36 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDropStableStmt(pJson, pObj); case QUERY_NODE_ALTER_TABLE_STMT: return jsonToAlterTableStmt(pJson, pObj); + case QUERY_NODE_ALTER_SUPER_TABLE_STMT: + return jsonToAlterStableStmt(pJson, pObj); case QUERY_NODE_CREATE_USER_STMT: return jsonToCreateUserStmt(pJson, pObj); + case QUERY_NODE_ALTER_USER_STMT: + return jsonToAlterUserStmt(pJson, pObj); case QUERY_NODE_DROP_USER_STMT: return jsonToDropUserStmt(pJson, pObj); case QUERY_NODE_USE_DATABASE_STMT: return jsonToUseDatabaseStmt(pJson, pObj); + case QUERY_NODE_CREATE_DNODE_STMT: + return jsonToCreateDnodeStmt(pJson, pObj); case QUERY_NODE_DROP_DNODE_STMT: return jsonToDropDnodeStmt(pJson, pObj); case QUERY_NODE_ALTER_DNODE_STMT: return jsonToAlterDnodeStmt(pJson, pObj); + case QUERY_NODE_CREATE_INDEX_STMT: + return jsonToCreateIndexStmt(pJson, pObj); case QUERY_NODE_DROP_INDEX_STMT: return jsonToDropIndexStmt(pJson, pObj); + case QUERY_NODE_CREATE_QNODE_STMT: + return jsonToCreateQnodeStmt(pJson, pObj); case QUERY_NODE_DROP_QNODE_STMT: return jsonToDropQnodeStmt(pJson, pObj); case QUERY_NODE_CREATE_SNODE_STMT: return jsonToCreateSnodeStmt(pJson, pObj); case QUERY_NODE_DROP_SNODE_STMT: return jsonToDropSnodeStmt(pJson, pObj); + case QUERY_NODE_CREATE_MNODE_STMT: + return jsonToCreateMnodeStmt(pJson, pObj); case QUERY_NODE_DROP_MNODE_STMT: return jsonToDropMnodeStmt(pJson, pObj); case QUERY_NODE_CREATE_TOPIC_STMT: @@ -6138,14 +6686,28 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToDropTopicStmt(pJson, pObj); case QUERY_NODE_DROP_CGROUP_STMT: return jsonToDropConsumerGroupStmt(pJson, pObj); + case QUERY_NODE_ALTER_LOCAL_STMT: + return jsonToAlterLocalStmt(pJson, pObj); + case QUERY_NODE_EXPLAIN_STMT: + return jsonToExplainStmt(pJson, pObj); case QUERY_NODE_DESCRIBE_STMT: return jsonToDescribeStmt(pJson, pObj); case QUERY_NODE_CREATE_STREAM_STMT: return jsonToCreateStreamStmt(pJson, pObj); case QUERY_NODE_DROP_STREAM_STMT: return jsonToDropStreamStmt(pJson, pObj); + case QUERY_NODE_BALANCE_VGROUP_STMT: + return TSDB_CODE_SUCCESS; // SBalanceVgroupStmt has no fields to deserialize. + case QUERY_NODE_MERGE_VGROUP_STMT: + return jsonToMergeVgroupStmt(pJson, pObj); + case QUERY_NODE_REDISTRIBUTE_VGROUP_STMT: + return jsonToRedistributeVgroupStmt(pJson, pObj); case QUERY_NODE_SPLIT_VGROUP_STMT: return jsonToSplitVgroupStmt(pJson, pObj); + case QUERY_NODE_GRANT_STMT: + return jsonToGrantStmt(pJson, pObj); + case QUERY_NODE_REVOKE_STMT: + return jsonToRevokeStmt(pJson, pObj); case QUERY_NODE_SHOW_DNODES_STMT: return jsonToShowDnodesStmt(pJson, pObj); case QUERY_NODE_SHOW_MNODES_STMT: @@ -6200,8 +6762,12 @@ static int32_t jsonToSpecificNode(const SJson* pJson, void* pObj) { return jsonToShowTableTagsStmt(pJson, pObj); case QUERY_NODE_DELETE_STMT: return jsonToDeleteStmt(pJson, pObj); + case QUERY_NODE_INSERT_STMT: + return jsonToInsertStmt(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_SCAN: return jsonToLogicScanNode(pJson, pObj); + case QUERY_NODE_LOGIC_PLAN_JOIN: + return jsonToLogicJoinNode(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_AGG: return jsonToLogicAggNode(pJson, pObj); case QUERY_NODE_LOGIC_PLAN_PROJECT: From 889872c24de7baa23425ffbab946c352d062c51b Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Wed, 21 Dec 2022 18:43:06 +0800 Subject: [PATCH 58/64] test: update script to stop taosadapter service --- .../taosbenchmark/auto_create_table_json.py | 2 ++ .../taosbenchmark/insert_alltypes_json.py | 3 ++- .../5-taos-tools/taosbenchmark/query_json.py | 4 ++-- tests/pytest/util/taosadapter.py | 15 +++++-------- tests/system-test/2-query/db.py | 22 ++++++++++++++++--- 5 files changed, 31 insertions(+), 15 deletions(-) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py index 4e3c9d07ce..a6167158a2 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py @@ -153,6 +153,8 @@ class TDTestCase: tdSql.query("select count(*) from db.`stb4-2`") tdSql.checkData(0, 0, 160) + tAdapter.stop() + def stop(self): tdSql.close() tdLog.success("%s successfully executed" % __file__) diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py index e63908ce33..54657995e2 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/insert_alltypes_json.py @@ -320,7 +320,8 @@ class TDTestCase: tdSql.checkData(0, 0, 160) tdSql.query("select count(*) from db.stb where t13 like 'b1%' or t13 like 'b2%'") tdSql.checkData(0, 0, 160) - + + tAdapter.stop() def stop(self): tdSql.close() diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py index 375113c3ef..c906f61675 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/query_json.py @@ -116,11 +116,11 @@ class TDTestCase: assert times == 1, "result is %s != expect: 1" % times - + tAdapter.stop() def stop(self): - tdSql.close() + tdSql.close() tdLog.success("%s successfully executed" % __file__) diff --git a/tests/pytest/util/taosadapter.py b/tests/pytest/util/taosadapter.py index 440c23dc65..5210825cde 100644 --- a/tests/pytest/util/taosadapter.py +++ b/tests/pytest/util/taosadapter.py @@ -227,7 +227,7 @@ class TAdapter: time.sleep(0.1) def stop(self, force_kill=False): - signal = "-SIGKILL" if force_kill else "-SIGTERM" + signal = "-9" if force_kill else "-15" if self.remoteIP: self.remote_exec(self.taosadapter_cfg_dict, "tAdapter.running=1\ntAdapter.stop()") @@ -238,16 +238,13 @@ class TAdapter: if self.running != 0: psCmd = f"ps -ef|grep -w {toBeKilled}| grep -v grep | awk '{{print $2}}'" - # psCmd = f"pgrep {toBeKilled}" - processID = subprocess.check_output( - psCmd, shell=True) - - while(processID): - killCmd = f"pkill {signal} {processID} > /dev/null " + # psCmd = f"pgrep {toBeKilled}" + processID = subprocess.check_output(psCmd, shell=True).decode("utf-8").strip() + while(processID): + killCmd = "kill %s %s > /dev/null 2>&1" % (signal, processID) os.system(killCmd) time.sleep(1) - processID = subprocess.check_output( - psCmd, shell=True).decode("utf-8") + processID = subprocess.check_output(psCmd, shell=True).decode("utf-8").strip() if not platform.system().lower() == 'windows': port = 6041 fuserCmd = f"fuser -k -n tcp {port} > /dev/null" diff --git a/tests/system-test/2-query/db.py b/tests/system-test/2-query/db.py index 7fe8b96157..f6982ccb2a 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -42,16 +42,32 @@ class TDTestCase: tdSql.query("select count(c1) from dbns.ntb interval(1b)") tdSql.checkRows(2) + + def case2(self): + tdSql.query("show variables") + tdSql.checkRows(4) + + for i in range(self.replicaVar): + tdSql.query("show dnode %d variables like 'debugFlag'" % (i + 1)) + tdSql.checkRows(1) + tdSql.checkData(0, 0, i + 1) + tdSql.checkData(0, 1, 'debugFlag') + tdSql.checkData(0, 2, 0) + + tdSql.execute("alter dnode 2 'debugFlag 135'") def run(self): # sourcery skip: extract-duplicate-method, remove-redundant-fstring - tdSql.prepare() + tdSql.prepare(replica = self.replicaVar) + tdLog.printNoPrefix("==========start case1 run ...............") - self.case1() - tdLog.printNoPrefix("==========end case1 run ...............") + tdLog.printNoPrefix("==========start case2 run ...............") + self.case2() + tdLog.printNoPrefix("==========end case2 run ...............") + def stop(self): tdSql.close() tdLog.success(f"{__file__} successfully executed") From 01b9a93bd004596af7ed9ffc04c04e73fe91bb2a Mon Sep 17 00:00:00 2001 From: xleili Date: Wed, 21 Dec 2022 20:29:44 +0800 Subject: [PATCH 59/64] docs: release 3.0.2.1 --- docs/en/28-releases/01-tdengine.md | 4 ++++ docs/en/28-releases/02-tools.md | 4 ++++ docs/zh/28-releases/01-tdengine.md | 4 ++++ docs/zh/28-releases/02-tools.md | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/docs/en/28-releases/01-tdengine.md b/docs/en/28-releases/01-tdengine.md index e33970c407..bcfcaf9ffb 100644 --- a/docs/en/28-releases/01-tdengine.md +++ b/docs/en/28-releases/01-tdengine.md @@ -10,6 +10,10 @@ For TDengine 2.x installation packages by version, please visit [here](https://w import Release from "/components/ReleaseV3"; +## 3.0.2.1 + + + ## 3.0.2.0 diff --git a/docs/en/28-releases/02-tools.md b/docs/en/28-releases/02-tools.md index f2212bb2d4..6013aacc35 100644 --- a/docs/en/28-releases/02-tools.md +++ b/docs/en/28-releases/02-tools.md @@ -10,6 +10,10 @@ For other historical version installers, please visit [here](https://www.taosdat import Release from "/components/ReleaseV3"; +## 2.3.3 + + + ## 2.3.2 diff --git a/docs/zh/28-releases/01-tdengine.md b/docs/zh/28-releases/01-tdengine.md index 0ea34829a5..0fe6555162 100644 --- a/docs/zh/28-releases/01-tdengine.md +++ b/docs/zh/28-releases/01-tdengine.md @@ -10,6 +10,10 @@ TDengine 2.x 各版本安装包请访问[这里](https://www.taosdata.com/all-do import Release from "/components/ReleaseV3"; +## 3.0.2.1 + + + ## 3.0.2.0 diff --git a/docs/zh/28-releases/02-tools.md b/docs/zh/28-releases/02-tools.md index 6471826b50..331f6832c0 100644 --- a/docs/zh/28-releases/02-tools.md +++ b/docs/zh/28-releases/02-tools.md @@ -10,6 +10,10 @@ taosTools 各版本安装包下载链接如下: import Release from "/components/ReleaseV3"; +## 2.3.3 + + + ## 2.3.2 From 69d410591f7600670c5bffec1c231b2039b37e88 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 22 Dec 2022 17:14:17 +0800 Subject: [PATCH 60/64] refactor: add debug log --- source/libs/stream/src/streamExec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamExec.c b/source/libs/stream/src/streamExec.c index 20608a6cf3..b5bceb9b94 100644 --- a/source/libs/stream/src/streamExec.c +++ b/source/libs/stream/src/streamExec.c @@ -121,7 +121,11 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) { block.info.childId = pTask->selfChildId; taosArrayPush(pRes, &block); - if (++batchCnt >= batchSz) break; + batchCnt++; + + qDebug("task %d scan exec block num %d, block limit %d", pTask->taskId, batchCnt, batchSz); + + if (batchCnt >= batchSz) break; } if (taosArrayGetSize(pRes) == 0) { taosArrayDestroy(pRes); @@ -139,6 +143,7 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) { streamTaskOutput(pTask, qRes); if (pTask->outputType == TASK_OUTPUT__FIXED_DISPATCH || pTask->outputType == TASK_OUTPUT__SHUFFLE_DISPATCH) { + qDebug("task %d scan exec dispatch block num %d", pTask->taskId, batchCnt); streamDispatch(pTask); } if (finished) break; From e8fb9f513e553678a3d148b104f8c070e7c39035 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Fri, 23 Dec 2022 10:32:19 +0800 Subject: [PATCH 61/64] fix test failure --- tests/parallel_test/cases.task | 4 ++-- tests/system-test/2-query/db.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index b703f434df..44bf6cc6f1 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -480,8 +480,8 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/count.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/countAlwaysReturnValue.py -R -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -R +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py +,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/db.py -N 3 -n 3 -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/diff.py -R ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/distinct.py diff --git a/tests/system-test/2-query/db.py b/tests/system-test/2-query/db.py index f6982ccb2a..d79e2074dd 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -54,7 +54,11 @@ class TDTestCase: tdSql.checkData(0, 1, 'debugFlag') tdSql.checkData(0, 2, 0) - tdSql.execute("alter dnode 2 'debugFlag 135'") + tdSql.query("show dnode 1 variables like '%debugFlag'") + tdSql.checkRows(21) + + tdSql.query("show dnode 1 variables like '____debugFlag'") + tdSql.checkRows(2) def run(self): # sourcery skip: extract-duplicate-method, remove-redundant-fstring tdSql.prepare(replica = self.replicaVar) From c5b047032584e4c97bd6009ee55532b24853faf1 Mon Sep 17 00:00:00 2001 From: Alex Duan <51781608+DuanKuanJun@users.noreply.github.com> Date: Fri, 23 Dec 2022 15:44:45 +0800 Subject: [PATCH 62/64] Update 24-show.md show table distributed detail instruduction --- docs/zh/12-taos-sql/24-show.md | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/docs/zh/12-taos-sql/24-show.md b/docs/zh/12-taos-sql/24-show.md index 4bd1e52284..3d83af4247 100644 --- a/docs/zh/12-taos-sql/24-show.md +++ b/docs/zh/12-taos-sql/24-show.md @@ -179,6 +179,80 @@ SHOW TABLE DISTRIBUTED table_name; 显示表的数据分布信息。 +示例说明: + +语句: show table distributed d0\G; 竖行显示表 d0 的 BLOCK 分布情况 + +*************************** 1.row *************************** +_block_dist: Total_Blocks=[5] Total_Size=[93.65 Kb] Average_size=[18.73 Kb] Compression_Ratio=[23.98 %] + +Total_Blocks : 表d0 占用的 block 个数为 5 个 +Total_Size. : 表 d0 所有 block 在文件中占用的大小为 93.65 KB +Average_size: 平均每个 block 在文件中占用的空间大小为 18.73 KB +Compression_Ratio: 数据压缩率为 23.98% + +*************************** 2.row *************************** +_block_dist: Total_Rows=[20000] Inmem_Rows=[0] MinRows=[3616] MaxRows=[4096] Average_Rows=[4000] + +Total_Rows: 统计表 d0 的所有行数 为20000 行 +Inmem_Rows: 表示仍然还存放在内存中的行数,即没有落盘的行数,为 0行,表示没有 +MinRows: BLOCK 中最小的行数,为 3616 行 +MaxRows: BLOCK 中最大的行数,为 4096行 +Average_Rows: BLOCK 中的平均行数,为4000 行 + +*************************** 3.row *************************** +_block_dist: Total_Tables=[1] Total_Files=[2] + +Total_Tables: 表示子表的个数,这里为1 +Total_Files: 表数据保存在几个文件中,这里保存在 2 个文件中 + +*************************** 4.row *************************** +_block_dist: -------------------------------------------------------------------------------- +*************************** 5.row *************************** +_block_dist: 0100 | +*************************** 6.row *************************** +_block_dist: 0299 | +*************************** 7.row *************************** +_block_dist: 0498 | +*************************** 8.row *************************** +_block_dist: 0697 | +*************************** 9.row *************************** +_block_dist: 0896 | +*************************** 10.row *************************** +_block_dist: 1095 | +*************************** 11.row *************************** +_block_dist: 1294 | +*************************** 12.row *************************** +_block_dist: 1493 | +*************************** 13.row *************************** +_block_dist: 1692 | +*************************** 14.row *************************** +_block_dist: 1891 | +*************************** 15.row *************************** +_block_dist: 2090 | +*************************** 16.row *************************** +_block_dist: 2289 | +*************************** 17.row *************************** +_block_dist: 2488 | +*************************** 18.row *************************** +_block_dist: 2687 | +*************************** 19.row *************************** +_block_dist: 2886 | +*************************** 20.row *************************** +_block_dist: 3085 | +*************************** 21.row *************************** +_block_dist: 3284 | +*************************** 22.row *************************** +_block_dist: 3483 ||||||||||||||||| 1 (20.00%) +*************************** 23.row *************************** +_block_dist: 3682 | +*************************** 24.row *************************** +_block_dist: 3881 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 4 (80.00%) +Query OK, 24 row(s) in set (0.002444s) + + 上面是块中包含数据行数的块儿分布情况图,这里的 0100 0299 0498 … 表示的是每个块中包含的数据行数,上面的意思就是这个表的 5 个块,分布在 3483 ~3681 行的块有 1 个,占整个块的 20%,分布在 3881 ~ 4096(最大行数)的块数为 4 个,占整个块的 80%, 其它区域内分布块数为 0。 + + ## SHOW TAGS ```sql From f70c3b68e12122cc4adfda405a0316994aa17a92 Mon Sep 17 00:00:00 2001 From: Alex Duan <51781608+DuanKuanJun@users.noreply.github.com> Date: Fri, 23 Dec 2022 16:47:38 +0800 Subject: [PATCH 63/64] Update 24-show.md --- docs/zh/12-taos-sql/24-show.md | 59 ++++++++++++++++------------------ 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/docs/zh/12-taos-sql/24-show.md b/docs/zh/12-taos-sql/24-show.md index 3d83af4247..a65746e7f9 100644 --- a/docs/zh/12-taos-sql/24-show.md +++ b/docs/zh/12-taos-sql/24-show.md @@ -184,72 +184,67 @@ SHOW TABLE DISTRIBUTED table_name; 语句: show table distributed d0\G; 竖行显示表 d0 的 BLOCK 分布情况 *************************** 1.row *************************** + _block_dist: Total_Blocks=[5] Total_Size=[93.65 Kb] Average_size=[18.73 Kb] Compression_Ratio=[23.98 %] Total_Blocks : 表d0 占用的 block 个数为 5 个 + Total_Size. : 表 d0 所有 block 在文件中占用的大小为 93.65 KB + Average_size: 平均每个 block 在文件中占用的空间大小为 18.73 KB + Compression_Ratio: 数据压缩率为 23.98% + *************************** 2.row *************************** + _block_dist: Total_Rows=[20000] Inmem_Rows=[0] MinRows=[3616] MaxRows=[4096] Average_Rows=[4000] Total_Rows: 统计表 d0 的所有行数 为20000 行 + Inmem_Rows: 表示仍然还存放在内存中的行数,即没有落盘的行数,为 0行,表示没有 + MinRows: BLOCK 中最小的行数,为 3616 行 + MaxRows: BLOCK 中最大的行数,为 4096行 + Average_Rows: BLOCK 中的平均行数,为4000 行 + *************************** 3.row *************************** + _block_dist: Total_Tables=[1] Total_Files=[2] Total_Tables: 表示子表的个数,这里为1 + Total_Files: 表数据保存在几个文件中,这里保存在 2 个文件中 -*************************** 4.row *************************** -_block_dist: -------------------------------------------------------------------------------- + *************************** 5.row *************************** + _block_dist: 0100 | + *************************** 6.row *************************** + _block_dist: 0299 | -*************************** 7.row *************************** -_block_dist: 0498 | -*************************** 8.row *************************** -_block_dist: 0697 | -*************************** 9.row *************************** -_block_dist: 0896 | -*************************** 10.row *************************** -_block_dist: 1095 | -*************************** 11.row *************************** -_block_dist: 1294 | -*************************** 12.row *************************** -_block_dist: 1493 | -*************************** 13.row *************************** -_block_dist: 1692 | -*************************** 14.row *************************** -_block_dist: 1891 | -*************************** 15.row *************************** -_block_dist: 2090 | -*************************** 16.row *************************** -_block_dist: 2289 | -*************************** 17.row *************************** -_block_dist: 2488 | -*************************** 18.row *************************** -_block_dist: 2687 | -*************************** 19.row *************************** -_block_dist: 2886 | -*************************** 20.row *************************** -_block_dist: 3085 | -*************************** 21.row *************************** -_block_dist: 3284 | + +...... + *************************** 22.row *************************** + _block_dist: 3483 ||||||||||||||||| 1 (20.00%) + *************************** 23.row *************************** + _block_dist: 3682 | + *************************** 24.row *************************** + _block_dist: 3881 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 4 (80.00%) + Query OK, 24 row(s) in set (0.002444s) + 上面是块中包含数据行数的块儿分布情况图,这里的 0100 0299 0498 … 表示的是每个块中包含的数据行数,上面的意思就是这个表的 5 个块,分布在 3483 ~3681 行的块有 1 个,占整个块的 20%,分布在 3881 ~ 4096(最大行数)的块数为 4 个,占整个块的 80%, 其它区域内分布块数为 0。 From a7fbd6e390e256b6abcfe842cfbd02976ba50574 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Fri, 23 Dec 2022 16:50:22 +0800 Subject: [PATCH 64/64] doc: add example for show table distributed --- docs/en/12-taos-sql/24-show.md | 71 ++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/docs/en/12-taos-sql/24-show.md b/docs/en/12-taos-sql/24-show.md index 1bda4a118d..08e8df6252 100644 --- a/docs/en/12-taos-sql/24-show.md +++ b/docs/en/12-taos-sql/24-show.md @@ -178,6 +178,77 @@ SHOW TABLE DISTRIBUTED table_name; Shows how table data is distributed. +Examples: show table distributed d0\G; Display the block distribution of table `d0` in detailed format. + +*************************** 1.row *************************** +_block_dist: Total_Blocks=[5] Total_Size=[93.65 Kb] Average_size=[18.73 Kb] Compression_Ratio=[23.98 %] + +Total_Blocks : Table `d0` contains total 5 blocks +Total_Size: The total size of all the data blocks in table `d0` is 93.65 KB +Average_size: The average size of each block is 18.73 KB +Compression_Ratio: The data compression rate is 23.98% + +*************************** 2.row *************************** +_block_dist: Total_Rows=[20000] Inmem_Rows=[0] MinRows=[3616] MaxRows=[4096] Average_Rows=[4000] + +Total_Rows: Table `d0` contains 20,000 rows +Inmem_Rows: The rows still in memory, i.e. not committed in disk, is 0, i.e. none such rows +MinRows: The minimum number of rows in a block is 3,616 +MaxRows: The maximum number of rows in a block is 4,096B +Average_Rows: The average number of rows in a block is 4,000 + +*************************** 3.row *************************** +_block_dist: Total_Tables=[1] Total_Files=[2] + +Total_Tables: The number of child tables, 1 in this example +Total_Files: The number of files storing the table's data, 2 in this example + +*************************** 4.row *************************** +_block_dist: -------------------------------------------------------------------------------- +*************************** 5.row *************************** +_block_dist: 0100 | +*************************** 6.row *************************** +_block_dist: 0299 | +*************************** 7.row *************************** +_block_dist: 0498 | +*************************** 8.row *************************** +_block_dist: 0697 | +*************************** 9.row *************************** +_block_dist: 0896 | +*************************** 10.row *************************** +_block_dist: 1095 | +*************************** 11.row *************************** +_block_dist: 1294 | +*************************** 12.row *************************** +_block_dist: 1493 | +*************************** 13.row *************************** +_block_dist: 1692 | +*************************** 14.row *************************** +_block_dist: 1891 | +*************************** 15.row *************************** +_block_dist: 2090 | +*************************** 16.row *************************** +_block_dist: 2289 | +*************************** 17.row *************************** +_block_dist: 2488 | +*************************** 18.row *************************** +_block_dist: 2687 | +*************************** 19.row *************************** +_block_dist: 2886 | +*************************** 20.row *************************** +_block_dist: 3085 | +*************************** 21.row *************************** +_block_dist: 3284 | +*************************** 22.row *************************** +_block_dist: 3483 ||||||||||||||||| 1 (20.00%) +*************************** 23.row *************************** +_block_dist: 3682 | +*************************** 24.row *************************** +_block_dist: 3881 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 4 (80.00%) +Query OK, 24 row(s) in set (0.002444s) + + The above show the block distribution percentage according to the number of rows in each block. In the above example, `_block_dist: 3483 ||||||||||||||||| 1 (20.00%)` means there is one block whose rows is between 3,483 and 3,681. `_block_dist: 3881 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 4 (80.00%)` means there are 4 blocks whose rows is between 3,881 and 4,096. The number of blocks whose rows fall in other range is zero. + ## SHOW TAGS ```sql