Skip to content

Duckdb: Support new star expressions #6971

@keraion

Description

@keraion

Search before asking

  • I searched the issues and found no similar issues.

What Happened

The duckdb dialect fails to parse the following star expressions

-- * RENAME
SELECT * RENAME (a AS b)
FROM tbl;

-- Pattern Matching
SELECT * LIKE 'col%'
FROM tbl;

SELECT * ILIKE 'col%'
FROM tbl;

SELECT * NOT LIKE 'col%'
FROM tbl;

SELECT * GLOB 'col*'
FROM tbl;

SELECT * SIMILAR TO 'col.'
FROM tbl;

Expected Behaviour

These should parse successfully.

Observed Behaviour

These return PRS errors.

How to reproduce

Use SQL queries above.
Use duckdb dialect.
Run sqlfluff parse.
PRS error occurs.

Dialect

duckdb

Version

sqlfluff 3.4.1

Configuration

[sqlfluff]
dialect = duckdb

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduckdbIssue relating to the dbduck dialect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions