Skip to content

Commit

Permalink
Merge branch 'main' into lhk_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ValKmjolnir committed Aug 23, 2024
2 parents cb31052 + feec382 commit 5412488
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 300 deletions.
100 changes: 0 additions & 100 deletions language/sql/extractor/BUILD

This file was deleted.

5 changes: 4 additions & 1 deletion language/sql/extractor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Therefore, the development process requires modifying the relevant jinja2 templa
# The output path must be language/sql/extractor/utils/code_generator/FindDruidSqlAstAllPublicGetterMethods.json, as step 2 will use this location by default
sparrow query run <path-to-sparrow-cli-repo>/language/sql/extractor/utils/code_generator/FindDruidSqlAstAllPublicGetterMethods.gdl -f json -o <path-to-sparrow-cli-repo>/language/sql/extractor/utils/code_generator -d <path-to-druid-repo>/db
```
TODO: `FindDruidSqlAstAllPublicGetterMethods.gdl` is missing, to be added.

2. Generate the SQL Extractor's code based on the extracted Druid AST information.
```bash
Expand All @@ -45,4 +46,6 @@ sparrow database create -lang java -s . ./db
sparrow query run <path-to-sparrow-cli-repo>/language/sql/extractor/utils/druid_sql_ast_nodes/FindDruidSqlAstNodes.gdl -f json -o <path-to-sparrow-cli-repo>/language/sql/extractor/utils/druid_sql_ast_nodes -d ./db
# Analyze the Sparrow output data and generate a class diagram in Dot format
python3 <path-to-sparrow-cli-repo>/language/sql/extractor/utils/druid_sql_ast_nodes/generate_dot_diagram.py
```
```
TODO: `FindDruidSqlAstNodes.gdl` is missing, to be added.
3 changes: 3 additions & 0 deletions language/sql/extractor/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ CodeFuse-Query SQL 提取器将 SQL 文件的源代码转换为标准化的 core
# 输出路径必须为 language/sql/extractor/utils/code_generator/FindDruidSqlAstAllPublicGetterMethods.json,步骤2会默认使用该位置
sparrow query run <path-to-sparrow-cli-repo>/language/sql/extractor/utils/code_generator/FindDruidSqlAstAllPublicGetterMethods.gdl -f json -o <path-to-sparrow-cli-repo>/language/sql/extractor/utils/code_generator -d <path-to-druid-repo>/db
```
TODO: `FindDruidSqlAstAllPublicGetterMethods.gdl` 已缺失,待补充。

2. 按提取的Druid AST信息生成SQL抽取器的代码。
```bash
Expand All @@ -43,3 +44,5 @@ sparrow query run <path-to-sparrow-cli-repo>/language/sql/extractor/utils/druid_
# 分析Sparrow输出数据并生成Dot格式的类图
python3 <path-to-sparrow-cli-repo>/language/sql/extractor/utils/druid_sql_ast_nodes/generate_dot_diagram.py
```

TODO: `FindDruidSqlAstNodes.gdl` 已缺失,待补充。

This file was deleted.

This file was deleted.

0 comments on commit 5412488

Please sign in to comment.