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 = [
665
665
'WITH' ,
666
666
'CLUSTER BY' ,
667
667
'DISTRIBUTE BY' ,
668
- 'PARTITION BY' , // verify
669
668
'GROUP BY' ,
670
669
'HAVING' ,
671
670
'VALUES' ,
@@ -711,7 +710,7 @@ const reservedCommands = [
711
710
'INSERT' ,
712
711
'LATERAL VIEW' ,
713
712
'UPDATE' ,
714
- 'WINDOW' , // verify
713
+ 'WINDOW' ,
715
714
] ;
716
715
717
716
const reservedBinaryCommands = [
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import supportsStrings from './features/strings';
14
14
import supportsArrayAndMapAccessors from './features/arrayAndMapAccessors' ;
15
15
import supportsComments from './features/comments' ;
16
16
import supportsIdentifiers from './features/identifiers' ;
17
- import supportsWindow from './features/window' ;
18
17
19
18
describe ( 'SparkFormatter' , ( ) => {
20
19
const language = 'spark' ;
@@ -50,7 +49,22 @@ describe('SparkFormatter', () => {
50
49
'NATURAL SEMI JOIN' ,
51
50
] ,
52
51
} ) ;
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
+ } ) ;
54
68
55
69
it ( 'formats window function and end as inline' , ( ) => {
56
70
const result = format (
You can’t perform that action at this time.
0 commit comments