diff --git a/CMakeLists.txt b/CMakeLists.txt index 0603055e3c9db74ea3cf1bc1fc27f87226b11c24..e1fbd54be337eb625fa1c1a95dead88c83887c50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ include(${TD_SUPPORT_DIR}/cmake.platform) include(${TD_SUPPORT_DIR}/cmake.define) include(${TD_SUPPORT_DIR}/cmake.options) include(${TD_SUPPORT_DIR}/cmake.version) +include(${TD_SUPPORT_DIR}/cmake.install) # contrib add_subdirectory(contrib) diff --git a/cmake/cmake.define b/cmake/cmake.define index e875a0d306e666a44d521f0b6214f6de252019b9..c985ba1cc705b3482a8defacdf6715c84bea4b2a 100644 --- a/cmake/cmake.define +++ b/cmake/cmake.define @@ -1,5 +1,15 @@ cmake_minimum_required(VERSION 3.16) +#set output directory +SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/lib) +SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/bin) +SET(TD_TESTS_OUTPUT_DIR ${PROJECT_BINARY_DIR}/test) + +MESSAGE(STATUS "Project source directory: " ${PROJECT_SOURCE_DIR}) +MESSAGE(STATUS "Project binary files output path: " ${PROJECT_BINARY_DIR}) +MESSAGE(STATUS "Project executable files output path: " ${EXECUTABLE_OUTPUT_PATH}) +MESSAGE(STATUS "Project library files output path: " ${LIBRARY_OUTPUT_PATH}) + if (NOT DEFINED TD_GRANT) SET(TD_GRANT FALSE) endif() diff --git a/cmake/cmake.install b/cmake/cmake.install new file mode 100644 index 0000000000000000000000000000000000000000..5a05c0c7dc8eebf34dc1e5825a8d955462559381 --- /dev/null +++ b/cmake/cmake.install @@ -0,0 +1,28 @@ +IF (TD_LINUX) + SET(TD_MAKE_INSTALL_SH "${TD_SOURCE_DIR}/packaging/make_install.sh") + INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") + INSTALL(CODE "execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_SOURCE_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})") +ELSEIF (TD_WINDOWS) + SET(CMAKE_INSTALL_PREFIX C:/TDengine) + + INSTALL(DIRECTORY ${TD_SOURCE_DIR}/src/connector/go DESTINATION connector) + INSTALL(DIRECTORY ${TD_SOURCE_DIR}/src/connector/nodejs DESTINATION connector) + INSTALL(DIRECTORY ${TD_SOURCE_DIR}/src/connector/python DESTINATION connector) + INSTALL(DIRECTORY ${TD_SOURCE_DIR}/src/connector/C\# DESTINATION connector) + INSTALL(DIRECTORY ${TD_SOURCE_DIR}/examples DESTINATION .) + INSTALL(FILES ${TD_SOURCE_DIR}/packaging/cfg/taos.cfg DESTINATION cfg) + INSTALL(FILES ${TD_SOURCE_DIR}/src/inc/taos.h DESTINATION include) + INSTALL(FILES ${TD_SOURCE_DIR}/src/inc/taoserror.h DESTINATION include) + INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.lib DESTINATION driver) + INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos_static.lib DESTINATION driver) + INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.exp DESTINATION driver) + INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.dll DESTINATION driver) + + IF (TD_MVN_INSTALLED) + INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.38-dist.jar DESTINATION connector/jdbc) + ENDIF () +ELSEIF (TD_DARWIN) + SET(TD_MAKE_INSTALL_SH "${TD_SOURCE_DIR}/packaging/tools/make_install.sh") + INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") + INSTALL(CODE "execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_SOURCE_DIR} ${PROJECT_BINARY_DIR} Darwin ${TD_VER_NUMBER})") +ENDIF () diff --git a/example/src/demoapi.c b/example/src/demoapi.c index c38e481b96f853de1edb8d102e4aa8fb13661747..45da88fa1b44b37cfe7e10a29a36d4093fe370e0 100644 --- a/example/src/demoapi.c +++ b/example/src/demoapi.c @@ -179,33 +179,77 @@ static int print_result(char *tbname, TAOS_RES* res, int block) { warnPrint("%s", "call taos_fetch_block()\n"); int rows = 0; while ((rows = taos_fetch_block(res, &row))) { + int *lengths = taos_fetch_lengths(res); for (int f = 0; f < num_fields; f++) { if ((fields[f].type != TSDB_DATA_TYPE_VARCHAR) && (fields[f].type != TSDB_DATA_TYPE_NCHAR) && (fields[f].type != TSDB_DATA_TYPE_JSON)) { printf("col%d type is %d, no need get offset\n", f, fields[f].type); - continue; - } - - int *offsets = taos_get_column_data_offset(res, f); - if (offsets) { - for (int c = 0; c < rows; c++) { - if (offsets[c] != -1) { - int length = *(int16_t*)(row[f] + offsets[c]); - char *buf = calloc(1, length + 1); - strncpy(buf, (char *)(row[f] + offsets[c] + 2), length); - printf("row: %d, col: %d, offset: %d, length: %d, content: %s\n", - c, f, offsets[c], length, buf); - free(buf); - } else { - printf("row: %d, col: %d, offset: -1, means content is NULL\n", - c, f); + for (int64_t c = 0; c < rows; c++) { + switch(fields[f].type) { + case TSDB_DATA_TYPE_TIMESTAMP: + if (taos_is_null(res, c, f)) { + printf("col%d, row: %"PRId64" " + "value: NULL\n", f, c); + } else { + printf("col%d, row: %"PRId64", " + "value: %"PRId64"\n", + f, c, + *(int64_t*)(row[f]+c*sizeof(int64_t))); + } + break; + + case TSDB_DATA_TYPE_INT: + if (taos_is_null(res, c, f)) { + printf("col%d, row: %"PRId64" " + "value: NULL\n", f, c); + } else { + printf("col%d, row: %"PRId64", " + "value: %d\n", + f, c, + *(int32_t*)(row[f]+c*sizeof(int32_t))); + } + break; + + case TSDB_DATA_TYPE_FLOAT: + if (taos_is_null(res, c, f)) { + printf("col%d, row: %"PRId64" " + "value: NULL\n", f, c); + } else { + printf("col%d, row: %"PRId64", " + "value: %f\n", + f, c, + *(float*)(row[f]+c*sizeof(float))); + } + break; + + default: + printf("type: %d is not processed\n", + fields[f].type); + break; } } } else { - errorPrint("%s() LN%d: col%d's lengths is NULL\n", - __func__, __LINE__, f); + int *offsets = taos_get_column_data_offset(res, f); + if (offsets) { + for (int c = 0; c < rows; c++) { + if (offsets[c] != -1) { + int length = *(int16_t*)(row[f] + offsets[c]); + char *buf = calloc(1, length + 1); + strncpy(buf, (char *)(row[f] + offsets[c] + 2), length); + printf("row: %d, col: %d, offset: %d, length: %d, content: %s\n", + c, f, offsets[c], length, buf); + free(buf); + } else { + printf("row: %d, col: %d, offset: -1, means content is NULL\n", + c, f); + } + } + } else { + errorPrint("%s() LN%d: col%d's offsets is NULL\n", + __func__, __LINE__, f); + } } } num_rows += rows; diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 63ebbd9879830b3add646410a7ce60372b4276f3..c98e5bf99d3345f7612c2095bc21000f25dbe0d3 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -195,45 +195,46 @@ #define TK_CAST 177 #define TK_NOW 178 #define TK_TODAY 179 -#define TK_COUNT 180 -#define TK_FIRST 181 -#define TK_LAST 182 -#define TK_LAST_ROW 183 -#define TK_BETWEEN 184 -#define TK_IS 185 -#define TK_NK_LT 186 -#define TK_NK_GT 187 -#define TK_NK_LE 188 -#define TK_NK_GE 189 -#define TK_NK_NE 190 -#define TK_MATCH 191 -#define TK_NMATCH 192 -#define TK_CONTAINS 193 -#define TK_JOIN 194 -#define TK_INNER 195 -#define TK_SELECT 196 -#define TK_DISTINCT 197 -#define TK_WHERE 198 -#define TK_PARTITION 199 -#define TK_BY 200 -#define TK_SESSION 201 -#define TK_STATE_WINDOW 202 -#define TK_SLIDING 203 -#define TK_FILL 204 -#define TK_VALUE 205 -#define TK_NONE 206 -#define TK_PREV 207 -#define TK_LINEAR 208 -#define TK_NEXT 209 -#define TK_GROUP 210 -#define TK_HAVING 211 -#define TK_ORDER 212 -#define TK_SLIMIT 213 -#define TK_SOFFSET 214 -#define TK_LIMIT 215 -#define TK_OFFSET 216 -#define TK_ASC 217 -#define TK_NULLS 218 +#define TK_TIMEZONE 180 +#define TK_COUNT 181 +#define TK_FIRST 182 +#define TK_LAST 183 +#define TK_LAST_ROW 184 +#define TK_BETWEEN 185 +#define TK_IS 186 +#define TK_NK_LT 187 +#define TK_NK_GT 188 +#define TK_NK_LE 189 +#define TK_NK_GE 190 +#define TK_NK_NE 191 +#define TK_MATCH 192 +#define TK_NMATCH 193 +#define TK_CONTAINS 194 +#define TK_JOIN 195 +#define TK_INNER 196 +#define TK_SELECT 197 +#define TK_DISTINCT 198 +#define TK_WHERE 199 +#define TK_PARTITION 200 +#define TK_BY 201 +#define TK_SESSION 202 +#define TK_STATE_WINDOW 203 +#define TK_SLIDING 204 +#define TK_FILL 205 +#define TK_VALUE 206 +#define TK_NONE 207 +#define TK_PREV 208 +#define TK_LINEAR 209 +#define TK_NEXT 210 +#define TK_GROUP 211 +#define TK_HAVING 212 +#define TK_ORDER 213 +#define TK_SLIMIT 214 +#define TK_SOFFSET 215 +#define TK_LIMIT 216 +#define TK_OFFSET 217 +#define TK_ASC 218 +#define TK_NULLS 219 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/include/libs/nodes/plannodes.h b/include/libs/nodes/plannodes.h index 9d4f554c2c43e441a8a2d7b2ace2fc5e05b7666f..5a156704c28e82b1d7461e7200b3b011af318cff 100644 --- a/include/libs/nodes/plannodes.h +++ b/include/libs/nodes/plannodes.h @@ -53,6 +53,11 @@ typedef struct SScanLogicNode { double ratio; SNodeList* pDynamicScanFuncs; int32_t dataRequired; + int64_t interval; + int64_t offset; + int64_t sliding; + int8_t intervalUnit; + int8_t slidingUnit; } SScanLogicNode; typedef struct SJoinLogicNode { @@ -208,6 +213,11 @@ typedef struct STableScanPhysiNode { double ratio; int32_t dataRequired; SNodeList* pDynamicScanFuncs; + int64_t interval; + int64_t offset; + int64_t sliding; + int8_t intervalUnit; + int8_t slidingUnit; } STableScanPhysiNode; typedef STableScanPhysiNode STableSeqScanPhysiNode; @@ -264,7 +274,6 @@ typedef struct SIntervalPhysiNode { int64_t sliding; int8_t intervalUnit; int8_t slidingUnit; - uint8_t precision; SFillNode* pFill; } SIntervalPhysiNode; diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index 3e78da63de2f3a9726aad07ef7c7cc615ebda56e..6d805a322671c9afafd98d8e211c0b010492d86d 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -57,6 +57,7 @@ typedef enum EColumnType { typedef struct SColumnNode { SExprNode node; // QUERY_NODE_COLUMN uint64_t tableId; + int8_t tableType; col_id_t colId; EColumnType colType; // column or tag char dbName[TSDB_DB_NAME_LEN]; @@ -196,8 +197,8 @@ typedef struct SStateWindowNode { typedef struct SSessionWindowNode { ENodeType type; // QUERY_NODE_SESSION_WINDOW - SNode* pCol; // timestamp primary key - SNode* pGap; // gap between two session window(in microseconds) + SColumnNode* pCol; // timestamp primary key + SValueNode* pGap; // gap between two session window(in microseconds) } SSessionWindowNode; typedef struct SIntervalWindowNode { diff --git a/include/libs/scalar/scalar.h b/include/libs/scalar/scalar.h index 49af10cd2cfad2c089f13051479284391fae6b3d..7d765bf13964ca4dc26594e88d221a66cd817c8a 100644 --- a/include/libs/scalar/scalar.h +++ b/include/libs/scalar/scalar.h @@ -80,6 +80,7 @@ int32_t timeTruncateFunction(SScalarParam *pInput, int32_t inputNum, SScalarPara int32_t timeDiffFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t nowFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); int32_t todayFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); +int32_t timezoneFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput); bool getTimePseudoFuncEnv(struct SFunctionNode* pFunc, SFuncExecEnv* pEnv); diff --git a/include/util/taoserror.h b/include/util/taoserror.h index d51217874a28abb96715d3a3311e68630a4daf1f..c5b477343db6cd4ffe299db6913a6a3298d199b7 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -579,7 +579,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_PAR_INVALID_PORT TAOS_DEF_ERROR_CODE(0, 0x2612) #define TSDB_CODE_PAR_INVALID_ENDPOINT TAOS_DEF_ERROR_CODE(0, 0x2613) #define TSDB_CODE_PAR_EXPRIE_STATEMENT TAOS_DEF_ERROR_CODE(0, 0x2614) -#define TSDB_CODE_PAR_INTERVAL_VALUE_TOO_SMALL TAOS_DEF_ERROR_CODE(0, 0x2615) +#define TSDB_CODE_PAR_INTER_VALUE_TOO_SMALL TAOS_DEF_ERROR_CODE(0, 0x2615) #define TSDB_CODE_PAR_DB_NOT_SPECIFIED TAOS_DEF_ERROR_CODE(0, 0x2616) #define TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME TAOS_DEF_ERROR_CODE(0, 0x2617) #define TSDB_CODE_PAR_CORRESPONDING_STABLE_ERR TAOS_DEF_ERROR_CODE(0, 0x2618) @@ -598,6 +598,17 @@ int32_t* taosGetErrno(); #define TSDB_CODE_PAR_INVALID_OPTION_UNIT TAOS_DEF_ERROR_CODE(0, 0x2625) #define TSDB_CODE_PAR_INVALID_KEEP_UNIT TAOS_DEF_ERROR_CODE(0, 0x2626) #define TSDB_CODE_PAR_AGG_FUNC_NESTING TAOS_DEF_ERROR_CODE(0, 0x2627) +#define TSDB_CODE_PAR_INVALID_STATE_WIN_TYPE TAOS_DEF_ERROR_CODE(0, 0x2628) +#define TSDB_CODE_PAR_INVALID_STATE_WIN_COL TAOS_DEF_ERROR_CODE(0, 0x2629) +#define TSDB_CODE_PAR_INVALID_STATE_WIN_TABLE TAOS_DEF_ERROR_CODE(0, 0x262A) +#define TSDB_CODE_PAR_INTER_SESSION_GAP TAOS_DEF_ERROR_CODE(0, 0x262B) +#define TSDB_CODE_PAR_INTER_SESSION_COL TAOS_DEF_ERROR_CODE(0, 0x262C) +#define TSDB_CODE_PAR_INTER_OFFSET_NEGATIVE TAOS_DEF_ERROR_CODE(0, 0x262D) +#define TSDB_CODE_PAR_INTER_OFFSET_UNIT TAOS_DEF_ERROR_CODE(0, 0x262E) +#define TSDB_CODE_PAR_INTER_OFFSET_TOO_BIG TAOS_DEF_ERROR_CODE(0, 0x262F) +#define TSDB_CODE_PAR_INTER_SLIDING_UNIT TAOS_DEF_ERROR_CODE(0, 0x2630) +#define TSDB_CODE_PAR_INTER_SLIDING_TOO_BIG TAOS_DEF_ERROR_CODE(0, 0x2631) +#define TSDB_CODE_PAR_INTER_SLIDING_TOO_SMALL TAOS_DEF_ERROR_CODE(0, 0x2632) //planner #define TSDB_CODE_PLAN_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x2700) diff --git a/packaging/make_install.sh b/packaging/make_install.sh new file mode 100755 index 0000000000000000000000000000000000000000..e9d719eefced69e9417dffc365cf4391a2abbbd0 --- /dev/null +++ b/packaging/make_install.sh @@ -0,0 +1,538 @@ +#!/bin/bash +# +# This file is used to install TAOS time-series database on linux systems. The operating system +# is required to use systemd to manage services at boot + +set -e +# set -x + +# -----------------------Variables definition +source_dir=$1 +binary_dir=$2 +osType=$3 +verNumber=$4 + +if [ "$osType" != "Darwin" ]; then + script_dir=$(dirname $(readlink -f "$0")) +else + script_dir=${source_dir}/packaging/tools +fi + +# Dynamic directory + +if [ "$osType" != "Darwin" ]; then + data_dir="/var/lib/taos" + log_dir="/var/log/taos" + + cfg_install_dir="/etc/taos" + + bin_link_dir="/usr/bin" + lib_link_dir="/usr/lib" + lib64_link_dir="/usr/lib64" + inc_link_dir="/usr/include" + + install_main_dir="/usr/local/taos" + + bin_dir="/usr/local/taos/bin" +else + data_dir="/usr/local/var/lib/taos" + log_dir="/usr/local/var/log/taos" + + cfg_install_dir="/usr/local/etc/taos" + + bin_link_dir="/usr/local/bin" + lib_link_dir="/usr/local/lib" + inc_link_dir="/usr/local/include" + + install_main_dir="/usr/local/Cellar/tdengine/${verNumber}" + + bin_dir="/usr/local/Cellar/tdengine/${verNumber}/bin" +fi + +service_config_dir="/etc/systemd/system" + +# Color setting +RED='\033[0;31m' +GREEN='\033[1;32m' +GREEN_DARK='\033[0;32m' +GREEN_UNDERLINE='\033[4;32m' +NC='\033[0m' + +csudo="" + +if [ "$osType" != "Darwin" ]; then + if command -v sudo > /dev/null; then + csudo="sudo" + fi + initd_mod=0 + service_mod=2 + if pidof systemd &> /dev/null; then + service_mod=0 + elif $(which service &> /dev/null); then + service_mod=1 + service_config_dir="/etc/init.d" + if $(which chkconfig &> /dev/null); then + initd_mod=1 + elif $(which insserv &> /dev/null); then + initd_mod=2 + elif $(which update-rc.d &> /dev/null); then + initd_mod=3 + else + service_mod=2 + fi + else + service_mod=2 + fi + + # get the operating system type for using the corresponding init file + # ubuntu/debian(deb), centos/fedora(rpm), others: opensuse, redhat, ..., no verification + #osinfo=$(awk -F= '/^NAME/{print $2}' /etc/os-release) + osinfo=$(cat /etc/os-release | grep "NAME" | cut -d '"' -f2) + #echo "osinfo: ${osinfo}" + os_type=0 + if echo $osinfo | grep -qwi "ubuntu" ; then + echo "this is ubuntu system" + os_type=1 + elif echo $osinfo | grep -qwi "debian" ; then + echo "this is debian system" + os_type=1 + elif echo $osinfo | grep -qwi "Kylin" ; then + echo "this is Kylin system" + os_type=1 + elif echo $osinfo | grep -qwi "centos" ; then + echo "this is centos system" + os_type=2 + elif echo $osinfo | grep -qwi "fedora" ; then + echo "this is fedora system" + os_type=2 + else + echo "${osinfo}: This is an officially unverified linux system, If there are any problems with the installation and operation, " + echo "please feel free to contact taosdata.com for support." + os_type=1 + fi +fi + +function kill_taosd() { + pid=$(ps -ef | grep "taosd" | grep -v "grep" | awk '{print $2}') + if [ -n "$pid" ]; then + ${csudo} kill -9 $pid || : + fi +} + +function install_main_path() { + #create install main dir and all sub dir + ${csudo} rm -rf ${install_main_dir} || : + ${csudo} mkdir -p ${install_main_dir} + ${csudo} mkdir -p ${install_main_dir}/cfg + ${csudo} mkdir -p ${install_main_dir}/bin + ${csudo} mkdir -p ${install_main_dir}/connector + ${csudo} mkdir -p ${install_main_dir}/driver + ${csudo} mkdir -p ${install_main_dir}/examples + ${csudo} mkdir -p ${install_main_dir}/include + if [ "$osType" != "Darwin" ]; then + ${csudo} mkdir -p ${install_main_dir}/init.d + fi +} + +function install_bin() { + # Remove links + ${csudo} rm -f ${bin_link_dir}/taos || : + ${csudo} rm -f ${bin_link_dir}/taosd || : + ${csudo} rm -f ${bin_link_dir}/taosdemo || : + ${csudo} rm -f ${bin_link_dir}/taosdump || : + + if [ "$osType" != "Darwin" ]; then + ${csudo} rm -f ${bin_link_dir}/perfMonitor || : + ${csudo} rm -f ${bin_link_dir}/set_core || : + ${csudo} rm -f ${bin_link_dir}/rmtaos || : + fi + + ${csudo} cp -r ${binary_dir}/build/bin/* ${install_main_dir}/bin || : + ${csudo} cp -r ${script_dir}/taosd-dump-cfg.gdb ${install_main_dir}/bin || : + + if [ "$osType" != "Darwin" ]; then + ${csudo} cp -r ${script_dir}/remove.sh ${install_main_dir}/bin || : + ${csudo} cp -r ${script_dir}/set_core.sh ${install_main_dir}/bin || : + ${csudo} cp -r ${script_dir}/startPre.sh ${install_main_dir}/bin || : + else + ${csudo} cp -r ${script_dir}/remove_client.sh ${install_main_dir}/bin || : + fi + ${csudo} chmod 0555 ${install_main_dir}/bin/* || : + + #Make link + [ -x ${install_main_dir}/bin/taos ] && ${csudo} ln -s ${install_main_dir}/bin/taos ${bin_link_dir}/taos || : + [ -x ${install_main_dir}/bin/taosd ] && ${csudo} ln -s ${install_main_dir}/bin/taosd ${bin_link_dir}/taosd || : + [ -x ${install_main_dir}/bin/taosdump ] && ${csudo} ln -s ${install_main_dir}/bin/taosdump ${bin_link_dir}/taosdump || : + [ -x ${install_main_dir}/bin/taosdemo ] && ${csudo} ln -s ${install_main_dir}/bin/taosdemo ${bin_link_dir}/taosdemo || : + + if [ "$osType" != "Darwin" ]; then + [ -x ${install_main_dir}/bin/perfMonitor ] && ${csudo} ln -s ${install_main_dir}/bin/perfMonitor ${bin_link_dir}/perfMonitor || : + [ -x ${install_main_dir}/set_core.sh ] && ${csudo} ln -s ${install_main_dir}/bin/set_core.sh ${bin_link_dir}/set_core || : + fi + + if [ "$osType" != "Darwin" ]; then + [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo} ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/rmtaos || : + fi +} + +function install_jemalloc() { + if [ "$osType" != "Darwin" ]; then + /usr/bin/install -c -d /usr/local/bin + + if [ -f ${binary_dir}/build/bin/jemalloc-config ]; then + /usr/bin/install -c -m 755 ${binary_dir}/build/bin/jemalloc-config /usr/local/bin + fi + if [ -f ${binary_dir}/build/bin/jemalloc.sh ]; then + /usr/bin/install -c -m 755 ${binary_dir}/build/bin/jemalloc.sh /usr/local/bin + fi + if [ -f ${binary_dir}/build/bin/jeprof ]; then + /usr/bin/install -c -m 755 ${binary_dir}/build/bin/jeprof /usr/local/bin + fi + if [ -f ${binary_dir}/build/include/jemalloc/jemalloc.h ]; then + /usr/bin/install -c -d /usr/local/include/jemalloc + /usr/bin/install -c -m 644 ${binary_dir}/build/include/jemalloc/jemalloc.h /usr/local/include/jemalloc + fi + if [ -f ${binary_dir}/build/lib/libjemalloc.so.2 ]; then + /usr/bin/install -c -d /usr/local/lib + /usr/bin/install -c -m 755 ${binary_dir}/build/lib/libjemalloc.so.2 /usr/local/lib + ln -sf libjemalloc.so.2 /usr/local/lib/libjemalloc.so + /usr/bin/install -c -d /usr/local/lib + if [ -f ${binary_dir}/build/lib/libjemalloc.a ]; then + /usr/bin/install -c -m 755 ${binary_dir}/build/lib/libjemalloc.a /usr/local/lib + fi + if [ -f ${binary_dir}/build/lib/libjemalloc_pic.a ]; then + /usr/bin/install -c -m 755 ${binary_dir}/build/lib/libjemalloc_pic.a /usr/local/lib + fi + if [ -f ${binary_dir}/build/lib/pkgconfig/jemalloc.pc ]; then + /usr/bin/install -c -d /usr/local/lib/pkgconfig + /usr/bin/install -c -m 644 ${binary_dir}/build/lib/pkgconfig/jemalloc.pc /usr/local/lib/pkgconfig + fi + fi + if [ -f ${binary_dir}/build/share/doc/jemalloc/jemalloc.html ]; then + /usr/bin/install -c -d /usr/local/share/doc/jemalloc + /usr/bin/install -c -m 644 ${binary_dir}/build/share/doc/jemalloc/jemalloc.html /usr/local/share/doc/jemalloc + fi + if [ -f ${binary_dir}/build/share/man/man3/jemalloc.3 ]; then + /usr/bin/install -c -d /usr/local/share/man/man3 + /usr/bin/install -c -m 644 ${binary_dir}/build/share/man/man3/jemalloc.3 /usr/local/share/man/man3 + fi + + if [ -d /etc/ld.so.conf.d ]; then + echo "/usr/local/lib" | ${csudo} tee /etc/ld.so.conf.d/jemalloc.conf + ${csudo} ldconfig + else + echo "/etc/ld.so.conf.d not found!" + fi + fi +} + +function install_lib() { + # Remove links + ${csudo} rm -f ${lib_link_dir}/libtaos.* || : + if [ "$osType" != "Darwin" ]; then + ${csudo} rm -f ${lib64_link_dir}/libtaos.* || : + fi + + if [ "$osType" != "Darwin" ]; then + ${csudo} cp ${binary_dir}/build/lib/libtaos.so ${install_main_dir}/driver/libtaos.so.${verNumber} && ${csudo} chmod 777 ${install_main_dir}/driver/* + ${csudo} ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.so.1 + ${csudo} ln -sf ${lib_link_dir}/libtaos.so.1 ${lib_link_dir}/libtaos.so + + if [ -d "${lib64_link_dir}" ]; then + ${csudo} ln -sf ${install_main_dir}/driver/libtaos.* ${lib64_link_dir}/libtaos.so.1 + ${csudo} ln -sf ${lib64_link_dir}/libtaos.so.1 ${lib64_link_dir}/libtaos.so + fi + else + ${csudo} cp -Rf ${binary_dir}/build/lib/libtaos.${verNumber}.dylib ${install_main_dir}/driver && ${csudo} chmod 777 ${install_main_dir}/driver/* + + ${csudo} ln -sf ${install_main_dir}/driver/libtaos.* ${lib_link_dir}/libtaos.1.dylib + ${csudo} ln -sf ${lib_link_dir}/libtaos.1.dylib ${lib_link_dir}/libtaos.dylib + fi + + install_jemalloc + + if [ "$osType" != "Darwin" ]; then + ${csudo} ldconfig + fi +} + +function install_header() { + + if [ "$osType" != "Darwin" ]; then + ${csudo} rm -f ${inc_link_dir}/taos.h ${inc_link_dir}/taoserror.h || : + fi + ${csudo} cp -f ${source_dir}/include/client/taos.h ${source_dir}/include/util/taoserror.h ${install_main_dir}/include && ${csudo} chmod 644 ${install_main_dir}/include/* + if [ "$osType" != "Darwin" ]; then + ${csudo} ln -s ${install_main_dir}/include/taos.h ${inc_link_dir}/taos.h + ${csudo} ln -s ${install_main_dir}/include/taoserror.h ${inc_link_dir}/taoserror.h + fi +} + +function install_config() { + #${csudo} rm -f ${install_main_dir}/cfg/taos.cfg || : + + if [ ! -f ${cfg_install_dir}/taos.cfg ]; then + ${csudo} mkdir -p ${cfg_install_dir} + [ -f ${script_dir}/../cfg/taos.cfg ] && + ${csudo} cp ${script_dir}/../cfg/taos.cfg ${cfg_install_dir} || : + ${csudo} chmod 644 ${cfg_install_dir}/* + fi + + ${csudo} cp -f ${script_dir}/../cfg/taos.cfg ${install_main_dir}/cfg/taos.cfg.org || : + + if [ "$osType" != "Darwin" ]; then ${csudo} ln -s ${cfg_install_dir}/taos.cfg ${install_main_dir}/cfg + fi +} + +function install_log() { + ${csudo} rm -rf ${log_dir} || : + ${csudo} mkdir -p ${log_dir} && ${csudo} chmod 777 ${log_dir} + ${csudo} ln -s ${log_dir} ${install_main_dir}/log +} + +function install_data() { + ${csudo} mkdir -p ${data_dir} + ${csudo} ln -s ${data_dir} ${install_main_dir}/data +} + +function install_connector() { + if [ -d "${source_dir}/src/connector/grafanaplugin/dist" ]; then + ${csudo} cp -rf ${source_dir}/src/connector/grafanaplugin/dist ${install_main_dir}/connector/grafanaplugin + else + echo "WARNING: grafanaplugin bundled dir not found, please check if want to use it!" + fi + if find ${source_dir}/src/connector/go -mindepth 1 -maxdepth 1 | read; then + ${csudo} cp -r ${source_dir}/src/connector/go ${install_main_dir}/connector + else + echo "WARNING: go connector not found, please check if want to use it!" + fi + ${csudo} cp -rf ${source_dir}/src/connector/python ${install_main_dir}/connector || : + ${csudo} cp ${binary_dir}/build/lib/*.jar ${install_main_dir}/connector &> /dev/null && ${csudo} chmod 777 ${install_main_dir}/connector/*.jar || echo &> /dev/null +} + +function install_examples() { + ${csudo} cp -rf ${source_dir}/tests/examples/* ${install_main_dir}/examples || : +} + +function clean_service_on_sysvinit() { + #restart_config_str="taos:2345:respawn:${service_config_dir}/taosd start" + #${csudo} sed -i "\|${restart_config_str}|d" /etc/inittab || : + + if pidof taosd &> /dev/null; then + ${csudo} service taosd stop || : + fi + + if ((${initd_mod}==1)); then + ${csudo} chkconfig --del taosd || : + elif ((${initd_mod}==2)); then + ${csudo} insserv -r taosd || : + elif ((${initd_mod}==3)); then + ${csudo} update-rc.d -f taosd remove || : + fi + + ${csudo} rm -f ${service_config_dir}/taosd || : + + if $(which init &> /dev/null); then + ${csudo} init q || : + fi +} + +function install_service_on_sysvinit() { + clean_service_on_sysvinit + + sleep 1 + + # Install taosd service + if ((${os_type}==1)); then + ${csudo} cp -f ${script_dir}/../deb/taosd ${install_main_dir}/init.d || : + ${csudo} cp ${script_dir}/../deb/taosd ${service_config_dir} && ${csudo} chmod a+x ${service_config_dir}/taosd || : + elif ((${os_type}==2)); then + ${csudo} cp -f ${script_dir}/../rpm/taosd ${install_main_dir}/init.d || : + ${csudo} cp ${script_dir}/../rpm/taosd ${service_config_dir} && ${csudo} chmod a+x ${service_config_dir}/taosd || : + fi + + #restart_config_str="taos:2345:respawn:${service_config_dir}/taosd start" + #${csudo} grep -q -F "$restart_config_str" /etc/inittab || ${csudo} bash -c "echo '${restart_config_str}' >> /etc/inittab" + + if ((${initd_mod}==1)); then + ${csudo} chkconfig --add taosd || : + ${csudo} chkconfig --level 2345 taosd on || : + elif ((${initd_mod}==2)); then + ${csudo} insserv taosd || : + ${csudo} insserv -d taosd || : + elif ((${initd_mod}==3)); then + ${csudo} update-rc.d taosd defaults || : + fi +} + +function clean_service_on_systemd() { + taosd_service_config="${service_config_dir}/taosd.service" + + if systemctl is-active --quiet taosd; then + echo "TDengine is running, stopping it..." + ${csudo} systemctl stop taosd &> /dev/null || echo &> /dev/null + fi + ${csudo} systemctl disable taosd &> /dev/null || echo &> /dev/null + + ${csudo} rm -f ${taosd_service_config} +} + +# taos:2345:respawn:/etc/init.d/taosd start + +function install_service_on_systemd() { + clean_service_on_systemd + + taosd_service_config="${service_config_dir}/taosd.service" + + ${csudo} bash -c "echo '[Unit]' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'Description=TDengine server service' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'After=network-online.target' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'Wants=network-online.target' >> ${taosd_service_config}" + ${csudo} bash -c "echo >> ${taosd_service_config}" + ${csudo} bash -c "echo '[Service]' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'Type=simple' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'ExecStart=/usr/bin/taosd' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'ExecStartPre=/usr/local/taos/bin/startPre.sh' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'TimeoutStopSec=1000000s' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'LimitNOFILE=infinity' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'LimitNPROC=infinity' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'LimitCORE=infinity' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'TimeoutStartSec=0' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'StandardOutput=null' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'Restart=always' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'StartLimitBurst=3' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'StartLimitInterval=60s' >> ${taosd_service_config}" + ${csudo} bash -c "echo >> ${taosd_service_config}" + ${csudo} bash -c "echo '[Install]' >> ${taosd_service_config}" + ${csudo} bash -c "echo 'WantedBy=multi-user.target' >> ${taosd_service_config}" + ${csudo} systemctl enable taosd +} + +function install_service() { + if ((${service_mod}==0)); then + install_service_on_systemd + elif ((${service_mod}==1)); then + install_service_on_sysvinit + else + # must manual stop taosd + kill_taosd + fi +} + +function update_TDengine() { + echo -e "${GREEN}Start to update TDengine...${NC}" + # Stop the service if running + + if [ "$osType" != "Darwin" ]; then + if pidof taosd &> /dev/null; then + if ((${service_mod}==0)); then + ${csudo} systemctl stop taosd || : + elif ((${service_mod}==1)); then + ${csudo} service taosd stop || : + else + kill_taosd + fi + sleep 1 + fi + fi + + install_main_path + + install_log + install_header + install_lib + install_connector + install_examples + install_bin + + if [ "$osType" != "Darwin" ]; then + install_service + fi + + install_config + + if [ "$osType" != "Darwin" ]; then + echo + echo -e "\033[44;32;1mTDengine is updated successfully!${NC}" + echo + + echo -e "${GREEN_DARK}To configure TDengine ${NC}: edit /etc/taos/taos.cfg" + if ((${service_mod}==0)); then + echo -e "${GREEN_DARK}To start TDengine ${NC}: ${csudo} systemctl start taosd${NC}" + elif ((${service_mod}==1)); then + echo -e "${GREEN_DARK}To start TDengine ${NC}: ${csudo} service taosd start${NC}" + else + echo -e "${GREEN_DARK}To start TDengine ${NC}: ./taosd${NC}" + fi + + echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}" + echo + echo -e "\033[44;32;1mTDengine is updated successfully!${NC}" + else + echo + echo -e "\033[44;32;1mTDengine Client is updated successfully!${NC}" + echo + + echo -e "${GREEN_DARK}To access TDengine Client ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}" + echo + echo -e "\033[44;32;1mTDengine Client is updated successfully!${NC}" + fi +} + +function install_TDengine() { + # Start to install + if [ "$osType" != "Darwin" ]; then + echo -e "${GREEN}Start to install TDEngine...${NC}" + else + echo -e "${GREEN}Start to install TDEngine Client ...${NC}" + fi + + install_main_path + + install_data + install_log + install_header + install_lib + install_connector + install_examples + install_bin + + if [ "$osType" != "Darwin" ]; then + install_service + fi + + install_config + + if [ "$osType" != "Darwin" ]; then + # Ask if to start the service + echo + echo -e "\033[44;32;1mTDengine is installed successfully!${NC}" + echo + echo -e "${GREEN_DARK}To configure TDengine ${NC}: edit /etc/taos/taos.cfg" + if ((${service_mod}==0)); then + echo -e "${GREEN_DARK}To start TDengine ${NC}: ${csudo} systemctl start taosd${NC}" + elif ((${service_mod}==1)); then + echo -e "${GREEN_DARK}To start TDengine ${NC}: ${csudo} service taosd start${NC}" + else + echo -e "${GREEN_DARK}To start TDengine ${NC}: ./taosd${NC}" + fi + + echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}" + echo + echo -e "\033[44;32;1mTDengine is installed successfully!${NC}" + else + echo -e "${GREEN_DARK}To access TDengine ${NC}: use ${GREEN_UNDERLINE}taos${NC} in shell${NC}" + echo + echo -e "\033[44;32;1mTDengine Client is installed successfully!${NC}" + fi +} + +## ==============================Main program starts from here============================ +echo source directory: $1 +echo binary directory: $2 +echo $bin_dir +if [ -x ${bin_dir}/taos ]; then + update_TDengine +else + install_TDengine +fi diff --git a/packaging/release.sh b/packaging/release.sh index 885d73c33b7f47087bf74ce2b22b0ccc03d80541..adf1195e5654bc48a021362c7e82426a2a4e8f11 100755 --- a/packaging/release.sh +++ b/packaging/release.sh @@ -64,11 +64,11 @@ cp ${install_files} ${install_dir} header_files="${top_dir}/include/client/taos.h ${top_dir}/include/util/taoserror.h" cp ${header_files} ${install_dir}/inc -bin_files="${compile_dir}/source/dnode/mgmt/taosd ${compile_dir}/tools/shell/taos ${compile_dir}/tests/test/c/create_table ${compile_dir}/tests/test/c/tmq_sim ${script_dir}/remove.sh" +bin_files="${compile_dir}/build/bin/taosd ${compile_dir}/build/bin/taos ${compile_dir}/build/bin/create_table ${compile_dir}/build/bin/tmq_sim ${script_dir}/remove.sh" cp ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || : -cp ${compile_dir}/source/client/libtaos.so ${install_dir}/lib/ -cp ${compile_dir}/source/libs/tdb/libtdb.so ${install_dir}/lib/ +cp ${compile_dir}/build/lib/libtaos.so ${install_dir}/lib/ +cp ${compile_dir}/build/lib/libtdb.so ${install_dir}/lib/ taostoolfile="${top_dir}/tools/taosTools-1.4.1-Linux-x64.tar.gz" cp ${taostoolfile} ${install_dir}/taos-tools diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c index 925197d708ff15464df3835e55f98a38dc2861f1..7eb08a8f4fac86f5202e9419152ec7c7f7ae9d68 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c @@ -83,9 +83,9 @@ int32_t vmProcessGetVnodeLoadsReq(SMgmtWrapper *pWrapper, SNodeMsg *pReq) { static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) { pCfg->vgId = pCreate->vgId; - pCfg->wsize = pCreate->cacheBlockSize; - pCfg->ssize = pCreate->cacheBlockSize; - pCfg->lsize = pCreate->cacheBlockSize; + pCfg->wsize = pCreate->cacheBlockSize * 1024 * 1024; + pCfg->ssize = 1024; + pCfg->lsize = 1024 * 1024; pCfg->isHeapAllocator = true; pCfg->ttl = 4; pCfg->keep = pCreate->daysToKeep0; @@ -96,13 +96,12 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) { pCfg->tsdbCfg.keep1 = pCreate->daysToKeep0; pCfg->tsdbCfg.lruCacheSize = pCreate->cacheBlockSize; pCfg->tsdbCfg.retentions = pCreate->pRetensions; - pCfg->metaCfg.lruSize = pCreate->cacheBlockSize; - pCfg->walCfg.fsyncPeriod = pCreate->fsyncPeriod; - pCfg->walCfg.level = pCreate->walLevel; - pCfg->walCfg.retentionPeriod = 10; - pCfg->walCfg.retentionSize = 128; - pCfg->walCfg.rollPeriod = 128; - pCfg->walCfg.segSize = 128; + pCfg->walCfg.level = TAOS_WAL_WRITE; + pCfg->walCfg.fsyncPeriod = 0; + pCfg->walCfg.retentionPeriod = 0; + pCfg->walCfg.retentionSize = 0; + pCfg->walCfg.rollPeriod = 0; + pCfg->walCfg.segSize = 0; pCfg->walCfg.vgId = pCreate->vgId; pCfg->hashBegin = pCreate->hashBegin; pCfg->hashEnd = pCreate->hashEnd; @@ -160,13 +159,10 @@ int32_t vmProcessCreateVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) { msgCb.queueFps[APPLY_QUEUE] = vmPutMsgToApplyQueue; msgCb.qsizeFp = vmGetQueueSize; - vnodeCfg.msgCb = msgCb; - vnodeCfg.pTfs = pMgmt->pTfs; - vnodeCfg.dbId = wrapperCfg.dbUid; - SVnode *pImpl = vnodeOpen(wrapperCfg.path, &vnodeCfg); + SVnode *pImpl = vnodeOpen(path, pMgmt->pTfs, msgCb); if (pImpl == NULL) { - tFreeSCreateVnodeReq(&createReq); dError("vgId:%d, failed to create vnode since %s", createReq.vgId, terrstr()); + tFreeSCreateVnodeReq(&createReq); return -1; } @@ -175,7 +171,7 @@ int32_t vmProcessCreateVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) { tFreeSCreateVnodeReq(&createReq); dError("vgId:%d, failed to open vnode since %s", createReq.vgId, terrstr()); vnodeClose(pImpl); - vnodeDestroy(wrapperCfg.path); + vnodeDestroy(path, pMgmt->pTfs); terrno = code; return code; } @@ -184,7 +180,7 @@ int32_t vmProcessCreateVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) { if (code != 0) { tFreeSCreateVnodeReq(&createReq); vnodeClose(pImpl); - vnodeDestroy(wrapperCfg.path); + vnodeDestroy(path, pMgmt->pTfs); terrno = code; return code; } diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c index 1b8e0eb961e4d43800557a16ee8c9c212f422eb2..bf33e85b959c3b786600571ebae8ea7728c9895c 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmInt.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmInt.c @@ -84,6 +84,8 @@ int32_t vmOpenVnode(SVnodesMgmt *pMgmt, SWrapperCfg *pCfg, SVnode *pImpl) { } void vmCloseVnode(SVnodesMgmt *pMgmt, SVnodeObj *pVnode) { + char path[TSDB_FILENAME_LEN]; + taosWLockLatch(&pMgmt->latch); taosHashRemove(pMgmt->hash, &pVnode->vgId, sizeof(int32_t)); taosWUnLockLatch(&pMgmt->latch); @@ -104,7 +106,8 @@ void vmCloseVnode(SVnodesMgmt *pMgmt, SVnodeObj *pVnode) { if (pVnode->dropped) { dDebug("vgId:%d, vnode is destroyed for dropped:%d", pVnode->vgId, pVnode->dropped); - vnodeDestroy(pVnode->path); + snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, pVnode->vgId); + vnodeDestroy(path, pMgmt->pTfs); } taosMemoryFree(pVnode->path); @@ -116,6 +119,7 @@ static void *vmOpenVnodeFunc(void *param) { SVnodeThread *pThread = param; SVnodesMgmt *pMgmt = pThread->pMgmt; SDnode *pDnode = pMgmt->pDnode; + char path[TSDB_FILENAME_LEN]; dDebug("thread:%d, start to open %d vnodes", pThread->threadIndex, pThread->vnodeNum); setThreadName("open-vnodes"); @@ -134,8 +138,8 @@ static void *vmOpenVnodeFunc(void *param) { msgCb.queueFps[FETCH_QUEUE] = vmPutMsgToFetchQueue; msgCb.queueFps[APPLY_QUEUE] = vmPutMsgToApplyQueue; msgCb.qsizeFp = vmGetQueueSize; - SVnodeCfg cfg = {.msgCb = msgCb, .pTfs = pMgmt->pTfs, .vgId = pCfg->vgId, .dbId = pCfg->dbUid}; - SVnode *pImpl = vnodeOpen(pCfg->path, &cfg); + snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, pCfg->vgId); + SVnode *pImpl = vnodeOpen(path, pMgmt->pTfs, msgCb); if (pImpl == NULL) { dError("vgId:%d, failed to open vnode by thread:%d", pCfg->vgId, pThread->threadIndex); pThread->failed++; diff --git a/source/dnode/vnode/inc/vnode.h b/source/dnode/vnode/inc/vnode.h index 74ea742a708642fc2d65d439ed87d82fef55ca6d..86e876ecbaf479f2134249e5733c5b8bad805630 100644 --- a/source/dnode/vnode/inc/vnode.h +++ b/source/dnode/vnode/inc/vnode.h @@ -37,16 +37,14 @@ extern "C" { // vnode typedef struct SVnode SVnode; -typedef struct SMetaCfg SMetaCfg; // todo: remove typedef struct STsdbCfg STsdbCfg; // todo: remove -typedef struct STqCfg STqCfg; // todo: remove typedef struct SVnodeCfg SVnodeCfg; int vnodeInit(int nthreads); void vnodeCleanup(); int vnodeCreate(const char *path, SVnodeCfg *pCfg, STfs *pTfs); -void vnodeDestroy(const char *path); -SVnode *vnodeOpen(const char *path, const SVnodeCfg *pVnodeCfg); +void vnodeDestroy(const char *path, STfs *pTfs); +SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb); void vnodeClose(SVnode *pVnode); void vnodePreprocessWriteReqs(SVnode *pVnode, SArray *pMsgs); int vnodeProcessWriteReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp); @@ -133,14 +131,9 @@ struct STsdbCfg { SArray *retentions; }; -struct STqCfg { - int32_t reserved; -}; - struct SVnodeCfg { int32_t vgId; uint64_t dbId; - STfs *pTfs; uint64_t wsize; uint64_t ssize; uint64_t lsize; @@ -150,10 +143,7 @@ struct SVnodeCfg { int8_t streamMode; bool isWeak; STsdbCfg tsdbCfg; - SMetaCfg metaCfg; - STqCfg tqCfg; SWalCfg walCfg; - SMsgCb msgCb; uint32_t hashBegin; uint32_t hashEnd; int8_t hashMethod; diff --git a/source/dnode/vnode/src/inc/meta.h b/source/dnode/vnode/src/inc/meta.h index 94a1266f46a3f63a95982680a7d628523108091e..f30696c9ac2e31723a28014cb64491eb9747d293 100644 --- a/source/dnode/vnode/src/inc/meta.h +++ b/source/dnode/vnode/src/inc/meta.h @@ -40,7 +40,7 @@ typedef struct SMSmaCursor SMSmaCursor; #define META_CHILD_TABLE TD_CHILD_TABLE #define META_NORMAL_TABLE TD_NORMAL_TABLE -SMeta* metaOpen(const char* path, const SMetaCfg* pMetaCfg, SMemAllocatorFactory* pMAF); +SMeta* metaOpen(const char* path, SMemAllocatorFactory* pMAF); void metaClose(SMeta* pMeta); void metaRemove(const char* path); int metaCreateTable(SMeta* pMeta, STbCfg* pTbCfg); @@ -97,7 +97,6 @@ tb_uid_t metaGenerateUid(SMeta* pMeta); struct SMeta { char* path; SVnode* pVnode; - SMetaCfg options; SMetaDB* pDB; SMetaIdx* pIdx; SMetaCache* pCache; diff --git a/source/dnode/vnode/src/inc/tq.h b/source/dnode/vnode/src/inc/tq.h index ce81006661b7529f7526d27f8a66bba3a26cccbc..ed33473b1620102b1eacc1d7786f7a8f610f9b36 100644 --- a/source/dnode/vnode/src/inc/tq.h +++ b/source/dnode/vnode/src/inc/tq.h @@ -160,7 +160,6 @@ struct STQ { // the handle of meta kvstore bool writeTrigger; char* path; - STqCfg* tqConfig; STqMemRef tqMemRef; STqMetaStore* tqMeta; // STqPushMgr* tqPushMgr; @@ -251,8 +250,7 @@ int tqInit(); void tqCleanUp(); // open in each vnode -STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal, SMeta* pMeta, STqCfg* tqConfig, - SMemAllocatorFactory* allocFac); +STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal, SMeta* pMeta, SMemAllocatorFactory* allocFac); void tqClose(STQ*); // required by vnode int tqPushMsg(STQ*, void* msg, int32_t msgLen, tmsg_t msgType, int64_t version); diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index e95878b04e3b88f42de31135d0d295344c1a3037..a765f5e88a56953ccc00c4234aa8beae7457ea37 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -80,10 +80,11 @@ struct SVnodeInfo { }; struct SVnode { - int32_t vgId; char* path; SVnodeCfg config; SVState state; + STfs* pTfs; + SMsgCb msgCb; SVBufPool* pBufPool; SMeta* pMeta; STsdb* pTsdb; @@ -92,10 +93,10 @@ struct SVnode { SSink* pSink; tsem_t canCommit; SQHandle* pQuery; - SMsgCb msgCb; - STfs* pTfs; }; +#define TD_VID(PVNODE) (PVNODE)->config.vgId + // sma void smaHandleRes(void* pVnode, int64_t smaId, const SArray* data); diff --git a/source/dnode/vnode/src/meta/metaMain.c b/source/dnode/vnode/src/meta/metaMain.c index dd60e56371bd3b2f589a75823504eba2492ecaa9..879a7e8a6fc46b9c5ea9336a9aee3d8798d2cf32 100644 --- a/source/dnode/vnode/src/meta/metaMain.c +++ b/source/dnode/vnode/src/meta/metaMain.c @@ -17,16 +17,16 @@ #include "vnodeInt.h" -static SMeta *metaNew(const char *path, const SMetaCfg *pMetaCfg, SMemAllocatorFactory *pMAF); +static SMeta *metaNew(const char *path, SMemAllocatorFactory *pMAF); static void metaFree(SMeta *pMeta); static int metaOpenImpl(SMeta *pMeta); static void metaCloseImpl(SMeta *pMeta); -SMeta *metaOpen(const char *path, const SMetaCfg *pMetaCfg, SMemAllocatorFactory *pMAF) { +SMeta *metaOpen(const char *path, SMemAllocatorFactory *pMAF) { SMeta *pMeta = NULL; // Allocate handle - pMeta = metaNew(path, pMetaCfg, pMAF); + pMeta = metaNew(path, pMAF); if (pMeta == NULL) { // TODO: handle error return NULL; @@ -54,7 +54,7 @@ void metaClose(SMeta *pMeta) { void metaRemove(const char *path) { taosRemoveDir(path); } /* ------------------------ STATIC METHODS ------------------------ */ -static SMeta *metaNew(const char *path, const SMetaCfg *pMetaCfg, SMemAllocatorFactory *pMAF) { +static SMeta *metaNew(const char *path, SMemAllocatorFactory *pMAF) { SMeta *pMeta; size_t psize = strlen(path); diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index bfcc5dd2bb78db54ec7162c682ddf639c0fd760a..0aa6023eaf39cedb77bd8344dea3c1bae2aac8d4 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -19,15 +19,13 @@ int32_t tqInit() { return tqPushMgrInit(); } void tqCleanUp() { tqPushMgrCleanUp(); } -STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal, SMeta* pVnodeMeta, STqCfg* tqConfig, - SMemAllocatorFactory* allocFac) { +STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal, SMeta* pVnodeMeta, SMemAllocatorFactory* allocFac) { STQ* pTq = taosMemoryMalloc(sizeof(STQ)); if (pTq == NULL) { terrno = TSDB_CODE_TQ_OUT_OF_MEMORY; return NULL; } pTq->path = strdup(path); - pTq->tqConfig = tqConfig; pTq->pVnode = pVnode; pTq->pWal = pWal; pTq->pVnodeMeta = pVnodeMeta; @@ -267,7 +265,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { } vDebug("tmq poll: consumer %ld (epoch %d) recv poll req in vg %d, req %ld %ld", consumerId, pReq->epoch, - pTq->pVnode->vgId, pReq->currentOffset, fetchOffset); + TD_VID(pTq->pVnode), pReq->currentOffset, fetchOffset); SMqPollRsp rsp = { /*.consumerId = consumerId,*/ @@ -277,7 +275,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { STqConsumer* pConsumer = tqHandleGet(pTq->tqMeta, consumerId); if (pConsumer == NULL) { - vWarn("tmq poll: consumer %ld (epoch %d) not found in vg %d", consumerId, pReq->epoch, pTq->pVnode->vgId); + vWarn("tmq poll: consumer %ld (epoch %d) not found in vg %d", consumerId, pReq->epoch, TD_VID(pTq->pVnode)); pMsg->pCont = NULL; pMsg->contLen = 0; pMsg->code = -1; @@ -303,7 +301,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { } if (pTopic == NULL) { vWarn("tmq poll: consumer %ld (epoch %d) topic %s not found in vg %d", consumerId, pReq->epoch, pReq->topic, - pTq->pVnode->vgId); + TD_VID(pTq->pVnode)); pMsg->pCont = NULL; pMsg->contLen = 0; pMsg->code = -1; @@ -312,7 +310,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { } vDebug("poll topic %s from consumer %ld (epoch %d) vg %d", pTopic->topicName, consumerId, pReq->epoch, - pTq->pVnode->vgId); + TD_VID(pTq->pVnode)); rsp.reqOffset = pReq->currentOffset; rsp.skipLogNum = 0; @@ -323,7 +321,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { consumerEpoch = atomic_load_32(&pConsumer->epoch); if (consumerEpoch > reqEpoch) { vDebug("tmq poll: consumer %ld (epoch %d) vg %d offset %ld, found new consumer epoch %d discard req epoch %d", - consumerId, pReq->epoch, pTq->pVnode->vgId, fetchOffset, consumerEpoch, reqEpoch); + consumerId, pReq->epoch, TD_VID(pTq->pVnode), fetchOffset, consumerEpoch, reqEpoch); break; } SWalReadHead* pHead; @@ -332,11 +330,11 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { // if data inserted during waiting, launch query and // response to user vDebug("tmq poll: consumer %ld (epoch %d) vg %d offset %ld, no more log to return", consumerId, pReq->epoch, - pTq->pVnode->vgId, fetchOffset); + TD_VID(pTq->pVnode), fetchOffset); break; } vDebug("tmq poll: consumer %ld (epoch %d) iter log, vg %d offset %ld msgType %d", consumerId, pReq->epoch, - pTq->pVnode->vgId, fetchOffset, pHead->msgType); + TD_VID(pTq->pVnode), fetchOffset, pHead->msgType); /*int8_t pos = fetchOffset % TQ_BUFFER_SIZE;*/ /*pHead = pTopic->pReadhandle->pHead;*/ if (pHead->msgType == TDMT_VND_SUBMIT) { @@ -361,7 +359,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { if (taosArrayGetSize(pRes) == 0) { vDebug("tmq poll: consumer %ld (epoch %d) iter log, vg %d skip log %ld since not wanted", consumerId, - pReq->epoch, pTq->pVnode->vgId, fetchOffset); + pReq->epoch, TD_VID(pTq->pVnode), fetchOffset); fetchOffset++; rsp.skipLogNum++; taosArrayDestroy(pRes); @@ -390,7 +388,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { pMsg->pCont = buf; pMsg->contLen = tlen; pMsg->code = 0; - vDebug("vg %d offset %ld msgType %d from consumer %ld (epoch %d) actual rsp", pTq->pVnode->vgId, fetchOffset, + vDebug("vg %d offset %ld msgType %d from consumer %ld (epoch %d) actual rsp", TD_VID(pTq->pVnode), fetchOffset, pHead->msgType, consumerId, pReq->epoch); tmsgSendRsp(pMsg); taosMemoryFree(pHead); @@ -422,7 +420,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { pMsg->contLen = tlen; pMsg->code = 0; tmsgSendRsp(pMsg); - vDebug("vg %d offset %ld from consumer %ld (epoch %d) not rsp", pTq->pVnode->vgId, fetchOffset, consumerId, + vDebug("vg %d offset %ld from consumer %ld (epoch %d) not rsp", TD_VID(pTq->pVnode), fetchOffset, consumerId, pReq->epoch); /*}*/ @@ -446,14 +444,14 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { } vDebug("tmq poll: consumer %ld (epoch %d) recv poll req in vg %d, req %ld %ld", consumerId, pReq->epoch, - pTq->pVnode->vgId, pReq->currentOffset, fetchOffset); + TD_VID(pTq->pVnode), pReq->currentOffset, fetchOffset); SMqPollRspV2 rspV2 = {0}; rspV2.dataLen = 0; STqConsumer* pConsumer = tqHandleGet(pTq->tqMeta, consumerId); if (pConsumer == NULL) { - vWarn("tmq poll: consumer %ld (epoch %d) not found in vg %d", consumerId, pReq->epoch, pTq->pVnode->vgId); + vWarn("tmq poll: consumer %ld (epoch %d) not found in vg %d", consumerId, pReq->epoch, TD_VID(pTq->pVnode)); pMsg->pCont = NULL; pMsg->contLen = 0; pMsg->code = -1; @@ -479,7 +477,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { } if (pTopic == NULL) { vWarn("tmq poll: consumer %ld (epoch %d) topic %s not found in vg %d", consumerId, pReq->epoch, pReq->topic, - pTq->pVnode->vgId); + TD_VID(pTq->pVnode)); pMsg->pCont = NULL; pMsg->contLen = 0; pMsg->code = -1; @@ -488,7 +486,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { } vDebug("poll topic %s from consumer %ld (epoch %d) vg %d", pTopic->topicName, consumerId, pReq->epoch, - pTq->pVnode->vgId); + TD_VID(pTq->pVnode)); rspV2.reqOffset = pReq->currentOffset; rspV2.skipLogNum = 0; @@ -499,7 +497,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { consumerEpoch = atomic_load_32(&pConsumer->epoch); if (consumerEpoch > reqEpoch) { vDebug("tmq poll: consumer %ld (epoch %d) vg %d offset %ld, found new consumer epoch %d discard req epoch %d", - consumerId, pReq->epoch, pTq->pVnode->vgId, fetchOffset, consumerEpoch, reqEpoch); + consumerId, pReq->epoch, TD_VID(pTq->pVnode), fetchOffset, consumerEpoch, reqEpoch); break; } SWalReadHead* pHead; @@ -508,11 +506,11 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { // if data inserted during waiting, launch query and // response to user vDebug("tmq poll: consumer %ld (epoch %d) vg %d offset %ld, no more log to return", consumerId, pReq->epoch, - pTq->pVnode->vgId, fetchOffset); + TD_VID(pTq->pVnode), fetchOffset); break; } vDebug("tmq poll: consumer %ld (epoch %d) iter log, vg %d offset %ld msgType %d", consumerId, pReq->epoch, - pTq->pVnode->vgId, fetchOffset, pHead->msgType); + TD_VID(pTq->pVnode), fetchOffset, pHead->msgType); /*int8_t pos = fetchOffset % TQ_BUFFER_SIZE;*/ /*pHead = pTopic->pReadhandle->pHead;*/ if (pHead->msgType == TDMT_VND_SUBMIT) { @@ -537,7 +535,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { if (taosArrayGetSize(pRes) == 0) { vDebug("tmq poll: consumer %ld (epoch %d) iter log, vg %d skip log %ld since not wanted", consumerId, - pReq->epoch, pTq->pVnode->vgId, fetchOffset); + pReq->epoch, TD_VID(pTq->pVnode), fetchOffset); fetchOffset++; rspV2.skipLogNum++; taosArrayDestroy(pRes); @@ -597,7 +595,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { pMsg->pCont = buf; pMsg->contLen = msgLen; pMsg->code = 0; - vDebug("vg %d offset %ld msgType %d from consumer %ld (epoch %d) actual rsp", pTq->pVnode->vgId, fetchOffset, + vDebug("vg %d offset %ld msgType %d from consumer %ld (epoch %d) actual rsp", TD_VID(pTq->pVnode), fetchOffset, pHead->msgType, consumerId, pReq->epoch); tmsgSendRsp(pMsg); taosMemoryFree(pHead); @@ -631,7 +629,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg, int32_t workerId) { pMsg->contLen = tlen; pMsg->code = 0; tmsgSendRsp(pMsg); - vDebug("vg %d offset %ld from consumer %ld (epoch %d) not rsp", pTq->pVnode->vgId, fetchOffset, consumerId, + vDebug("vg %d offset %ld from consumer %ld (epoch %d) not rsp", TD_VID(pTq->pVnode), fetchOffset, consumerId, pReq->epoch); /*}*/ @@ -742,7 +740,7 @@ int32_t tqProcessSetConnReq(STQ* pTq, char* msg) { pTopic->buffer.output[i].task = qCreateStreamExecTaskInfo(req.qmsg, &handle); ASSERT(pTopic->buffer.output[i].task); } - vDebug("set topic %s to consumer %ld on vg %d", pTopic->topicName, req.consumerId, pTq->pVnode->vgId); + vDebug("set topic %s to consumer %ld on vg %d", pTopic->topicName, req.consumerId, TD_VID(pTq->pVnode)); taosArrayPush(pConsumer->topics, pTopic); if (create) { tqHandleMovePut(pTq->tqMeta, req.consumerId, pConsumer); diff --git a/source/dnode/vnode/src/vnd/vnodeCommit.c b/source/dnode/vnode/src/vnd/vnodeCommit.c index fa249d3ba1fe6323e0ca9af8f2d9d4f496aceac6..3ece3c054e97b8019d571b169675cceecc575570 100644 --- a/source/dnode/vnode/src/vnd/vnodeCommit.c +++ b/source/dnode/vnode/src/vnd/vnodeCommit.c @@ -108,7 +108,7 @@ int vnodeLoadInfo(const char *dir, SVnodeInfo *pInfo) { goto _err; } - pData = taosMemoryMalloc(size); + pData = taosMemoryMalloc(size + 1); if (pData == NULL) { terrno = TSDB_CODE_OUT_OF_MEMORY; goto _err; @@ -119,6 +119,8 @@ int vnodeLoadInfo(const char *dir, SVnodeInfo *pInfo) { goto _err; } + pData[size] = '\0'; + taosCloseFile(&pFile); // decode info @@ -202,6 +204,16 @@ static int vnodeEncodeConfig(const void *pObj, SJson *pJson) { if (tjsonAddIntegerToObject(pJson, "keep1", pCfg->tsdbCfg.keep1) < 0) return -1; if (tjsonAddIntegerToObject(pJson, "keep2", pCfg->tsdbCfg.keep2) < 0) return -1; if (tjsonAddIntegerToObject(pJson, "lruCacheSize", pCfg->tsdbCfg.lruCacheSize) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "wal.vgId", pCfg->walCfg.vgId) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "wal.fsyncPeriod", pCfg->walCfg.fsyncPeriod) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "wal.retentionPeriod", pCfg->walCfg.retentionPeriod) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "wal.rollPeriod", pCfg->walCfg.rollPeriod) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "wal.retentionSize", pCfg->walCfg.retentionSize) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "wal.segSize", pCfg->walCfg.segSize) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "wal.level", pCfg->walCfg.level) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "hashBegin", pCfg->hashBegin) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "hashEnd", pCfg->hashEnd) < 0) return -1; + if (tjsonAddIntegerToObject(pJson, "hashMethod", pCfg->hashMethod) < 0) return -1; return 0; } @@ -229,6 +241,16 @@ static int vnodeDecodeConfig(const SJson *pJson, void *pObj) { if (tjsonGetNumberValue(pJson, "keep1", pCfg->tsdbCfg.keep1) < 0) return -1; if (tjsonGetNumberValue(pJson, "keep2", pCfg->tsdbCfg.keep2) < 0) return -1; if (tjsonGetNumberValue(pJson, "lruCacheSize", pCfg->tsdbCfg.lruCacheSize) < 0) return -1; + if (tjsonGetNumberValue(pJson, "wal.vgId", pCfg->walCfg.vgId) < 0) return -1; + if (tjsonGetNumberValue(pJson, "wal.fsyncPeriod", pCfg->walCfg.fsyncPeriod) < 0) return -1; + if (tjsonGetNumberValue(pJson, "wal.retentionPeriod", pCfg->walCfg.retentionPeriod) < 0) return -1; + if (tjsonGetNumberValue(pJson, "wal.rollPeriod", pCfg->walCfg.rollPeriod) < 0) return -1; + if (tjsonGetNumberValue(pJson, "wal.retentionSize", pCfg->walCfg.retentionSize) < 0) return -1; + if (tjsonGetNumberValue(pJson, "wal.segSize", pCfg->walCfg.segSize) < 0) return -1; + if (tjsonGetNumberValue(pJson, "wal.level", pCfg->walCfg.level) < 0) return -1; + if (tjsonGetNumberValue(pJson, "hashBegin", pCfg->hashBegin) < 0) return -1; + if (tjsonGetNumberValue(pJson, "hashEnd", pCfg->hashEnd) < 0) return -1; + if (tjsonGetNumberValue(pJson, "hashMethod", pCfg->hashMethod) < 0) return -1; return 0; } @@ -286,7 +308,7 @@ _err: static int vnodeDecodeInfo(uint8_t *pData, SVnodeInfo *pInfo) { SJson *pJson = NULL; - pJson = tjsonCreateObject(); + pJson = tjsonParse(pData); if (pJson == NULL) { return -1; } diff --git a/source/dnode/vnode/src/vnd/vnodeOpen.c b/source/dnode/vnode/src/vnd/vnodeOpen.c index 241c26ab1c38f6ef54d85da35d2b7bb113c2b050..e7aeb75ea5ebfc3e346fb23d8c65223ed83f1332 100644 --- a/source/dnode/vnode/src/vnd/vnodeOpen.c +++ b/source/dnode/vnode/src/vnd/vnodeOpen.c @@ -15,10 +15,8 @@ #include "vnodeInt.h" -static SVnode *vnodeNew(const char *path, const SVnodeCfg *pVnodeCfg); -static void vnodeFree(SVnode *pVnode); -static int vnodeOpenImpl(SVnode *pVnode); -static void vnodeCloseImpl(SVnode *pVnode); +static int vnodeOpenImpl(SVnode *pVnode); +static void vnodeCloseImpl(SVnode *pVnode); int vnodeCreate(const char *path, SVnodeCfg *pCfg, STfs *pTfs) { SVnodeInfo info = {0}; @@ -51,37 +49,41 @@ int vnodeCreate(const char *path, SVnodeCfg *pCfg, STfs *pTfs) { return 0; } -SVnode *vnodeOpen(const char *path, const SVnodeCfg *pVnodeCfg) { - SVnode *pVnode = NULL; - - // Set default options - SVnodeCfg cfg = vnodeCfgDefault; - if (pVnodeCfg != NULL) { - cfg.vgId = pVnodeCfg->vgId; - cfg.msgCb = pVnodeCfg->msgCb; - cfg.pTfs = pVnodeCfg->pTfs; - cfg.dbId = pVnodeCfg->dbId; - cfg.hashBegin = pVnodeCfg->hashBegin; - cfg.hashEnd = pVnodeCfg->hashEnd; - cfg.hashMethod = pVnodeCfg->hashMethod; - } +void vnodeDestroy(const char *path, STfs *pTfs) { tfsRmdir(pTfs, path); } + +SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb) { + SVnode *pVnode = NULL; + SVnodeInfo info = {0}; + char dir[TSDB_FILENAME_LEN]; + int ret; - // Validate options - if (vnodeCheckCfg(&cfg) < 0) { - // TODO + snprintf(dir, TSDB_FILENAME_LEN, "%s%s%s", tfsGetPrimaryPath(pTfs), TD_DIRSEP, path); + + // load vnode info + ret = vnodeLoadInfo(dir, &info); + if (ret < 0) { + vError("failed to open vnode from %s since %s", path, tstrerror(terrno)); return NULL; } - // Create the handle - pVnode = vnodeNew(path, &cfg); + // create handle + pVnode = (SVnode *)taosMemoryCalloc(1, sizeof(*pVnode)); if (pVnode == NULL) { - // TODO: handle error + terrno = TSDB_CODE_OUT_OF_MEMORY; + vError("vgId: %d failed to open vnode since %s", info.config.vgId, tstrerror(terrno)); return NULL; } - taosMkDir(path); + pVnode->path = strdup(dir); + pVnode->config = info.config; + pVnode->state.committed = info.state.committed; + pVnode->state.processed = pVnode->state.applied = pVnode->state.committed; + pVnode->pTfs = pTfs; + pVnode->msgCb = msgCb; - // Open the vnode + tsem_init(&(pVnode->canCommit), 0, 1); + + // open the vnode if (vnodeOpenImpl(pVnode) < 0) { // TODO: handle error return NULL; @@ -93,41 +95,13 @@ SVnode *vnodeOpen(const char *path, const SVnodeCfg *pVnodeCfg) { void vnodeClose(SVnode *pVnode) { if (pVnode) { vnodeCloseImpl(pVnode); - vnodeFree(pVnode); - } -} - -void vnodeDestroy(const char *path) { taosRemoveDir(path); } - -/* ------------------------ STATIC METHODS ------------------------ */ -static SVnode *vnodeNew(const char *path, const SVnodeCfg *pVnodeCfg) { - SVnode *pVnode = NULL; - - pVnode = (SVnode *)taosMemoryCalloc(1, sizeof(*pVnode)); - if (pVnode == NULL) { - // TODO - return NULL; - } - - pVnode->vgId = pVnodeCfg->vgId; - pVnode->msgCb = pVnodeCfg->msgCb; - pVnode->pTfs = pVnodeCfg->pTfs; - pVnode->path = strdup(path); - vnodeOptionsCopy(&(pVnode->config), pVnodeCfg); - - tsem_init(&(pVnode->canCommit), 0, 1); - - return pVnode; -} - -static void vnodeFree(SVnode *pVnode) { - if (pVnode) { tsem_destroy(&(pVnode->canCommit)); taosMemoryFreeClear(pVnode->path); taosMemoryFree(pVnode); } } +/* ------------------------ STATIC METHODS ------------------------ */ static int vnodeOpenImpl(SVnode *pVnode) { char dir[TSDB_FILENAME_LEN]; @@ -138,7 +112,7 @@ static int vnodeOpenImpl(SVnode *pVnode) { // Open meta sprintf(dir, "%s/meta", pVnode->path); - pVnode->pMeta = metaOpen(dir, &(pVnode->config.metaCfg), vBufPoolGetMAF(pVnode)); + pVnode->pMeta = metaOpen(dir, vBufPoolGetMAF(pVnode)); if (pVnode->pMeta == NULL) { // TODO: handle error return -1; @@ -147,7 +121,7 @@ static int vnodeOpenImpl(SVnode *pVnode) { // Open tsdb sprintf(dir, "%s/tsdb", pVnode->path); pVnode->pTsdb = - tsdbOpen(dir, pVnode->vgId, &(pVnode->config.tsdbCfg), vBufPoolGetMAF(pVnode), pVnode->pMeta, pVnode->pTfs); + tsdbOpen(dir, TD_VID(pVnode), &(pVnode->config.tsdbCfg), vBufPoolGetMAF(pVnode), pVnode->pMeta, pVnode->pTfs); if (pVnode->pTsdb == NULL) { // TODO: handle error return -1; @@ -163,7 +137,7 @@ static int vnodeOpenImpl(SVnode *pVnode) { // Open TQ sprintf(dir, "%s/tq", pVnode->path); - pVnode->pTq = tqOpen(dir, pVnode, pVnode->pWal, pVnode->pMeta, &(pVnode->config.tqCfg), vBufPoolGetMAF(pVnode)); + pVnode->pTq = tqOpen(dir, pVnode, pVnode->pWal, pVnode->pMeta, vBufPoolGetMAF(pVnode)); if (pVnode->pTq == NULL) { // TODO: handle error return -1; diff --git a/source/dnode/vnode/src/vnd/vnodeQuery.c b/source/dnode/vnode/src/vnd/vnodeQuery.c index 75079d50b285ff87bfed713e30d4adf7daba6862..4202c02a0c0b755fcc9a6082494377a6257c7855 100644 --- a/source/dnode/vnode/src/vnd/vnodeQuery.c +++ b/source/dnode/vnode/src/vnd/vnodeQuery.c @@ -16,7 +16,7 @@ #include "vnodeInt.h" int vnodeQueryOpen(SVnode *pVnode) { - return qWorkerInit(NODE_TYPE_VNODE, pVnode->vgId, NULL, (void **)&pVnode->pQuery, &pVnode->msgCb); + return qWorkerInit(NODE_TYPE_VNODE, TD_VID(pVnode), NULL, (void **)&pVnode->pQuery, &pVnode->msgCb); } void vnodeQueryClose(SVnode *pVnode) { qWorkerDestroy((void **)&pVnode->pQuery); } @@ -101,7 +101,7 @@ int vnodeGetTableMeta(SVnode *pVnode, SRpcMsg *pMsg) { metaRsp.numOfColumns = nCols; metaRsp.tableType = pTbCfg->type; metaRsp.tuid = uid; - metaRsp.vgId = pVnode->vgId; + metaRsp.vgId = TD_VID(pVnode); memcpy(metaRsp.pSchemas, pSW->pSchema, sizeof(SSchema) * pSW->nCols); if (nTagCols) { @@ -151,7 +151,7 @@ _exit: } int32_t vnodeGetLoad(SVnode *pVnode, SVnodeLoad *pLoad) { - pLoad->vgId = pVnode->vgId; + pLoad->vgId = TD_VID(pVnode); pLoad->role = TAOS_SYNC_STATE_LEADER; pLoad->numOfTables = metaGetTbNum(pVnode->pMeta); pLoad->numOfTimeSeries = 400; diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 87cef5304231b7f336205904013b9dcc9e56e2a2..288241eb66eada439ea4152db8e042ef7fe7047f 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -36,7 +36,7 @@ void vnodePreprocessWriteReqs(SVnode *pVnode, SArray *pMsgs) { if (walWrite(pVnode->pWal, ver, pRpc->msgType, pRpc->pCont, pRpc->contLen) < 0) { // TODO: handle error /*ASSERT(false);*/ - vError("vnode:%d write wal error since %s", pVnode->vgId, terrstr()); + vError("vnode:%d write wal error since %s", TD_VID(pVnode), terrstr()); } } @@ -73,12 +73,12 @@ int vnodeProcessWriteReq(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) { case TDMT_VND_ALTER_STB: return vnodeProcessAlterStbReq(pVnode, POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead))); case TDMT_VND_DROP_STB: - vTrace("vgId:%d, process drop stb req", pVnode->vgId); + vTrace("vgId:%d, process drop stb req", TD_VID(pVnode)); break; case TDMT_VND_DROP_TABLE: break; case TDMT_VND_SUBMIT: - /*printf("vnode %d write data %ld\n", pVnode->vgId, ver);*/ + /*printf("vnode %d write data %ld\n", TD_VID(pVnode), ver);*/ if (pVnode->config.streamMode == 0) { *pRsp = taosMemoryCalloc(1, sizeof(SRpcMsg)); (*pRsp)->handle = pMsg->handle; @@ -245,7 +245,7 @@ static int vnodeProcessCreateTbReq(SVnode *pVnode, SRpcMsg *pMsg, void *pReq, SR if (metaCreateTable(pVnode->pMeta, pCreateTbReq) < 0) { // TODO: handle error - vError("vgId:%d, failed to create table: %s", pVnode->vgId, pCreateTbReq->name); + vError("vgId:%d, failed to create table: %s", TD_VID(pVnode), pCreateTbReq->name); } // TODO: to encapsule a free API taosMemoryFree(pCreateTbReq->name); @@ -268,7 +268,7 @@ static int vnodeProcessCreateTbReq(SVnode *pVnode, SRpcMsg *pMsg, void *pReq, SR } } - vTrace("vgId:%d process create %" PRIzu " tables", pVnode->vgId, taosArrayGetSize(vCreateTbBatchReq.pArray)); + vTrace("vgId:%d process create %" PRIzu " tables", TD_VID(pVnode), taosArrayGetSize(vCreateTbBatchReq.pArray)); taosArrayDestroy(vCreateTbBatchReq.pArray); if (vCreateTbBatchRsp.rspList) { int32_t contLen = tSerializeSVCreateTbBatchRsp(NULL, 0, &vCreateTbBatchRsp); @@ -289,7 +289,7 @@ static int vnodeProcessCreateTbReq(SVnode *pVnode, SRpcMsg *pMsg, void *pReq, SR static int vnodeProcessAlterStbReq(SVnode *pVnode, void *pReq) { SVCreateTbReq vAlterTbReq = {0}; - vTrace("vgId:%d, process alter stb req", pVnode->vgId); + vTrace("vgId:%d, process alter stb req", TD_VID(pVnode)); tDeserializeSVCreateTbReq(pReq, &vAlterTbReq); // TODO: to encapsule a free API taosMemoryFree(vAlterTbReq.stbCfg.pSchema); diff --git a/source/libs/command/src/explain.c b/source/libs/command/src/explain.c index e08e9cf276e24d010a1bd4432e86cc6132942a35..4853bb4eb387750f8cd7fe168507acff0b805b47 100644 --- a/source/libs/command/src/explain.c +++ b/source/libs/command/src/explain.c @@ -316,6 +316,9 @@ int32_t qExplainResAppendRow(SExplainCtx *ctx, char *tbuf, int32_t len, int32_t return TSDB_CODE_SUCCESS; } +static uint8_t getIntervalPrecision(SIntervalPhysiNode* pIntNode) { + return ((SColumnNode*)pIntNode->window.pTspk)->node.resType.precision; +} int32_t qExplainResNodeToRowsImpl(SExplainResNode *pResNode, SExplainCtx *ctx, int32_t level) { int32_t tlen = 0; @@ -658,10 +661,10 @@ int32_t qExplainResNodeToRowsImpl(SExplainResNode *pResNode, SExplainCtx *ctx, i EXPLAIN_ROW_APPEND(EXPLAIN_WIDTH_FORMAT, pIntNode->window.node.pOutputDataBlockDesc->outputRowSize); EXPLAIN_ROW_END(); QRY_ERR_RET(qExplainResAppendRow(ctx, tbuf, tlen, level + 1)); - - EXPLAIN_ROW_NEW(level + 1, EXPLAIN_TIME_WINDOWS_FORMAT, INVERAL_TIME_FROM_PRECISION_TO_UNIT(pIntNode->interval, pIntNode->intervalUnit, pIntNode->precision), - pIntNode->intervalUnit, pIntNode->offset, getPrecisionUnit(pIntNode->precision), - INVERAL_TIME_FROM_PRECISION_TO_UNIT(pIntNode->sliding, pIntNode->slidingUnit, pIntNode->precision), pIntNode->slidingUnit); + uint8_t precision = getIntervalPrecision(pIntNode); + EXPLAIN_ROW_NEW(level + 1, EXPLAIN_TIME_WINDOWS_FORMAT, INVERAL_TIME_FROM_PRECISION_TO_UNIT(pIntNode->interval, pIntNode->intervalUnit, precision), + pIntNode->intervalUnit, pIntNode->offset, getPrecisionUnit(precision), + INVERAL_TIME_FROM_PRECISION_TO_UNIT(pIntNode->sliding, pIntNode->slidingUnit, precision), pIntNode->slidingUnit); EXPLAIN_ROW_END(); QRY_ERR_RET(qExplainResAppendRow(ctx, tbuf, tlen, level + 1)); diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 8df0546b14d1bd0f6774e37e65b0362bdfe420a0..ca4a12b7ff0a492e42837b13f66d467acc1e5bf9 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -6785,7 +6785,7 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo .intervalUnit = pIntervalPhyNode->intervalUnit, .slidingUnit = pIntervalPhyNode->slidingUnit, .offset = pIntervalPhyNode->offset, - .precision = pIntervalPhyNode->precision + .precision = ((SColumnNode*)pIntervalPhyNode->window.pTspk)->node.resType.precision }; int32_t primaryTsSlotId = ((SColumnNode*) pIntervalPhyNode->window.pTspk)->slotId; diff --git a/source/libs/function/src/builtins.c b/source/libs/function/src/builtins.c index a8f6dc462711d237690ed5f119cf30e640d773e9..d5242a46f55176ec46d2d415906616c9981f4045 100644 --- a/source/libs/function/src/builtins.c +++ b/source/libs/function/src/builtins.c @@ -138,6 +138,12 @@ static int32_t translateTimePseudoColumn(SFunctionNode* pFunc, char* pErrBuf, in return TSDB_CODE_SUCCESS; } +static int32_t translateTimezone(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { + // pseudo column do not need to check parameters + pFunc->node.resType = (SDataType){.bytes = TD_TIMEZONE_LEN, .type = TSDB_DATA_TYPE_BINARY}; + return TSDB_CODE_SUCCESS; +} + static int32_t translatePercentile(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { if (2 != LIST_LENGTH(pFunc->pParameterList)) { return invaildFuncParaNumErrMsg(pErrBuf, len, pFunc->functionName); @@ -819,6 +825,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = { .sprocessFunc = todayFunction, .finalizeFunc = NULL }, + { + .name = "timezone", + .type = FUNCTION_TYPE_TIMEZONE, + .classification = FUNC_MGT_SCALAR_FUNC, + .translateFunc = translateTimezone, + .getEnvFunc = NULL, + .initFunc = NULL, + .sprocessFunc = timezoneFunction, + .finalizeFunc = NULL + }, { .name = "_rowts", .type = FUNCTION_TYPE_ROWTS, diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index 2c8a938a5a3538bd9751bdee36fa296e5985d4e5..7eb472dad882d48165696da3d685a05198eee8a0 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -748,6 +748,11 @@ static const char* jkTableScanPhysiPlanEndKey = "EndKey"; static const char* jkTableScanPhysiPlanRatio = "Ratio"; static const char* jkTableScanPhysiPlanDataRequired = "DataRequired"; static const char* jkTableScanPhysiPlanDynamicScanFuncs = "DynamicScanFuncs"; +static const char* jkTableScanPhysiPlanInterval = "Interval"; +static const char* jkTableScanPhysiPlanOffset = "Offset"; +static const char* jkTableScanPhysiPlanSliding = "Sliding"; +static const char* jkTableScanPhysiPlanIntervalUnit = "intervalUnit"; +static const char* jkTableScanPhysiPlanSlidingUnit = "slidingUnit"; static int32_t physiTableScanNodeToJson(const void* pObj, SJson* pJson) { const STableScanPhysiNode* pNode = (const STableScanPhysiNode*)pObj; @@ -771,6 +776,21 @@ static int32_t physiTableScanNodeToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = nodeListToJson(pJson, jkTableScanPhysiPlanDynamicScanFuncs, pNode->pDynamicScanFuncs); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTableScanPhysiPlanInterval, pNode->interval); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTableScanPhysiPlanOffset, pNode->offset); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTableScanPhysiPlanSliding, pNode->sliding); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTableScanPhysiPlanIntervalUnit, pNode->intervalUnit); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonAddIntegerToObject(pJson, jkTableScanPhysiPlanSlidingUnit, pNode->slidingUnit); + } return code; } @@ -797,6 +817,21 @@ static int32_t jsonToPhysiTableScanNode(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = jsonToNodeList(pJson, jkTableScanPhysiPlanDynamicScanFuncs, &pNode->pDynamicScanFuncs); } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetNumberValue(pJson, jkTableScanPhysiPlanInterval, pNode->interval); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetNumberValue(pJson, jkTableScanPhysiPlanOffset, pNode->offset); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetNumberValue(pJson, jkTableScanPhysiPlanSliding, pNode->sliding); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetNumberValue(pJson, jkTableScanPhysiPlanIntervalUnit, pNode->intervalUnit); + } + if (TSDB_CODE_SUCCESS == code) { + code = tjsonGetNumberValue(pJson, jkTableScanPhysiPlanSlidingUnit, pNode->slidingUnit); + } return code; } @@ -1159,7 +1194,6 @@ static const char* jkIntervalPhysiPlanSliding = "Sliding"; static const char* jkIntervalPhysiPlanIntervalUnit = "intervalUnit"; static const char* jkIntervalPhysiPlanSlidingUnit = "slidingUnit"; static const char* jkIntervalPhysiPlanFill = "Fill"; -static const char* jkIntervalPhysiPlanPrecision = "Precision"; static int32_t physiIntervalNodeToJson(const void* pObj, SJson* pJson) { const SIntervalPhysiNode* pNode = (const SIntervalPhysiNode*)pObj; @@ -1183,9 +1217,6 @@ static int32_t physiIntervalNodeToJson(const void* pObj, SJson* pJson) { if (TSDB_CODE_SUCCESS == code) { code = tjsonAddObject(pJson, jkIntervalPhysiPlanFill, nodeToJson, pNode->pFill); } - if (TSDB_CODE_SUCCESS == code) { - code = tjsonAddIntegerToObject(pJson, jkIntervalPhysiPlanPrecision, pNode->precision); - } return code; } @@ -1212,9 +1243,6 @@ static int32_t jsonToPhysiIntervalNode(const SJson* pJson, void* pObj) { if (TSDB_CODE_SUCCESS == code) { code = jsonToNodeObject(pJson, jkIntervalPhysiPlanFill, (SNode**)&pNode->pFill); } - if (TSDB_CODE_SUCCESS == code) { - code = tjsonGetUTinyIntValue(pJson, jkIntervalPhysiPlanPrecision, &pNode->precision); - } return code; } diff --git a/source/libs/nodes/src/nodesTraverseFuncs.c b/source/libs/nodes/src/nodesTraverseFuncs.c index 99a08923bb3381d188f69dca33f29924c750fa0b..1830d15f691f3be545a8fe5163c2ee84abfd9f6c 100644 --- a/source/libs/nodes/src/nodesTraverseFuncs.c +++ b/source/libs/nodes/src/nodesTraverseFuncs.c @@ -87,9 +87,9 @@ static EDealRes walkNode(SNode* pNode, ETraversalOrder order, FNodeWalker walker } case QUERY_NODE_SESSION_WINDOW: { SSessionWindowNode* pSession = (SSessionWindowNode*)pNode; - res = walkNode(pSession->pCol, order, walker, pContext); + res = walkNode((SNode*)pSession->pCol, order, walker, pContext); if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { - res = walkNode(pSession->pGap, order, walker, pContext); + res = walkNode((SNode*)pSession->pGap, order, walker, pContext); } break; } @@ -227,9 +227,9 @@ static EDealRes rewriteNode(SNode** pRawNode, ETraversalOrder order, FNodeRewrit } case QUERY_NODE_SESSION_WINDOW: { SSessionWindowNode* pSession = (SSessionWindowNode*)pNode; - res = rewriteNode(&pSession->pCol, order, rewriter, pContext); + res = rewriteNode((SNode**)&pSession->pCol, order, rewriter, pContext); if (DEAL_RES_ERROR != res && DEAL_RES_END != res) { - res = rewriteNode(&pSession->pGap, order, rewriter, pContext); + res = rewriteNode((SNode**)&pSession->pGap, order, rewriter, pContext); } break; } diff --git a/source/libs/parser/inc/parAst.h b/source/libs/parser/inc/parAst.h index ebd07669c302937769102b8047015ad2c1f3cda4..2c4fba50592342d2f24131d589ec82b82df0b75c 100644 --- a/source/libs/parser/inc/parAst.h +++ b/source/libs/parser/inc/parAst.h @@ -93,7 +93,7 @@ SNode* createOperatorNode(SAstCreateContext* pCxt, EOperatorType type, SNode* pL SNode* createBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight); SNode* createNotBetweenAnd(SAstCreateContext* pCxt, SNode* pExpr, SNode* pLeft, SNode* pRight); SNode* createFunctionNode(SAstCreateContext* pCxt, const SToken* pFuncName, SNodeList* pParameterList); -SNode* createFunctionNodeNoParam(SAstCreateContext* pCxt, const SToken* pFuncName); +SNode* createFunctionNodeNoArg(SAstCreateContext* pCxt, const SToken* pFuncName); SNode* createCastFunctionNode(SAstCreateContext* pCxt, SNode* pExpr, SDataType dt); SNode* createNodeListNode(SAstCreateContext* pCxt, SNodeList* pList); SNode* createNodeListNodeEx(SAstCreateContext* pCxt, SNode* p1, SNode* p2); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index bd7c5d16b1e39706f688b4e4443af34f43719dc2..a995ec9035c3714bf8c0ed544d1a16df9d9f9e23 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -603,12 +603,13 @@ pseudo_column(A) ::= WDURATION(B). function_expression(A) ::= function_name(B) NK_LP expression_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } function_expression(A) ::= star_func(B) NK_LP star_func_para_list(C) NK_RP(D). { A = createRawExprNodeExt(pCxt, &B, &D, createFunctionNode(pCxt, &B, C)); } function_expression(A) ::= CAST(B) NK_LP expression(C) AS type_name(D) NK_RP(E). { A = createRawExprNodeExt(pCxt, &B, &E, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, C), D)); } -function_expression(A) ::= noarg_func(B) NK_LP NK_RP(C). { A = createRawExprNodeExt(pCxt, &B, &C, createFunctionNode(pCxt, &B, NULL)); } +function_expression(A) ::= noarg_func(B) NK_LP NK_RP(C). { A = createRawExprNodeExt(pCxt, &B, &C, createFunctionNodeNoArg(pCxt, &B)); } %type noarg_func { SToken } %destructor noarg_func { } noarg_func(A) ::= NOW(B). { A = B; } noarg_func(A) ::= TODAY(B). { A = B; } +noarg_func(A) ::= TIMEZONE(B). { A = B; } %type star_func { SToken } %destructor star_func { } diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index f2b8b73a8785008c0bbf0a462856d46cfa564004..790aa92a10a578f22fcf6fd8e8720c941705c1f6 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -260,7 +260,8 @@ SNode* createValueNode(SAstCreateContext* pCxt, int32_t dataType, const SToken* CHECK_OUT_OF_MEM(val); if (NULL != pLiteral) { val->literal = strndup(pLiteral->z, pLiteral->n); - if (TK_NK_ID != pLiteral->type && (IS_VAR_DATA_TYPE(dataType) || TSDB_DATA_TYPE_TIMESTAMP == dataType)) { + if (TK_NK_ID != pLiteral->type && TK_TIMEZONE != pLiteral->type && + (IS_VAR_DATA_TYPE(dataType) || TSDB_DATA_TYPE_TIMESTAMP == dataType)) { trimString(pLiteral->z, pLiteral->n, val->literal, pLiteral->n); } CHECK_OUT_OF_MEM(val->literal); @@ -367,7 +368,7 @@ SNode* createFunctionNode(SAstCreateContext* pCxt, const SToken* pFuncName, SNod return (SNode*)func; } -SNode* createFunctionNodeNoParam(SAstCreateContext* pCxt, const SToken* pFuncName) { +SNode* createFunctionNodeNoArg(SAstCreateContext* pCxt, const SToken* pFuncName) { SFunctionNode* func = (SFunctionNode*)nodesMakeNode(QUERY_NODE_FUNCTION); CHECK_OUT_OF_MEM(func); char buf[64] = {0}; @@ -386,11 +387,11 @@ SNode* createFunctionNodeNoParam(SAstCreateContext* pCxt, const SToken* pFuncNam dataType = TSDB_DATA_TYPE_BIGINT; break; } - //case TK_TIMEZONE: { - // strncpy(buf, tsTimezoneStr, strlen(tsTimezoneStr)); - // dataType = TSDB_DATA_TYPE_BINARY; - // break; - //} + case TK_TIMEZONE: { + strncpy(buf, tsTimezoneStr, strlen(tsTimezoneStr)); + dataType = TSDB_DATA_TYPE_BINARY; + break; + } } SToken token = {.type = pFuncName->type, .n = strlen(buf), .z = buf}; @@ -499,8 +500,8 @@ SNode* createOrderByExprNode(SAstCreateContext* pCxt, SNode* pExpr, EOrder order SNode* createSessionWindowNode(SAstCreateContext* pCxt, SNode* pCol, SNode* pGap) { SSessionWindowNode* session = (SSessionWindowNode*)nodesMakeNode(QUERY_NODE_SESSION_WINDOW); CHECK_OUT_OF_MEM(session); - session->pCol = pCol; - session->pGap = pGap; + session->pCol = (SColumnNode*)pCol; + session->pGap = (SValueNode*)pGap; return (SNode*)session; } diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index af2b831b939b5fac5b51da749af742ecb689e136..2a191b7bf2ec51438f2a8385d125539d2806599a 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -175,6 +175,7 @@ static SKeyword keywordTable[] = { {"TAGS", TK_TAGS}, {"TBNAME", TK_TBNAME}, {"TIMESTAMP", TK_TIMESTAMP}, + {"TIMEZONE", TK_TIMEZONE}, {"TINYINT", TK_TINYINT}, {"TODAY", TK_TODAY}, {"TOPIC", TK_TOPIC}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 324f9c17d2ace2a4dae2c3b81d9a5c9bbbfdcd32..361d1a3b2937eb0ef2c4d342220a243af58bce97 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -19,6 +19,7 @@ #include "cmdnodes.h" #include "functionMgt.h" #include "parUtil.h" +#include "tglobal.h" #include "ttime.h" #define GET_OPTION_VAL(pVal, defaultVal) (NULL == (pVal) ? (defaultVal) : getBigintFromValueNode((SValueNode*)(pVal))) @@ -227,6 +228,7 @@ static void setColumnInfoBySchema(const SRealTableNode* pTable, const SSchema* p strcpy(pCol->node.aliasName, pColSchema->name); } pCol->tableId = pTable->pMeta->uid; + pCol->tableType = pTable->pMeta->tableType; pCol->colId = pColSchema->colId; pCol->colType = isTag ? COLUMN_TYPE_TAG : COLUMN_TYPE_COLUMN; pCol->node.resType.type = pColSchema->type; @@ -364,18 +366,38 @@ static bool translateColumnUseAlias(STranslateContext* pCxt, SColumnNode* pCol) } static EDealRes translateColumn(STranslateContext* pCxt, SColumnNode* pCol) { - // count(*)/first(*)/last(*) + // count(*)/first(*)/last(*) and so on if (0 == strcmp(pCol->colName, "*")) { return DEAL_RES_CONTINUE; } + + EDealRes res = DEAL_RES_CONTINUE; if ('\0' != pCol->tableAlias[0]) { - return translateColumnWithPrefix(pCxt, pCol); + res = translateColumnWithPrefix(pCxt, pCol); + } else { + bool found = false; + if (SQL_CLAUSE_ORDER_BY == pCxt->currClause) { + found = translateColumnUseAlias(pCxt, pCol); + } + res = (found ? DEAL_RES_CONTINUE : translateColumnWithoutPrefix(pCxt, pCol)); } - bool found = false; - if (SQL_CLAUSE_ORDER_BY == pCxt->currClause) { - found = translateColumnUseAlias(pCxt, pCol); + + if (DEAL_RES_ERROR == res) { + return res; } - return found ? DEAL_RES_CONTINUE : translateColumnWithoutPrefix(pCxt, pCol); + + if (SQL_CLAUSE_WINDOW == pCxt->currClause && QUERY_NODE_STATE_WINDOW == nodeType(pCxt->pCurrStmt->pWindow)) { + if (!IS_INTEGER_TYPE(pCol->node.resType.type)) { + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_STATE_WIN_TYPE); + } + if (COLUMN_TYPE_TAG == pCol->colType) { + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_STATE_WIN_COL); + } + if (TSDB_SUPER_TABLE == pCol->tableType) { + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_INVALID_STATE_WIN_TABLE); + } + } + return DEAL_RES_CONTINUE; } static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) { @@ -466,8 +488,18 @@ static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) { TSDB_DATA_TYPE_BLOB == rdt.type) { return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, ((SExprNode*)(pOp->pRight))->aliasName); } - pOp->node.resType.type = TSDB_DATA_TYPE_DOUBLE; - pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_DOUBLE].bytes; + if (TSDB_DATA_TYPE_TIMESTAMP == ldt.type && TSDB_DATA_TYPE_TIMESTAMP == rdt.type) { + return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, ((SExprNode*)(pOp->pRight))->aliasName); + } + + if ((TSDB_DATA_TYPE_TIMESTAMP == ldt.type && TSDB_DATA_TYPE_BIGINT == rdt.type) || + (TSDB_DATA_TYPE_TIMESTAMP == rdt.type && TSDB_DATA_TYPE_BIGINT == ldt.type)) { + pOp->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; + pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes; + } else { + pOp->node.resType.type = TSDB_DATA_TYPE_DOUBLE; + pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_DOUBLE].bytes; + } } else if (nodesIsComparisonOp(pOp)) { if (TSDB_DATA_TYPE_JSON == ldt.type || TSDB_DATA_TYPE_BLOB == ldt.type || TSDB_DATA_TYPE_JSON == rdt.type || TSDB_DATA_TYPE_BLOB == rdt.type) { @@ -639,7 +671,7 @@ static int32_t checkAggColCoexist(STranslateContext* pCxt, SSelectStmt* pSelect) if (!pSelect->isDistinct) { nodesWalkExprs(pSelect->pOrderByList, doCheckAggColCoexist, &cxt); } - if (cxt.existAggFunc && cxt.existCol) { + if ((cxt.existAggFunc || NULL != pSelect->pWindow) && cxt.existCol) { return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_NOT_SINGLE_GROUP); } return TSDB_CODE_SUCCESS; @@ -1091,20 +1123,100 @@ static int32_t translateGroupBy(STranslateContext* pCxt, SSelectStmt* pSelect) { return translateExprList(pCxt, pSelect->pGroupByList); } -static int32_t translateIntervalWindow(STranslateContext* pCxt, SIntervalWindowNode* pInterval) { - SValueNode* pIntervalVal = (SValueNode*)pInterval->pInterval; - SValueNode* pIntervalOffset = (SValueNode*)pInterval->pOffset; - SValueNode* pSliding = (SValueNode*)pInterval->pSliding; - if (pIntervalVal->datum.i <= 0) { - return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTERVAL_VALUE_TOO_SMALL, pIntervalVal->literal); +static bool isValTimeUnit(char unit) { + return ('n' == unit || 'y' == unit); +} + +static int64_t getMonthsFromTimeVal(int64_t val, int32_t fromPrecision, char unit) { + int64_t days = convertTimeFromPrecisionToUnit(val, fromPrecision, 'd'); + switch (unit) { + case 'b': + case 'u': + case 'a': + case 's': + case 'm': + case 'h': + case 'd': + case 'w': + return days / 28; + case 'n': + return val; + case 'y': + return val * 12; + default: + break; + } + return -1; +} + +static int32_t checkIntervalWindow(STranslateContext* pCxt, SIntervalWindowNode* pInterval) { + uint8_t precision = ((SColumnNode*)pInterval->pCol)->node.resType.precision; + + SValueNode* pInter = (SValueNode*)pInterval->pInterval; + bool valInter = isValTimeUnit(pInter->unit); + if (pInter->datum.i <= 0 || + (!valInter && convertTimePrecision(pInter->datum.i, precision, TSDB_TIME_PRECISION_MICRO) < tsMinIntervalTime)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_VALUE_TOO_SMALL, tsMinIntervalTime); + } + + if (NULL != pInterval->pOffset) { + SValueNode* pOffset = (SValueNode*)pInterval->pOffset; + if (pOffset->datum.i <= 0) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_NEGATIVE); + } + if (pInter->unit == 'n' && pOffset->unit == 'y') { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_UNIT); + } + bool fixed = !isValTimeUnit(pOffset->unit) && !valInter; + if ((fixed && pOffset->datum.i >= pInter->datum.i) || + (!fixed && getMonthsFromTimeVal(pOffset->datum.i, precision, pOffset->unit) >= getMonthsFromTimeVal(pInter->datum.i, precision, pInter->unit))) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_OFFSET_TOO_BIG); + } + } + + if (NULL != pInterval->pSliding) { + const static int32_t INTERVAL_SLIDING_FACTOR = 100; + + SValueNode* pSliding = (SValueNode*)pInterval->pSliding; + if (pInter->unit == 'n' || pInter->unit == 'y') { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_UNIT); + } + if ((pSliding->datum.i < convertTimePrecision(tsMinSlidingTime, TSDB_TIME_PRECISION_MILLI, precision)) || + (pInter->datum.i / pSliding->datum.i > INTERVAL_SLIDING_FACTOR)) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_TOO_SMALL); + } + if (pSliding->datum.i > pInter->datum.i) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SLIDING_TOO_BIG); + } + } + + return TSDB_CODE_SUCCESS; +} + +static int32_t checkStateWindow(STranslateContext* pCxt, SStateWindowNode* pState) { + // todo check for "function not support for state_window" + return TSDB_CODE_SUCCESS; +} + +static int32_t checkSessionWindow(STranslateContext* pCxt, SSessionWindowNode* pSession) { + if ('y' == pSession->pGap->unit || 'n' == pSession->pGap->unit || 0 == pSession->pGap->datum.i) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SESSION_GAP); + } + if (PRIMARYKEY_TIMESTAMP_COL_ID != pSession->pCol->colId) { + return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INTER_SESSION_COL); } + // todo check for "function not support for session" return TSDB_CODE_SUCCESS; } -static int32_t doTranslateWindow(STranslateContext* pCxt, SNode* pWindow) { +static int32_t checkWindow(STranslateContext* pCxt, SNode* pWindow) { switch (nodeType(pWindow)) { + case QUERY_NODE_STATE_WINDOW: + return checkStateWindow(pCxt, (SStateWindowNode*)pWindow); + case QUERY_NODE_SESSION_WINDOW: + return checkSessionWindow(pCxt, (SSessionWindowNode*)pWindow); case QUERY_NODE_INTERVAL_WINDOW: - return translateIntervalWindow(pCxt, (SIntervalWindowNode*)pWindow); + return checkIntervalWindow(pCxt, (SIntervalWindowNode*)pWindow); default: break; } @@ -1118,7 +1230,7 @@ static int32_t translateWindow(STranslateContext* pCxt, SNode* pWindow) { pCxt->currClause = SQL_CLAUSE_WINDOW; int32_t code = translateExpr(pCxt, pWindow); if (TSDB_CODE_SUCCESS == code) { - code = doTranslateWindow(pCxt, pWindow); + code = checkWindow(pCxt, pWindow); } return code; } diff --git a/source/libs/parser/src/parUtil.c b/source/libs/parser/src/parUtil.c index 549f448ff4ef9da2c4d0a325b8a363ef403f7512..51e0b2a3280db171b4bd6ba28e79fa07ab765100 100644 --- a/source/libs/parser/src/parUtil.c +++ b/source/libs/parser/src/parUtil.c @@ -55,8 +55,8 @@ static char* getSyntaxErrFormat(int32_t errCode) { return "Endpoint should be in the format of 'fqdn:port'"; case TSDB_CODE_PAR_EXPRIE_STATEMENT: return "This statement is no longer supported"; - case TSDB_CODE_PAR_INTERVAL_VALUE_TOO_SMALL: - return "This interval value is too small : %s"; + case TSDB_CODE_PAR_INTER_VALUE_TOO_SMALL: + return "Interval cannot be less than %d us"; case TSDB_CODE_PAR_DB_NOT_SPECIFIED: return "Database not specified"; case TSDB_CODE_PAR_INVALID_IDENTIFIER_NAME: @@ -93,6 +93,28 @@ static char* getSyntaxErrFormat(int32_t errCode) { return "Invalid option keep unit: %c, %c, %c, only m, h, d allowed"; case TSDB_CODE_PAR_AGG_FUNC_NESTING: return "Aggregate functions do not support nesting"; + case TSDB_CODE_PAR_INVALID_STATE_WIN_TYPE: + return "Only support STATE_WINDOW on integer column"; + case TSDB_CODE_PAR_INVALID_STATE_WIN_COL: + return "Not support STATE_WINDOW on tag column"; + case TSDB_CODE_PAR_INVALID_STATE_WIN_TABLE: + return "STATE_WINDOW not support for super table query"; + case TSDB_CODE_PAR_INTER_SESSION_GAP: + return "SESSION gap should be fixed time window, and greater than 0"; + case TSDB_CODE_PAR_INTER_SESSION_COL: + return "Only support SESSION on primary timestamp column"; + case TSDB_CODE_PAR_INTER_OFFSET_NEGATIVE: + return "Interval offset cannot be negative"; + case TSDB_CODE_PAR_INTER_OFFSET_UNIT: + return "Cannot use 'year' as offset when interval is 'month'"; + case TSDB_CODE_PAR_INTER_OFFSET_TOO_BIG: + return "Interval offset should be shorter than interval"; + case TSDB_CODE_PAR_INTER_SLIDING_UNIT: + return "Does not support sliding when interval is natural month/year"; + case TSDB_CODE_PAR_INTER_SLIDING_TOO_BIG: + return "sliding value no larger than the interval value"; + case TSDB_CODE_PAR_INTER_SLIDING_TOO_SMALL: + return "sliding value can not less than 1% of interval value"; case TSDB_CODE_OUT_OF_MEMORY: return "Out of memory"; default: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index e9ec9c987c1be626f7114acc6d7ec33be549eaf7..6969a5a0f939f5e15f887cbcd1cbdc4eaca96f3e 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -100,24 +100,24 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 333 +#define YYNOCODE 334 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SAlterOption yy11; - int32_t yy100; - EJoinType yy162; - EOperatorType yy218; - EOrder yy326; - SDataType yy430; - SNode* yy452; - SNodeList* yy478; - SToken yy479; - EFillMode yy540; - ENullOrder yy595; - bool yy659; + SAlterOption yy29; + EJoinType yy164; + ENullOrder yy209; + SDataType yy388; + EOperatorType yy416; + SNode* yy456; + SToken yy537; + EOrder yy626; + SNodeList* yy632; + EFillMode yy646; + bool yy649; + int32_t yy652; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -133,16 +133,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYNSTATE 568 -#define YYNRULE 432 -#define YYNTOKEN 219 +#define YYNRULE 433 +#define YYNRULE_WITH_ACTION 433 +#define YYNTOKEN 220 #define YY_MAX_SHIFT 567 -#define YY_MIN_SHIFTREDUCE 842 -#define YY_MAX_SHIFTREDUCE 1273 -#define YY_ERROR_ACTION 1274 -#define YY_ACCEPT_ACTION 1275 -#define YY_NO_ACTION 1276 -#define YY_MIN_REDUCE 1277 -#define YY_MAX_REDUCE 1708 +#define YY_MIN_SHIFTREDUCE 843 +#define YY_MAX_SHIFTREDUCE 1275 +#define YY_ERROR_ACTION 1276 +#define YY_ACCEPT_ACTION 1277 +#define YY_NO_ACTION 1278 +#define YY_MIN_REDUCE 1279 +#define YY_MAX_REDUCE 1711 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -209,545 +210,555 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (1929) +#define YY_ACTTAB_COUNT (1863) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 1388, 1687, 1386, 1561, 268, 26, 203, 323, 482, 1275, - /* 10 */ 469, 1547, 33, 31, 1686, 1561, 1490, 77, 1685, 1300, - /* 20 */ 277, 1547, 1095, 285, 380, 1543, 1550, 1577, 34, 32, - /* 30 */ 30, 29, 28, 1397, 466, 1543, 1549, 248, 1093, 1577, - /* 40 */ 1547, 481, 53, 417, 465, 1533, 466, 441, 1533, 1116, - /* 50 */ 12, 33, 31, 1216, 1543, 1549, 465, 1101, 481, 277, - /* 60 */ 1533, 1095, 293, 1393, 1533, 445, 125, 1562, 468, 1564, - /* 70 */ 1565, 464, 104, 459, 1, 482, 359, 1093, 72, 1562, - /* 80 */ 468, 1564, 1565, 464, 321, 459, 1375, 418, 1626, 12, - /* 90 */ 482, 1230, 249, 1622, 124, 36, 1101, 564, 1355, 77, - /* 100 */ 1397, 1687, 33, 31, 1687, 123, 387, 1289, 102, 1094, - /* 110 */ 277, 1701, 1095, 1, 136, 1397, 1373, 136, 1685, 1118, - /* 120 */ 22, 1685, 443, 132, 1633, 1634, 1687, 1638, 1093, 1278, - /* 130 */ 34, 32, 30, 29, 28, 359, 564, 1329, 1446, 136, - /* 140 */ 12, 560, 559, 1685, 267, 1577, 1096, 1101, 1094, 1444, + /* 0 */ 1390, 1690, 1388, 1563, 268, 26, 203, 323, 482, 1277, + /* 10 */ 469, 1549, 33, 31, 1689, 1563, 1492, 77, 1688, 1302, + /* 20 */ 277, 1549, 1096, 285, 380, 1545, 1552, 1579, 34, 32, + /* 30 */ 30, 29, 28, 1399, 466, 1545, 1551, 248, 1094, 1579, + /* 40 */ 1549, 481, 53, 417, 465, 1535, 466, 441, 1535, 1301, + /* 50 */ 12, 33, 31, 1218, 1545, 1551, 465, 1102, 481, 277, + /* 60 */ 1535, 1096, 293, 1395, 1535, 445, 125, 1564, 468, 1566, + /* 70 */ 1567, 464, 104, 459, 1, 482, 359, 1094, 72, 1564, + /* 80 */ 468, 1566, 1567, 464, 321, 459, 1377, 418, 1629, 12, + /* 90 */ 482, 1232, 249, 1625, 1535, 36, 1102, 564, 62, 77, + /* 100 */ 1399, 1690, 33, 31, 1690, 123, 387, 1291, 102, 1095, + /* 110 */ 277, 1704, 1096, 1, 136, 1399, 1375, 136, 1688, 1392, + /* 120 */ 22, 1688, 443, 132, 1636, 1637, 1690, 1641, 1094, 1280, + /* 130 */ 34, 32, 30, 29, 28, 359, 564, 1331, 1448, 136, + /* 140 */ 12, 1117, 481, 1688, 267, 1579, 1097, 1102, 1095, 1446, /* 150 */ 87, 127, 466, 86, 85, 84, 83, 82, 81, 80, - /* 160 */ 79, 78, 1438, 469, 1, 518, 280, 1099, 1100, 1489, - /* 170 */ 1144, 1145, 1146, 1147, 1148, 1149, 1150, 461, 1155, 1156, - /* 180 */ 1157, 1158, 1159, 1160, 53, 1096, 434, 564, 431, 395, - /* 190 */ 316, 389, 315, 1299, 481, 394, 137, 99, 101, 1094, - /* 200 */ 390, 388, 1298, 391, 1640, 1392, 1099, 1100, 878, 1144, - /* 210 */ 1145, 1146, 1147, 1148, 1149, 1150, 461, 1155, 1156, 1157, - /* 220 */ 1158, 1159, 1160, 100, 378, 137, 441, 383, 1637, 33, - /* 230 */ 31, 34, 32, 30, 29, 28, 1096, 277, 1533, 1095, - /* 240 */ 930, 137, 34, 32, 30, 29, 28, 1533, 36, 386, - /* 250 */ 137, 104, 1522, 436, 432, 1093, 441, 1099, 1100, 932, - /* 260 */ 1144, 1145, 1146, 1147, 1148, 1149, 1150, 461, 1155, 1156, - /* 270 */ 1157, 1158, 1159, 1160, 1101, 33, 31, 1161, 55, 266, - /* 280 */ 250, 104, 174, 277, 435, 1095, 1326, 102, 300, 87, - /* 290 */ 1297, 7, 86, 85, 84, 83, 82, 81, 80, 79, - /* 300 */ 78, 1093, 133, 1633, 1634, 1131, 1638, 281, 9, 8, - /* 310 */ 395, 1120, 389, 1178, 564, 121, 394, 102, 1119, 101, - /* 320 */ 1101, 390, 388, 1399, 391, 317, 1094, 1240, 30, 29, - /* 330 */ 28, 260, 134, 1633, 1634, 1533, 1638, 7, 540, 539, - /* 340 */ 538, 537, 292, 1117, 536, 535, 534, 107, 529, 528, - /* 350 */ 527, 526, 525, 524, 523, 522, 114, 100, 385, 384, - /* 360 */ 564, 383, 1179, 1096, 1687, 428, 1238, 1239, 1241, 1242, - /* 370 */ 137, 225, 1094, 261, 1427, 259, 258, 136, 382, 1296, - /* 380 */ 1184, 1685, 1192, 386, 1099, 1100, 448, 1144, 1145, 1146, - /* 390 */ 1147, 1148, 1149, 1150, 461, 1155, 1156, 1157, 1158, 1159, - /* 400 */ 1160, 449, 33, 31, 34, 32, 30, 29, 28, 1096, - /* 410 */ 277, 69, 1095, 137, 25, 275, 1173, 1174, 1175, 1176, - /* 420 */ 1177, 1181, 1182, 1183, 1533, 105, 143, 409, 1093, 198, - /* 430 */ 1099, 1100, 1389, 1144, 1145, 1146, 1147, 1148, 1149, 1150, - /* 440 */ 461, 1155, 1156, 1157, 1158, 1159, 1160, 1101, 33, 31, - /* 450 */ 284, 283, 51, 1215, 288, 50, 277, 1446, 1095, 24, - /* 460 */ 1109, 1480, 1482, 282, 7, 400, 1687, 1446, 1444, 34, - /* 470 */ 32, 30, 29, 28, 1093, 482, 1102, 1295, 1481, 136, - /* 480 */ 408, 1640, 287, 1685, 322, 532, 879, 564, 878, 311, - /* 490 */ 121, 393, 392, 1101, 173, 1101, 345, 403, 1399, 1094, - /* 500 */ 1397, 1294, 397, 6, 1293, 1636, 880, 521, 172, 1369, - /* 510 */ 1, 968, 505, 504, 503, 972, 502, 974, 975, 501, - /* 520 */ 977, 498, 1533, 983, 495, 985, 986, 492, 489, 247, - /* 530 */ 120, 1116, 290, 564, 45, 483, 1096, 44, 338, 518, - /* 540 */ 121, 350, 147, 146, 450, 1094, 1533, 1105, 1399, 1533, - /* 550 */ 351, 34, 32, 30, 29, 28, 1292, 1099, 1100, 1640, - /* 560 */ 1144, 1145, 1146, 1147, 1148, 1149, 1150, 461, 1155, 1156, - /* 570 */ 1157, 1158, 1159, 1160, 34, 32, 30, 29, 28, 1180, - /* 580 */ 1291, 508, 1096, 1635, 1110, 515, 514, 533, 531, 250, - /* 590 */ 34, 32, 30, 29, 28, 447, 1121, 1185, 9, 8, - /* 600 */ 62, 1533, 1288, 1099, 1100, 1113, 1144, 1145, 1146, 1147, - /* 610 */ 1148, 1149, 1150, 461, 1155, 1156, 1157, 1158, 1159, 1160, - /* 620 */ 1561, 1390, 1178, 349, 520, 1533, 344, 343, 342, 341, - /* 630 */ 340, 23, 337, 336, 335, 334, 333, 329, 328, 327, - /* 640 */ 326, 325, 324, 482, 1577, 482, 1214, 1533, 482, 567, - /* 650 */ 121, 444, 330, 1131, 331, 1211, 1446, 358, 1400, 1645, - /* 660 */ 1211, 465, 289, 221, 1287, 1533, 98, 1444, 1397, 482, - /* 670 */ 1397, 1179, 556, 1397, 552, 548, 544, 220, 1394, 1081, - /* 680 */ 1082, 1446, 416, 73, 1562, 468, 1564, 1565, 464, 1184, - /* 690 */ 459, 482, 1445, 1626, 1397, 482, 1290, 270, 1622, 131, - /* 700 */ 291, 1270, 1286, 70, 1514, 1285, 215, 452, 1477, 1533, - /* 710 */ 1561, 199, 482, 482, 184, 145, 1397, 424, 1653, 1382, - /* 720 */ 1397, 479, 480, 25, 275, 1173, 1174, 1175, 1176, 1177, - /* 730 */ 1181, 1182, 1183, 1223, 1577, 1316, 478, 1397, 1397, 1118, - /* 740 */ 482, 444, 165, 308, 456, 163, 1284, 1533, 1283, 217, - /* 750 */ 1533, 465, 1282, 1281, 1166, 1533, 1280, 396, 407, 200, - /* 760 */ 1118, 1384, 310, 167, 423, 1397, 166, 180, 1561, 169, - /* 770 */ 1380, 405, 168, 73, 1562, 468, 1564, 1565, 464, 1269, - /* 780 */ 459, 429, 1073, 1626, 176, 1311, 68, 270, 1622, 131, - /* 790 */ 1277, 1533, 1577, 1533, 1272, 1273, 64, 1533, 1533, 466, - /* 800 */ 171, 1533, 1309, 170, 177, 460, 507, 398, 1654, 465, - /* 810 */ 1356, 1439, 410, 1533, 96, 95, 94, 93, 92, 91, - /* 820 */ 90, 89, 88, 112, 401, 47, 1561, 420, 377, 1237, - /* 830 */ 1554, 73, 1562, 468, 1564, 1565, 464, 193, 459, 187, - /* 840 */ 1656, 1626, 1552, 189, 35, 270, 1622, 1699, 1186, 442, - /* 850 */ 1577, 35, 453, 122, 904, 1151, 1660, 466, 231, 35, - /* 860 */ 206, 1170, 1104, 1056, 208, 1578, 160, 465, 1103, 130, - /* 870 */ 229, 1533, 109, 905, 202, 376, 474, 372, 368, 364, - /* 880 */ 159, 110, 2, 148, 1561, 214, 1116, 295, 299, 73, - /* 890 */ 1562, 468, 1564, 1565, 464, 255, 459, 112, 930, 1626, - /* 900 */ 257, 961, 1065, 270, 1622, 1699, 54, 47, 1577, 157, - /* 910 */ 222, 956, 332, 487, 1683, 466, 110, 989, 111, 112, - /* 920 */ 993, 1479, 1000, 999, 110, 465, 144, 339, 113, 1533, - /* 930 */ 347, 346, 348, 1107, 352, 353, 1125, 149, 354, 1106, - /* 940 */ 1561, 1124, 355, 152, 1123, 356, 71, 73, 1562, 468, - /* 950 */ 1564, 1565, 464, 1561, 459, 155, 52, 1626, 360, 357, - /* 960 */ 1122, 270, 1622, 1699, 1577, 379, 156, 381, 151, 158, - /* 970 */ 153, 466, 1644, 1387, 49, 48, 320, 1577, 142, 162, - /* 980 */ 1383, 465, 164, 314, 463, 1533, 265, 150, 115, 116, - /* 990 */ 445, 1561, 1385, 1381, 465, 256, 117, 306, 1533, 302, - /* 1000 */ 298, 139, 97, 238, 1562, 468, 1564, 1565, 464, 441, - /* 1010 */ 459, 118, 1101, 175, 411, 1577, 245, 1562, 468, 1564, - /* 1020 */ 1565, 464, 466, 459, 1518, 1599, 223, 412, 421, 1687, - /* 1030 */ 415, 137, 465, 1121, 104, 419, 1533, 1657, 179, 182, - /* 1040 */ 422, 430, 136, 472, 1667, 185, 1685, 188, 438, 1561, - /* 1050 */ 427, 269, 5, 445, 74, 1562, 468, 1564, 1565, 464, - /* 1060 */ 433, 459, 426, 1647, 1626, 1666, 4, 1211, 1625, 1622, - /* 1070 */ 102, 103, 192, 1577, 129, 194, 1120, 1641, 37, 1561, - /* 1080 */ 466, 16, 271, 451, 195, 196, 1633, 440, 454, 439, - /* 1090 */ 465, 1488, 1687, 1684, 1533, 1702, 201, 1607, 470, 471, - /* 1100 */ 224, 475, 1487, 1577, 210, 136, 279, 212, 476, 1685, - /* 1110 */ 463, 61, 74, 1562, 468, 1564, 1565, 464, 477, 459, - /* 1120 */ 465, 63, 1626, 485, 1533, 1370, 455, 1622, 1561, 1398, - /* 1130 */ 226, 219, 563, 43, 128, 232, 233, 1561, 228, 1095, - /* 1140 */ 230, 1527, 245, 1562, 468, 1564, 1565, 464, 462, 459, - /* 1150 */ 457, 1598, 1577, 1526, 294, 1093, 1523, 296, 297, 466, - /* 1160 */ 1089, 1577, 1090, 140, 301, 1521, 303, 304, 466, 465, - /* 1170 */ 307, 305, 1520, 1533, 1101, 1561, 1519, 309, 465, 1504, - /* 1180 */ 141, 312, 1533, 313, 1068, 1067, 1498, 1561, 1497, 318, - /* 1190 */ 319, 125, 1562, 468, 1564, 1565, 464, 1496, 459, 1577, - /* 1200 */ 74, 1562, 468, 1564, 1565, 464, 466, 459, 1495, 1472, - /* 1210 */ 1626, 1577, 1039, 1471, 564, 1623, 465, 1470, 466, 1469, - /* 1220 */ 1533, 108, 1456, 425, 1468, 1467, 1094, 1466, 465, 1465, - /* 1230 */ 1464, 1463, 1533, 1462, 1461, 446, 1700, 1460, 246, 1562, - /* 1240 */ 468, 1564, 1565, 464, 1459, 459, 1561, 1458, 1457, 1455, - /* 1250 */ 241, 1562, 468, 1564, 1565, 464, 1454, 459, 1453, 1561, - /* 1260 */ 1452, 1451, 1041, 1096, 1450, 1449, 1448, 1447, 1328, 1512, - /* 1270 */ 1577, 154, 1376, 1327, 897, 1325, 361, 466, 1506, 1494, - /* 1280 */ 1485, 362, 363, 1577, 1099, 1100, 1323, 465, 437, 365, - /* 1290 */ 466, 1533, 1321, 366, 276, 367, 371, 369, 370, 1319, - /* 1300 */ 465, 373, 1308, 1307, 1533, 1304, 374, 274, 1378, 246, - /* 1310 */ 1562, 468, 1564, 1565, 464, 76, 459, 1561, 1005, 375, - /* 1320 */ 1008, 1377, 246, 1562, 468, 1564, 1565, 464, 929, 459, - /* 1330 */ 1317, 161, 928, 1561, 262, 927, 926, 1312, 923, 263, - /* 1340 */ 1310, 1577, 922, 1303, 264, 1561, 399, 402, 466, 404, - /* 1350 */ 1302, 406, 530, 75, 532, 1511, 46, 1577, 465, 1505, - /* 1360 */ 413, 1075, 1533, 119, 466, 278, 1493, 1492, 1484, 1577, - /* 1370 */ 186, 178, 38, 414, 465, 181, 466, 3, 1533, 1374, - /* 1380 */ 246, 1562, 468, 1564, 1565, 464, 465, 459, 56, 35, - /* 1390 */ 1533, 13, 1561, 40, 1236, 41, 234, 1562, 468, 1564, - /* 1400 */ 1565, 464, 126, 459, 14, 1561, 1229, 183, 240, 1562, - /* 1410 */ 468, 1564, 1565, 464, 1208, 459, 1577, 191, 190, 20, - /* 1420 */ 1552, 57, 21, 466, 39, 15, 11, 1207, 197, 1577, - /* 1430 */ 58, 1263, 1258, 465, 135, 1257, 466, 1533, 1372, 272, - /* 1440 */ 106, 1262, 1261, 1561, 513, 273, 465, 8, 17, 1154, - /* 1450 */ 1533, 1171, 458, 1139, 27, 242, 1562, 468, 1564, 1565, - /* 1460 */ 464, 1153, 459, 1152, 205, 10, 516, 1577, 235, 1562, - /* 1470 */ 468, 1564, 1565, 464, 466, 459, 138, 1234, 204, 18, - /* 1480 */ 467, 1483, 19, 207, 465, 512, 511, 510, 1533, 509, - /* 1490 */ 209, 59, 211, 1561, 213, 60, 473, 64, 1551, 106, - /* 1500 */ 216, 1111, 42, 513, 484, 990, 243, 1562, 468, 1564, - /* 1510 */ 1565, 464, 486, 459, 286, 488, 490, 1577, 987, 984, - /* 1520 */ 491, 493, 494, 1561, 466, 516, 978, 496, 497, 499, - /* 1530 */ 976, 500, 982, 967, 465, 981, 980, 506, 1533, 979, - /* 1540 */ 65, 1002, 66, 67, 512, 511, 510, 1577, 509, 995, - /* 1550 */ 998, 1001, 895, 936, 466, 517, 236, 1562, 468, 1564, - /* 1560 */ 1565, 464, 519, 459, 465, 911, 218, 918, 1533, 917, - /* 1570 */ 916, 1561, 915, 914, 913, 912, 933, 931, 908, 907, - /* 1580 */ 1561, 543, 906, 903, 902, 901, 244, 1562, 468, 1564, - /* 1590 */ 1565, 464, 900, 459, 1324, 1577, 541, 542, 1322, 546, - /* 1600 */ 545, 1320, 466, 547, 1577, 549, 550, 551, 1318, 553, - /* 1610 */ 554, 466, 465, 1306, 557, 555, 1533, 558, 1305, 1301, - /* 1620 */ 562, 465, 561, 566, 1097, 1533, 227, 565, 1561, 1276, - /* 1630 */ 1276, 1276, 1276, 1276, 237, 1562, 468, 1564, 1565, 464, - /* 1640 */ 1276, 459, 1276, 1573, 1562, 468, 1564, 1565, 464, 1276, - /* 1650 */ 459, 1276, 1577, 1276, 1276, 1276, 1561, 1276, 1276, 466, - /* 1660 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 465, - /* 1670 */ 1276, 1276, 1276, 1533, 1276, 1276, 1276, 1276, 1276, 1276, - /* 1680 */ 1577, 1276, 1276, 1276, 1276, 1276, 1276, 466, 1276, 1276, - /* 1690 */ 1276, 1572, 1562, 468, 1564, 1565, 464, 465, 459, 1276, - /* 1700 */ 1276, 1533, 1276, 1276, 1276, 1276, 1276, 1561, 1276, 1276, - /* 1710 */ 1276, 1276, 1276, 1276, 1276, 1276, 1561, 1276, 1276, 1571, - /* 1720 */ 1562, 468, 1564, 1565, 464, 1276, 459, 1276, 1276, 1276, - /* 1730 */ 1276, 1577, 1276, 1276, 1276, 1276, 1276, 1276, 466, 1276, - /* 1740 */ 1577, 1276, 1276, 1276, 1276, 1276, 1276, 466, 465, 1276, - /* 1750 */ 1276, 1276, 1533, 1276, 1276, 1276, 1276, 465, 1276, 1276, - /* 1760 */ 1276, 1533, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, - /* 1770 */ 253, 1562, 468, 1564, 1565, 464, 1276, 459, 1276, 252, - /* 1780 */ 1562, 468, 1564, 1565, 464, 1276, 459, 1561, 1276, 1276, - /* 1790 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, - /* 1800 */ 1276, 1276, 1276, 1561, 1276, 1276, 1276, 1276, 1276, 1276, - /* 1810 */ 1276, 1577, 1276, 1276, 1276, 1276, 1276, 1276, 466, 1276, - /* 1820 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1577, 465, 1276, - /* 1830 */ 1276, 1276, 1533, 1276, 466, 1276, 1276, 1276, 1276, 1276, - /* 1840 */ 1276, 1276, 1276, 1276, 465, 1276, 1276, 1276, 1533, 1276, - /* 1850 */ 254, 1562, 468, 1564, 1565, 464, 1276, 459, 1561, 1276, - /* 1860 */ 1276, 1276, 1276, 1276, 1276, 1276, 251, 1562, 468, 1564, - /* 1870 */ 1565, 464, 1276, 459, 1276, 1276, 1276, 1276, 1276, 1276, - /* 1880 */ 1276, 1276, 1577, 1276, 1276, 1276, 1276, 1276, 1276, 466, - /* 1890 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 465, - /* 1900 */ 1276, 1276, 1276, 1533, 1276, 1276, 1276, 1276, 1276, 1276, - /* 1910 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, - /* 1920 */ 1276, 239, 1562, 468, 1564, 1565, 464, 1276, 459, + /* 160 */ 79, 78, 1440, 469, 1, 518, 280, 1100, 1101, 1491, + /* 170 */ 1145, 1146, 1147, 1148, 1149, 1150, 1151, 461, 1156, 1157, + /* 180 */ 1158, 1159, 1160, 1161, 1162, 1097, 434, 564, 431, 395, + /* 190 */ 316, 389, 315, 560, 559, 394, 36, 137, 101, 1095, + /* 200 */ 390, 388, 137, 391, 55, 266, 1100, 1101, 174, 1145, + /* 210 */ 1146, 1147, 1148, 1149, 1150, 1151, 461, 1156, 1157, 1158, + /* 220 */ 1159, 1160, 1161, 1162, 482, 482, 482, 441, 482, 931, + /* 230 */ 33, 31, 452, 322, 330, 331, 1097, 358, 277, 880, + /* 240 */ 1096, 879, 137, 34, 32, 30, 29, 28, 933, 1399, + /* 250 */ 1399, 1399, 104, 1399, 436, 432, 1094, 1100, 1101, 881, + /* 260 */ 1145, 1146, 1147, 1148, 1149, 1150, 1151, 461, 1156, 1157, + /* 270 */ 1158, 1159, 1160, 1161, 1162, 1102, 33, 31, 1163, 385, + /* 280 */ 384, 250, 345, 143, 277, 1300, 1096, 1328, 102, 521, + /* 290 */ 87, 1371, 7, 86, 85, 84, 83, 82, 81, 80, + /* 300 */ 79, 78, 1094, 133, 1636, 1637, 1132, 1641, 281, 51, + /* 310 */ 1119, 395, 50, 389, 1180, 564, 121, 394, 137, 137, + /* 320 */ 101, 1102, 390, 388, 1401, 391, 1242, 1095, 147, 146, + /* 330 */ 1535, 317, 260, 34, 32, 30, 29, 28, 7, 540, + /* 340 */ 539, 538, 537, 292, 879, 536, 535, 534, 107, 529, + /* 350 */ 528, 527, 526, 525, 524, 523, 522, 114, 100, 53, + /* 360 */ 378, 564, 383, 1181, 1097, 428, 1240, 1241, 1243, 1244, + /* 370 */ 1690, 124, 99, 1095, 261, 1357, 259, 258, 453, 382, + /* 380 */ 1394, 1186, 435, 136, 386, 1100, 1101, 1688, 1145, 1146, + /* 390 */ 1147, 1148, 1149, 1150, 1151, 461, 1156, 1157, 1158, 1159, + /* 400 */ 1160, 1161, 1162, 441, 33, 31, 393, 392, 441, 532, + /* 410 */ 1097, 1120, 277, 311, 1096, 137, 25, 275, 1175, 1176, + /* 420 */ 1177, 1178, 1179, 1183, 1184, 1185, 515, 514, 104, 456, + /* 430 */ 1094, 1100, 1101, 104, 1145, 1146, 1147, 1148, 1149, 1150, + /* 440 */ 1151, 461, 1156, 1157, 1158, 1159, 1160, 1161, 1162, 1102, + /* 450 */ 33, 31, 445, 482, 409, 287, 69, 1096, 277, 120, + /* 460 */ 1096, 1448, 1396, 121, 102, 1121, 7, 282, 905, 102, + /* 470 */ 105, 1401, 1446, 1094, 9, 8, 1094, 1391, 1399, 134, + /* 480 */ 1636, 1637, 449, 1641, 196, 1636, 440, 906, 439, 564, + /* 490 */ 1376, 1690, 1102, 1690, 1299, 1102, 34, 32, 30, 29, + /* 500 */ 28, 1095, 1318, 1118, 136, 1298, 136, 518, 1688, 1297, + /* 510 */ 1688, 1296, 1, 969, 505, 504, 503, 973, 502, 975, + /* 520 */ 976, 501, 978, 498, 396, 984, 495, 986, 987, 492, + /* 530 */ 489, 247, 564, 1117, 288, 564, 482, 508, 1097, 1535, + /* 540 */ 338, 1482, 1484, 350, 1095, 1516, 1172, 1095, 1194, 1295, + /* 550 */ 1535, 106, 351, 100, 1535, 513, 1535, 383, 1313, 1100, + /* 560 */ 1101, 1399, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 461, + /* 570 */ 1156, 1157, 1158, 1159, 1160, 1161, 1162, 516, 1479, 386, + /* 580 */ 398, 1097, 482, 198, 1097, 145, 34, 32, 30, 29, + /* 590 */ 28, 479, 225, 1448, 1535, 1429, 512, 511, 510, 289, + /* 600 */ 509, 520, 1100, 1101, 1446, 1100, 1101, 1399, 1145, 1146, + /* 610 */ 1147, 1148, 1149, 1150, 1151, 461, 1156, 1157, 1158, 1159, + /* 620 */ 1160, 1161, 1162, 1563, 250, 349, 450, 1294, 344, 343, + /* 630 */ 342, 341, 340, 1384, 337, 336, 335, 334, 333, 329, + /* 640 */ 328, 327, 326, 325, 324, 448, 482, 1579, 34, 32, + /* 650 */ 30, 29, 28, 482, 444, 480, 567, 1180, 1182, 290, + /* 660 */ 482, 1386, 217, 1293, 465, 533, 531, 121, 1535, 291, + /* 670 */ 221, 1399, 1535, 98, 1563, 1401, 1187, 1290, 1399, 556, + /* 680 */ 1289, 552, 548, 544, 220, 1399, 73, 1564, 468, 1566, + /* 690 */ 1567, 464, 1122, 459, 1648, 1213, 1629, 6, 1579, 1643, + /* 700 */ 270, 1625, 131, 1288, 1287, 444, 1181, 1448, 1535, 1286, + /* 710 */ 70, 23, 1285, 215, 199, 465, 24, 1382, 1483, 1535, + /* 720 */ 424, 1656, 1535, 1640, 1186, 1535, 34, 32, 30, 29, + /* 730 */ 28, 30, 29, 28, 1448, 1284, 1217, 73, 1564, 468, + /* 740 */ 1566, 1567, 464, 478, 459, 1447, 1643, 1629, 1535, 1535, + /* 750 */ 1225, 270, 1625, 131, 1535, 1563, 1119, 1535, 400, 25, + /* 760 */ 275, 1175, 1176, 1177, 1178, 1179, 1183, 1184, 1185, 1283, + /* 770 */ 1639, 423, 1657, 408, 180, 1272, 1524, 1311, 1643, 1579, + /* 780 */ 1535, 34, 32, 30, 29, 28, 466, 173, 1168, 1074, + /* 790 */ 403, 176, 1282, 177, 1119, 397, 465, 121, 308, 401, + /* 800 */ 1535, 172, 1638, 165, 167, 1402, 163, 166, 1082, 1083, + /* 810 */ 184, 1563, 300, 169, 1535, 460, 168, 310, 73, 1564, + /* 820 */ 468, 1566, 1567, 464, 507, 459, 171, 45, 1629, 170, + /* 830 */ 44, 416, 270, 1625, 1702, 1579, 1374, 1535, 407, 1292, + /* 840 */ 122, 1563, 466, 1663, 1132, 231, 9, 8, 1358, 112, + /* 850 */ 1213, 405, 465, 420, 1271, 447, 1535, 229, 47, 187, + /* 860 */ 1274, 1275, 1239, 189, 35, 1579, 200, 1441, 1188, 35, + /* 870 */ 148, 1563, 466, 1152, 73, 1564, 468, 1566, 1567, 464, + /* 880 */ 1556, 459, 465, 429, 1629, 1105, 1535, 410, 270, 1625, + /* 890 */ 1702, 377, 1554, 1104, 35, 1579, 193, 106, 1057, 1686, + /* 900 */ 68, 513, 466, 442, 73, 1564, 468, 1566, 1567, 464, + /* 910 */ 64, 459, 465, 206, 1629, 1659, 1535, 208, 270, 1625, + /* 920 */ 1702, 445, 1580, 516, 109, 202, 1563, 110, 474, 1647, + /* 930 */ 1216, 214, 2, 71, 238, 1564, 468, 1566, 1567, 464, + /* 940 */ 1117, 459, 512, 511, 510, 112, 509, 47, 487, 962, + /* 950 */ 1579, 957, 990, 295, 299, 255, 1108, 466, 1066, 222, + /* 960 */ 1690, 49, 48, 320, 1107, 142, 931, 465, 144, 332, + /* 970 */ 314, 1535, 257, 136, 110, 1481, 1563, 1688, 994, 111, + /* 980 */ 339, 112, 256, 1001, 306, 1000, 302, 298, 139, 74, + /* 990 */ 1564, 468, 1566, 1567, 464, 347, 459, 346, 110, 1629, + /* 1000 */ 1579, 348, 113, 1628, 1625, 1126, 353, 466, 352, 354, + /* 1010 */ 1125, 149, 152, 356, 355, 1124, 357, 465, 360, 137, + /* 1020 */ 160, 1535, 155, 130, 1563, 52, 158, 1123, 379, 376, + /* 1030 */ 381, 372, 368, 364, 159, 1563, 97, 1389, 265, 74, + /* 1040 */ 1564, 468, 1566, 1567, 464, 1102, 459, 162, 1579, 1629, + /* 1050 */ 1520, 1385, 164, 455, 1625, 463, 115, 116, 1387, 1579, + /* 1060 */ 54, 175, 1383, 157, 223, 465, 466, 117, 118, 1535, + /* 1070 */ 411, 419, 415, 412, 179, 1122, 465, 182, 421, 1670, + /* 1080 */ 1535, 422, 1660, 430, 472, 1669, 427, 245, 1564, 468, + /* 1090 */ 1566, 1567, 464, 462, 459, 457, 1601, 185, 125, 1564, + /* 1100 */ 468, 1566, 1567, 464, 188, 459, 1563, 269, 284, 283, + /* 1110 */ 5, 433, 438, 103, 426, 4, 1644, 1121, 1110, 1213, + /* 1120 */ 156, 1650, 151, 37, 153, 271, 451, 454, 16, 1490, + /* 1130 */ 1579, 1489, 195, 470, 1103, 129, 1563, 466, 471, 1610, + /* 1140 */ 194, 150, 446, 1703, 1563, 192, 475, 465, 476, 279, + /* 1150 */ 210, 1535, 477, 1102, 212, 63, 1400, 61, 224, 1687, + /* 1160 */ 1579, 201, 1372, 1705, 226, 219, 563, 466, 1579, 74, + /* 1170 */ 1564, 468, 1566, 1567, 464, 466, 459, 465, 128, 1629, + /* 1180 */ 485, 1535, 43, 232, 1626, 465, 233, 228, 230, 1535, + /* 1190 */ 1529, 1563, 425, 483, 1528, 294, 1525, 296, 297, 241, + /* 1200 */ 1564, 468, 1566, 1567, 464, 1106, 459, 246, 1564, 468, + /* 1210 */ 1566, 1567, 464, 1090, 459, 1579, 1091, 140, 1523, 303, + /* 1220 */ 301, 304, 466, 305, 1522, 307, 1521, 309, 1506, 141, + /* 1230 */ 312, 313, 465, 1069, 1068, 1500, 1535, 437, 1040, 274, + /* 1240 */ 1499, 1563, 1111, 319, 318, 1498, 1497, 1474, 1473, 1472, + /* 1250 */ 1471, 1470, 1469, 1468, 246, 1564, 468, 1566, 1567, 464, + /* 1260 */ 1467, 459, 1466, 1114, 1465, 1579, 1464, 1463, 1462, 1461, + /* 1270 */ 1460, 1459, 463, 108, 1458, 1457, 1456, 1455, 1454, 1563, + /* 1280 */ 1453, 1042, 465, 1452, 1451, 1450, 1535, 1449, 1330, 1514, + /* 1290 */ 1563, 1508, 1496, 1487, 1378, 898, 1329, 154, 1327, 361, + /* 1300 */ 363, 362, 1325, 1579, 245, 1564, 468, 1566, 1567, 464, + /* 1310 */ 466, 459, 1323, 1602, 1579, 367, 371, 365, 366, 369, + /* 1320 */ 465, 466, 370, 1321, 1535, 1310, 1309, 276, 373, 1306, + /* 1330 */ 1380, 465, 1006, 374, 530, 1535, 161, 1009, 278, 1279, + /* 1340 */ 1379, 76, 246, 1564, 468, 1566, 1567, 464, 1563, 459, + /* 1350 */ 1319, 375, 930, 246, 1564, 468, 1566, 1567, 464, 929, + /* 1360 */ 459, 1563, 928, 96, 95, 94, 93, 92, 91, 90, + /* 1370 */ 89, 88, 1579, 927, 532, 924, 923, 262, 1314, 466, + /* 1380 */ 263, 399, 1312, 264, 402, 1579, 1305, 404, 1304, 465, + /* 1390 */ 406, 75, 466, 1535, 1513, 1076, 1507, 413, 1495, 1563, + /* 1400 */ 1494, 1486, 465, 181, 3, 56, 1535, 119, 1563, 13, + /* 1410 */ 126, 234, 1564, 468, 1566, 1567, 464, 190, 459, 35, + /* 1420 */ 41, 14, 186, 1579, 240, 1564, 468, 1566, 1567, 464, + /* 1430 */ 466, 459, 1579, 46, 1238, 191, 178, 20, 414, 466, + /* 1440 */ 465, 1231, 40, 57, 1535, 21, 1563, 1210, 1554, 465, + /* 1450 */ 183, 1209, 39, 1535, 1265, 15, 197, 58, 1260, 135, + /* 1460 */ 1259, 1563, 242, 1564, 468, 1566, 1567, 464, 272, 459, + /* 1470 */ 1579, 235, 1564, 468, 1566, 1567, 464, 466, 459, 1264, + /* 1480 */ 1263, 273, 8, 1173, 17, 1579, 1155, 465, 458, 138, + /* 1490 */ 1154, 1535, 466, 27, 204, 1140, 1153, 10, 18, 19, + /* 1500 */ 38, 467, 465, 205, 1236, 1485, 1535, 11, 207, 243, + /* 1510 */ 1564, 468, 1566, 1567, 464, 211, 459, 64, 209, 473, + /* 1520 */ 59, 60, 213, 1553, 236, 1564, 468, 1566, 1567, 464, + /* 1530 */ 1563, 459, 1112, 42, 216, 484, 991, 486, 1563, 286, + /* 1540 */ 488, 490, 988, 491, 493, 985, 979, 496, 494, 497, + /* 1550 */ 499, 977, 968, 500, 1579, 983, 982, 981, 65, 980, + /* 1560 */ 1003, 466, 1579, 1002, 506, 66, 67, 999, 1563, 466, + /* 1570 */ 996, 465, 896, 517, 937, 1535, 519, 919, 218, 465, + /* 1580 */ 918, 917, 916, 1535, 915, 914, 912, 913, 932, 934, + /* 1590 */ 909, 908, 1579, 244, 1564, 468, 1566, 1567, 464, 466, + /* 1600 */ 459, 237, 1564, 468, 1566, 1567, 464, 1326, 459, 465, + /* 1610 */ 907, 904, 903, 1535, 902, 901, 1563, 541, 542, 1324, + /* 1620 */ 1322, 543, 545, 546, 547, 550, 549, 1320, 551, 553, + /* 1630 */ 554, 1575, 1564, 468, 1566, 1567, 464, 1308, 459, 555, + /* 1640 */ 1579, 557, 558, 1307, 1303, 561, 562, 466, 1098, 566, + /* 1650 */ 227, 565, 1278, 1278, 1563, 1278, 1278, 465, 1278, 1278, + /* 1660 */ 1278, 1535, 1278, 1563, 1278, 1278, 1278, 1278, 1278, 1278, + /* 1670 */ 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1579, 1574, + /* 1680 */ 1564, 468, 1566, 1567, 464, 466, 459, 1579, 1278, 1278, + /* 1690 */ 1278, 1278, 1278, 1278, 466, 465, 1278, 1278, 1278, 1535, + /* 1700 */ 1278, 1563, 1278, 1278, 465, 1278, 1278, 1278, 1535, 1278, + /* 1710 */ 1278, 1278, 1278, 1278, 1278, 1278, 1563, 1573, 1564, 468, + /* 1720 */ 1566, 1567, 464, 1278, 459, 1579, 253, 1564, 468, 1566, + /* 1730 */ 1567, 464, 466, 459, 1278, 1278, 1278, 1278, 1278, 1278, + /* 1740 */ 1579, 1278, 465, 1278, 1278, 1278, 1535, 466, 1278, 1278, + /* 1750 */ 1278, 1278, 1278, 1278, 1563, 1278, 1278, 465, 1278, 1278, + /* 1760 */ 1278, 1535, 1278, 1278, 252, 1564, 468, 1566, 1567, 464, + /* 1770 */ 1278, 459, 1278, 1278, 1278, 1278, 1278, 1278, 1579, 254, + /* 1780 */ 1564, 468, 1566, 1567, 464, 466, 459, 1278, 1278, 1278, + /* 1790 */ 1278, 1278, 1563, 1278, 1278, 465, 1278, 1278, 1278, 1535, + /* 1800 */ 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, + /* 1810 */ 1278, 1278, 1278, 1278, 1278, 1278, 1579, 251, 1564, 468, + /* 1820 */ 1566, 1567, 464, 466, 459, 1278, 1278, 1278, 1278, 1278, + /* 1830 */ 1278, 1278, 1278, 465, 1278, 1278, 1278, 1535, 1278, 1278, + /* 1840 */ 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, 1278, + /* 1850 */ 1278, 1278, 1278, 1278, 1278, 239, 1564, 468, 1566, 1567, + /* 1860 */ 464, 1278, 459, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 222, 311, 247, 222, 250, 296, 297, 228, 228, 219, - /* 10 */ 263, 267, 12, 13, 324, 222, 269, 237, 328, 222, - /* 20 */ 20, 267, 22, 250, 244, 281, 282, 246, 12, 13, - /* 30 */ 14, 15, 16, 253, 253, 281, 282, 258, 38, 246, - /* 40 */ 267, 20, 230, 228, 263, 267, 253, 228, 267, 20, - /* 50 */ 50, 12, 13, 14, 281, 282, 263, 57, 20, 20, - /* 60 */ 267, 22, 272, 251, 267, 272, 285, 286, 287, 288, - /* 70 */ 289, 290, 253, 292, 74, 228, 49, 38, 285, 286, - /* 80 */ 287, 288, 289, 290, 237, 292, 0, 272, 295, 50, - /* 90 */ 228, 75, 299, 300, 231, 74, 57, 97, 235, 237, - /* 100 */ 253, 311, 12, 13, 311, 221, 244, 223, 289, 109, - /* 110 */ 20, 330, 22, 74, 324, 253, 0, 324, 328, 20, - /* 120 */ 2, 328, 303, 304, 305, 306, 311, 308, 38, 0, - /* 130 */ 12, 13, 14, 15, 16, 49, 97, 0, 246, 324, - /* 140 */ 50, 225, 226, 328, 252, 246, 146, 57, 109, 257, - /* 150 */ 21, 245, 253, 24, 25, 26, 27, 28, 29, 30, - /* 160 */ 31, 32, 256, 263, 74, 49, 266, 167, 168, 269, + /* 0 */ 223, 312, 248, 223, 251, 297, 298, 229, 229, 220, + /* 10 */ 264, 268, 12, 13, 325, 223, 270, 238, 329, 223, + /* 20 */ 20, 268, 22, 251, 245, 282, 283, 247, 12, 13, + /* 30 */ 14, 15, 16, 254, 254, 282, 283, 259, 38, 247, + /* 40 */ 268, 20, 231, 229, 264, 268, 254, 229, 268, 223, + /* 50 */ 50, 12, 13, 14, 282, 283, 264, 57, 20, 20, + /* 60 */ 268, 22, 273, 252, 268, 273, 286, 287, 288, 289, + /* 70 */ 290, 291, 254, 293, 74, 229, 49, 38, 286, 287, + /* 80 */ 288, 289, 290, 291, 238, 293, 0, 273, 296, 50, + /* 90 */ 229, 75, 300, 301, 268, 74, 57, 97, 228, 238, + /* 100 */ 254, 312, 12, 13, 312, 222, 245, 224, 290, 109, + /* 110 */ 20, 331, 22, 74, 325, 254, 0, 325, 329, 249, + /* 120 */ 2, 329, 304, 305, 306, 307, 312, 309, 38, 0, + /* 130 */ 12, 13, 14, 15, 16, 49, 97, 0, 247, 325, + /* 140 */ 50, 20, 20, 329, 253, 247, 146, 57, 109, 258, + /* 150 */ 21, 246, 254, 24, 25, 26, 27, 28, 29, 30, + /* 160 */ 31, 32, 257, 264, 74, 49, 267, 167, 168, 270, /* 170 */ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - /* 180 */ 180, 181, 182, 183, 230, 146, 287, 97, 136, 52, - /* 190 */ 145, 54, 147, 222, 20, 58, 196, 243, 61, 109, - /* 200 */ 63, 64, 222, 66, 283, 251, 167, 168, 22, 170, + /* 180 */ 180, 181, 182, 183, 184, 146, 288, 97, 136, 52, + /* 190 */ 145, 54, 147, 226, 227, 58, 74, 197, 61, 109, + /* 200 */ 63, 64, 197, 66, 155, 156, 167, 168, 159, 170, /* 210 */ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - /* 220 */ 181, 182, 183, 61, 38, 196, 228, 65, 307, 12, - /* 230 */ 13, 12, 13, 14, 15, 16, 146, 20, 267, 22, - /* 240 */ 38, 196, 12, 13, 14, 15, 16, 267, 74, 87, - /* 250 */ 196, 253, 0, 201, 202, 38, 228, 167, 168, 57, + /* 220 */ 181, 182, 183, 184, 229, 229, 229, 229, 229, 38, + /* 230 */ 12, 13, 71, 238, 238, 238, 146, 238, 20, 20, + /* 240 */ 22, 22, 197, 12, 13, 14, 15, 16, 57, 254, + /* 250 */ 254, 254, 254, 254, 202, 203, 38, 167, 168, 40, /* 260 */ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - /* 270 */ 180, 181, 182, 183, 57, 12, 13, 14, 155, 156, - /* 280 */ 50, 253, 159, 20, 20, 22, 0, 289, 36, 21, - /* 290 */ 222, 74, 24, 25, 26, 27, 28, 29, 30, 31, - /* 300 */ 32, 38, 304, 305, 306, 75, 308, 238, 1, 2, - /* 310 */ 52, 20, 54, 83, 97, 246, 58, 289, 20, 61, - /* 320 */ 57, 63, 64, 254, 66, 272, 109, 167, 14, 15, - /* 330 */ 16, 35, 304, 305, 306, 267, 308, 74, 52, 53, - /* 340 */ 54, 55, 56, 20, 58, 59, 60, 61, 62, 63, - /* 350 */ 64, 65, 66, 67, 68, 69, 70, 61, 232, 233, - /* 360 */ 97, 65, 132, 146, 311, 205, 206, 207, 208, 209, - /* 370 */ 196, 239, 109, 77, 242, 79, 80, 324, 82, 222, - /* 380 */ 150, 328, 75, 87, 167, 168, 3, 170, 171, 172, - /* 390 */ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - /* 400 */ 183, 71, 12, 13, 12, 13, 14, 15, 16, 146, - /* 410 */ 20, 227, 22, 196, 184, 185, 186, 187, 188, 189, - /* 420 */ 190, 191, 192, 193, 267, 241, 47, 272, 38, 138, - /* 430 */ 167, 168, 248, 170, 171, 172, 173, 174, 175, 176, - /* 440 */ 177, 178, 179, 180, 181, 182, 183, 57, 12, 13, - /* 450 */ 12, 13, 73, 4, 255, 76, 20, 246, 22, 2, - /* 460 */ 22, 262, 263, 252, 74, 4, 311, 246, 257, 12, - /* 470 */ 13, 14, 15, 16, 38, 228, 38, 222, 257, 324, - /* 480 */ 19, 283, 238, 328, 237, 71, 20, 97, 22, 75, - /* 490 */ 246, 232, 233, 57, 33, 57, 67, 36, 254, 109, - /* 500 */ 253, 222, 41, 43, 222, 307, 40, 234, 47, 236, - /* 510 */ 74, 88, 89, 90, 91, 92, 93, 94, 95, 96, - /* 520 */ 97, 98, 267, 100, 101, 102, 103, 104, 105, 18, - /* 530 */ 138, 20, 238, 97, 73, 97, 146, 76, 27, 49, - /* 540 */ 246, 30, 113, 114, 214, 109, 267, 109, 254, 267, - /* 550 */ 39, 12, 13, 14, 15, 16, 222, 167, 168, 283, - /* 560 */ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - /* 570 */ 180, 181, 182, 183, 12, 13, 14, 15, 16, 132, - /* 580 */ 222, 85, 146, 307, 146, 232, 233, 232, 233, 50, - /* 590 */ 12, 13, 14, 15, 16, 212, 20, 150, 1, 2, - /* 600 */ 227, 267, 222, 167, 168, 167, 170, 171, 172, 173, - /* 610 */ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - /* 620 */ 222, 248, 83, 112, 57, 267, 115, 116, 117, 118, - /* 630 */ 119, 184, 121, 122, 123, 124, 125, 126, 127, 128, - /* 640 */ 129, 130, 131, 228, 246, 228, 197, 267, 228, 19, - /* 650 */ 246, 253, 237, 75, 237, 195, 246, 237, 254, 194, - /* 660 */ 195, 263, 252, 33, 222, 267, 36, 257, 253, 228, - /* 670 */ 253, 132, 42, 253, 44, 45, 46, 47, 237, 157, - /* 680 */ 158, 246, 275, 285, 286, 287, 288, 289, 290, 150, - /* 690 */ 292, 228, 257, 295, 253, 228, 223, 299, 300, 301, - /* 700 */ 237, 139, 222, 73, 237, 222, 76, 71, 253, 267, - /* 710 */ 222, 313, 228, 228, 138, 260, 253, 319, 320, 247, - /* 720 */ 253, 237, 237, 184, 185, 186, 187, 188, 189, 190, - /* 730 */ 191, 192, 193, 14, 246, 0, 106, 253, 253, 20, - /* 740 */ 228, 253, 78, 142, 50, 81, 222, 267, 222, 237, - /* 750 */ 267, 263, 222, 222, 14, 267, 222, 22, 21, 331, - /* 760 */ 20, 247, 161, 78, 134, 253, 81, 137, 222, 78, - /* 770 */ 247, 34, 81, 285, 286, 287, 288, 289, 290, 217, - /* 780 */ 292, 322, 152, 295, 154, 0, 74, 299, 300, 301, - /* 790 */ 0, 267, 246, 267, 181, 182, 84, 267, 267, 253, - /* 800 */ 78, 267, 0, 81, 247, 247, 247, 22, 320, 263, - /* 810 */ 235, 256, 279, 267, 24, 25, 26, 27, 28, 29, - /* 820 */ 30, 31, 32, 71, 22, 71, 222, 75, 225, 75, - /* 830 */ 74, 285, 286, 287, 288, 289, 290, 316, 292, 71, - /* 840 */ 284, 295, 86, 75, 71, 299, 300, 301, 75, 309, - /* 850 */ 246, 71, 216, 18, 38, 75, 310, 253, 23, 71, - /* 860 */ 71, 167, 38, 75, 75, 246, 33, 263, 38, 36, - /* 870 */ 35, 267, 71, 57, 325, 42, 75, 44, 45, 46, - /* 880 */ 47, 71, 312, 48, 222, 75, 20, 228, 36, 285, - /* 890 */ 286, 287, 288, 289, 290, 280, 292, 71, 38, 295, - /* 900 */ 232, 75, 144, 299, 300, 301, 73, 71, 246, 76, - /* 910 */ 273, 75, 228, 71, 310, 253, 71, 75, 71, 71, - /* 920 */ 75, 228, 75, 75, 71, 263, 120, 261, 75, 267, - /* 930 */ 132, 259, 259, 109, 228, 277, 20, 230, 263, 109, - /* 940 */ 222, 20, 271, 230, 20, 253, 111, 285, 286, 287, - /* 950 */ 288, 289, 290, 222, 292, 230, 230, 295, 228, 264, - /* 960 */ 20, 299, 300, 301, 246, 224, 133, 246, 135, 230, - /* 970 */ 137, 253, 310, 246, 139, 140, 141, 246, 143, 246, - /* 980 */ 246, 263, 246, 148, 253, 267, 224, 154, 246, 246, - /* 990 */ 272, 222, 246, 246, 263, 160, 246, 162, 267, 164, - /* 1000 */ 165, 166, 228, 285, 286, 287, 288, 289, 290, 228, - /* 1010 */ 292, 246, 57, 227, 153, 246, 285, 286, 287, 288, - /* 1020 */ 289, 290, 253, 292, 267, 294, 277, 276, 253, 311, - /* 1030 */ 263, 196, 263, 20, 253, 271, 267, 284, 227, 227, - /* 1040 */ 264, 204, 324, 203, 321, 268, 328, 268, 210, 222, - /* 1050 */ 267, 267, 211, 272, 285, 286, 287, 288, 289, 290, - /* 1060 */ 267, 292, 199, 318, 295, 321, 198, 195, 299, 300, - /* 1070 */ 289, 253, 317, 246, 315, 314, 20, 283, 120, 222, - /* 1080 */ 253, 74, 218, 213, 302, 304, 305, 306, 215, 308, - /* 1090 */ 263, 268, 311, 327, 267, 332, 326, 298, 267, 267, - /* 1100 */ 242, 135, 268, 246, 253, 324, 267, 227, 265, 328, - /* 1110 */ 253, 227, 285, 286, 287, 288, 289, 290, 264, 292, - /* 1120 */ 263, 74, 295, 249, 267, 236, 299, 300, 222, 253, - /* 1130 */ 228, 227, 224, 274, 278, 240, 240, 222, 229, 22, - /* 1140 */ 220, 0, 285, 286, 287, 288, 289, 290, 291, 292, - /* 1150 */ 293, 294, 246, 0, 64, 38, 0, 38, 163, 253, - /* 1160 */ 38, 246, 38, 38, 163, 0, 38, 38, 253, 263, - /* 1170 */ 38, 163, 0, 267, 57, 222, 0, 38, 263, 0, - /* 1180 */ 74, 150, 267, 149, 109, 146, 0, 222, 0, 53, - /* 1190 */ 142, 285, 286, 287, 288, 289, 290, 0, 292, 246, - /* 1200 */ 285, 286, 287, 288, 289, 290, 253, 292, 0, 0, - /* 1210 */ 295, 246, 86, 0, 97, 300, 263, 0, 253, 0, - /* 1220 */ 267, 120, 0, 270, 0, 0, 109, 0, 263, 0, - /* 1230 */ 0, 0, 267, 0, 0, 329, 330, 0, 285, 286, - /* 1240 */ 287, 288, 289, 290, 0, 292, 222, 0, 0, 0, - /* 1250 */ 285, 286, 287, 288, 289, 290, 0, 292, 0, 222, - /* 1260 */ 0, 0, 22, 146, 0, 0, 0, 0, 0, 0, - /* 1270 */ 246, 43, 0, 0, 51, 0, 38, 253, 0, 0, - /* 1280 */ 0, 36, 43, 246, 167, 168, 0, 263, 323, 38, - /* 1290 */ 253, 267, 0, 36, 270, 43, 43, 38, 36, 0, - /* 1300 */ 263, 38, 0, 0, 267, 0, 36, 270, 0, 285, - /* 1310 */ 286, 287, 288, 289, 290, 83, 292, 222, 22, 43, - /* 1320 */ 38, 0, 285, 286, 287, 288, 289, 290, 38, 292, - /* 1330 */ 0, 81, 38, 222, 22, 38, 38, 0, 38, 22, - /* 1340 */ 0, 246, 38, 0, 22, 222, 39, 38, 253, 22, - /* 1350 */ 0, 22, 71, 20, 71, 0, 138, 246, 263, 0, - /* 1360 */ 22, 38, 267, 151, 253, 270, 0, 0, 0, 246, - /* 1370 */ 75, 135, 194, 138, 263, 43, 253, 71, 267, 0, - /* 1380 */ 285, 286, 287, 288, 289, 290, 263, 292, 74, 71, - /* 1390 */ 267, 200, 222, 138, 75, 71, 285, 286, 287, 288, - /* 1400 */ 289, 290, 74, 292, 200, 222, 75, 133, 285, 286, - /* 1410 */ 287, 288, 289, 290, 75, 292, 246, 71, 74, 74, - /* 1420 */ 86, 74, 71, 253, 71, 71, 200, 75, 86, 246, - /* 1430 */ 4, 75, 38, 263, 86, 38, 253, 267, 0, 38, - /* 1440 */ 61, 38, 38, 222, 65, 38, 263, 2, 71, 75, - /* 1450 */ 267, 167, 74, 22, 74, 285, 286, 287, 288, 289, - /* 1460 */ 290, 75, 292, 75, 75, 74, 87, 246, 285, 286, - /* 1470 */ 287, 288, 289, 290, 253, 292, 86, 75, 86, 74, - /* 1480 */ 169, 0, 74, 74, 263, 106, 107, 108, 267, 110, - /* 1490 */ 74, 74, 43, 222, 133, 74, 136, 84, 86, 61, - /* 1500 */ 86, 22, 74, 65, 85, 75, 285, 286, 287, 288, - /* 1510 */ 289, 290, 38, 292, 38, 74, 38, 246, 75, 75, - /* 1520 */ 74, 38, 74, 222, 253, 87, 75, 38, 74, 38, - /* 1530 */ 75, 74, 99, 22, 263, 99, 99, 87, 267, 99, - /* 1540 */ 74, 38, 74, 74, 106, 107, 108, 246, 110, 22, - /* 1550 */ 38, 109, 51, 57, 253, 50, 285, 286, 287, 288, - /* 1560 */ 289, 290, 72, 292, 263, 22, 71, 38, 267, 38, - /* 1570 */ 38, 222, 38, 38, 38, 38, 57, 38, 38, 38, - /* 1580 */ 222, 43, 38, 38, 38, 38, 285, 286, 287, 288, - /* 1590 */ 289, 290, 38, 292, 0, 246, 38, 36, 0, 36, - /* 1600 */ 38, 0, 253, 43, 246, 38, 36, 43, 0, 38, - /* 1610 */ 36, 253, 263, 0, 38, 43, 267, 37, 0, 0, - /* 1620 */ 21, 263, 22, 20, 22, 267, 22, 21, 222, 333, - /* 1630 */ 333, 333, 333, 333, 285, 286, 287, 288, 289, 290, - /* 1640 */ 333, 292, 333, 285, 286, 287, 288, 289, 290, 333, - /* 1650 */ 292, 333, 246, 333, 333, 333, 222, 333, 333, 253, - /* 1660 */ 333, 333, 333, 333, 333, 333, 333, 333, 333, 263, - /* 1670 */ 333, 333, 333, 267, 333, 333, 333, 333, 333, 333, - /* 1680 */ 246, 333, 333, 333, 333, 333, 333, 253, 333, 333, - /* 1690 */ 333, 285, 286, 287, 288, 289, 290, 263, 292, 333, - /* 1700 */ 333, 267, 333, 333, 333, 333, 333, 222, 333, 333, - /* 1710 */ 333, 333, 333, 333, 333, 333, 222, 333, 333, 285, - /* 1720 */ 286, 287, 288, 289, 290, 333, 292, 333, 333, 333, - /* 1730 */ 333, 246, 333, 333, 333, 333, 333, 333, 253, 333, - /* 1740 */ 246, 333, 333, 333, 333, 333, 333, 253, 263, 333, - /* 1750 */ 333, 333, 267, 333, 333, 333, 333, 263, 333, 333, - /* 1760 */ 333, 267, 333, 333, 333, 333, 333, 333, 333, 333, - /* 1770 */ 285, 286, 287, 288, 289, 290, 333, 292, 333, 285, - /* 1780 */ 286, 287, 288, 289, 290, 333, 292, 222, 333, 333, - /* 1790 */ 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, - /* 1800 */ 333, 333, 333, 222, 333, 333, 333, 333, 333, 333, - /* 1810 */ 333, 246, 333, 333, 333, 333, 333, 333, 253, 333, - /* 1820 */ 333, 333, 333, 333, 333, 333, 333, 246, 263, 333, - /* 1830 */ 333, 333, 267, 333, 253, 333, 333, 333, 333, 333, - /* 1840 */ 333, 333, 333, 333, 263, 333, 333, 333, 267, 333, - /* 1850 */ 285, 286, 287, 288, 289, 290, 333, 292, 222, 333, - /* 1860 */ 333, 333, 333, 333, 333, 333, 285, 286, 287, 288, - /* 1870 */ 289, 290, 333, 292, 333, 333, 333, 333, 333, 333, - /* 1880 */ 333, 333, 246, 333, 333, 333, 333, 333, 333, 253, - /* 1890 */ 333, 333, 333, 333, 333, 333, 333, 333, 333, 263, - /* 1900 */ 333, 333, 333, 267, 333, 333, 333, 333, 333, 333, - /* 1910 */ 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, - /* 1920 */ 333, 285, 286, 287, 288, 289, 290, 333, 292, + /* 270 */ 180, 181, 182, 183, 184, 57, 12, 13, 14, 233, + /* 280 */ 234, 50, 67, 47, 20, 223, 22, 0, 290, 235, + /* 290 */ 21, 237, 74, 24, 25, 26, 27, 28, 29, 30, + /* 300 */ 31, 32, 38, 305, 306, 307, 75, 309, 239, 73, + /* 310 */ 20, 52, 76, 54, 83, 97, 247, 58, 197, 197, + /* 320 */ 61, 57, 63, 64, 255, 66, 167, 109, 113, 114, + /* 330 */ 268, 273, 35, 12, 13, 14, 15, 16, 74, 52, + /* 340 */ 53, 54, 55, 56, 22, 58, 59, 60, 61, 62, + /* 350 */ 63, 64, 65, 66, 67, 68, 69, 70, 61, 231, + /* 360 */ 38, 97, 65, 132, 146, 206, 207, 208, 209, 210, + /* 370 */ 312, 232, 244, 109, 77, 236, 79, 80, 217, 82, + /* 380 */ 252, 150, 20, 325, 87, 167, 168, 329, 170, 171, + /* 390 */ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + /* 400 */ 182, 183, 184, 229, 12, 13, 233, 234, 229, 71, + /* 410 */ 146, 20, 20, 75, 22, 197, 185, 186, 187, 188, + /* 420 */ 189, 190, 191, 192, 193, 194, 233, 234, 254, 50, + /* 430 */ 38, 167, 168, 254, 170, 171, 172, 173, 174, 175, + /* 440 */ 176, 177, 178, 179, 180, 181, 182, 183, 184, 57, + /* 450 */ 12, 13, 273, 229, 273, 239, 228, 22, 20, 138, + /* 460 */ 22, 247, 238, 247, 290, 20, 74, 253, 38, 290, + /* 470 */ 242, 255, 258, 38, 1, 2, 38, 249, 254, 305, + /* 480 */ 306, 307, 71, 309, 305, 306, 307, 57, 309, 97, + /* 490 */ 0, 312, 57, 312, 223, 57, 12, 13, 14, 15, + /* 500 */ 16, 109, 0, 20, 325, 223, 325, 49, 329, 223, + /* 510 */ 329, 223, 74, 88, 89, 90, 91, 92, 93, 94, + /* 520 */ 95, 96, 97, 98, 22, 100, 101, 102, 103, 104, + /* 530 */ 105, 18, 97, 20, 256, 97, 229, 85, 146, 268, + /* 540 */ 27, 263, 264, 30, 109, 238, 167, 109, 75, 223, + /* 550 */ 268, 61, 39, 61, 268, 65, 268, 65, 0, 167, + /* 560 */ 168, 254, 170, 171, 172, 173, 174, 175, 176, 177, + /* 570 */ 178, 179, 180, 181, 182, 183, 184, 87, 254, 87, + /* 580 */ 22, 146, 229, 138, 146, 261, 12, 13, 14, 15, + /* 590 */ 16, 238, 240, 247, 268, 243, 106, 107, 108, 253, + /* 600 */ 110, 57, 167, 168, 258, 167, 168, 254, 170, 171, + /* 610 */ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + /* 620 */ 182, 183, 184, 223, 50, 112, 215, 223, 115, 116, + /* 630 */ 117, 118, 119, 248, 121, 122, 123, 124, 125, 126, + /* 640 */ 127, 128, 129, 130, 131, 3, 229, 247, 12, 13, + /* 650 */ 14, 15, 16, 229, 254, 238, 19, 83, 132, 239, + /* 660 */ 229, 248, 238, 223, 264, 233, 234, 247, 268, 238, + /* 670 */ 33, 254, 268, 36, 223, 255, 150, 223, 254, 42, + /* 680 */ 223, 44, 45, 46, 47, 254, 286, 287, 288, 289, + /* 690 */ 290, 291, 20, 293, 195, 196, 296, 43, 247, 284, + /* 700 */ 300, 301, 302, 223, 223, 254, 132, 247, 268, 223, + /* 710 */ 73, 185, 223, 76, 314, 264, 2, 248, 258, 268, + /* 720 */ 320, 321, 268, 308, 150, 268, 12, 13, 14, 15, + /* 730 */ 16, 14, 15, 16, 247, 223, 4, 286, 287, 288, + /* 740 */ 289, 290, 291, 106, 293, 258, 284, 296, 268, 268, + /* 750 */ 14, 300, 301, 302, 268, 223, 20, 268, 4, 185, + /* 760 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 223, + /* 770 */ 308, 134, 321, 19, 137, 139, 0, 0, 284, 247, + /* 780 */ 268, 12, 13, 14, 15, 16, 254, 33, 14, 152, + /* 790 */ 36, 154, 223, 248, 20, 41, 264, 247, 142, 22, + /* 800 */ 268, 47, 308, 78, 78, 255, 81, 81, 157, 158, + /* 810 */ 138, 223, 36, 78, 268, 248, 81, 161, 286, 287, + /* 820 */ 288, 289, 290, 291, 248, 293, 78, 73, 296, 81, + /* 830 */ 76, 276, 300, 301, 302, 247, 0, 268, 21, 224, + /* 840 */ 18, 223, 254, 311, 75, 23, 1, 2, 236, 71, + /* 850 */ 196, 34, 264, 75, 218, 213, 268, 35, 71, 71, + /* 860 */ 182, 183, 75, 75, 71, 247, 332, 257, 75, 71, + /* 870 */ 48, 223, 254, 75, 286, 287, 288, 289, 290, 291, + /* 880 */ 74, 293, 264, 323, 296, 38, 268, 280, 300, 301, + /* 890 */ 302, 226, 86, 38, 71, 247, 317, 61, 75, 311, + /* 900 */ 74, 65, 254, 310, 286, 287, 288, 289, 290, 291, + /* 910 */ 84, 293, 264, 71, 296, 285, 268, 75, 300, 301, + /* 920 */ 302, 273, 247, 87, 71, 326, 223, 71, 75, 311, + /* 930 */ 198, 75, 313, 111, 286, 287, 288, 289, 290, 291, + /* 940 */ 20, 293, 106, 107, 108, 71, 110, 71, 71, 75, + /* 950 */ 247, 75, 75, 229, 36, 281, 109, 254, 144, 274, + /* 960 */ 312, 139, 140, 141, 109, 143, 38, 264, 120, 229, + /* 970 */ 148, 268, 233, 325, 71, 229, 223, 329, 75, 71, + /* 980 */ 262, 71, 160, 75, 162, 75, 164, 165, 166, 286, + /* 990 */ 287, 288, 289, 290, 291, 132, 293, 260, 71, 296, + /* 1000 */ 247, 260, 75, 300, 301, 20, 278, 254, 229, 264, + /* 1010 */ 20, 231, 231, 254, 272, 20, 265, 264, 229, 197, + /* 1020 */ 33, 268, 231, 36, 223, 231, 231, 20, 225, 42, + /* 1030 */ 247, 44, 45, 46, 47, 223, 229, 247, 225, 286, + /* 1040 */ 287, 288, 289, 290, 291, 57, 293, 247, 247, 296, + /* 1050 */ 268, 247, 247, 300, 301, 254, 247, 247, 247, 247, + /* 1060 */ 73, 228, 247, 76, 278, 264, 254, 247, 247, 268, + /* 1070 */ 153, 272, 264, 277, 228, 20, 264, 228, 254, 322, + /* 1080 */ 268, 265, 285, 205, 204, 322, 268, 286, 287, 288, + /* 1090 */ 289, 290, 291, 292, 293, 294, 295, 269, 286, 287, + /* 1100 */ 288, 289, 290, 291, 269, 293, 223, 268, 12, 13, + /* 1110 */ 212, 268, 211, 254, 200, 199, 284, 20, 22, 196, + /* 1120 */ 133, 319, 135, 120, 137, 219, 214, 216, 74, 269, + /* 1130 */ 247, 269, 303, 268, 38, 316, 223, 254, 268, 299, + /* 1140 */ 315, 154, 330, 331, 223, 318, 135, 264, 266, 268, + /* 1150 */ 254, 268, 265, 57, 228, 74, 254, 228, 243, 328, + /* 1160 */ 247, 327, 237, 333, 229, 228, 225, 254, 247, 286, + /* 1170 */ 287, 288, 289, 290, 291, 254, 293, 264, 279, 296, + /* 1180 */ 250, 268, 275, 241, 301, 264, 241, 230, 221, 268, + /* 1190 */ 0, 223, 271, 97, 0, 64, 0, 38, 163, 286, + /* 1200 */ 287, 288, 289, 290, 291, 109, 293, 286, 287, 288, + /* 1210 */ 289, 290, 291, 38, 293, 247, 38, 38, 0, 38, + /* 1220 */ 163, 38, 254, 163, 0, 38, 0, 38, 0, 74, + /* 1230 */ 150, 149, 264, 109, 146, 0, 268, 324, 86, 271, + /* 1240 */ 0, 223, 146, 142, 53, 0, 0, 0, 0, 0, + /* 1250 */ 0, 0, 0, 0, 286, 287, 288, 289, 290, 291, + /* 1260 */ 0, 293, 0, 167, 0, 247, 0, 0, 0, 0, + /* 1270 */ 0, 0, 254, 120, 0, 0, 0, 0, 0, 223, + /* 1280 */ 0, 22, 264, 0, 0, 0, 268, 0, 0, 0, + /* 1290 */ 223, 0, 0, 0, 0, 51, 0, 43, 0, 38, + /* 1300 */ 43, 36, 0, 247, 286, 287, 288, 289, 290, 291, + /* 1310 */ 254, 293, 0, 295, 247, 43, 43, 38, 36, 38, + /* 1320 */ 264, 254, 36, 0, 268, 0, 0, 271, 38, 0, + /* 1330 */ 0, 264, 22, 36, 71, 268, 81, 38, 271, 0, + /* 1340 */ 0, 83, 286, 287, 288, 289, 290, 291, 223, 293, + /* 1350 */ 0, 43, 38, 286, 287, 288, 289, 290, 291, 38, + /* 1360 */ 293, 223, 38, 24, 25, 26, 27, 28, 29, 30, + /* 1370 */ 31, 32, 247, 38, 71, 38, 38, 22, 0, 254, + /* 1380 */ 22, 39, 0, 22, 38, 247, 0, 22, 0, 264, + /* 1390 */ 22, 20, 254, 268, 0, 38, 0, 22, 0, 223, + /* 1400 */ 0, 0, 264, 43, 71, 74, 268, 151, 223, 201, + /* 1410 */ 74, 286, 287, 288, 289, 290, 291, 74, 293, 71, + /* 1420 */ 71, 201, 75, 247, 286, 287, 288, 289, 290, 291, + /* 1430 */ 254, 293, 247, 138, 75, 71, 135, 74, 138, 254, + /* 1440 */ 264, 75, 138, 74, 268, 71, 223, 75, 86, 264, + /* 1450 */ 133, 75, 71, 268, 75, 71, 86, 4, 38, 86, + /* 1460 */ 38, 223, 286, 287, 288, 289, 290, 291, 38, 293, + /* 1470 */ 247, 286, 287, 288, 289, 290, 291, 254, 293, 38, + /* 1480 */ 38, 38, 2, 167, 71, 247, 75, 264, 74, 86, + /* 1490 */ 75, 268, 254, 74, 86, 22, 75, 74, 74, 74, + /* 1500 */ 195, 169, 264, 75, 75, 0, 268, 201, 74, 286, + /* 1510 */ 287, 288, 289, 290, 291, 43, 293, 84, 74, 136, + /* 1520 */ 74, 74, 133, 86, 286, 287, 288, 289, 290, 291, + /* 1530 */ 223, 293, 22, 74, 86, 85, 75, 38, 223, 38, + /* 1540 */ 74, 38, 75, 74, 38, 75, 75, 38, 74, 74, + /* 1550 */ 38, 75, 22, 74, 247, 99, 99, 99, 74, 99, + /* 1560 */ 38, 254, 247, 109, 87, 74, 74, 38, 223, 254, + /* 1570 */ 22, 264, 51, 50, 57, 268, 72, 38, 71, 264, + /* 1580 */ 38, 38, 38, 268, 38, 38, 22, 38, 38, 57, + /* 1590 */ 38, 38, 247, 286, 287, 288, 289, 290, 291, 254, + /* 1600 */ 293, 286, 287, 288, 289, 290, 291, 0, 293, 264, + /* 1610 */ 38, 38, 38, 268, 38, 38, 223, 38, 36, 0, + /* 1620 */ 0, 43, 38, 36, 43, 36, 38, 0, 43, 38, + /* 1630 */ 36, 286, 287, 288, 289, 290, 291, 0, 293, 43, + /* 1640 */ 247, 38, 37, 0, 0, 22, 21, 254, 22, 20, + /* 1650 */ 22, 21, 334, 334, 223, 334, 334, 264, 334, 334, + /* 1660 */ 334, 268, 334, 223, 334, 334, 334, 334, 334, 334, + /* 1670 */ 334, 334, 334, 334, 334, 334, 334, 334, 247, 286, + /* 1680 */ 287, 288, 289, 290, 291, 254, 293, 247, 334, 334, + /* 1690 */ 334, 334, 334, 334, 254, 264, 334, 334, 334, 268, + /* 1700 */ 334, 223, 334, 334, 264, 334, 334, 334, 268, 334, + /* 1710 */ 334, 334, 334, 334, 334, 334, 223, 286, 287, 288, + /* 1720 */ 289, 290, 291, 334, 293, 247, 286, 287, 288, 289, + /* 1730 */ 290, 291, 254, 293, 334, 334, 334, 334, 334, 334, + /* 1740 */ 247, 334, 264, 334, 334, 334, 268, 254, 334, 334, + /* 1750 */ 334, 334, 334, 334, 223, 334, 334, 264, 334, 334, + /* 1760 */ 334, 268, 334, 334, 286, 287, 288, 289, 290, 291, + /* 1770 */ 334, 293, 334, 334, 334, 334, 334, 334, 247, 286, + /* 1780 */ 287, 288, 289, 290, 291, 254, 293, 334, 334, 334, + /* 1790 */ 334, 334, 223, 334, 334, 264, 334, 334, 334, 268, + /* 1800 */ 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, + /* 1810 */ 334, 334, 334, 334, 334, 334, 247, 286, 287, 288, + /* 1820 */ 289, 290, 291, 254, 293, 334, 334, 334, 334, 334, + /* 1830 */ 334, 334, 334, 264, 334, 334, 334, 268, 334, 334, + /* 1840 */ 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, + /* 1850 */ 334, 334, 334, 334, 334, 286, 287, 288, 289, 290, + /* 1860 */ 291, 334, 293, 334, 334, 334, 334, 334, 334, 334, + /* 1870 */ 334, 334, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1880 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1890 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1900 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1910 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1920 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1930 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1940 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1950 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1960 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1970 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1980 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1990 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2000 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2010 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2020 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2030 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2040 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2050 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2060 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2070 */ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 2080 */ 220, 220, 220, }; #define YY_SHIFT_COUNT (567) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1619) +#define YY_SHIFT_MAX (1644) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 835, 0, 39, 90, 90, 90, 90, 217, 90, 90, - /* 10 */ 263, 390, 436, 390, 390, 390, 390, 390, 390, 390, - /* 20 */ 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, - /* 30 */ 390, 390, 390, 390, 390, 390, 174, 21, 21, 21, - /* 40 */ 29, 438, 438, 45, 38, 38, 54, 438, 38, 38, - /* 50 */ 38, 38, 38, 38, 27, 38, 99, 264, 54, 298, - /* 60 */ 99, 38, 38, 99, 38, 99, 298, 99, 99, 38, - /* 70 */ 490, 511, 230, 539, 539, 268, 1117, 296, 1117, 1117, - /* 80 */ 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, - /* 90 */ 1117, 1117, 1117, 1117, 1117, 1117, 1117, 258, 466, 86, - /* 100 */ 202, 202, 291, 291, 291, 116, 202, 202, 323, 298, - /* 110 */ 99, 99, 99, 496, 567, 423, 423, 423, 423, 423, - /* 120 */ 423, 423, 630, 129, 137, 562, 160, 162, 123, 52, - /* 130 */ 186, 576, 465, 460, 465, 719, 383, 449, 740, 866, - /* 140 */ 852, 860, 758, 866, 866, 806, 798, 798, 866, 916, - /* 150 */ 27, 298, 921, 27, 323, 924, 27, 27, 866, 27, - /* 160 */ 940, 99, 99, 99, 99, 99, 99, 99, 99, 99, - /* 170 */ 99, 99, 866, 940, 955, 916, 490, 861, 298, 921, - /* 180 */ 490, 323, 924, 490, 1013, 837, 840, 955, 837, 840, - /* 190 */ 955, 955, 841, 838, 863, 868, 872, 323, 1056, 958, - /* 200 */ 864, 873, 870, 1007, 99, 840, 955, 955, 840, 955, - /* 210 */ 966, 323, 924, 490, 496, 490, 323, 1047, 567, 866, - /* 220 */ 490, 940, 1929, 1929, 1929, 1929, 1929, 1929, 286, 833, - /* 230 */ 790, 461, 1379, 1438, 16, 118, 457, 392, 578, 219, - /* 240 */ 219, 219, 219, 219, 219, 219, 219, 379, 429, 307, - /* 250 */ 447, 314, 314, 314, 314, 252, 601, 414, 664, 685, - /* 260 */ 691, 722, 735, 785, 802, 737, 522, 752, 754, 768, - /* 270 */ 597, 613, 330, 636, 773, 694, 780, 756, 788, 789, - /* 280 */ 801, 810, 826, 824, 830, 836, 842, 845, 847, 848, - /* 290 */ 853, 712, 816, 1141, 1153, 1090, 1156, 1119, 995, 1122, - /* 300 */ 1124, 1125, 1001, 1165, 1128, 1129, 1008, 1172, 1132, 1176, - /* 310 */ 1139, 1179, 1106, 1031, 1034, 1075, 1039, 1186, 1188, 1136, - /* 320 */ 1048, 1197, 1208, 1126, 1209, 1213, 1217, 1219, 1224, 1225, - /* 330 */ 1227, 1229, 1230, 1231, 1233, 1234, 1237, 1244, 1247, 1248, - /* 340 */ 1101, 1222, 1249, 1256, 1258, 1260, 1261, 1240, 1264, 1265, - /* 350 */ 1266, 1267, 1268, 1269, 1278, 1279, 1280, 1228, 1272, 1223, - /* 360 */ 1273, 1275, 1238, 1245, 1239, 1286, 1251, 1257, 1252, 1292, - /* 370 */ 1259, 1262, 1253, 1299, 1263, 1270, 1276, 1302, 1303, 1305, - /* 380 */ 1308, 1232, 1250, 1282, 1281, 1283, 1296, 1321, 1290, 1294, - /* 390 */ 1297, 1298, 1281, 1283, 1300, 1304, 1330, 1312, 1337, 1317, - /* 400 */ 1307, 1340, 1322, 1309, 1343, 1327, 1350, 1329, 1333, 1355, - /* 410 */ 1218, 1323, 1359, 1212, 1338, 1235, 1236, 1366, 1367, 1255, - /* 420 */ 1368, 1314, 1332, 1274, 1306, 1318, 1191, 1295, 1324, 1319, - /* 430 */ 1328, 1344, 1345, 1331, 1346, 1334, 1347, 1351, 1204, 1339, - /* 440 */ 1352, 1342, 1178, 1353, 1348, 1356, 1354, 1226, 1426, 1394, - /* 450 */ 1397, 1401, 1403, 1404, 1407, 1445, 1284, 1377, 1374, 1378, - /* 460 */ 1386, 1380, 1388, 1390, 1391, 1405, 1392, 1431, 1311, 1408, - /* 470 */ 1389, 1402, 1409, 1416, 1360, 1417, 1481, 1449, 1361, 1421, - /* 480 */ 1413, 1412, 1414, 1479, 1428, 1419, 1430, 1474, 1476, 1441, - /* 490 */ 1443, 1478, 1446, 1444, 1483, 1448, 1451, 1489, 1454, 1455, - /* 500 */ 1491, 1457, 1433, 1436, 1437, 1440, 1511, 1450, 1466, 1503, - /* 510 */ 1442, 1468, 1469, 1512, 1281, 1283, 1527, 1501, 1505, 1496, - /* 520 */ 1490, 1495, 1529, 1531, 1532, 1534, 1535, 1536, 1537, 1543, - /* 530 */ 1519, 1281, 1539, 1283, 1540, 1541, 1544, 1545, 1546, 1547, - /* 540 */ 1554, 1594, 1558, 1561, 1538, 1598, 1562, 1563, 1560, 1601, - /* 550 */ 1567, 1570, 1564, 1608, 1571, 1574, 1572, 1613, 1576, 1580, - /* 560 */ 1618, 1619, 1600, 1599, 1602, 1604, 1606, 1603, + /* 0 */ 822, 0, 39, 90, 90, 90, 90, 218, 90, 90, + /* 10 */ 264, 392, 438, 392, 392, 392, 392, 392, 392, 392, + /* 20 */ 392, 392, 392, 392, 392, 392, 392, 392, 392, 392, + /* 30 */ 392, 392, 392, 392, 392, 392, 122, 21, 21, 21, + /* 40 */ 121, 1096, 1096, 45, 38, 38, 5, 1096, 38, 38, + /* 50 */ 38, 38, 38, 38, 27, 38, 290, 362, 5, 391, + /* 60 */ 290, 38, 38, 290, 38, 290, 391, 290, 290, 38, + /* 70 */ 458, 513, 231, 574, 574, 269, 435, 297, 435, 435, + /* 80 */ 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, + /* 90 */ 435, 435, 435, 435, 435, 435, 435, 259, 219, 86, + /* 100 */ 191, 191, 445, 445, 445, 116, 191, 191, 483, 391, + /* 110 */ 290, 290, 290, 452, 544, 425, 425, 425, 425, 425, + /* 120 */ 425, 425, 637, 129, 137, 636, 159, 492, 49, 52, + /* 130 */ 322, 672, 499, 654, 499, 736, 642, 732, 774, 920, + /* 140 */ 918, 928, 814, 920, 920, 848, 863, 863, 920, 985, + /* 150 */ 27, 391, 990, 27, 483, 995, 27, 27, 920, 27, + /* 160 */ 1007, 290, 290, 290, 290, 290, 290, 290, 290, 290, + /* 170 */ 290, 290, 920, 1007, 988, 985, 458, 917, 391, 990, + /* 180 */ 458, 483, 995, 458, 1055, 878, 880, 988, 878, 880, + /* 190 */ 988, 988, 898, 901, 914, 916, 923, 483, 1097, 1003, + /* 200 */ 906, 911, 912, 1054, 290, 880, 988, 988, 880, 988, + /* 210 */ 1011, 483, 995, 458, 452, 458, 483, 1081, 544, 920, + /* 220 */ 458, 1007, 1863, 1863, 1863, 1863, 1863, 1863, 287, 987, + /* 230 */ 1339, 754, 490, 836, 16, 118, 714, 321, 769, 484, + /* 240 */ 484, 484, 484, 484, 484, 484, 484, 236, 215, 473, + /* 250 */ 526, 717, 717, 717, 717, 776, 656, 338, 725, 726, + /* 260 */ 735, 748, 502, 558, 777, 817, 651, 778, 787, 788, + /* 270 */ 845, 678, 411, 161, 793, 379, 798, 806, 823, 842, + /* 280 */ 853, 856, 874, 847, 855, 876, 877, 903, 908, 910, + /* 290 */ 927, 826, 430, 1190, 1194, 1131, 1196, 1159, 1035, 1175, + /* 300 */ 1178, 1179, 1057, 1218, 1181, 1183, 1060, 1224, 1187, 1226, + /* 310 */ 1189, 1228, 1155, 1080, 1082, 1124, 1088, 1235, 1240, 1191, + /* 320 */ 1101, 1245, 1246, 1152, 1247, 1248, 1249, 1250, 1251, 1252, + /* 330 */ 1253, 1260, 1262, 1264, 1266, 1267, 1268, 1269, 1270, 1271, + /* 340 */ 1153, 1274, 1275, 1276, 1277, 1278, 1280, 1259, 1283, 1284, + /* 350 */ 1285, 1287, 1288, 1289, 1291, 1292, 1293, 1254, 1294, 1244, + /* 360 */ 1296, 1298, 1261, 1265, 1257, 1302, 1279, 1282, 1272, 1312, + /* 370 */ 1281, 1286, 1273, 1323, 1290, 1297, 1308, 1325, 1326, 1329, + /* 380 */ 1330, 1258, 1255, 1299, 1263, 1303, 1310, 1340, 1314, 1321, + /* 390 */ 1324, 1335, 1263, 1303, 1337, 1338, 1350, 1355, 1378, 1358, + /* 400 */ 1342, 1382, 1361, 1346, 1386, 1365, 1388, 1368, 1371, 1394, + /* 410 */ 1295, 1357, 1396, 1256, 1375, 1300, 1301, 1398, 1400, 1304, + /* 420 */ 1401, 1331, 1360, 1317, 1333, 1348, 1208, 1347, 1349, 1359, + /* 430 */ 1336, 1343, 1363, 1366, 1364, 1362, 1369, 1374, 1220, 1372, + /* 440 */ 1376, 1370, 1305, 1381, 1373, 1379, 1384, 1306, 1453, 1420, + /* 450 */ 1422, 1430, 1441, 1442, 1443, 1480, 1316, 1413, 1411, 1414, + /* 460 */ 1415, 1419, 1421, 1403, 1423, 1424, 1408, 1473, 1332, 1425, + /* 470 */ 1428, 1429, 1434, 1444, 1383, 1446, 1505, 1472, 1389, 1447, + /* 480 */ 1433, 1437, 1448, 1510, 1459, 1450, 1461, 1499, 1501, 1466, + /* 490 */ 1467, 1503, 1469, 1470, 1506, 1474, 1471, 1509, 1475, 1476, + /* 500 */ 1512, 1479, 1456, 1457, 1458, 1460, 1530, 1477, 1484, 1522, + /* 510 */ 1454, 1491, 1492, 1529, 1263, 1303, 1548, 1521, 1523, 1517, + /* 520 */ 1504, 1507, 1539, 1542, 1543, 1544, 1546, 1547, 1549, 1564, + /* 530 */ 1532, 1263, 1550, 1303, 1552, 1553, 1572, 1573, 1574, 1576, + /* 540 */ 1577, 1607, 1579, 1582, 1578, 1619, 1584, 1587, 1581, 1620, + /* 550 */ 1588, 1589, 1585, 1627, 1591, 1594, 1596, 1637, 1603, 1605, + /* 560 */ 1643, 1644, 1623, 1625, 1626, 1628, 1630, 1629, }; #define YY_REDUCE_COUNT (227) -#define YY_REDUCE_MIN (-310) -#define YY_REDUCE_MAX (1636) +#define YY_REDUCE_MIN (-311) +#define YY_REDUCE_MAX (1569) static const short yy_reduce_ofst[] = { - /* 0 */ -210, -207, 398, 488, 546, 604, 662, 718, 769, 827, - /* 10 */ 857, 906, 915, 953, 965, -219, 1037, 731, 1024, 1095, - /* 20 */ 1111, 1123, 1170, 1183, 1221, 1271, 1301, 1349, 1358, 1406, - /* 30 */ 1434, 1485, 1494, 1565, 1581, 1636, 781, -181, -2, 28, - /* 40 */ -185, -246, -227, 53, -220, -138, 155, -256, -153, 247, - /* 50 */ 415, 417, 420, 441, -46, 467, -108, -101, -310, -100, - /* 60 */ 69, 484, 485, 211, 512, 244, 199, 410, 294, 463, - /* 70 */ 184, -221, -291, -291, -291, -116, -222, -94, -203, -29, - /* 80 */ -20, 68, 157, 255, 279, 282, 334, 358, 380, 442, - /* 90 */ 480, 483, 524, 526, 530, 531, 534, -137, -84, -188, - /* 100 */ 126, 259, -79, 198, 276, 373, 353, 355, 455, -253, - /* 110 */ 404, 221, 435, 132, 273, -245, 472, 514, 523, 557, - /* 120 */ 558, 559, 407, 473, 575, 428, 459, 555, 533, 521, - /* 130 */ 603, 556, 540, 540, 540, 619, 549, 570, 619, 659, - /* 140 */ 615, 668, 637, 684, 693, 666, 672, 673, 706, 658, - /* 150 */ 707, 675, 671, 713, 692, 695, 725, 726, 730, 739, - /* 160 */ 741, 721, 727, 733, 734, 736, 742, 743, 746, 747, - /* 170 */ 750, 765, 774, 762, 757, 749, 786, 751, 767, 764, - /* 180 */ 811, 775, 776, 812, 753, 723, 777, 783, 744, 779, - /* 190 */ 784, 793, 745, 755, 759, 761, 540, 818, 794, 782, - /* 200 */ 763, 766, 770, 799, 619, 823, 831, 832, 834, 839, - /* 210 */ 843, 851, 854, 880, 858, 884, 876, 874, 889, 902, - /* 220 */ 904, 908, 859, 856, 895, 896, 909, 920, + /* 0 */ -211, -208, 400, 451, 532, 588, 618, 648, 703, 753, + /* 10 */ 801, 812, 883, 921, 913, -220, 968, 1018, 1056, 1067, + /* 20 */ 1125, 1138, 1176, 1185, 1223, 1238, 1307, 1315, 1345, 1393, + /* 30 */ 1431, 1440, 1478, 1493, 1531, 1569, 179, -182, -2, 174, + /* 40 */ -186, -247, -228, 58, -221, -139, 181, -257, -154, -5, + /* 50 */ -4, -3, -1, 224, 128, 307, -109, -102, -311, -101, + /* 60 */ 69, 353, 417, 214, 424, 216, 278, 346, 420, 431, + /* 70 */ 228, -222, -292, -292, -292, -117, -223, -95, -204, -174, + /* 80 */ 62, 271, 282, 286, 288, 326, 404, 440, 454, 457, + /* 90 */ 480, 481, 486, 489, 512, 546, 569, 139, -33, -189, + /* 100 */ 46, 173, 415, 462, 494, -130, 193, 432, 324, -254, + /* 110 */ 550, 460, 487, 352, 54, -246, 385, 413, 469, 545, + /* 120 */ 567, 576, 555, 615, 612, 534, 560, 610, 607, 579, + /* 130 */ 665, 630, 593, 593, 593, 675, 599, 619, 675, 724, + /* 140 */ 674, 739, 685, 740, 746, 718, 737, 741, 779, 728, + /* 150 */ 780, 745, 742, 781, 759, 751, 791, 794, 789, 795, + /* 160 */ 803, 783, 790, 800, 804, 805, 809, 810, 811, 815, + /* 170 */ 820, 821, 807, 813, 782, 786, 833, 796, 808, 799, + /* 180 */ 846, 824, 816, 849, 797, 757, 828, 818, 763, 835, + /* 190 */ 839, 843, 802, 827, 819, 825, 593, 859, 832, 829, + /* 200 */ 830, 831, 834, 840, 675, 860, 865, 870, 862, 881, + /* 210 */ 882, 896, 887, 926, 915, 929, 902, 930, 925, 935, + /* 220 */ 937, 941, 907, 899, 942, 945, 957, 967, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 10 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 20 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 30 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 40 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 50 */ 1274, 1274, 1274, 1274, 1333, 1274, 1274, 1274, 1274, 1274, - /* 60 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 70 */ 1331, 1473, 1274, 1628, 1274, 1274, 1274, 1274, 1274, 1274, - /* 80 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 90 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1333, - /* 100 */ 1274, 1274, 1639, 1639, 1639, 1331, 1274, 1274, 1274, 1274, - /* 110 */ 1274, 1274, 1274, 1426, 1274, 1274, 1274, 1274, 1274, 1274, - /* 120 */ 1274, 1274, 1507, 1274, 1274, 1703, 1274, 1379, 1513, 1663, - /* 130 */ 1274, 1655, 1631, 1645, 1632, 1274, 1688, 1648, 1274, 1274, - /* 140 */ 1274, 1274, 1499, 1274, 1274, 1478, 1475, 1475, 1274, 1274, - /* 150 */ 1333, 1274, 1274, 1333, 1274, 1274, 1333, 1333, 1274, 1333, - /* 160 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 170 */ 1274, 1274, 1274, 1274, 1274, 1274, 1331, 1509, 1274, 1274, - /* 180 */ 1331, 1274, 1274, 1331, 1274, 1670, 1668, 1274, 1670, 1668, - /* 190 */ 1274, 1274, 1682, 1678, 1661, 1659, 1645, 1274, 1274, 1274, - /* 200 */ 1706, 1694, 1690, 1274, 1274, 1668, 1274, 1274, 1668, 1274, - /* 210 */ 1486, 1274, 1274, 1331, 1274, 1331, 1274, 1395, 1274, 1274, - /* 220 */ 1331, 1274, 1501, 1515, 1429, 1429, 1334, 1279, 1274, 1274, - /* 230 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1576, - /* 240 */ 1681, 1680, 1604, 1603, 1602, 1600, 1575, 1274, 1274, 1274, - /* 250 */ 1274, 1569, 1570, 1568, 1567, 1274, 1274, 1274, 1274, 1274, - /* 260 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 270 */ 1629, 1274, 1691, 1695, 1274, 1274, 1274, 1553, 1274, 1274, - /* 280 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 290 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 300 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 310 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 320 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 330 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 340 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 350 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 360 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 370 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 380 */ 1274, 1274, 1274, 1274, 1442, 1441, 1274, 1274, 1274, 1274, - /* 390 */ 1274, 1274, 1360, 1359, 1274, 1274, 1274, 1274, 1274, 1274, - /* 400 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 410 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 420 */ 1274, 1274, 1274, 1274, 1652, 1662, 1274, 1274, 1274, 1274, - /* 430 */ 1274, 1274, 1274, 1274, 1274, 1553, 1274, 1679, 1274, 1638, - /* 440 */ 1634, 1274, 1274, 1630, 1274, 1274, 1689, 1274, 1274, 1274, - /* 450 */ 1274, 1274, 1274, 1274, 1274, 1624, 1274, 1597, 1274, 1274, - /* 460 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1563, 1274, - /* 470 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 480 */ 1274, 1552, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1423, - /* 490 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 500 */ 1274, 1274, 1408, 1406, 1405, 1404, 1274, 1401, 1274, 1274, - /* 510 */ 1274, 1274, 1274, 1274, 1432, 1431, 1274, 1274, 1274, 1274, - /* 520 */ 1274, 1354, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 530 */ 1274, 1345, 1274, 1344, 1274, 1274, 1274, 1274, 1274, 1274, - /* 540 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 550 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - /* 560 */ 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, + /* 0 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 10 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 20 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 30 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 40 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 50 */ 1276, 1276, 1276, 1276, 1335, 1276, 1276, 1276, 1276, 1276, + /* 60 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 70 */ 1333, 1475, 1276, 1631, 1276, 1276, 1276, 1276, 1276, 1276, + /* 80 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 90 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1335, + /* 100 */ 1276, 1276, 1642, 1642, 1642, 1333, 1276, 1276, 1276, 1276, + /* 110 */ 1276, 1276, 1276, 1428, 1276, 1276, 1276, 1276, 1276, 1276, + /* 120 */ 1276, 1276, 1509, 1276, 1276, 1706, 1276, 1381, 1515, 1666, + /* 130 */ 1276, 1658, 1634, 1648, 1635, 1276, 1691, 1651, 1276, 1276, + /* 140 */ 1276, 1276, 1501, 1276, 1276, 1480, 1477, 1477, 1276, 1276, + /* 150 */ 1335, 1276, 1276, 1335, 1276, 1276, 1335, 1335, 1276, 1335, + /* 160 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 170 */ 1276, 1276, 1276, 1276, 1276, 1276, 1333, 1511, 1276, 1276, + /* 180 */ 1333, 1276, 1276, 1333, 1276, 1673, 1671, 1276, 1673, 1671, + /* 190 */ 1276, 1276, 1685, 1681, 1664, 1662, 1648, 1276, 1276, 1276, + /* 200 */ 1709, 1697, 1693, 1276, 1276, 1671, 1276, 1276, 1671, 1276, + /* 210 */ 1488, 1276, 1276, 1333, 1276, 1333, 1276, 1397, 1276, 1276, + /* 220 */ 1333, 1276, 1503, 1517, 1431, 1431, 1336, 1281, 1276, 1276, + /* 230 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1578, + /* 240 */ 1684, 1683, 1607, 1606, 1605, 1603, 1577, 1276, 1276, 1276, + /* 250 */ 1276, 1571, 1572, 1570, 1569, 1276, 1276, 1276, 1276, 1276, + /* 260 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 270 */ 1632, 1276, 1694, 1698, 1276, 1276, 1276, 1555, 1276, 1276, + /* 280 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 290 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 300 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 310 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 320 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 330 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 340 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 350 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 360 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 370 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 380 */ 1276, 1276, 1276, 1276, 1444, 1443, 1276, 1276, 1276, 1276, + /* 390 */ 1276, 1276, 1362, 1361, 1276, 1276, 1276, 1276, 1276, 1276, + /* 400 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 410 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 420 */ 1276, 1276, 1276, 1276, 1655, 1665, 1276, 1276, 1276, 1276, + /* 430 */ 1276, 1276, 1276, 1276, 1276, 1555, 1276, 1682, 1276, 1641, + /* 440 */ 1637, 1276, 1276, 1633, 1276, 1276, 1692, 1276, 1276, 1276, + /* 450 */ 1276, 1276, 1276, 1276, 1276, 1627, 1276, 1600, 1276, 1276, + /* 460 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1565, 1276, + /* 470 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 480 */ 1276, 1554, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1425, + /* 490 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 500 */ 1276, 1276, 1410, 1408, 1407, 1406, 1276, 1403, 1276, 1276, + /* 510 */ 1276, 1276, 1276, 1276, 1434, 1433, 1276, 1276, 1276, 1276, + /* 520 */ 1276, 1356, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 530 */ 1276, 1347, 1276, 1346, 1276, 1276, 1276, 1276, 1276, 1276, + /* 540 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 550 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + /* 560 */ 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1034,159 +1045,160 @@ static const char *const yyTokenName[] = { /* 177 */ "CAST", /* 178 */ "NOW", /* 179 */ "TODAY", - /* 180 */ "COUNT", - /* 181 */ "FIRST", - /* 182 */ "LAST", - /* 183 */ "LAST_ROW", - /* 184 */ "BETWEEN", - /* 185 */ "IS", - /* 186 */ "NK_LT", - /* 187 */ "NK_GT", - /* 188 */ "NK_LE", - /* 189 */ "NK_GE", - /* 190 */ "NK_NE", - /* 191 */ "MATCH", - /* 192 */ "NMATCH", - /* 193 */ "CONTAINS", - /* 194 */ "JOIN", - /* 195 */ "INNER", - /* 196 */ "SELECT", - /* 197 */ "DISTINCT", - /* 198 */ "WHERE", - /* 199 */ "PARTITION", - /* 200 */ "BY", - /* 201 */ "SESSION", - /* 202 */ "STATE_WINDOW", - /* 203 */ "SLIDING", - /* 204 */ "FILL", - /* 205 */ "VALUE", - /* 206 */ "NONE", - /* 207 */ "PREV", - /* 208 */ "LINEAR", - /* 209 */ "NEXT", - /* 210 */ "GROUP", - /* 211 */ "HAVING", - /* 212 */ "ORDER", - /* 213 */ "SLIMIT", - /* 214 */ "SOFFSET", - /* 215 */ "LIMIT", - /* 216 */ "OFFSET", - /* 217 */ "ASC", - /* 218 */ "NULLS", - /* 219 */ "cmd", - /* 220 */ "account_options", - /* 221 */ "alter_account_options", - /* 222 */ "literal", - /* 223 */ "alter_account_option", - /* 224 */ "user_name", - /* 225 */ "dnode_endpoint", - /* 226 */ "dnode_host_name", - /* 227 */ "not_exists_opt", - /* 228 */ "db_name", - /* 229 */ "db_options", - /* 230 */ "exists_opt", - /* 231 */ "alter_db_options", - /* 232 */ "integer_list", - /* 233 */ "variable_list", - /* 234 */ "retention_list", - /* 235 */ "alter_db_option", - /* 236 */ "retention", - /* 237 */ "full_table_name", - /* 238 */ "column_def_list", - /* 239 */ "tags_def_opt", - /* 240 */ "table_options", - /* 241 */ "multi_create_clause", - /* 242 */ "tags_def", - /* 243 */ "multi_drop_clause", - /* 244 */ "alter_table_clause", - /* 245 */ "alter_table_options", - /* 246 */ "column_name", - /* 247 */ "type_name", - /* 248 */ "create_subtable_clause", - /* 249 */ "specific_tags_opt", - /* 250 */ "literal_list", - /* 251 */ "drop_table_clause", - /* 252 */ "col_name_list", - /* 253 */ "table_name", - /* 254 */ "column_def", - /* 255 */ "func_name_list", - /* 256 */ "alter_table_option", - /* 257 */ "col_name", - /* 258 */ "db_name_cond_opt", - /* 259 */ "like_pattern_opt", - /* 260 */ "table_name_cond", - /* 261 */ "from_db_opt", - /* 262 */ "func_name", - /* 263 */ "function_name", - /* 264 */ "index_name", - /* 265 */ "index_options", - /* 266 */ "func_list", - /* 267 */ "duration_literal", - /* 268 */ "sliding_opt", - /* 269 */ "func", - /* 270 */ "expression_list", - /* 271 */ "topic_name", - /* 272 */ "query_expression", - /* 273 */ "analyze_opt", - /* 274 */ "explain_options", - /* 275 */ "agg_func_opt", - /* 276 */ "bufsize_opt", - /* 277 */ "stream_name", - /* 278 */ "stream_options", - /* 279 */ "into_opt", - /* 280 */ "dnode_list", - /* 281 */ "signed", - /* 282 */ "signed_literal", - /* 283 */ "table_alias", - /* 284 */ "column_alias", - /* 285 */ "expression", - /* 286 */ "pseudo_column", - /* 287 */ "column_reference", - /* 288 */ "function_expression", - /* 289 */ "subquery", - /* 290 */ "star_func", - /* 291 */ "star_func_para_list", - /* 292 */ "noarg_func", - /* 293 */ "other_para_list", - /* 294 */ "star_func_para", - /* 295 */ "predicate", - /* 296 */ "compare_op", - /* 297 */ "in_op", - /* 298 */ "in_predicate_value", - /* 299 */ "boolean_value_expression", - /* 300 */ "boolean_primary", - /* 301 */ "common_expression", - /* 302 */ "from_clause", - /* 303 */ "table_reference_list", - /* 304 */ "table_reference", - /* 305 */ "table_primary", - /* 306 */ "joined_table", - /* 307 */ "alias_opt", - /* 308 */ "parenthesized_joined_table", - /* 309 */ "join_type", - /* 310 */ "search_condition", - /* 311 */ "query_specification", - /* 312 */ "set_quantifier_opt", - /* 313 */ "select_list", - /* 314 */ "where_clause_opt", - /* 315 */ "partition_by_clause_opt", - /* 316 */ "twindow_clause_opt", - /* 317 */ "group_by_clause_opt", - /* 318 */ "having_clause_opt", - /* 319 */ "select_sublist", - /* 320 */ "select_item", - /* 321 */ "fill_opt", - /* 322 */ "fill_mode", - /* 323 */ "group_by_list", - /* 324 */ "query_expression_body", - /* 325 */ "order_by_clause_opt", - /* 326 */ "slimit_clause_opt", - /* 327 */ "limit_clause_opt", - /* 328 */ "query_primary", - /* 329 */ "sort_specification_list", - /* 330 */ "sort_specification", - /* 331 */ "ordering_specification_opt", - /* 332 */ "null_ordering_opt", + /* 180 */ "TIMEZONE", + /* 181 */ "COUNT", + /* 182 */ "FIRST", + /* 183 */ "LAST", + /* 184 */ "LAST_ROW", + /* 185 */ "BETWEEN", + /* 186 */ "IS", + /* 187 */ "NK_LT", + /* 188 */ "NK_GT", + /* 189 */ "NK_LE", + /* 190 */ "NK_GE", + /* 191 */ "NK_NE", + /* 192 */ "MATCH", + /* 193 */ "NMATCH", + /* 194 */ "CONTAINS", + /* 195 */ "JOIN", + /* 196 */ "INNER", + /* 197 */ "SELECT", + /* 198 */ "DISTINCT", + /* 199 */ "WHERE", + /* 200 */ "PARTITION", + /* 201 */ "BY", + /* 202 */ "SESSION", + /* 203 */ "STATE_WINDOW", + /* 204 */ "SLIDING", + /* 205 */ "FILL", + /* 206 */ "VALUE", + /* 207 */ "NONE", + /* 208 */ "PREV", + /* 209 */ "LINEAR", + /* 210 */ "NEXT", + /* 211 */ "GROUP", + /* 212 */ "HAVING", + /* 213 */ "ORDER", + /* 214 */ "SLIMIT", + /* 215 */ "SOFFSET", + /* 216 */ "LIMIT", + /* 217 */ "OFFSET", + /* 218 */ "ASC", + /* 219 */ "NULLS", + /* 220 */ "cmd", + /* 221 */ "account_options", + /* 222 */ "alter_account_options", + /* 223 */ "literal", + /* 224 */ "alter_account_option", + /* 225 */ "user_name", + /* 226 */ "dnode_endpoint", + /* 227 */ "dnode_host_name", + /* 228 */ "not_exists_opt", + /* 229 */ "db_name", + /* 230 */ "db_options", + /* 231 */ "exists_opt", + /* 232 */ "alter_db_options", + /* 233 */ "integer_list", + /* 234 */ "variable_list", + /* 235 */ "retention_list", + /* 236 */ "alter_db_option", + /* 237 */ "retention", + /* 238 */ "full_table_name", + /* 239 */ "column_def_list", + /* 240 */ "tags_def_opt", + /* 241 */ "table_options", + /* 242 */ "multi_create_clause", + /* 243 */ "tags_def", + /* 244 */ "multi_drop_clause", + /* 245 */ "alter_table_clause", + /* 246 */ "alter_table_options", + /* 247 */ "column_name", + /* 248 */ "type_name", + /* 249 */ "create_subtable_clause", + /* 250 */ "specific_tags_opt", + /* 251 */ "literal_list", + /* 252 */ "drop_table_clause", + /* 253 */ "col_name_list", + /* 254 */ "table_name", + /* 255 */ "column_def", + /* 256 */ "func_name_list", + /* 257 */ "alter_table_option", + /* 258 */ "col_name", + /* 259 */ "db_name_cond_opt", + /* 260 */ "like_pattern_opt", + /* 261 */ "table_name_cond", + /* 262 */ "from_db_opt", + /* 263 */ "func_name", + /* 264 */ "function_name", + /* 265 */ "index_name", + /* 266 */ "index_options", + /* 267 */ "func_list", + /* 268 */ "duration_literal", + /* 269 */ "sliding_opt", + /* 270 */ "func", + /* 271 */ "expression_list", + /* 272 */ "topic_name", + /* 273 */ "query_expression", + /* 274 */ "analyze_opt", + /* 275 */ "explain_options", + /* 276 */ "agg_func_opt", + /* 277 */ "bufsize_opt", + /* 278 */ "stream_name", + /* 279 */ "stream_options", + /* 280 */ "into_opt", + /* 281 */ "dnode_list", + /* 282 */ "signed", + /* 283 */ "signed_literal", + /* 284 */ "table_alias", + /* 285 */ "column_alias", + /* 286 */ "expression", + /* 287 */ "pseudo_column", + /* 288 */ "column_reference", + /* 289 */ "function_expression", + /* 290 */ "subquery", + /* 291 */ "star_func", + /* 292 */ "star_func_para_list", + /* 293 */ "noarg_func", + /* 294 */ "other_para_list", + /* 295 */ "star_func_para", + /* 296 */ "predicate", + /* 297 */ "compare_op", + /* 298 */ "in_op", + /* 299 */ "in_predicate_value", + /* 300 */ "boolean_value_expression", + /* 301 */ "boolean_primary", + /* 302 */ "common_expression", + /* 303 */ "from_clause", + /* 304 */ "table_reference_list", + /* 305 */ "table_reference", + /* 306 */ "table_primary", + /* 307 */ "joined_table", + /* 308 */ "alias_opt", + /* 309 */ "parenthesized_joined_table", + /* 310 */ "join_type", + /* 311 */ "search_condition", + /* 312 */ "query_specification", + /* 313 */ "set_quantifier_opt", + /* 314 */ "select_list", + /* 315 */ "where_clause_opt", + /* 316 */ "partition_by_clause_opt", + /* 317 */ "twindow_clause_opt", + /* 318 */ "group_by_clause_opt", + /* 319 */ "having_clause_opt", + /* 320 */ "select_sublist", + /* 321 */ "select_item", + /* 322 */ "fill_opt", + /* 323 */ "fill_mode", + /* 324 */ "group_by_list", + /* 325 */ "query_expression_body", + /* 326 */ "order_by_clause_opt", + /* 327 */ "slimit_clause_opt", + /* 328 */ "limit_clause_opt", + /* 329 */ "query_primary", + /* 330 */ "sort_specification_list", + /* 331 */ "sort_specification", + /* 332 */ "ordering_specification_opt", + /* 333 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1509,123 +1521,124 @@ static const char *const yyRuleName[] = { /* 312 */ "function_expression ::= noarg_func NK_LP NK_RP", /* 313 */ "noarg_func ::= NOW", /* 314 */ "noarg_func ::= TODAY", - /* 315 */ "star_func ::= COUNT", - /* 316 */ "star_func ::= FIRST", - /* 317 */ "star_func ::= LAST", - /* 318 */ "star_func ::= LAST_ROW", - /* 319 */ "star_func_para_list ::= NK_STAR", - /* 320 */ "star_func_para_list ::= other_para_list", - /* 321 */ "other_para_list ::= star_func_para", - /* 322 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", - /* 323 */ "star_func_para ::= expression", - /* 324 */ "star_func_para ::= table_name NK_DOT NK_STAR", - /* 325 */ "predicate ::= expression compare_op expression", - /* 326 */ "predicate ::= expression BETWEEN expression AND expression", - /* 327 */ "predicate ::= expression NOT BETWEEN expression AND expression", - /* 328 */ "predicate ::= expression IS NULL", - /* 329 */ "predicate ::= expression IS NOT NULL", - /* 330 */ "predicate ::= expression in_op in_predicate_value", - /* 331 */ "compare_op ::= NK_LT", - /* 332 */ "compare_op ::= NK_GT", - /* 333 */ "compare_op ::= NK_LE", - /* 334 */ "compare_op ::= NK_GE", - /* 335 */ "compare_op ::= NK_NE", - /* 336 */ "compare_op ::= NK_EQ", - /* 337 */ "compare_op ::= LIKE", - /* 338 */ "compare_op ::= NOT LIKE", - /* 339 */ "compare_op ::= MATCH", - /* 340 */ "compare_op ::= NMATCH", - /* 341 */ "compare_op ::= CONTAINS", - /* 342 */ "in_op ::= IN", - /* 343 */ "in_op ::= NOT IN", - /* 344 */ "in_predicate_value ::= NK_LP expression_list NK_RP", - /* 345 */ "boolean_value_expression ::= boolean_primary", - /* 346 */ "boolean_value_expression ::= NOT boolean_primary", - /* 347 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", - /* 348 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", - /* 349 */ "boolean_primary ::= predicate", - /* 350 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", - /* 351 */ "common_expression ::= expression", - /* 352 */ "common_expression ::= boolean_value_expression", - /* 353 */ "from_clause ::= FROM table_reference_list", - /* 354 */ "table_reference_list ::= table_reference", - /* 355 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", - /* 356 */ "table_reference ::= table_primary", - /* 357 */ "table_reference ::= joined_table", - /* 358 */ "table_primary ::= table_name alias_opt", - /* 359 */ "table_primary ::= db_name NK_DOT table_name alias_opt", - /* 360 */ "table_primary ::= subquery alias_opt", - /* 361 */ "table_primary ::= parenthesized_joined_table", - /* 362 */ "alias_opt ::=", - /* 363 */ "alias_opt ::= table_alias", - /* 364 */ "alias_opt ::= AS table_alias", - /* 365 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", - /* 366 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", - /* 367 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", - /* 368 */ "join_type ::=", - /* 369 */ "join_type ::= INNER", - /* 370 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", - /* 371 */ "set_quantifier_opt ::=", - /* 372 */ "set_quantifier_opt ::= DISTINCT", - /* 373 */ "set_quantifier_opt ::= ALL", - /* 374 */ "select_list ::= NK_STAR", - /* 375 */ "select_list ::= select_sublist", - /* 376 */ "select_sublist ::= select_item", - /* 377 */ "select_sublist ::= select_sublist NK_COMMA select_item", - /* 378 */ "select_item ::= common_expression", - /* 379 */ "select_item ::= common_expression column_alias", - /* 380 */ "select_item ::= common_expression AS column_alias", - /* 381 */ "select_item ::= table_name NK_DOT NK_STAR", - /* 382 */ "where_clause_opt ::=", - /* 383 */ "where_clause_opt ::= WHERE search_condition", - /* 384 */ "partition_by_clause_opt ::=", - /* 385 */ "partition_by_clause_opt ::= PARTITION BY expression_list", - /* 386 */ "twindow_clause_opt ::=", - /* 387 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", - /* 388 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", - /* 389 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", - /* 390 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", - /* 391 */ "sliding_opt ::=", - /* 392 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", - /* 393 */ "fill_opt ::=", - /* 394 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", - /* 395 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", - /* 396 */ "fill_mode ::= NONE", - /* 397 */ "fill_mode ::= PREV", - /* 398 */ "fill_mode ::= NULL", - /* 399 */ "fill_mode ::= LINEAR", - /* 400 */ "fill_mode ::= NEXT", - /* 401 */ "group_by_clause_opt ::=", - /* 402 */ "group_by_clause_opt ::= GROUP BY group_by_list", - /* 403 */ "group_by_list ::= expression", - /* 404 */ "group_by_list ::= group_by_list NK_COMMA expression", - /* 405 */ "having_clause_opt ::=", - /* 406 */ "having_clause_opt ::= HAVING search_condition", - /* 407 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", - /* 408 */ "query_expression_body ::= query_primary", - /* 409 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", - /* 410 */ "query_primary ::= query_specification", - /* 411 */ "order_by_clause_opt ::=", - /* 412 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", - /* 413 */ "slimit_clause_opt ::=", - /* 414 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", - /* 415 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", - /* 416 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 417 */ "limit_clause_opt ::=", - /* 418 */ "limit_clause_opt ::= LIMIT NK_INTEGER", - /* 419 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", - /* 420 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", - /* 421 */ "subquery ::= NK_LP query_expression NK_RP", - /* 422 */ "search_condition ::= common_expression", - /* 423 */ "sort_specification_list ::= sort_specification", - /* 424 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", - /* 425 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", - /* 426 */ "ordering_specification_opt ::=", - /* 427 */ "ordering_specification_opt ::= ASC", - /* 428 */ "ordering_specification_opt ::= DESC", - /* 429 */ "null_ordering_opt ::=", - /* 430 */ "null_ordering_opt ::= NULLS FIRST", - /* 431 */ "null_ordering_opt ::= NULLS LAST", + /* 315 */ "noarg_func ::= TIMEZONE", + /* 316 */ "star_func ::= COUNT", + /* 317 */ "star_func ::= FIRST", + /* 318 */ "star_func ::= LAST", + /* 319 */ "star_func ::= LAST_ROW", + /* 320 */ "star_func_para_list ::= NK_STAR", + /* 321 */ "star_func_para_list ::= other_para_list", + /* 322 */ "other_para_list ::= star_func_para", + /* 323 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", + /* 324 */ "star_func_para ::= expression", + /* 325 */ "star_func_para ::= table_name NK_DOT NK_STAR", + /* 326 */ "predicate ::= expression compare_op expression", + /* 327 */ "predicate ::= expression BETWEEN expression AND expression", + /* 328 */ "predicate ::= expression NOT BETWEEN expression AND expression", + /* 329 */ "predicate ::= expression IS NULL", + /* 330 */ "predicate ::= expression IS NOT NULL", + /* 331 */ "predicate ::= expression in_op in_predicate_value", + /* 332 */ "compare_op ::= NK_LT", + /* 333 */ "compare_op ::= NK_GT", + /* 334 */ "compare_op ::= NK_LE", + /* 335 */ "compare_op ::= NK_GE", + /* 336 */ "compare_op ::= NK_NE", + /* 337 */ "compare_op ::= NK_EQ", + /* 338 */ "compare_op ::= LIKE", + /* 339 */ "compare_op ::= NOT LIKE", + /* 340 */ "compare_op ::= MATCH", + /* 341 */ "compare_op ::= NMATCH", + /* 342 */ "compare_op ::= CONTAINS", + /* 343 */ "in_op ::= IN", + /* 344 */ "in_op ::= NOT IN", + /* 345 */ "in_predicate_value ::= NK_LP expression_list NK_RP", + /* 346 */ "boolean_value_expression ::= boolean_primary", + /* 347 */ "boolean_value_expression ::= NOT boolean_primary", + /* 348 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", + /* 349 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", + /* 350 */ "boolean_primary ::= predicate", + /* 351 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", + /* 352 */ "common_expression ::= expression", + /* 353 */ "common_expression ::= boolean_value_expression", + /* 354 */ "from_clause ::= FROM table_reference_list", + /* 355 */ "table_reference_list ::= table_reference", + /* 356 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", + /* 357 */ "table_reference ::= table_primary", + /* 358 */ "table_reference ::= joined_table", + /* 359 */ "table_primary ::= table_name alias_opt", + /* 360 */ "table_primary ::= db_name NK_DOT table_name alias_opt", + /* 361 */ "table_primary ::= subquery alias_opt", + /* 362 */ "table_primary ::= parenthesized_joined_table", + /* 363 */ "alias_opt ::=", + /* 364 */ "alias_opt ::= table_alias", + /* 365 */ "alias_opt ::= AS table_alias", + /* 366 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", + /* 367 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", + /* 368 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", + /* 369 */ "join_type ::=", + /* 370 */ "join_type ::= INNER", + /* 371 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", + /* 372 */ "set_quantifier_opt ::=", + /* 373 */ "set_quantifier_opt ::= DISTINCT", + /* 374 */ "set_quantifier_opt ::= ALL", + /* 375 */ "select_list ::= NK_STAR", + /* 376 */ "select_list ::= select_sublist", + /* 377 */ "select_sublist ::= select_item", + /* 378 */ "select_sublist ::= select_sublist NK_COMMA select_item", + /* 379 */ "select_item ::= common_expression", + /* 380 */ "select_item ::= common_expression column_alias", + /* 381 */ "select_item ::= common_expression AS column_alias", + /* 382 */ "select_item ::= table_name NK_DOT NK_STAR", + /* 383 */ "where_clause_opt ::=", + /* 384 */ "where_clause_opt ::= WHERE search_condition", + /* 385 */ "partition_by_clause_opt ::=", + /* 386 */ "partition_by_clause_opt ::= PARTITION BY expression_list", + /* 387 */ "twindow_clause_opt ::=", + /* 388 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", + /* 389 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", + /* 390 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", + /* 391 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", + /* 392 */ "sliding_opt ::=", + /* 393 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", + /* 394 */ "fill_opt ::=", + /* 395 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", + /* 396 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", + /* 397 */ "fill_mode ::= NONE", + /* 398 */ "fill_mode ::= PREV", + /* 399 */ "fill_mode ::= NULL", + /* 400 */ "fill_mode ::= LINEAR", + /* 401 */ "fill_mode ::= NEXT", + /* 402 */ "group_by_clause_opt ::=", + /* 403 */ "group_by_clause_opt ::= GROUP BY group_by_list", + /* 404 */ "group_by_list ::= expression", + /* 405 */ "group_by_list ::= group_by_list NK_COMMA expression", + /* 406 */ "having_clause_opt ::=", + /* 407 */ "having_clause_opt ::= HAVING search_condition", + /* 408 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", + /* 409 */ "query_expression_body ::= query_primary", + /* 410 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", + /* 411 */ "query_primary ::= query_specification", + /* 412 */ "order_by_clause_opt ::=", + /* 413 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", + /* 414 */ "slimit_clause_opt ::=", + /* 415 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", + /* 416 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", + /* 417 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 418 */ "limit_clause_opt ::=", + /* 419 */ "limit_clause_opt ::= LIMIT NK_INTEGER", + /* 420 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", + /* 421 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", + /* 422 */ "subquery ::= NK_LP query_expression NK_RP", + /* 423 */ "search_condition ::= common_expression", + /* 424 */ "sort_specification_list ::= sort_specification", + /* 425 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", + /* 426 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", + /* 427 */ "ordering_specification_opt ::=", + /* 428 */ "ordering_specification_opt ::= ASC", + /* 429 */ "ordering_specification_opt ::= DESC", + /* 430 */ "null_ordering_opt ::=", + /* 431 */ "null_ordering_opt ::= NULLS FIRST", + /* 432 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ @@ -1752,164 +1765,164 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 219: /* cmd */ - case 222: /* literal */ - case 229: /* db_options */ - case 231: /* alter_db_options */ - case 236: /* retention */ - case 237: /* full_table_name */ - case 240: /* table_options */ - case 244: /* alter_table_clause */ - case 245: /* alter_table_options */ - case 248: /* create_subtable_clause */ - case 251: /* drop_table_clause */ - case 254: /* column_def */ - case 257: /* col_name */ - case 258: /* db_name_cond_opt */ - case 259: /* like_pattern_opt */ - case 260: /* table_name_cond */ - case 261: /* from_db_opt */ - case 262: /* func_name */ - case 265: /* index_options */ - case 267: /* duration_literal */ - case 268: /* sliding_opt */ - case 269: /* func */ - case 272: /* query_expression */ - case 274: /* explain_options */ - case 278: /* stream_options */ - case 279: /* into_opt */ - case 281: /* signed */ - case 282: /* signed_literal */ - case 285: /* expression */ - case 286: /* pseudo_column */ - case 287: /* column_reference */ - case 288: /* function_expression */ - case 289: /* subquery */ - case 294: /* star_func_para */ - case 295: /* predicate */ - case 298: /* in_predicate_value */ - case 299: /* boolean_value_expression */ - case 300: /* boolean_primary */ - case 301: /* common_expression */ - case 302: /* from_clause */ - case 303: /* table_reference_list */ - case 304: /* table_reference */ - case 305: /* table_primary */ - case 306: /* joined_table */ - case 308: /* parenthesized_joined_table */ - case 310: /* search_condition */ - case 311: /* query_specification */ - case 314: /* where_clause_opt */ - case 316: /* twindow_clause_opt */ - case 318: /* having_clause_opt */ - case 320: /* select_item */ - case 321: /* fill_opt */ - case 324: /* query_expression_body */ - case 326: /* slimit_clause_opt */ - case 327: /* limit_clause_opt */ - case 328: /* query_primary */ - case 330: /* sort_specification */ + case 220: /* cmd */ + case 223: /* literal */ + case 230: /* db_options */ + case 232: /* alter_db_options */ + case 237: /* retention */ + case 238: /* full_table_name */ + case 241: /* table_options */ + case 245: /* alter_table_clause */ + case 246: /* alter_table_options */ + case 249: /* create_subtable_clause */ + case 252: /* drop_table_clause */ + case 255: /* column_def */ + case 258: /* col_name */ + case 259: /* db_name_cond_opt */ + case 260: /* like_pattern_opt */ + case 261: /* table_name_cond */ + case 262: /* from_db_opt */ + case 263: /* func_name */ + case 266: /* index_options */ + case 268: /* duration_literal */ + case 269: /* sliding_opt */ + case 270: /* func */ + case 273: /* query_expression */ + case 275: /* explain_options */ + case 279: /* stream_options */ + case 280: /* into_opt */ + case 282: /* signed */ + case 283: /* signed_literal */ + case 286: /* expression */ + case 287: /* pseudo_column */ + case 288: /* column_reference */ + case 289: /* function_expression */ + case 290: /* subquery */ + case 295: /* star_func_para */ + case 296: /* predicate */ + case 299: /* in_predicate_value */ + case 300: /* boolean_value_expression */ + case 301: /* boolean_primary */ + case 302: /* common_expression */ + case 303: /* from_clause */ + case 304: /* table_reference_list */ + case 305: /* table_reference */ + case 306: /* table_primary */ + case 307: /* joined_table */ + case 309: /* parenthesized_joined_table */ + case 311: /* search_condition */ + case 312: /* query_specification */ + case 315: /* where_clause_opt */ + case 317: /* twindow_clause_opt */ + case 319: /* having_clause_opt */ + case 321: /* select_item */ + case 322: /* fill_opt */ + case 325: /* query_expression_body */ + case 327: /* slimit_clause_opt */ + case 328: /* limit_clause_opt */ + case 329: /* query_primary */ + case 331: /* sort_specification */ { - nodesDestroyNode((yypminor->yy452)); + nodesDestroyNode((yypminor->yy456)); } break; - case 220: /* account_options */ - case 221: /* alter_account_options */ - case 223: /* alter_account_option */ - case 276: /* bufsize_opt */ + case 221: /* account_options */ + case 222: /* alter_account_options */ + case 224: /* alter_account_option */ + case 277: /* bufsize_opt */ { } break; - case 224: /* user_name */ - case 225: /* dnode_endpoint */ - case 226: /* dnode_host_name */ - case 228: /* db_name */ - case 246: /* column_name */ - case 253: /* table_name */ - case 263: /* function_name */ - case 264: /* index_name */ - case 271: /* topic_name */ - case 277: /* stream_name */ - case 283: /* table_alias */ - case 284: /* column_alias */ - case 290: /* star_func */ - case 292: /* noarg_func */ - case 307: /* alias_opt */ + case 225: /* user_name */ + case 226: /* dnode_endpoint */ + case 227: /* dnode_host_name */ + case 229: /* db_name */ + case 247: /* column_name */ + case 254: /* table_name */ + case 264: /* function_name */ + case 265: /* index_name */ + case 272: /* topic_name */ + case 278: /* stream_name */ + case 284: /* table_alias */ + case 285: /* column_alias */ + case 291: /* star_func */ + case 293: /* noarg_func */ + case 308: /* alias_opt */ { } break; - case 227: /* not_exists_opt */ - case 230: /* exists_opt */ - case 273: /* analyze_opt */ - case 275: /* agg_func_opt */ - case 312: /* set_quantifier_opt */ + case 228: /* not_exists_opt */ + case 231: /* exists_opt */ + case 274: /* analyze_opt */ + case 276: /* agg_func_opt */ + case 313: /* set_quantifier_opt */ { } break; - case 232: /* integer_list */ - case 233: /* variable_list */ - case 234: /* retention_list */ - case 238: /* column_def_list */ - case 239: /* tags_def_opt */ - case 241: /* multi_create_clause */ - case 242: /* tags_def */ - case 243: /* multi_drop_clause */ - case 249: /* specific_tags_opt */ - case 250: /* literal_list */ - case 252: /* col_name_list */ - case 255: /* func_name_list */ - case 266: /* func_list */ - case 270: /* expression_list */ - case 280: /* dnode_list */ - case 291: /* star_func_para_list */ - case 293: /* other_para_list */ - case 313: /* select_list */ - case 315: /* partition_by_clause_opt */ - case 317: /* group_by_clause_opt */ - case 319: /* select_sublist */ - case 323: /* group_by_list */ - case 325: /* order_by_clause_opt */ - case 329: /* sort_specification_list */ + case 233: /* integer_list */ + case 234: /* variable_list */ + case 235: /* retention_list */ + case 239: /* column_def_list */ + case 240: /* tags_def_opt */ + case 242: /* multi_create_clause */ + case 243: /* tags_def */ + case 244: /* multi_drop_clause */ + case 250: /* specific_tags_opt */ + case 251: /* literal_list */ + case 253: /* col_name_list */ + case 256: /* func_name_list */ + case 267: /* func_list */ + case 271: /* expression_list */ + case 281: /* dnode_list */ + case 292: /* star_func_para_list */ + case 294: /* other_para_list */ + case 314: /* select_list */ + case 316: /* partition_by_clause_opt */ + case 318: /* group_by_clause_opt */ + case 320: /* select_sublist */ + case 324: /* group_by_list */ + case 326: /* order_by_clause_opt */ + case 330: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy478)); + nodesDestroyList((yypminor->yy632)); } break; - case 235: /* alter_db_option */ - case 256: /* alter_table_option */ + case 236: /* alter_db_option */ + case 257: /* alter_table_option */ { } break; - case 247: /* type_name */ + case 248: /* type_name */ { } break; - case 296: /* compare_op */ - case 297: /* in_op */ + case 297: /* compare_op */ + case 298: /* in_op */ { } break; - case 309: /* join_type */ + case 310: /* join_type */ { } break; - case 322: /* fill_mode */ + case 323: /* fill_mode */ { } break; - case 331: /* ordering_specification_opt */ + case 332: /* ordering_specification_opt */ { } break; - case 332: /* null_ordering_opt */ + case 333: /* null_ordering_opt */ { } @@ -2037,15 +2050,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", @@ -2060,16 +2076,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", @@ -2083,6 +2091,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++; @@ -2728,11 +3175,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,220,&yymsp[0].minor); + yy_destructor(yypParser,221,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,221,&yymsp[0].minor); + yy_destructor(yypParser,222,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -2746,20 +3193,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,220,&yymsp[-2].minor); +{ yy_destructor(yypParser,221,&yymsp[-2].minor); { } - yy_destructor(yypParser,222,&yymsp[0].minor); + yy_destructor(yypParser,223,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,223,&yymsp[0].minor); +{ yy_destructor(yypParser,224,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,221,&yymsp[-1].minor); +{ yy_destructor(yypParser,222,&yymsp[-1].minor); { } - yy_destructor(yypParser,223,&yymsp[0].minor); + yy_destructor(yypParser,224,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -2773,31 +3220,31 @@ 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,222,&yymsp[0].minor); + yy_destructor(yypParser,223,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy479, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy537, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy479, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy537, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy537); } break; case 28: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy479, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy537, NULL); } break; case 29: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy0); } break; case 30: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy537); } break; case 32: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -2826,12 +3273,13 @@ static YYACTIONTYPE yy_reduce( case 283: /* stream_name ::= NK_ID */ yytestcase(yyruleno==283); case 313: /* noarg_func ::= NOW */ yytestcase(yyruleno==313); case 314: /* noarg_func ::= TODAY */ yytestcase(yyruleno==314); - case 315: /* star_func ::= COUNT */ yytestcase(yyruleno==315); - case 316: /* star_func ::= FIRST */ yytestcase(yyruleno==316); - case 317: /* star_func ::= LAST */ yytestcase(yyruleno==317); - case 318: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==318); -{ yylhsminor.yy479 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy479 = yylhsminor.yy479; + case 315: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==315); + case 316: /* star_func ::= COUNT */ yytestcase(yyruleno==316); + case 317: /* star_func ::= FIRST */ yytestcase(yyruleno==317); + case 318: /* star_func ::= LAST */ yytestcase(yyruleno==318); + case 319: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==319); +{ yylhsminor.yy537 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy537 = yylhsminor.yy537; break; case 39: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -2864,156 +3312,156 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 49: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy659, &yymsp[-1].minor.yy479, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy649, &yymsp[-1].minor.yy537, yymsp[0].minor.yy456); } break; case 50: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy659, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy649, &yymsp[0].minor.yy537); } break; case 51: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy537); } break; case 52: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy479, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy537, yymsp[0].minor.yy456); } break; case 53: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy659 = true; } +{ yymsp[-2].minor.yy649 = true; } break; case 54: /* not_exists_opt ::= */ case 56: /* exists_opt ::= */ yytestcase(yyruleno==56); case 222: /* analyze_opt ::= */ yytestcase(yyruleno==222); case 230: /* agg_func_opt ::= */ yytestcase(yyruleno==230); - case 371: /* set_quantifier_opt ::= */ yytestcase(yyruleno==371); -{ yymsp[1].minor.yy659 = false; } + case 372: /* set_quantifier_opt ::= */ yytestcase(yyruleno==372); +{ yymsp[1].minor.yy649 = false; } break; case 55: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy659 = true; } +{ yymsp[-1].minor.yy649 = true; } break; case 57: /* db_options ::= */ -{ yymsp[1].minor.yy452 = createDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy456 = createDatabaseOptions(pCxt); } break; case 58: /* db_options ::= db_options BLOCKS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pNumOfBlocks = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pNumOfBlocks = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 59: /* db_options ::= db_options CACHE NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pCacheBlockSize = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pCacheBlockSize = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 60: /* db_options ::= db_options CACHELAST NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pCachelast = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pCachelast = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 61: /* db_options ::= db_options COMP NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pCompressionLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pCompressionLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 62: /* db_options ::= db_options DAYS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pDaysPerFile = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pDaysPerFile = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 63: /* db_options ::= db_options DAYS NK_VARIABLE */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pDaysPerFile = (SValueNode*)createDurationValueNode(pCxt, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pDaysPerFile = (SValueNode*)createDurationValueNode(pCxt, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 64: /* db_options ::= db_options FSYNC NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pFsyncPeriod = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pFsyncPeriod = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 65: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pMaxRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pMaxRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 66: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pMinRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pMinRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 67: /* db_options ::= db_options KEEP integer_list */ case 68: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==68); -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pKeep = yymsp[0].minor.yy478; yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pKeep = yymsp[0].minor.yy632; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 69: /* db_options ::= db_options PRECISION NK_STRING */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pPrecision = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pPrecision = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 70: /* db_options ::= db_options QUORUM NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pQuorum = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pQuorum = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 71: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pReplica = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pReplica = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 72: /* db_options ::= db_options TTL NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 73: /* db_options ::= db_options WAL NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pWalLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pWalLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 74: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pNumOfVgroups = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pNumOfVgroups = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 75: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pSingleStable = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pSingleStable = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 76: /* db_options ::= db_options STREAM_MODE NK_INTEGER */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pStreamMode = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pStreamMode = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 77: /* db_options ::= db_options RETENTIONS retention_list */ -{ ((SDatabaseOptions*)yymsp[-2].minor.yy452)->pRetentions = yymsp[0].minor.yy478; yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SDatabaseOptions*)yymsp[-2].minor.yy456)->pRetentions = yymsp[0].minor.yy632; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 78: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy452 = createDatabaseOptions(pCxt); yylhsminor.yy452 = setDatabaseAlterOption(pCxt, yylhsminor.yy452, &yymsp[0].minor.yy11); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createDatabaseOptions(pCxt); yylhsminor.yy456 = setDatabaseAlterOption(pCxt, yylhsminor.yy456, &yymsp[0].minor.yy29); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 79: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy452 = setDatabaseAlterOption(pCxt, yymsp[-1].minor.yy452, &yymsp[0].minor.yy11); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = setDatabaseAlterOption(pCxt, yymsp[-1].minor.yy456, &yymsp[0].minor.yy29); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 80: /* alter_db_option ::= BLOCKS NK_INTEGER */ -{ yymsp[-1].minor.yy11.type = DB_OPTION_BLOCKS; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = DB_OPTION_BLOCKS; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 81: /* alter_db_option ::= FSYNC NK_INTEGER */ -{ yymsp[-1].minor.yy11.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 82: /* alter_db_option ::= KEEP integer_list */ case 83: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==83); -{ yymsp[-1].minor.yy11.type = DB_OPTION_KEEP; yymsp[-1].minor.yy11.pList = yymsp[0].minor.yy478; } +{ yymsp[-1].minor.yy29.type = DB_OPTION_KEEP; yymsp[-1].minor.yy29.pList = yymsp[0].minor.yy632; } break; case 84: /* alter_db_option ::= WAL NK_INTEGER */ -{ yymsp[-1].minor.yy11.type = DB_OPTION_WAL; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = DB_OPTION_WAL; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 85: /* alter_db_option ::= QUORUM NK_INTEGER */ -{ yymsp[-1].minor.yy11.type = DB_OPTION_QUORUM; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = DB_OPTION_QUORUM; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 86: /* alter_db_option ::= CACHELAST NK_INTEGER */ -{ yymsp[-1].minor.yy11.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 87: /* alter_db_option ::= REPLICA NK_INTEGER */ -{ yymsp[-1].minor.yy11.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 88: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy478 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy478 = yylhsminor.yy478; +{ yylhsminor.yy632 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 89: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 248: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==248); -{ yylhsminor.yy478 = addNodeToList(pCxt, yymsp[-2].minor.yy478, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy478 = yylhsminor.yy478; +{ yylhsminor.yy632 = addNodeToList(pCxt, yymsp[-2].minor.yy632, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 90: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy478 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy478 = yylhsminor.yy478; +{ yylhsminor.yy632 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 91: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy478 = addNodeToList(pCxt, yymsp[-2].minor.yy478, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy478 = yylhsminor.yy478; +{ yylhsminor.yy632 = addNodeToList(pCxt, yymsp[-2].minor.yy632, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 92: /* retention_list ::= retention */ case 112: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==112); @@ -3023,11 +3471,11 @@ static YYACTIONTYPE yy_reduce( case 203: /* func_name_list ::= func_name */ yytestcase(yyruleno==203); case 212: /* func_list ::= func */ yytestcase(yyruleno==212); case 272: /* literal_list ::= signed_literal */ yytestcase(yyruleno==272); - case 321: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==321); - case 376: /* select_sublist ::= select_item */ yytestcase(yyruleno==376); - case 423: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==423); -{ yylhsminor.yy478 = createNodeList(pCxt, yymsp[0].minor.yy452); } - yymsp[0].minor.yy478 = yylhsminor.yy478; + case 322: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==322); + case 377: /* select_sublist ::= select_item */ yytestcase(yyruleno==377); + case 424: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==424); +{ yylhsminor.yy632 = createNodeList(pCxt, yymsp[0].minor.yy456); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 93: /* retention_list ::= retention_list NK_COMMA retention */ case 123: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==123); @@ -3035,242 +3483,242 @@ static YYACTIONTYPE yy_reduce( case 204: /* func_name_list ::= func_name_list NK_COMMA col_name */ yytestcase(yyruleno==204); case 213: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==213); case 273: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==273); - case 322: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==322); - case 377: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==377); - case 424: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==424); -{ yylhsminor.yy478 = addNodeToList(pCxt, yymsp[-2].minor.yy478, yymsp[0].minor.yy452); } - yymsp[-2].minor.yy478 = yylhsminor.yy478; + case 323: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==323); + case 378: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==378); + case 425: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==425); +{ yylhsminor.yy632 = addNodeToList(pCxt, yymsp[-2].minor.yy632, yymsp[0].minor.yy456); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 94: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy452 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 95: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 97: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==97); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy659, yymsp[-5].minor.yy452, yymsp[-3].minor.yy478, yymsp[-1].minor.yy478, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy649, yymsp[-5].minor.yy456, yymsp[-3].minor.yy632, yymsp[-1].minor.yy632, yymsp[0].minor.yy456); } break; case 96: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy478); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy632); } break; case 98: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy478); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy632); } break; case 99: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy659, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy649, yymsp[0].minor.yy456); } break; case 100: /* cmd ::= ALTER TABLE alter_table_clause */ case 101: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==101); case 250: /* cmd ::= query_expression */ yytestcase(yyruleno==250); -{ pCxt->pRootNode = yymsp[0].minor.yy452; } +{ pCxt->pRootNode = yymsp[0].minor.yy456; } break; case 102: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy452 = createAlterTableOption(pCxt, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableOption(pCxt, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 103: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy479, yymsp[0].minor.yy430); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy537, yymsp[0].minor.yy388); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 104: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy479); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy456, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy537); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 105: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy479, yymsp[0].minor.yy430); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy537, yymsp[0].minor.yy388); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 106: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy537, &yymsp[0].minor.yy537); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 107: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy479, yymsp[0].minor.yy430); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy537, yymsp[0].minor.yy388); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 108: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy452 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy452, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy479); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy456, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy537); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 109: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy452 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy479, yymsp[0].minor.yy430); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy537, yymsp[0].minor.yy388); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 110: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy452 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy452, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy456, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy537, &yymsp[0].minor.yy537); } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 111: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ -{ yylhsminor.yy452 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy452, &yymsp[-2].minor.yy479, yymsp[0].minor.yy452); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy456, &yymsp[-2].minor.yy537, yymsp[0].minor.yy456); } + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; case 113: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 116: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==116); -{ yylhsminor.yy478 = addNodeToList(pCxt, yymsp[-1].minor.yy478, yymsp[0].minor.yy452); } - yymsp[-1].minor.yy478 = yylhsminor.yy478; +{ yylhsminor.yy632 = addNodeToList(pCxt, yymsp[-1].minor.yy632, yymsp[0].minor.yy456); } + yymsp[-1].minor.yy632 = yylhsminor.yy632; break; case 114: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ -{ yylhsminor.yy452 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy659, yymsp[-7].minor.yy452, yymsp[-5].minor.yy452, yymsp[-4].minor.yy478, yymsp[-1].minor.yy478); } - yymsp[-8].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy649, yymsp[-7].minor.yy456, yymsp[-5].minor.yy456, yymsp[-4].minor.yy632, yymsp[-1].minor.yy632); } + yymsp[-8].minor.yy456 = yylhsminor.yy456; break; case 117: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy452 = createDropTableClause(pCxt, yymsp[-1].minor.yy659, yymsp[0].minor.yy452); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createDropTableClause(pCxt, yymsp[-1].minor.yy649, yymsp[0].minor.yy456); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 118: /* specific_tags_opt ::= */ case 149: /* tags_def_opt ::= */ yytestcase(yyruleno==149); - case 384: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==384); - case 401: /* group_by_clause_opt ::= */ yytestcase(yyruleno==401); - case 411: /* order_by_clause_opt ::= */ yytestcase(yyruleno==411); -{ yymsp[1].minor.yy478 = NULL; } + case 385: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==385); + case 402: /* group_by_clause_opt ::= */ yytestcase(yyruleno==402); + case 412: /* order_by_clause_opt ::= */ yytestcase(yyruleno==412); +{ yymsp[1].minor.yy632 = NULL; } break; case 119: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy478 = yymsp[-1].minor.yy478; } +{ yymsp[-2].minor.yy632 = yymsp[-1].minor.yy632; } break; case 120: /* full_table_name ::= table_name */ -{ yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy479, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy537, NULL); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 121: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479, NULL); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRealTableNode(pCxt, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy537, NULL); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 124: /* column_def ::= column_name type_name */ -{ yylhsminor.yy452 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy479, yymsp[0].minor.yy430, NULL); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy537, yymsp[0].minor.yy388, NULL); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 125: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy452 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy479, yymsp[-2].minor.yy430, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy537, yymsp[-2].minor.yy388, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 126: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 127: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 128: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 129: /* type_name ::= INT */ case 130: /* type_name ::= INTEGER */ yytestcase(yyruleno==130); -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_INT); } break; case 131: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 132: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 133: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 134: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy430 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy388 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 135: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 136: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy430 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy388 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 137: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy430 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy388 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 138: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy430 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy388 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 139: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy430 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy388 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 140: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy430 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy388 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 141: /* type_name ::= JSON */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 142: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy430 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy388 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 143: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 144: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 145: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy430 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy388 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 146: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy430 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy388 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 147: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy430 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy388 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 148: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy430 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy388 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 150: /* tags_def_opt ::= tags_def */ - case 320: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==320); - case 375: /* select_list ::= select_sublist */ yytestcase(yyruleno==375); -{ yylhsminor.yy478 = yymsp[0].minor.yy478; } - yymsp[0].minor.yy478 = yylhsminor.yy478; + case 321: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==321); + case 376: /* select_list ::= select_sublist */ yytestcase(yyruleno==376); +{ yylhsminor.yy632 = yymsp[0].minor.yy632; } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 151: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy478 = yymsp[-1].minor.yy478; } +{ yymsp[-3].minor.yy632 = yymsp[-1].minor.yy632; } break; case 152: /* table_options ::= */ -{ yymsp[1].minor.yy452 = createTableOptions(pCxt); } +{ yymsp[1].minor.yy456 = createTableOptions(pCxt); } break; case 153: /* table_options ::= table_options COMMENT NK_STRING */ -{ ((STableOptions*)yymsp[-2].minor.yy452)->pComments = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pComments = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 154: /* table_options ::= table_options KEEP integer_list */ case 155: /* table_options ::= table_options KEEP variable_list */ yytestcase(yyruleno==155); -{ ((STableOptions*)yymsp[-2].minor.yy452)->pKeep = yymsp[0].minor.yy478; yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pKeep = yymsp[0].minor.yy632; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 156: /* table_options ::= table_options TTL NK_INTEGER */ -{ ((STableOptions*)yymsp[-2].minor.yy452)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 157: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ ((STableOptions*)yymsp[-4].minor.yy452)->pSma = yymsp[-1].minor.yy478; yylhsminor.yy452 = yymsp[-4].minor.yy452; } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ ((STableOptions*)yymsp[-4].minor.yy456)->pSma = yymsp[-1].minor.yy632; yylhsminor.yy456 = yymsp[-4].minor.yy456; } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 158: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ -{ ((STableOptions*)yymsp[-4].minor.yy452)->pFuncs = yymsp[-1].minor.yy478; yylhsminor.yy452 = yymsp[-4].minor.yy452; } - yymsp[-4].minor.yy452 = yylhsminor.yy452; +{ ((STableOptions*)yymsp[-4].minor.yy456)->pFuncs = yymsp[-1].minor.yy632; yylhsminor.yy456 = yymsp[-4].minor.yy456; } + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; case 159: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ -{ ((STableOptions*)yymsp[-2].minor.yy452)->pFilesFactor = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pFilesFactor = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 160: /* table_options ::= table_options DELAY NK_INTEGER */ -{ ((STableOptions*)yymsp[-2].minor.yy452)->pDelay = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((STableOptions*)yymsp[-2].minor.yy456)->pDelay = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 161: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy452 = createTableOptions(pCxt); yylhsminor.yy452 = setTableAlterOption(pCxt, yylhsminor.yy452, &yymsp[0].minor.yy11); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createTableOptions(pCxt); yylhsminor.yy456 = setTableAlterOption(pCxt, yylhsminor.yy456, &yymsp[0].minor.yy29); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 162: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy452 = setTableAlterOption(pCxt, yymsp[-1].minor.yy452, &yymsp[0].minor.yy11); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = setTableAlterOption(pCxt, yymsp[-1].minor.yy456, &yymsp[0].minor.yy29); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 163: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy11.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 164: /* alter_table_option ::= KEEP integer_list */ case 165: /* alter_table_option ::= KEEP variable_list */ yytestcase(yyruleno==165); -{ yymsp[-1].minor.yy11.type = TABLE_OPTION_KEEP; yymsp[-1].minor.yy11.pList = yymsp[0].minor.yy478; } +{ yymsp[-1].minor.yy29.type = TABLE_OPTION_KEEP; yymsp[-1].minor.yy29.pList = yymsp[0].minor.yy632; } break; case 166: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy11.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy11.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy29.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy29.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 169: /* col_name ::= column_name */ -{ yylhsminor.yy452 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy479); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy537); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 170: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } @@ -3282,13 +3730,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; case 173: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy456, yymsp[0].minor.yy456); } break; case 174: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy456, yymsp[0].minor.yy456); } break; case 175: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy452, NULL); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy456, NULL); } break; case 176: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } @@ -3303,7 +3751,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; case 180: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; case 181: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } @@ -3322,13 +3770,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; case 187: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy537); } break; case 188: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy456); } break; case 189: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy456); } break; case 190: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } @@ -3350,133 +3798,133 @@ static YYACTIONTYPE yy_reduce( break; case 196: /* db_name_cond_opt ::= */ case 201: /* from_db_opt ::= */ yytestcase(yyruleno==201); -{ yymsp[1].minor.yy452 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy456 = createDefaultDatabaseCondValue(pCxt); } break; case 197: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy537); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 198: /* like_pattern_opt ::= */ case 209: /* index_options ::= */ yytestcase(yyruleno==209); case 236: /* into_opt ::= */ yytestcase(yyruleno==236); - case 382: /* where_clause_opt ::= */ yytestcase(yyruleno==382); - case 386: /* twindow_clause_opt ::= */ yytestcase(yyruleno==386); - case 391: /* sliding_opt ::= */ yytestcase(yyruleno==391); - case 393: /* fill_opt ::= */ yytestcase(yyruleno==393); - case 405: /* having_clause_opt ::= */ yytestcase(yyruleno==405); - case 413: /* slimit_clause_opt ::= */ yytestcase(yyruleno==413); - case 417: /* limit_clause_opt ::= */ yytestcase(yyruleno==417); -{ yymsp[1].minor.yy452 = NULL; } + case 383: /* where_clause_opt ::= */ yytestcase(yyruleno==383); + case 387: /* twindow_clause_opt ::= */ yytestcase(yyruleno==387); + case 392: /* sliding_opt ::= */ yytestcase(yyruleno==392); + case 394: /* fill_opt ::= */ yytestcase(yyruleno==394); + case 406: /* having_clause_opt ::= */ yytestcase(yyruleno==406); + case 414: /* slimit_clause_opt ::= */ yytestcase(yyruleno==414); + case 418: /* limit_clause_opt ::= */ yytestcase(yyruleno==418); +{ yymsp[1].minor.yy456 = NULL; } break; case 199: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 200: /* table_name_cond ::= table_name */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy479); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy537); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 202: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy479); } +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy537); } break; case 205: /* func_name ::= function_name */ -{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[0].minor.yy479, NULL); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createFunctionNode(pCxt, &yymsp[0].minor.yy537, NULL); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 206: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy659, &yymsp[-3].minor.yy479, &yymsp[-1].minor.yy479, NULL, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy649, &yymsp[-3].minor.yy537, &yymsp[-1].minor.yy537, NULL, yymsp[0].minor.yy456); } break; case 207: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy659, &yymsp[-5].minor.yy479, &yymsp[-3].minor.yy479, yymsp[-1].minor.yy478, NULL); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy649, &yymsp[-5].minor.yy537, &yymsp[-3].minor.yy537, yymsp[-1].minor.yy632, NULL); } break; case 208: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy659, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy649, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy537); } break; case 210: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ -{ yymsp[-8].minor.yy452 = createIndexOption(pCxt, yymsp[-6].minor.yy478, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), NULL, yymsp[0].minor.yy452); } +{ yymsp[-8].minor.yy456 = createIndexOption(pCxt, yymsp[-6].minor.yy632, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), NULL, yymsp[0].minor.yy456); } break; case 211: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ -{ yymsp[-10].minor.yy452 = createIndexOption(pCxt, yymsp[-8].minor.yy478, releaseRawExprNode(pCxt, yymsp[-4].minor.yy452), releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), yymsp[0].minor.yy452); } +{ yymsp[-10].minor.yy456 = createIndexOption(pCxt, yymsp[-8].minor.yy632, releaseRawExprNode(pCxt, yymsp[-4].minor.yy456), releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), yymsp[0].minor.yy456); } break; case 214: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy452 = createFunctionNode(pCxt, &yymsp[-3].minor.yy479, yymsp[-1].minor.yy478); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createFunctionNode(pCxt, &yymsp[-3].minor.yy537, yymsp[-1].minor.yy632); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 215: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy659, &yymsp[-2].minor.yy479, yymsp[0].minor.yy452, NULL); } +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy649, &yymsp[-2].minor.yy537, yymsp[0].minor.yy456, NULL); } break; case 216: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ -{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy659, &yymsp[-2].minor.yy479, NULL, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy649, &yymsp[-2].minor.yy537, NULL, &yymsp[0].minor.yy537); } break; case 217: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy659, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy649, &yymsp[0].minor.yy537); } break; case 218: /* cmd ::= DESC full_table_name */ case 219: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==219); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy456); } break; case 220: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 221: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy659, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy649, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; case 223: /* analyze_opt ::= ANALYZE */ case 231: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==231); - case 372: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==372); -{ yymsp[0].minor.yy659 = true; } + case 373: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==373); +{ yymsp[0].minor.yy649 = true; } break; case 224: /* explain_options ::= */ -{ yymsp[1].minor.yy452 = createDefaultExplainOptions(pCxt); } +{ yymsp[1].minor.yy456 = createDefaultExplainOptions(pCxt); } break; case 225: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy452 = setExplainVerbose(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = setExplainVerbose(pCxt, yymsp[-2].minor.yy456, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 226: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy452 = setExplainRatio(pCxt, yymsp[-2].minor.yy452, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = setExplainRatio(pCxt, yymsp[-2].minor.yy456, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 227: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ -{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy478); } +{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy632); } break; case 228: /* cmd ::= CREATE agg_func_opt FUNCTION function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy659, &yymsp[-5].minor.yy479, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy430, yymsp[0].minor.yy100); } +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy649, &yymsp[-5].minor.yy537, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy388, yymsp[0].minor.yy652); } break; case 229: /* cmd ::= DROP FUNCTION function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, &yymsp[0].minor.yy537); } break; case 232: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy100 = 0; } +{ yymsp[1].minor.yy652 = 0; } break; case 233: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy100 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy652 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } break; case 234: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy659, &yymsp[-4].minor.yy479, yymsp[-2].minor.yy452, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); } +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy649, &yymsp[-4].minor.yy537, yymsp[-2].minor.yy456, yymsp[-3].minor.yy456, yymsp[0].minor.yy456); } break; case 235: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy659, &yymsp[0].minor.yy479); } +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy649, &yymsp[0].minor.yy537); } break; case 237: /* into_opt ::= INTO full_table_name */ - case 353: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==353); - case 383: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==383); - case 406: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==406); -{ yymsp[-1].minor.yy452 = yymsp[0].minor.yy452; } + case 354: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==354); + case 384: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==384); + case 407: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==407); +{ yymsp[-1].minor.yy456 = yymsp[0].minor.yy456; } break; case 238: /* stream_options ::= */ -{ yymsp[1].minor.yy452 = createStreamOptions(pCxt); } +{ yymsp[1].minor.yy456 = createStreamOptions(pCxt); } break; case 239: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy452)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SStreamOptions*)yymsp[-2].minor.yy456)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 240: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy452)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SStreamOptions*)yymsp[-2].minor.yy456)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 241: /* stream_options ::= stream_options WATERMARK duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy452)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); yylhsminor.yy452 = yymsp[-2].minor.yy452; } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ ((SStreamOptions*)yymsp[-2].minor.yy456)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy456); yylhsminor.yy456 = yymsp[-2].minor.yy456; } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 242: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } @@ -3488,36 +3936,36 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 245: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy478); } +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy632); } break; case 246: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 247: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy478 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +{ yymsp[-1].minor.yy632 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 249: /* cmd ::= SYNCDB db_name REPLICA */ -{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy479); } +{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy537); } break; case 251: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 252: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 253: /* literal ::= NK_STRING */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 254: /* literal ::= NK_BOOL */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 255: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 256: /* literal ::= duration_literal */ case 266: /* signed_literal ::= signed */ yytestcase(yyruleno==266); @@ -3526,163 +3974,163 @@ static YYACTIONTYPE yy_reduce( case 286: /* expression ::= column_reference */ yytestcase(yyruleno==286); case 287: /* expression ::= function_expression */ yytestcase(yyruleno==287); case 288: /* expression ::= subquery */ yytestcase(yyruleno==288); - case 345: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==345); - case 349: /* boolean_primary ::= predicate */ yytestcase(yyruleno==349); - case 351: /* common_expression ::= expression */ yytestcase(yyruleno==351); - case 352: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==352); - case 354: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==354); - case 356: /* table_reference ::= table_primary */ yytestcase(yyruleno==356); - case 357: /* table_reference ::= joined_table */ yytestcase(yyruleno==357); - case 361: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==361); - case 408: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==408); - case 410: /* query_primary ::= query_specification */ yytestcase(yyruleno==410); -{ yylhsminor.yy452 = yymsp[0].minor.yy452; } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 346: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==346); + case 350: /* boolean_primary ::= predicate */ yytestcase(yyruleno==350); + case 352: /* common_expression ::= expression */ yytestcase(yyruleno==352); + case 353: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==353); + case 355: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==355); + case 357: /* table_reference ::= table_primary */ yytestcase(yyruleno==357); + case 358: /* table_reference ::= joined_table */ yytestcase(yyruleno==358); + case 362: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==362); + case 409: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==409); + case 411: /* query_primary ::= query_specification */ yytestcase(yyruleno==411); +{ yylhsminor.yy456 = yymsp[0].minor.yy456; } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 257: /* literal ::= NULL */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 258: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 259: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 260: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 261: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 262: /* 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.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 263: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 264: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 265: /* 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.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 267: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 268: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 269: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 270: /* signed_literal ::= duration_literal */ - case 323: /* star_func_para ::= expression */ yytestcase(yyruleno==323); - case 378: /* select_item ::= common_expression */ yytestcase(yyruleno==378); - case 422: /* search_condition ::= common_expression */ yytestcase(yyruleno==422); -{ yylhsminor.yy452 = releaseRawExprNode(pCxt, yymsp[0].minor.yy452); } - yymsp[0].minor.yy452 = yylhsminor.yy452; + case 324: /* star_func_para ::= expression */ yytestcase(yyruleno==324); + case 379: /* select_item ::= common_expression */ yytestcase(yyruleno==379); + case 423: /* search_condition ::= common_expression */ yytestcase(yyruleno==423); +{ yylhsminor.yy456 = releaseRawExprNode(pCxt, yymsp[0].minor.yy456); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 271: /* signed_literal ::= NULL */ -{ yymsp[0].minor.yy452 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL); } +{ yymsp[0].minor.yy456 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL); } break; case 289: /* expression ::= NK_LP expression NK_RP */ - case 350: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==350); -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 351: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==351); +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 290: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy456)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 291: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy456), NULL)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; case 292: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 293: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 294: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 295: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 296: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 297: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 298: /* expression_list ::= expression */ -{ yylhsminor.yy478 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } - yymsp[0].minor.yy478 = yylhsminor.yy478; +{ yylhsminor.yy632 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy456)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; case 299: /* expression_list ::= expression_list NK_COMMA expression */ -{ yylhsminor.yy478 = addNodeToList(pCxt, yymsp[-2].minor.yy478, releaseRawExprNode(pCxt, yymsp[0].minor.yy452)); } - yymsp[-2].minor.yy478 = yylhsminor.yy478; +{ yylhsminor.yy632 = addNodeToList(pCxt, yymsp[-2].minor.yy632, releaseRawExprNode(pCxt, yymsp[0].minor.yy456)); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; case 300: /* column_reference ::= column_name */ -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy479, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy479)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy537, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy537)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 301: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479, createColumnNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy479)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy537, createColumnNode(pCxt, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy537)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; case 302: /* pseudo_column ::= ROWTS */ case 303: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==303); @@ -3691,306 +4139,306 @@ static YYACTIONTYPE yy_reduce( case 306: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==306); case 307: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==307); case 308: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==308); -{ yylhsminor.yy452 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; case 309: /* function_expression ::= function_name NK_LP expression_list NK_RP */ case 310: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==310); -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy479, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy479, yymsp[-1].minor.yy478)); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy537, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy537, yymsp[-1].minor.yy632)); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; case 311: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy430)); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), yymsp[-1].minor.yy388)); } + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; case 312: /* function_expression ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy479, NULL)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy0, createFunctionNodeNoArg(pCxt, &yymsp[-2].minor.yy537)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 319: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy478 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy478 = yylhsminor.yy478; + case 320: /* star_func_para_list ::= NK_STAR */ +{ yylhsminor.yy632 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 324: /* star_func_para ::= table_name NK_DOT NK_STAR */ - case 381: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==381); -{ yylhsminor.yy452 = createColumnNode(pCxt, &yymsp[-2].minor.yy479, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 325: /* star_func_para ::= table_name NK_DOT NK_STAR */ + case 382: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==382); +{ yylhsminor.yy456 = createColumnNode(pCxt, &yymsp[-2].minor.yy537, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 325: /* predicate ::= expression compare_op expression */ - case 330: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==330); + case 326: /* predicate ::= expression compare_op expression */ + case 331: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==331); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy218, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy416, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 326: /* predicate ::= expression BETWEEN expression AND expression */ + case 327: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy452), releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy456), releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-4].minor.yy452 = yylhsminor.yy452; + yymsp[-4].minor.yy456 = yylhsminor.yy456; break; - case 327: /* predicate ::= expression NOT BETWEEN expression AND expression */ + case 328: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[-5].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; - case 328: /* predicate ::= expression IS NULL */ + case 329: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), NULL)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 329: /* predicate ::= expression IS NOT NULL */ + case 330: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), NULL)); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 331: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy218 = OP_TYPE_LOWER_THAN; } + case 332: /* compare_op ::= NK_LT */ +{ yymsp[0].minor.yy416 = OP_TYPE_LOWER_THAN; } break; - case 332: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy218 = OP_TYPE_GREATER_THAN; } + case 333: /* compare_op ::= NK_GT */ +{ yymsp[0].minor.yy416 = OP_TYPE_GREATER_THAN; } break; - case 333: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy218 = OP_TYPE_LOWER_EQUAL; } + case 334: /* compare_op ::= NK_LE */ +{ yymsp[0].minor.yy416 = OP_TYPE_LOWER_EQUAL; } break; - case 334: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy218 = OP_TYPE_GREATER_EQUAL; } + case 335: /* compare_op ::= NK_GE */ +{ yymsp[0].minor.yy416 = OP_TYPE_GREATER_EQUAL; } break; - case 335: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy218 = OP_TYPE_NOT_EQUAL; } + case 336: /* compare_op ::= NK_NE */ +{ yymsp[0].minor.yy416 = OP_TYPE_NOT_EQUAL; } break; - case 336: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy218 = OP_TYPE_EQUAL; } + case 337: /* compare_op ::= NK_EQ */ +{ yymsp[0].minor.yy416 = OP_TYPE_EQUAL; } break; - case 337: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy218 = OP_TYPE_LIKE; } + case 338: /* compare_op ::= LIKE */ +{ yymsp[0].minor.yy416 = OP_TYPE_LIKE; } break; - case 338: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy218 = OP_TYPE_NOT_LIKE; } + case 339: /* compare_op ::= NOT LIKE */ +{ yymsp[-1].minor.yy416 = OP_TYPE_NOT_LIKE; } break; - case 339: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy218 = OP_TYPE_MATCH; } + case 340: /* compare_op ::= MATCH */ +{ yymsp[0].minor.yy416 = OP_TYPE_MATCH; } break; - case 340: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy218 = OP_TYPE_NMATCH; } + case 341: /* compare_op ::= NMATCH */ +{ yymsp[0].minor.yy416 = OP_TYPE_NMATCH; } break; - case 341: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy218 = OP_TYPE_JSON_CONTAINS; } + case 342: /* compare_op ::= CONTAINS */ +{ yymsp[0].minor.yy416 = OP_TYPE_JSON_CONTAINS; } break; - case 342: /* in_op ::= IN */ -{ yymsp[0].minor.yy218 = OP_TYPE_IN; } + case 343: /* in_op ::= IN */ +{ yymsp[0].minor.yy416 = OP_TYPE_IN; } break; - case 343: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy218 = OP_TYPE_NOT_IN; } + case 344: /* in_op ::= NOT IN */ +{ yymsp[-1].minor.yy416 = OP_TYPE_NOT_IN; } break; - case 344: /* in_predicate_value ::= NK_LP expression_list NK_RP */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy478)); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 345: /* in_predicate_value ::= NK_LP expression_list NK_RP */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy632)); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 346: /* boolean_value_expression ::= NOT boolean_primary */ + case 347: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy452), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy456), NULL)); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 347: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + case 348: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 348: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + case 349: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy452); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy452); - yylhsminor.yy452 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy456); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy456); + yylhsminor.yy456 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 355: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy452 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy452, yymsp[0].minor.yy452, NULL); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 356: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ +{ yylhsminor.yy456 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy456, yymsp[0].minor.yy456, NULL); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 358: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy452 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 359: /* table_primary ::= table_name alias_opt */ +{ yylhsminor.yy456 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy537, &yymsp[0].minor.yy537); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 359: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy452 = createRealTableNode(pCxt, &yymsp[-3].minor.yy479, &yymsp[-1].minor.yy479, &yymsp[0].minor.yy479); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 360: /* table_primary ::= db_name NK_DOT table_name alias_opt */ +{ yylhsminor.yy456 = createRealTableNode(pCxt, &yymsp[-3].minor.yy537, &yymsp[-1].minor.yy537, &yymsp[0].minor.yy537); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 360: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy452 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 361: /* table_primary ::= subquery alias_opt */ +{ yylhsminor.yy456 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456), &yymsp[0].minor.yy537); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 362: /* alias_opt ::= */ -{ yymsp[1].minor.yy479 = nil_token; } + case 363: /* alias_opt ::= */ +{ yymsp[1].minor.yy537 = nil_token; } break; - case 363: /* alias_opt ::= table_alias */ -{ yylhsminor.yy479 = yymsp[0].minor.yy479; } - yymsp[0].minor.yy479 = yylhsminor.yy479; + case 364: /* alias_opt ::= table_alias */ +{ yylhsminor.yy537 = yymsp[0].minor.yy537; } + yymsp[0].minor.yy537 = yylhsminor.yy537; break; - case 364: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy479 = yymsp[0].minor.yy479; } + case 365: /* alias_opt ::= AS table_alias */ +{ yymsp[-1].minor.yy537 = yymsp[0].minor.yy537; } break; - case 365: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - case 366: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==366); -{ yymsp[-2].minor.yy452 = yymsp[-1].minor.yy452; } + case 366: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + case 367: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==367); +{ yymsp[-2].minor.yy456 = yymsp[-1].minor.yy456; } break; - case 367: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy452 = createJoinTableNode(pCxt, yymsp[-4].minor.yy162, yymsp[-5].minor.yy452, yymsp[-2].minor.yy452, yymsp[0].minor.yy452); } - yymsp[-5].minor.yy452 = yylhsminor.yy452; + case 368: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ +{ yylhsminor.yy456 = createJoinTableNode(pCxt, yymsp[-4].minor.yy164, yymsp[-5].minor.yy456, yymsp[-2].minor.yy456, yymsp[0].minor.yy456); } + yymsp[-5].minor.yy456 = yylhsminor.yy456; break; - case 368: /* join_type ::= */ -{ yymsp[1].minor.yy162 = JOIN_TYPE_INNER; } + case 369: /* join_type ::= */ +{ yymsp[1].minor.yy164 = JOIN_TYPE_INNER; } break; - case 369: /* join_type ::= INNER */ -{ yymsp[0].minor.yy162 = JOIN_TYPE_INNER; } + case 370: /* join_type ::= INNER */ +{ yymsp[0].minor.yy164 = JOIN_TYPE_INNER; } break; - case 370: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + case 371: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-8].minor.yy452 = createSelectStmt(pCxt, yymsp[-7].minor.yy659, yymsp[-6].minor.yy478, yymsp[-5].minor.yy452); - yymsp[-8].minor.yy452 = addWhereClause(pCxt, yymsp[-8].minor.yy452, yymsp[-4].minor.yy452); - yymsp[-8].minor.yy452 = addPartitionByClause(pCxt, yymsp[-8].minor.yy452, yymsp[-3].minor.yy478); - yymsp[-8].minor.yy452 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy452, yymsp[-2].minor.yy452); - yymsp[-8].minor.yy452 = addGroupByClause(pCxt, yymsp[-8].minor.yy452, yymsp[-1].minor.yy478); - yymsp[-8].minor.yy452 = addHavingClause(pCxt, yymsp[-8].minor.yy452, yymsp[0].minor.yy452); + yymsp[-8].minor.yy456 = createSelectStmt(pCxt, yymsp[-7].minor.yy649, yymsp[-6].minor.yy632, yymsp[-5].minor.yy456); + yymsp[-8].minor.yy456 = addWhereClause(pCxt, yymsp[-8].minor.yy456, yymsp[-4].minor.yy456); + yymsp[-8].minor.yy456 = addPartitionByClause(pCxt, yymsp[-8].minor.yy456, yymsp[-3].minor.yy632); + yymsp[-8].minor.yy456 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy456, yymsp[-2].minor.yy456); + yymsp[-8].minor.yy456 = addGroupByClause(pCxt, yymsp[-8].minor.yy456, yymsp[-1].minor.yy632); + yymsp[-8].minor.yy456 = addHavingClause(pCxt, yymsp[-8].minor.yy456, yymsp[0].minor.yy456); } break; - case 373: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy659 = false; } + case 374: /* set_quantifier_opt ::= ALL */ +{ yymsp[0].minor.yy649 = false; } break; - case 374: /* select_list ::= NK_STAR */ -{ yymsp[0].minor.yy478 = NULL; } + case 375: /* select_list ::= NK_STAR */ +{ yymsp[0].minor.yy632 = NULL; } break; - case 379: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452), &yymsp[0].minor.yy479); } - yymsp[-1].minor.yy452 = yylhsminor.yy452; + case 380: /* select_item ::= common_expression column_alias */ +{ yylhsminor.yy456 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456), &yymsp[0].minor.yy537); } + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 380: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy452 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), &yymsp[0].minor.yy479); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 381: /* select_item ::= common_expression AS column_alias */ +{ yylhsminor.yy456 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), &yymsp[0].minor.yy537); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 385: /* partition_by_clause_opt ::= PARTITION BY expression_list */ - case 402: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==402); - case 412: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==412); -{ yymsp[-2].minor.yy478 = yymsp[0].minor.yy478; } + case 386: /* partition_by_clause_opt ::= PARTITION BY expression_list */ + case 403: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==403); + case 413: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==413); +{ yymsp[-2].minor.yy632 = yymsp[0].minor.yy632; } break; - case 387: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy452 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 388: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ +{ yymsp[-5].minor.yy456 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), releaseRawExprNode(pCxt, yymsp[-1].minor.yy456)); } break; - case 388: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy452 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy452)); } + case 389: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ +{ yymsp[-3].minor.yy456 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy456)); } break; - case 389: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), NULL, yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 390: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-5].minor.yy456 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), NULL, yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; - case 390: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy452 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy452), releaseRawExprNode(pCxt, yymsp[-3].minor.yy452), yymsp[-1].minor.yy452, yymsp[0].minor.yy452); } + case 391: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ +{ yymsp[-7].minor.yy456 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy456), releaseRawExprNode(pCxt, yymsp[-3].minor.yy456), yymsp[-1].minor.yy456, yymsp[0].minor.yy456); } break; - case 392: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ -{ yymsp[-3].minor.yy452 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy452); } + case 393: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ +{ yymsp[-3].minor.yy456 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy456); } break; - case 394: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy452 = createFillNode(pCxt, yymsp[-1].minor.yy540, NULL); } + case 395: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ +{ yymsp[-3].minor.yy456 = createFillNode(pCxt, yymsp[-1].minor.yy646, NULL); } break; - case 395: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy452 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy478)); } + case 396: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ +{ yymsp[-5].minor.yy456 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy632)); } break; - case 396: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy540 = FILL_MODE_NONE; } + case 397: /* fill_mode ::= NONE */ +{ yymsp[0].minor.yy646 = FILL_MODE_NONE; } break; - case 397: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy540 = FILL_MODE_PREV; } + case 398: /* fill_mode ::= PREV */ +{ yymsp[0].minor.yy646 = FILL_MODE_PREV; } break; - case 398: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy540 = FILL_MODE_NULL; } + case 399: /* fill_mode ::= NULL */ +{ yymsp[0].minor.yy646 = FILL_MODE_NULL; } break; - case 399: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy540 = FILL_MODE_LINEAR; } + case 400: /* fill_mode ::= LINEAR */ +{ yymsp[0].minor.yy646 = FILL_MODE_LINEAR; } break; - case 400: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy540 = FILL_MODE_NEXT; } + case 401: /* fill_mode ::= NEXT */ +{ yymsp[0].minor.yy646 = FILL_MODE_NEXT; } break; - case 403: /* group_by_list ::= expression */ -{ yylhsminor.yy478 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); } - yymsp[0].minor.yy478 = yylhsminor.yy478; + case 404: /* group_by_list ::= expression */ +{ yylhsminor.yy632 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } + yymsp[0].minor.yy632 = yylhsminor.yy632; break; - case 404: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy478 = addNodeToList(pCxt, yymsp[-2].minor.yy478, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy452))); } - yymsp[-2].minor.yy478 = yylhsminor.yy478; + case 405: /* group_by_list ::= group_by_list NK_COMMA expression */ +{ yylhsminor.yy632 = addNodeToList(pCxt, yymsp[-2].minor.yy632, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy456))); } + yymsp[-2].minor.yy632 = yylhsminor.yy632; break; - case 407: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + case 408: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy452 = addOrderByClause(pCxt, yymsp[-3].minor.yy452, yymsp[-2].minor.yy478); - yylhsminor.yy452 = addSlimitClause(pCxt, yylhsminor.yy452, yymsp[-1].minor.yy452); - yylhsminor.yy452 = addLimitClause(pCxt, yylhsminor.yy452, yymsp[0].minor.yy452); + yylhsminor.yy456 = addOrderByClause(pCxt, yymsp[-3].minor.yy456, yymsp[-2].minor.yy632); + yylhsminor.yy456 = addSlimitClause(pCxt, yylhsminor.yy456, yymsp[-1].minor.yy456); + yylhsminor.yy456 = addLimitClause(pCxt, yylhsminor.yy456, yymsp[0].minor.yy456); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 409: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy452 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy452, yymsp[0].minor.yy452); } - yymsp[-3].minor.yy452 = yylhsminor.yy452; + case 410: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ +{ yylhsminor.yy456 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy456, yymsp[0].minor.yy456); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 414: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ - case 418: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==418); -{ yymsp[-1].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } + case 415: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ + case 419: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==419); +{ yymsp[-1].minor.yy456 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; - case 415: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - case 419: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==419); -{ yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } + case 416: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + case 420: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==420); +{ yymsp[-3].minor.yy456 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; - case 416: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - case 420: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==420); -{ yymsp[-3].minor.yy452 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } + case 417: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + case 421: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==421); +{ yymsp[-3].minor.yy456 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; - case 421: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy452 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy452); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 422: /* subquery ::= NK_LP query_expression NK_RP */ +{ yylhsminor.yy456 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy456); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 425: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy452 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy452), yymsp[-1].minor.yy326, yymsp[0].minor.yy595); } - yymsp[-2].minor.yy452 = yylhsminor.yy452; + case 426: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ +{ yylhsminor.yy456 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy456), yymsp[-1].minor.yy626, yymsp[0].minor.yy209); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 426: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy326 = ORDER_ASC; } + case 427: /* ordering_specification_opt ::= */ +{ yymsp[1].minor.yy626 = ORDER_ASC; } break; - case 427: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy326 = ORDER_ASC; } + case 428: /* ordering_specification_opt ::= ASC */ +{ yymsp[0].minor.yy626 = ORDER_ASC; } break; - case 428: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy326 = ORDER_DESC; } + case 429: /* ordering_specification_opt ::= DESC */ +{ yymsp[0].minor.yy626 = ORDER_DESC; } break; - case 429: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy595 = NULL_ORDER_DEFAULT; } + case 430: /* null_ordering_opt ::= */ +{ yymsp[1].minor.yy209 = NULL_ORDER_DEFAULT; } break; - case 430: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy595 = NULL_ORDER_FIRST; } + case 431: /* null_ordering_opt ::= NULLS FIRST */ +{ yymsp[-1].minor.yy209 = NULL_ORDER_FIRST; } break; - case 431: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy595 = NULL_ORDER_LAST; } + case 432: /* null_ordering_opt ::= NULLS LAST */ +{ yymsp[-1].minor.yy209 = NULL_ORDER_LAST; } break; default: break; /********** End reduce actions ************************************************/ }; - assert( yyrulenonode.pParent) && + WINDOW_TYPE_INTERVAL == ((SWindowLogicNode*)pScan->node.pParent)->winType) { + pScan->interval = ((SWindowLogicNode*)pScan->node.pParent)->interval; + pScan->offset = ((SWindowLogicNode*)pScan->node.pParent)->offset; + pScan->sliding = ((SWindowLogicNode*)pScan->node.pParent)->sliding; + pScan->intervalUnit = ((SWindowLogicNode*)pScan->node.pParent)->intervalUnit; + pScan->slidingUnit = ((SWindowLogicNode*)pScan->node.pParent)->slidingUnit; + } +} + static int32_t osdOptimize(SOptimizeContext* pCxt, SLogicNode* pLogicNode) { SOsdInfo info = {0}; int32_t code = osdMatch(pCxt, pLogicNode, &info); if (TSDB_CODE_SUCCESS == code && (NULL != info.pDsoFuncs || NULL != info.pSdrFuncs)) { info.pScan->dataRequired = osdGetDataRequired(info.pSdrFuncs); info.pScan->pDynamicScanFuncs = info.pDsoFuncs; + setScanWindowInfo((SScanLogicNode*)info.pScan); OPTIMIZE_FLAG_SET_MASK(info.pScan->node.optimizedFlag, OPTIMIZE_FLAG_OSD); pCxt->optimized = true; } diff --git a/source/libs/planner/src/planPhysiCreater.c b/source/libs/planner/src/planPhysiCreater.c index f9f6d503a1457dc1c2ebe97046136a75054ff593..caeab20970c59906308ecad94ceb3ea2d4688e84 100644 --- a/source/libs/planner/src/planPhysiCreater.c +++ b/source/libs/planner/src/planPhysiCreater.c @@ -443,6 +443,11 @@ static int32_t createTableScanPhysiNode(SPhysiPlanContext* pCxt, SSubplan* pSubp nodesDestroyNode(pTableScan); return TSDB_CODE_OUT_OF_MEMORY; } + pTableScan->interval = pScanLogicNode->interval; + pTableScan->offset = pScanLogicNode->offset; + pTableScan->sliding = pScanLogicNode->sliding; + pTableScan->intervalUnit = pScanLogicNode->intervalUnit; + pTableScan->slidingUnit = pScanLogicNode->slidingUnit; return createScanPhysiNodeFinalize(pCxt, pScanLogicNode, (SScanPhysiNode*)pTableScan, pPhyNode); } @@ -819,7 +824,6 @@ static int32_t createIntervalPhysiNode(SPhysiPlanContext* pCxt, SNodeList* pChil pInterval->sliding = pWindowLogicNode->sliding; pInterval->intervalUnit = pWindowLogicNode->intervalUnit; pInterval->slidingUnit = pWindowLogicNode->slidingUnit; - pInterval->precision = ((SColumnNode*)pWindowLogicNode->pTspk)->node.resType.precision; pInterval->pFill = nodesCloneNode(pWindowLogicNode->pFill); if (NULL != pWindowLogicNode->pFill && NULL == pInterval->pFill) { diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 97cc80b946b33f4e8c2d07595b3312d2a1615fc8..dc71829e3d6ec97d3e262e711060622dd2412336 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -666,18 +666,14 @@ int32_t substrFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOu } int32_t castFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { - if (inputNum!= 3) { - return TSDB_CODE_FAILED; - } - int16_t inputType = pInput[0].columnData->info.type; - int16_t outputType = *(int16_t *)pInput[1].columnData->pData; + int16_t outputType = pOutput[0].columnData->info.type; if (outputType != TSDB_DATA_TYPE_BIGINT && outputType != TSDB_DATA_TYPE_UBIGINT && outputType != TSDB_DATA_TYPE_VARCHAR && outputType != TSDB_DATA_TYPE_NCHAR && outputType != TSDB_DATA_TYPE_TIMESTAMP) { return TSDB_CODE_FAILED; } - int64_t outputLen = *(int64_t *)pInput[2].columnData->pData; + int64_t outputLen = pOutput[0].columnData->info.bytes; char *input = NULL; char *outputBuf = taosMemoryCalloc(outputLen * pInput[0].numOfRows, 1); @@ -1275,6 +1271,14 @@ int32_t todayFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOut return TSDB_CODE_SUCCESS; } +int32_t timezoneFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { + if (inputNum != 1) { + return TSDB_CODE_FAILED; + } + colDataAppend(pOutput->columnData, pOutput->numOfRows, (char *)colDataGetData(pInput->columnData, 0), false); + return TSDB_CODE_SUCCESS; +} + int32_t atanFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOutput) { return doScalarFunctionUnique(pInput, inputNum, pOutput, atan); } diff --git a/source/libs/scalar/src/sclvector.c b/source/libs/scalar/src/sclvector.c index 05456790a5ecd1988fbec7ee24672055b941a8e6..253944f757a43f8908153dfd305d1a9f625d4a55 100644 --- a/source/libs/scalar/src/sclvector.c +++ b/source/libs/scalar/src/sclvector.c @@ -79,6 +79,8 @@ _getBigintValue_fn_t getVectorBigintValueFn(int32_t srcType) { p = getVectorBigintValue_FLOAT; }else if(srcType==TSDB_DATA_TYPE_DOUBLE) { p = getVectorBigintValue_DOUBLE; + }else if(srcType==TSDB_DATA_TYPE_TIMESTAMP) { + p = getVectorBigintValue_BIGINT; }else { assert(0); } @@ -565,6 +567,25 @@ static void vectorMathAddHelper(SColumnInfoData* pLeftCol, SColumnInfoData* pRig } } +static void vectorMathBigintAddHelper(SColumnInfoData* pLeftCol, SColumnInfoData* pRightCol, SColumnInfoData* pOutputCol, int32_t numOfRows, int32_t step, int32_t i) { + _getBigintValue_fn_t getVectorBigintValueFnLeft = getVectorBigintValueFn(pLeftCol->info.type); + _getBigintValue_fn_t getVectorBigintValueFnRight = getVectorBigintValueFn(pRightCol->info.type); + + int64_t *output = (int64_t *)pOutputCol->pData; + + if (colDataIsNull_f(pRightCol->nullbitmap, 0)) { // Set pLeft->numOfRows NULL value + colDataAppendNNULL(pOutputCol, 0, numOfRows); + } else { + for (; i >= 0 && i < numOfRows; i += step, output += 1) { + *output = getVectorBigintValueFnLeft(pLeftCol->pData, i) + getVectorBigintValueFnRight(pRightCol->pData, 0); + } + pOutputCol->hasNull = pLeftCol->hasNull; + if (pOutputCol->hasNull) { + memcpy(pOutputCol->nullbitmap, pLeftCol->nullbitmap, BitmapLen(numOfRows)); + } + } +} + static SColumnInfoData* doVectorConvert(SScalarParam* pInput, int32_t* doConvert) { SScalarParam convertParam = {0}; @@ -599,27 +620,53 @@ void vectorMathAdd(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut SColumnInfoData *pLeftCol = doVectorConvert(pLeft, &leftConvert); SColumnInfoData *pRightCol = doVectorConvert(pRight, &rightConvert); - _getDoubleValue_fn_t getVectorDoubleValueFnLeft = getVectorDoubleValueFn(pLeftCol->info.type); - _getDoubleValue_fn_t getVectorDoubleValueFnRight = getVectorDoubleValueFn(pRightCol->info.type); + if ((GET_PARAM_TYPE(pLeft) == TSDB_DATA_TYPE_TIMESTAMP && GET_PARAM_TYPE(pRight) == TSDB_DATA_TYPE_BIGINT) || + (GET_PARAM_TYPE(pRight) == TSDB_DATA_TYPE_TIMESTAMP && GET_PARAM_TYPE(pLeft) == TSDB_DATA_TYPE_BIGINT)) { //timestamp plus duration + int64_t *output = (int64_t *)pOutputCol->pData; + _getBigintValue_fn_t getVectorBigintValueFnLeft = getVectorBigintValueFn(pLeftCol->info.type); + _getBigintValue_fn_t getVectorBigintValueFnRight = getVectorBigintValueFn(pRightCol->info.type); - double *output = (double *)pOutputCol->pData; - if (pLeft->numOfRows == pRight->numOfRows) { - for (; i < pRight->numOfRows && i >= 0; i += step, output += 1) { - *output = getVectorDoubleValueFnLeft(pLeftCol->pData, i) + getVectorDoubleValueFnRight(pRightCol->pData, i); - } + if (pLeft->numOfRows == pRight->numOfRows) { + for (; i < pRight->numOfRows && i >= 0; i += step, output += 1) { + *output = getVectorBigintValueFnLeft(pLeftCol->pData, i) + getVectorBigintValueFnRight(pRightCol->pData, i); + } - pOutputCol->hasNull = (pLeftCol->hasNull || pRightCol->hasNull); - if (pOutputCol->hasNull) { - int32_t numOfBitLen = BitmapLen(pLeft->numOfRows); - for (int32_t j = 0; j < numOfBitLen; ++j) { - pOutputCol->nullbitmap[j] = pLeftCol->nullbitmap[j] | pRightCol->nullbitmap[j]; + pOutputCol->hasNull = (pLeftCol->hasNull || pRightCol->hasNull); + if (pOutputCol->hasNull) { + int32_t numOfBitLen = BitmapLen(pLeft->numOfRows); + for (int32_t j = 0; j < numOfBitLen; ++j) { + pOutputCol->nullbitmap[j] = pLeftCol->nullbitmap[j] | pRightCol->nullbitmap[j]; + } } + + } else if (pLeft->numOfRows == 1) { + vectorMathBigintAddHelper(pRightCol, pLeftCol, pOutputCol, pRight->numOfRows, step, i); + } else if (pRight->numOfRows == 1) { + vectorMathBigintAddHelper(pLeftCol, pRightCol, pOutputCol, pLeft->numOfRows, step, i); } + } else { + double *output = (double *)pOutputCol->pData; + _getDoubleValue_fn_t getVectorDoubleValueFnLeft = getVectorDoubleValueFn(pLeftCol->info.type); + _getDoubleValue_fn_t getVectorDoubleValueFnRight = getVectorDoubleValueFn(pRightCol->info.type); - } else if (pLeft->numOfRows == 1) { - vectorMathAddHelper(pRightCol, pLeftCol, pOutputCol, pRight->numOfRows, step, i); - } else if (pRight->numOfRows == 1) { - vectorMathAddHelper(pLeftCol, pRightCol, pOutputCol, pLeft->numOfRows, step, i); + if (pLeft->numOfRows == pRight->numOfRows) { + for (; i < pRight->numOfRows && i >= 0; i += step, output += 1) { + *output = getVectorDoubleValueFnLeft(pLeftCol->pData, i) + getVectorDoubleValueFnRight(pRightCol->pData, i); + } + + pOutputCol->hasNull = (pLeftCol->hasNull || pRightCol->hasNull); + if (pOutputCol->hasNull) { + int32_t numOfBitLen = BitmapLen(pLeft->numOfRows); + for (int32_t j = 0; j < numOfBitLen; ++j) { + pOutputCol->nullbitmap[j] = pLeftCol->nullbitmap[j] | pRightCol->nullbitmap[j]; + } + } + + } else if (pLeft->numOfRows == 1) { + vectorMathAddHelper(pRightCol, pLeftCol, pOutputCol, pRight->numOfRows, step, i); + } else if (pRight->numOfRows == 1) { + vectorMathAddHelper(pLeftCol, pRightCol, pOutputCol, pLeft->numOfRows, step, i); + } } doReleaseVec(pLeftCol, leftConvert); @@ -646,6 +693,25 @@ static void vectorMathSubHelper(SColumnInfoData* pLeftCol, SColumnInfoData* pRig } } +static void vectorMathBigintSubHelper(SColumnInfoData* pLeftCol, SColumnInfoData* pRightCol, SColumnInfoData* pOutputCol, int32_t numOfRows, int32_t step, int32_t factor, int32_t i) { + _getBigintValue_fn_t getVectorBigintValueFnLeft = getVectorBigintValueFn(pLeftCol->info.type); + _getBigintValue_fn_t getVectorBigintValueFnRight = getVectorBigintValueFn(pRightCol->info.type); + + int64_t *output = (int64_t *)pOutputCol->pData; + + if (colDataIsNull_f(pRightCol->nullbitmap, 0)) { // Set pLeft->numOfRows NULL value + colDataAppendNNULL(pOutputCol, 0, numOfRows); + } else { + for (; i >= 0 && i < numOfRows; i += step, output += 1) { + *output = (getVectorBigintValueFnLeft(pLeftCol->pData, i) - getVectorBigintValueFnRight(pRightCol->pData, 0)) * factor; + } + pOutputCol->hasNull = pLeftCol->hasNull; + if (pOutputCol->hasNull) { + memcpy(pOutputCol->nullbitmap, pLeftCol->nullbitmap, BitmapLen(numOfRows)); + } + } +} + void vectorMathSub(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut, int32_t _ord) { SColumnInfoData *pOutputCol = pOut->columnData; @@ -658,27 +724,53 @@ void vectorMathSub(SScalarParam* pLeft, SScalarParam* pRight, SScalarParam *pOut SColumnInfoData *pLeftCol = doVectorConvert(pLeft, &leftConvert); SColumnInfoData *pRightCol = doVectorConvert(pRight, &rightConvert); - _getDoubleValue_fn_t getVectorDoubleValueFnLeft = getVectorDoubleValueFn(pLeftCol->info.type); - _getDoubleValue_fn_t getVectorDoubleValueFnRight = getVectorDoubleValueFn(pRightCol->info.type); + if ((GET_PARAM_TYPE(pLeft) == TSDB_DATA_TYPE_TIMESTAMP && GET_PARAM_TYPE(pRight) == TSDB_DATA_TYPE_BIGINT) || + (GET_PARAM_TYPE(pRight) == TSDB_DATA_TYPE_TIMESTAMP && GET_PARAM_TYPE(pLeft) == TSDB_DATA_TYPE_BIGINT)) { //timestamp minus duration + int64_t *output = (int64_t *)pOutputCol->pData; + _getBigintValue_fn_t getVectorBigintValueFnLeft = getVectorBigintValueFn(pLeftCol->info.type); + _getBigintValue_fn_t getVectorBigintValueFnRight = getVectorBigintValueFn(pRightCol->info.type); - double *output = (double *)pOutputCol->pData; - if (pLeft->numOfRows == pRight->numOfRows) { - for (; i < pRight->numOfRows && i >= 0; i += step, output += 1) { - *output = getVectorDoubleValueFnLeft(pLeftCol->pData, i) - getVectorDoubleValueFnRight(pRightCol->pData, i); - } + if (pLeft->numOfRows == pRight->numOfRows) { + for (; i < pRight->numOfRows && i >= 0; i += step, output += 1) { + *output = getVectorBigintValueFnLeft(pLeftCol->pData, i) - getVectorBigintValueFnRight(pRightCol->pData, i); + } - pOutputCol->hasNull = (pLeftCol->hasNull || pRightCol->hasNull); - if (pOutputCol->hasNull) { - int32_t numOfBitLen = BitmapLen(pLeft->numOfRows); - for (int32_t j = 0; j < numOfBitLen; ++j) { - pOutputCol->nullbitmap[j] = pLeftCol->nullbitmap[j] | pRightCol->nullbitmap[j]; + pOutputCol->hasNull = (pLeftCol->hasNull || pRightCol->hasNull); + if (pOutputCol->hasNull) { + int32_t numOfBitLen = BitmapLen(pLeft->numOfRows); + for (int32_t j = 0; j < numOfBitLen; ++j) { + pOutputCol->nullbitmap[j] = pLeftCol->nullbitmap[j] | pRightCol->nullbitmap[j]; + } } + + } else if (pLeft->numOfRows == 1) { + vectorMathBigintSubHelper(pRightCol, pLeftCol, pOutputCol, pRight->numOfRows, step, -1, i); + } else if (pRight->numOfRows == 1) { + vectorMathBigintSubHelper(pLeftCol, pRightCol, pOutputCol, pLeft->numOfRows, step, 1, i); } + } else { + double *output = (double *)pOutputCol->pData; + _getDoubleValue_fn_t getVectorDoubleValueFnLeft = getVectorDoubleValueFn(pLeftCol->info.type); + _getDoubleValue_fn_t getVectorDoubleValueFnRight = getVectorDoubleValueFn(pRightCol->info.type); - } else if (pLeft->numOfRows == 1) { - vectorMathSubHelper(pRightCol, pLeftCol, pOutputCol, pRight->numOfRows, step, -1, i); - } else if (pRight->numOfRows == 1) { - vectorMathSubHelper(pLeftCol, pRightCol, pOutputCol, pLeft->numOfRows, step, 1, i); + if (pLeft->numOfRows == pRight->numOfRows) { + for (; i < pRight->numOfRows && i >= 0; i += step, output += 1) { + *output = getVectorDoubleValueFnLeft(pLeftCol->pData, i) - getVectorDoubleValueFnRight(pRightCol->pData, i); + } + + pOutputCol->hasNull = (pLeftCol->hasNull || pRightCol->hasNull); + if (pOutputCol->hasNull) { + int32_t numOfBitLen = BitmapLen(pLeft->numOfRows); + for (int32_t j = 0; j < numOfBitLen; ++j) { + pOutputCol->nullbitmap[j] = pLeftCol->nullbitmap[j] | pRightCol->nullbitmap[j]; + } + } + + } else if (pLeft->numOfRows == 1) { + vectorMathSubHelper(pRightCol, pLeftCol, pOutputCol, pRight->numOfRows, step, -1, i); + } else if (pRight->numOfRows == 1) { + vectorMathSubHelper(pLeftCol, pRightCol, pOutputCol, pLeft->numOfRows, step, 1, i); + } } doReleaseVec(pLeftCol, leftConvert); diff --git a/tests/pytest/concurrent_inquiry.sh b/tests/pytest/concurrent_inquiry.sh index 4cb1709bef4d6a7c363db83dcedde7eb725ec0c4..6ac15fb46fd727ca56b1aef7e7137ef822e5244a 100755 --- a/tests/pytest/concurrent_inquiry.sh +++ b/tests/pytest/concurrent_inquiry.sh @@ -35,11 +35,11 @@ CURR_DIR=`pwd` IN_TDINTERNAL="community" if [[ "$CURR_DIR" == *"$IN_TDINTERNAL"* ]]; then TAOS_DIR=$CURR_DIR/../../.. - TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep debug|head -n1` + TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6,7|rev`/lib else TAOS_DIR=$CURR_DIR/../.. - TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep debug|head -n1` + TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6|rev`/lib fi diff --git a/tests/pytest/crash_gen.sh b/tests/pytest/crash_gen.sh index 1c28abfdf4bd82e7ab559f19db6012c7ac72874f..127e13c5be1ea562cbe536bbb05f6ecd5844b0ea 100755 --- a/tests/pytest/crash_gen.sh +++ b/tests/pytest/crash_gen.sh @@ -35,11 +35,11 @@ CURR_DIR=`pwd` IN_TDINTERNAL="community" if [[ "$CURR_DIR" == *"$IN_TDINTERNAL"* ]]; then TAOS_DIR=$CURR_DIR/../../.. - TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep debug|head -n1` + TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6,7|rev`/lib else TAOS_DIR=$CURR_DIR/../.. - TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep debug|head -n1` + TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6|rev`/lib fi diff --git a/tests/pytest/handle_taosd_val_log.sh b/tests/pytest/handle_taosd_val_log.sh index 829bc682258ce051da17c265bb4634712c6cd0e8..a7d14b486796780d943f4ffbdca7e0e82e3e50aa 100755 --- a/tests/pytest/handle_taosd_val_log.sh +++ b/tests/pytest/handle_taosd_val_log.sh @@ -13,7 +13,7 @@ else cd ../../.. fi TOP_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep -v community|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep -v community|grep bin|head -n1` VALGRIND_OUT=taosd_valgrind.out VALGRIND_ERR=taosd_valgrind.err rm -rf /var/lib/taos/* diff --git a/tests/pytest/perf_gen.sh b/tests/pytest/perf_gen.sh index 13a667fd3801b1e0828d5704caec63c09a1c4518..d28b5422f8ba4d4683c78020e45d2085385c4b4f 100755 --- a/tests/pytest/perf_gen.sh +++ b/tests/pytest/perf_gen.sh @@ -35,11 +35,11 @@ CURR_DIR=`pwd` IN_TDINTERNAL="community" if [[ "$CURR_DIR" == *"$IN_TDINTERNAL"* ]]; then TAOS_DIR=$CURR_DIR/../../.. - TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep debug|head -n1` + TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6,7|rev`/lib else TAOS_DIR=$CURR_DIR/../.. - TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep debug|head -n1` + TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6|rev`/lib fi diff --git a/tests/pytest/test.sh b/tests/pytest/test.sh index fd3010f4cbc7e518a7692dbdb78fa3da2103b543..4e74341f7075b50329a49aa3eccd09f68b733f20 100755 --- a/tests/pytest/test.sh +++ b/tests/pytest/test.sh @@ -11,7 +11,7 @@ if [[ "$CURR_DIR" == *"$IN_TDINTERNAL"* ]]; then else TAOS_DIR=$CURR_DIR/../.. fi -TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6|rev`/lib export PYTHONPATH=$(pwd)/../../src/connector/python export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIB_DIR diff --git a/tests/script/runAllSimCases.sh b/tests/script/runAllSimCases.sh index 70f2f86115eaabddf13b2b7ea14e1c9b187c2369..279bc8363ea3607dca9541685c3d22fc1394fadf 100755 --- a/tests/script/runAllSimCases.sh +++ b/tests/script/runAllSimCases.sh @@ -10,7 +10,9 @@ set -e #set -x VALGRIND=0 LOG_BK_DIR=/data/valgrind_log_backup # 192.168.0.203 -while getopts "v:r" arg +SIM_FILES=./jenkins/basic.txt + +while getopts "v:r:f:" arg do case $arg in v) @@ -19,6 +21,9 @@ do r) LOG_BK_DIR=$(echo $OPTARG) ;; + f) + SIM_FILES=$(echo $OPTARG) + ;; ?) #unknow option echo "unkonw argument" exit 1 @@ -27,6 +32,7 @@ do done echo "VALGRIND: $VALGRIND, LOG_BK_DIR: $LOG_BK_DIR" +echo "SIM_FILES: $SIM_FILES" CURRENT_DIR=`pwd` TSIM_LOG_DIR=$CURRENT_DIR/../../sim/tsim/log @@ -76,6 +82,7 @@ do $line fi fi -done < ./jenkins/basic.txt +done < ${SIM_FILES} +#done < ./jenkins/basic.txt diff --git a/tests/script/sh/cfg.sh b/tests/script/sh/cfg.sh index ac7e81e87b61042b748c9f52ac8c3b08a4ee1dc2..7d4d747e54bab9ed98b42ab1902f8580e17fca6c 100755 --- a/tests/script/sh/cfg.sh +++ b/tests/script/sh/cfg.sh @@ -43,7 +43,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -52,9 +52,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/sh/clear.sh b/tests/script/sh/clear.sh index 197020c92812f72a82698bd84427acaa7e5a3c1a..4ee296cf058370552b14c31b67006830e84847dd 100755 --- a/tests/script/sh/clear.sh +++ b/tests/script/sh/clear.sh @@ -46,7 +46,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -55,9 +55,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/sh/deploy.sh b/tests/script/sh/deploy.sh index 29a495113f8bc0c3b61271d0193408290924f330..b8abd4ff1023a7aa45ef3c0acdc143225afe2b37 100755 --- a/tests/script/sh/deploy.sh +++ b/tests/script/sh/deploy.sh @@ -41,7 +41,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -50,9 +50,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep source|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep source|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR diff --git a/tests/script/sh/exec-default.sh b/tests/script/sh/exec-default.sh index cca8dd0c3424b3e5d7482a8908af48bfd1aa2dc3..f648315c6745f63cfba9eb06ecfd53a9ccef1fed 100755 --- a/tests/script/sh/exec-default.sh +++ b/tests/script/sh/exec-default.sh @@ -52,7 +52,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -61,9 +61,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/sh/exec-no-random-fail.sh b/tests/script/sh/exec-no-random-fail.sh index 72b2035af5105ed24b510cfa2bfb032654672f14..e01b18a8e6bb0d4631a28c64c6accd57bceb9076 100755 --- a/tests/script/sh/exec-no-random-fail.sh +++ b/tests/script/sh/exec-no-random-fail.sh @@ -52,7 +52,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -61,9 +61,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/sh/exec-random-fail.sh b/tests/script/sh/exec-random-fail.sh index 5ed71af05d1c428a7a59d2212f06339a951e8234..1f31899e3ac26861fc1860d10cb0a4899ff7bf36 100755 --- a/tests/script/sh/exec-random-fail.sh +++ b/tests/script/sh/exec-random-fail.sh @@ -52,7 +52,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -61,9 +61,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/sh/exec.sh b/tests/script/sh/exec.sh index 606f77892079ab3ea30e1f4237641fd231b0ff39..1310cf26566615f63d53b6b7723b7ea3533f1cba 100755 --- a/tests/script/sh/exec.sh +++ b/tests/script/sh/exec.sh @@ -56,7 +56,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -65,16 +65,16 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep source|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep source|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR SIM_DIR=$TAOS_DIR/sim NODE_DIR=$SIM_DIR/$NODE_NAME -EXE_DIR=$BUILD_DIR/source/dnode/mgmt +EXE_DIR=$BUILD_DIR/build/bin CFG_DIR=$NODE_DIR/cfg LOG_DIR=$NODE_DIR/log DATA_DIR=$NODE_DIR/data @@ -101,8 +101,8 @@ if [ "$EXEC_OPTON" = "start" ]; then if [ "$VALGRIND_OPTION" = "true" ]; then TT=`date +%s` #mkdir ${LOG_DIR}/${TT} - echo "nohup valgrind --log-file=${LOG_DIR}/valgrind-taosd-${TT}.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &" - nohup valgrind --log-file=${LOG_DIR}/valgrind-taosd-${TT}.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & + echo "nohup valgrind --log-file=${LOG_DIR}/valgrind-taosd-${NODE_NAME}-${TT}.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &" + nohup valgrind --log-file=${LOG_DIR}/valgrind-taosd-${NODE_NAME}-${TT}.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & else echo "nohup $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &" nohup $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & diff --git a/tests/script/sh/exec_tarbitrator.sh b/tests/script/sh/exec_tarbitrator.sh index 1b91d999a7bb4e74ebb12a51ea365b70f59c5256..e985bd65856025b2db8dfef724fdc652b2a03392 100755 --- a/tests/script/sh/exec_tarbitrator.sh +++ b/tests/script/sh/exec_tarbitrator.sh @@ -49,7 +49,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -58,9 +58,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/sh/massiveTable/compileVersion.sh b/tests/script/sh/massiveTable/compileVersion.sh index 68c049cad706435fba1d574451211e7bbf257d20..dcd1f8aeea7a4feac4e215db5b09e2e7c5346854 100755 --- a/tests/script/sh/massiveTable/compileVersion.sh +++ b/tests/script/sh/massiveTable/compileVersion.sh @@ -67,9 +67,9 @@ cd ${projectDir} gitPullBranchInfo $TDengineBrVer compileTDengineVersion -taos_dir=${projectDir}/debug/tools/shell -taosd_dir=${projectDir}/debug/source/dnode/mgmt -exec_process_dir=${projectDir}/debug/tests/test/c +taos_dir=${projectDir}/debug/build/bin +taosd_dir=${projectDir}/debug/build/bin +exec_process_dir=${projectDir}/debug/build/bin rm -f /usr/bin/taos rm -f /usr/bin/taosd diff --git a/tests/script/sh/move_dnode.sh b/tests/script/sh/move_dnode.sh index 4aa2daa3973fb52ff4680c7a146bcbf1905ae64f..d3650c18ad0f49185ce1e1268273b8a44e3cdc14 100755 --- a/tests/script/sh/move_dnode.sh +++ b/tests/script/sh/move_dnode.sh @@ -18,7 +18,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -27,9 +27,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/sh/mv_old_data.sh b/tests/script/sh/mv_old_data.sh index 2c99bc11c4990603845a135775e0826eaafc5b7c..3f4be6714fd757ee60d21ee97be5d411e3f95bdd 100755 --- a/tests/script/sh/mv_old_data.sh +++ b/tests/script/sh/mv_old_data.sh @@ -18,7 +18,7 @@ else fi TAOS_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -27,9 +27,9 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep debug|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi BUILD_DIR=$TAOS_DIR/$BIN_DIR/build diff --git a/tests/script/test.sh b/tests/script/test.sh index 27fa4933e0d24fc62f4b643aaa86e0920203d3f4..14dc43beaf2c104165c954a8aa3c96d7252da03c 100755 --- a/tests/script/test.sh +++ b/tests/script/test.sh @@ -51,7 +51,7 @@ else fi TOP_DIR=`pwd` -TAOSD_DIR=`find . -name "taosd"|grep debug|head -n1` +TAOSD_DIR=`find . -name "taosd"|grep bin|head -n1` if [[ "$OS_TYPE" != "Darwin" ]]; then cut_opt="--field=" @@ -60,16 +60,16 @@ else fi if [[ "$TAOSD_DIR" == *"$IN_TDINTERNAL"* ]]; then - BIN_DIR=`find . -name "taosd"|grep source|head -n1|cut -d '/' ${cut_opt}2,3` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2,3` else - BIN_DIR=`find . -name "taosd"|grep source|head -n1|cut -d '/' ${cut_opt}2` + BIN_DIR=`find . -name "taosd"|grep bin|head -n1|cut -d '/' ${cut_opt}2` fi -BUILD_DIR=$TOP_DIR/$BIN_DIR +declare -x BUILD_DIR=$TOP_DIR/$BIN_DIR -SIM_DIR=$TOP_DIR/sim +declare -x SIM_DIR=$TOP_DIR/sim -PROGRAM=$BUILD_DIR/tests/tsim/tsim +PROGRAM=$BUILD_DIR/build/bin/tsim PRG_DIR=$SIM_DIR/tsim CFG_DIR=$PRG_DIR/cfg @@ -125,8 +125,14 @@ ulimit -c unlimited if [ -n "$FILE_NAME" ]; then echo "------------------------------------------------------------------------" if [ $VALGRIND -eq 1 ]; then - echo valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${CODE_DIR}/../script/valgrind.log $PROGRAM -c $CFG_DIR -f $FILE_NAME -v - valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${LOG_DIR}/valgrind-tsim.log $PROGRAM -c $CFG_DIR -f $FILE_NAME -v + if [[ $MULTIPROCESS -eq 1 ]];then + FLAG="-m -v" + else + FLAG="-v" + fi + + echo valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${LOG_DIR}/valgrind-tsim.log $PROGRAM -c $CFG_DIR -f $FILE_NAME $FLAG + valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes --log-file=${LOG_DIR}/valgrind-tsim.log $PROGRAM -c $CFG_DIR -f $FILE_NAME $FLAG else if [[ $MULTIPROCESS -eq 1 ]];then echo "ExcuteCmd(multiprocess):" $PROGRAM -m -c $CFG_DIR -f $FILE_NAME diff --git a/tests/script/tsim/query/explain.sim b/tests/script/tsim/query/explain.sim index 3358b24e838a219f49b2ef5a1151d69e2eae0eb0..5119f58ec3da27e235e52e9fc8376405a5d67621 100644 --- a/tests/script/tsim/query/explain.sim +++ b/tests/script/tsim/query/explain.sim @@ -45,8 +45,8 @@ sql explain select * from information_schema.user_stables; sql explain select count(*),sum(f1) from tb1; sql explain select count(*),sum(f1) from st1; sql explain select count(*),sum(f1) from st1 group by f1; -sql explain select count(f1) from tb1 interval(1s, 2d) sliding(3s) fill(prev); -sql explain select min(f1) from st1 interval(1m, 2a) sliding(3n); +sql explain select count(f1) from tb1 interval(10s, 2s) sliding(3s) fill(prev); +sql explain select min(f1) from st1 interval(1m, 2a) sliding(30s); print ======== step3 sql explain verbose true select * from st1 where -2; @@ -65,8 +65,8 @@ sql explain analyze select * from information_schema.user_stables; sql explain analyze select count(*),sum(f1) from tb1; sql explain analyze select count(*),sum(f1) from st1; sql explain analyze select count(*),sum(f1) from st1 group by f1; -sql explain analyze select count(f1) from tb1 interval(1s, 2d) sliding(3s) fill(prev); -sql explain analyze select min(f1) from st1 interval(3n, 2a) sliding(1n); +sql explain analyze select count(f1) from tb1 interval(10s, 2s) sliding(3s) fill(prev); +sql explain analyze select min(f1) from st1 interval(3m, 2a) sliding(1m); print ======== step5 sql explain analyze verbose true select ts from st1 where -2; @@ -78,20 +78,20 @@ sql explain analyze verbose true select * from information_schema.user_stables; sql explain analyze verbose true select count(*),sum(f1) from tb1; sql explain analyze verbose true select count(*),sum(f1) from st1; sql explain analyze verbose true select count(*),sum(f1) from st1 group by f1; -sql explain analyze verbose true select count(f1) from tb1 interval(1s, 2d) sliding(3s) fill(prev); +sql explain analyze verbose true select count(f1) from tb1 interval(10s, 2s) sliding(3s) fill(prev); sql explain analyze verbose true select ts from tb1 where f1 > 0; sql explain analyze verbose true select f1 from st1 where f1 > 0 and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00'; sql explain analyze verbose true select * from information_schema.user_stables where db_name='db2'; sql explain analyze verbose true select count(*),sum(f1) from st1 where f1 > 0 and ts > '2021-10-31 00:00:00' group by f1 having sum(f1) > 0; -sql explain analyze verbose true select min(f1) from st1 interval(3n, 2a) sliding(1n); +sql explain analyze verbose true select min(f1) from st1 interval(3m, 2a) sliding(1m); sql explain analyze verbose true select * from (select min(f1),count(*) a from st1 where f1 > 0) where a < 0; #not pass case #sql explain verbose true select count(*),sum(f1) as aa from tb1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' order by aa; #sql explain verbose true select * from st1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' order by ts; #sql explain verbose true select count(*),sum(f1) from st1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' order by ts; -#sql explain verbose true select count(f1) from tb1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' interval(1s, 2d) sliding(3s) order by ts; -#sql explain verbose true select min(f1) from st1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' interval(1m, 2a) sliding(3n) fill(linear) order by ts; +#sql explain verbose true select count(f1) from tb1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' interval(10s, 2s) sliding(3s) order by ts; +#sql explain verbose true select min(f1) from st1 where (f1 > 0 or f1 < -1) and ts > '2020-10-31 00:00:00' and ts < '2021-10-31 00:00:00' interval(1m, 2a) sliding(30s) fill(linear) order by ts; #sql explain select max(f1) from tb1 SESSION(ts, 1s); #sql explain select max(f1) from st1 SESSION(ts, 1s); #sql explain select * from tb1, tb2 where tb1.ts=tb2.ts; diff --git a/tests/script/tsim/query/interval-offset.sim b/tests/script/tsim/query/interval-offset.sim index 6c736e9daaa415c3e2eac81be02b353b1bb7c037..68860dc2cb787afd6a2634596975f988ebabf31e 100644 --- a/tests/script/tsim/query/interval-offset.sim +++ b/tests/script/tsim/query/interval-offset.sim @@ -200,43 +200,8 @@ if $data02 != 2678400000 then return -1 endi -sql select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct3 interval(1n, 1w) sliding(2w) -print ===> select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct3 interval(1n, 1w) sliding(2w) -print ===> rows: $rows -print ===> rows0: $data00 $data01 $data02 $data03 $data04 -print ===> rows1: $data10 $data11 $data12 $data13 $data14 -print ===> rows2: $data20 $data21 $data22 $data23 $data24 -print ===> rows3: $data30 $data31 $data32 $data33 $data34 -if $rows != 4 then - return -1 -endi -if $data00 != @21-11-30 08:00:00.000@ then - return -1 -endi -if $data01 != NULL then - print expect null, actual: $data01 - return -1 -endi -if $data31 != $data34 then - return -1 -endi - -sql select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct3 interval(1n, 1w) sliding(4w) -print ===> select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct3 interval(1n, 1w) sliding(4w) -print ===> rows: $rows -print ===> rows0: $data00 $data01 $data02 $data03 $data04 -print ===> rows1: $data10 $data11 $data12 $data13 $data14 -print ===> rows2: $data20 $data21 $data22 $data23 $data24 -print ===> rows3: $data30 $data31 $data32 $data33 $data34 -if $rows != 4 then - return -1 -endi -if $data01 != NULL then - return -1 -endi -if $data04 != 1 then - return -1 -endi +sql_error select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct3 interval(1n, 1w) sliding(2w) +sql_error select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct3 interval(1n, 1w) sliding(4w) sql select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct4 interval(1y, 6n) print ===> select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct4 interval(1y, 6n) @@ -254,37 +219,8 @@ if $data04 != 2 then return -1 endi -sql select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct4 interval(1y, 6n) sliding(6n) -print ===> select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct4 interval(1y, 6n) sliding(6n) -print ===> rows: $rows -print ===> rows0: $data00 $data01 $data02 $data03 $data04 -print ===> rows1: $data10 $data11 $data12 $data13 $data14 -print ===> rows2: $data20 $data21 $data22 $data23 $data24 -if $rows != 3 then - return -1 -endi -if $data00 != 2 then - return -1 -endi -if $data04 != 2 then - return -1 -endi - -sql select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct4 interval(1y, 6n) sliding(12n) -print ===> select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct4 interval(1y, 6n) sliding(12n) -print ===> rows: $rows -print ===> rows0: $data00 $data01 $data02 $data03 $data04 -print ===> rows1: $data10 $data11 $data12 $data13 $data14 -print ===> rows2: $data20 $data21 $data22 $data23 $data24 -if $rows != 3 then - return -1 -endi -if $data01 != 2 then - return -1 -endi -if $data04 != 2 then - return -1 -endi +sql_error select count(tbcol), sum(tbcol), max(tbcol), min(tbcol), count(*) from ct4 interval(1y, 6n) sliding(6n) +sql_error select _wstartts, count(tbcol), _wduration, _wstartts, count(*) from ct4 interval(1y, 6n) sliding(12n) #================================================= print =============== stop and restart taosd diff --git a/tests/script/tsim/query/session.sim b/tests/script/tsim/query/session.sim index 5062c556a56195ce719f800baf7f289c532229f6..28f021e4edd9a614d2e0c10240cb4c063769e343 100644 --- a/tests/script/tsim/query/session.sim +++ b/tests/script/tsim/query/session.sim @@ -290,32 +290,33 @@ print ================> syntax error check not active ================> reactive sql_error select * from dev_001 session(ts,1w) sql_error select count(*) from st session(ts,1w) sql_error select count(*) from dev_001 group by tagtype session(ts,1w) -sql select count(*) from dev_001 session(ts,1n) -sql select count(*) from dev_001 session(ts,1y) -sql select count(*) from dev_001 session(ts,0s) +sql_error sql select count(*) from dev_001 session(ts,1n) +sql_error sql select count(*) from dev_001 session(ts,1y) +sql_error sql select count(*) from dev_001 session(ts,0s) sql_error select count(*) from dev_001 session(i,1y) sql_error select count(*) from dev_001 session(ts,1d) where ts <'2020-05-20 0:0:0' -print ====> create database d1 precision 'us' -sql create database d1 precision 'us' -sql use d1 -sql create table dev_001 (ts timestamp ,i timestamp ,j int) -sql insert into dev_001 values(1623046993681000,now,1)(1623046993681001,now+1s,2)(1623046993681002,now+2s,3)(1623046993681004,now+5s,4) -print ====> select count(*) from dev_001 session(ts,1u) -sql select _wstartts, count(*) from dev_001 session(ts,1u) -print rows: $rows -print $data00 $data01 $data02 $data03 -print $data10 $data11 $data12 $data13 -print $data20 $data21 $data22 $data23 -print $data30 $data31 $data32 $data33 -if $rows != 4 then - print expect 2, actual: $rows - return -1 -endi - -if $data01 != 1 then - return -1 -endi +# vnode does not return the precision of the table +#print ====> create database d1 precision 'us' +#sql create database d1 precision 'us' +#sql use d1 +#sql create table dev_001 (ts timestamp ,i timestamp ,j int) +#sql insert into dev_001 values(1623046993681000,now,1)(1623046993681001,now+1s,2)(1623046993681002,now+2s,3)(1623046993681004,now+5s,4) +#print ====> select count(*) from dev_001 session(ts,1u) +#sql select _wstartts, count(*) from dev_001 session(ts,1u) +#print rows: $rows +#print $data00 $data01 $data02 $data03 +#print $data10 $data11 $data12 $data13 +#print $data20 $data21 $data22 $data23 +#print $data30 $data31 $data32 $data33 +#if $rows != 4 then +# print expect 2, actual: $rows +# return -1 +#endi +# +#if $data01 != 1 then +# return -1 +#endi #sql_error select count(*) from dev_001 session(i,1s) sql create table secondts(ts timestamp,t2 timestamp,i int) diff --git a/tests/script/tsim/tmq/basic.sim b/tests/script/tsim/tmq/basic.sim index db2c7fd9a3152935c7e5b7a76f74dfd6fada538b..2f16b7c737ca9d22b30ee0e346b34ca341c44c38 100644 --- a/tests/script/tsim/tmq/basic.sim +++ b/tests/script/tsim/tmq/basic.sim @@ -41,8 +41,15 @@ endi # -m startTimestamp, default is 1640966400000 [2022-01-01 00:00:00] # -g showMsgFlag, default is 0 # -print cmd===> system_content ../../debug/tests/test/c/tmq_demo -sim 1 -b 100 -c ../../sim/tsim/cfg -w ../../sim/dnode1/data/vnode/vnode4/wal -system_content ../../debug/tests/test/c/tmq_demo -sim 1 -b 100 -c ../../sim/tsim/cfg -w ../../sim/dnode1/data/vnode/vnode4/wal + +system_content echo -n \$BUILD_DIR +$tmq_demo = $system_content . /build/bin/tmq_demo +system_content echo -n \$SIM_DIR +$tsim_cfg = $system_content . /tsim/cfg +$sim_wal = $system_content . /dnode1/data/vnode/vnode4/wal + +print cmd===> system_content $tmq_demo -sim 1 -b 100 -c $tsim_cfg -w $sim_wal +system_content $tmq_demo -sim 1 -b 100 -c $tsim_cfg -w $sim_wal print cmd result----> $system_content if $system_content != @{consume success: 100}@ then return -1 diff --git a/tests/script/tsim/tmq/basic1.sim b/tests/script/tsim/tmq/basic1.sim index 52e827932219fef8a5f28698bc14418f9f134a15..84927c83a022c758a364d2be9bfbb3e80c963cb4 100644 --- a/tests/script/tsim/tmq/basic1.sim +++ b/tests/script/tsim/tmq/basic1.sim @@ -127,65 +127,70 @@ print inserted totalMsgCnt: $totalMsgCnt # td.connect.port:6030 # td.connect.db:db -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +system_content echo -n \$SIM_DIR +$tsim_cfg = $system_content . /tsim/cfg + +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 20, 0}@ then return -1 endi -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" #print cmd result----> $system_content #if $system_content != @{consume success: 20, 0}@ then # return -1 #endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 20, 0}@ then print expect @{consume success: 20, 0}@, actual: $system_content return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 10, 0}@ then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 10, 0}@ then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 10, 0}@ then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 20, 0}@ then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 20, 0}@ then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" print cmd result----> $system_content if $system_content != @{consume success: 20, 0}@ then return -1 diff --git a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim b/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim index 16e37e0e122ce330f2d6788ca47a5dc55815147e..4fd4e60648bf0e66951f8771a3ecc70c56c8c372 100644 --- a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim +++ b/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrCtb.sim @@ -180,22 +180,27 @@ $expect_result = $expect_result . $rowNum $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 0 print cmd result----> $system_content if $system_content != success then return -1 @@ -206,22 +211,22 @@ endi #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 @@ -232,23 +237,23 @@ endi #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -##print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -##system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +##print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +##system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb ##print cmd result----> $system_content ###if $system_content != @{consume success: 10000, 0}@ then ##if $system_content != success then ## return -1 ##endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb #print cmd result----> $system_content ##if $system_content != @{consume success: 10000, 0}@ then #if $system_content != success then diff --git a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim b/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim index 9b24e4870dec0c9dd8ddbcbdbae18ed30af5495a..3f199836f4df15f78d547f707e4da3eaad7dedc7 100644 --- a/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim +++ b/tests/script/tsim/tmq/main2Con1Cgrp1TopicFrStb.sim @@ -156,22 +156,27 @@ print expectMsgCntFromStb: $expectMsgCntFromStb #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 @@ -182,22 +187,22 @@ print expectMsgCntFromStb: $expectMsgCntFromStb #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 @@ -208,23 +213,23 @@ $expect_result = $expect_result . $expectMsgCntFromStb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 print cmd result----> $system_content if $system_content != success then return -1 endi -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 #print cmd result----> $system_content ##if $system_content != @{consume success: 10000, 0}@ then #if $system_content != success then # return -1 #endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 0 print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != success then diff --git a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim b/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim index 8c0b3934b1bc0bfdbcf5961fe92b119f8a04df04..818a87a5a1bff77ee64737214a5f6929aa961e49 100644 --- a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim +++ b/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrCtb.sim @@ -150,22 +150,27 @@ $expect_result = $expect_result . $rowNum $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 print cmd result----> $system_content if $system_content != success then return -1 @@ -176,22 +181,22 @@ endi #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 1 #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 @@ -202,23 +207,23 @@ endi #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -##print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -##system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +##print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +##system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb ##print cmd result----> $system_content ###if $system_content != @{consume success: 10000, 0}@ then ##if $system_content != success then ## return -1 ##endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb #print cmd result----> $system_content ##if $system_content != @{consume success: 10000, 0}@ then #if $system_content != success then diff --git a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim b/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim index 853d842a44fefc1a8d09191a874f6817d5252702..1789a6bef316985e9409411d2859048739b91af0 100644 --- a/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim +++ b/tests/script/tsim/tmq/main2Con1Cgrp2TopicFrStb.sim @@ -156,22 +156,27 @@ print expectMsgCntFromStb: $expectMsgCntFromStb #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_column" -k1 "group.id:tg2" -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_all" -k1 "group.id:tg2" -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ctb_function" -k1 "group.id:tg2" -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 @@ -182,22 +187,22 @@ print expectMsgCntFromStb: $expectMsgCntFromStb #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_column" -k1 "group.id:tg2" -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_all" -k1 "group.id:tg2" -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 #endi # -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_ntb_function" -k1 "group.id:tg2" -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb #print cmd result----> $system_content #if $system_content != success then # return -1 @@ -208,23 +213,23 @@ $expect_result = $expect_result . $expectMsgCntFromStb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 print cmd result----> $system_content if $system_content != success then return -1 endi -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_all" -k1 "group.id:tg2" -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 #print cmd result----> $system_content ##if $system_content != @{consume success: 10000, 0}@ then #if $system_content != success then # return -1 #endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column" -k1 "group.id:tg2" -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 1 print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != success then diff --git a/tests/script/tsim/tmq/mainConsumerInMultiTopic.sim b/tests/script/tsim/tmq/mainConsumerInMultiTopic.sim index e9e24d06c6f5ebadd3e79b2c8f129e37a11f91b5..e0c463df65679ca260b6988c1f4c1a54400a4e8a 100644 --- a/tests/script/tsim/tmq/mainConsumerInMultiTopic.sim +++ b/tests/script/tsim/tmq/mainConsumerInMultiTopic.sim @@ -160,10 +160,15 @@ $expect_result = $expect_result . $expectMsgCntFromStb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb print cmd result----> $system_content #if $system_content != @{consume success: 20000, 0}@ then if $system_content != $expect_result then @@ -178,8 +183,8 @@ $expect_result = $expect_result . $expectMsgCntFromCtb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb print cmd result----> $system_content #if $system_content != @{consume success: 300, 0}@ then if $system_content != $expect_result then @@ -194,8 +199,8 @@ $expect_result = $expect_result . $expectMsgCntFromNtb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb print cmd result----> $system_content #if $system_content != @{consume success: 30000, 0}@ then if $system_content != $expect_result then diff --git a/tests/script/tsim/tmq/mainConsumerInOneTopic.sim b/tests/script/tsim/tmq/mainConsumerInOneTopic.sim index 24f15ab46d957fa15b684e690e1f1417218106db..985237e34b79d08ee44ef991c2a97795948682bc 100644 --- a/tests/script/tsim/tmq/mainConsumerInOneTopic.sim +++ b/tests/script/tsim/tmq/mainConsumerInOneTopic.sim @@ -157,23 +157,28 @@ $expect_result = $expect_result . $expectMsgCntFromStb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb print cmd result----> $system_content if $system_content != $expect_result then return -1 endi -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb #print cmd result----> $system_content ##if $system_content != @{consume success: 10000, 0}@ then #if $system_content != $expect_result then # return -1 #endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != $expect_result then @@ -185,22 +190,22 @@ $expect_result = $expect_result . $expectMsgCntFromCtb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb print cmd result----> $system_content if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb print cmd result----> $system_content if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb print cmd result----> $system_content if $system_content != $expect_result then return -1 @@ -211,22 +216,22 @@ $expect_result = $expect_result . $expectMsgCntFromStb $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb print cmd result----> $system_content if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb print cmd result----> $system_content if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb print cmd result----> $system_content if $system_content != $expect_result then return -1 diff --git a/tests/script/tsim/tmq/multiTopic.sim b/tests/script/tsim/tmq/multiTopic.sim index ea5d7e3e6528a5b7a09dfc138118633116fed978..4ad2df38f85d5548ab97fc3b35dc563e6dc76856 100644 --- a/tests/script/tsim/tmq/multiTopic.sim +++ b/tests/script/tsim/tmq/multiTopic.sim @@ -173,10 +173,15 @@ $expect_result = $expect_result . $totalMsgCntOfmultiTopics $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function, topic_stb_all" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column, topic_stb_function" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 20000, 0}@ then if $system_content != $expect_result then @@ -190,8 +195,8 @@ $expect_result = $expect_result . $totalMsgCntOfmultiTopics $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 300, 0}@ then if $system_content != $expect_result then @@ -205,8 +210,8 @@ $expect_result = $expect_result . $totalMsgCntOfmultiTopics $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_all, topic_ntb_function" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 30000, 0}@ then if $system_content != $expect_result then diff --git a/tests/script/tsim/tmq/oneTopic.sim b/tests/script/tsim/tmq/oneTopic.sim index 54b79bc490c78c3ba326e713aa9f6b4d3a9e1b27..dbe6dbcb275fec214c6d0cad85e06a109e6448f8 100644 --- a/tests/script/tsim/tmq/oneTopic.sim +++ b/tests/script/tsim/tmq/oneTopic.sim @@ -171,24 +171,29 @@ $expect_result = $expect_result . $totalMsgCnt $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_column" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != $expect_result then return -1 endi -#print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" -#system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" +#print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" +#system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_all" -k "group.id:tg2" #print cmd result----> $system_content ##if $system_content != @{consume success: 10000, 0}@ then #if $system_content != $expect_result then # return -1 #endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_stb_function" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != $expect_result then @@ -200,24 +205,24 @@ $expect_result = $expect_result . $rowNum $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 100, 0}@ then if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_all" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 100, 0}@ then if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_function" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 100, 0}@ then if $system_content != $expect_result then @@ -229,24 +234,24 @@ $expect_result = $expect_result . $totalMsgCnt $expect_result = $expect_result . @, @ $expect_result = $expect_result . 0} print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_all" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != $expect_result then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_function" -k "group.id:tg2" print cmd result----> $system_content #if $system_content != @{consume success: 10000, 0}@ then if $system_content != $expect_result then diff --git a/tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim b/tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim index 943e139196dafa1c3a0c727b203fd6d3e2b67425..2bad16fbaacc7a20239e62cd6f9de5a89205fb9b 100644 --- a/tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim +++ b/tests/script/tsim/tmq/overlapTopic2Con1Cgrp.sim @@ -190,15 +190,20 @@ endi $expectMsgCntFromStb0 = 2001 $expectMsgCntFromStb1 = 2001 -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb0 -m1 $expectMsgCntFromStb1 -j 2 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb0 -m1 $expectMsgCntFromStb1 -j 2 + +system_content echo -n \$BUILD_DIR +$tmq_sim = $system_content . /build/bin/tmq_sim +$tsim_cfg = $system_content . /tsim/cfg + +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb0 -m1 $expectMsgCntFromStb1 -j 2 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg2" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb0 -m1 $expectMsgCntFromStb1 -j 2 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg1" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 3 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg1" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 3 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg1" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 3 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t1 "topic_stb_column, topic_stb_function" -k1 "group.id:tg1" -t "topic_stb_function, topic_stb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromStb -j 3 print cmd result----> $system_content if $system_content != success then return -1 @@ -211,29 +216,29 @@ endi #$expect_result = $expect_result . @, @ #$expect_result = $expect_result . 0} #print expect_result----> $expect_result -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 4 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 4 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 4 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -t "topic_ctb_column, topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 4 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function" -k "group.id:tg1" -t "topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 3 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function" -k "group.id:tg1" -t "topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 3 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function" -k "group.id:tg1" -t "topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 3 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ctb_column, topic_ctb_function" -k "group.id:tg1" -t "topic_ctb_function, topic_ctb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromCtb -j 3 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 4 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 4 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 4 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -t "topic_ntb_column, topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 4 print cmd result----> $system_content if $system_content != success then return -1 endi -print cmd===> system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function" -k "group.id:tg1" -t "topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 3 -system_content ../../debug/tests/test/c/tmq_sim -c ../../sim/tsim/cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function" -k "group.id:tg1" -t "topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 3 +print cmd===> system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function" -k "group.id:tg1" -t "topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 3 +system_content $tmq_sim -c $tsim_cfg -d $dbNamme -t "topic_ntb_column, topic_ntb_function" -k "group.id:tg1" -t "topic_ntb_function, topic_ntb_all" -k "group.id:tg2" -y $consumeDelay -m $expectMsgCntFromNtb -j 3 print cmd result----> $system_content if $system_content != success then return -1