[JBoss JIRA] (DROOLS-315) Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/DROOLS-315?page=com.atlassian.jira.plugin... ]
Geoffrey De Smet updated DROOLS-315:
------------------------------------
Description:
Using a sum(Number) accumulate of these 2 numbers: new BigDecimal("0.01") and new BigDecimal("0.09") give an incorrect result of 0.09999999999999999.
Support sumBigDecimal(BigDecimal) or better yet sum(BigDecimal).
Old description:
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)
was:
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)
> Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
> -----------------------------------------------------------------------------------------------------
>
> Key: DROOLS-315
> URL: https://issues.jboss.org/browse/DROOLS-315
> Project: Drools
> Issue Type: Feature Request
> Reporter: Geoffrey De Smet
> Assignee: Edson Tirelli
> Priority: Critical
> Attachments: JBRULES-1075.patch
>
>
> Using a sum(Number) accumulate of these 2 numbers: new BigDecimal("0.01") and new BigDecimal("0.09") give an incorrect result of 0.09999999999999999.
> Support sumBigDecimal(BigDecimal) or better yet sum(BigDecimal).
> Old description:
> 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 was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month
[JBoss JIRA] (DROOLS-315) Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/DROOLS-315?page=com.atlassian.jira.plugin... ]
Geoffrey De Smet updated DROOLS-315:
------------------------------------
Priority: Critical (was: Minor)
> Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
> -----------------------------------------------------------------------------------------------------
>
> Key: DROOLS-315
> URL: https://issues.jboss.org/browse/DROOLS-315
> Project: Drools
> Issue Type: Feature Request
> Reporter: Geoffrey De Smet
> Assignee: Edson Tirelli
> Priority: Critical
> 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 was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month
[JBoss JIRA] (DROOLS-315) Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/DROOLS-315?page=com.atlassian.jira.plugin... ]
Geoffrey De Smet commented on DROOLS-315:
-----------------------------------------
Edson,
What's the status of this issue? Do we have sumInt(), sumLong(), sumBigDecimal() available yet in Drools?
Or better yet, overloaded methods support, so sum(int), sum(long), sum(BigDecimal) just do the right thing (instead of using sum(double))?
> Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
> -----------------------------------------------------------------------------------------------------
>
> Key: DROOLS-315
> URL: https://issues.jboss.org/browse/DROOLS-315
> Project: Drools
> Issue Type: Feature Request
> Reporter: Geoffrey De Smet
> Assignee: Edson Tirelli
> Priority: Minor
> 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 was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month
[JBoss JIRA] (WFLY-4441) web.xml parser process cannot handle exception for xml file which does not have the encoding attribute
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-4441?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-4441:
-----------------------------------------------
Tomas Hofman <thofman(a)redhat.com> changed the Status of [bug 1184292|https://bugzilla.redhat.com/show_bug.cgi?id=1184292] from ASSIGNED to POST
> web.xml parser process cannot handle exception for xml file which does not have the encoding attribute
> ------------------------------------------------------------------------------------------------------
>
> Key: WFLY-4441
> URL: https://issues.jboss.org/browse/WFLY-4441
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 9.0.0.Alpha1
> Reporter: Tomas Hofman
> Assignee: Tomas Hofman
>
> Description copied from https://bugzilla.redhat.com/show_bug.cgi?id=1184292
> Description of problem:
> When XMLStreamException occurs by web.xml parser process for xml file which does not have the encoding attribute, e.getLocation()[1] is null. We cannot find cause of exception by NullPointerException.
> [1]
> - org.jboss.as.web.deployment.WebParsingDeploymentProcessor.java
> #115 } catch (XMLStreamException e) {
> -> #116 throw new DeploymentUnitProcessingException(MESSAGES.failToParseXMLDescriptor(webXml, e.getLocation().getLineNumber(), e.getLocation().getColumnNumber()), e);
> #117 } catch (IOException e) {
> #118 throw new DeploymentUnitProcessingException(MESSAGES.failToParseXMLDescriptor(webXml), e);
> #119 }
> Version-Release number of selected component (if applicable):
> EAP 6.3.2
> How reproducible:
> Attached web.xml for reproducing.
> Steps to Reproduce:
> 1. Create war application using attached web.xml.
> 2. Deploy war to EAP.
> 3. Start EAP.
> Actual results:
> You can confirm NullPointerException.
> 15:56:23,190 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."test.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".PARSE: JBAS018733: Failed to process phase PARSE of deployment "test.war"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.4.2.Final-redhat-2.jar:7.4.2.Final-redhat-2]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_71]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]
> Caused by: java.lang.NullPointerException
> at org.jboss.as.web.deployment.WebParsingDeploymentProcessor.deploy(WebParsingDeploymentProcessor.java:116)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.2.Final-redhat-2.jar:7.4.2.Final-redhat-2]
> ... 5 more
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month
[JBoss JIRA] (DROOLS-755) CDI @KieSession has no default value name
by Mauricio Salatino (JIRA)
Mauricio Salatino created DROOLS-755:
----------------------------------------
Summary: CDI @KieSession has no default value name
Key: DROOLS-755
URL: https://issues.jboss.org/browse/DROOLS-755
Project: Drools
Issue Type: Bug
Reporter: Mauricio Salatino
Assignee: Mario Fusco
Priority: Trivial
We need to support a default KieSession for the @KSession annotation. IN the same way that it is supported for the standard java services:
KieSession kSession = kContainer.newKieSession();
@KieSession() failed to compile due it requires a name for the session, which breaks the support for an empty kmodule.xml
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 1 month