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

When using version 5.12 to query the left join table, the routing failed. #25170

Open
lmandy opened this issue Apr 14, 2023 · 2 comments
Open

Comments

@lmandy
Copy link

lmandy commented Apr 14, 2023

The SQL statement is as follows, where two tables are binding relationships:

SELECT
pd.id,pde.ewallet_order_id
FROM payment_dynamicaccountinfo pd
LEFT JOIN payment_dynamicaccountinfo_extra pde ON pd.id = pde.payment_dynamicaccountinfo_id
WHERE 1 = 1 AND pd.dynamic_date >= '2023-01-01 00:00:00'

The current version is 5.12, and I have checked the latest version, which also has this problem.
I looked at the source code because the tableNames attribute in the TablesContext class is of type HashSet, causing the order of the tables to change
image

The version I used before was 4.1.1, but it has been solved in this version.
image

I found the previous related issues #866

@RaigorJiang
Copy link
Contributor

Hi @lmandy ,
Are you interested in fixing this issue?

@lmandy
Copy link
Author

lmandy commented Apr 17, 2023

Yes, I'd love to.

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

No branches or pull requests

2 participants