Hi Vinu,

Sorry to say, I also closed and invalidated that issue. I tried to
reproduce the scenario you mention, but couldn't confirm that there is an
issue. In scenarios where there are null values, the SUM function will
treat it as a 0.

If you're interested in seeing exactly what I did for the reproduction, see
this commit:
https://git-wip-us.apache.org/repos/asf?p=incubator-metamodel.git;a=commit;h=abba052183d6e097edc57f59e604d19caaa037d2

Can you please try again and maybe give us more details so that we can help
find out what the real problem is?

Kasper


2014-08-09 19:22 GMT+02:00 Kasper Sørensen <[email protected]>:

> Hi Vinu,
>
> I added this JIRA issue about your scenario. At least from distance this
> looks really simple to fix:
> https://issues.apache.org/jira/browse/METAMODEL-74
>
> Best,
> Kasper
>
>
> 2014-08-08 11:19 GMT+02:00 Kasper Sørensen <[email protected]
> >:
>
> Hi Vinu,
>>
>> Nice to see you on this mailing list! And thanks for the question.
>>
>> I think you've probably encountered a bug, because in my opinion the NULL
>> values should be skipped in any kind of aggregation. So let's look into
>> that as a bug, and get a fix out.
>>
>> But in the meanwhile, I can also think of a workaround which would be
>> simply to add a WHERE clause to your query - WHERE columnX IS NOT NULL.
>> Would that work?
>>
>> Kasper
>>
>>
>> 2014-08-08 5:31 GMT+02:00 Vinu Agnihotri <[email protected]>:
>>
>> Hi Kasper,
>>>
>>> I am from Singapore and have recently started using the META Model.
>>>
>>> I am doing a simple group by query but having a problem when the value is
>>> null or empty in the data of the column where I am trying to group by.
>>>
>>>
>>> Is there any way in which I can set the value as 0 or ignore the value if
>>> it is null?
>>> There are 4 rows and one value of the column is null which I want to
>>> include in my group by.
>>>
>>> My apologies for asking such an easy question
>>>
>>> Thanks
>>> Vinayak
>>>
>>
>>
>

Reply via email to