fix:[TS-5761] error for in operator
This commit is contained in:
parent
a1d196688e
commit
1db40d873c
|
@ -1718,6 +1718,9 @@ static int32_t sclGetCompOperatorResType(SOperatorNode *pOp) {
|
||||||
return TSDB_CODE_TSC_INVALID_OPERATION;
|
return TSDB_CODE_TSC_INVALID_OPERATION;
|
||||||
}
|
}
|
||||||
((SExprNode *)(pOp->pRight))->resType = ldt;
|
((SExprNode *)(pOp->pRight))->resType = ldt;
|
||||||
|
if (IS_NUMERIC_TYPE(ldt.type)){
|
||||||
|
((SExprNode *)(pOp->pRight))->resType.type = TSDB_DATA_TYPE_DOUBLE;
|
||||||
|
}
|
||||||
} else if (nodesIsRegularOp(pOp)) {
|
} else if (nodesIsRegularOp(pOp)) {
|
||||||
if (pOp->pRight == NULL) {
|
if (pOp->pRight == NULL) {
|
||||||
return TSDB_CODE_TSC_INVALID_OPERATION;
|
return TSDB_CODE_TSC_INVALID_OPERATION;
|
||||||
|
|
|
@ -209,6 +209,8 @@
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 2
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/slimit.py -Q 4
|
||||||
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-5761.py
|
||||||
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-5761-scalemode.py
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-5712.py
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-5712.py
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/ts-4233.py -Q 2
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
|
||||||
|
import taos
|
||||||
|
|
||||||
|
from util.log import *
|
||||||
|
from util.sql import *
|
||||||
|
from util.cases import *
|
||||||
|
from util.dnodes import *
|
||||||
|
from util.common import *
|
||||||
|
|
||||||
|
class TDTestCase:
|
||||||
|
updatecfgDict = {'filterScalarMode':1}
|
||||||
|
def init(self, conn, logSql, replicaVar=1):
|
||||||
|
self.replicaVar = int(replicaVar)
|
||||||
|
tdLog.debug(f"start to excute {__file__}")
|
||||||
|
tdSql.init(conn.cursor(), True)
|
||||||
|
self.dbname = 'db'
|
||||||
|
self.stbname = 'st'
|
||||||
|
|
||||||
|
def prepareData(self):
|
||||||
|
# db
|
||||||
|
tdSql.execute(f"create database db;")
|
||||||
|
tdSql.execute(f"use db")
|
||||||
|
|
||||||
|
# super tableUNSIGNED
|
||||||
|
tdSql.execute("CREATE TABLE t1( time TIMESTAMP, c1 BIGINT, c2 smallint, c3 double, c4 int UNSIGNED, c5 bool);")
|
||||||
|
|
||||||
|
# create index for all tags
|
||||||
|
tdSql.execute("INSERT INTO t1 VALUES (1641024000000, 1, 1, 1, 1, 1)")
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c1 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c2 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c3 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c4 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c5 in (1.7)")
|
||||||
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self.prepareData()
|
||||||
|
self.check()
|
||||||
|
|
||||||
|
def stop(self):
|
||||||
|
tdSql.close()
|
||||||
|
tdLog.success(f"{__file__} successfully executed")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tdCases.addLinux(__file__, TDTestCase())
|
||||||
|
tdCases.addWindows(__file__, TDTestCase())
|
|
@ -0,0 +1,52 @@
|
||||||
|
|
||||||
|
import taos
|
||||||
|
|
||||||
|
from util.log import *
|
||||||
|
from util.sql import *
|
||||||
|
from util.cases import *
|
||||||
|
from util.dnodes import *
|
||||||
|
from util.common import *
|
||||||
|
|
||||||
|
class TDTestCase:
|
||||||
|
def init(self, conn, logSql, replicaVar=1):
|
||||||
|
self.replicaVar = int(replicaVar)
|
||||||
|
tdLog.debug(f"start to excute {__file__}")
|
||||||
|
tdSql.init(conn.cursor(), True)
|
||||||
|
self.dbname = 'db'
|
||||||
|
self.stbname = 'st'
|
||||||
|
|
||||||
|
def prepareData(self):
|
||||||
|
# db
|
||||||
|
tdSql.execute(f"create database db;")
|
||||||
|
tdSql.execute(f"use db")
|
||||||
|
|
||||||
|
# super tableUNSIGNED
|
||||||
|
tdSql.execute("CREATE TABLE t1( time TIMESTAMP, c1 BIGINT, c2 smallint, c3 double, c4 int UNSIGNED, c5 bool);")
|
||||||
|
|
||||||
|
# create index for all tags
|
||||||
|
tdSql.execute("INSERT INTO t1 VALUES (1641024000000, 1, 1, 1, 1, 1)")
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c1 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c2 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c3 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c4 in (1.7)")
|
||||||
|
tdSql.checkRows(0)
|
||||||
|
tdSql.query(f"SELECT * FROM t1 WHERE c5 in (1.7)")
|
||||||
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self.prepareData()
|
||||||
|
self.check()
|
||||||
|
|
||||||
|
def stop(self):
|
||||||
|
tdSql.close()
|
||||||
|
tdLog.success(f"{__file__} successfully executed")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
tdCases.addLinux(__file__, TDTestCase())
|
||||||
|
tdCases.addWindows(__file__, TDTestCase())
|
Loading…
Reference in New Issue