-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Dotnet Drivers
-
Not Needed
-
When operating on two (or more?) numbers of different sizes (e.g. `int` vs. `long`; `byte` vs. `int`), this exception is thrown: "Expression not supported: 36000000000 in (Convert($it.Date.Hour, Int64) * 36000000000) because it was not possible to determine how to serialize the constant."
This is because the serializer passed into `MongoDB.Driver.Linq.Linq3Implementation.Misc.SerializationHelper.SerializeValue` is incorrect. In the example that produced the specific exception above, an `Int32Serializer` is used for the `long` 36000000000.
This was initially discovered when investigating ticket ODATA-21 but has been reproduced in unit tests independent of OData involving queries where the two different-sized types are operated on in some fashion.