Use encoded type in QueryTreeHash#82617
Merged
KochetovNicolai merged 12 commits intomasterfrom Jul 5, 2025
Merged
Conversation
Contributor
Member
Author
novikd
reviewed
Jul 2, 2025
| } | ||
|
|
||
| WriteBufferFromOwnString buf; | ||
| encodeDataType(type, buf); |
Member
There was a problem hiding this comment.
Does it work for custom data types?
Member
Author
There was a problem hiding this comment.
Yes
| /// Subclass must convert its internal state and its children to AST | ||
| virtual ASTPtr toASTImpl(const ConvertToASTOptions & options) const = 0; | ||
|
|
||
| static void updateHashForType(HashState & hash_state, const DataTypePtr & type); |
| Prewhere filter | ||
| Prewhere filter column: greaterOrEquals(a, 0) | ||
| Filter column: and(less(multiply(2, b), 100), indexHint(less(i, 100))) (removed) | ||
| Filter column: and(indexHint(less(i, 100)), less(multiply(2, b), 100)) (removed) |
Member
Author
There was a problem hiding this comment.
I did not investigate, but probably in some places we traverse a hash table with a query tree.
For indexHint it's ok to be in any place.
In #82938 this is reverted back.
This was referenced Jul 5, 2025
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
Cherry pick #82617 to 25.3: Use encoded type in QueryTreeHash
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
This was referenced Jul 5, 2025
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
Cherry pick #82617 to 25.4: Use encoded type in QueryTreeHash
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
This was referenced Jul 5, 2025
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
Cherry pick #82617 to 25.5: Use encoded type in QueryTreeHash
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
This was referenced Jul 5, 2025
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
Cherry pick #82617 to 25.6: Use encoded type in QueryTreeHash
robot-clickhouse
added a commit
that referenced
this pull request
Jul 5, 2025
clickhouse-gh bot
added a commit
that referenced
this pull request
Jul 5, 2025
Backport #82617 to 25.6: Use encoded type in QueryTreeHash
KochetovNicolai
added a commit
that referenced
this pull request
Jul 6, 2025
Backport #82617 to 25.3: Use encoded type in QueryTreeHash
KochetovNicolai
added a commit
that referenced
this pull request
Jul 6, 2025
Backport #82617 to 25.4: Use encoded type in QueryTreeHash
KochetovNicolai
added a commit
that referenced
this pull request
Jul 6, 2025
Backport #82617 to 25.5: Use encoded type in QueryTreeHash
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):
Try to speedup QueryTreeHash a bit.
Documentation entry for user-facing changes