Skip to content

Commit 4586de6

Browse files
kyleconroyclaude
andcommitted
Add remaining CREATE EXTERNAL TABLE options support
- Add REPLICATED keyword (alias for REPLICATE) for distribution - Add SCHEMA_NAME, OBJECT_NAME, and REJECTED_ROW_LOCATION options Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e062ae3 commit 4586de6

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

parser/parse_statements.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8587,11 +8587,11 @@ func (p *Parser) parseCreateExternalTableStatement() (*ast.CreateExternalTableSt
85878587
}
85888588
} else if distVal == "ROUND_ROBIN" {
85898589
opt.Value = &ast.ExternalTableRoundRobinDistributionPolicy{}
8590-
} else if distVal == "REPLICATE" {
8590+
} else if distVal == "REPLICATE" || distVal == "REPLICATED" {
85918591
opt.Value = &ast.ExternalTableReplicatedDistributionPolicy{}
85928592
}
85938593
stmt.ExternalTableOptions = append(stmt.ExternalTableOptions, opt)
8594-
case "LOCATION", "FILE_FORMAT", "TABLE_OPTIONS":
8594+
case "LOCATION", "FILE_FORMAT", "TABLE_OPTIONS", "SCHEMA_NAME", "OBJECT_NAME", "REJECTED_ROW_LOCATION":
85958595
opt := &ast.ExternalTableLiteralOrIdentifierOption{
85968596
Value: &ast.IdentifierOrValueExpression{},
85978597
}
@@ -8602,6 +8602,12 @@ func (p *Parser) parseCreateExternalTableStatement() (*ast.CreateExternalTableSt
86028602
opt.OptionKind = "FileFormat"
86038603
case "TABLE_OPTIONS":
86048604
opt.OptionKind = "TableOptions"
8605+
case "SCHEMA_NAME":
8606+
opt.OptionKind = "SchemaName"
8607+
case "OBJECT_NAME":
8608+
opt.OptionKind = "ObjectName"
8609+
case "REJECTED_ROW_LOCATION":
8610+
opt.OptionKind = "RejectedRowLocation"
86058611
}
86068612

86078613
// Parse the value (can be identifier or string literal)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"todo": true}
1+
{}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"todo": true}
1+
{}

0 commit comments

Comments
 (0)