Skip to content

Fix for exponential time decaying window functions#36944

Merged
novikd merged 5 commits intoClickHouse:masterfrom
excitoon-favorites:better_exp_smooth
Jun 7, 2022
Merged

Fix for exponential time decaying window functions#36944
novikd merged 5 commits intoClickHouse:masterfrom
excitoon-favorites:better_exp_smooth

Conversation

@excitoon
Copy link
Copy Markdown
Contributor

@excitoon excitoon commented May 5, 2022

Changelog category (leave one):

  • Bug Fix (user-visible misbehaviour in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fix for exponential time decaying window functions. Now respecting boundaries of the window.

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-bugfix Pull request with bugfix, not backported by default label May 5, 2022
@excitoon excitoon marked this pull request as ready for review May 5, 2022 15:58
@novikd novikd self-assigned this May 5, 2022
Comment on lines 1597 to 1598
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.

Suggested change
auto * const state = static_cast<State *>(static_cast<void *>(place));
*state = State();
new (place) State();

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.

Cool!

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.

Why do you inherit WindowFunctionHelpers?

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.

Yes, it's not needed.

@excitoon excitoon force-pushed the better_exp_smooth branch from edf7c68 to c8cae1d Compare June 3, 2022 17:59
{
Float64 last_max = getLastValueFromState<Float64>(transform, function_index, STATE_MAX);
Float64 last_t = getLastValueFromInputColumn<Float64>(transform, function_index, ARGUMENT_TIME);
Float64 result = -std::numeric_limits<Float64>::infinity();
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.

Suggested change
Float64 result = -std::numeric_limits<Float64>::infinity();
Float64 result = std::numeric_limits<Float64>::lowest();

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.

Why is it better?

@novikd
Copy link
Copy Markdown
Member

novikd commented Jun 7, 2022

Failures are unrelated.

@novikd novikd merged commit a3d70f2 into ClickHouse:master Jun 7, 2022
excitoon pushed a commit to excitoon-favorites/ClickHouse that referenced this pull request Jun 24, 2022
…p_smooth

Fix for exponential time decaying window functions
excitoon pushed a commit to Altinity/ClickHouse that referenced this pull request Jun 24, 2022
excitoon pushed a commit to Altinity/ClickHouse that referenced this pull request Jun 27, 2022
excitoon pushed a commit to Altinity/ClickHouse that referenced this pull request Jul 14, 2022
arthurpassos added a commit to Altinity/ClickHouse that referenced this pull request Jul 15, 2022
Enmk pushed a commit to Altinity/ClickHouse that referenced this pull request Jul 28, 2022
Enmk pushed a commit to Altinity/ClickHouse that referenced this pull request Jul 28, 2022
Enmk pushed a commit to Altinity/ClickHouse that referenced this pull request Aug 4, 2022
Enmk pushed a commit to Altinity/ClickHouse that referenced this pull request Aug 4, 2022
@Enmk Enmk mentioned this pull request Sep 12, 2022
4 tasks
Enmk pushed a commit to Altinity/ClickHouse that referenced this pull request Sep 13, 2022
Enmk pushed a commit to Altinity/ClickHouse that referenced this pull request Sep 17, 2022
…4632, ClickHouse#37659 and ClickHouse#37882

Merge pull request ClickHouse#36944 from excitoon-favorites/better_exp_smooth
Merge pull request ClickHouse#34632 from excitoon-favorites/optimizedprocessing
Merge pull request ClickHouse#37659 from frew/master
Support `batch_delete` capability for GCS
Merge pull request ClickHouse#37882 from excitoon-favorites/nodeleteobjects
Fixes for objects removal in `S3ObjectStorage`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants