Skip to content

Scoping of lambda functions in list_apply and list_filter seems artificially restrictive #9981

@cpcloud

Description

@cpcloud

What happens?

Using a parameter name in a lambda functions that matches the column name of the input column results in a strange error message about needing an unqualified parameter name

To Reproduce

D create or replace table t as select [1, 2, 3] as x;
D select list_apply(t.x, x -> x + 1) from t;
Error: Binder Error: Invalid parameter name 't.x': must be unqualified

Since the xs are unrelated to each other here I would expect there to be no issue executing this query.

OS:

Linux (NixOS)

DuckDB Version:

v0.9.2

DuckDB Client:

CLI

Full Name:

Phillip Cloud

Affiliation:

Voltron Data

Have you tried this on the latest main branch?

I have tested with a main build

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions