Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync main's commit to next #342

Merged
merged 18 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading