matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Feature Request]: Comparison operators for TPCH

Open domingozhang opened this issue 3 years ago • 8 comments

Is there an existing issue for the same feature request?

  • [X] I have checked the existing issues.

Is your feature request related to a problem?

No response

Describe the feature you'd like

TPCH needs these comparison operators for queries. For different numeric types, they can be used to. Such as 1>0.999. Constant can be involved in their caculation such as "a between b+0.1 and b-0.1"

These should be used for all data types in https://github.com/matrixorigin/matrixone/issues/2369

">", Greater than operator ">=", Greater than or equal operator "<", Less than operator "<>", "!=", Not equal operator "<=", Less than or equal operator "= ", Equal operator "BETWEEN ... AND ...", Whether a value is within a range of values "IN()", Whether a value is within a set of values "INTERVAL()", Return the index of the argument that is less than the first argument "IS", Test a value against a boolean "IS NOT", Test a value against a boolean "IS NOT NULL", NOT NULL value test "IS NULL", NULL value test "LIKE", Simple pattern matching "NOT BETWEEN ... AND ...", Whether a value is not within a range of values "NOT IN()", Whether a value is not within a set of values "NOT LIKE", Negation of simple pattern matching

Describe implementation you've considered

No response

Documentation, Adoption, Use Case, Migration Strategy

No response

Additional information

No response

domingozhang avatar May 04 '22 10:05 domingozhang

Currently, the following operators are not supported.

"INTERVAL()", Return the index of the argument that is less than the first argument "IS", Test a value against a boolean "IS NOT", Test a value against a boolean "IS NOT NULL", NOT NULL value test "IS NULL", NULL value test

domingozhang avatar May 06 '22 06:05 domingozhang

#1880 is related to this issue.

JinHai-CN avatar Jun 06 '22 02:06 JinHai-CN

rewrite in/not in expr is done see #2814

ouyuanning avatar Jun 06 '22 10:06 ouyuanning

">", Greater than operator ">=", Greater than or equal operator "<", Less than operator "<>", "!=", Not equal operator "<=", Less than or equal operator "= ", Equal operator

are done by @jianwan0214

daviszhen avatar Jun 09 '22 11:06 daviszhen

"BETWEEN ... AND ...", Whether a value is within a range of values

is done by @ouyuanning

daviszhen avatar Jun 09 '22 11:06 daviszhen

"LIKE", Simple pattern matching "NOT LIKE", Negation of simple pattern matching

are done by @qingxinhome

daviszhen avatar Jun 09 '22 11:06 daviszhen

"INTERVAL()", Return the index of the argument that is less than the first argument

is replaced by date_add / date_sub. @bbbearxyz

daviszhen avatar Jun 09 '22 11:06 daviszhen

Missing :

"IS", Test a value against a boolean "IS NOT", Test a value against a boolean "IS NOT NULL", NOT NULL value test "IS NULL", NULL value test

they are in @broccoliSpicy 's plan

daviszhen avatar Jun 09 '22 11:06 daviszhen