summaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/bench.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/benchmarks/bench.py b/benchmarks/bench.py
index 759ec91..10b04b5 100644
--- a/benchmarks/bench.py
+++ b/benchmarks/bench.py
@@ -160,7 +160,13 @@ LIMIT 100
def sqlglot_parse(sql):
- sqlglot.parse(sql, error_level=sqlglot.ErrorLevel.IGNORE)
+ sqlglot.tokens.USE_RS_TOKENIZER = False
+ sqlglot.parse_one(sql, error_level=sqlglot.ErrorLevel.IGNORE)
+
+
+def sqlglotrs_parse(sql):
+ sqlglot.tokens.USE_RS_TOKENIZER = True
+ sqlglot.parse_one(sql, error_level=sqlglot.ErrorLevel.IGNORE)
def sqltree_parse(sql):
@@ -199,6 +205,7 @@ def diff(row, column):
libs = [
"sqlglot",
+ "sqlglotrs",
#"sqlfluff",
"sqltree",
#"sqlparse",