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

TopBottomPercentSumFunDef fails when passing a NamedSet to it. #1130

Open
chubbard opened this issue Jun 26, 2019 · 0 comments
Open

TopBottomPercentSumFunDef fails when passing a NamedSet to it. #1130

chubbard opened this issue Jun 26, 2019 · 0 comments

Comments

@chubbard
Copy link

chubbard commented Jun 26, 2019

TopBottomPercentSumFunDef:76 fails and returns a null if you pass a NamedSet. Then when it goes to evaluate it then it throws a NullPointerException on line 121. The reason is because it's using a different way of compiling the list versus TopBottomCountFunDef which DOES work with NamedSets.

Example MDX Query:

WITH  SET TimeFrame as '{[EmploymentDate].[yearQuarterMonth].[2017].[1]:[EmploymentDate].[yearQuarterMonth].[2018].[4]}'
SELECT 
    NON EMPTY { [Measures].[terminations] } ON COLUMNS,
    NON EMPTY TopPercent( [TimeFrame], 25, [Measures].[terminations] ) on ROWS,
FROM [MyCube]

And the exception:

 Caused by: java.lang.NullPointerException
at mondrian.olap.fun.TopBottomPercentSumFunDef$CalcImpl.evaluateList(TopBottomPercentSumFunDef.java:121)
at mondrian.calc.impl.AbstractListCalc.evaluateIterable(AbstractListCalc.java:71)
at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:857)
at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:693)
at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:649)
at mondrian.rolap.RolapResult.<init>(RolapResult.java:279)
at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:500)

This was tested on Pentaho 4.3.1.10

chubbard added a commit to chubbard/mondrian that referenced this issue Jun 26, 2019
TopBottomCountFunDef compilation code which does work with NamedSets
as expected.
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

No branches or pull requests

1 participant