Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@4ertus2
Copy link
Contributor

@4ertus2 4ertus2 commented Jul 22, 2020

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

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix optimization optimize_move_functions_out_of_any=1 in case of any(func(<lambda>)).

Closes #12621

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Jul 22, 2020
@4ertus2
Copy link
Contributor Author

4ertus2 commented Jul 22, 2020

This query fails

WITH any(number * 1) AS x SELECT x FROM numbers(1);

@CurtizJ
Copy link
Member

CurtizJ commented Jul 22, 2020

Seems that clone of ast is still needed. Previously there was the same problem.
#11529 (comment)

@4ertus2
Copy link
Contributor Author

4ertus2 commented Jul 23, 2020

Seems that clone of ast is still needed.

I've made a solution without clone(). Clone after normalize() breaks indirect assumption that the aliases links to the same AST object. This assumtion should not be used later. But all our tests are for scenario where we do not break this assumption. So it's very easy to catch bugs here.

@CurtizJ CurtizJ self-requested a review July 23, 2020 14:54
@4ertus2 4ertus2 merged commit 2041d7d into ClickHouse:master Jul 23, 2020
robot-clickhouse pushed a commit that referenced this pull request Jul 28, 2020
robot-clickhouse pushed a commit that referenced this pull request Jul 28, 2020
robot-clickhouse pushed a commit that referenced this pull request Jul 28, 2020
robot-clickhouse pushed a commit that referenced this pull request Jul 28, 2020
4ertus2 pushed a commit that referenced this pull request Jul 31, 2020
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.

DB::Exception: lambda argument declarations must be identifiers.

3 participants