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

hotfix for NaN comparison [CLICKHOUSE-3760] #3024

Merged
merged 2 commits into from
Sep 3, 2018

Conversation

4ertus2
Copy link
Contributor

@4ertus2 4ertus2 commented Sep 3, 2018

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

@4ertus2
Copy link
Contributor Author

4ertus2 commented Sep 3, 2018

Broken test: 00693_max_block_size_system_tables_columns

SELECT avg(blockSize()) <= 10000 FROM system.columns LIMIT 10 SETTINGS max_block_size = 10;
0

SELECT avg(blockSize()) FROM system.columns LIMIT 10 SETTINGS max_block_size = 10;
nan

@@ -409,6 +417,12 @@ inline bool_if_safe_conversion<A, B> lessOrEqualsOp(A a, B b)
template <typename A, typename B>
inline bool_if_not_safe_conversion<A, B> greaterOrEqualsOp(A a, B b)
{
if constexpr (std::is_floating_point_v<A>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at NaNUtils.h

@alexey-milovidov alexey-milovidov merged commit 604c64f into ClickHouse:master Sep 3, 2018
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

Successfully merging this pull request may close these issues.

2 participants