metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasper Sørensen <i.am.kasper.soren...@gmail.com>
Subject Re: Aggregate SUM Function not working when the value in the Column is Null or Blank
Date Tue, 12 Aug 2014 18:38:49 GMT
I added a review request for a fix here:

https://reviews.apache.org/r/24613/

Please give me your feedback.


2014-08-12 20:26 GMT+02:00 Kasper Sørensen <i.am.kasper.sorensen@gmail.com>:

> Hi Vinu,
>
> Although I am hoping you will still get back to us with more info - I was
> trying to think a bit about this on my own too. And I think the case you're
> running into isn't that you have a NULL value, but that you have a
> blank/empty string! In that case I just confirmed that an exception will be
> thrown. I think it's fair for us to add it as a feature that empty strings
> are treated like nulls here.
>
> Best regards,
> Kasper
>
>
> 2014-08-11 12:14 GMT+02:00 Kasper Sørensen <i.am.kasper.sorensen@gmail.com
> >:
>
> Hi Vinu,
>>
>> OK. I suggest that you help us reproduce this some more then... Maybe you
>> can take a look at the commit I did to (in)validate the issue. Maybe you
>> can tell me/us what is missing from those unittests to reproduce. Maybe
>> your file does not contain a null but something else?
>>
>> Kasper
>>
>>
>> 2014-08-11 11:04 GMT+02:00 Vinu Agnihotri <vinuagnihotri@gmail.com>:
>>
>> Hi Kasper
>>>
>>> Many Thanks,
>>>
>>> This was just a detailed email explanation to help you understand if I
>>> have not explained clearly.
>>>
>>> I have asked the team to subscribe me, mean while can you please if
>>> possible just reply and let me know what have you replied
>>>
>>> Thanks
>>> Vinu
>>>
>>>
>>> On Mon, Aug 11, 2014 at 3:01 PM, Kasper Sørensen <
>>> i.am.kasper.sorensen@gmail.com> wrote:
>>>
>>>> Hi Vinu,
>>>>
>>>> We did see your first message on this topic, and also replied to it.
>>>> But I think you're still not subscribed to the mailing list to get the
>>>> responses ... Send a mail to
>>>> dev-subscribe@metamodel.incubator.apache.org to get subscribed.
>>>>
>>>> Best regards,
>>>> Kasper
>>>>
>>>>
>>>> 2014-08-11 5:32 GMT+02:00 Vinu Agnihotri <vinuagnihotri@gmail.com>:
>>>>
>>>> Hi Kasper,
>>>>>
>>>>> I am from Singapore and have recently started using the META Model.
>>>>>
>>>>> My Database is a CSV file.
>>>>>
>>>>> I am using the aggregate SUM function in a simple Aggregate Function
>>>>> using
>>>>> a  group by query.
>>>>>
>>>>> Select...... (FUNCTION.SUM, (Column_Name)
>>>>>
>>>>> In this case there is a time where the values in the row is blank or
>>>>> null
>>>>> for the  column for which I am doing the SUM Aggregation
>>>>>
>>>>> When this is the case I am getting an error "Could not convert to
>>>>> number: "
>>>>>  "
>>>>>
>>>>> What I intend to do is either make the value 0 when it is Null or not
>>>>> include these null values while doing the aggregation.
>>>>>
>>>>> NO    Name   Amount
>>>>> 1      Origin       50
>>>>> 2      House
>>>>> 3      Origin      30
>>>>> 4      House     40
>>>>>
>>>>> In the above example when I do a SUM on Amount group by Name, I expect
>>>>> to
>>>>> have two rows as a output with origin as 80 and  House as 40 as their
>>>>> Amounts , but since for no 2 the amount is null, My code does not
>>>>> complies
>>>>> and I get the error.
>>>>>
>>>>>
>>>>> My apologies for asking such an easy question
>>>>>
>>>>> Thanks
>>>>> Vinayak
>>>>>
>>>>
>>>>
>>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message