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

return nan when quantileExact with empty float column #2855

Merged

Conversation

sundy-li
Copy link
Contributor

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

I think quantileExact function should return nan when quantileExact with empty float column like quantile function.

@sundy-li
Copy link
Contributor Author

sundy-li commented Aug 13, 2018

Such as

SELECT quantileExactIf(number, number > 100)
FROM numbers(90)

┌─quantileExactIf(number, greater(number, 100))─┐
│                                             0 │
└───────────────────────────────────────────────┘

SELECT quantileExactIf(toFloat64(number), number > 100)
FROM numbers(90)

┌─quantileExactIf(toFloat64(number), greater(number, 100))─┐
│                                                      nan │
└──────────────────────────────────────────────────────────┘

SELECT quantileIf(number, number > 100)
FROM numbers(90)

┌─quantileIf(number, greater(number, 100))─┐
│                                      nan │
└──────────────────────────────────────────┘

@alexey-milovidov
Copy link
Member

A test?

@alexey-milovidov alexey-milovidov merged commit b7e169c into ClickHouse:master Aug 13, 2018
@alexey-milovidov
Copy link
Member

Thank you!

@sundy-li sundy-li deleted the hotfix/quantile_return_nan branch August 13, 2018 09:55
@alesapin
Copy link
Member

alesapin commented Aug 13, 2018

It seems like this PR failed test 00606_quantiles_and_nans https://travis-ci.org/yandex/ClickHouse/jobs/415344194.

@sundy-li sundy-li restored the hotfix/quantile_return_nan branch August 13, 2018 14: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.

3 participants