matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Feature Request]: aggregate function with distinct

Open dengn opened this issue 3 years ago • 1 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

MO needs to support aggregate function with distinct. For sum, avg, max, min, count, bit_xor, bit_and, bit_or, any_value. For 0.5, only count(distinct) is supported with a temporary solution.

Example: CREATE TABLE t1(a varchar(255), b INT, c INT UNSIGNED, d DECIMAL(12,2), e REAL); INSERT INTO t1 VALUES('iynfj', 1, 1, 1, 1); INSERT INTO t1 VALUES('innfj', 2, 2, 2, 2); SELECT SUM( DISTINCT b ) FROM t1 GROUP BY b;

Describe implementation you've considered

No response

Documentation, Adoption, Use Case, Migration Strategy

No response

Additional information

No response

dengn avatar Jul 01 '22 02:07 dengn

this is the approximate as #2323

domingozhang avatar Jul 18 '22 04:07 domingozhang