SQLite

All files named ”src/window.c”
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History for src/window.c

2025-02-21
17:03
[d01227141f] part of check-in [d7729dbbf2] Detect when a UNIQUE or PRIMARY KEY on a WITHOUT ROWID table would need to use more than SQLITE_LIMIT_COLUMN columns and raise an error. Also include some unrelated compiler warning fixes. (check-in: [d7729dbbf2] user: drh branch: trunk, size: 106754)
2024-12-12
20:39
[e1ba6ecb65] part of check-in [3c25c69c93] Increase the maximum number of arguments on an SQL function to 1000 with the capability to increase it further up to 32767 using a compile-time option. (check-in: [3c25c69c93] user: drh branch: cf8f1552-commit-instr, size: 106745)
15:11
[2bf01f9941] part of check-in [e8d7d68ba0] Increase the maximum number of arguments on an SQL function to 1000 with the capability to increase it further up to 32767 using a compile-time option. (check-in: [e8d7d68ba0] user: drh branch: trunk, size: 106749)
2024-11-14
14:38
[6c386af597] part of check-in [d15fb0f75e] Fix a problem with window functions min() and max() when used with a FILTER clause. Forum post e9126d554a. (check-in: [d15fb0f75e] user: dan branch: trunk, size: 106748)
2024-08-19
22:48
[499d48f315] part of check-in [8ff5dda844] Refactor the SrcItem object so that information about subqueries is stored in a separately allocated Subquery object. This reduces the memory requirements for SrcItem and makes the code run faster. It also provides an expansion path for subquery processing that does not burden simple queries. The current checking mostly works, but there are still issues that need to be tracked down and fixed. (check-in: [8ff5dda844] user: drh branch: srcitem-opt, size: 106744)
2024-08-17
23:23
[ffbf65ba62] part of check-in [9f5aeef3cb] Give unique names to fields in the SrcItem object, to facilitate analysis of how those fields are used using "grep". (check-in: [9f5aeef3cb] user: drh branch: srcitem-opt, size: 106631)
2024-06-06
16:06
[bb684e5e28] part of check-in [b44f267671] Better optimize queries that use parameters in the LIMIT clause. (check-in: [b44f267671] user: drh branch: branch-3.28-var-in-limit, size: 91119)
15:03
[1e40ffc509] part of check-in [e58cb304d1] Better optimize queries that use parameters in the LIMIT clause. (check-in: [e58cb304d1] user: drh branch: var-in-limit, size: 106624)
2024-03-16
13:18
[5d95122dd3] part of check-in [c9e0488c6c] Enhance the sqlite3ExprIsConstant() function so that it recognizes constant functions. So far the enhancement only applies to the multi-row VALUES clause, but it could possibly be applied in many other places. (check-in: [c9e0488c6c] user: drh branch: enhanced-expr-is-const, size: 106621)
2023-11-29
16:07
[d73354234d] part of check-in [f9c6e6a710] Remove Window objects from the corresponding Select.pWin list when they are deleted, as they are, for example, when the ORDER BY clause is optimized out. (check-in: [f9c6e6a710] user: drh branch: branch-3.28, size: 91118)
2023-11-09
12:08
[5b1387d59d] part of check-in [563ad3be60] Omit the new SQLITE_VALUE_SUBTYPE name. Stay with legacy SQLTIE_SUBTYPE. Add extra documentation to sqlite3_value_subtype() and sqlite3_result_subtype() indicating that the SQLITE_SUBTYPE and SQLITE_RESULT_SUBTYPE properties are required on functions that use those interfaces. (check-in: [563ad3be60] user: drh branch: func-rw-subtype, size: 106619)
2023-11-08
21:38
[6f46006904] part of check-in [48a92e3ad8] Make a distinction between functions that consume subtypes and functions that generate subtypes. (check-in: [48a92e3ad8] user: drh branch: func-rw-subtype, size: 106625)
2023-10-19
18:07
[ad21e2b73e] part of check-in [d5ae82ec52] Simplify the Expr compression logic slightly by adding the new EP_FullSize property to expressions that are exceptions to the rule and should not be compressed. (check-in: [d5ae82ec52] user: drh branch: trunk, size: 106624)
2023-06-07
17:03
[b7ad9cff3c] part of check-in [8c291d9994] Fix straggler misspellings and tidy the custom dictionary. Also include pickups from forum post c61fb09afd. (check-in: [8c291d9994] user: larrybr branch: spell-check, size: 106579)
08:40
[e25c9c675a] part of check-in [26c1bb4bd9] Add a C-source spell-checking facility. make misspell (on Nix) (check-in: [26c1bb4bd9] user: larrybr branch: spell-check, size: 106578)
2023-04-13
14:50
[e075ea85be] part of check-in [1ba22631a7] Fix a code-generator issue associated with very unusual use of window functions. Both the expr.c or the window.c changes will each independently fix the problem. They are both included in this patch for defense in depth. Forum post 0d48347967. (check-in: [1ba22631a7] user: drh branch: trunk, size: 106685)
2023-01-28
21:06
[76a27cff9e] part of check-in [f27804484d] Do not assume that sub-queries that contain window functions are uncorrelated. (check-in: [f27804484d] user: dan branch: trunk, size: 106660)
2023-01-11
17:50
[9ea4dc2434] part of check-in [33fd9997eb] If OP_Rewind has P2 of zero, that is an assertion that the table is never empty. This fixes a false-positive in the out-of-subroutine jump detection logic added in version 3.39.0, and which was causing the assertion on the previous check-in. (check-in: [33fd9997eb] user: drh branch: code-generator-20230111, size: 106619)
2022-11-22
19:49
[14836767ad] part of check-in [8036445a36] Rename the SELECTTRACE macro to TREETRACE, so that is corresponds to the new CLI command. Renumber all of the bits in the bitmask used to enable various kinds of tracing, and add a trace bitmap decoder in sqliteInt.h. Changes to debugging logic only. No (intentional) changes to production code. (check-in: [8036445a36] user: drh branch: trunk, size: 106751)
2022-07-26
19:10
[928e215840] part of check-in [01de7ec44f] Restore a VDBE coverage macro that is mistakenly deleted for check-in [92ac01d41d46ab73]. (check-in: [01de7ec44f] user: drh branch: trunk, size: 106750)
2022-07-25
19:05
[057df98b3b] part of check-in [92ac01d41d] Small performance increase and size reduction by splitting out the sqlite3VdbeGetLastOp() from sqlite3VdbeGetOp(). (check-in: [92ac01d41d] user: drh branch: trunk, size: 106729)
2022-07-22
19:28
[3409e50677] part of check-in [28934a9d92] Omit the EP_MemToken flag that was made obsolete by [e1f1cfe7f4387b60], for a size reduction and performance increase. (check-in: [28934a9d92] user: drh branch: trunk, size: 106770)
2022-05-02
20:49
[fff1b51757] part of check-in [5341d4bbe9] Organize the various flag bits of the ExprList_item object into a substructure so that the whole lot can be copied all at once. Faster and smaller code. (check-in: [5341d4bbe9] user: drh branch: right-join, size: 106834)
2022-04-25
21:31
[8546f510df] part of check-in [9caca6cb3e] Fix a problem with using multiple SQLITE_SUBTYPE function as window functions in a single query. (check-in: [9caca6cb3e] user: drh branch: branch-3.38, size: 106808)
2022-04-20
16:42
[924e04fd6e] part of check-in [9430ead7ba] Fix a problem with using multiple SQLITE_SUBTYPE function as window functions in a single query. (check-in: [9430ead7ba] user: dan branch: trunk, size: 106822)
2022-03-10
21:14
[731980c088] part of check-in [29744e69f4] Stronger defenses against corrupt schemas in the ALTER TABLE logic. (check-in: [29744e69f4] user: drh branch: branch-3.38, size: 106807)
21:04
[42a7159526] part of check-in [13fbde2817] Stronger defenses against corrupt schemas in the ALTER TABLE logic. (check-in: [13fbde2817] user: drh branch: trunk, size: 106821)
16:28
[2eea25240c] part of check-in [2c39322825] Prevent a NULL-pointer dereference when trying to parse a illegal schema entry that contains a window function while doing a RENAME COLUMN. Forum post ec2a2e0deb. (check-in: [2c39322825] user: drh branch: branch-3.38, size: 106799)
16:26
[457434edca] part of check-in [58de3c2b1a] Prevent a NULL-pointer dereference when trying to parse a illegal schema entry that contains a window function while doing a RENAME COLUMN. Forum post ec2a2e0deb. (check-in: [58de3c2b1a] user: drh branch: trunk, size: 106813)
16:01
[ce1b413b2e] part of check-in [d9475ebcde] Refactor Window.pFunc into Window.pWFunc to disambiguate from other uses of the variable or field named "pFunc". (check-in: [d9475ebcde] user: drh branch: trunk, size: 106748)
2022-01-24
19:38
[dfaec4abc6] part of check-in [4aa27b4fcd] Add ALWAYS() macros. Change some existing ALWAYS() into assert(). Other code simplifications. (check-in: [4aa27b4fcd] user: drh branch: trunk, size: 106735)
2021-11-07
23:33
[5d3b397b0c] part of check-in [0f9fc6b607] Ensure that the window function rewrite does not leave the parse tree in an invalid state that might cause problems downstream before the error is recognized and unwinds the stack. Also take steps such that an invalid parse tree does not cause problems even if it goes unrecognized. Forum post 398e9d5aa9. (check-in: [0f9fc6b607] user: drh branch: trunk, size: 106834)
2021-10-07
17:43
[0dff6fedf6] part of check-in [8eaa1d4a98] Protect all accesses to the Expr.x union using nearby assert()s and branches. (check-in: [8eaa1d4a98] user: drh branch: trunk, size: 106590)
13:40
[7bb95e7e6e] part of check-in [9af863f065] Protect all accesses to the FuncDef.u and Expr.u unions using nearby assert()s or branches. (check-in: [9af863f065] user: drh branch: trunk, size: 106223)
2021-09-25
17:07
[f27e34e896] part of check-in [70c221c5cf] Add const to parameters on various internal interfaces. (check-in: [70c221c5cf] user: drh branch: trunk, size: 106170)
2021-09-13
18:16
[a5417de85a] part of check-in [83a83475c5] Add assert() statements to refute forum post 9f4e7f58fbb66ddd. (check-in: [83a83475c5] user: drh branch: trunk, size: 106142)
2021-07-15
19:29
[4201675120] part of check-in [ef97c3e7c3] Attempt to omit ORDER BY clauses from FROM-clause subqueries if those ORDER BY clauses do not affect the output. See forum thread 2d76f2bcf65d256a for discussion. This can help the query flattener in some cases, resulting in faster query plans. The current implemention does not always work. (check-in: [ef97c3e7c3] user: drh branch: omit-subquery-order-by, size: 105922)
2021-06-23
11:12
[559961a731] part of check-in [710f75b98b] Fix a problem handling ORDER BY terms of the form "ORDER BY likely(<integer>)" within window frames. (check-in: [710f75b98b] user: dan branch: trunk, size: 105907)
2021-05-26
18:46
[a6d624d83b] part of check-in [f30fb19ff7] Take care that the code is not generated for the same Select object more than once, as transformations that apply during the first pass might cause problems for the second pass. dbsqlfuzz 836b625cd8a41809ef80fc7ebaa6554357bcb463. (check-in: [f30fb19ff7] user: drh branch: trunk, size: 105963)
2021-05-19
14:49
[ce5e73ab88] part of check-in [3daab94977] Allow aggregate sub-selects within ORDER BY and PARTITION BY clauses of window frame definitions. (check-in: [3daab94977] user: dan branch: trunk, size: 105955)
2021-05-07
15:46
[0c910a222f] part of check-in [0d11d777c8] Detect misuse of aggregate functions in the ORDER BY clause of a query even if the query also contains window functions. (check-in: [0d11d777c8] user: drh branch: trunk, size: 105926)
2021-04-28
15:43
[2e092a03ee] part of check-in [daed59b4f9] Adjust a VDBE coverage macros due to the enhancement at [506333742103c1f4]. (check-in: [daed59b4f9] user: drh branch: trunk, size: 105525)
2021-04-24
23:40
[35b14e7a53] part of check-in [5063337421] Make window range queries more robust against corrupt database files. dbsqlfuzz f22df3a7b2aab0937a415484514fc2f68a293c99. (check-in: [5063337421] user: drh branch: trunk, size: 105516)
2021-04-06
18:40
[ae9fbd0cba] part of check-in [887c19a15b] Restructure a loop in window.c to avoid hitting an assert() following an OOM. dbsqlfuzz test case 6ef74a9659de87e9be3d8694ad062c448aa7ef1d. (check-in: [887c19a15b] user: dan branch: trunk, size: 105222)
13:56
[3c7135f2df] part of check-in [8e04f52e32] Earlier detection of OOM errors during window function processing. dbsqlfuzz b08676f5a0437552c95d2a5d7ef285f8c451ea35. (check-in: [8e04f52e32] user: drh branch: trunk, size: 105227)
12:50
[1bc737c35f] part of check-in [8d46df7313] Earlier detection and handling of OOM problems. dbsqlfuzz 39f2963ea5559aa3a16e24e0e3cb42aac85a7371. (check-in: [8d46df7313] user: drh branch: trunk, size: 105172)
2021-04-05
19:05
[038b6a0bea] part of check-in [7a19fed4f2] Do not allow floating point rounding errors to cause a window function xInverse() function to be invoked before the corresponding xStep() call. (check-in: [7a19fed4f2] user: dan branch: trunk, size: 105105)
2021-04-03
23:30
[547e7a0eee] part of check-in [35ff7cbf54] Improved robustness to OOM conditions in the window function logic. dbsqlfuzz 0c123f7d80b29beaafc8411c12129e46f7ffdac3. (check-in: [35ff7cbf54] user: drh branch: trunk, size: 104895)
2021-03-31
11:31
[32b03808af] part of check-in [8b681b274d] Ensure that negative numbers may not be used in frame offset clauses even if they are initially text value. e.g. (RANGE BETWEEN '-1' PRECEDING ...). (check-in: [8b681b274d] user: dan branch: trunk, size: 104856)
2021-03-06
14:46
[7e89ac4b6c] part of check-in [01eae68e85] Ensure the correct collation sequence is used for comparisons when delimiting a RANGE window. (check-in: [01eae68e85] user: dan branch: trunk, size: 104810)
2021-02-22
20:56
[fdf01316f6] part of check-in [dac51f303b] Allow WHERE terms to be pushed down into sub-queries that contain window functions, provided that the WHERE term is made up of entirely of constants and copies of expressions found in the PARTITION BY clauses of all window functions in the sub-query. (check-in: [dac51f303b] user: dan branch: window-functions-pushdown, size: 104678)
2020-08-10
14:18
[edd6f5e25a] part of check-in [9d670a3183] Fix harmless compiler warnings that surface in newer versions of GCC. (check-in: [9d670a3183] user: drh branch: trunk, size: 104522)
2020-07-29
16:18
[9967ce7583] part of check-in [a80ae2c98b] Dozens and dozens of typo fixes in comments. This change adds no value to the end product and is disruptive, so it is questionable whether or not it will ever land on trunk. (check-in: [a80ae2c98b] user: drh branch: typos, size: 104506)
2020-07-13
15:20
[0dec178bfa] part of check-in [e6c2192ef8] Fix a problem causing queries containing window functions to ignore collation sequences under some circumstances. (check-in: [e6c2192ef8] user: dan branch: trunk, size: 104504)
2020-07-10
21:43
[ddfe213547] part of check-in [1e87da9c93] Remove unnecessary code from the window functions implementation. (check-in: [1e87da9c93] user: drh branch: trunk, size: 104435)
2020-06-19
15:24
[dfeb672492] part of check-in [7a876209a6] Extend the refactoring into extensions. Clean up stray newlines. (check-in: [7a876209a6] user: drh branch: trunk, size: 104470)
2020-06-11
00:57
[88a63e6948] part of check-in [30c6d895b5] Provide the ability to use the SELECTTRACE() debugging macro outside of the select.c source file. Use this to add a new SELECTTRACE() entry in window.c for improved tracing of window-function parse-tree rewriting. (check-in: [30c6d895b5] user: drh branch: trunk, size: 104472)
2020-06-09
14:56
[ce5e05bb8f] part of check-in [9a4cc1dbf2] Crazy experimental change to refcount the AggInfo objects. (check-in: [9a4cc1dbf2] user: drh branch: refcount-agginfo, size: 104272)
2020-06-07
17:33
[7d19c08b62] part of check-in [7682d8a768] Alternative fix to ticket [c8d3b9f0a750a529]: Prior to deleting or modifying an Expr not that is referenced by an AggInfo, modify the AggInfo to get its own copy of the original Expr. (check-in: [7682d8a768] user: drh branch: persist-agginfo, size: 104351)
14:42
[db783f0347] part of check-in [c0d9dfe507] New debugging output. (check-in: [c0d9dfe507] user: drh branch: early-winfunc-rewrite-dev, size: 104990)
12:26
[2518a0fbae] part of check-in [a7c5c73992] Improvements to the treeview debugging display. (check-in: [a7c5c73992] user: drh branch: early-winfunc-rewrite-dev, size: 104745)
00:43
[0773dc6606] part of check-in [a6c2147cc6] Extra steps to ensure that queries that involve both window functions and aggregate functions are processed correctly by sqlite3WindowRewrite(). Fix for ticket [e5504e987e419fb0]. (check-in: [a6c2147cc6] user: drh branch: early-winfunc-rewrite-dev, size: 104734)
2020-06-06
19:35
[64a6f6a0df] part of check-in [8583c3483c] When determining if the subquery inserted by the window-function rewriter is an aggregate query, aggregate functions that are in parameters to another window function do not count. Fix for ticket [1f6f353b684fc708] (check-in: [8583c3483c] user: drh branch: early-winfunc-rewrite-dev, size: 104717)
14:44
[61b3a8ad91] part of check-in [2cddb24e91] When rewriting the parse-tree for window functions, ensure that the inserted subqueries have an accurate SF_Aggregate bit set. This change also coincidentally fixes ticket [0899cf62f597d7e7], even thought that was not the issue we were working on at the time. (check-in: [2cddb24e91] user: drh branch: early-winfunc-rewrite-dev, size: 104645)
2020-06-05
18:17
[4ecee2d2e8] part of check-in [c4072267dc] Assign a fake name to the ephemeral subquery tables that are created when making parse-tree changes for window functions. (check-in: [c4072267dc] user: drh branch: early-winfunc-rewrite-dev, size: 104361)
14:10
[a3846ac6d0] part of check-in [fe702aa08c] Move the parse tree rewrite for window functions earlier in the process, before sqlite3ExprAnalyzeAggregates() has run. Add new assert()s to verify that aggregate analysis always remains valid until the end of SELECT processing. (check-in: [fe702aa08c] user: drh branch: early-winfunc-rewrite, size: 104265)
2020-05-24
03:38
[66c5fd1e48] part of check-in [ad7bb70af9] When rewriting a query for window functions, if the rewrite changes the depth of TK_AGG_FUNCTION nodes, be sure to adjust the Expr.op2 field appropriately. Fix for ticket [7a5279a25c57adf1] (check-in: [ad7bb70af9] user: drh branch: trunk, size: 104273)
2020-05-11
10:55
[194fc16862] part of check-in [155e6649ef] Fix a problem handling constant integer expressions with collation sequences in PARTITION BY clauses. (check-in: [155e6649ef] user: dan branch: trunk, size: 103511)
2020-03-16
18:52
[ba1ffb78d7] part of check-in [38e3dd389d] Fix handling of window functions in aggregate queries that have no GROUP BY clause. Also remove a faulty assert causing the error reported in [618156e3]. (check-in: [38e3dd389d] user: dan branch: trunk, size: 103351)
2020-02-29
17:19
[0b824edbab] part of check-in [1e174ed0d2] Fix a problem with window functions occuring within sub-selects that are part of an OR term in a WHERE clause of the outer SELECT. (check-in: [1e174ed0d2] user: dan branch: trunk, size: 103268)
2020-01-09
20:11
[f8ba2ee12a] part of check-in [83dc55679a] Fix an assert() in window.c that could fail with some obscure SELECT statements that use window functions. Ticket [678ecf429f8d1a5f] (check-in: [83dc55679a] user: dan branch: trunk, size: 103096)
2020-01-01
20:17
[659d613248] part of check-in [ce14173252] Ensure that when code for a scalar SELECT featuring window functions is generated more than once by the planner, separate ephemeral tables are opened for each instance. (check-in: [ce14173252] user: dan branch: trunk, size: 102950)
2019-12-27
16:25
[87795bb829] part of check-in [99609786f4] Fix a problem with window functions in aggregate queries that do not have GROUP BY clauses. (check-in: [99609786f4] user: dan branch: trunk, size: 102876)
15:31
[c5c7da1a28] part of check-in [45c64d39d5] Do not mistake constant integers in a PARTITION BY expression for references to ORDER BY style references to values returned by the SELECT statement. (check-in: [45c64d39d5] user: dan branch: trunk, size: 102804)
2019-12-25
23:54
[a5b69ea3cd] part of check-in [fa58aad48a] When the sqlite3WindowRewrite() routine detects and error, have it convert the SELECT statement into just "SELECT null" so that it does not leave the parse tree in a goofy state that can cause problems with subsequent code before the stack has a chance to unwind and report the error. Ticket [d87336c81c7d0873] (check-in: [fa58aad48a] user: drh branch: trunk, size: 102764)
2019-12-19
20:37
[da01045591] part of check-in [e2bddcd4c5] When an error occurs while rewriting the parser tree for window functions in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Yongheng and Rui fuzzer. (check-in: [e2bddcd4c5] user: drh branch: trunk, size: 102518)
2019-12-18
00:05
[913a10696f] part of check-in [1ca0bd982a] When processing constant integer values in ORDER BY clauses of window definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable the constant value to avoid an invalid pointer dereference if the expression is ever duplicated. This fixes a crash report from Yongheng and Rui. (check-in: [1ca0bd982a] user: drh branch: trunk, size: 102358)
2019-11-23
16:34
[a77f12078d] part of check-in [d66f95a515] Abort the window function tree rewrite early following an OOM. (check-in: [d66f95a515] user: drh branch: trunk, size: 102266)
15:10
[35148e95bb] part of check-in [57070c68bb] Avoid evaluating PARTITION BY or ORDER BY expressions multiple times for window function queries that use multiple window functions with the same window-definition. (check-in: [57070c68bb] user: dan branch: trunk, size: 102165)
2019-11-16
11:33
[b5bed964a0] part of check-in [0adb273f7e] Fix a potential NULL pointer dereference on a RENAME TABLE that references a VIEW with a logic error in a window function in the ORDER BY clause. (check-in: [0adb273f7e] user: drh branch: trunk, size: 101873)
2019-11-14
13:24
[ea53cef29a] part of check-in [d0bc7db6b0] Ensure that the same subquery does not go through the window-function rewrite more than once, even when that subquery is part of a virtual table constraint that lacks the omit flag. (check-in: [d0bc7db6b0] user: drh branch: trunk, size: 101861)
2019-09-25
18:44
[064f251451] part of check-in [36d35dbd5a] Add a missing VdbeCoverage() macro. (check-in: [36d35dbd5a] user: drh branch: trunk, size: 101791)
17:47
[a1edfb8ab6] part of check-in [a19884455b] Remove an unused variable. (check-in: [a19884455b] user: drh branch: trunk, size: 101770)
16:41
[e8ef31a0b3] part of check-in [5fe15c1d83] Further simplifications to window-function code. (check-in: [5fe15c1d83] user: dan branch: trunk, size: 101846)
02:07
[49e97e3299] part of check-in [489a1eb3aa] Simplifications to the window-function code. (check-in: [489a1eb3aa] user: drh branch: trunk, size: 103357)
2019-09-24
20:20
[1dcacaeee2] part of check-in [040e196a8b] Bug fixes for window frames of the form (... RANGE BETWEEN b PRECEDING AND a PRECEDING) or (... RANGE a FOLLOWING AND b FOLLOWING) where (a > b). (check-in: [040e196a8b] user: dan branch: trunk, size: 103247)
2019-09-23
12:38
[af649dd062] part of check-in [f907395ef5] Omit the sqlite3IntTokens array constant for a code simplification. (check-in: [f907395ef5] user: drh branch: trunk, size: 100804)
2019-09-16
05:34
[bf055d1bae] part of check-in [ca564d4b5b] Fix a problem with processing CTEs that use a WINDOW clause. (check-in: [ca564d4b5b] user: dan branch: trunk, size: 100831)
2019-09-13
20:42
[2a10191a3e] part of check-in [4a1978814d] Fix a problem with using json1 window functions with an EXCLUDE clause. (check-in: [4a1978814d] user: dan branch: trunk, size: 100732)
17:05
[a35ad30913] part of check-in [af1bc20f50] Change the meaning of the SQLITE_SUBTYPE flag so that it indicates that the user-defined function cares about the subtypes of its arguments. (check-in: [af1bc20f50] user: dan branch: window-functions-subtype-fix2, size: 100400)
2019-09-07
18:20
[b85ce57741] part of check-in [6aa438ce41] Add the SQLITE_SUBTYPE flag, which can be passed to sqlite3_create_function() and similar to indicate to the core that a user function is likely to use sqlite3_result_subtype(). (check-in: [6aa438ce41] user: dan branch: window-functions-subtype-fix, size: 101108)
2019-09-04
06:56
[b1e56b1281] part of check-in [cb3e2be674] Fix handling of NULL, text and blob values in window queries that use "RANGE BETWEEN A FOLLOWING AND B FOLLOWING", or "B PRECEDING AND A PRECEDING", where A>B. (check-in: [cb3e2be674] user: dan branch: trunk, size: 99794)
2019-08-30
19:45
[96b0c033d3] part of check-in [2925bfa597] Add test case to window8.test. Also fix an error in a comment in window.c. (check-in: [2925bfa597] user: dan branch: trunk, size: 99765)
18:02
[9f55b65411] part of check-in [596ac2a4ea] Back out the change at [47cd634c98b502d4] which was incorrect. Add a test case so that we don't accidently back out that change again. (check-in: [596ac2a4ea] user: drh branch: trunk, size: 99765)
17:28
[ff37ca403a] part of check-in [900464567b] Add further comments to window.c. (check-in: [900464567b] user: dan branch: trunk, size: 99709)
16:14
[701bea9909] part of check-in [39b4cad4a5] Fix a bug in RANGE window functions that use "ORDER BY <expr> DESC NULLS FIRST" as the window-frame ORDER BY clause. (check-in: [39b4cad4a5] user: dan branch: trunk, size: 96719)
2019-08-29
16:17
[7d74882b41] part of check-in [47cd634c98] Remove an unreachable branch in the NULLS LAST logic of RANGE window functions. (check-in: [47cd634c98] user: drh branch: trunk, size: 93563)
2019-08-21
19:58
[3ea716bb0d] part of check-in [b1cbcdc6eb] Add missing VdbeCoverage() macros to new code. (check-in: [b1cbcdc6eb] user: dan branch: nulls-last, size: 93596)
2019-08-19
19:59
[94dccce056] part of check-in [75d665a494] Fix problems with window frames that use ORDER BY ... NULLS LAST etc. (check-in: [75d665a494] user: dan branch: nulls-last, size: 93508)
2019-08-17
15:47
[331cdac499] part of check-in [db1e60800b] Merge trunk changes into this branch. (check-in: [db1e60800b] user: dan branch: nulls-last, size: 92807)
2019-08-15
13:53
[07e1c15081] part of check-in [4f5b2d9381] Ensure that SQLite does not attempt to process incompatible window functions in a single scan. Fix for [256741a1]. (check-in: [4f5b2d9381] user: dan branch: trunk, size: 92769)
2019-08-12
16:36
[4d56fc1e3d] part of check-in [07babb0f89] Experimental implementation of NULLS FIRST/LAST. This branch still has problems - the most significant of which is that ORDER BY clauses with a non-default NULLS FIRST/LAST qualifier can never use an index. (check-in: [07babb0f89] user: dan branch: nulls-last, size: 92148)
2019-08-07
17:45
[98b2571c66] part of check-in [8158d2aca6] Eliminate some more cases of redundant sorting in window-function queries. (check-in: [8158d2aca6] user: dan branch: trunk, size: 92110)
2019-08-06
14:37
[89778546ec] part of check-in [e8234f6939] Use 0x40 (ASCII '@') instead of 0x00 to mean "no affinity" so that columns with no affinity can appear in a zero-terminated string. Use the new SQLITE_AFF_NONE macro for this new magic number. (check-in: [e8234f6939] user: drh branch: pending, size: 91973)
2019-08-05
19:44
[773d7f89e4] part of check-in [7480db307c] Fix the patch on this branch so that it works with sub-queries, as well as views. (check-in: [7480db307c] user: dan branch: tkt-61c853-A, size: 91959)
19:32
[8da008a1a6] part of check-in [09cd0c0c6e] One of two options on how to address ticket [61c853857f40da49]. In this mode, we back out the documentation change of [07b7749da88d54e5] and change the core to work as it has been documented to work since 2017, rather than how it has actually worked since 2009. (check-in: [09cd0c0c6e] user: drh branch: tkt-61c853-A, size: 91973)
2019-07-22
19:01
[7728ba7a3d] part of check-in [e46b2afc99] Consolidate the removal of Window objects from the Select.pWin list into a single subroutine. (check-in: [e46b2afc99] user: drh branch: trunk, size: 91956)
16:20
[2c958b4bdc] part of check-in [d23f331682] Remove Window objects from the corresponding Select.pWin list when they are deleted. (check-in: [d23f331682] user: dan branch: winfunc-in-orderby, size: 91760)
2019-07-19
01:25
[79a3c9a952] part of check-in [ce6bf395e2] Fix a new problem in the BETWEEN operator when applied to a window function. The problem was introduced yesterday by check-in [7ef7b23cbb1b9ace]. This cherry-pick also needed to remove an assert from sqliteExprDelete(). (check-in: [ce6bf395e2] user: drh branch: branch-3.29, size: 91597)
01:11
[cdce0114be] part of check-in [47e23064ba] Fix a new problem in the BETWEEN operator when applied to a window function. The problem was introduced yesterday by check-in [7ef7b23cbb1b9ace]. (check-in: [47e23064ba] user: drh branch: trunk, size: 91644)
2019-07-16
19:44
[e0b821aa28] part of check-in [9e66458592] Add new assert() statements in an attempt to help static analyzers avoid false-positives. (check-in: [9e66458592] user: drh branch: trunk, size: 91606)
2019-07-13
16:22
[6cfb1b3c82] part of check-in [5dac8c38df] Rework the FILTER clause implementation to share more code with window functions. (check-in: [5dac8c38df] user: dan branch: filter-clause, size: 91514)
09:56
[1d78310e65] part of check-in [86ab963cc5] Merge latest trunk changes into this branch. (check-in: [86ab963cc5] user: dan branch: filter-clause, size: 91562)
2019-07-08
12:01
[3408c0f606] part of check-in [28196d894a] Ensure collation sequences and affinities work in window function queries. Fix for [9ece23d2]. (check-in: [28196d894a] user: dan branch: trunk, size: 91559)
2019-07-02
11:56
[c595e25052] part of check-in [1f1ae2d6ac] Experimental implementation of FILTER clause for aggregate functions. (check-in: [1f1ae2d6ac] user: dan branch: filter-clause, size: 91186)
2019-05-10
14:26
[5be2cf7d87] part of check-in [7e4809eadf] Treat integer values in window definition ORDER BY clauses as constants, not as references to another expression. (check-in: [7e4809eadf] user: dan branch: trunk, size: 91183)
2019-04-03
16:27
[038c248267] part of check-in [39225cc775] Fix a couple of problems with "RANGE BETWEEN <expr> PRECEDING AND <expr> PRECEDING" frames. (check-in: [39225cc775] user: dan branch: trunk, size: 91002)
2019-04-02
17:45
[1c3e20fc23] part of check-in [bc0fb1c324] Use a separate bit on db->dbOptFlags to disable the xInverse optimization on window functions, rather than reusing the query-flattener disable bit. (check-in: [bc0fb1c324] user: drh branch: trunk, size: 90541)
2019-04-01
16:23
[aefd7e4511] part of check-in [fa37cf9a6a] Frame range comparisons can never be NULL because the values will have been checked for NULL prior to the test. (check-in: [fa37cf9a6a] user: drh branch: trunk, size: 90545)
15:55
[8d840b83ec] part of check-in [a69bb4f257] Mark rowid-comparison opcodes as never-null for VDBE coverage tracking purposes. (check-in: [a69bb4f257] user: drh branch: trunk, size: 90477)
14:30
[76a3a9bea5] part of check-in [f56d305a7b] Improved VDBE branch coverage in the run-time frame-spec error detection logic of window functions. (check-in: [f56d305a7b] user: drh branch: trunk, size: 90450)
2019-03-31
18:17
[bd1e1c2674] part of check-in [d03b611302] Add some missing VdbeCoverage() macros. (check-in: [d03b611302] user: drh branch: trunk, size: 90290)
2019-03-30
20:37
[a63ef839f4] part of check-in [b5f72f10f2] Fix issues with the previous check-in and add more VDBE branch coverage testing macros. (check-in: [b5f72f10f2] user: drh branch: oops, size: 90291)
20:10
[30cbf5f442] part of check-in [f24066f8dd] Enhanced VdbeCoverage() macros in the new windows function code. Later: This check-in causes an assertion fault. (check-in: [f24066f8dd] user: drh branch: oops, size: 89988)
2019-03-28
13:03
[92b6d593a6] part of check-in [ec2f207ded] Improved TreeView display of Window objects. Change the Window.eType field to Window.eFrmType to avoid confusion with other "eType" values. (check-in: [ec2f207ded] user: drh branch: trunk, size: 89815)
2019-03-27
14:58
[2e3fdb046d] part of check-in [5be64ea8e3] Fix harmless compiler warnings seen with MSVC. (check-in: [5be64ea8e3] user: mistachkin branch: trunk, size: 89697)
2019-03-26
16:47
[adddab66ab] part of check-in [7927b6b023] Fix a problem with window frames that use "BETWEEN <start> AND 0 PRECEDING". (check-in: [7927b6b023] user: dan branch: trunk, size: 89689)
16:21
[ff72295b17] part of check-in [a063f7c426] Fix harmless compiler warnings. (check-in: [a063f7c426] user: drh branch: trunk, size: 89215)
2019-03-21
13:51
[9849eee7e9] part of check-in [c7b336181a] Remove assert() statements based on the counter-factual proposition that 0 is not a valid cursor number. (check-in: [c7b336181a] user: dan branch: window-functions, size: 89080)
2019-03-19
19:19
[bcf909b9ac] part of check-in [e025506379] Fix a problem with EXCLUDE clauses on window frames with no ORDER BY. (check-in: [e025506379] user: dan branch: window-functions, size: 89144)
16:49
[9a86043291] part of check-in [4f9b93e6cf] Add missing VdbeCoverage() macros to new code in window.c. (check-in: [4f9b93e6cf] user: dan branch: window-functions, size: 89013)
11:56
[bd0a1267df] part of check-in [c02f77b1b4] Revert the OP_MustBeInt opcode implementation on this branch so that it again matches trunk. The extra functionality is no longer required. (check-in: [c02f77b1b4] user: dan branch: window-functions, size: 88475)
2019-03-18
21:19
[76d83479ab] part of check-in [1fbddf01b1] Add further tests for new window function functionality. (check-in: [1fbddf01b1] user: dan branch: window-functions, size: 88243)
18:55
[ff735851ee] part of check-in [2879a691ac] Always evaluate window functions using the alternative path usually only used by EXCLUDE frames if the SQLITE_QueryFlattener test flag is set. (check-in: [2879a691ac] user: dan branch: window-functions, size: 88230)
16:51
[aa50be1fc0] part of check-in [723c84be3e] Fixes for RANGE windows and NULL values. (check-in: [723c84be3e] user: dan branch: window-functions, size: 87324)
2019-03-16
20:29
[3c13b17c47] part of check-in [cebe09e11c] Fix problems with RANGE windows and string, blob and NULL values. (check-in: [cebe09e11c] user: dan branch: window-functions, size: 87325)
10:15
[58c0e510d1] part of check-in [f2d5f7a24c] In order to identify the first row of each partition, check if the rowid in the ephemeral table is 1 instead of using a dedicated flag register. (check-in: [f2d5f7a24c] user: dan branch: window-functions, size: 86734)
2019-03-15
20:46
[d4124c8aff] part of check-in [9b43c3ee2e] Implement the EXCLUDE clause for window frames. (check-in: [9b43c3ee2e] user: dan branch: window-functions, size: 86852)
2019-03-14
20:53
[5b103f63d7] part of check-in [d03c7533a1] Parse EXCLUDE clauses in window frames. They do not yet work. (check-in: [d03c7533a1] user: dan branch: window-functions, size: 84727)
16:36
[8b3081e3fe] part of check-in [7d66cd2013] Add things to this branch that will be required to support the EXCLUDE clause. (check-in: [7d66cd2013] user: dan branch: window-functions, size: 84657)
2019-03-13
17:20
[218582db17] part of check-in [180be26623] Avoid allocating excessive registers for the PARTITION BY expressions when processing window functions. (check-in: [180be26623] user: dan branch: window-functions, size: 81274)
15:29
[e05db1c668] part of check-in [6ad5531920] Remove rows from the ephemeral table used by window functions once they are no longer required. (check-in: [6ad5531920] user: dan branch: window-functions, size: 81443)
08:28
[ac687a0551] part of check-in [b1322ffb6e] Minor optimization in sqlite3WindowCodeStep(). (check-in: [b1322ffb6e] user: dan branch: window-functions, size: 80131)
2019-03-12
18:28
[536bc80552] part of check-in [25ff7091cb] Allow real values to be used in PRECEDING and FOLLOWING expressions for RANGE window frames. (check-in: [25ff7091cb] user: dan branch: window-functions, size: 79947)
15:21
[4763c2e81e] part of check-in [5129bcc996] Expand on header comment for sqlite3WindowCodeStep(). Further simplify the implementation of the same. (check-in: [5129bcc996] user: dan branch: window-functions, size: 79538)
2019-03-11
19:50
[f41e0b36e6] part of check-in [0812635383] Remove "cache mode" from the window frame code generator. Handle the same cases by editing the window frame specification itself. (check-in: [0812635383] user: dan branch: window-functions, size: 74975)
18:17
[ca0d94d256] part of check-in [6bd1a07949] Simplify the windows frame code some. Add a comment explaining some of the VM code generated by sqlite3WindowCodeStep(). (check-in: [6bd1a07949] user: dan branch: window-functions, size: 76436)
11:12
[199efb1a01] part of check-in [e7bced731a] Fix problems with "RANGE ... ORDER BY <expr> DESC" window frames. (check-in: [e7bced731a] user: dan branch: window-functions, size: 71310)
2019-03-09
20:49
[bbdf43afee] part of check-in [ffc32b246d] Add support for RANGE window frames. Some cases still do not work. (check-in: [ffc32b246d] user: dan branch: window-functions, size: 71011)
2019-03-08
20:02
[e2e56938f0] part of check-in [954bf36993] Finish consolidation of window frame code. Add untested support for GROUPS frames. (check-in: [954bf36993] user: dan branch: window-functions, size: 67905)
2019-03-07
20:47
[fd7eae2b52] part of check-in [a5f68f6647] Fix other "ROWS BETWEEN" cases on this branch. (check-in: [a5f68f6647] user: dan branch: window-functions, size: 81459)
19:26
[00962a6b34] part of check-in [093d2b25f1] Modify new window functions function so that cursors are stepped immediately after each operation, instead of immediately before. (check-in: [093d2b25f1] user: dan branch: window-functions, size: 90849)
2019-03-06
21:04
[0625771585] part of check-in [45cbd3b449] Simplify the window function code generator some more. (check-in: [45cbd3b449] user: dan branch: window-functions, size: 90377)
17:12
[607664ea22] part of check-in [e8eee566df] Improvements to the way built-in window functions are handled. (check-in: [e8eee566df] user: dan branch: window-functions, size: 89053)
2019-03-05
19:29
[d722f9b0cb] part of check-in [af0ea13635] Extend windowCodeStep() to handle any ROWS PRECEDING/FOLLOWING frame specification. (check-in: [af0ea13635] user: dan branch: window-functions, size: 87440)
2019-03-04
21:07
[b2316f6082] part of check-in [e7a91f1228] Support some "ROWS BETWEEN N PRECEDING AND M FOLLOWING" window functions without caching entire partitions. (check-in: [e7a91f1228] user: dan branch: window-functions, size: 84209)
2019-02-16
17:27
[a96e58c91e] part of check-in [c155125fd5] Add support for chaining of WINDOW definitions. (check-in: [c155125fd5] user: dan branch: window-functions, size: 77750)
2019-01-27
02:41
[df2456386e] part of check-in [0ea05a0eb9] Window functions that can abort should indicate this, so that if they are used in DML statement, a statement journal will be used. (check-in: [0ea05a0eb9] user: drh branch: trunk, size: 75489)
2019-01-26
16:34
[c59090ba8a] part of check-in [d536be698d] Roll back the transaction if a write statement fails with OE_Abort but there is no open statement transaction. (check-in: [d536be698d] user: dan branch: rollback-abort, size: 75522)
2019-01-17
15:40
[1f4f7c69f2] part of check-in [df08d472b0] Revamp the SrcList allocator routines to be methods of Parse instead of being methods of the "sqlite3" object, so that they can leave better error messages when the SrcList object grows too large. (check-in: [df08d472b0] user: drh branch: trunk, size: 75462)
2019-01-16
12:05
[5950fb4dd9] part of check-in [d45bee36f2] Avoid a dangling pointer comparison when renaming a table that has a trigger that itself contains a window function with an (illegal) column reference in a FOLLOWING expression. (check-in: [d45bee36f2] user: dan branch: trunk, size: 75501)
2018-12-29
02:26
[f4a9ac8396] part of check-in [4a0929ac76] A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewer memory allocations by deferring memory allocation until sqlite3VdbeResolveLabel() is called, at which point the code generator has a better idea of how big the relocation table needs to be. The sqlite3VdbeMakeLabel() routine now takes a Parse* parameter instead of Vdbe*. (check-in: [4a0929ac76] user: drh branch: trunk, size: 75435)
2018-12-06
22:04
[ea81ecd031] part of check-in [940174543e] Fix the sqlite3ExprDup() routine so that it makes complete duplications of subqueries containing window functions. (check-in: [940174543e] user: drh branch: ticket-f09fcd17810f, size: 75400)
2018-10-23
13:48
[6550e2850e] part of check-in [059ff53a46] Fix a problem with using window functions in compound (UNION, INTERSECT etc.) queries. (check-in: [059ff53a46] user: dan branch: trunk, size: 75370)
2018-09-20
19:02
[a28d8d42c5] part of check-in [ad130bb86e] Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a new EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer. This reduces the size of the Expr object by 8 bytes, reduces the overall amount of code, and shaves over 1 million cycles off of the speed test. (check-in: [ad130bb86e] user: drh branch: trunk, size: 75354)
2018-07-27
23:33
[4b503da928] part of check-in [02204f8b24] Improvements to the parser to increase coverage. Fix the parser so that at least one expresssion is required after PARTITION BY and within the list of expressions on VALUES(). (check-in: [02204f8b24] user: drh branch: trunk, size: 75249)
2018-07-11
03:27
[c61434ce7e] part of check-in [b170c0092b] Adjustments to VdbeCoverage macros to deal with byte-code branches that can never be taken in some directions. (check-in: [b170c0092b] user: drh branch: trunk, size: 75070)
2018-07-10
23:31
[59a256d217] part of check-in [94ac51cc4e] Remove incorrect ALWAYS() macros from the window function logic. (check-in: [94ac51cc4e] user: drh branch: trunk, size: 75033)
22:24
[f0ff13192d] part of check-in [f7c239e959] Add VdbeModuleComment()s on the three main code generators for window functions. (check-in: [f7c239e959] user: drh branch: trunk, size: 75581)
20:50
[ba6d7cf7f4] part of check-in [f2057542cf] Minor comment changes. Add ALWAYS() macros on some unreachable branches in the xStep() methods of built-in window functions. (check-in: [f2057542cf] user: drh branch: trunk, size: 75390)
17:26
[8d53b61782] part of check-in [687fe532c2] Fix a problem with using scalar sub-selects in window function queries. (check-in: [687fe532c2] user: dan branch: trunk, size: 74780)
17:10
[74d56384a0] part of check-in [76e42b7071] Further improvements to bytecode branch testing. Fix cases where the macros said a branch could not be taken when in fact it could be. Alter some window function branch coverage macros to indicate that comparison operands cannot be NULL. (check-in: [76e42b7071] user: drh branch: trunk, size: 73862)
05:11
[df2bc08168] part of check-in [a9a307265b] New VDBE comments and coverage macros. (check-in: [a9a307265b] user: drh branch: trunk, size: 73808)
2018-07-09
22:49
[60b374948d] part of check-in [5023b1b85b] Fixes for various harmless compiler warnings. (check-in: [5023b1b85b] user: drh branch: trunk, size: 73466)
17:33
[0d5d4bcddd] part of check-in [8fdaf3f37e] Remove redundant branches in window function processing. (check-in: [8fdaf3f37e] user: drh branch: trunk, size: 72945)
13:31
[a3f2de2ff8] part of check-in [1a06e57a0b] Throw an error if the second argument passed to nth_value() is not a positive integer. (check-in: [1a06e57a0b] user: dan branch: trunk, size: 72915)
06:51
[fcc7f6febe] part of check-in [fe8aaf0c80] Fix a bad assert() in window.c. (check-in: [fe8aaf0c80] user: dan branch: trunk, size: 72648)
2018-07-08
01:02
[e42415fb8d] part of check-in [410e13b0e0] Identify specific FuncDef objects for window functions using the pointer to the function name (FuncDef.zName) rather than the pointer to the xStep method. This allows xStep method pointer to be replaced with a single noopStepFunc() procedure, and thus save having lots of different no-op step functions. (check-in: [410e13b0e0] user: drh branch: trunk, size: 72559)
2018-07-07
17:38
[0ff9000757] part of check-in [63f4d306ba] Add missing VdbeCoverage() macro to window.c. (check-in: [63f4d306ba] user: dan branch: trunk, size: 71946)
17:30
[635b5beae6] part of check-in [b76f35b092] Fix a problem with the handling of NULL values in the min() window function. (check-in: [b76f35b092] user: dan branch: trunk, size: 71927)
2018-07-06
17:19
[0e127e916e] part of check-in [927b95a081] Try to improve the error messages for misformed frame specifications in window definitions. (check-in: [927b95a081] user: drh branch: trunk, size: 71798)
14:31
[b681846aee] part of check-in [a6dffecc6b] Also disallow non-constant expressions in "<expr> PRECEDING" or "<expr> FOLLOWING" clauses. (check-in: [a6dffecc6b] user: dan branch: trunk, size: 70320)
14:15
[8f977b355d] part of check-in [0f3f8fcde1] Ensure an error is returned if the user specifies an unsupported frame type. (check-in: [0f3f8fcde1] user: dan branch: trunk, size: 70214)
13:25
[5bb6f30580] part of check-in [443f0c286f] Remove some bad assert() statements from the implementations of window functions percent_rank() and cume_dist(). (check-in: [443f0c286f] user: dan branch: trunk, size: 69591)
07:42
[6f58bfcd55] part of check-in [d59bcc8eea] Return an error if DISTINCT is used with a window-function (e.g. "count(DISTINCT <expr>) OVER (...)"). (check-in: [d59bcc8eea] user: dan branch: trunk, size: 69701)
2018-07-05
21:22
[5182740121] part of check-in [fa65380509] Use separate opcodes, OP_AggValue and OP_AggInverse, for the new callbacks associated with Window Functions, for improved readability of EXPLAIN output. (check-in: [fa65380509] user: drh branch: trunk, size: 69560)
18:34
[00df6e1bb8] part of check-in [786c87ba41] Return an error if a "RANGE" window-frame uses "<expr> PRECEDING" or "<expr> FOLLOWING". (check-in: [786c87ba41] user: dan branch: trunk, size: 69506)
2018-07-02
12:07
[7df0313f9b] part of check-in [4f3c8a82fd] Fix a segfault caused by invoking a regular aggregate as a window-function. And some problems with count(*) when used as a window-function. (check-in: [4f3c8a82fd] user: dan branch: trunk, size: 69308)
2018-06-27
20:24
[4403ae36b9] part of check-in [4383cb68a1] Add missing VdbeCoverage() and VdbeCoverageNeverTaken() macros to window.c. (check-in: [4383cb68a1] user: dan branch: exp-window-functions, size: 69097)
19:48
[14c64e0717] part of check-in [336de43a47] Avoid redundant ORDER BY operations when rewriting SELECT statements that contain window functions. (check-in: [336de43a47] user: dan branch: exp-window-functions, size: 68305)
2018-06-22
20:51
[b444259848] part of check-in [5f04b01646] Omit all window-function related code when building with SQLITE_OMIT_WINDOWFUNC. (check-in: [5f04b01646] user: dan branch: exp-window-functions, size: 67946)
17:57
[b4a22460e4] part of check-in [ebe65b2386] Merge latest trunk changes. (check-in: [ebe65b2386] user: dan branch: exp-window-functions, size: 67878)
2018-06-21
19:20
[358312db1c] part of check-in [b84fbf16ea] Fix a problem with handling single row partitions in the percent_rank() window function. (check-in: [b84fbf16ea] user: dan branch: exp-window-functions, size: 67933)
2018-06-20
09:23
[79be282a36] part of check-in [f41b6b7317] Add tests to improve coverage of code in window.c. Fix a problem with "SELECT row_number() OVER ()". (check-in: [f41b6b7317] user: dan branch: exp-window-functions, size: 67935)
2018-06-18
20:34
[32a747702e] part of check-in [943bccd2a6] Fix problems with using window functions in CREATE VIEW statements. (check-in: [943bccd2a6] user: dan branch: exp-window-functions, size: 66762)
16:55
[7cd40b8540] part of check-in [da03fb4318] Add new API function sqlite3_create_window_function(), for creating new aggregate window functions. (check-in: [da03fb4318] user: dan branch: exp-window-functions, size: 66277)
2018-06-15
20:46
[d80ec07161] part of check-in [ac251f7260] Add extra OOM test. (check-in: [ac251f7260] user: dan branch: exp-window-functions, size: 66769)
19:01
[ffc0a18a6e] part of check-in [fadd4dc119] Fix another problem in lead()/lag(). And some errors that could occur following OOM faults. (check-in: [fadd4dc119] user: dan branch: exp-window-functions, size: 66848)
16:10
[3c94dfffdf] part of check-in [3839fb18f9] Fix a bug in the lead() and lag() window functions causing them to fail when used in queries featuring multiple window functions. (check-in: [3839fb18f9] user: dan branch: exp-window-functions, size: 66628)
2018-06-14
20:52
[8d9999b2dd] part of check-in [567e09ef2a] Fix a problem with handling of statements containing two or more different windows. (check-in: [567e09ef2a] user: dan branch: exp-window-functions, size: 66641)
19:06
[3fc03f5ac2] part of check-in [43eb1e75a4] Fix problem with window functions min() and max() when used with a PARTITION clause and a frame starting point other than "UNBOUNDED PRECEDING". (check-in: [43eb1e75a4] user: dan branch: exp-window-functions, size: 66647)
14:27
[0a6b366a33] part of check-in [bb915854d4] Improve comments and code legibility in new file window.c. (check-in: [bb915854d4] user: dan branch: exp-window-functions, size: 66049)
2018-06-13
20:29
[4a26ff629a] part of check-in [c34f31dbd7] Fix problems with "RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING" window frames. (check-in: [c34f31dbd7] user: dan branch: exp-window-functions, size: 63100)
2018-06-12
20:53
[45d149fe99] part of check-in [6413e38a17] Fix another issue to do with window-functions in aggregate queries. (check-in: [6413e38a17] user: dan branch: exp-window-functions, size: 60366)
18:40
[5fc1e9a436] part of check-in [fe7081e095] Fix some problems with using window-functions in aggregate queries. (check-in: [fe7081e095] user: dan branch: exp-window-functions, size: 58282)
2018-06-11
20:50
[a5ebf5b119] part of check-in [0cd55e98a4] Clarify the relationship between a Window object and its associated Expr. (check-in: [0cd55e98a4] user: dan branch: exp-window-functions, size: 53353)
18:16
[0519e5a03e] part of check-in [b6d9c7eda8] Fix handling of window frames containing negative number of rows. e.g. "ROWS x PRECEDING AND y PRECEDING" where (x<y). (check-in: [b6d9c7eda8] user: dan branch: exp-window-functions, size: 53729)
2018-06-09
17:43
[72c08229b5] part of check-in [ceaf798ea0] Add support for FILTER clause on aggregate window functions. (check-in: [ceaf798ea0] user: dan branch: exp-window-functions, size: 52677)
2018-06-08
20:58
[31bd22def2] part of check-in [19c983b511] Add support for the WINDOW clause. (check-in: [19c983b511] user: dan branch: exp-window-functions, size: 51813)
16:11
[141a79da0f] part of check-in [236cb75bd1] Do not flatten sub-queries that contain window functions. (check-in: [236cb75bd1] user: dan branch: exp-window-functions, size: 51037)
2018-06-07
20:08
[4a476f74f1] part of check-in [ef34207073] Add window functions lag() and lead(). (check-in: [ef34207073] user: dan branch: exp-window-functions, size: 50198)
17:45
[c48dd2d726] part of check-in [060b264028] Add support for window function first_value(). (check-in: [060b264028] user: dan branch: exp-window-functions, size: 48009)
15:54
[7a79e54c37] part of check-in [63002b9a09] Fix problems with the nth_value() function. (check-in: [63002b9a09] user: dan branch: exp-window-functions, size: 47343)
2018-06-06
20:51
[1da8978def] part of check-in [eb1fb420ac] Add implementation of nth_value() window function. (check-in: [eb1fb420ac] user: dan branch: exp-window-functions, size: 47403)
2018-06-05
16:16
[7f9f2c8a89] part of check-in [2493ce1a40] Add implementation of last_value() window function. (check-in: [2493ce1a40] user: dan branch: exp-window-functions, size: 44836)
2018-06-04
18:55
[ea479ab9cf] part of check-in [3f093f608c] Add implementation of window function ntile(). (check-in: [3f093f608c] user: dan branch: exp-window-functions, size: 43268)
08:22
[0a6bc6bd75] part of check-in [76543f7dd3] Add support for window function cume_dist(). Improve tests for percent_rank(). (check-in: [76543f7dd3] user: dan branch: exp-window-functions, size: 41392)
2018-06-02
21:04
[014c6c7ae0] part of check-in [91c1cb7a21] Add support for window functions row_number(), rank(), dense_rank() and percent_rank(). (check-in: [91c1cb7a21] user: dan branch: exp-window-functions, size: 40618)
2018-06-01
21:00
[59f519e209] part of check-in [b5b18f6613] Allow an entire partition to be cached in a temp table for all types of window frames. This is required by nth_value() and others. (check-in: [b5b18f6613] user: dan branch: exp-window-functions, size: 29537)
2018-05-30
20:44
[1f2b1590db] part of check-in [c16125a884] Allow min() and max() to be used as window functions. (check-in: [c16125a884] user: dan branch: exp-window-functions, size: 24074)
2018-05-28
18:30
[9877f4e19a] part of check-in [e74c6e9185] Further window frame tests and fixes. (check-in: [e74c6e9185] user: dan branch: exp-window-functions, size: 21723)
2018-05-26
21:17
[e613228176] part of check-in [2c85668a0f] More fixes for different window frame types. (check-in: [2c85668a0f] user: dan branch: exp-window-functions, size: 21553)
2018-05-25
20:30
[793ad5ffe2] part of check-in [b4e9c68669] Fix "RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING" window frame processing. (check-in: [b4e9c68669] user: dan branch: exp-window-functions, size: 21397)
09:29
[4f9f7ceffb] part of check-in [5ac44872fd] Fixes for "ROWS BETWEEN <expr> FOLLOWING AND <expr> FOLLOWING" and "ROWS BETWEEN <expr> FOLLOWING AND UNBOUNDED FOLLOWING" (check-in: [5ac44872fd] user: dan branch: exp-window-functions, size: 19281)
2018-05-24
21:10
[e4441e8ee3] part of check-in [7b709a989c] Allow "<expr> PRECEDING" to be used to specify the end of a window frame. (check-in: [7b709a989c] user: dan branch: exp-window-functions, size: 18828)
17:49
[dc58ad62f2] part of check-in [ec7b648c7f] Support other frame types that use "<expr> PRECEDING" or "<expr> FOLLOWING" as start or end conditions. (check-in: [ec7b648c7f] user: dan branch: exp-window-functions, size: 17806)
2018-05-23
20:55
[1313e941d1] part of check-in [3a203660f1] Add support for "ROWS BETWEEN <expr> PRECEDING AND <expr> FOLLOWING" window frames. (check-in: [3a203660f1] user: dan branch: exp-window-functions, size: 16908)
2018-05-22
20:35
[37eb02c2af] part of check-in [16168146b2] Add comments to window.c describing how other window frames will be implemented. (check-in: [16168146b2] user: dan branch: exp-window-functions, size: 10464)
2018-05-21
19:45
[da24f2e57a] part of check-in [bc4b81d60d] Begin adding support for more esoteric window frames. (check-in: [bc4b81d60d] user: dan branch: exp-window-functions, size: 8632)
2018-05-17
19:24
[33d3751eb1] part of check-in [c9f0f14094] Evaluate multiple window functions in a single pass if they use the same window definition. Add xValue callbacks for other built-in aggregate functions. (check-in: [c9f0f14094] user: dan branch: exp-window-functions, size: 1849)
2018-05-16
20:58
Added: [33cc7de721] part of check-in [3781e52085] Start of experimental implementation of SQL window functions. Does not yet work. (check-in: [3781e52085] user: dan branch: exp-window-functions, size: 1276)