-
Notifications
You must be signed in to change notification settings - Fork 161
Parse and represent window fun 8000 ctions in the LQP #2574
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
Conversation
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.
Haven't looked at the tests yet.
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.
Remainder.
@@ -289,6 +292,27 @@ std::shared_ptr<TableStatistics> CardinalityEstimator::estimate_projection_node( | |||
return std::make_shared<TableStatistics>(std::move(column_statistics), input_table_statistics->row_count); | |||
} | |||
|
|||
std::shared_ptr<TableStatistics> CardinalityEstimator::estimate_window_node( | |||
const WindowNode& window_node, const std::shared_ptr<TableStatistics>& input_table_statistics) const { | |||
// For the result of the window function, dummy statistics are created for now. |
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.
Never said they are always going to be distinct. I thought about a fair assumption for cardinality estimations. In most cases, it will be distinct (I'd guess) and in other cases, we do at least not underestimate. But nevermind ... probably not relevant for now.
// NOLINTNEXTLINE - while this particular method could be made static, others cannot. | ||
std::shared_ptr<AbstractOperator> LQPTranslator::_translate_window_node( | ||
const std::shared_ptr<AbstractLQPNode>& node) const { | ||
FailInput("Hyrise does not yet support window functions."); |
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.
Nothing for this PR, yes. But I wanted to note it somewhere to discuss it after the vacations.
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.
Looks good to me.
Add the representation of SQL:2003 window functions in the LQP, including the translation in the SQLTranslator.
Add the representation of SQL:2003 window functions in the LQP, including the translation in the SQLTranslator.
@Bouncner you want it, you get it 🖤
This PR adds the representation of SQL:2003 window functions in the LQP. This includes the translation in the SQLTranslator.
Changes are:
sum
,min
,avg
, etc.), it is a regular aggregate expression.visualize
command.Note that this is branched off #2571, so this PR currently also includes its diff.