From 41c7b062bb43e38e5cb73caca154bc96f07de65d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 22 Jun 2021 08:29:58 +0800 Subject: [PATCH 1/4] [TD-4098] refactor IN filter --- src/client/src/tscSQLParser.c | 101 ++++++++++++---------------------- src/tsdb/src/tsdbRead.c | 2 +- 2 files changed, 36 insertions(+), 67 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index d78eb65f2e..4d189d0245 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -65,7 +65,6 @@ static char* getAccountId(SSqlObj* pSql); static int convertTimestampStrToInt64(tVariant *pVar, int32_t precision); static bool serializeExprListToVariant(SArray* pList, tVariant **dest, int16_t colType, uint8_t precision); -static int32_t validateParamOfRelationIn(tVariant *pVar, int32_t colType); static bool has(SArray* pFieldList, int32_t startIdx, const char* name); static char* cloneCurrentDBName(SSqlObj* pSql); @@ -156,78 +155,60 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType, return ret; } - tSqlExprItem* item = (tSqlExprItem *)taosArrayGet(pList, 0); - int32_t firstTokenType = item->pNode->token.type; - int32_t type = firstTokenType; + tSqlExpr* item = ((tSqlExprItem*)(taosArrayGet(pList, 0)))->pNode; + int32_t firstVarType = item->value.nType; - //nchar to binary and other xxint to bigint - toTSDBType(type); - if (colType != TSDB_DATA_TYPE_TIMESTAMP && !IS_UNSIGNED_NUMERIC_TYPE(colType)) { - if (type != colType && (type != TSDB_DATA_TYPE_BINARY || colType != TSDB_DATA_TYPE_NCHAR)) { - return false; - } - } - type = colType; - SBufferWriter bw = tbufInitWriter( NULL, false); - tbufEnsureCapacity(&bw, 512); + if (colType == TSDB_DATA_TYPE_TIMESTAMP) { + tbufWriteUint32(&bw, TSDB_DATA_TYPE_BIGINT); + } else { + tbufWriteUint32(&bw, colType); + } + tbufWriteInt32(&bw, (int32_t)(pList->size)); - int32_t size = (int32_t)(pList->size); - tbufWriteUint32(&bw, type); - tbufWriteInt32(&bw, size); - - for (int32_t i = 0; i < size; i++) { + for (int32_t i = 0; i < (int32_t)pList->size; i++) { tSqlExpr* pSub = ((tSqlExprItem*)(taosArrayGet(pList, i)))->pNode; + tVariant* var = &pSub->value; // check all the token type in expr list same or not - if (firstTokenType != pSub->token.type) { + if (firstVarType != var->nType) { break; } - toTSDBType(pSub->token.type); - - tVariant var; - tVariantCreate(&var, &pSub->token); - if (type == TSDB_DATA_TYPE_BOOL || IS_SIGNED_NUMERIC_TYPE(type)) { - tbufWriteInt64(&bw, var.i64); - } else if (IS_UNSIGNED_NUMERIC_TYPE(type)) { - // ugly code, refactor later - if (IS_UNSIGNED_NUMERIC_TYPE(pSub->token.type) || IS_SIGNED_NUMERIC_TYPE(pSub->token.type)) { - tbufWriteUint64(&bw, var.i64); + if ((colType == TSDB_DATA_TYPE_BOOL || IS_SIGNED_NUMERIC_TYPE(colType))) { + tbufWriteInt64(&bw, var->i64); + } else if (IS_UNSIGNED_NUMERIC_TYPE(colType)) { + tbufWriteUint64(&bw, var->u64); + } else if (colType == TSDB_DATA_TYPE_DOUBLE || colType == TSDB_DATA_TYPE_FLOAT) { + if (IS_SIGNED_NUMERIC_TYPE(var->nType) || IS_UNSIGNED_NUMERIC_TYPE(var->nType)) { + tbufWriteDouble(&bw, (double)(var->i64)); } else { - tVariantDestroy(&var); - break; + tbufWriteDouble(&bw, var->dKey); } - } - else if (type == TSDB_DATA_TYPE_DOUBLE || type == TSDB_DATA_TYPE_FLOAT) { - tbufWriteDouble(&bw, var.dKey); - } else if (type == TSDB_DATA_TYPE_BINARY){ - tbufWriteBinary(&bw, var.pz, var.nLen); - } else if (type == TSDB_DATA_TYPE_NCHAR) { - char *buf = (char *)calloc(1, (var.nLen + 1)*TSDB_NCHAR_SIZE); - if (tVariantDump(&var, buf, type, false) != TSDB_CODE_SUCCESS) { + } else if (colType == TSDB_DATA_TYPE_BINARY) { + tbufWriteBinary(&bw, var->pz, var->nLen); + } else if (colType == TSDB_DATA_TYPE_NCHAR) { + char *buf = (char *)calloc(1, (var->nLen + 1)*TSDB_NCHAR_SIZE); + if (tVariantDump(var, buf, colType, false) != TSDB_CODE_SUCCESS) { free(buf); - tVariantDestroy(&var); break; } tbufWriteBinary(&bw, buf, twcslen((wchar_t *)buf) * TSDB_NCHAR_SIZE); free(buf); - } else if (type == TSDB_DATA_TYPE_TIMESTAMP) { - if (var.nType == TSDB_DATA_TYPE_BINARY) { - if (convertTimestampStrToInt64(&var, precision) < 0) { - tVariantDestroy(&var); + } else if (colType == TSDB_DATA_TYPE_TIMESTAMP) { + if (var->nType == TSDB_DATA_TYPE_BINARY) { + if (convertTimestampStrToInt64(var, precision) < 0) { break; } - tbufWriteInt64(&bw, var.i64); - } else if (var.nType == TSDB_DATA_TYPE_BIGINT) { - tbufWriteInt64(&bw, var.i64); + tbufWriteInt64(&bw, var->i64); + } else if (var->nType == TSDB_DATA_TYPE_BIGINT) { + tbufWriteInt64(&bw, var->i64); } + } else { + break; } - tVariantDestroy(&var); - - if (i == size - 1) { ret = true;} - } - + if (i == (int32_t)(pList->size - 1)) { ret = true;} + } if (ret == true) { if ((*dst = calloc(1, sizeof(tVariant))) != NULL) { tVariantCreateFromBinary(*dst, tbufGetData(&bw, false), tbufTell(&bw), TSDB_DATA_TYPE_BINARY); @@ -239,13 +220,6 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType, return ret; } -static int32_t validateParamOfRelationIn(tVariant *pVar, int32_t colType) { - if (pVar->nType != TSDB_DATA_TYPE_BINARY) { - return -1; - } - SBufferReader br = tbufInitReader(pVar->pz, pVar->nLen, false); - return colType == TSDB_DATA_TYPE_NCHAR ? 0 : (tbufReadUint32(&br) == colType ? 0: -1); -} static uint8_t convertOptr(SStrToken *pToken) { switch (pToken->type) { @@ -3366,11 +3340,6 @@ static int32_t doExtractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, if (pRight->tokenId != TK_SET || !serializeExprListToVariant(pRight->pParam, &pVal, colType, timePrecision)) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg); } - if (validateParamOfRelationIn(pVal, colType) != TSDB_CODE_SUCCESS) { - tVariantDestroy(pVal); - free(pVal); - return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg); - } pColumnFilter->pz = (int64_t)calloc(1, pVal->nLen + 1); pColumnFilter->len = pVal->nLen; pColumnFilter->filterstr = 1; @@ -8151,7 +8120,7 @@ int32_t exprTreeFromSqlExpr(SSqlCmd* pCmd, tExprNode **pExpr, const tSqlExpr* pS int32_t colType = -1; STableMeta* pTableMeta = tscGetMetaInfo(pQueryInfo, 0)->pTableMeta; if (pCols != NULL && taosArrayGetSize(pCols) > 0) { - SColIndex* idx = taosArrayGet(pCols, 0); + SColIndex* idx = taosArrayGet(pCols, taosArrayGetSize(pCols) - 1); SSchema* pSchema = tscGetTableColumnSchema(pTableMeta, idx->colIndex); if (pSchema != NULL) { colType = pSchema->type; diff --git a/src/tsdb/src/tsdbRead.c b/src/tsdb/src/tsdbRead.c index 92edd4d160..92a0d489b3 100644 --- a/src/tsdb/src/tsdbRead.c +++ b/src/tsdb/src/tsdbRead.c @@ -3364,7 +3364,7 @@ static bool tableFilterFp(const void* pNode, void* param) { GET_TYPED_DATA(v, uint64_t, pInfo->sch.type, val); return NULL != taosHashGet((SHashObj *)pInfo->q, (char *)&v, sizeof(v)); } - else if (type == TSDB_DATA_TYPE_DOUBLE || type == TSDB_DATA_TYPE_DOUBLE) { + else if (type == TSDB_DATA_TYPE_DOUBLE || type == TSDB_DATA_TYPE_FLOAT) { double v; GET_TYPED_DATA(v, double, pInfo->sch.type, val); return NULL != taosHashGet((SHashObj *)pInfo->q, (char *)&v, sizeof(v)); From b533fb04d6ef8fcc2c7e3cef2b6bc590a86be838 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 22 Jun 2021 08:48:44 +0800 Subject: [PATCH 2/4] [TD-4098] refactor IN filter --- tests/pytest/insert/in_function.py | 146 ++++++++++++++--------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/tests/pytest/insert/in_function.py b/tests/pytest/insert/in_function.py index d1fbfd702a..79599de7a7 100644 --- a/tests/pytest/insert/in_function.py +++ b/tests/pytest/insert/in_function.py @@ -621,65 +621,65 @@ class TDTestCase: tdLog.info(cmd1) tdSql.execute(cmd1) - cmd2 = 'select * from in_stable_4 where in_float in (\'888\');' - tdLog.info(cmd2) - tdSql.error(cmd2) - try: - tdSql.execute(cmd2) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") + #cmd2 = 'select * from in_stable_4 where in_float in (\'888\');' + #tdLog.info(cmd2) + #tdSql.error(cmd2) + #try: + # tdSql.execute(cmd2) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") - cmd3 = 'select * from in_stable_4 where in_double in (\'66666\');' - tdLog.info(cmd3) - tdSql.error(cmd3) - try: - tdSql.execute(cmd3) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") + #cmd3 = 'select * from in_stable_4 where in_double in (\'66666\');' + #tdLog.info(cmd3) + #tdSql.error(cmd3) + #try: + # tdSql.execute(cmd3) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") - cmd4 = 'select * from in_stable_4 where tin_float in (\'666\');' - tdLog.info(cmd4) - tdSql.error(cmd4) - try: - tdSql.execute(cmd4) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") + #cmd4 = 'select * from in_stable_4 where tin_float in (\'666\');' + #tdLog.info(cmd4) + #tdSql.error(cmd4) + #try: + # tdSql.execute(cmd4) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") - cmd5 = 'select * from in_stable_4 where tin_double in (\'88888\');' - tdLog.info(cmd5) - tdSql.error(cmd5) - try: - tdSql.execute(cmd5) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") + #cmd5 = 'select * from in_stable_4 where tin_double in (\'88888\');' + #tdLog.info(cmd5) + #tdSql.error(cmd5) + #try: + # tdSql.execute(cmd5) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") - cmd6 = 'select * from in_float_double_1 where in_float in (\'888\');' - tdLog.info(cmd6) - tdSql.error(cmd6) - try: - tdSql.execute(cmd6) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") - - cmd7 = 'select * from in_float_double_1 where in_double in (\'66666\');' - tdLog.info(cmd7) - tdSql.error(cmd7) - try: - tdSql.execute(cmd7) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") + #cmd6 = 'select * from in_float_double_1 where in_float in (\'888\');' + #tdLog.info(cmd6) + #tdSql.error(cmd6) + #try: + # tdSql.execute(cmd6) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") + # + #cmd7 = 'select * from in_float_double_1 where in_double in (\'66666\');' + #tdLog.info(cmd7) + #tdSql.error(cmd7) + #try: + # tdSql.execute(cmd7) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") @@ -698,24 +698,24 @@ class TDTestCase: tdSql.execute(cmd1) cmd2 = 'select * from normal_in_float_double_1 where in_float in (\'888\');' - tdLog.info(cmd2) - tdSql.error(cmd2) - try: - tdSql.execute(cmd2) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") - - cmd3 = 'select * from normal_in_float_double_1 where in_double in (\'66666\');' - tdLog.info(cmd3) - tdSql.error(cmd3) - try: - tdSql.execute(cmd3) - tdLog.exit("invalid operation: not supported filter condition") - except Exception as e: - tdLog.info(repr(e)) - tdLog.info("invalid operation: not supported filter condition") + #tdLog.info(cmd2) + #tdSql.error(cmd2) + #try: + # tdSql.execute(cmd2) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") + # + #cmd3 = 'select * from normal_in_float_double_1 where in_double in (\'66666\');' + #tdLog.info(cmd3) + #tdSql.error(cmd3) + #try: + # tdSql.execute(cmd3) + # tdLog.exit("invalid operation: not supported filter condition") + #except Exception as e: + # tdLog.info(repr(e)) + # tdLog.info("invalid operation: not supported filter condition") def stop(self): tdSql.close() From ad651eff54a4d06ef6d3741e45240c8e7c03438a Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 22 Jun 2021 09:29:03 +0800 Subject: [PATCH 3/4] [TD-4098] refactor IN filter --- tests/script/general/parser/where.sim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/script/general/parser/where.sim b/tests/script/general/parser/where.sim index 00a22eede6..2fe63b9892 100644 --- a/tests/script/general/parser/where.sim +++ b/tests/script/general/parser/where.sim @@ -139,18 +139,18 @@ sql_error select * from $mt where c1 like 1 sql create table wh_mt1 (ts timestamp, c1 smallint, c2 int, c3 bigint, c4 float, c5 double, c6 tinyint, c7 binary(10), c8 nchar(10), c9 bool, c10 timestamp) tags (t1 binary(10), t2 smallint, t3 int, t4 bigint, t5 float, t6 double) sql create table wh_mt1_tb1 using wh_mt1 tags ('tb11', 1, 1, 1, 1, 1) sql insert into wh_mt1_tb1 values (now, 1, 1, 1, 1, 1, 1, 'binary', 'nchar', true, '2019-01-01 00:00:00.000') -sql_error select last(*) from wh_mt1 where c1 in ('1') -sql_error select last(*) from wh_mt1_tb1 where c1 in ('1') -sql_error select last(*) from wh_mt1 where c2 in ('1') -sql_error select last(*) from wh_mt1_tb1 where c2 in ('1') -sql_error select last(*) from wh_mt1 where c3 in ('1') -sql_error select last(*) from wh_mt1_tb1 where c3 in ('1') -sql_error select last(*) from wh_mt1 where c4 in ('1') -sql_error select last(*) from wh_mt1_tb1 where c4 in ('1') -sql_error select last(*) from wh_mt1 where c5 in ('1') -sql_error select last(*) from wh_mt1_tb1 where c5 in ('1') -sql_error select last(*) from wh_mt1 where c6 in ('1') -sql_error select last(*) from wh_mt1_tb1 where c6 in ('1') +#sql_error select last(*) from wh_mt1 where c1 in ('1') +#sql_error select last(*) from wh_mt1_tb1 where c1 in ('1') +#sql_error select last(*) from wh_mt1 where c2 in ('1') +#sql_error select last(*) from wh_mt1_tb1 where c2 in ('1') +#sql_error select last(*) from wh_mt1 where c3 in ('1') +#sql_error select last(*) from wh_mt1_tb1 where c3 in ('1') +#sql_error select last(*) from wh_mt1 where c4 in ('1') +#sql_error select last(*) from wh_mt1_tb1 where c4 in ('1') +#sql_error select last(*) from wh_mt1 where c5 in ('1') +#sql_error select last(*) from wh_mt1_tb1 where c5 in ('1') +#sql_error select last(*) from wh_mt1 where c6 in ('1') +#sql_error select last(*) from wh_mt1_tb1 where c6 in ('1') #sql_error select last(*) from wh_mt1 where c7 in ('binary') #sql_error select last(*) from wh_mt1_tb1 where c7 in ('binary') #sql_error select last(*) from wh_mt1 where c8 in ('nchar') From 6bc71839b14e1d8abeb9f3606a7dcc404a916d58 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 23 Jun 2021 11:17:16 +0800 Subject: [PATCH 4/4] [TD-4098] refactor IN filter --- src/client/src/tscSQLParser.c | 18 ++++- tests/pytest/insert/in_function.py | 110 ++++++++++++++--------------- 2 files changed, 72 insertions(+), 56 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 4d189d0245..4ce2356f8b 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -176,18 +176,32 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType, break; } if ((colType == TSDB_DATA_TYPE_BOOL || IS_SIGNED_NUMERIC_TYPE(colType))) { + if (var->nType != TSDB_DATA_TYPE_BOOL && !IS_SIGNED_NUMERIC_TYPE(var->nType)) { + break; + } tbufWriteInt64(&bw, var->i64); } else if (IS_UNSIGNED_NUMERIC_TYPE(colType)) { + if (IS_SIGNED_NUMERIC_TYPE(var->nType) && IS_UNSIGNED_NUMERIC_TYPE(var->nType)) { + break; + } tbufWriteUint64(&bw, var->u64); } else if (colType == TSDB_DATA_TYPE_DOUBLE || colType == TSDB_DATA_TYPE_FLOAT) { if (IS_SIGNED_NUMERIC_TYPE(var->nType) || IS_UNSIGNED_NUMERIC_TYPE(var->nType)) { tbufWriteDouble(&bw, (double)(var->i64)); - } else { + } else if (var->nType == TSDB_DATA_TYPE_DOUBLE || var->nType == TSDB_DATA_TYPE_FLOAT){ tbufWriteDouble(&bw, var->dKey); + } else { + break; } } else if (colType == TSDB_DATA_TYPE_BINARY) { + if (var->nType != TSDB_DATA_TYPE_BINARY) { + break; + } tbufWriteBinary(&bw, var->pz, var->nLen); } else if (colType == TSDB_DATA_TYPE_NCHAR) { + if (var->nType != TSDB_DATA_TYPE_BINARY) { + break; + } char *buf = (char *)calloc(1, (var->nLen + 1)*TSDB_NCHAR_SIZE); if (tVariantDump(var, buf, colType, false) != TSDB_CODE_SUCCESS) { free(buf); @@ -203,6 +217,8 @@ bool serializeExprListToVariant(SArray* pList, tVariant **dst, int16_t colType, tbufWriteInt64(&bw, var->i64); } else if (var->nType == TSDB_DATA_TYPE_BIGINT) { tbufWriteInt64(&bw, var->i64); + } else { + break; } } else { break; diff --git a/tests/pytest/insert/in_function.py b/tests/pytest/insert/in_function.py index 79599de7a7..263c8a78aa 100644 --- a/tests/pytest/insert/in_function.py +++ b/tests/pytest/insert/in_function.py @@ -621,65 +621,65 @@ class TDTestCase: tdLog.info(cmd1) tdSql.execute(cmd1) - #cmd2 = 'select * from in_stable_4 where in_float in (\'888\');' - #tdLog.info(cmd2) - #tdSql.error(cmd2) - #try: - # tdSql.execute(cmd2) - # tdLog.exit("invalid operation: not supported filter condition") - #except Exception as e: - # tdLog.info(repr(e)) - # tdLog.info("invalid operation: not supported filter condition") + cmd2 = 'select * from in_stable_4 where in_float in (\'888\');' + tdLog.info(cmd2) + tdSql.error(cmd2) + try: + tdSql.execute(cmd2) + tdLog.exit("invalid operation: not supported filter condition") + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("invalid operation: not supported filter condition") - #cmd3 = 'select * from in_stable_4 where in_double in (\'66666\');' - #tdLog.info(cmd3) - #tdSql.error(cmd3) - #try: - # tdSql.execute(cmd3) - # tdLog.exit("invalid operation: not supported filter condition") - #except Exception as e: - # tdLog.info(repr(e)) - # tdLog.info("invalid operation: not supported filter condition") + cmd3 = 'select * from in_stable_4 where in_double in (\'66666\');' + tdLog.info(cmd3) + tdSql.error(cmd3) + try: + tdSql.execute(cmd3) + tdLog.exit("invalid operation: not supported filter condition") + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("invalid operation: not supported filter condition") - #cmd4 = 'select * from in_stable_4 where tin_float in (\'666\');' - #tdLog.info(cmd4) - #tdSql.error(cmd4) - #try: - # tdSql.execute(cmd4) - # tdLog.exit("invalid operation: not supported filter condition") - #except Exception as e: - # tdLog.info(repr(e)) - # tdLog.info("invalid operation: not supported filter condition") + cmd4 = 'select * from in_stable_4 where tin_float in (\'666\');' + tdLog.info(cmd4) + tdSql.error(cmd4) + try: + tdSql.execute(cmd4) + tdLog.exit("invalid operation: not supported filter condition") + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("invalid operation: not supported filter condition") - #cmd5 = 'select * from in_stable_4 where tin_double in (\'88888\');' - #tdLog.info(cmd5) - #tdSql.error(cmd5) - #try: - # tdSql.execute(cmd5) - # tdLog.exit("invalid operation: not supported filter condition") - #except Exception as e: - # tdLog.info(repr(e)) - # tdLog.info("invalid operation: not supported filter condition") + cmd5 = 'select * from in_stable_4 where tin_double in (\'88888\');' + tdLog.info(cmd5) + tdSql.error(cmd5) + try: + tdSql.execute(cmd5) + tdLog.exit("invalid operation: not supported filter condition") + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("invalid operation: not supported filter condition") - #cmd6 = 'select * from in_float_double_1 where in_float in (\'888\');' - #tdLog.info(cmd6) - #tdSql.error(cmd6) - #try: - # tdSql.execute(cmd6) - # tdLog.exit("invalid operation: not supported filter condition") - #except Exception as e: - # tdLog.info(repr(e)) - # tdLog.info("invalid operation: not supported filter condition") - # - #cmd7 = 'select * from in_float_double_1 where in_double in (\'66666\');' - #tdLog.info(cmd7) - #tdSql.error(cmd7) - #try: - # tdSql.execute(cmd7) - # tdLog.exit("invalid operation: not supported filter condition") - #except Exception as e: - # tdLog.info(repr(e)) - # tdLog.info("invalid operation: not supported filter condition") + cmd6 = 'select * from in_float_double_1 where in_float in (\'888\');' + tdLog.info(cmd6) + tdSql.error(cmd6) + try: + tdSql.execute(cmd6) + tdLog.exit("invalid operation: not supported filter condition") + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("invalid operation: not supported filter condition") + + cmd7 = 'select * from in_float_double_1 where in_double in (\'66666\');' + tdLog.info(cmd7) + tdSql.error(cmd7) + try: + tdSql.execute(cmd7) + tdLog.exit("invalid operation: not supported filter condition") + except Exception as e: + tdLog.info(repr(e)) + tdLog.info("invalid operation: not supported filter condition")