-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[WIP] Translation of TimeOnly.FromTimeSpan on SQL Server no-op #34114
base: main
Are you sure you want to change the base?
Conversation
@dotnet-policy-service agree |
Oh, I'll keep working on Pull Request, figure out why the CI tests aren't passing |
src/EFCore.SqlServer/Query/Internal/Translators/SqlServerTimeOnlyMethodTranslator.cs
Outdated
Show resolved
Hide resolved
…nlyMethodTranslator.cs Co-authored-by: Andrea Canciani <[email protected]>
{ | ||
return _sqlExpressionFactory.Convert(arguments[0], typeof(TimeOnly)); | ||
return arguments[0].Type is typeof(TimeSpan) |
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.
my bad, my suggestion does not even compile 😅
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.
I believe that
return arguments[0].Type is typeof(TimeSpan) | |
return arguments[0].Type == typeof(TimeSpan) |
might build... I will try it out tomorrow, so don't trust me on this (well, not yet 😇 )
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.
It builds & passes the tests 🚀 (at least locally 😅 )
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.
but those 3 tests require updates to the baselines in several files:
- test/EFCore.SqlServer.FunctionalTests/Query/GearsOfWarQuerySqlServerTest.cs
- test/EFCore.SqlServer.FunctionalTests/Query/TPCGearsOfWarQuerySqlServerTest.cs
- test/EFCore.SqlServer.FunctionalTests/Query/TPTGearsOfWarQuerySqlServerTest.cs
- test/EFCore.SqlServer.FunctionalTests/Query/TemporalGearsOfWarQuerySqlServerTest.cs
fix #34025