Skip to content

Commit 998b42b

Browse files
authored
fix(exasol): enable minus (#7521)
1 parent 0cd09c2 commit 998b42b

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

sqlglot/dialects/exasol.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class Tokenizer(tokens.Tokenizer):
6161
"REGEXP_LIKE": TokenType.RLIKE,
6262
"SEPARATOR": TokenType.SEPARATOR,
6363
"SYSTIMESTAMP": TokenType.SYSTIMESTAMP,
64+
"MINUS": TokenType.EXCEPT,
6465
}
6566
KEYWORDS.pop("DIV")
6667

tests/dialects/test_exasol.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ def test_exasol(self):
3131
"mysql": "SELECT FROM_UNIXTIME(col)",
3232
},
3333
)
34+
self.validate_identity(
35+
"select foo, bar from table_1 minus select foo, bar from table_2",
36+
"SELECT foo, bar FROM table_1 EXCEPT SELECT foo, bar FROM table_2",
37+
)
3438

3539
def test_exasol_keywords(self):
3640
keywords = ["CS", "ADD", "BOOLEAN", "CALL", "CONTROL"]

0 commit comments

Comments
 (0)