/ Check-in [a6d61dfd]
Login

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

Overview
Comment:Ensure that all the new window-function keywords can still be used as SQL identifiers.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | window-functions
Files: files | file ages | folders
SHA3-256:a6d61dfd4780eccfce5f7a5ead6c04e3b78bc4a461551fd7dd602550e0d51084
User & Date: dan 2019-03-19 06:40:29
Wiki:window-functions
Context
2019-03-19
11:17
Update this branch with latest trunk changes. check-in: 98cc2659 user: dan tags: window-functions
06:40
Ensure that all the new window-function keywords can still be used as SQL identifiers. check-in: a6d61dfd user: dan tags: window-functions
2019-03-18
21:19
Add further tests for new window function functionality. check-in: 1fbddf01 user: dan tags: window-functions
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/parse.y.

   214    214     QUERY KEY OF OFFSET PRAGMA RAISE RECURSIVE RELEASE REPLACE RESTRICT ROW ROWS
   215    215     ROLLBACK SAVEPOINT TEMP TRIGGER VACUUM VIEW VIRTUAL WITH WITHOUT
   216    216   %ifdef SQLITE_OMIT_COMPOUND_SELECT
   217    217     EXCEPT INTERSECT UNION
   218    218   %endif SQLITE_OMIT_COMPOUND_SELECT
   219    219   %ifndef SQLITE_OMIT_WINDOWFUNC
   220    220     CURRENT FOLLOWING PARTITION PRECEDING RANGE UNBOUNDED
          221  +  EXCLUDE GROUPS OTHERS TIES
   221    222   %endif SQLITE_OMIT_WINDOWFUNC
   222    223     REINDEX RENAME CTIME_KW IF
   223    224     .
   224    225   %wildcard ANY.
   225    226   
   226    227   // Define operator precedence early so that this is the first occurrence
   227    228   // of the operator tokens in the grammer.  Keeping the operators together

Changes to test/window1.test.

   919    919     ) FROM t1;
   920    920   } {{} 200 {} 200 1 3 2 6 3 10 4 14 5 12 a 6 b 7 c 8 d 9 e 10}
   921    921   do_execsql_test 20.3.2 {
   922    922     SELECT a, sum(b) OVER (
   923    923       ORDER BY a DESC RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING
   924    924     ) FROM t1 ORDER BY a ASC;
   925    925   } {{} 200 {} 200 1 3 2 6 3 10 4 14 5 12 a 6 b 7 c 8 d 9 e 10}
          926  +
          927  +#-------------------------------------------------------------------------
          928  +do_execsql_test 21.0 {
          929  +  CREATE TABLE keyword_tab(
          930  +    current, exclude, filter, following, groups, no, others, over,
          931  +    partition, preceding, range, ties, unbounded, window
          932  +  );
          933  +}
          934  +do_execsql_test 21.1 {
          935  +  SELECT
          936  +    current, exclude, filter, following, groups, no, others, over,
          937  +    partition, preceding, range, ties, unbounded, window
          938  +  FROM keyword_tab
          939  +}
   926    940   
   927    941   finish_test
   928    942   
   929    943