You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Murali Sai Rama Krishna V <mu...@nalashaa.com> on 2014/12/01 18:16:05 UTC

RE: Regarding usage of - null in $filter

Resending Once again for more visibility.

From: Murali Sai Rama Krishna V
Sent: Thursday, November 27, 2014 8:26 PM
To: 'user@olingo.apache.org'
Cc: 'Ilya Pupko'
Subject: Regarding usage of - null in $filter

Hi Team,

                When issuing filter expression as   "$filter=CUSTOMERNO eq null" I am getting the below exception.

Upon further research, in FilterParserImpl.java (Olingo Library), there is a code as shown below,

lAvailableBinaryOperators.put(BinaryOperator.EQ.toUriLiteral(), new InfoBinaryOperator(BinaryOperator.EQ, "Equality", 30, combination));

where combinations ArrayList should have ParameterSet as Edm.Double, Edm.Null combination.

In validateBinaryOperatorTypes(), we have

InfoBinaryOperator binOpt = availableBinaryOperators.get(binaryExpression.getOperator().toUriLiteral());
binOpt which provides collections List doesn't contain ParameterSet  --   Edm.Double, Edm.Null combination and hence throwing the error.

org.apache.olingo.odata2.api.uri.UriSyntaxException: Invalid filter expression: 'customerno eq null '.
at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptionFilter(UriParserImpl.java:595)
       at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptions(UriParserImpl.java:556)
       at org.apache.olingo.odata2.core.uri.UriParserImpl.parse(UriParserImpl.java:116)
       at com.jitterbit.odata.core.service.JitterbitODataService.convertODataRequestToJDMLRequest(JitterbitODataService.java:117)
       at com.jitterbit.odata.core.JitterbitODataProcessorImpl.getJDMLRequest(JitterbitODataProcessorImpl.java:34)
       at com.jitterbit.odata.test.JitterbitODataLibraryTest.main(JitterbitODataLibraryTest.java:90)
Caused by: org.apache.olingo.odata2.api.uri.expression.ExpressionParserException: Operator "eq" incompatible with operand types "Edm.Double" and "Edm.Null" at position 43 in "customerno eq null ".
       at org.apache.olingo.odata2.core.uri.expression.FilterParserExceptionImpl.createINVALID_TYPES_FOR_BINARY_OPERATOR(FilterParserExceptionImpl.java:248)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.validateBinaryOperatorTypes(FilterParserImpl.java:613)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElements(FilterParserImpl.java:161)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElements(FilterParserImpl.java:149)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.parseFilterString(FilterParserImpl.java:98)
       at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptionFilter(UriParserImpl.java:593)
       ... 5 more



Thanks & Regards,
Murali.
==============

RE: Regarding usage of - null in $filter

Posted by Murali Sai Rama Krishna V <mu...@nalashaa.com>.
Thanks Michael.

From: Bolz, Michael [mailto:michael.bolz@sap.com]
Sent: Tuesday, December 02, 2014 1:25 PM
To: user@olingo.apache.org
Subject: Re: Regarding usage of - null in $filter

Hello Murali,

which version of Olingo do you use?
In actual release 2.0.1 this issue should be solved (see patch/issue https://issues.apache.org/jira/browse/OLINGO-372).

Kind regards,
Michael

On 01 Dec 2014, at 18:16, Murali Sai Rama Krishna V <mu...@nalashaa.com>> wrote:

Resending Once again for more visibility.

From: Murali Sai Rama Krishna V
Sent: Thursday, November 27, 2014 8:26 PM
To: 'user@olingo.apache.org<ma...@olingo.apache.org>'
Cc: 'Ilya Pupko'
Subject: Regarding usage of - null in $filter

Hi Team,

                When issuing filter expression as   “$filter=CUSTOMERNO eq null” I am getting the below exception.

Upon further research, in FilterParserImpl.java (Olingo Library), there is a code as shown below,

lAvailableBinaryOperators.put(BinaryOperator.EQ.toUriLiteral(), newInfoBinaryOperator(BinaryOperator.EQ, "Equality", 30, combination));

where combinations ArrayList should have ParameterSet as Edm.Double, Edm.Null combination.

In validateBinaryOperatorTypes(), we have

InfoBinaryOperator binOpt = availableBinaryOperators.get(binaryExpression.getOperator().toUriLiteral());
binOpt which provides collections List doesn’t contain ParameterSet  --   Edm.Double, Edm.Null combination and hence throwing the error.

org.apache.olingo.odata2.api.uri.UriSyntaxException: Invalid filter expression: 'customerno eq null '.
at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptionFilter(UriParserImpl.java:595)
       at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptions(UriParserImpl.java:556)
       at org.apache.olingo.odata2.core.uri.UriParserImpl.parse(UriParserImpl.java:116)
       at com.jitterbit.odata.core.service.JitterbitODataService.convertODataRequestToJDMLRequest(JitterbitODataService.java:117)
       at com.jitterbit.odata.core.JitterbitODataProcessorImpl.getJDMLRequest(JitterbitODataProcessorImpl.java:34)
       at com.jitterbit.odata.test.JitterbitODataLibraryTest.main(JitterbitODataLibraryTest.java:90)
Caused by: org.apache.olingo.odata2.api.uri.expression.ExpressionParserException: Operator "eq" incompatible with operand types "Edm.Double" and "Edm.Null" at position 43 in "customerno eq null ".
       at org.apache.olingo.odata2.core.uri.expression.FilterParserExceptionImpl.createINVALID_TYPES_FOR_BINARY_OPERATOR(FilterParserExceptionImpl.java:248)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.validateBinaryOperatorTypes(FilterParserImpl.java:613)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElements(FilterParserImpl.java:161)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElements(FilterParserImpl.java:149)
       at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.parseFilterString(FilterParserImpl.java:98)
       at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptionFilter(UriParserImpl.java:593)
       ... 5 more



Thanks & Regards,
Murali.
==============


Re: Regarding usage of - null in $filter

Posted by "Bolz, Michael" <mi...@sap.com>.
Hello Murali,

which version of Olingo do you use?
In actual release 2.0.1 this issue should be solved (see patch/issue https://issues.apache.org/jira/browse/OLINGO-372 <https://issues.apache.org/jira/browse/OLINGO-372>).

Kind regards,
Michael

> On 01 Dec 2014, at 18:16, Murali Sai Rama Krishna V <mu...@nalashaa.com> wrote:
> 
> Resending Once again for more visibility.
>  
> From: Murali Sai Rama Krishna V 
> Sent: Thursday, November 27, 2014 8:26 PM
> To: 'user@olingo.apache.org'
> Cc: 'Ilya Pupko'
> Subject: Regarding usage of - null in $filter
>  
> Hi Team,
>  
>                 When issuing filter expression as   “$filter=CUSTOMERNO eq null” I am getting the below exception.
>  
> Upon further research, in FilterParserImpl.java (Olingo Library), there is a code as shown below,
>  
> lAvailableBinaryOperators.put(BinaryOperator.EQ.toUriLiteral(), newInfoBinaryOperator(BinaryOperator.EQ, "Equality", 30, combination));
>  
> where combinations ArrayList should have ParameterSet as Edm.Double, Edm.Null combination.
>  
> In validateBinaryOperatorTypes(), we have 
>  
> InfoBinaryOperator binOpt = availableBinaryOperators.get(binaryExpression.getOperator().toUriLiteral());
> binOpt which provides collections List doesn’t contain ParameterSet  --   Edm.Double, Edm.Null combination and hence throwing the error.
>  
> org.apache.olingo.odata2.api.uri.UriSyntaxException: Invalid filter expression: 'customerno eq null '.
> at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptionFilter(UriParserImpl.java:595)
>        at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptions(UriParserImpl.java:556)
>        at org.apache.olingo.odata2.core.uri.UriParserImpl.parse(UriParserImpl.java:116)
>        at com.jitterbit.odata.core.service.JitterbitODataService.convertODataRequestToJDMLRequest(JitterbitODataService.java:117)
>        at com.jitterbit.odata.core.JitterbitODataProcessorImpl.getJDMLRequest(JitterbitODataProcessorImpl.java:34)
>        at com.jitterbit.odata.test.JitterbitODataLibraryTest.main(JitterbitODataLibraryTest.java:90)
> Caused by: org.apache.olingo.odata2.api.uri.expression.ExpressionParserException: Operator "eq" incompatible with operand types "Edm.Double" and "Edm.Null" at position 43 in "customerno eq null ".
>        at org.apache.olingo.odata2.core.uri.expression.FilterParserExceptionImpl.createINVALID_TYPES_FOR_BINARY_OPERATOR(FilterParserExceptionImpl.java:248)
>        at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.validateBinaryOperatorTypes(FilterParserImpl.java:613)
>        at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElements(FilterParserImpl.java:161)
>        at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.readElements(FilterParserImpl.java:149)
>        at org.apache.olingo.odata2.core.uri.expression.FilterParserImpl.parseFilterString(FilterParserImpl.java:98)
>        at org.apache.olingo.odata2.core.uri.UriParserImpl.handleSystemQueryOptionFilter(UriParserImpl.java:593)
>        ... 5 more
>  
>  
>  
> Thanks & Regards,
> Murali.
> ==============