taosdata / taosdata/TDengine

An exception is triggered when the NOT operator is used in combination with the equality comparison operator.

Open
#28,342 1 comment 0 reactions 1 assignee View on GitHub

@yu285 is already working on this.

Since Nov 6, 2024.

bug
Dominant language
C
Stars
25.1k
Forks
5k
Avg merge
4d 59m
Merged PRs (30d)
7

Description

Bug Description

The combination of the NOT operator and binary comparison operators triggers an "Unexpected generic error".

To Reproduce

Assume that we execute the following statement under a database named testdb.

DROP TABLE IF EXISTS t1;

CREATE TABLE IF NOT EXISTS t1( time TIMESTAMP, c0 VARCHAR(100) );
INSERT INTO t1(time, c0) VALUES (1641024000000, "1");
INSERT INTO t1(time, c0) VALUES (1641024000001, "2");

# query success
SELECT time, c0 FROM t1 WHERE NOT (("1") <> (c0));

# query error
SELECT time, c0 FROM t1 WHERE NOT (("1") = (c0));
Expected Behavior

Both Query 1 and Query 2 are executed successfully, and both return one row of data.

Actual behaviour

Query 1 returns the expected result, while Query 2 fails to execute, returning the error: "Unexpected generic error".

Environment
  • OS:Ubuntu Server 22.04 LTS 64bit
  • TDengine Version:3.3.3.0
Additional Context

Hello, TDengine team. I'd like to confirm with you whether this is a bug?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.