Skip to content

Commit

Permalink
feat: merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoge committed Aug 2, 2024
2 parents af4ad15 + 8b1ba06 commit 4bd17fe
Show file tree
Hide file tree
Showing 98 changed files with 62,696 additions and 41,297 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ coverage
.idea
gen/
src/**/*.iml
benchmark/reports/*
benchmark/reports/*
*.tgz
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ All notable changes to this project will be documented in this file. See [standa

### Features

* 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))
* 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))
* 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)
* migrate to antlr4ng ([#267](https://github.com/DTStack/dt-sql-parser/issues/267)) ([195878d](https://github.com/DTStack/dt-sql-parser/commit/195878da9bb1ff8011b5d60c02389fa66d2bc0b8))
* **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))
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Additionally, it provides advanced features such as **SQL Validation**, **Code C
- Trino
- Impala

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

Expand Down
87 changes: 87 additions & 0 deletions benchmark/benchmark.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { Language } from './sqlBenchmark';

type TestFile = {
/** Benchmark Name */
name: string;
/** Test sql name */
sqlFileName: string;
/** Test run times */
loopTimes?: number;
/** Test method name of parser */
testTypes: string[];
/** Exclude languages */
excludes?: Language[];
/** Include languages */
includes?: Language[];
};

const testFiles: TestFile[] = [
{
name: 'Query Collection',
sqlFileName: 'select.sql',
testTypes: ['getAllTokens', 'validate'],
},
{
name: 'Update Table',
sqlFileName: 'update.sql',
excludes: ['flink'],
testTypes: ['getAllTokens', 'validate'],
},
{
name: 'Insert Columns',
sqlFileName: 'insert.sql',
testTypes: ['getAllTokens', 'validate'],
},
{
name: 'Create Table',
sqlFileName: 'create.sql',
excludes: ['flink'],
testTypes: ['getAllTokens', 'validate'],
},
{
name: 'Create Table',
sqlFileName: 'create_flink.sql',
includes: ['flink'],
testTypes: ['getAllTokens', 'validate'],
},
{
name: 'Split SQL',
sqlFileName: 'split.sql',
excludes: ['flink'],
testTypes: ['splitSQLByStatement'],
},
{
name: 'Split SQL',
sqlFileName: 'split_flink.sql',
includes: ['flink'],
testTypes: ['splitSQLByStatement'],
},
{
name: 'Collect Entities',
sqlFileName: 'suggestion.sql',
excludes: ['flink'],
testTypes: ['getAllEntities'],
},
{
name: 'Collect Entities',
sqlFileName: 'suggestion_flink.sql',
includes: ['flink'],
testTypes: ['getAllEntities'],
},
{
name: 'Suggestion',
sqlFileName: 'suggestion.sql',
excludes: ['flink'],
testTypes: ['getSuggestionAtCaretPosition'],
},
{
name: 'Suggestion',
sqlFileName: 'suggestion_flink.sql',
includes: ['flink'],
testTypes: ['getSuggestionAtCaretPosition'],
},
];

export default {
testFiles,
};
Loading

0 comments on commit 4bd17fe

Please sign in to comment.