Skip to content

Commit

Permalink
Merge pull request #342 from Cythia828/origin/next_rebase_main
Browse files Browse the repository at this point in the history
sync main's commit to next
  • Loading branch information
Cythia828 authored Aug 2, 2024
2 parents 1d9dc1c + c49750d commit 0f72b8b
Show file tree
Hide file tree
Showing 91 changed files with 62,187 additions and 40,774 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
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 0f72b8b

Please sign in to comment.