Do not optimize any(arrayJoin()) -> arrayJoin() under optimize_move_functions_out_of_any#13681
Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom Aug 14, 2020
Conversation
…unctions_out_of_any
Otherwise the following query will be optimized incorrectly:
SELECT
*,
any(arrayJoin([[], []]))
FROM numbers(1)
GROUP BY number
And the result will be:
┌─number─┬─arrayJoin(array(array(), array()))─┐
│ 0 │ [] │
│ 0 │ [] │
└────────┴────────────────────────────────────┘
While should be:
┌─number─┬─any(arrayJoin(array(array(), array())))─┐
│ 0 │ [] │
└────────┴─────────────────────────────────────────┘
Member
|
test_storage_rabbitmq - known bad test. |
alexey-milovidov
approved these changes
Aug 14, 2020
This was referenced Aug 14, 2020
robot-clickhouse
pushed a commit
that referenced
this pull request
Aug 14, 2020
…n() under optimize_move_functions_out_of_any
robot-clickhouse
pushed a commit
that referenced
this pull request
Aug 14, 2020
…n() under optimize_move_functions_out_of_any
robot-clickhouse
pushed a commit
that referenced
this pull request
Aug 14, 2020
…n() under optimize_move_functions_out_of_any
alexey-milovidov
added a commit
that referenced
this pull request
Aug 15, 2020
Backport #13681 to 20.5: Do not optimize any(arrayJoin()) -> arrayJoin() under optimize_move_functions_out_of_any
alexey-milovidov
added a commit
that referenced
this pull request
Aug 15, 2020
Backport #13681 to 20.7: Do not optimize any(arrayJoin()) -> arrayJoin() under optimize_move_functions_out_of_any
alexey-milovidov
added a commit
that referenced
this pull request
Aug 15, 2020
Backport #13681 to 20.6: Do not optimize any(arrayJoin()) -> arrayJoin() under optimize_move_functions_out_of_any
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Do not optimize any(arrayJoin()) -> arrayJoin() under optimize_move_functions_out_of_any
Detailed description / Documentation draft:
Otherwise the following query will be optimized incorrectly:
And the result will be:
While should be:
Refs: #11529
Refs: #12664
Cc: @4ertus2
Cc: @kamalov-ruslan