@@ -319,23 +319,28 @@ func (f *rowFramerBase) Interval() (sql.WindowInterval, error) {
319319// frame: {0,3}, {1,3}, {2,3}, {3,5}, {3,5}, {4,5}
320320// rows: [0,1,2], [1,2], [2], [4,4,5], [4,4,5], [5]
321321type rangeFramerBase struct {
322- startNFollowing sql.Expression
323- endNFollowing sql.Expression
324- startNPreceding sql.Expression
325- endNPreceding sql.Expression
322+ startNFollowing sql.Expression // optional
323+ endNFollowing sql.Expression // optional
324+ startNPreceding sql.Expression // optional
325+ endNPreceding sql.Expression // optional
326+ // boundary arithmetic on [orderBy] for range start value
327+ // is set unless [unboundedPreceding] is true
326328 startInclusion sql.Expression
329+ // boundary arithmetic on [orderBy] for range end value
330+ // is set unless [unboundedFollowing] is true
327331 endInclusion sql.Expression
332+ // reference expression for boundary calculation
328333 orderBy sql.Expression
329334
330335 idx int
331- partitionEnd int
332- frameStart int
333- frameEnd int
334336 partitionStart int
335- startCurrentRow bool
336- endCurrentRow bool
337- unboundedFollowing bool
338- unboundedPreceding bool
337+ partitionEnd int
338+ frameStart int // optional
339+ frameEnd int // optional
340+ startCurrentRow bool // optional
341+ endCurrentRow bool // optional
342+ unboundedFollowing bool // optional
343+ unboundedPreceding bool // optional
339344 partitionSet bool
340345}
341346
0 commit comments