0

After created a super table with tag name same as table name but in upper case:


taos> select *,tbname from stb001;
       point_time        |       value_double        |           tab_column           |             tbname             |
========================================================================================================================
 2021-08-14 12:51:46.235 |            1000.000000000 | STB001_AI001                   | stb001_ai001                   |
 2021-08-14 12:51:54.398 |            1001.000000000 | STB001_AI001                   | stb001_ai001                   |
 2021-08-14 12:51:56.734 |            1002.000000000 | STB001_AI001                   | stb001_ai001                   |

When I tried to query the super table with tag filter in uppercase, the query result looks fine, but with "tbname in" syntax there's no query output. Is this a bug or does TDengine treat different query filter key words case sensitive?

taos> select * from stb001 where tab_column = "STB001_AI001";
       point_time        |       value_double        |           tab_column           |
=======================================================================================
 2021-08-14 12:51:46.235 |            1000.000000000 | STB001_AI001                   |
 2021-08-14 12:51:54.398 |            1001.000000000 | STB001_AI001                   |
 2021-08-14 12:51:56.734 |            1002.000000000 | STB001_AI001                   |
Query OK, 3 row(s) in set (0.003173s)


taos> select * from stb001 where tbname in ('STB001_AI001');
Query OK, 0 row(s) in set (0.001668s)
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
GeorgeWill93
  • 167
  • 5

2 Answers2

0

It turns out a bug in 2.2 version. Tried later 2.4 version the issue is getting fixed and tbname should be case insensitive.

GeorgeWill93
  • 167
  • 5
0

try latest version of TDengine database (2.4.0.20), it should be supported now

taos> create table `TB`(ts timestamp, c1 int);
Query OK, 0 of 0 row(s) in database (0.011564s)

taos> insert into `TB` values(now, 1);
Query OK, 1 of 1 row(s) in database (0.001930s)

taos> select * from `TB`;
           ts            |     c1      |
========================================
 2022-05-18 22:55:34.706 |           1 |
Query OK, 1 row(s) in set (0.001631s)

Xiao Ping
  • 326
  • 1
  • 7