Skip to content

Commit

Permalink
Use resolve shared instead of steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Sep 20, 2023
1 parent 75b538d commit e4871e3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/compile/data/density.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ export class DensityTransformNode extends DataFlowNode {
this.transform = duplicate(transform); // duplicate to prevent side effects
const specifiedAs = this.transform.as ?? [undefined, undefined];
this.transform.as = [specifiedAs[0] ?? 'value', specifiedAs[1] ?? 'density'];

// set steps when we are grouping so that we get consitent sampling points for imputing and grouping
if (transform.groupby && transform.minsteps == null && transform.maxsteps == null && transform.steps == null) {
this.transform.steps = 200;
}
}

public dependentFields() {
Expand All @@ -42,6 +37,9 @@ export class DensityTransformNode extends DataFlowNode {
field: density,
...rest
};
if (this.transform.groupby) {
result.resolve = 'shared';
}
return result;
}
}

0 comments on commit e4871e3

Please sign in to comment.