diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index 050f1fd060e5ef455881769f39a60e6f59169a53..10802b33b45e360c6c2ee7286d179e3d5c2e042c 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -273,6 +273,7 @@ python3 ./test.py -f query/queryCnameDisplay.py # python3 ./test.py -f query/operator_cost.py # python3 ./test.py -f query/long_where_query.py python3 test.py -f query/nestedQuery/queryWithSpread.py +python3 ./test.py -f query/bug6586.py #stream python3 ./test.py -f stream/metric_1.py diff --git a/tests/pytest/query/bug6586.py b/tests/pytest/query/bug6586.py new file mode 100644 index 0000000000000000000000000000000000000000..87d7199dd06a42eed1345311bdfb833ba4cfe93a --- /dev/null +++ b/tests/pytest/query/bug6586.py @@ -0,0 +1,42 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +from util.log import * +from util.cases import * +from util.sql import * + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + def run(self): + # TD-6586 Binary type value return None with python connector + # PR: https://github.com/taosdata/TDengine/pull/7913/files + + tdSql.execute("create database if not exists binary_convertion") + tdSql.execute("use binary_convertion") + tdSql.execute("create stable stb (ts timestamp,value binary(3)) tags (t0 bool,t1 tinyint,t2 smallint,t3 int,t4 bigint,t5 float,t6 double,t7 binary(3),t8 nchar(3))") + tdSql.execute("create table if not exists tb1 using stb(t0,t1,t2,t3,t4,t5,t6,t7,t8) tags (1,127,32767,2147483647,9223372036854775807,11.123450279,22.123456789,'aaa','aaa')") + tdSql.execute("insert into tb1 (ts,value) values (1600000000000, \"aaa\")") + res = tdSql.query('select * from stb', True) + expected_res = [(datetime.datetime(2020, 9, 13, 20, 26, 40), 'aaa', True, 127, 32767, 2147483647, 9223372036854775807, 11.12345027923584, 22.123456789, 'aaa', 'aaa')] + tdSql.checkEqual(res, expected_res) + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase())