Commit 42ededf4 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

Create a default frame bound when no frame is specified.

parent 974e65d3
......@@ -752,6 +752,18 @@ class Frame_current_row : public Frame_n_rows
Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
{
// TODO-cvicentiu When a frame is not specified, which is the frame type
// that we will use?
// Postgres uses RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.
// For now we use UNBOUNDED FOLLOWING and UNBOUNDED PRECEDING.
if (!frame)
{
if (is_top_bound)
return new Frame_unbounded_preceding;
else
return new Frame_unbounded_following;
}
Window_frame_bound *bound= is_top_bound? frame->top_bound :
frame->bottom_bound;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment