Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKLOG-11838] Data Service AVG() aggregates are rounded down #222

Open
wants to merge 1 commit into
base: 7.0
Choose a base branch
from

Conversation

mkambol
Copy link
Contributor

@mkambol mkambol commented Nov 2, 2016

For TYPE_INTEGER fields, the avg calculation will truncate any
decimals. Most databases will implicitly convert to double in such
cases. This change alters the type of integer fields used in an
avg aggregation to TYPE_NUMBER prior to the in-memory group by.

http://jira.pentaho.com/browse/BACKLOG-11838
(cherry picked from commit 5291f66)

@kcruzada

For TYPE_INTEGER fields, the avg calculation will truncate any
decimals.  Most databases will implicitly convert to double in such
cases.  This change alters the type of integer fields used in an
avg aggregation to TYPE_NUMBER prior to the in-memory group by.

http://jira.pentaho.com/browse/BACKLOG-11838
(cherry picked from commit 5291f66)
@wingman-pentaho
Copy link
Collaborator

Build Completed

✅ This pull request has passed all validations.

Build Commands

mvn -B -fn -DrunITs=true -f pom.xml clean install && mvn -B -f pom.xml site

Cleanup Commands

mvn -B -f pom.xml build-helper:remove-project-artifact

Changed files

  src/main/java/org/pentaho/di/trans/dataservice/SqlTransGenerator.java
  src/test/java/org/pentaho/di/trans/dataservice/SqlTransGeneratorTest.java

Unit test coverage change

These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

org.pentaho.di.trans.dataservice.SqlTransGenerator
  • Branch Change: + .36%
  • Complexity Change: + 2.51%
  • Instruction Change: + .52%
  • Line Change: + .74%
  • Method Change: + 3.88%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants