New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reading from MergeTree with non-deterministic functions in filter #60586
Conversation
This is an automated comment for commit ecc3044 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
src/Storages/VirtualColumnUtils.cpp
Outdated
@@ -467,6 +467,23 @@ static bool canEvaluateSubtree(const ActionsDAG::Node * node, const Block & allo | |||
return true; | |||
} | |||
|
|||
static bool isDeterministicInScopeOfQuery(const ActionsDAG::Node * node) | |||
{ | |||
if (node->type != ActionsDAG::ActionType::FUNCTION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One possible node type is ALIAS, so let's maybe check all children first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but let's fix aliases for isDeterministicInScopeOfQuery
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix unexpected result during reading from tables with virtual columns when filter contains non-deterministic functions. Closes #61106.
Documentation entry for user-facing changes