Seyoum Belay created OLINGO-1628:
------------------------------------

             Summary: Filter using in operator for double fails with "The types 
'Edm.Decimal' and 'Edm.Double' are not compatible."
                 Key: OLINGO-1628
                 URL: https://issues.apache.org/jira/browse/OLINGO-1628
             Project: Olingo
          Issue Type: Bug
          Components: odata4-server
    Affects Versions: Version (Java) V4 5.0.0
            Reporter: Seyoum Belay


With Olingo version 5.0, filter using in operator for double values fails with 
"The types 'Edm.Decimal' and 'Edm.Double' are not compatible."

For example, /Products?$filter=Quantity eq 1.5 is sucessful, but 
/Products?$filter=Quantity in (1.5) fails with "The types 'Edm.Decimal' and 
'Edm.Double' are not compatible."


Metadata:
 <Property Name="Quantity" Type="Edm.Double"/>

 

Stack trace: 

"The types 'Edm.Decimal' and 'Edm.Double' are not compatible."

 Incompatible types.
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.checkInExpressionTypes(ExpressionParser.java:372)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExprPrimary(ExpressionParser.java:343)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExprUnary(ExpressionParser.java:326)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExprMul(ExpressionParser.java:295)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExprAdd(ExpressionParser.java:281)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExprRel(ExpressionParser.java:238)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExprEquality(ExpressionParser.java:220)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseAnd(ExpressionParser.java:206)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExpression(ExpressionParser.java:192)
     at 
org.apache.olingo.server.core.uri.parser.ExpressionParser.parse(ExpressionParser.java:186)
     at 
org.apache.olingo.server.core.uri.parser.FilterParser.parse(FilterParser.java:48)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to