Skip to content

Commit

Permalink
Add space to hash
Browse files Browse the repository at this point in the history
  • Loading branch information
invokesus committed Aug 1, 2018
1 parent 153765e commit ea53045
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/compile/data/aggregate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class AggregateNode extends TransformNode {
}

public hash() {
return 'AggregateNode' + hash({dimensions: this.dimensions, measures: this.measures});
return `AggregateNode ${hash({dimensions: this.dimensions, measures: this.measures})}`;
}

public assemble(): VgAggregateTransform {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class BinNode extends TransformNode {
}

public hash() {
return 'BinNode' + hash(this.bins);
return `BinNode ${hash(this.bins)}`;
}

public assemble(): VgTransform[] {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/calculate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class CalculateNode extends DataFlowNode {
}

public hash() {
return 'CalculateNode' + hash(this.transform);
return `CalculateNode ${hash(this.transform)}`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ export class FilterNode extends TransformNode {
}

public hash() {
return 'FilterNode' + hash(this.filter);
return `FilterNode ${hash(this.filter)}`;
}
}
2 changes: 1 addition & 1 deletion src/compile/data/flatten.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class FlattenTransformNode extends TransformNode {
}

public hash() {
return 'FlattenTransformNode' + hash(this.transform);
return `FlattenTransformNode ${hash(this.transform)}`;
}

public assemble(): VgFlattenTransform {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/fold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class FoldTransformNode extends TransformNode {
}

public hash() {
return 'FoldTransformNode' + hash(this.transform);
return `FoldTransformNode ${hash(this.transform)}`;
}

public assemble(): VgFoldTransform {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/impute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class ImputeNode extends TransformNode {
}

public hash() {
return 'ImputeNode' + hash(this.transform);
return `ImputeNode ${hash(this.transform)}`;
}

public assemble() {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class LookupNode extends TransformNode {
}

public hash() {
return 'LookupNode' + hash({transform: this.transform, secondary: this.secondary});
return `LookupNode ${hash({transform: this.transform, secondary: this.secondary})}`;
}

public assemble(): VgLookupTransform {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class SampleTransformNode extends TransformNode {
}

public hash() {
return 'SampleTransformNode' + hash(this.transform);
return `SampleTransformNode ${hash(this.transform)}`;
}
public assemble(): VgSampleTransform {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class StackNode extends TransformNode {
}

public hash() {
return 'StackNode' + hash(this._stack);
return `StackNode ${hash(this._stack)}`;
}

private getGroupbyFields() {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/timeunit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class TimeUnitNode extends TransformNode {
}

public hash() {
return 'TimeUnitNode' + hash(this.formula);
return `TimeUnitNode ${hash(this.formula)}`;
}

public assemble() {
Expand Down
2 changes: 1 addition & 1 deletion src/compile/data/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class WindowTransformNode extends TransformNode {
}

public hash() {
return 'WindowTransformNode' + hash(this.transform);
return `WindowTransformNode ${hash(this.transform)}`;
}

public assemble(): VgWindowTransform {
Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/aggregate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('compile/data/summary', () => {
});

const agg = AggregateNode.makeFromEncoding(null, model);
assert.deepEqual(agg.hash(), 'AggregateNode-97616516');
assert.deepEqual(agg.hash(), 'AggregateNode -97616516');
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/bin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,6 @@ describe('compile/data/bin', () => {
}
});
const binNode = BinNode.makeFromTransform(null, t, model);
assert.deepEqual(binNode.hash(), 'BinNode1594083826');
assert.deepEqual(binNode.hash(), 'BinNode 1594083826');
});
});
2 changes: 1 addition & 1 deletion test/compile/data/calculate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('compile/data/calculate', () => {
}
});
const node = CalculateNode.parseAllForSortIndex(null, model) as CalculateNode;
assert.deepEqual(node.hash(), 'CalculateNode1019364572');
assert.deepEqual(node.hash(), 'CalculateNode 1019364572');
});
});
});
2 changes: 1 addition & 1 deletion test/compile/data/filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('compile/data/filter', () => {
describe('hash', () => {
it('should generate the correct hash', () => {
const filterNode = new FilterNode(null, null, {field: 'a', equal: {year: 2000}});
assert.deepEqual(filterNode.hash(), 'FilterNode{"equal":{"year":2000},"field":"a"}');
assert.deepEqual(filterNode.hash(), 'FilterNode {"equal":{"year":2000},"field":"a"}');
});
});
});
2 changes: 1 addition & 1 deletion test/compile/data/flatten.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('compile/data/flatten', () => {
flatten: ['a', 'b']
};
const flatten = new FlattenTransformNode(null, transform);
assert.deepEqual(flatten.hash(), 'FlattenTransformNode{"as":["a","b"],"flatten":["a","b"]}');
assert.deepEqual(flatten.hash(), 'FlattenTransformNode {"as":["a","b"],"flatten":["a","b"]}');
});
});
});
2 changes: 1 addition & 1 deletion test/compile/data/fold.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('compile/data/fold', () => {
as: ['A', 'B']
};
const fold = new FoldTransformNode(null, transform);
assert.deepEqual(fold.hash(), 'FoldTransformNode{"as":["A","B"],"fold":["a","b"]}');
assert.deepEqual(fold.hash(), 'FoldTransformNode {"as":["A","B"],"fold":["a","b"]}');
});
});
});
2 changes: 1 addition & 1 deletion test/compile/data/impute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe('compile/data/impute', () => {
value: 200
};
const impute = new ImputeNode(null, transform);
assert.deepEqual(impute.hash(), 'ImputeNode{"impute":"y","key":"x","method":"value","value":200}');
assert.deepEqual(impute.hash(), 'ImputeNode {"impute":"y","key":"x","method":"value","value":200}');
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/lookup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ describe('compile/data/lookup', () => {
);
lookup.assemble();

assert.equal(lookup.hash(), 'LookupNode-848385244');
assert.equal(lookup.hash(), 'LookupNode -848385244');
});
});
2 changes: 1 addition & 1 deletion test/compile/data/sample.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('compile/data/sample', () => {
sample: 500
};
const sample = new SampleTransformNode(null, transform);
assert.deepEqual(sample.hash(), 'SampleTransformNode{"sample":500}');
assert.deepEqual(sample.hash(), 'SampleTransformNode {"sample":500}');
});
});
});
2 changes: 1 addition & 1 deletion test/compile/data/stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ describe('compile/data/stack', () => {
}
});
const stack = StackNode.makeFromEncoding(null, model);
assert.deepEqual(stack.hash(), 'StackNode-2072318240');
assert.deepEqual(stack.hash(), 'StackNode -2072318240');
});
});
});
2 changes: 1 addition & 1 deletion test/compile/data/timeunit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('compile/data/timeunit', () => {
}
});
const timeUnitNode = TimeUnitNode.makeFromEncoding(null, model);
assert.deepEqual(timeUnitNode.hash(), 'TimeUnitNode{"month_a":{"as":"month_a","field":"a","timeUnit":"month"}}');
assert.deepEqual(timeUnitNode.hash(), 'TimeUnitNode {"month_a":{"as":"month_a","field":"a","timeUnit":"month"}}');
});
});
});
2 changes: 1 addition & 1 deletion test/compile/data/window.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,6 @@ describe('compile/data/window', () => {
};
const window = new WindowTransformNode(null, transform);
const hash = window.hash();
assert.deepEqual(hash, 'WindowTransformNode1103660051');
assert.deepEqual(hash, 'WindowTransformNode 1103660051');
});
});

0 comments on commit ea53045

Please sign in to comment.