Skip to content

Expressions from left and right of a join can fail planning during substrait converstion if their name is the same #19330

@xanderbailey

Description

@xanderbailey

Describe the bug

Fixed in #19123

Currently if you have an expression on the left and the right that results in the same name, you get an error when converting from substrait. This is due to the fact that substrait only references columns by their position rather than their attribute name so during conversion expressions are named as their default i.e CAST(...) rather than keeping their original name.

The fix implemented is to alias all projected expressions with a UUID, this makes the plan less readable but does make it correct. Because there is a decision to be made here about the readability of the plan I've made it a config on the session such that the user can decide which mode it should operate in.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions