Skip to content

Query Planner Unable to Find Struct Fields with Capital Letters #16648

Open
@gfee-home

Description

@gfee-home

Describe the bug

If you create a table with a struct column where a field in the struct include a capital letter then the query planner will complain that it cannot find that field.

To Reproduce

  1. Create a JSON file named "test.json" with content:

{"thing": {"fooBar": "not going to find me"}}

  1. Start the Datafusion cli
  2. Execute "select thing.fooBar from 'test.json';"

Actual: The query will fail saying 'Error during planning: Field foobar not found in struct'.
Expected: The query executes returning 1 row with content "not going to find me"

Note: if you change the content of the file to:

{"thing": {"foobar": "not going to find me"}}

where the only change is "fooBar" to "foobar" then everything works.

Expected behavior

Expected: The query executes returning 1 row with content "not going to find me"

Note: if you change the content of the file to:

{"thing": {"foobar": "not going to find me"}}

where the only change is "fooBar" to "foobar" then everything works.

Additional context

Repros on 46.0.0 and 48.0.0

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