-
Notifications
You must be signed in to change notification settings - Fork 44
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
[FIX] pivot: finer grained cycle detection #5026
Conversation
Steps to reproduce: - insert a fixed pivot (not dynamic!) - insert a new calculated measure - in the calculated measure formula, reference one of a cell which contains a header formula => the cell becomes a #CYCLE even though there's no circular dependendy between the calculated measure and the other dimension header Task: 4214188
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pouet pouet 🎺
@@ -37,7 +37,8 @@ export function assertDomainLength(domain: Maybe<FunctionResultObject>[]) { | |||
|
|||
export function addPivotDependencies( | |||
evalContext: EvalContext, | |||
coreDefinition: PivotCoreDefinition | |||
coreDefinition: PivotCoreDefinition, | |||
forMeasures: PivotCoreMeasure[] | |||
) { | |||
//TODO This function can be very costly when used with PIVOT.VALUE and PIVOT.HEADER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated: what's the state of this TODO ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think it's still a todo until we find it to be a real bottleneck ;-)
@@ -813,7 +817,7 @@ export const PIVOT = { | |||
const pivotId = getPivotId(_pivotFormulaId, this.getters); | |||
const pivot = this.getters.getPivot(pivotId); | |||
const coreDefinition = this.getters.getPivotCoreDefinition(pivotId); | |||
addPivotDependencies(this, coreDefinition); | |||
addPivotDependencies(this, coreDefinition, coreDefinition.measures); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now we can reference headers of PIVOT.HEADER()
but not headers originating from a spread pivot formula if I understand the code correctly. Do you think there's any way we can make that work ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think there's any way we can make that work ?
yes, but it'd be quite difficult I think. Every cell would need to be computed in the correct dependency order, when they are needed.
@robodoo r+ |
Description:
Steps to reproduce:
=> the cell becomes a #CYCLE even though there's no circular dependendy
between the calculated measure and the other dimension header
Task: 4214188
review checklist