Skip to content

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

Merged
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
abyss7:fix-quantile-datetime
Nov 19, 2018
Merged

Some fixes to quantile*() functions related to DateTime argument type#3580
alexey-milovidov merged 3 commits intoClickHouse:masterfrom
abyss7:fix-quantile-datetime

Conversation

@abyss7
Copy link
Copy Markdown
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
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
Copy Markdown
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.

Comment thread dbms/src/AggregateFunctions/AggregateFunctionQuantile.cpp Outdated
@abyss7
Copy link
Copy Markdown
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