Hi Yangjin,

It's done to preserve decimal portions of the results. If we return those
as Long values, those decimal portions will be lost.
In order to avoid cast exceptions, please use the correct output mappings
(i.e. Double type)


Thanks
Rajeev


On Wed, May 22, 2013 at 10:27 AM, Yangjin Wu <[email protected]> wrote:

>  Hi all,
> Recently, I've found something wrong in CEP query output attribute
> executors.
> In DivideExpressionExecutorLong.java, the execute method was written as
> ---------------------------------------------------------
>     public Object execute(AtomicEvent event) {
>         return ((Number)
> leftExpressionExecutor.execute(event)).doubleValue() / ((Number)
> rightExpressionExecutor.execute(event)).doubleValue();
>     }
> ---------------------------------------------------------
> hence, the result of the output Object is of type Double, but this
> particular executor requires output type Long.  All executors under the
> divide category
> suffers from this issue.  The consequence is to cause a java cast
> exception when the wrong type of attribute occurs in the output stream, and
> the attribute
> is used in the follo wed queries.
> Hope this will be fixed, thanks.
>
>
> Yangjin Wu
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Rajeev Sampath
Senior Software Engineer
WSO2, Inc.; http://www.wso2.com.

Mobile:* +94716265766
*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to