Commit Graph

11 Commits

Author SHA1 Message Date
dan fa4b0d4453 Fix a problem with VM code generated for some aggregate SELECT statements that feature min()/max() aggregates both with and without FILTER clauses.
FossilOrigin-Name: 2094da753feb847254473b148d11e535c44dbae9b17454f1a4f8f7e90aefba3f
2020-07-01 14:07:45 +00:00
dan 5e484cb3eb When determining if an aggregate within a sub-query should be processed as part of the sub-query or an outer query, consider any FILTER clause in the same way as the arguments to the aggregate.
FossilOrigin-Name: 1ffc045d2bbeeda9c13a3a3585538ff6434fc852b0ae6679d3c8b9f606bf92e6
2019-12-27 08:57:08 +00:00
drh 66c48907a2 Remove the legacy_file_format PRAGMA. In its place, provide the
SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option to sqlite3_db_config().
Fix for ticket [6484e6ce678fffab]

FossilOrigin-Name: 4d424f3047b48fc441475137f30a719d2f079390c86fe2617710ddfb05c5e240
2019-10-29 16:18:45 +00:00
dan 3703edf110 Be sure to rewrite column references inside FILTER clauses and window frame definitions when flattening queries. Fix for [1079ad19].
FossilOrigin-Name: ccba7202b69d239724c3b589439c9c3b0e1bba237accfeb11c39d492522b8719
2019-10-10 15:17:09 +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 ed09dddece Fix a problem with queries containing a min() or max() function for which the FILTER clause excludes all rows.
FossilOrigin-Name: b1d7e104e034655fe41bc55c562d91e8074a2973d538b8b29301458db45afc57
2019-09-20 20:52:16 +00:00
drh 175b8f06f7 Remove support for STAT3. The sqlite_stat3 tables are ignored, if they
exist.  STAT4 continues to work as it always has, and as it is a superset of
STAT3 is the recommended replacement.

FossilOrigin-Name: 1e17ea2fd1df4ad49138c787c8fe3207dd0c25c93f9001d52a9b69f8c12e841c
2019-08-08 15:24:17 +00:00
dan 5e61c1b741 Fix error handling for the case where a window function is passed the wrong number of arguments.
FossilOrigin-Name: 871796bb19e61c1282d8ac97a82d8b57bde50f2a2a08004ab53136d77c138df4
2019-07-13 17:45:25 +00:00
dan 4f9adee289 Rework the FILTER clause implementation to share more code with window functions.
FossilOrigin-Name: 5dac8c38dfc3f41c5c8fb49ca35de7fd1b21f269d72e8ba6ba59ed0a4030a54d
2019-07-13 16:22:50 +00:00
dan 16e12c573d Add tests for the FILTER clause. And a bugfix.
FossilOrigin-Name: 28aa1702f7f0334abd1b30e7aa48ea3679539b11bfbba32bc9f0d6049cf18a7b
2019-07-03 18:31:20 +00:00
dan 6ba7ab0d25 Experimental implementation of FILTER clause for aggregate functions.
FossilOrigin-Name: 1f1ae2d6ac8dcbb62e5aa3dc17bc67d559cb565fc0d0a8c00a596075d35f8130
2019-07-02 11:56:47 +00:00