duckdb
duckdb copied to clipboard
[Upsert] Fix issue with lambdas in `DO UPDATE SET` expressions
trafficstars
This PR fixes #11827
What caused this error is that to avoid ambiguity between the expressions referring to the new data and the existing data (excluded.<column_name>) we qualify all of the references implicitly.
Where this breaks is in lambdas, because as we have seen, lambdas explicitly check that the column reference expressions in it are unqualified.
The fix is to not qualify the expressions inside the lambda.