Skip to content

Commit 67314e6

Browse files
committed
fix bug some bugs.
update docs for chinese. support more highlight keyword. release v1.13. Please enter the commit message for your changes. Lines starting
1 parent 608d3db commit 67314e6

20 files changed

+16252
-17779
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ node_modules
33
.vscode
44
out
55
./gen
6-
/gen
6+
/gen
7+
./FlinkSQL-Example
8+
FlinkSQL-Example
9+
script.sh

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### v1.13.3
2+
3+
- Update docs for chinese.
4+
- Fix some bugs.
5+
- Support more highlight keyword.
6+
17
### v1.13.0
28

39
- Support Flink SQL v1.20: Materialized Tables, DISTRIBUTED BY Clause.

LICENSE

Lines changed: 357 additions & 21 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,55 @@
11
# Flink-SQL-Helper
2+
一款帮助你更高效、专注开发FlinkSQL的插件。支持FlinkSQL(v1.20.0)的语法校验提示、代码高亮、关键字补全、重命名、查找全部引用、代码格式化等。
23

3-
Help you efficiently and focus on FlinkSQL development. support Flink SQL error grammar check, syntax highlighting, complete keywords, rename, find all references and code format, including user-defined functions.
4+
> 用户QQ群:913711491
45
5-
> I suggest that you develop and debug on vscode based on the information (https://code.visualstudio.com/docs/java/java-debugging) to obtain a better experience.
6+
> 如果你喜欢在IDEA中进行FlinkSQL的开发。我建议你使用[IDEA版的Flink SQL Helper](https://plugins.jetbrains.com/plugin/25912-flink-sql-helper),它支持了所有语句,在VsCode插件的基础上,它的报错信息也更加清晰。
7+
> 如果你喜欢在VsCode上开发,那么配合[VS Code官网里的Java环境配置](https://code.visualstudio.com/docs/java/java-debugging)也会很棒。
68
7-
## 1.Features
9+
版本之间的差异见下面的介绍`VSCode plugin VS IDEA plugin`
810

9-
### 1.1 Grammar Check
11+
---
1012

11-
Grammar check when you save edit (suggest you turn off automatic saving).
13+
Help you efficiently and focus on FlinkSQL development. support FlinkSQL(v1.20.0) error grammar check, syntax highlighting, complete keywords, rename, find all references and code format.
14+
15+
> If you like develop Flink SQL in IDEA, you can use IDEA version of the plugin——[Flink SQL Helper](https://plugins.jetbrains.com/plugin/25912-flink-sql-helper), Its grammar error message is more powerful and supports all statement.
16+
Or you like develop Flink SQL in VsCode. i suggest that you develop and debug on vscode based on [the information](https://code.visualstudio.com/docs/java/java-debugging) to obtain a better experience.
17+
18+
VSCode plugin VS IDEA plugin:
19+
![](docs/images/feature_diff.jpg)
20+
21+
22+
## 1.功能介绍(Features)
23+
24+
### 1.1 语法检测(Grammar Check)
25+
26+
语法检测将会在你保存时进行检测(强烈建议你关闭自动保存)。这个功能需要在配置中手动开启(默认不开启):
27+
28+
Grammar check when you save edit (suggest you turn off automatic saving).the feature needs enabled in the configuration(not enabled by default):
29+
30+
1. ![](docs/images/setting_1.png)
31+
2. ![](docs/images/setting_2.png)
32+
33+
运行例子:
1234

1335
example:
1436

1537
- ![](docs/images/unexpect_input_v2.jpg)
1638
- ![](docs/images/select_not_expect_comma_v3.jpg)
17-
- ![](docs/images/expect_semicolon_v3.jpg)
1839

19-
if you dont like the feature, you can setting config to turn off and show you how to change config:
20-
1. ![](docs/images/setting_1.png)
21-
2. ![](docs/images/setting_2.png)
2240

2341

24-
### 1.2 Refactorings
42+
### 1.2 重构(Refactorings)
2543

2644
![](docs/images/refactorings.gif)
2745

28-
### 1.3 Code Completion Proposals
46+
### 1.3 代码补全(Code Completion Proposals)
2947

3048
![](docs/images/code_completion_proposal_v3.gif)
3149

32-
### 1.4 Snippets
50+
### 1.4 快捷代码(Snippets)
3351

34-
snippets keywords:
52+
可触发关键字(snippets keywords):
3553

3654
- create
3755
- select
@@ -59,28 +77,31 @@ snippets keywords:
5977

6078
![](docs/images/windows_snippets.gif)
6179

62-
### 1.5 Find All References
80+
### 1.5 查找所有的引用(Find All References)
6381

6482
![](docs/images/find-all-references.gif)
6583

66-
### 1.5 Show References
84+
### 1.5 查找引用(Show References)
6785

6886
![](docs/images/show_references.gif)
6987

70-
### 1.7 Code Format
88+
### 1.7 代码格式化(Code Format)
7189

7290
![](docs/images/format.gif)
7391

74-
## 2. User Guide
92+
## 2. 用户手册(User Guide)
93+
如果你想让插件在你的FlinkSQL文件中生效,你的扩展名需要是`.fql`
7594

76-
Enable the extension on your file, either name the file with a extension:
95+
或者通过按F1,输入`Change Language Mode`,然后选择FlinkSQL。
7796

78-
- SQL
79-
- FQL
97+
98+
Enable the extension on your Flink SQL file, either name the file with a extension `.fql` .
8099

81100
Or press F1, type 'Change Language Mode', and then choose FlinkSQL.
82101

83-
### 2.1 Color theme recommend
102+
### 2.1 配色建议(Color theme recommend)
103+
104+
按F1, 选择`Preference: Color Theme`,然后复制下面的配色进去。
84105

85106
Press F1, choose `Preference: Open User Setting(JSON)` then paste:
86107

@@ -219,4 +240,7 @@ Press F1, choose `Preference: Open User Setting(JSON)` then paste:
219240
}
220241
~~~
221242

243+
我们提供了很多个选项,可以让开发者更好的定制自己的主题。如果你对主题有更多需求,可以查看 `syntaxes/flink.tmLanguage.json` 来了解关键字和配色映射。
244+
245+
222246
We provide so many options to allow developers to better customize their favorite themes. if you want to deep in, please see the `syntaxes/flink.tmLanguage.json` to understand keyword and color theme mapping.

docs/Develop Guide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
- Edit `FlinkSQL.g4`
1414
- Run `npm run antlr4ts` generate for ts code then move to src directory.
1515
- Copy ./gen ts file to src directory
16+
17+
# 4. If you want to add keywod and highlight
18+
- Add to `flink.tmLanguage.json`.

docs/images/feature_diff.jpg

85 KB
Loading

docs/performance/error/create_tmp_view.fql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM
66
SELECT
77
*,
88
ROW_NUMBER() OVER (
9-
PARTITION FLOOR( --miss 'BY'
9+
PARTITION FLOOR( --miss 'BY'
1010
TO_TIMESTAMP(
1111
FROM_UNIXTIME(event_time / 1000, 'yyyy-MM-dd HH:mm:ss')
1212
) TO HOUR

docs/performance/psss/create_database.fql

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/performance/psss/create_temp_view.fql

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/performance/psss/create_tmp_view.fql

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)