You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to OData ABNF, the right operand of an in expression can be a common expression. Specifically:
inExpr = RWS "in" RWS ( listExpr / commonExpr )
allows the right-hand operand of an in expression to be a collection-valued property.
This works in the library today if the right-hand expression is a schematized property, for example:
https://services.odata.org/TripPinRESTierService/Me/Trips?$filter='Travel' in Tags
However, if the right-hand expression is a dynamic property, the query fails because we are unable to determine the type of the right-hand operand.
We should support dynamic properties as the right-hand operand, using the type of the left-hand operator.
Assemblies affected
All
Reproduce steps
Try to parse the following filter expression, where "trip" is an open type and "undefined" is an undefined property:
trips?$filter='Europe' in undefined
Expected result
A valid In expression with a right-hand operand that is a CollectionOpenPropertyAccessNode with a CollectionType of Collection(Edm.String).
Actual result
An error is thrown stating that the right hand operand isn't a collection.
Additional detail
Note that, for the in operator, user can work around this limitation by use of the Any operator. However, the Any operator is less intuitive and potentially more expensive to compute than the in operator, and doesn't solve the general case.
The text was updated successfully, but these errors were encountered:
According to OData ABNF, the right operand of an in expression can be a common expression. Specifically:
inExpr = RWS "in" RWS ( listExpr / commonExpr )
allows the right-hand operand of an in expression to be a collection-valued property.
This works in the library today if the right-hand expression is a schematized property, for example:
https://services.odata.org/TripPinRESTierService/Me/Trips?$filter='Travel' in Tags
However, if the right-hand expression is a dynamic property, the query fails because we are unable to determine the type of the right-hand operand.
We should support dynamic properties as the right-hand operand, using the type of the left-hand operator.
Assemblies affected
All
Reproduce steps
Try to parse the following filter expression, where "trip" is an open type and "undefined" is an undefined property:
trips?$filter='Europe' in undefined
Expected result
A valid In expression with a right-hand operand that is a CollectionOpenPropertyAccessNode with a CollectionType of Collection(Edm.String).
Actual result
An error is thrown stating that the right hand operand isn't a collection.
Additional detail
Note that, for the in operator, user can work around this limitation by use of the Any operator. However, the Any operator is less intuitive and potentially more expensive to compute than the in operator, and doesn't solve the general case.
The text was updated successfully, but these errors were encountered: