openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wisneski (JIRA)" <j...@apache.org>
Subject [jira] Closed: (OPENJPA-47) 143 arithmetic unary operator (+,-) gives parsing error
Date Thu, 01 Feb 2007 01:23:05 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-47?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Wisneski closed OPENJPA-47.
---------------------------------

    Resolution: Duplicate

duplicate of OPENJPA-26

> 143 arithmetic unary operator (+,-) gives parsing error
> -------------------------------------------------------
>
>                 Key: OPENJPA-47
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-47
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: query
>         Environment: windows xp, derby, db2 
>            Reporter: George Hongell
>         Attachments: failureEntities.jar
>
>
> 143 unary operator (+,-) gives parsing error
> select e from EmpBean e where -(e.salary) >-10;
> select e from EmpBean e where -e.salary >-10;
> select e, -e.salary , +e.salary  from EmpBean e where +e.salary >-10;
>   [ FAILED 143- bucket = fvtfull, query = select e from EmpBean e where -(e.salary+10)
> -10  : 
>    DIFFERENCE-locations based on expected-(
> diff at line 2 position 1 EXPECTED [[]  ACTUAL [ ] 
> [( class com.dw.test.EmpBean  empid=2 name=andrew salary=13.1 dept=210)]
>                                                                                     
                                                                                         
                                                                                         
                                                                                         
                                                                                e        
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                    
> ) 
>    EXPECTED(
>  TEST143; select e from EmpBean e where -(e.salary+10) > -10 
> [( class com.dw.test.EmpBean  empid=2 name=andrew salary=13.1 dept=210)]
> [( class com.dw.test.EmpBean  empid=4 name=george salary=0.0 dept=200)]
> [( class com.dw.test.EmpBean  empid=1 name=david salary=12.1 dept=210)]
> [( class com.dw.test.EmpBean  empid=10 name=Catalina Wei salary=0.0 dept=0)]
> [( class com.dw.test.EmpBean  empid=3 name=minmei salary=15.5 dept=200)]
> [( class com.dw.test.EmpBean  empid=5 name=ritika salary=0.0 dept=220)]
> [( class com.dw.test.EmpBean  empid=6 name=ahmad salary=0.0 dept=100)]
> [( class com.dw.test.EmpBean  empid=7 name=charlene salary=0.0 dept=210)]
> [( class com.dw.test.EmpBean  empid=8 name=Tom Rayburn salary=0.0 dept=100)]
> [( class com.dw.test.EmpBean  empid=9 name=harry salary=0.0 dept=210)]
>  TEST143; 10 tuples) 
>    ACTUAL(
>  TEST143; select e from EmpBean e where -(e.salary+10) > -10 
>                                                                                     
                                                                                         
                                                                                         
                                                                                         
                                                                                e        
                                                                                         
                                                                                         
                                                                                         
                                                                                         
                                                                    
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> An error occurred while parsing the query filter 'select e from EmpBean e where -(e.salary+10)
> -10'. Error message: <4|false|0.0.0> org.apache.openjpa.kernel.jpql.ParseException:
Encountered "- (" at character 31, but expected: ["(", "+", "-", ":", "?", "ABS", "ALL", "AND",
"ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME",
"CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM",
"GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE",
"LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER",
"OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM",
"UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>,
<INTEGER_LITERAL>, <STRING_LITERAL>]. 
>  TEST143; 1 tuple) ]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message