Fix parsing of equality binop in function argument #1182
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1057 added support for using the
=
operator for named function arguments. This syntax conflicts with passing an=
binop expr as a function argument, and so this caused a regression on dialects that don't support this style of named argument. There were two problems in particular:foo(a = b)
would parse as a named argument rather than a comparison ofa
andb
.foo(1=1)
resulted in a parsing failure, which is problematic as many people have the habit of writing1=1
instead ofTRUE
.So rather than accepting this everywhere, we should only accept it on dialects that have this form of named argument. The original PR only mentions DuckDB so that's the only dialect I enabled it for. If there are any others, please let me know and I'll add them.