mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Merge pull request #25144 from vzakaznikov/testflows_windows_functions_add_lag_and_lead_in_frame_tests
Adding leadInFrame/lagInFrame window functions TestFlows tests
This commit is contained in:
commit
fea7917917
@ -60,6 +60,18 @@ xfails = {
|
||||
"tests/distributed/frame clause/range datetime/:":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/23902")],
|
||||
"tests/distributed/frame clause/range frame/between expr preceding and expr following with partition by same column twice":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/23902")],
|
||||
"tests/:/funcs/leadInFrame/explicit default value":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/25057")],
|
||||
"tests/:/funcs/leadInFrame/with nulls":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/25057")],
|
||||
"tests/:/funcs/leadInFrame/default offset":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/23902")],
|
||||
"tests/:/funcs/lagInFrame/explicit default value":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/25057")],
|
||||
"tests/:/funcs/lagInFrame/with nulls":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/25057")],
|
||||
"tests/:/funcs/lagInFrame/default offset":
|
||||
[(Fail, "https://github.com/ClickHouse/ClickHouse/issues/23902")]
|
||||
}
|
||||
|
||||
|
@ -25,135 +25,136 @@
|
||||
* 3.4.4 [RQ.SRS-019.ClickHouse.WindowFunctions.OrderClause.InvalidExpr.Error](#rqsrs-019clickhousewindowfunctionsorderclauseinvalidexprerror)
|
||||
* 3.5 [FRAME Clause](#frame-clause)
|
||||
* 3.5.1 [RQ.SRS-019.ClickHouse.WindowFunctions.FrameClause](#rqsrs-019clickhousewindowfunctionsframeclause)
|
||||
* 3.5.2 [ROWS](#rows)
|
||||
* 3.5.2.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame](#rqsrs-019clickhousewindowfunctionsrowsframe)
|
||||
* 3.5.2.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.MissingFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrowsframemissingframeextenterror)
|
||||
* 3.5.2.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.InvalidFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrowsframeinvalidframeextenterror)
|
||||
* 3.5.2.4 [ROWS CURRENT ROW](#rows-current-row)
|
||||
* 3.5.2.4.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframestartcurrentrow)
|
||||
* 3.5.2.5 [ROWS UNBOUNDED PRECEDING](#rows-unbounded-preceding)
|
||||
* 3.5.2.5.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.UnboundedPreceding](#rqsrs-019clickhousewindowfunctionsrowsframestartunboundedpreceding)
|
||||
* 3.5.2.6 [ROWS `expr` PRECEDING](#rows-expr-preceding)
|
||||
* 3.5.2.6.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.ExprPreceding](#rqsrs-019clickhousewindowfunctionsrowsframestartexprpreceding)
|
||||
* 3.5.2.7 [ROWS UNBOUNDED FOLLOWING](#rows-unbounded-following)
|
||||
* 3.5.2.7.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframestartunboundedfollowingerror)
|
||||
* 3.5.2.8 [ROWS `expr` FOLLOWING](#rows-expr-following)
|
||||
* 3.5.2.8.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframestartexprfollowingerror)
|
||||
* 3.5.2.9 [ROWS BETWEEN CURRENT ROW](#rows-between-current-row)
|
||||
* 3.5.2.9.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowcurrentrow)
|
||||
* 3.5.2.9.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowunboundedprecedingerror)
|
||||
* 3.5.2.9.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowexprprecedingerror)
|
||||
* 3.5.2.9.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowunboundedfollowing)
|
||||
* 3.5.2.9.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowexprfollowing)
|
||||
* 3.5.2.10 [ROWS BETWEEN UNBOUNDED PRECEDING](#rows-between-unbounded-preceding)
|
||||
* 3.5.2.10.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingcurrentrow)
|
||||
* 3.5.2.10.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingunboundedprecedingerror)
|
||||
* 3.5.2.10.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.ExprPreceding](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingexprpreceding)
|
||||
* 3.5.2.10.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingunboundedfollowing)
|
||||
* 3.5.2.10.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingexprfollowing)
|
||||
* 3.5.2.11 [ROWS BETWEEN UNBOUNDED FOLLOWING](#rows-between-unbounded-following)
|
||||
* 3.5.2.11.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedfollowingerror)
|
||||
* 3.5.2.12 [ROWS BETWEEN `expr` FOLLOWING](#rows-between-expr-following)
|
||||
* 3.5.2.12.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingerror)
|
||||
* 3.5.2.12.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingexprfollowingerror)
|
||||
* 3.5.2.12.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingunboundedfollowing)
|
||||
* 3.5.2.12.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingexprfollowing)
|
||||
* 3.5.2.13 [ROWS BETWEEN `expr` PRECEDING](#rows-between-expr-preceding)
|
||||
* 3.5.2.13.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingcurrentrow)
|
||||
* 3.5.2.13.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingunboundedprecedingerror)
|
||||
* 3.5.2.13.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingunboundedfollowing)
|
||||
* 3.5.2.13.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingexprprecedingerror)
|
||||
* 3.5.2.13.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.ExprPreceding](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingexprpreceding)
|
||||
* 3.5.2.13.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingexprfollowing)
|
||||
* 3.5.3 [RANGE](#range)
|
||||
* 3.5.3.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame](#rqsrs-019clickhousewindowfunctionsrangeframe)
|
||||
* 3.5.3.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.DataTypes.DateAndDateTime](#rqsrs-019clickhousewindowfunctionsrangeframedatatypesdateanddatetime)
|
||||
* 3.5.3.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.DataTypes.IntAndUInt](#rqsrs-019clickhousewindowfunctionsrangeframedatatypesintanduint)
|
||||
* 3.5.3.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.MultipleColumnsInOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframemultiplecolumnsinorderbyerror)
|
||||
* 3.5.3.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.MissingFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrangeframemissingframeextenterror)
|
||||
* 3.5.3.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.InvalidFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrangeframeinvalidframeextenterror)
|
||||
* 3.5.3.7 [`CURRENT ROW` Peers](#current-row-peers)
|
||||
* 3.5.3.8 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.CurrentRow.Peers](#rqsrs-019clickhousewindowfunctionsrangeframecurrentrowpeers)
|
||||
* 3.5.3.9 [RANGE CURRENT ROW](#range-current-row)
|
||||
* 3.5.3.9.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.CurrentRow.WithoutOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartcurrentrowwithoutorderby)
|
||||
* 3.5.3.9.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.CurrentRow.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartcurrentrowwithorderby)
|
||||
* 3.5.3.10 [RANGE UNBOUNDED FOLLOWING](#range-unbounded-following)
|
||||
* 3.5.3.10.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartunboundedfollowingerror)
|
||||
* 3.5.3.11 [RANGE UNBOUNDED PRECEDING](#range-unbounded-preceding)
|
||||
* 3.5.3.11.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.UnboundedPreceding.WithoutOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartunboundedprecedingwithoutorderby)
|
||||
* 3.5.3.11.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.UnboundedPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartunboundedprecedingwithorderby)
|
||||
* 3.5.3.12 [RANGE `expr` PRECEDING](#range-expr-preceding)
|
||||
* 3.5.3.12.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprprecedingwithoutorderbyerror)
|
||||
* 3.5.3.12.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprPreceding.OrderByNonNumericalColumn.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprprecedingorderbynonnumericalcolumnerror)
|
||||
* 3.5.3.12.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartexprprecedingwithorderby)
|
||||
* 3.5.3.13 [RANGE `expr` FOLLOWING](#range-expr-following)
|
||||
* 3.5.3.13.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprfollowingwithoutorderbyerror)
|
||||
* 3.5.3.13.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprFollowing.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprfollowingwithorderbyerror)
|
||||
* 3.5.3.14 [RANGE BETWEEN CURRENT ROW](#range-between-current-row)
|
||||
* 3.5.3.14.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.CurrentRow](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowcurrentrow)
|
||||
* 3.5.3.14.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowunboundedprecedingerror)
|
||||
* 3.5.3.14.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowunboundedfollowing)
|
||||
* 3.5.3.14.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowexprfollowingwithoutorderbyerror)
|
||||
* 3.5.3.14.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowexprfollowingwithorderby)
|
||||
* 3.5.3.14.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowexprprecedingerror)
|
||||
* 3.5.3.15 [RANGE BETWEEN UNBOUNDED PRECEDING](#range-between-unbounded-preceding)
|
||||
* 3.5.3.15.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.CurrentRow](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingcurrentrow)
|
||||
* 3.5.3.15.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingunboundedprecedingerror)
|
||||
* 3.5.3.15.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingunboundedfollowing)
|
||||
* 3.5.3.15.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprprecedingwithoutorderbyerror)
|
||||
* 3.5.3.15.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprprecedingwithorderby)
|
||||
* 3.5.3.15.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprfollowingwithoutorderbyerror)
|
||||
* 3.5.3.15.7 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprfollowingwithorderby)
|
||||
* 3.5.3.16 [RANGE BETWEEN UNBOUNDED FOLLOWING](#range-between-unbounded-following)
|
||||
* 3.5.3.16.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.CurrentRow.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingcurrentrowerror)
|
||||
* 3.5.3.16.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingunboundedfollowingerror)
|
||||
* 3.5.3.16.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingunboundedprecedingerror)
|
||||
* 3.5.3.16.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingexprprecedingerror)
|
||||
* 3.5.3.16.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingexprfollowingerror)
|
||||
* 3.5.3.17 [RANGE BETWEEN expr PRECEDING](#range-between-expr-preceding)
|
||||
* 3.5.3.17.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.CurrentRow.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingcurrentrowwithorderby)
|
||||
* 3.5.3.17.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.CurrentRow.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingcurrentrowwithoutorderbyerror)
|
||||
* 3.5.3.17.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingunboundedprecedingerror)
|
||||
* 3.5.3.17.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.UnboundedFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingunboundedfollowingwithoutorderbyerror)
|
||||
* 3.5.3.17.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.UnboundedFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingunboundedfollowingwithorderby)
|
||||
* 3.5.3.17.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprfollowingwithoutorderbyerror)
|
||||
* 3.5.3.17.7 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprfollowingwithorderby)
|
||||
* 3.5.3.17.8 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprprecedingwithoutorderbyerror)
|
||||
* 3.5.3.17.9 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprPreceding.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprprecedingwithorderbyerror)
|
||||
* 3.5.3.17.10 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprprecedingwithorderby)
|
||||
* 3.5.3.18 [RANGE BETWEEN expr FOLLOWING](#range-between-expr-following)
|
||||
* 3.5.3.18.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.CurrentRow.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingcurrentrowwithoutorderbyerror)
|
||||
* 3.5.3.18.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.CurrentRow.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingcurrentrowwithorderbyerror)
|
||||
* 3.5.3.18.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.CurrentRow.ZeroSpecialCase](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingcurrentrowzerospecialcase)
|
||||
* 3.5.3.18.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.UnboundedFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingunboundedfollowingwithoutorderbyerror)
|
||||
* 3.5.3.18.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.UnboundedFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingunboundedfollowingwithorderby)
|
||||
* 3.5.3.18.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingunboundedprecedingerror)
|
||||
* 3.5.3.18.7 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprprecedingwithoutorderbyerror)
|
||||
* 3.5.3.18.8 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprprecedingerror)
|
||||
* 3.5.3.18.9 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprPreceding.WithOrderBy.ZeroSpecialCase](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprprecedingwithorderbyzerospecialcase)
|
||||
* 3.5.3.18.10 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprfollowingwithoutorderbyerror)
|
||||
* 3.5.3.18.11 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprFollowing.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprfollowingwithorderbyerror)
|
||||
* 3.5.3.18.12 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprfollowingwithorderby)
|
||||
* 3.5.4 [Frame Extent](#frame-extent)
|
||||
* 3.5.4.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.Extent](#rqsrs-019clickhousewindowfunctionsframeextent)
|
||||
* 3.5.5 [Frame Start](#frame-start)
|
||||
* 3.5.5.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.Start](#rqsrs-019clickhousewindowfunctionsframestart)
|
||||
* 3.5.6 [Frame Between](#frame-between)
|
||||
* 3.5.6.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.Between](#rqsrs-019clickhousewindowfunctionsframebetween)
|
||||
* 3.5.7 [Frame End](#frame-end)
|
||||
* 3.5.7.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.End](#rqsrs-019clickhousewindowfunctionsframeend)
|
||||
* 3.5.8 [`CURRENT ROW`](#current-row)
|
||||
* 3.5.8.1 [RQ.SRS-019.ClickHouse.WindowFunctions.CurrentRow](#rqsrs-019clickhousewindowfunctionscurrentrow)
|
||||
* 3.5.9 [`UNBOUNDED PRECEDING`](#unbounded-preceding)
|
||||
* 3.5.9.1 [RQ.SRS-019.ClickHouse.WindowFunctions.UnboundedPreceding](#rqsrs-019clickhousewindowfunctionsunboundedpreceding)
|
||||
* 3.5.10 [`UNBOUNDED FOLLOWING`](#unbounded-following)
|
||||
* 3.5.10.1 [RQ.SRS-019.ClickHouse.WindowFunctions.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsunboundedfollowing)
|
||||
* 3.5.11 [`expr PRECEDING`](#expr-preceding)
|
||||
* 3.5.11.1 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprPreceding](#rqsrs-019clickhousewindowfunctionsexprpreceding)
|
||||
* 3.5.11.2 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprPreceding.ExprValue](#rqsrs-019clickhousewindowfunctionsexprprecedingexprvalue)
|
||||
* 3.5.12 [`expr FOLLOWING`](#expr-following)
|
||||
* 3.5.12.1 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprFollowing](#rqsrs-019clickhousewindowfunctionsexprfollowing)
|
||||
* 3.5.12.2 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprFollowing.ExprValue](#rqsrs-019clickhousewindowfunctionsexprfollowingexprvalue)
|
||||
* 3.5.2 [RQ.SRS-019.ClickHouse.WindowFunctions.FrameClause.DefaultFrame](#rqsrs-019clickhousewindowfunctionsframeclausedefaultframe)
|
||||
* 3.5.3 [ROWS](#rows)
|
||||
* 3.5.3.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame](#rqsrs-019clickhousewindowfunctionsrowsframe)
|
||||
* 3.5.3.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.MissingFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrowsframemissingframeextenterror)
|
||||
* 3.5.3.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.InvalidFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrowsframeinvalidframeextenterror)
|
||||
* 3.5.3.4 [ROWS CURRENT ROW](#rows-current-row)
|
||||
* 3.5.3.4.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframestartcurrentrow)
|
||||
* 3.5.3.5 [ROWS UNBOUNDED PRECEDING](#rows-unbounded-preceding)
|
||||
* 3.5.3.5.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.UnboundedPreceding](#rqsrs-019clickhousewindowfunctionsrowsframestartunboundedpreceding)
|
||||
* 3.5.3.6 [ROWS `expr` PRECEDING](#rows-expr-preceding)
|
||||
* 3.5.3.6.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.ExprPreceding](#rqsrs-019clickhousewindowfunctionsrowsframestartexprpreceding)
|
||||
* 3.5.3.7 [ROWS UNBOUNDED FOLLOWING](#rows-unbounded-following)
|
||||
* 3.5.3.7.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframestartunboundedfollowingerror)
|
||||
* 3.5.3.8 [ROWS `expr` FOLLOWING](#rows-expr-following)
|
||||
* 3.5.3.8.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Start.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframestartexprfollowingerror)
|
||||
* 3.5.3.9 [ROWS BETWEEN CURRENT ROW](#rows-between-current-row)
|
||||
* 3.5.3.9.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowcurrentrow)
|
||||
* 3.5.3.9.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowunboundedprecedingerror)
|
||||
* 3.5.3.9.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowexprprecedingerror)
|
||||
* 3.5.3.9.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowunboundedfollowing)
|
||||
* 3.5.3.9.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.CurrentRow.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweencurrentrowexprfollowing)
|
||||
* 3.5.3.10 [ROWS BETWEEN UNBOUNDED PRECEDING](#rows-between-unbounded-preceding)
|
||||
* 3.5.3.10.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingcurrentrow)
|
||||
* 3.5.3.10.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingunboundedprecedingerror)
|
||||
* 3.5.3.10.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.ExprPreceding](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingexprpreceding)
|
||||
* 3.5.3.10.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingunboundedfollowing)
|
||||
* 3.5.3.10.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedPreceding.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedprecedingexprfollowing)
|
||||
* 3.5.3.11 [ROWS BETWEEN UNBOUNDED FOLLOWING](#rows-between-unbounded-following)
|
||||
* 3.5.3.11.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenunboundedfollowingerror)
|
||||
* 3.5.3.12 [ROWS BETWEEN `expr` FOLLOWING](#rows-between-expr-following)
|
||||
* 3.5.3.12.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingerror)
|
||||
* 3.5.3.12.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingexprfollowingerror)
|
||||
* 3.5.3.12.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingunboundedfollowing)
|
||||
* 3.5.3.12.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprFollowing.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprfollowingexprfollowing)
|
||||
* 3.5.3.13 [ROWS BETWEEN `expr` PRECEDING](#rows-between-expr-preceding)
|
||||
* 3.5.3.13.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.CurrentRow](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingcurrentrow)
|
||||
* 3.5.3.13.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingunboundedprecedingerror)
|
||||
* 3.5.3.13.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingunboundedfollowing)
|
||||
* 3.5.3.13.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingexprprecedingerror)
|
||||
* 3.5.3.13.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.ExprPreceding](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingexprpreceding)
|
||||
* 3.5.3.13.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame.Between.ExprPreceding.ExprFollowing](#rqsrs-019clickhousewindowfunctionsrowsframebetweenexprprecedingexprfollowing)
|
||||
* 3.5.4 [RANGE](#range)
|
||||
* 3.5.4.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame](#rqsrs-019clickhousewindowfunctionsrangeframe)
|
||||
* 3.5.4.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.DataTypes.DateAndDateTime](#rqsrs-019clickhousewindowfunctionsrangeframedatatypesdateanddatetime)
|
||||
* 3.5.4.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.DataTypes.IntAndUInt](#rqsrs-019clickhousewindowfunctionsrangeframedatatypesintanduint)
|
||||
* 3.5.4.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.MultipleColumnsInOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframemultiplecolumnsinorderbyerror)
|
||||
* 3.5.4.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.MissingFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrangeframemissingframeextenterror)
|
||||
* 3.5.4.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.InvalidFrameExtent.Error](#rqsrs-019clickhousewindowfunctionsrangeframeinvalidframeextenterror)
|
||||
* 3.5.4.7 [`CURRENT ROW` Peers](#current-row-peers)
|
||||
* 3.5.4.8 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.CurrentRow.Peers](#rqsrs-019clickhousewindowfunctionsrangeframecurrentrowpeers)
|
||||
* 3.5.4.9 [RANGE CURRENT ROW](#range-current-row)
|
||||
* 3.5.4.9.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.CurrentRow.WithoutOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartcurrentrowwithoutorderby)
|
||||
* 3.5.4.9.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.CurrentRow.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartcurrentrowwithorderby)
|
||||
* 3.5.4.10 [RANGE UNBOUNDED FOLLOWING](#range-unbounded-following)
|
||||
* 3.5.4.10.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartunboundedfollowingerror)
|
||||
* 3.5.4.11 [RANGE UNBOUNDED PRECEDING](#range-unbounded-preceding)
|
||||
* 3.5.4.11.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.UnboundedPreceding.WithoutOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartunboundedprecedingwithoutorderby)
|
||||
* 3.5.4.11.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.UnboundedPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartunboundedprecedingwithorderby)
|
||||
* 3.5.4.12 [RANGE `expr` PRECEDING](#range-expr-preceding)
|
||||
* 3.5.4.12.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprprecedingwithoutorderbyerror)
|
||||
* 3.5.4.12.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprPreceding.OrderByNonNumericalColumn.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprprecedingorderbynonnumericalcolumnerror)
|
||||
* 3.5.4.12.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframestartexprprecedingwithorderby)
|
||||
* 3.5.4.13 [RANGE `expr` FOLLOWING](#range-expr-following)
|
||||
* 3.5.4.13.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprfollowingwithoutorderbyerror)
|
||||
* 3.5.4.13.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Start.ExprFollowing.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframestartexprfollowingwithorderbyerror)
|
||||
* 3.5.4.14 [RANGE BETWEEN CURRENT ROW](#range-between-current-row)
|
||||
* 3.5.4.14.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.CurrentRow](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowcurrentrow)
|
||||
* 3.5.4.14.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowunboundedprecedingerror)
|
||||
* 3.5.4.14.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowunboundedfollowing)
|
||||
* 3.5.4.14.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowexprfollowingwithoutorderbyerror)
|
||||
* 3.5.4.14.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowexprfollowingwithorderby)
|
||||
* 3.5.4.14.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.CurrentRow.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweencurrentrowexprprecedingerror)
|
||||
* 3.5.4.15 [RANGE BETWEEN UNBOUNDED PRECEDING](#range-between-unbounded-preceding)
|
||||
* 3.5.4.15.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.CurrentRow](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingcurrentrow)
|
||||
* 3.5.4.15.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingunboundedprecedingerror)
|
||||
* 3.5.4.15.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingunboundedfollowing)
|
||||
* 3.5.4.15.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprprecedingwithoutorderbyerror)
|
||||
* 3.5.4.15.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprprecedingwithorderby)
|
||||
* 3.5.4.15.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprfollowingwithoutorderbyerror)
|
||||
* 3.5.4.15.7 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedPreceding.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedprecedingexprfollowingwithorderby)
|
||||
* 3.5.4.16 [RANGE BETWEEN UNBOUNDED FOLLOWING](#range-between-unbounded-following)
|
||||
* 3.5.4.16.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.CurrentRow.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingcurrentrowerror)
|
||||
* 3.5.4.16.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.UnboundedFollowing.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingunboundedfollowingerror)
|
||||
* 3.5.4.16.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingunboundedprecedingerror)
|
||||
* 3.5.4.16.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingexprprecedingerror)
|
||||
* 3.5.4.16.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.UnboundedFollowing.ExprFollowing.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenunboundedfollowingexprfollowingerror)
|
||||
* 3.5.4.17 [RANGE BETWEEN expr PRECEDING](#range-between-expr-preceding)
|
||||
* 3.5.4.17.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.CurrentRow.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingcurrentrowwithorderby)
|
||||
* 3.5.4.17.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.CurrentRow.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingcurrentrowwithoutorderbyerror)
|
||||
* 3.5.4.17.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingunboundedprecedingerror)
|
||||
* 3.5.4.17.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.UnboundedFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingunboundedfollowingwithoutorderbyerror)
|
||||
* 3.5.4.17.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.UnboundedFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingunboundedfollowingwithorderby)
|
||||
* 3.5.4.17.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprfollowingwithoutorderbyerror)
|
||||
* 3.5.4.17.7 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprfollowingwithorderby)
|
||||
* 3.5.4.17.8 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprprecedingwithoutorderbyerror)
|
||||
* 3.5.4.17.9 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprPreceding.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprprecedingwithorderbyerror)
|
||||
* 3.5.4.17.10 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprPreceding.ExprPreceding.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprprecedingexprprecedingwithorderby)
|
||||
* 3.5.4.18 [RANGE BETWEEN expr FOLLOWING](#range-between-expr-following)
|
||||
* 3.5.4.18.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.CurrentRow.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingcurrentrowwithoutorderbyerror)
|
||||
* 3.5.4.18.2 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.CurrentRow.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingcurrentrowwithorderbyerror)
|
||||
* 3.5.4.18.3 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.CurrentRow.ZeroSpecialCase](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingcurrentrowzerospecialcase)
|
||||
* 3.5.4.18.4 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.UnboundedFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingunboundedfollowingwithoutorderbyerror)
|
||||
* 3.5.4.18.5 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.UnboundedFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingunboundedfollowingwithorderby)
|
||||
* 3.5.4.18.6 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.UnboundedPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingunboundedprecedingerror)
|
||||
* 3.5.4.18.7 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprPreceding.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprprecedingwithoutorderbyerror)
|
||||
* 3.5.4.18.8 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprPreceding.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprprecedingerror)
|
||||
* 3.5.4.18.9 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprPreceding.WithOrderBy.ZeroSpecialCase](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprprecedingwithorderbyzerospecialcase)
|
||||
* 3.5.4.18.10 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprFollowing.WithoutOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprfollowingwithoutorderbyerror)
|
||||
* 3.5.4.18.11 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprFollowing.WithOrderBy.Error](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprfollowingwithorderbyerror)
|
||||
* 3.5.4.18.12 [RQ.SRS-019.ClickHouse.WindowFunctions.RangeFrame.Between.ExprFollowing.ExprFollowing.WithOrderBy](#rqsrs-019clickhousewindowfunctionsrangeframebetweenexprfollowingexprfollowingwithorderby)
|
||||
* 3.5.5 [Frame Extent](#frame-extent)
|
||||
* 3.5.5.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.Extent](#rqsrs-019clickhousewindowfunctionsframeextent)
|
||||
* 3.5.6 [Frame Start](#frame-start)
|
||||
* 3.5.6.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.Start](#rqsrs-019clickhousewindowfunctionsframestart)
|
||||
* 3.5.7 [Frame Between](#frame-between)
|
||||
* 3.5.7.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.Between](#rqsrs-019clickhousewindowfunctionsframebetween)
|
||||
* 3.5.8 [Frame End](#frame-end)
|
||||
* 3.5.8.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Frame.End](#rqsrs-019clickhousewindowfunctionsframeend)
|
||||
* 3.5.9 [`CURRENT ROW`](#current-row)
|
||||
* 3.5.9.1 [RQ.SRS-019.ClickHouse.WindowFunctions.CurrentRow](#rqsrs-019clickhousewindowfunctionscurrentrow)
|
||||
* 3.5.10 [`UNBOUNDED PRECEDING`](#unbounded-preceding)
|
||||
* 3.5.10.1 [RQ.SRS-019.ClickHouse.WindowFunctions.UnboundedPreceding](#rqsrs-019clickhousewindowfunctionsunboundedpreceding)
|
||||
* 3.5.11 [`UNBOUNDED FOLLOWING`](#unbounded-following)
|
||||
* 3.5.11.1 [RQ.SRS-019.ClickHouse.WindowFunctions.UnboundedFollowing](#rqsrs-019clickhousewindowfunctionsunboundedfollowing)
|
||||
* 3.5.12 [`expr PRECEDING`](#expr-preceding)
|
||||
* 3.5.12.1 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprPreceding](#rqsrs-019clickhousewindowfunctionsexprpreceding)
|
||||
* 3.5.12.2 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprPreceding.ExprValue](#rqsrs-019clickhousewindowfunctionsexprprecedingexprvalue)
|
||||
* 3.5.13 [`expr FOLLOWING`](#expr-following)
|
||||
* 3.5.13.1 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprFollowing](#rqsrs-019clickhousewindowfunctionsexprfollowing)
|
||||
* 3.5.13.2 [RQ.SRS-019.ClickHouse.WindowFunctions.ExprFollowing.ExprValue](#rqsrs-019clickhousewindowfunctionsexprfollowingexprvalue)
|
||||
* 3.6 [WINDOW Clause](#window-clause)
|
||||
* 3.6.1 [RQ.SRS-019.ClickHouse.WindowFunctions.WindowClause](#rqsrs-019clickhousewindowfunctionswindowclause)
|
||||
* 3.6.2 [RQ.SRS-019.ClickHouse.WindowFunctions.WindowClause.MultipleWindows](#rqsrs-019clickhousewindowfunctionswindowclausemultiplewindows)
|
||||
@ -179,12 +180,16 @@
|
||||
* 3.8.1.3.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Lag.Workaround](#rqsrs-019clickhousewindowfunctionslagworkaround)
|
||||
* 3.8.1.4 [The `lead(value, offset)` Function Workaround](#the-leadvalue-offset-function-workaround)
|
||||
* 3.8.1.4.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Lead.Workaround](#rqsrs-019clickhousewindowfunctionsleadworkaround)
|
||||
* 3.8.1.5 [The `rank()` Function](#the-rank-function)
|
||||
* 3.8.1.5.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Rank](#rqsrs-019clickhousewindowfunctionsrank)
|
||||
* 3.8.1.6 [The `dense_rank()` Function](#the-dense_rank-function)
|
||||
* 3.8.1.6.1 [RQ.SRS-019.ClickHouse.WindowFunctions.DenseRank](#rqsrs-019clickhousewindowfunctionsdenserank)
|
||||
* 3.8.1.7 [The `row_number()` Function](#the-row_number-function)
|
||||
* 3.8.1.7.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowNumber](#rqsrs-019clickhousewindowfunctionsrownumber)
|
||||
* 3.8.1.5 [The `leadInFrame(expr[, offset, [default]])`](#the-leadinframeexpr-offset-default)
|
||||
* 3.8.1.5.1 [RQ.SRS-019.ClickHouse.WindowFunctions.LeadInFrame](#rqsrs-019clickhousewindowfunctionsleadinframe)
|
||||
* 3.8.1.6 [The `lagInFrame(expr[, offset, [default]])`](#the-laginframeexpr-offset-default)
|
||||
* 3.8.1.6.1 [RQ.SRS-019.ClickHouse.WindowFunctions.LagInFrame](#rqsrs-019clickhousewindowfunctionslaginframe)
|
||||
* 3.8.1.7 [The `rank()` Function](#the-rank-function)
|
||||
* 3.8.1.7.1 [RQ.SRS-019.ClickHouse.WindowFunctions.Rank](#rqsrs-019clickhousewindowfunctionsrank)
|
||||
* 3.8.1.8 [The `dense_rank()` Function](#the-dense_rank-function)
|
||||
* 3.8.1.8.1 [RQ.SRS-019.ClickHouse.WindowFunctions.DenseRank](#rqsrs-019clickhousewindowfunctionsdenserank)
|
||||
* 3.8.1.9 [The `row_number()` Function](#the-row_number-function)
|
||||
* 3.8.1.9.1 [RQ.SRS-019.ClickHouse.WindowFunctions.RowNumber](#rqsrs-019clickhousewindowfunctionsrownumber)
|
||||
* 3.8.2 [Aggregate Functions](#aggregate-functions)
|
||||
* 3.8.2.1 [RQ.SRS-019.ClickHouse.WindowFunctions.AggregateFunctions](#rqsrs-019clickhousewindowfunctionsaggregatefunctions)
|
||||
* 3.8.2.2 [Combinators](#combinators)
|
||||
@ -352,6 +357,17 @@ frame_clause:
|
||||
{ROWS | RANGE } frame_extent
|
||||
```
|
||||
|
||||
#### RQ.SRS-019.ClickHouse.WindowFunctions.FrameClause.DefaultFrame
|
||||
version: 1.0
|
||||
|
||||
[ClickHouse] SHALL support the default `frame_clause` to be `RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW`.
|
||||
|
||||
If the `ORDER BY` clause is specified then this SHALL set the frame to be all rows from
|
||||
the partition start up to and including current row and its peers.
|
||||
|
||||
If the `ORDER BY` clause is not specified then this SHALL set the frame to include all rows
|
||||
in the partition because all the rows are considered to be the peers of the current row.
|
||||
|
||||
#### ROWS
|
||||
|
||||
##### RQ.SRS-019.ClickHouse.WindowFunctions.RowsFrame
|
||||
@ -2110,6 +2126,48 @@ If `N` or default are missing, the defaults are 1 and NULL, respectively.
|
||||
`N` SHALL be a literal non-negative integer. If `N` is 0, the value SHALL be
|
||||
returned for the current row.
|
||||
|
||||
##### The `leadInFrame(expr[, offset, [default]])`
|
||||
|
||||
###### RQ.SRS-019.ClickHouse.WindowFunctions.LeadInFrame
|
||||
version: 1.0
|
||||
|
||||
[ClickHouse] SHALL support the `leadInFrame(expr[, offset, [default]])` function.
|
||||
|
||||
For example,
|
||||
```
|
||||
leadInFrame(column) OVER (...)
|
||||
```
|
||||
|
||||
The function SHALL return the value from the row that leads (follows) the current row
|
||||
by the `offset` rows within the current frame. If there is no such row,
|
||||
the return value SHALL be the `default` value. If the `default` value is not specified
|
||||
then the default value for the corresponding column data type SHALL be returned.
|
||||
|
||||
The `offset` SHALL be a literal non-negative integer. If the `offset` is set to `0`, then
|
||||
the value SHALL be returned for the current row. If the `offset` is not specified, the default
|
||||
value SHALL be `1`.
|
||||
|
||||
##### The `lagInFrame(expr[, offset, [default]])`
|
||||
|
||||
###### RQ.SRS-019.ClickHouse.WindowFunctions.LagInFrame
|
||||
version: 1.0
|
||||
|
||||
[ClickHouse] SHALL support the `lagInFrame(expr[, offset, [default]])` function.
|
||||
|
||||
For example,
|
||||
```
|
||||
lagInFrame(column) OVER (...)
|
||||
```
|
||||
|
||||
The function SHALL return the value from the row that lags (preceds) the current row
|
||||
by the `offset` rows within the current frame. If there is no such row,
|
||||
the return value SHALL be the `default` value. If the `default` value is not specified
|
||||
then the default value for the corresponding column data type SHALL be returned.
|
||||
|
||||
The `offset` SHALL be a literal non-negative integer. If the `offset` is set to `0`, then
|
||||
the value SHALL be returned for the current row. If the `offset` is not specified, the default
|
||||
value SHALL be `1`.
|
||||
|
||||
##### The `rank()` Function
|
||||
|
||||
###### RQ.SRS-019.ClickHouse.WindowFunctions.Rank
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,45 @@ from testflows.core import *
|
||||
from window_functions.requirements import *
|
||||
from window_functions.tests.common import *
|
||||
|
||||
@TestFeature
|
||||
@Requirements(
|
||||
RQ_SRS_019_ClickHouse_WindowFunctions_FrameClause_DefaultFrame("1.0")
|
||||
)
|
||||
def default_frame(self):
|
||||
"""Check default frame.
|
||||
"""
|
||||
with Scenario("with order by"):
|
||||
expected = convert_output("""
|
||||
number | sum
|
||||
---------+------
|
||||
1 | 2
|
||||
1 | 2
|
||||
2 | 4
|
||||
3 | 10
|
||||
3 | 10
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select number, sum(number) OVER (ORDER BY number) AS sum FROM values('number Int8', (1),(1),(2),(3),(3))",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Scenario("without order by"):
|
||||
expected = convert_output("""
|
||||
number | sum
|
||||
---------+------
|
||||
1 | 10
|
||||
1 | 10
|
||||
2 | 10
|
||||
3 | 10
|
||||
3 | 10
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select number, sum(number) OVER () AS sum FROM values('number Int8', (1),(1),(2),(3),(3))",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
@TestFeature
|
||||
@Name("frame clause")
|
||||
@Requirements(
|
||||
@ -22,8 +61,9 @@ from window_functions.tests.common import *
|
||||
def feature(self):
|
||||
"""Check defining frame clause.
|
||||
"""
|
||||
Feature(run=default_frame, flags=TE)
|
||||
Feature(run=load("window_functions.tests.rows_frame", "feature"), flags=TE)
|
||||
Feature(run=load("window_functions.tests.range_frame", "feature"), flags=TE)
|
||||
Feature(run=load("window_functions.tests.range_overflow", "feature"), flags=TE)
|
||||
Feature(run=load("window_functions.tests.range_datetime", "feature"), flags=TE)
|
||||
Feature(run=load("window_functions.tests.range_errors", "feature"), flags=TE)
|
||||
Feature(run=load("window_functions.tests.range_errors", "feature"), flags=TE)
|
||||
|
@ -447,6 +447,220 @@ def first_value_with_lead_workaround(self):
|
||||
expected=expected
|
||||
)
|
||||
|
||||
@TestScenario
|
||||
@Requirements(
|
||||
RQ_SRS_019_ClickHouse_WindowFunctions_LeadInFrame("1.0")
|
||||
)
|
||||
def leadInFrame(self):
|
||||
"""Check `leadInFrame` function.
|
||||
"""
|
||||
with Example("non default offset"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lead
|
||||
--------+--------+-------
|
||||
1 | 5000 | 5000
|
||||
2 | 3900 | 3900
|
||||
3 | 4800 | 4800
|
||||
4 | 4800 | 4800
|
||||
5 | 3500 | 3500
|
||||
7 | 4200 | 4200
|
||||
8 | 6000 | 6000
|
||||
9 | 4500 | 4500
|
||||
10 | 5200 | 5200
|
||||
11 | 5200 | 5200
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, leadInFrame(salary,0) OVER (ORDER BY salary) AS lead FROM empsalary ORDER BY empno",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("default offset"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lead
|
||||
--------+--------+-------
|
||||
1 | 5000 | 0
|
||||
2 | 3900 | 0
|
||||
3 | 4800 | 4800
|
||||
4 | 4800 | 0
|
||||
5 | 3500 | 0
|
||||
7 | 4200 | 0
|
||||
8 | 6000 | 0
|
||||
9 | 4500 | 0
|
||||
10 | 5200 | 5200
|
||||
11 | 5200 | 0
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, leadInFrame(salary) OVER (ORDER BY salary) AS lead FROM (SELECT * FROM empsalary ORDER BY empno)",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("explicit default value"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lead
|
||||
--------+--------+-------
|
||||
1 | 5000 | 8
|
||||
2 | 3900 | 8
|
||||
3 | 4800 | 4800
|
||||
4 | 4800 | 8
|
||||
5 | 3500 | 8
|
||||
7 | 4200 | 8
|
||||
8 | 6000 | 8
|
||||
9 | 4500 | 8
|
||||
10 | 5200 | 5200
|
||||
11 | 5200 | 8
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, leadInFrame(salary,1,8) OVER (ORDER BY salary) AS lead FROM empsalary ORDER BY empno",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("without order by"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lead
|
||||
--------+--------+-------
|
||||
1 | 5000 | 3900
|
||||
2 | 3900 | 4800
|
||||
3 | 4800 | 4800
|
||||
4 | 4800 | 3500
|
||||
5 | 3500 | 4200
|
||||
7 | 4200 | 6000
|
||||
8 | 6000 | 4500
|
||||
9 | 4500 | 5200
|
||||
10 | 5200 | 5200
|
||||
11 | 5200 | 0
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, leadInFrame(salary) OVER () AS lead FROM (SELECT * FROM empsalary ORDER BY empno)",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("with nulls"):
|
||||
expected = convert_output("""
|
||||
number | lead
|
||||
--------+-----
|
||||
1 | 1
|
||||
1 | 2
|
||||
2 | 3
|
||||
3 | 0
|
||||
\\N | 0
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select number, leadInFrame(number,1,0) OVER () AS lead FROM values('number Nullable(Int8)', (1),(1),(2),(3),(NULL))",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
@TestScenario
|
||||
@Requirements(
|
||||
RQ_SRS_019_ClickHouse_WindowFunctions_LagInFrame("1.0")
|
||||
)
|
||||
def lagInFrame(self):
|
||||
"""Check `lagInFrame` function.
|
||||
"""
|
||||
with Example("non default offset"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lag
|
||||
--------+--------+-------
|
||||
1 | 5000 | 5000
|
||||
2 | 3900 | 3900
|
||||
3 | 4800 | 4800
|
||||
4 | 4800 | 4800
|
||||
5 | 3500 | 3500
|
||||
7 | 4200 | 4200
|
||||
8 | 6000 | 6000
|
||||
9 | 4500 | 4500
|
||||
10 | 5200 | 5200
|
||||
11 | 5200 | 5200
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, lagInFrame(salary,0) OVER (ORDER BY salary) AS lag FROM empsalary ORDER BY empno",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("default offset"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lag
|
||||
--------+--------+-------
|
||||
5 | 3500 | 0
|
||||
2 | 3900 | 3500
|
||||
7 | 4200 | 3900
|
||||
9 | 4500 | 4200
|
||||
3 | 4800 | 4500
|
||||
4 | 4800 | 4800
|
||||
1 | 5000 | 4800
|
||||
10 | 5200 | 5000
|
||||
11 | 5200 | 5200
|
||||
8 | 6000 | 5200
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, lagInFrame(salary) OVER (ORDER BY salary) AS lag FROM (SELECT * FROM empsalary ORDER BY empno)",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("explicit default value"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lag
|
||||
--------+--------+-------
|
||||
1 | 5000 | 4800
|
||||
2 | 3900 | 3500
|
||||
3 | 4800 | 4500
|
||||
4 | 4800 | 4800
|
||||
5 | 3500 | 8
|
||||
7 | 4200 | 3900
|
||||
8 | 6000 | 5200
|
||||
9 | 4500 | 4200
|
||||
10 | 5200 | 5000
|
||||
11 | 5200 | 5200
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, lagInFrame(salary,1,8) OVER (ORDER BY salary) AS lag FROM empsalary ORDER BY empno",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("without order by"):
|
||||
expected = convert_output("""
|
||||
empno | salary | lag
|
||||
--------+--------+-------
|
||||
1 | 5000 | 0
|
||||
2 | 3900 | 5000
|
||||
3 | 4800 | 3900
|
||||
4 | 4800 | 4800
|
||||
5 | 3500 | 4800
|
||||
7 | 4200 | 3500
|
||||
8 | 6000 | 4200
|
||||
9 | 4500 | 6000
|
||||
10 | 5200 | 4500
|
||||
11 | 5200 | 5200
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select empno, salary, lagInFrame(salary) OVER () AS lag FROM (SELECT * FROM empsalary ORDER BY empno)",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
with Example("with nulls"):
|
||||
expected = convert_output("""
|
||||
number | lag
|
||||
--------+-----
|
||||
1 | 0
|
||||
1 | 1
|
||||
2 | 1
|
||||
3 | 2
|
||||
\\N | 3
|
||||
""")
|
||||
|
||||
execute_query(
|
||||
"select number, lagInFrame(number,1,0) OVER () AS lag FROM values('number Nullable(Int8)', (1),(1),(2),(3),(NULL))",
|
||||
expected=expected
|
||||
)
|
||||
|
||||
@TestFeature
|
||||
@Name("funcs")
|
||||
def feature(self):
|
||||
|
Loading…
Reference in New Issue
Block a user