We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38227b2 commit 9a17fedCopy full SHA for 9a17fed
2 files changed
parser/parser.go
@@ -4755,12 +4755,15 @@ func (p *Parser) parseDrop() *ast.DropQuery {
4755
}
4756
4757
4758
- // Handle IF EXISTS
+ // Handle IF EXISTS or IF EMPTY
4759
if p.currentIs(token.IF) {
4760
p.nextToken()
4761
if p.currentIs(token.EXISTS) {
4762
drop.IfExists = true
4763
4764
+ } else if p.currentIs(token.IDENT) && strings.ToUpper(p.current.Value) == "EMPTY" {
4765
+ // IF EMPTY - skip the EMPTY keyword
4766
+ p.nextToken()
4767
4768
4769
parser/testdata/02716_drop_if_empty/metadata.json
@@ -1,7 +1 @@
1
-{
2
- "explain_todo": {
3
- "stmt10": true,
4
- "stmt11": true,
5
- "stmt13": true
6
- }
7
-}
+{}
0 commit comments