Skip to content

Scoping problem with function argument #14563

@pkoppstein

Description

@pkoppstein

What happens?

Somehow, z seems to disappear:

create or replace function demo(n, z) as table (
  select list_transform(range(0,n), x -> z) as row
);  

from demo(3,0);
Binder Error: Referenced column "z" not found in FROM clause!

To Reproduce

create or replace function demo(n, z) as table (
  select list_transform(range(0,n), x -> z) as row
);  

from demo(3,0);

OS:

macos

DuckDB Version:

v1.0, v1.1.3-dev38 │

DuckDB Client:

CLI

Hardware:

No response

Full Name:

Peter Koppstein

Affiliation:

Princeton University

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

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