Skip to content

Commit e07560b

Browse files
committed
support aggregate,time,column function
1 parent 0ef5c2c commit e07560b

3 files changed

Lines changed: 15 additions & 10 deletions

File tree

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This extension provides Flink SQL support for VSCode. It also provides some basi
55

66
## Features
77

8-
Enables syntax highlighting and formatting for Flink SQL, including user-defined functions.
8+
Enables syntax highlighting and formatting for Flink SQL(v1.16.0), including user-defined functions.
99

1010

1111
## How use
@@ -16,8 +16,5 @@ Enable the extension on your file, either name the file with a extension:
1616
Or press F1, type 'Change Language Mode', and then choose FlinkSQL.
1717

1818
# TODO List
19-
## UDF
20-
- Support `Conditional Functions``CASE value WHEN value1_1 [, value1_2]* THEN RESULT1 (WHEN value2_1 [, value2_2 ]* THEN result_2)* (ELSE result_z) END`
21-
- Support `Aggregate Function`
22-
- Support `Time Interval and Point Unit Specifiers`
23-
- Support `Column Functions`
19+
- Support grammer:`Conditional Functions``CASE value WHEN value1_1 [, value1_2]* THEN RESULT1 (WHEN value2_1 [, value2_2 ]* THEN result_2)* (ELSE result_z) END`
20+
- Error grammer highlight

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flink-sql",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"displayName": "Flink SQL",
55
"description": "Adds support for Flink's variant of the SQL language",
66
"publisher": "CamileSing",

syntaxes/flink.tmLanguage.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,19 @@
150150
},
151151
{
152152
"name" : "support.function.udaf.flink",
153-
"match" : "\\b(?i:count|sum|avg|min|max|variance|var_pop|var_samp|stddev_pop|stddev_samp|covar_pop|covar_samp|corr|percentile|percentile_approx|histogram_numeric|collect_set|collect_list|ntile|lead|lag|first_value|last_value|rank|row_number|dense_rank|cume_dist|percent_rank)\\b"
153+
"match" : "\\b(?i:count|count(1)|sum|avg|min|max|variance|var_pop|var_samp|collect|variance|rank()|dense_rank()|row_number()|lead|lag|first_value|last_value|list_agg|cume_dist|percent_rank|ntile)\\b"
154154
},
155155
{
156-
"name" : "support.function.udtf.flink",
157-
"match" : "\\b(?i:inline|explode|json_tuple|parse_url_tuple|stack|posexplode)\\b"
156+
"name" : "support.function.udf.aggregate.flink",
157+
"match" : "\\b(?i:count|distinct|avg|parse_url_tuple|stack|posexplode)\\b"
158+
},
159+
{
160+
"name" : "support.function.udf.time.flink",
161+
"match" : "\\b(?i:miliennium|century|decade|year|year_to_month|week|day|day_to_hour|day_to_minute|day_to_second|hour|hour_to_minute|hour_to_second|minute|minute_to_second|second|millisecond|nanosecond|epoch|doy|dow|isodow|epoch|isoyear)\\b"
162+
},
163+
{
164+
"name" : "support.function.udf.column.flink",
165+
"match" : "\\b(?i:withColumns|withoutColumns)\\b"
158166
},
159167
{
160168
"begin": "(?i)^\\s*((?:set)\\s+(?:[^\\=]+))\\s*=\\s*",

0 commit comments

Comments
 (0)