diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-19 11:01:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-19 11:01:55 +0000 |
commit | f1c2dbe3b17a0d5edffbb65b85b642d0bb2756c5 (patch) | |
tree | 5dce0fe2a11381761496eb973c20750f44db56d5 /benchmarks/bench.py | |
parent | Releasing debian version 20.1.0-1. (diff) | |
download | sqlglot-f1c2dbe3b17a0d5edffbb65b85b642d0bb2756c5.tar.xz sqlglot-f1c2dbe3b17a0d5edffbb65b85b642d0bb2756c5.zip |
Merging upstream version 20.3.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'benchmarks/bench.py')
-rw-r--r-- | benchmarks/bench.py | 9 |
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", |