Skip to content

Commit 3d7ed55

Browse files
kyleconroyclaude
andcommitted
Skip FINAL keyword in DESCRIBE to parse SETTINGS clause
The FINAL keyword can appear after table function in DESCRIBE and needs to be skipped so SETTINGS clause is properly parsed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d8ab7eb commit 3d7ed55

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

parser/parser.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6374,6 +6374,11 @@ func (p *Parser) parseDescribe() *ast.DescribeQuery {
63746374
}
63756375
}
63766376

6377+
// Skip FINAL keyword if present (can appear after table function)
6378+
if p.currentIs(token.FINAL) {
6379+
p.nextToken()
6380+
}
6381+
63776382
// Parse FORMAT clause
63786383
if p.currentIs(token.FORMAT) {
63796384
p.nextToken()
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
{
2-
"explain_todo": {
3-
"stmt3": true
4-
}
5-
}
1+
{}

0 commit comments

Comments
 (0)