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

Some fixes to quantile*() functions related to DateTime argument type #3580

Merged
merged 3 commits into from
Nov 19, 2018

Conversation

abyss7
Copy link
Contributor

@abyss7 abyss7 commented Nov 14, 2018

Fix regression mentioned in #3572
Fix return type for quantileTiming(level)(DateTime)

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

@abyss7 abyss7 requested a review from 4ertus2 November 14, 2018 15:08
{
private:
using ColVecType = std::conditional_t<IsDecimalNumber<Value>, ColumnDecimal<Value>, ColumnVector<Value>>;

static constexpr bool returns_float = !std::is_same_v<FloatReturnType, void>;
static constexpr bool returns_float = !(std::is_same_v<FloatReturnType, void>)&&(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't return float if FloatReturnType is unspecified.
Don't return float if Value is Date or DateTime.
Always return float if Data is QuantileTiming.

@abyss7
Copy link
Contributor Author

abyss7 commented Nov 19, 2018

The test 00411_long_accurate_number_comparison has failed. Looks like it's flaky.

@alexey-milovidov alexey-milovidov merged commit 6aa2313 into ClickHouse:master Nov 19, 2018
@abyss7 abyss7 deleted the fix-quantile-datetime branch December 5, 2018 10:40
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