CSHARP-5658 fixed an InvalidCastException in EqualsMethodToFilterTranslator when a constant value type differed from the field serializer's value type. The fix routes numeric mismatches through FieldValueSerializerHelper.GetSerializerForValueType, otherwise throws a ExpressionNotSupportedException.
The same pattern exists in other filter translators that could hit the same exception:
- CompareComparisonExpressionToFilterTranslator
- BitMaskComparisonExpressionToFilterTranslator
- HasFlagMethodToFilterTranslator
- ContainsMethodToFilterTranslator
- GetItemMethodToFilterFieldTranslator
We need to investigate which are reachable with a mismatched type, and possibly fix the issue.