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

Sync EF Core to 7.0.0-rc.1.22417.7 #2475

Merged
merged 1 commit into from
Aug 18, 2022
Merged

Sync EF Core to 7.0.0-rc.1.22417.7 #2475

merged 1 commit into from
Aug 18, 2022

Conversation

roji
Copy link
Member

@roji roji commented Aug 17, 2022

No description provided.

@roji roji enabled auto-merge (rebase) August 17, 2022 22:48
""");
}

[ConditionalTheory(Skip = "Non-deterministic, no ordering")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are 3 tests without ordering. It is fine to skip them. There are tests which provides order by with skip/take so it is covered. SqlServer allows Take without ordering to be put on top level so added those tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Do you want to maybe move these tests to SQL Server, since they rely on non-deterministic SQL Server ordering in order to pass? This would save the trouble for other providers implementing these from figuring out what's wrong, that they need to skip, etc.

WHERE c.""CustomerID"" LIKE 'F%'");
}

[ConditionalTheory(Skip = "invalid reference to FROM-clause entry for table c")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is invalid reference here? Sqlite doesn't have APPLY support so this test is skipped. May be we can tweak relational a bit here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update_with_cross_apply_set_constant is producing the following SQL:

UPDATE "Customers" AS c
    SET "ContactName" = 'Updated'
FROM (
    SELECT o."OrderID", o."CustomerID", o."EmployeeID", o."OrderDate"
    FROM "Orders" AS o
    WHERE o."OrderID" < 10300 AND date_part('year', o."OrderDate")::int < length(c."ContactName")::int
) AS t
WHERE c."CustomerID" LIKE 'F%'

The error is:

ERROR:  invalid reference to FROM-clause entry for table "c" at character 240
HINT:  There is an entry for table "c", but it cannot be referenced from this part of the query.

So this is like the problem we discussed offline with LEFT JOIN - not possible to reference c here in the subquery, I think maybe you need to push it down into a nested subquery like for the LEFT JOIN case?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is odd to not allow reference. I will update relational code to cause inner join.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smitpatel just remembered this, do you want me to file an issue to track it or are we like this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please file an issue. Thinking about this more, I think it is legit that it doesn't work. I have more ideas around heuristics on this. Will add those notes on the issue you file so we have it for reference in future.

Copy link
Member Author

@roji roji Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roji
Copy link
Member Author

roji commented Aug 17, 2022

@smitpatel this syncs EFCore.PG to use the latest EF rc1, including recent ExecuteUpdate changes.

@smitpatel note the three test failures... 2 are just skip/take without order by (so non-deterministic), but one references the outer table from inside a subquery - related to the conversation we had earlier today.

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

Successfully merging this pull request may close these issues.

Implement ExecuteUpdate/ExecuteDelete
2 participants