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

Cosmos: TimeOnly arithmetic is translated incorrectly #35311

Open
roji opened this issue Dec 10, 2024 · 0 comments
Open

Cosmos: TimeOnly arithmetic is translated incorrectly #35311

roji opened this issue Dec 10, 2024 · 0 comments

Comments

@roji
Copy link
Member

roji commented Dec 10, 2024

The following test:

[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task TimeOnly_subtract_TimeOnly(bool async)
    => AssertQuery(
        async,
        ss => ss.Set<BasicTypesEntity>().Where(b => b.TimeOnly - new TimeOnly(10, 0, 0) == new TimeSpan(0, 0, 15, 50, 500)));

... generates the following SQL:

SELECT VALUE c
FROM root c
WHERE ((c["TimeOnly"] - "10:00:00") = "00:15:50.5000000")

We should either correct the translation or block it. Check arithmetic over other temporal types to make sure we're doing the right thing.

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