Skip to content

Commit

Permalink
fix(compiler): Fix left join nullability with table aliases (#1491)
Browse files Browse the repository at this point in the history
  • Loading branch information
timstudd committed Mar 16, 2022
1 parent 9240b66 commit 916b8d3
Show file tree
Hide file tree
Showing 7 changed files with 954 additions and 9 deletions.
17 changes: 9 additions & 8 deletions internal/compiler/output_columns.go
Expand Up @@ -182,14 +182,15 @@ func outputColumns(qc *QueryCatalog, node ast.Node) ([]*Column, error) {
cname = *res.Name
}
cols = append(cols, &Column{
Name: cname,
Type: c.Type,
Scope: scope,
Table: c.Table,
DataType: c.DataType,
NotNull: c.NotNull,
IsArray: c.IsArray,
Length: c.Length,
Name: cname,
Type: c.Type,
Scope: scope,
Table: c.Table,
TableAlias: t.Rel.Name,
DataType: c.DataType,
NotNull: c.NotNull,
IsArray: c.IsArray,
Length: c.Length,
})
}
}
Expand Down
36 changes: 36 additions & 0 deletions internal/endtoend/testdata/join_left/mysql/go/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 916b8d3

Please sign in to comment.