Skip to content

hotfix for NaN comparison [CLICKHOUSE-3760]#3024

Merged
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
4ertus2:nan
Sep 3, 2018
Merged

hotfix for NaN comparison [CLICKHOUSE-3760]#3024
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
4ertus2:nan

Conversation

@4ertus2
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread dbms/src/Core/AccurateComparison.h Outdated
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
Copy Markdown
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
@4ertus2 4ertus2 deleted the nan branch July 11, 2025 22:04
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