Commit e0666b5
compiler: temp fix for typecast function parameters (#530)
In cases where a FuncCall has a TypeCast node as an
argument, resolveCatalogRefs would erroneously output
two parameters for that argument instead of one.
This fix eliminates the duplicate param and allows queries
with typecast function args to compile, but it loses track
of the argument's connection with the function called. This
means the parameters use the generic ColumnN names even when
the function has named parameters.
A future refactor of resolveCatalogRefs to better address
function calls will be necessary to address the name issue.
(this only edits the experimental package and does not fix
the old dinosql compiler)
Closes #520
Co-authored-by: Kyle Conroy <[email protected]>1 parent 8aa23ee commit e0666b5
File tree
7 files changed
+88
-0
lines changed- internal
- compiler
- endtoend/testdata/func_args_typecast
- go
7 files changed
+88
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
196 | 204 | | |
197 | 205 | | |
198 | 206 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments