Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NULL and 0 comparison in Map datatype #59492

Closed
alsugiliazova opened this issue Feb 1, 2024 · 1 comment · Fixed by #59498
Closed

NULL and 0 comparison in Map datatype #59492

alsugiliazova opened this issue Feb 1, 2024 · 1 comment · Fixed by #59498
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release v24.1-affected

Comments

@alsugiliazova
Copy link

Using 24.1 clickhouse version:

CREATE TABLE table_map (a Map(UInt8, Nullable(UInt8))) ENGINE=Memory;

INSERT INTO table_map VALUES ({0:0}), ({0:NULL});

select max(a) from table_map;

select max(a) from values ('a Nullable(UInt8)', (0), (NULL));

Output:

{0:NULL}
0
select min(a) from values ('a Nullable(UInt8)', (0), (NULL));
select min(a) from table_map;

Output:

{0:0}
0

Why in Map NULL > 0?

@alsugiliazova alsugiliazova added the question Question? label Feb 1, 2024
@Algunenano Algunenano self-assigned this Feb 1, 2024
@Algunenano Algunenano added bug Confirmed user-visible misbehaviour in official release v24.1-affected and removed question Question? labels Feb 1, 2024
@Algunenano
Copy link
Member

It's a bug. I didn't know nan_direction_hint also affected the order of NULLs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release v24.1-affected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants