Skip to content

Commit 75354e3

Browse files
kyleconroyclaude
andcommitted
Handle PARTITION ID syntax in APPLY DELETED MASK command
Add check for PARTITION ID 'value' syntax when parsing ALTER TABLE APPLY DELETED MASK IN PARTITION clause. This sets the PartitionIsID flag so the explain output correctly shows Partition_ID instead of Partition. Fixes test: 03743_fix_estimator_crash/stmt6 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 03c44b0 commit 75354e3

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
@@ -5974,6 +5974,11 @@ func (p *Parser) parseAlterCommand() *ast.AlterCommand {
59745974
p.nextToken() // skip IN
59755975
if p.currentIs(token.PARTITION) {
59765976
p.nextToken() // skip PARTITION
5977+
// Check for PARTITION ID 'value' syntax
5978+
if p.currentIs(token.IDENT) && strings.ToUpper(p.current.Value) == "ID" {
5979+
p.nextToken()
5980+
cmd.PartitionIsID = true
5981+
}
59775982
cmd.Partition = p.parseExpression(LOWEST)
59785983
}
59795984
}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
{
2-
"explain_todo": {
3-
"stmt6": true
4-
}
5-
}
1+
{}

0 commit comments

Comments
 (0)