We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 974e65d commit 42ededfCopy full SHA for 42ededf
sql/sql_window.cc
@@ -752,6 +752,18 @@ class Frame_current_row : public Frame_n_rows
752
753
Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
754
{
755
+ // TODO-cvicentiu When a frame is not specified, which is the frame type
756
+ // that we will use?
757
+ // Postgres uses RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW.
758
+ // For now we use UNBOUNDED FOLLOWING and UNBOUNDED PRECEDING.
759
+ if (!frame)
760
+ {
761
+ if (is_top_bound)
762
+ return new Frame_unbounded_preceding;
763
+ else
764
+ return new Frame_unbounded_following;
765
+ }
766
+
767
Window_frame_bound *bound= is_top_bound? frame->top_bound :
768
frame->bottom_bound;
769
0 commit comments