Skip to content

COLUMNS(x -> <anything>) treats tokens in <anything> as string literals even when not in quotes #16163

@soerenwolfers

Description

@soerenwolfers

What happens?

COLUMNS(x -> <anything>) treats tokens in <anything> as string literals even when not in quotes.

To Reproduce

SELECT COLUMNS(x -> x.type[3] = 't') FROM range(1); -- e.g., user wants to filter for integers, but gets all columns
┌───────┐
│ range │
│ int64 │
├───────┤
│     0 │
└───────┘
SELECT COLUMNS(x -> asdf >= asdf) FROM range(1); 
┌───────┐
│ range │
│ int64 │
├───────┤
│     0 │
└───────┘

OS:

Linux

DuckDB Version:

1.2

DuckDB Client:

Python

Hardware:

.

Full Name:

Soeren Wolfers

Affiliation:

G-Research

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

I have tested with a nightly 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