[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1075) Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc

Michael Neale (JIRA) jira-events at lists.jboss.org
Thu Jan 7 01:50:31 EST 2010


    [ https://jira.jboss.org/jira/browse/JBRULES-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12502629#action_12502629 ] 

Michael Neale commented on JBRULES-1075:
----------------------------------------

Edson - what state is the patch in - has it made it in - will it make it? 

> Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc 
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-1075
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-1075
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler
>    Affects Versions:  4.0.0.GA
>            Reporter: Geoffrey De Smet
>            Assignee: Edson Tirelli
>            Priority: Minor
>             Fix For: FUTURE
>
>         Attachments: JBRULES-1075.patch
>
>
> TTP nl10 solver has about a 3% performance increase when switching from sumDouble to sumLong (and possibly a bit more when switching to sumInteger)
> There are 2 ways I see to implement this:
> 1) Force the user to explicitly declare he wants to use an integer based sum and add a sumInteger.
> This is not so user-friendly. This is what I 've done in the patch.
> 2) Support overloading of accumulate functions based on the function arguments.
> AFAIK drl is strongly typed (at least with the java dialect), so it should be theoretically possible for the drl parser to see
>  sum($myInteger)
> and bind it to SumIntegerAccumulateFunction,
> while binding
>  sum($myInteger.doubleValue())
> to SumDoubleAccumulateFunction.
> And added advantage is that the drl compiler will also mark some bugs as compiler errors. For example
>   sum($myString)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list