Skip to content

Conversation

@ffonseca-dev
Copy link
Contributor

When using execute_mdx() with top=n with n smaller than the number of dimensions in the cube, the result showed only the first n columns (coordinates) instead of all columns and only n rows. This pull request fixes this issue, and also improves the performance a bit by using skip in the Axis query as well, which leads to a smaller response.

ffonseca-dev and others added 2 commits March 28, 2023 19:43
    Fix the positioning of $top and $skip in the Axis to apply to tuples in the function extract_cellset_raw_response()

Utils.py
    Fix the cell_ordinal in the function build_content_from_cellset_dict() to match the axis ordinals.
issue/fix-cell-write-top-skip

content_as_dict = CaseAndSpaceInsensitiveTuplesDict()
for cell_ordinal, cell in enumerate(cells[:top or len(cells)]):
# if skip is used in execution we must use the original ordinal from the cell, if not we can simply enumerate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can simply skip this logic.

To verify if you change breaks anything, you can install pytests (pip install pytests) and run the tests in CellService_test.py

image

@MariusWirtz MariusWirtz added this to the 1.11 milestone Mar 30, 2023
@MariusWirtz
Copy link
Collaborator

@cwffonseca two things.

  1. Pleas rebase this branch on the current master.

  2. Your changes make sense but they break 5 tests. Can you please double check the logic?

image

@MariusWirtz MariusWirtz modified the milestones: 1.11, 1.12 Apr 13, 2023
@MariusWirtz
Copy link
Collaborator

solved with #923

@MariusWirtz MariusWirtz closed this Jun 4, 2023
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