Skip to content

[Bug]: Unexpected exception with unquoted multibyte identifier #2067

@m15a

Description

@m15a

What happened?

I tried to lint a piece of DuckDB code with the following configuration (.sqruff):

[sqruff]
dialect = duckdb

Linting the following code (example_1.sql) just works:

SELECT
    "日本語"
FROM
    's3://some.parquet';
sqruff lint example_1.sql
The linter processed 1 file(s).
All Finished 📜 🎉

However, linting the following code (example_2.sql) fails:

SELECT
    日本語
FROM
    's3://some.parquet';
sqruff lint example_2.sql

thread 'main' (10924345) panicked at crates/lib/src/rules/convention/cv03.rs:85:14:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
== [example_2.sql] FAIL
L:   1 | P:   1 | ???? | Unexpected exception. Could you open an issue at
                       | https://github.com/quarylabs/sqruff
The linter processed 1 file(s).
All Finished 📜 🎉

I confirmed that this also happens when dialect = postgres.

Version

  • sqruff version: 0.29.3

Checked in Playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions