Skip to content

Support convert LogicalPlan JOIN with Using constraint to SQL String #10652

@goldmedal

Description

@goldmedal

Is your feature request related to a problem or challenge?

We only support to convert JOIN with ON constraint to SQL String now. The SQL as below can't be converted now.

SELECT * FROM orders JOIN customer USING (custkey)

It will panic with the message:

NotImplemented("Unsupported join constraint: Using")

Describe the solution you'd like

The unparse rule for JOIN in datafusion/sql/src/unparser/plan.rs should be implemented.

LogicalPlan::Join(join) => {
match join.join_constraint {
JoinConstraint::On => {}
JoinConstraint::Using => {
return not_impl_err!(
"Unsupported join constraint: {:?}",
join.join_constraint
)
}

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions