-
Notifications
You must be signed in to change notification settings - Fork 606
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
Refactoring to make cardinality estimation provider-specific #3866
Conversation
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
@@ -28,6 +34,7 @@ struct TOptimizerStatistics { | |||
double Cost = 0; | |||
double Selectivity = 1.0; | |||
const TVector<TString>& KeyColumns; | |||
const IProviderStatistics* Specific = nullptr; |
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.
This will work okay only if you own all Specific objects outside the optimizer and release the memory outside.
But this means you can't use Specific for intermediate optimizer nodes, only for base relations
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
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.
We also need to fix our KqpProviderContext to subclass from TDummyProviderContext (renamed to something less insulting)
return true; | ||
} | ||
|
||
bool TDummyProviderContext::IsJoinApplicable(const std::shared_ptr<IBaseOptimizerNode>& left, |
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.
Lets rename TDummyProviderContext to something like TBaseProviderContext or TDefaultProviderContext.
Its not that dummy anymore if we're including the standard cardinality estimation in there
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.
Done.
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
⚪ |
|
Changelog entry
...
Changelog category
Additional information
...