Cnosdb 查询时返回错误结果

问题描述 投票:0回答:1

Cnosdb 在查询时出现panic。 我使用 union 来查询结果,并确保它至少返回一条记录,但事实是没有返回任何内容。

public ❯ CREATE TABLE m0(f0 DOUBLE , TAGS(t0, t1, t2));
Query took 0.009 seconds.
public ❯ INSERT m0(TIME, t0, f0) VALUES(CAST (2332186730629652317 AS TIMESTAMP), 'm>', -1321451580);
+------+
| rows |
+------+
| 1    |
+------+
Query took 0.042 seconds.
public ❯ SELECT *
FROM m0
WHERE NOT (NOT (m0.t1 NOT IN (NULL, '''!ୋx85dc4')))
UNION ALL
SELECT ALL *
FROM m0
WHERE NOT (NOT (NOT (m0.t1 NOT IN (NULL, '''!ୋx85dc4'))))
UNION ALL
SELECT *
FROM m0
WHERE (NOT (NOT (m0.t1 NOT IN (NULL, '''!ୋx85dc4')))) IS NULL;
Query took 0.044 seconds.
public ❯ SELECT *
FROM m0
WHERE m0.t1
IN (NULL, '''!ୋx85dc4');
Query took 0.018 seconds.
public ❯ SELECT *
FROM m0
WHERE m0.t1
IN (NULL);
Query took 0.018 seconds.
public ❯ SELECT *
FROM m0
WHERE m0.t1
IS NULL;
+-------------------------------+----+----+----+---------------+
| time                          | t0 | t1 | t2 | f0            |
+-------------------------------+----+----+----+---------------+
| 2043-11-26T21:38:50.629652317 | m> |    |    | -1321451580.0 |
+-------------------------------+----+----+----+---------------+
Query took 0.018 seconds.

正确的返回结果如下: 防止使用 null 下推二元运算符。

database time-series cnosdb
1个回答
0
投票

此问题已在最近的版本中得到相应解决。

© www.soinside.com 2019 - 2024. All rights reserved.