Skip to content

commit 304488d3... (2025-02-05) broke JOIN ... USING("UPPERCASE_FIELD_NAME") #16120

@brunal

Description

@brunal

Describe the bug

Commit 304488d updated sqlparser (0.53->0.54) and updated datafusion source for it.

It broke SQL queries such as

    SELECT test."UPPER" FROM "test"
    INNER JOIN (
        SELECT test."UPPER" FROM "test"
    ) AS selection USING ("UPPER")

This query fails with the message:
Schema error: No field named upper. Valid fields are test."UPPER".

You can find attached a patch that creates a test for this query. You can run it with
$ cargo test -p datafusion -- sql::uppercase_fields::test_uppercase_columns --exact --nocapture

using_uppercase_bug.patch

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingregressionSomething that used to work no longer does

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions