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

wrong behaviour with comparing operators over arrays #2026

Closed
silviucpp opened this issue Mar 12, 2018 · 6 comments
Closed

wrong behaviour with comparing operators over arrays #2026

silviucpp opened this issue Mar 12, 2018 · 6 comments
Assignees

Comments

@silviucpp
Copy link
Contributor

CREATE TABLE test_array (arr Array(Nullable(Float64))) ENGINE = Memory;
INSERT INTO test_array(arr) values ([1,2]),([3,4]),([5,6]),([7,8]);
select * from test_array where arr > [12.2] ;

Code: 43, e.displayText() = DB::Exception: Illegal types of arguments (Array(Nullable(Float64)), Array(Float64)) of function greater, e.what() = DB::Exception

select * from test_array where arr > [null, 12.2] 

OK

select * from test_array where arr > [null, 12] 

Code: 43, e.displayText() = DB::Exception: Illegal types of arguments (Array(Nullable(Float64)), Array(Nullable(UInt8))) of function greater, e.what() = DB::Exception

As you can see all 3 ops should work

Silviu

@silviucpp
Copy link
Contributor Author

Of course using CAST will fix the problem but maybe clickhouse needs to be smart enough to allow this by default

@alexey-milovidov
Copy link
Member

Yes, these operations should be supported.

alexey-milovidov added a commit that referenced this issue Mar 17, 2018
alexey-milovidov added a commit that referenced this issue Mar 17, 2018
This reverts commit 60ecc03.
@silviucpp
Copy link
Contributor Author

@alexey-milovidov I see you worked on this .. is this bug a priority ?

@alexey-milovidov
Copy link
Member

It's unfinished. This feature has low/medium priority.

@silviucpp
Copy link
Contributor Author

Hello @alexey-milovidov also this one was partially fixed.

@silviucpp
Copy link
Contributor Author

@alexey-milovidov I tested this on master and it's fine. You can close it !

Thanks,
Silviu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants