Skip to content

Commit 75441c5

Browse files
committed
Add missing window functions for Hive
1 parent 0fe33a2 commit 75441c5

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/languages/hive.formatter.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ const reservedFunctions = {
190190
'VARIANCE',
191191
],
192192
table: ['EXPLODE', 'INLINE', 'JSON_TUPLE', 'PARSE_URL_TUPLE', 'POSEXPLODE', 'STACK'],
193+
// https://cwiki.apache.org/confluence/display/Hive/LanguageManual+WindowingAndAnalytics
194+
window: [
195+
'LEAD',
196+
'LAG',
197+
'FIRST_VALUE',
198+
'LAST_VALUE',
199+
'RANK',
200+
'ROW_NUMBER',
201+
'DENSE_RANK',
202+
'CUME_DIST',
203+
'PERCENT_RANK',
204+
'NTILE',
205+
],
193206
// Parameterized data types
194207
// https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=82706456
195208
// Though in reality Hive only supports parameters for DECIMAL(),

0 commit comments

Comments
 (0)