mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Make Enum comparable again [#CLICKHOUSE-3560].
This commit is contained in:
parent
dc66a83902
commit
d1785d92a7
@ -32,6 +32,7 @@ public:
|
||||
bool isCategorial() const override { return true; }
|
||||
bool isEnum() const override { return true; }
|
||||
bool canBeInsideNullable() const override { return true; }
|
||||
bool isComparable() const override { return true; };
|
||||
};
|
||||
|
||||
|
||||
|
@ -273,7 +273,9 @@ public:
|
||||
*/
|
||||
virtual bool canBeUsedAsVersion() const { return false; };
|
||||
|
||||
/** Values of data type can be summed. Example: numbers, even nullable. Not Date/DateTime.
|
||||
/** Values of data type can be summed (possibly with overflow, within the same data type).
|
||||
* Example: numbers, even nullable. Not Date/DateTime. Not Enum.
|
||||
* Enums can be passed to aggregate function 'sum', but the result is Int64, not Enum, so they are not summable.
|
||||
*/
|
||||
virtual bool isSummable() const { return false; };
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
Hello World 3
|
1
dbms/tests/queries/0_stateless/00566_enum_min_max.sql
Normal file
1
dbms/tests/queries/0_stateless/00566_enum_min_max.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT min(x), max(x), sum(x) FROM (SELECT CAST(arrayJoin([1, 2]) AS Enum8('Hello' = 1, 'World' = 2)) AS x);
|
Loading…
Reference in New Issue
Block a user