Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown column in 'on clause' exception occurs when mysql join have duplicate table aliases #33302

Closed
strongduanmu opened this issue Oct 18, 2024 · 0 comments · Fixed by #33303
Assignees
Milestone

Comments

@strongduanmu
Copy link
Member

strongduanmu commented Oct 18, 2024

Bug Report

Which version of ShardingSphere did you use?

022baef

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

All

Expected behavior

Execute sql successfully

Actual behavior

image

Reason analyze (If you can)

When Column Binder is executed, the corresponding columns of the table in tableBinderContexts are retrieved. When multiple tables in one SQL use the same alias, overlap may occur. Therefore, it needs to be transformed into Multimap. When the alias is repeated, it is searched from the value collection.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Example codes for reproduce this issue (such as a github link).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment