Vera -

I took a look at this for a minute this morning and it looks like we aren't
working as defined per the spec. If this is something you'd like to see
fixed, please go ahead and open a JIRA.

Below is a snippet of a test case... the max should be null, but is zero.

            Object count = em.createQuery("Select count(p.pk) from Entity1 p
where 1=1").getSingleResult();
            Object max = em.createQuery("Select max(p.pk) from Entity1 p
where 1=1").getSingleResult();
            System.out.println("count:"+count+ " max:"+max);

            > count:0 max:0

Thanks,
Rick

On Tue, Sep 14, 2010 at 9:04 AM, Vera Filippova <[email protected]> wrote:

> Rick Curtis <curti...@...> writes:
> >
> > Are you asking a question? ... or are you just asserting that it works as
> > defined in the spec?
> >
> > Thanks,
> > Rick
> >
> > On Thu, Sep 9, 2010 at 9:32 AM, Vera Filippova <oakjum...@...> wrote:
> >
> > > Result of aggregate function MAX is 0 on empty table.
>
> I'm asserting that it returns 0 instead of null. I can see the difference.
>
> Thank you,
> Vera
>
>
>
>
>

Reply via email to