File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -665,7 +665,6 @@ const reservedCommands = [
665665 'WITH' ,
666666 'CLUSTER BY' ,
667667 'DISTRIBUTE BY' ,
668- 'PARTITION BY' , // verify
669668 'GROUP BY' ,
670669 'HAVING' ,
671670 'VALUES' ,
@@ -711,7 +710,7 @@ const reservedCommands = [
711710 'INSERT' ,
712711 'LATERAL VIEW' ,
713712 'UPDATE' ,
714- 'WINDOW' , // verify
713+ 'WINDOW' ,
715714] ;
716715
717716const reservedBinaryCommands = [
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import supportsStrings from './features/strings';
1414import supportsArrayAndMapAccessors from './features/arrayAndMapAccessors' ;
1515import supportsComments from './features/comments' ;
1616import supportsIdentifiers from './features/identifiers' ;
17- import supportsWindow from './features/window' ;
1817
1918describe ( 'SparkFormatter' , ( ) => {
2019 const language = 'spark' ;
@@ -50,7 +49,22 @@ describe('SparkFormatter', () => {
5049 'NATURAL SEMI JOIN' ,
5150 ] ,
5251 } ) ;
53- supportsWindow ( format ) ;
52+
53+ it ( 'formats basic WINDOW clause' , ( ) => {
54+ const result = format ( `SELECT * FROM tbl WINDOW win1, WINDOW win2, WINDOW win3;` ) ;
55+ expect ( result ) . toBe ( dedent `
56+ SELECT
57+ *
58+ FROM
59+ tbl
60+ WINDOW
61+ win1,
62+ WINDOW
63+ win2,
64+ WINDOW
65+ win3;
66+ ` ) ;
67+ } ) ;
5468
5569 it ( 'formats window function and end as inline' , ( ) => {
5670 const result = format (
You can’t perform that action at this time.
0 commit comments