aboutsummaryrefslogtreecommitdiff
path: root/src/window.c
Commit message (Collapse)AuthorAge
...
* Fix a couple of problems with "RANGE BETWEEN <expr> PRECEDING AND <expr> ↵dan2019-04-03
| | | | | PRECEDING" frames. FossilOrigin-Name: 39225cc77579896214dceb93b7f224b4b3bc95b3505a2e19b41b0b18b184fbc4
* Use a separate bit on db->dbOptFlags to disable the xInverse optimization ondrh2019-04-02
| | | | | window functions, rather than reusing the query-flattener disable bit. FossilOrigin-Name: bc0fb1c324be2fd668bc4398c7d364b7e3c5a98537fe5fb58a125b66f3e6d041
* Frame range comparisons can never be NULL because the values will havedrh2019-04-01
| | | | | been checked for NULL prior to the test. FossilOrigin-Name: fa37cf9a6aa3e4325674cb6af68f617d25e349c3f694d0117a19a36fc42daf15
* Mark rowid-comparison opcodes as never-null for VDBE coverage trackingdrh2019-04-01
| | | | | purposes. FossilOrigin-Name: a69bb4f257500e40ef4056d5628ef25266def5bcef07eebdb471a79fffe80237
* Improved VDBE branch coverage in the run-time frame-spec error detectiondrh2019-04-01
| | | | | logic of window functions. FossilOrigin-Name: f56d305a7bad6608d51d8c8cef417ddb66cff50f0a75d28554ea669e47f3d90d
* Add some missing VdbeCoverage() macros.drh2019-03-31
| | | FossilOrigin-Name: d03b611302f68483770d49b113b4ed685ba03526d2007647c306f8ec7ae697d2
* Fix issues with the previous check-in and add more VDBE branch coveragedrh2019-03-30
| | | | | testing macros. FossilOrigin-Name: b5f72f10f2dfdbee9fe98c63ffb933e841203790746a920b99df14ca5c14127c
* Enhanced VdbeCoverage() macros in the new windows function code.drh2019-03-30
| | | FossilOrigin-Name: f24066f8dd847dfb656f26c4a8142e7fb6a412ffe325aea6254cb122cfbb3e1c
* Improved TreeView display of Window objects.drh2019-03-28
| | | | | | Change the Window.eType field to Window.eFrmType to avoid confusion with other "eType" values. FossilOrigin-Name: ec2f207dedb223077bbd3e4584499250eb12219712c917e930acccfa2c46e23b
* Fix harmless compiler warnings seen with MSVC.mistachkin2019-03-27
| | | FossilOrigin-Name: 5be64ea8e33f632f9c337feac9b0663d8e6e59fc9a71e5d832d9fd905c06458e
* Fix a problem with window frames that use "BETWEEN <start> AND 0 PRECEDING".dan2019-03-26
| | | FossilOrigin-Name: 7927b6b023502e990d23f30251b5b0918b547726b863bfb6747dcd7f1f71d19a
* Fix harmless compiler warnings.drh2019-03-26
| | | FossilOrigin-Name: a063f7c426d1ac066bf05cc03288f49b1c92e06a8cb2bc271cce9bd3022a74ea
* Remove assert() statements based on the counter-factual proposition that 0 ↵dan2019-03-21
| | | | | is not a valid cursor number. FossilOrigin-Name: c7b336181aac6785a515f275c0f50ad4bf2dee20abde959b56d968a7fdce3e5b
* Fix a problem with EXCLUDE clauses on window frames with no ORDER BY.dan2019-03-19
| | | FossilOrigin-Name: e0255063799a2a8531f0eaa8790334509591a5ababc5b915035b46d2faa80363
* Add missing VdbeCoverage() macros to new code in window.c.dan2019-03-19
| | | FossilOrigin-Name: 4f9b93e6cfa0b3b6ab8a126299c2b2a242f840453dc450e84d3df87576cf6cf8
* Revert the OP_MustBeInt opcode implementation on this branch so that it ↵dan2019-03-19
| | | | | again matches trunk. The extra functionality is no longer required. FossilOrigin-Name: c02f77b1b4d025d4243f883d6f3a2b3abcaf4944e0209f641b62c576415343dc
* Add further tests for new window function functionality.dan2019-03-18
| | | FossilOrigin-Name: 1fbddf01b1c3fff95b05e2f2f709754e2b514296060b4846518791e7161d9ddb
* Always evaluate window functions using the alternative path usually only ↵dan2019-03-18
| | | | | used by EXCLUDE frames if the SQLITE_QueryFlattener test flag is set. FossilOrigin-Name: 2879a691aca9304aea5acb46bab8e82bb2e08eb54201f3679d60bfc0e8383845
* Fixes for RANGE windows and NULL values.dan2019-03-18
| | | FossilOrigin-Name: 723c84be3ec5ae941b7abd2442cdb76ca3bd76a5ce2d830b0e648c6e1424885a
* Fix problems with RANGE windows and string, blob and NULL values.dan2019-03-16
| | | FossilOrigin-Name: cebe09e11cc91d9776f259dd9b87e9c760a460f53ba6fa36481dfe58f77ad417
* In order to identify the first row of each partition, check if the rowid in ↵dan2019-03-16
| | | | | the ephemeral table is 1 instead of using a dedicated flag register. FossilOrigin-Name: f2d5f7a24c7aa483c579706c5bd7268a74da6d53025d78fa8642908c2aed1707
* Implement the EXCLUDE clause for window frames.dan2019-03-15
| | | FossilOrigin-Name: 9b43c3ee2e054b05715573f4f3893b84aabc5100832333c9a0f2a1628552a978
* Parse EXCLUDE clauses in window frames. They do not yet work.dan2019-03-14
| | | FossilOrigin-Name: d03c7533a1e993f1b12392a5193b2127484307b27072236a1255e7a30849a381
* Add things to this branch that will be required to support the EXCLUDE clause.dan2019-03-14
| | | FossilOrigin-Name: 7d66cd2013206ebad50c7cdb7dab9211fa8b47f5cb7067dcb314b3e0180875f8
* Avoid allocating excessive registers for the PARTITION BY expressions when ↵dan2019-03-13
| | | | | processing window functions. FossilOrigin-Name: 180be266238e18c01f8bd52c75dd9aa3e26e553620258141cd95189a0ae59ddb
* Remove rows from the ephemeral table used by window functions once they are ↵dan2019-03-13
| | | | | no longer required. FossilOrigin-Name: 6ad553192051eaa0c6d929baacde2de07b93c6d09de861028bbce55a2c9bfdd3
* Minor optimization in sqlite3WindowCodeStep().dan2019-03-13
| | | FossilOrigin-Name: b1322ffb6e63a110998068bf4f0a903028bd4fc0464ae1e517d745fb46423f39
* Allow real values to be used in PRECEDING and FOLLOWING expressions for ↵dan2019-03-12
| | | | | RANGE window frames. FossilOrigin-Name: 25ff7091cb12c63b1864ce68a9151f8432af5804b5ae905a2175761ab4b9fdd8
* Expand on header comment for sqlite3WindowCodeStep(). Further simplify the ↵dan2019-03-12
| | | | | implementation of the same. FossilOrigin-Name: 5129bcc996b3c9f78ab6b674a4364787e7b353b90f15f027cad4431012022c30
* Remove "cache mode" from the window frame code generator. Handle the same ↵dan2019-03-11
| | | | | cases by editing the window frame specification itself. FossilOrigin-Name: 081263538332bb9c07e62630629007ccbba31bef5dc890f60b4ba58a355f70ac
* Simplify the windows frame code some. Add a comment explaining some of the ↵dan2019-03-11
| | | | | VM code generated by sqlite3WindowCodeStep(). FossilOrigin-Name: 6bd1a07949ff3d394056bfcc813444401ef00806e3f0e0423ff6962541e84bdb
* Fix problems with "RANGE ... ORDER BY <expr> DESC" window frames.dan2019-03-11
| | | FossilOrigin-Name: e7bced731aa071c95bc398cdecd53c939841bf0c52fbcd06e47ba68f8c5cc35a
* Add support for RANGE window frames. Some cases still do not work.dan2019-03-09
| | | FossilOrigin-Name: ffc32b246d92d53c66094afe11950b53ffab6a1c230c602eebbfedafb2eb57f4
* Finish consolidation of window frame code. Add untested support for GROUPS ↵dan2019-03-08
| | | | | frames. FossilOrigin-Name: 954bf369935083c188c3b14e77ed89fc5ec4323cc5b0c67e4a2e48fcc278df45
* Fix other "ROWS BETWEEN" cases on this branch.dan2019-03-07
| | | FossilOrigin-Name: a5f68f66472610b5beb4fe28669fbbfe83a32742be73cecad9b2ae28f8a17b30
* Modify new window functions function so that cursors are stepped immediately ↵dan2019-03-07
| | | | | after each operation, instead of immediately before. FossilOrigin-Name: 093d2b25f1b656bba57d665aac68109436861b157a5769432b612176dae3f6eb
* Simplify the window function code generator some more.dan2019-03-06
| | | FossilOrigin-Name: 45cbd3b4498cea8856f189e9d0a192556d4f15212055b8328a1beca6083fc47a
* Improvements to the way built-in window functions are handled.dan2019-03-06
| | | FossilOrigin-Name: e8eee566dfca6f4c8af074731dfe91f7fbcd9ca72f0303235b52e4e2e80d5b71
* Extend windowCodeStep() to handle any ROWS PRECEDING/FOLLOWING frame ↵dan2019-03-05
| | | | | specification. FossilOrigin-Name: af0ea1363548461b2aad8fd54ee3f2f616111dcae2d6480f5294da44c87a0a5d
* Support some "ROWS BETWEEN N PRECEDING AND M FOLLOWING" window functions ↵dan2019-03-04
| | | | | without caching entire partitions. FossilOrigin-Name: e7a91f12282afb5d5d7d78397a11d18e0268ee0c931d85e21fce00d13929494e
* Add support for chaining of WINDOW definitions.dan2019-02-16
| | | FossilOrigin-Name: c155125fd5dddb438c09d40f5137c47d88defb7a6ede4261f09d7bdaad250d37
* Window functions that can abort should indicate this, so that if they aredrh2019-01-27
| | | | | used in DML statement, a statement journal will be used. FossilOrigin-Name: 0ea05a0eb96acb860d8af2e788e29a5ae3b161e7892ab62f1ff2f3e722c0dcb6
* Revamp the SrcList allocator routines to be methods of Parse instead ofdrh2019-01-17
| | | | | | being methods of the "sqlite3" object, so that they can leave better error messages when the SrcList object grows too large. FossilOrigin-Name: df08d472b090b212fb77ce2aae0e1ffe79ae5db4b1accf55e6fdb18e8b0a7098
* Avoid a dangling pointer comparison when renaming a table that has a triggerdan2019-01-16
| | | | | | that itself contains a window function with an (illegal) column reference in a FOLLOWING expression. FossilOrigin-Name: d45bee36f2c1091a2d32c16ca8921bf4e7c9e40c46d0a36fbcb179ecfafcfbf0
* A new implementation of sqlite3VdbeMakeLabel() is faster and makes fewerdrh2018-12-29
| | | | | | | | | 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*. FossilOrigin-Name: 4a0929ac76d8aa5dd65eac3b83d6bbf41e505e01d175ca0fb2b19ba02d439415
* Fix the sqlite3ExprDup() routine so that it makes complete duplications ofdrh2018-12-06
| | | | | subqueries containing window functions. FossilOrigin-Name: 940174543e87184a0278fcd02e8a096a11510174d9c1d65d21878819790ddaff
* Fix a problem with using window functions in compound (UNION, INTERSECT etc.)dan2018-10-23
| | | | | queries. FossilOrigin-Name: 059ff53a46c7f1e4bf3e7dc558312beef67826c2753e2ab7e4e7df498b37b617
* Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a newdrh2018-09-20
| | | | | | | 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. FossilOrigin-Name: ad130bb86e74e6ce165fdbdce3a19699510f0e62071c1c7923b5a4538d888c7c
* Improvements to the parser to increase coverage. Fix the parser so thatdrh2018-07-27
| | | | | | at least one expresssion is required after PARTITION BY and within the list of expressions on VALUES(). FossilOrigin-Name: 02204f8b246c868846f39bd44f2e3bc0fab0275aa09ef3a0e5a8e3d58f484ca8
* Adjustments to VdbeCoverage macros to deal with byte-code branches thatdrh2018-07-11
| | | | | can never be taken in some directions. FossilOrigin-Name: b170c0092b1d0c47dd700843f0c870e51181939607a897fbcae55a58042160f9