]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add support for attaching a FILTER clause to an aggregate function.
authordan <dan@noemail.net>
Sat, 13 Jul 2019 16:39:38 +0000 (16:39 +0000)
committerdan <dan@noemail.net>
Sat, 13 Jul 2019 16:39:38 +0000 (16:39 +0000)
FossilOrigin-Name: ee293e5aeac0b05a8b809095610fd8b4fdaf8e68cd368de90ec0d45e3582ffe5

1  2 
manifest
manifest.uuid
src/sqliteInt.h

diff --cc manifest
index 2bdd0f5c021e1282fc2c34fab648d89260047164,66070b23b5875edbc11bf50fad2eb24021121799..30d81a35182bbd89ad5e3f694bff93eeaec344bd
+++ b/manifest
@@@ -1,5 -1,5 +1,5 @@@
- C Remove\sunreachable\s"break"\sstatements\sto\ssilence\sharmless\scompiler\swarnings\nfrom\sICC.
- D 2019-07-13T16:15:23.170
 -C Rework\sthe\sFILTER\sclause\simplementation\sto\sshare\smore\scode\swith\swindow\sfunctions.
 -D 2019-07-13T16:22:50.675
++C Add\ssupport\sfor\sattaching\sa\sFILTER\sclause\sto\san\saggregate\sfunction.
++D 2019-07-13T16:39:38.075
  F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
  F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
  F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@@ -527,7 -527,7 +527,7 @@@ F src/shell.c.in 82f8a473c01662f52233c6
  F src/sqlite.h.in 83ebc8ab1a2e82d92214006ea2c15bf8a0604f3fac2c31dd9ce9021f568c71f2
  F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
  F src/sqlite3ext.h 9ecc93b8493bd20c0c07d52e2ac0ed8bab9b549c7f7955b59869597b650dd8b5
- F src/sqliteInt.h bf65dfa6565fae2e0d501088fc9c5212244adc1429a543827a16b2f5eaf41982
 -F src/sqliteInt.h e989d94d02e4389480e7abf4d86dbdd23d94f3e15db77c1424b67c75f8d97428
++F src/sqliteInt.h c13c4abe0d245b6b2a4b4a1f9f2b6c4f7347b30b22f61b3fdfd4652b2b328906
  F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
  F src/status.c 46e7aec11f79dad50965a5ca5fa9de009f7d6bde08be2156f1538a0a296d4d0e
  F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
@@@ -1831,7 -1834,7 +1834,7 @@@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a9
  F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
  F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
  F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
- P 18bfb2179ce2c60cec8f5859a84b737731a5e53b28e35072cbb249f18b94262b
- R f8c803745189eeccce948a3e0c8a7622
- U drh
- Z 30db5a05339ca75cff828d9d142b8bbe
 -P 86ab963cc5743867e0535b78a5776e18c13835aa44bf2009f77642df8407cb3f
 -R 7f5ccdaf1d791cabe4704b7e56f0cde3
++P 0d7287e1bfdd5a392bf2fb17699e7cfd0b08bf61fab6cbf4b4bb347b3c4b4610 5dac8c38dfc3f41c5c8fb49ca35de7fd1b21f269d72e8ba6ba59ed0a4030a54d
++R 561c885d15821daa82f4a82578c1b361
+ U dan
 -Z d18b0c3413514388f116d5ed56fe7aa4
++Z 16d98d754e52d40d038f719e1b555d93
diff --cc manifest.uuid
index 2539d44dde7269b90576be95d97ce12a6fc7ca90,a886df556a17f49c4af4a2f7a9c8dff39234cc8e..7b0590fec8c922a0bf1395d18646a09b9cfe5505
@@@ -1,1 -1,1 +1,1 @@@
- 0d7287e1bfdd5a392bf2fb17699e7cfd0b08bf61fab6cbf4b4bb347b3c4b4610
 -5dac8c38dfc3f41c5c8fb49ca35de7fd1b21f269d72e8ba6ba59ed0a4030a54d
++ee293e5aeac0b05a8b809095610fd8b4fdaf8e68cd368de90ec0d45e3582ffe5
diff --cc src/sqliteInt.h
index 1c46183312a0f3e9aa11e11845bd8b5f411b54fd,037d09e42061257851f84488c7ed3a300bc345e1..c123dfffbfbc28af6430f132d7f47d5307666dd0
@@@ -3552,10 -3560,10 +3560,11 @@@ struct TreeView 
  #endif /* SQLITE_DEBUG */
  
  /*
--** This object is used in various ways, all related to window functions
++** This object is used in various ways, most (but not all) related to window
++** functions.
  **
  **   (1) A single instance of this structure is attached to the
--**       the Expr.pWin field for each window function in an expression tree.
++**       the Expr.y.pWin field for each window function in an expression tree.
  **       This object holds the information contained in the OVER clause,
  **       plus additional fields used during code generation.
  **
  **   (3) The terms of the WINDOW clause of a SELECT are instances of this
  **       object on a linked list attached to Select.pWinDefn.
  **
++**   (4) For an aggregate function with a FILTER clause, an instance
++**       of this object is stored in Expr.y.pWin with eFrmType set to
++**       TK_FILTER. In this case the only field used is Window.pFilter.
++**
  ** The uses (1) and (2) are really the same Window object that just happens
  ** to be accessible in two different ways.  Use case (3) are separate objects.
  */