Skip to content

Commit 4bd17fe

Browse files
author
zhaoge
committed
feat: merge conflict
2 parents af4ad15 + 8b1ba06 commit 4bd17fe

File tree

98 files changed

+62696
-41297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+62696
-41297
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ coverage
99
.idea
1010
gen/
1111
src/**/*.iml
12-
benchmark/reports/*
12+
benchmark/reports/*
13+
*.tgz

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ All notable changes to this project will be documented in this file. See [standa
6161

6262
### Features
6363

64-
* add toMatchUnorderedArrary matcher and apply it ([#271](https://github.com/DTStack/dt-sql-parser/issues/271)) ([a05f099](https://github.com/DTStack/dt-sql-parser/commit/a05f099aa1ad555c408bc2018240fb4611ec09b8))
64+
* add toMatchUnorderedArray matcher and apply it ([#271](https://github.com/DTStack/dt-sql-parser/issues/271)) ([a05f099](https://github.com/DTStack/dt-sql-parser/commit/a05f099aa1ad555c408bc2018240fb4611ec09b8))
6565
* collect entity ([#265](https://github.com/DTStack/dt-sql-parser/issues/265)) ([a997211](https://github.com/DTStack/dt-sql-parser/commit/a99721162be0d463b513f53bb13ada6d10168548)), closes [#256](https://github.com/DTStack/dt-sql-parser/issues/256) [#263](https://github.com/DTStack/dt-sql-parser/issues/263) [#268](https://github.com/DTStack/dt-sql-parser/issues/268)
6666
* migrate to antlr4ng ([#267](https://github.com/DTStack/dt-sql-parser/issues/267)) ([195878d](https://github.com/DTStack/dt-sql-parser/commit/195878da9bb1ff8011b5d60c02389fa66d2bc0b8))
6767
* **spark:** support materialized view for spark sql ([#262](https://github.com/DTStack/dt-sql-parser/issues/262)) ([5ce89cb](https://github.com/DTStack/dt-sql-parser/commit/5ce89cb421de18330d56e23a4ab5b658b2130a0b))

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ Additionally, it provides advanced features such as **SQL Validation**, **Code C
2727
- Trino
2828
- Impala
2929

30-
>Tips: This project is the default for Typescript target, also you can try to compile it to other languages if you need.
30+
>[!TIP]
31+
>This project is the default for Typescript target, also you can try to compile it to other languages if you need.
3132
3233
<br/>
3334

benchmark/benchmark.config.ts

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
import { Language } from './sqlBenchmark';
2+
3+
type TestFile = {
4+
/** Benchmark Name */
5+
name: string;
6+
/** Test sql name */
7+
sqlFileName: string;
8+
/** Test run times */
9+
loopTimes?: number;
10+
/** Test method name of parser */
11+
testTypes: string[];
12+
/** Exclude languages */
13+
excludes?: Language[];
14+
/** Include languages */
15+
includes?: Language[];
16+
};
17+
18+
const testFiles: TestFile[] = [
19+
{
20+
name: 'Query Collection',
21+
sqlFileName: 'select.sql',
22+
testTypes: ['getAllTokens', 'validate'],
23+
},
24+
{
25+
name: 'Update Table',
26+
sqlFileName: 'update.sql',
27+
excludes: ['flink'],
28+
testTypes: ['getAllTokens', 'validate'],
29+
},
30+
{
31+
name: 'Insert Columns',
32+
sqlFileName: 'insert.sql',
33+
testTypes: ['getAllTokens', 'validate'],
34+
},
35+
{
36+
name: 'Create Table',
37+
sqlFileName: 'create.sql',
38+
excludes: ['flink'],
39+
testTypes: ['getAllTokens', 'validate'],
40+
},
41+
{
42+
name: 'Create Table',
43+
sqlFileName: 'create_flink.sql',
44+
includes: ['flink'],
45+
testTypes: ['getAllTokens', 'validate'],
46+
},
47+
{
48+
name: 'Split SQL',
49+
sqlFileName: 'split.sql',
50+
excludes: ['flink'],
51+
testTypes: ['splitSQLByStatement'],
52+
},
53+
{
54+
name: 'Split SQL',
55+
sqlFileName: 'split_flink.sql',
56+
includes: ['flink'],
57+
testTypes: ['splitSQLByStatement'],
58+
},
59+
{
60+
name: 'Collect Entities',
61+
sqlFileName: 'suggestion.sql',
62+
excludes: ['flink'],
63+
testTypes: ['getAllEntities'],
64+
},
65+
{
66+
name: 'Collect Entities',
67+
sqlFileName: 'suggestion_flink.sql',
68+
includes: ['flink'],
69+
testTypes: ['getAllEntities'],
70+
},
71+
{
72+
name: 'Suggestion',
73+
sqlFileName: 'suggestion.sql',
74+
excludes: ['flink'],
75+
testTypes: ['getSuggestionAtCaretPosition'],
76+
},
77+
{
78+
name: 'Suggestion',
79+
sqlFileName: 'suggestion_flink.sql',
80+
includes: ['flink'],
81+
testTypes: ['getSuggestionAtCaretPosition'],
82+
},
83+
];
84+
85+
export default {
86+
testFiles,
87+
};

0 commit comments

Comments
 (0)