-
Notifications
You must be signed in to change notification settings - Fork 225
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
Conversation
"""); | ||
} | ||
|
||
[ConditionalTheory(Skip = "Non-deterministic, no ordering")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @smitpatel
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
test/EFCore.PG.FunctionalTests/BulkUpdates/NorthwindBulkUpdatesNpgsqlTest.cs
Outdated
Show resolved
Hide resolved
WHERE c.""CustomerID"" LIKE 'F%'"); | ||
} | ||
|
||
[ConditionalTheory(Skip = "invalid reference to FROM-clause entry for table c")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @smitpatel
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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. |
No description provided.