Difference between Tokenize function ADD() and add()?

Hi,

Does the case changes functionality of add() function?

I noticed a strange behavior when I used both lower and upper case of the same function.

i tried to calculate total interaction between two persons by using REDUCE(ADD()), and it was returning 1 irrespective of the data coming from file.

but when I used REDUCE(add()) instead, the output was correct.

need your thoughts on this.

Hanif

Hi Hanif,

I was unable to recreate this occurrence.

Could you please provide the full command you used?

Thanks,

Kevin

Here is my schema and the two statements returning different results.

schema

TYPEDEF TUPLE <event STRING(10), call_date DATETIME, duration STRING(10)> CALL_TUPLE

CREATE UNDIRECTED EDGE communication(FROM Sim_card, TO Sim_card, call_list LIST<CALL_TUPLE>, num_calls INT)

in the source file I have three rows for sim_card = 123456789, and 45625689

Statement that returns wrong count for for the above data i.e num_calls= 1

LOAD file1 TO EDGE communication VALUES ("CALLER_NUMBER", “CALLEE_NUMBER”, CALL_TUPLE("EVENT",“CALL_DATE”,$“DURATION_IN_SECONDS”),REDUCE(ADD(1))) USING header=“true”, separator=",";

Statement that returns accurate count i.e num_calls = 3

LOAD file1 TO EDGE communication VALUES ("CALLER_NUMBER", “CALLEE_NUMBER”, CALL_TUPLE("EVENT",“CALL_DATE”,$“DURATION_IN_SECONDS”),REDUCE(ADD(1))) USING header=“true”, separator=",";

-Hanif