Skip to content

Support toUInt8/toInt8 for if constant condition optimization.#31866

Merged
alexey-milovidov merged 2 commits intomasterfrom
fix-31687
Nov 30, 2021
Merged

Support toUInt8/toInt8 for if constant condition optimization.#31866
alexey-milovidov merged 2 commits intomasterfrom
fix-31687

Conversation

@KochetovNicolai
Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Fixes #31687

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 26, 2021
@KochetovNicolai KochetovNicolai added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Nov 26, 2021
}
}
}
else if (function->name == "toUInt8" || function->name == "toInt8")
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.

Do we still need OptimizeIfWithConstantCondition?
Also maybe make a setting to disable this optimization?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looks like we need it, there is no other way to skip unused columns

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.

Where exactly it is needed?

Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

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

The change looks ad-hoc.

@alexey-milovidov
Copy link
Copy Markdown
Member

What if any other function will be used?

@alexey-milovidov alexey-milovidov self-assigned this Nov 26, 2021
@alexey-milovidov alexey-milovidov merged commit bab8ea1 into master Nov 30, 2021
@alexey-milovidov alexey-milovidov deleted the fix-31687 branch November 30, 2021 02:54
robot-clickhouse pushed a commit that referenced this pull request Nov 30, 2021
robot-clickhouse pushed a commit that referenced this pull request Nov 30, 2021
robot-clickhouse pushed a commit that referenced this pull request Nov 30, 2021
robot-clickhouse pushed a commit that referenced this pull request Nov 30, 2021
robot-clickhouse pushed a commit that referenced this pull request Nov 30, 2021
KochetovNicolai added a commit that referenced this pull request Dec 2, 2021
Backport #31866 to 21.11: Support toUInt8/toInt8 for if constant condition optimization.
KochetovNicolai added a commit that referenced this pull request Dec 2, 2021
Backport #31866 to 21.3: Support toUInt8/toInt8 for if constant condition optimization.
KochetovNicolai added a commit that referenced this pull request Dec 2, 2021
Backport #31866 to 21.9: Support toUInt8/toInt8 for if constant condition optimization.
KochetovNicolai added a commit that referenced this pull request Dec 2, 2021
Backport #31866 to 21.10: Support toUInt8/toInt8 for if constant condition optimization.
KochetovNicolai added a commit that referenced this pull request Dec 2, 2021
Backport #31866 to 21.8: Support toUInt8/toInt8 for if constant condition optimization.
@Felixoid Felixoid added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing unused column in "if" expression when upgrading to 21.11.4.14

4 participants