Kevin-

I applied your patch, but there were a couple problems with our local tests. This statement caused a parse error:

"update kodo.kernel.AttachD x set x.dint = 1 where x.dint <> (select min(y.dint) from kodo.kernel.AttachD y)"

1) testBulkUpdate(kodo.query.TestJPQLExpressions)<4|false|0.9.0> org.apache.openjpa.util.UserException: An error occurred while parsing the query filter "update kodo.kernel.AttachD x set x.dint = 1 where x.dint <> (select min(y.dint) from kodo.kernel.AttachD y)". Error message: The alias "PATH" was not declared in the statement (declared aliases are: {1}). All aliases must be declared in the "from" section of the JPQL statement. at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException( AbstractExpressionBuilder.java:113) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaDat a(JPQLExpressionBuilder.java:236) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getSubquery (JPQLExpressionBuilder.java:1127) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval (JPQLExpressionBuilder.java:1051) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue (JPQLExpressionBuilder.java:1364) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue (JPQLExpressionBuilder.java:1350) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval (JPQLExpressionBuilder.java:766) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getExpression (JPQLExpressionBuilder.java:1341) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval (JPQLExpressionBuilder.java:709) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.evalWhereClause (JPQLExpressionBuilder.java:492) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getQueryExpressions (JPQLExpressionBuilder.java:257) at org.apache.openjpa.kernel.jpql.JPQLParser.eval (JPQLParser.java:58)


And this statement actually parsed, but it returned the wrong number of results for some reason (I'm guessing maybe because the subselect correlation was lost):

"select d from kodo.kernel.AttachD d where exists (select a.aint from d.a a where a.aint = 1)"

Do you think you can fix these problems and re-submit the patch?



On Aug 22, 2006, at 2:39 PM, Kevin Sutter wrote:

Sounds like a good plan. New or updated tests would be good to demonstrate that a fix works. Even if we would provide a working testcase with the fix,
that would be a good way to populate our test bucket.

Concerning all of the query related JIRA reports that have been opened, do we have a base set of testcases for query within OpenJPA? That is, do we
have a query test framework that we should attempt to work within?

Thanks,
Kevin

On 8/22/06, Patrick Linskey <[EMAIL PROTECTED]> wrote:

(Note that my response here doesn't really answer your question.)

I think that it's good that we've been using JIRA to store information about changes we're making, but I think it's far more important that we create test cases that demonstrate the old bad behavior and assert the
new good behavior. That is, I'd like to see us create tests that fail
against the old version of OpenJPA but pass once the patch is applied.

One difficulty with this, of course, is that currently things are set up
so that all tests must pass during a normal compilation. Does anyone
know of a way to designate to mvn that certain tests are expected to
fail, so that we can commit tests that break along with JIRA reports?

-Patrick

--
Patrick Linskey
BEA Systems, Inc.

> -----Original Message-----
> From: Kevin Sutter [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 22, 2006 2:21 PM
> To: [email protected]
> Subject: Re: [jira] Updated: (OPENJPA-15) EJBQL grammar needs
> to be updated to relfect JPA specification
>
> Now that we have successfully created a patch for OPENJPA-15,
> what is the
> process for getting this validated and hopefully accepted
> into SVN?  I have
> been able to verify that the patch can be applied, everything
> builds, and
> the existing testcases still work.  But, I'm not an expert
> with the code
> that is being updated, so it would be good for another
> committer to verify
> the changes.
>
> Thanks!
> Kevin
>
> On 8/22/06, Catalina Wei (JIRA) <[EMAIL PROTECTED]> wrote:
> >
> >      [ http://issues.apache.org/jira/browse/OPENJPA-15?page=all ]
> >
> > Catalina Wei updated OPENJPA-15:
> > --------------------------------
> >
> >     Attachment: OPENJPA-15.openjpa-kernel.txt
> >
> > This patch is applied successfully against openjpa-kenel.
> > please ignore the previous attachments.
> >
> > > EJBQL grammar needs to be updated to relfect JPA specification
> > > --------------------------------------------------------------
> > >
> > >                 Key: OPENJPA-15
> > >                 URL:
> http://issues.apache.org/jira/browse/OPENJPA-15
> > >             Project: OpenJPA
> > >          Issue Type: Bug
> > >          Components: query
> > >            Reporter: David Wisneski
> > >         Assigned To: Catalina Wei
> > > Attachments: OPENJPA-15.openjpa-kernel.txt, OPENJPA-15.txt
> > >
> > >
> > > when used in subquery, SELECT has different grammar than
> in top most
> > query.  SELECT NEW is not allowed.  FROM in subuqery has
> different syntax
> > than in top most query. For example "FROM d.employees as e " in
> > subquery where it would be invalid in top query.
> Expression syntax in
> > HAVING clause needs to allow  "HAVING min(e.salary) > 10 " is
> > valid  provided that e.salary is a grouping field.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the
> administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see:
> http://www.atlassian.com/software/jira
> >
> >
> >
>
_____________________________________________________________________ __ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this
by email and then delete it.


Reply via email to