Commit Graph

17 Commits

Author SHA1 Message Date
dan
d8d2fb9222 Do not mistake constant integers in a PARTITION BY expression for references to ORDER BY style references to values returned by the SELECT statement.
FossilOrigin-Name: 45c64d39d5afed7fdc6b1de19408559740d1fba1f5e0269ab68b132366a289e4
2019-12-27 15:31:47 +00:00
dan
69843342de Ensure sqlite3WindowRewrite() is called on a SELECT statement before any terms aremoved from it as part of IN() clause processing. Fix for [f00d096ca].
FossilOrigin-Name: 8c856404b4e98d295449a4e89a41495dc007319a8e9c35c1a763718d7c5f67e8
2019-12-22 17:32:25 +00:00
dan
a51ddb1ed7 Fix a window-functions problem that could occur if an ORDER BY clause contains an alias for a window-function that is not a top-level expression.
FossilOrigin-Name: 1cc6cf6407c6e25aeafeca379a93d0ad2614839c07fb3644e46926fce5f1cfab
2019-09-26 15:53:37 +00:00
dan
1efcc9dd96 Another very small performance improvement.
FossilOrigin-Name: 7a1e30a17f57ca006dd84b6f97b0c7811bf4c6da4b02903452ffc4bc363cab9b
2019-07-05 19:10:41 +00:00
dan
b28c4e564a Minor tweak to patch on this branch to reclaim some cycles.
FossilOrigin-Name: 81eed055de856068109a7e332cca0c3ff1120ebe2bfa5ed6383b165c726e0a7c
2019-07-05 17:38:55 +00:00
dan
08f6de7f31 Treat integer values in window definition ORDER BY clauses as constants, not as references to another expression.
FossilOrigin-Name: 7e4809eadfe99ebfd797a7c63501421021a720bbeed9fba81bebf630c58bb791
2019-05-10 14:26:32 +00:00
dan
67a9b8eded Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC.
FossilOrigin-Name: 5f04b016467342b5a796bf702ed25b621eb86f2961c1e703d276c93f2cb6aa89
2018-06-22 20:51:35 +00:00
dan
d6f784ef92 Further window frame tests and fixes.
FossilOrigin-Name: e74c6e91859ec395c12ba2742542ff176a1d8364dcfb66b862240746bef54efc
2018-05-28 18:30:45 +00:00
dan
79d4544d53 More fixes for different window frame types.
FossilOrigin-Name: 2c85668a0f86bcfd3de4c65847ac252e136ce97409a2249c5f4f58e3756e9a69
2018-05-26 21:17:29 +00:00
dan
09590aaa1b Fix "RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING" window frame
processing.

FossilOrigin-Name: b4e9c686697a5211a3bfa47e63f0684e3d4241d8c292cffe1a967bc39ad7cd8f
2018-05-25 20:30:17 +00:00
dan
e105dd7622 Fixes for "ROWS BETWEEN <expr> FOLLOWING AND <expr> FOLLOWING" and "ROWS
BETWEEN <expr> FOLLOWING AND UNBOUNDED FOLLOWING"

FossilOrigin-Name: 5ac44872fd5c4f92851e7bf57d7207bb4d67de88ea2b5c746ff97f20bd6352e1
2018-05-25 09:29:11 +00:00
dan
31f5639fb7 Allow "<expr> PRECEDING" to be used to specify the end of a window frame.
FossilOrigin-Name: 7b709a989c188dbcf429989a0785294b36c8a7e89b5de8cefc25decf1f5b7f5a
2018-05-24 21:10:57 +00:00
dan
99652dda3c Support other frame types that use "<expr> PRECEDING" or "<expr> FOLLOWING" as
start or end conditions.

FossilOrigin-Name: ec7b648c7f0ee266653561bbb9daa45b9be0d8a1a14f11dc93bce467c35154e6
2018-05-24 17:49:14 +00:00
dan
c3a20c19a8 Add support for "ROWS BETWEEN <expr> PRECEDING AND <expr> FOLLOWING" window
frames.

FossilOrigin-Name: 3a203660f1e4da3b8d2d605c494f4843f6e00752f28042b49e11d7d6550dd406
2018-05-23 20:55:37 +00:00
dan
8471be3311 Add comments to window.c describing how other window frames will be implemented.
FossilOrigin-Name: 16168146b202915252f9375aef38e65ca20c5d4aa906e851d4d3a484db57562d
2018-05-22 20:35:37 +00:00
dan
f9eae18b56 Begin adding support for more esoteric window frames.
FossilOrigin-Name: bc4b81d60d40583de0f929730159011c1a7696802532ebd02220de3ace94a60d
2018-05-21 19:45:11 +00:00
dan
b6e9f7a4d1 Fix minor problems on this branch.
FossilOrigin-Name: 19c2e4b2f164521eab84cb0a0e12984be9431eaedd001dd3671e9ea1a6212353
2018-05-19 14:15:29 +00:00