Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect binder error when a lambda is used inside on conflict do update. #11827

Open
2 tasks done
mima-hlavacek opened this issue Apr 25, 2024 · 0 comments · Fixed by #11866
Open
2 tasks done

Incorrect binder error when a lambda is used inside on conflict do update. #11827

mima-hlavacek opened this issue Apr 25, 2024 · 0 comments · Fixed by #11866

Comments

@mima-hlavacek
Copy link

What happens?

When a lambda function is used inside the on conflict clause, a Binder Error: Invalid lambda parameters! Parameters must be unqualified comma-separated names like x or (x, y). always appears.

To Reproduce

create or replace table foo(bar int primary key, baz varchar);

insert into foo
select 1, ''
on conflict do
update set
  baz = list_reduce(
    ['a', 'b', 'c'],
    (x, y) -> x || ' || ' || y
  )
;
Binder Error: Invalid lambda parameters! Parameters must be unqualified comma-separated names like x or (x, y).

Or

 insert into foo
 select 1, ''
 on conflict do
 update set
   baz = list_filter(
     ['a', 'b', 'c'],
     x -> x = 'a'
   )[1]
 ;
Binder Error: Invalid lambda parameters! Parameters must be unqualified comma-separated names like x or (x, y).

OS:

Ubuntu x64 in WSL on Windows 11

DuckDB Version:

v0.10.3-dev376 d7b9ca0

DuckDB Client:

cli and python

Full Name:

Míma Hlaváček

Affiliation:

Blindspot.ai

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a source build

Did you include all relevant data sets for reproducing the issue?

Not applicable - the reproduction does not require a data set

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants