diff --git a/internal/compiler/query_catalog.go b/internal/compiler/query_catalog.go index 80b59d876c..2d3a124a5d 100644 --- a/internal/compiler/query_catalog.go +++ b/internal/compiler/query_catalog.go @@ -86,7 +86,7 @@ func (qc QueryCatalog) GetTable(rel *ast.TableName) (*Table, error) { if err != nil { return nil, err } - var cols []*Column + cols := make([]*Column, 0, len(src.Columns)) for _, c := range src.Columns { cols = append(cols, ConvertColumn(rel, c)) }