-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Planning is not deterministic #21637
Comments
marked release blocker. not because join pushdown in SQL server is so important (it is not), but because of the engine side of the problem. the planner apparently puts
as a join condition.
|
The non-determinism is because the SQL server connector is returning stats non-deterministically and that the connector is handling pushdown inconsistently for If I recall correctly, for the first execution, the connector doesn't return column stats. For the second one, it does. This results in a different join order and slightly different query plan that the connector refuses to push down. |
Yes, the plan are different. When ReorderJoins kicks in, the join condition becomes Both plans are obviously equivalent (produce same relations) and correct. The fact that engine sometimes presents more and sometimes fewer join conditions to the connector is something undesirable. |
This can be observed with SQL Server connector:
Note: i am not aware of any caching done by the connector, but the plans are sensitive to stats returned by the connector, and SQL Server's state may be changing when we issue queries.
The text was updated successfully, but these errors were encountered: