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

feat: use consistent quotes that don't need to be escaped #9234

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 10 additions & 7 deletions src/predicate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,23 +209,26 @@ export function fieldFilterExpression(predicate: FieldPredicate, useInRange = tr
: rawFieldExpr;

if (isFieldEqualPredicate(predicate)) {
return `${fieldExpr}===${predicateValueExpr(predicate.equal, unit)}`;
const equal = predicate.equal;
return `${fieldExpr} === ${predicateValueExpr(equal, unit)}`;
Copy link
Member

Choose a reason for hiding this comment

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

Let's change spacing in a separate pull request.

} else if (isFieldLTPredicate(predicate)) {
const upper = predicate.lt;
return `${fieldExpr}<${predicateValueExpr(upper, unit)}`;
return `${fieldExpr} < ${predicateValueExpr(upper, unit)}`;
} else if (isFieldGTPredicate(predicate)) {
const lower = predicate.gt;
return `${fieldExpr}>${predicateValueExpr(lower, unit)}`;
return `${fieldExpr} > ${predicateValueExpr(lower, unit)}`;
} else if (isFieldLTEPredicate(predicate)) {
const upper = predicate.lte;
return `${fieldExpr}<=${predicateValueExpr(upper, unit)}`;
return `${fieldExpr} <= ${predicateValueExpr(upper, unit)}`;
} else if (isFieldGTEPredicate(predicate)) {
const lower = predicate.gte;
return `${fieldExpr}>=${predicateValueExpr(lower, unit)}`;
return `${fieldExpr} >= ${predicateValueExpr(lower, unit)}`;
} else if (isFieldOneOfPredicate(predicate)) {
return `indexof([${predicateValuesExpr(predicate.oneOf, unit).join(',')}], ${fieldExpr}) !== -1`;
const oneOf = predicate.oneOf;
return `indexof([${predicateValuesExpr(oneOf, unit).join(',')}], ${fieldExpr}) !== -1`;
} else if (isFieldValidPredicate(predicate)) {
return fieldValidPredicate(fieldExpr, predicate.valid);
const valid = predicate.valid;
return fieldValidPredicate(fieldExpr, valid);
Copy link
Member

Choose a reason for hiding this comment

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

Not really a need to define a variable for one use.

} else if (isFieldRangePredicate(predicate)) {
const {range} = predicate;
const lower = isSignalRef(range) ? {signal: `${range.signal}[0]`} : range[0];
Expand Down
10 changes: 7 additions & 3 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,17 @@ export function accessPathWithDatum(path: string, datum = 'datum') {
* @param datum The string to use for `datum`.
*/
export function flatAccessWithDatum(path: string, datum: 'datum' | 'parent' | 'datum.datum' = 'datum') {
return `${datum}[${stringValue(splitAccessPath(path).join('.'))}]`;
return `${datum}[${doubleQuotes2Single(stringValue(splitAccessPath(path).join('.')))}]`;
}

function escapePathAccess(string: string) {
return string.replace(/(\[|\]|\.|'|")/g, '\\$1');
}

function doubleQuotes2Single(string: string) {
Copy link
Member

Choose a reason for hiding this comment

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

No, we can't do this. It's too brittle and possibly introduces errors. If we want to change the quotes, we need to extend stringValue to accept a quote parameter.

return string.replace(/"/g, "'");
}

/**
* Replaces path accesses with access to non-nested field.
* For example, `foo["bar"].baz` becomes `foo\\.bar\\.baz`.
Expand Down Expand Up @@ -476,7 +480,7 @@ export function stringify(data: any) {

if (node === undefined) return undefined;
if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';
if (typeof node !== 'object') return JSON.stringify(node);
if (typeof node !== 'object') return doubleQuotes2Single(JSON.stringify(node));

let i, out;
if (Array.isArray(node)) {
Expand All @@ -503,7 +507,7 @@ export function stringify(data: any) {

if (!value) continue;
if (out) out += ',';
out += JSON.stringify(key) + ':' + value;
out += doubleQuotes2Single(JSON.stringify(key)) + ':' + value;
}
seen.splice(seenIndex, 1);
return `{${out}}`;
Expand Down
12 changes: 6 additions & 6 deletions test/channeldef.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ describe('fieldDef', () => {
});

it('should access flattened fields in expression', () => {
expect(vgField({field: 'foo.bar\\.baz'}, {expr: 'datum'})).toBe('datum["foo.bar.baz"]');
expect(vgField({field: 'foo.bar\\.baz'}, {expr: 'datum'})).toBe("datum['foo.bar.baz']");
});

it('should access argmin/argmax fields in expression', () => {
expect(vgField({aggregate: {argmin: 'b'}, field: 'a'})).toBe('argmin_b["a"]');
expect(vgField({aggregate: {argmax: 'b'}, field: 'a'})).toBe('argmax_b["a"]');
expect(vgField({aggregate: {argmin: 'b'}, field: 'a'})).toBe("argmin_b['a']");
expect(vgField({aggregate: {argmax: 'b'}, field: 'a'})).toBe("argmax_b['a']");
});

it('should support argmin/argmax field names with space', () => {
expect(vgField({aggregate: {argmin: 'foo bar'}, field: 'bar baz'}, {expr: 'datum'})).toBe(
'datum["argmin_foo bar"]["bar baz"]'
"datum['argmin_foo bar']['bar baz']"
);
expect(vgField({aggregate: {argmax: 'foo bar'}, field: 'bar baz'}, {expr: 'datum'})).toBe(
'datum["argmax_foo bar"]["bar baz"]'
"datum['argmax_foo bar']['bar baz']"
);
});

Expand All @@ -48,7 +48,7 @@ describe('fieldDef', () => {
});

it('should support fields with space in datum', () => {
expect(vgField({field: 'foo bar'}, {expr: 'datum'})).toBe('datum["foo bar"]');
expect(vgField({field: 'foo bar'}, {expr: 'datum'})).toBe("datum['foo bar']");
});
});

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

const axes = model.assembleAxes();
expect(axes[1].encode.labels.update.text).toEqual({
signal: 'myFormat(datum.value, {"a":"b"})[0]'
signal: "myFormat(datum.value, {'a':'b'})[0]"
});
});
});
8 changes: 4 additions & 4 deletions test/compile/axis/encode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('compile/axis/encode', () => {
config: {customFormatTypes: true}
});
const labels = encode.labels(model, 'x', {});
expect(labels.text.signal).toBe('customNumberFormat(datum.value, "abc")');
expect(labels.text.signal).toBe("customNumberFormat(datum.value, 'abc')");
});

it('applies custom format type without format', () => {
Expand All @@ -59,7 +59,7 @@ describe('compile/axis/encode', () => {
config: {customFormatTypes: true, numberFormat: 'abc', numberFormatType: 'customNumberFormat'}
});
const labels = encode.labels(model, 'x', {});
expect(labels.text.signal).toBe('customNumberFormat(datum.value, "abc")');
expect(labels.text.signal).toBe("customNumberFormat(datum.value, 'abc')");
});

it('applies custom format type from a normalized stack', () => {
Expand All @@ -75,7 +75,7 @@ describe('compile/axis/encode', () => {
}
});
const labels = encode.labels(model, 'x', {});
expect(labels.text.signal).toBe('customNumberFormat(datum.value, "abc")');
expect(labels.text.signal).toBe("customNumberFormat(datum.value, 'abc')");
});

it('applies custom timeFormatType from config', () => {
Expand All @@ -87,7 +87,7 @@ describe('compile/axis/encode', () => {
config: {customFormatTypes: true, timeFormat: 'abc', timeFormatType: 'customTimeFormat'}
});
const labels = encode.labels(model, 'x', {});
expect(labels.text.signal).toBe('customTimeFormat(datum.value, "abc")');
expect(labels.text.signal).toBe("customTimeFormat(datum.value, 'abc')");
});

it('prefers timeUnit over timeFormatType from config', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/compile/axis/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ describe('Axis', () => {
const axisComponent = parseUnitAxes(model);
expect(axisComponent['x']).toHaveLength(1);
expect(axisComponent['x'][0].get('format')).toEqual({
signal: 'timeUnitSpecifier(["quarter"], {"year-month":"%b %Y ","year-month-date":"%b %d, %Y "})'
signal: "timeUnitSpecifier(['quarter'], {'year-month':'%b %Y ','year-month-date':'%b %d, %Y '})"
});
});

Expand Down Expand Up @@ -446,7 +446,7 @@ describe('Axis', () => {
const axisComponent = parseUnitAxes(model);
expect(axisComponent['x']).toHaveLength(1);
expect(axisComponent['x'][0].get('format')).toEqual({
signal: 'timeUnitSpecifier(["year","quarter","month"], {"year-month":"%b %Y ","year-month-date":"%b %d, %Y "})'
signal: "timeUnitSpecifier(['year','quarter','month'], {'year-month':'%b %Y ','year-month-date':'%b %d, %Y '})"
});
});
});
Expand Down
4 changes: 2 additions & 2 deletions test/compile/data/calculate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
const nodes = assembleFromSortArray(model);
expect(nodes).toEqual({
type: 'formula',
expr: 'datum["a"]==="B" ? 0 : datum["a"]==="A" ? 1 : datum["a"]==="C" ? 2 : 3',
expr: "datum['a'] === 'B' ? 0 : datum[\'a\'] === 'A' ? 1 : datum['a'] === 'C' ? 2 : 3",

Check warning on line 31 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Replace `\'a\` with `'a`

Check failure on line 31 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'

Check failure on line 31 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'
as: 'x_a_sort_index'
});
});
Expand Down Expand Up @@ -64,7 +64,7 @@
});
const node = CalculateNode.parseAllForSortIndex(null, model) as CalculateNode;
expect(node.hash()).toBe(
'Calculate {"as":"x_a_sort_index","calculate":"datum[\\"a\\"]===\\"B\\" ? 0 : datum[\\"a\\"]===\\"A\\" ? 1 : datum[\\"a\\"]===\\"C\\" ? 2 : 3"}'
"Calculate {'as':'x_a_sort_index','calculate':'datum[\'a\'] === \\'B\\' ? 0 : datum[\'a\'] === \\'A\\' ? 1 : datum[\'a\'] === \\'C\\' ? 2 : 3'}"

Check warning on line 67 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Replace `\'a\']·===·\\'B\\'·?·0·:·datum[\'a\']·===·\\'A\\'·?·1·:·datum[\'a\` with `'a']·===·\\'B\\'·?·0·:·datum['a']·===·\\'A\\'·?·1·:·datum['a`

Check failure on line 67 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'

Check failure on line 67 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'

Check failure on line 67 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'

Check failure on line 67 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'

Check failure on line 67 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'

Check failure on line 67 in test/compile/data/calculate.test.ts

View workflow job for this annotation

GitHub Actions / Runtime, Linting, and Coverage

Unnecessary escape character: \'
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/density.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ describe('compile/data/fold', () => {
as: ['A', 'B']
};
const density = new DensityTransformNode(null, transform);
expect(density.hash()).toBe('DensityTransform {"as":["A","B"],"density":"v"}');
expect(density.hash()).toBe("DensityTransform {'as':['A','B'],'density':'v'}");
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/extent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('compile/data/extent', () => {
param: 'A'
};
const extent = new ExtentTransformNode(null, transform);
expect(extent.hash()).toBe('ExtentTransform {"extent":"a","param":"A"}');
expect(extent.hash()).toBe("ExtentTransform {'extent':'a','param':'A'}");
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/compile/data/filter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('compile/data/filter', () => {
describe('hash', () => {
it('should generate the correct hash', () => {
const filterNode = new FilterNode(null, null, {field: 'a', equal: {year: 2000}});
expect(filterNode.hash()).toBe('Filter datum["a"]===time(datetime(2000, 0, 1, 0, 0, 0, 0))');
expect(filterNode.hash()).toBe("Filter datum['a'] === time(datetime(2000, 0, 1, 0, 0, 0, 0))");
});
});

Expand All @@ -78,7 +78,7 @@ describe('compile/data/filter', () => {
describe('assemble()', () => {
it('converts expr in predicates correctly', () => {
const node = new FilterNode(null, null, {field: 'foo', equal: {expr: 'bar'}});
expect(node.assemble().expr).toBe('datum["foo"]===bar');
expect(node.assemble().expr).toBe("datum['foo'] === bar");
});
});
});
4 changes: 2 additions & 2 deletions test/compile/data/filterinvalid.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('compile/data/filterinvalid', () => {

expect(parse(model).assemble()).toEqual({
type: 'filter',
expr: 'isValid(datum["foo"]) && isFinite(+datum["foo"])'
expr: "isValid(datum['foo']) && isFinite(+datum['foo'])"
});
});

Expand All @@ -113,7 +113,7 @@ describe('compile/data/filterinvalid', () => {

expect(parse(model).assemble()).toEqual({
type: 'filter',
expr: 'isValid(datum["foo.bar"]) && isFinite(+datum["foo.bar"])'
expr: "isValid(datum['foo.bar']) && isFinite(+datum['foo.bar'])"
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/flatten.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('compile/data/flatten', () => {
flatten: ['a', 'b']
};
const flatten = new FlattenTransformNode(null, transform);
expect(flatten.hash()).toBe('FlattenTransform {"as":["a","b"],"flatten":["a","b"]}');
expect(flatten.hash()).toBe("FlattenTransform {'as':['a','b'],'flatten':['a','b']}");
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/fold.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('compile/data/fold', () => {
as: ['A', 'B']
};
const fold = new FoldTransformNode(null, transform);
expect(fold.hash()).toBe('FoldTransform {"as":["A","B"],"fold":["a","b"]}');
expect(fold.hash()).toBe("FoldTransform {'as':['A','B'],'fold':['a','b']}");
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/impute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ describe('compile/data/impute', () => {
value: 200
};
const impute = new ImputeNode(null, transform);
expect(impute.hash()).toBe('Impute {"impute":"y","key":"x","method":"value","value":200}');
expect(impute.hash()).toBe("Impute {'impute':'y','key':'x','method':'value','value':200}");
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/loess.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ describe('compile/data/fold', () => {
as: ['A', 'B']
};
const loess = new LoessTransformNode(null, transform);
expect(loess.hash()).toBe('LoessTransform {"as":["A","B"],"loess":"y","on":"x"}');
expect(loess.hash()).toBe("LoessTransform {'as':['A','B'],'loess':'y','on':'x'}");
});
});

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 @@ -205,7 +205,7 @@ describe('compile/data/lookup', () => {
lookup.assemble();

expect(lookup.hash()).toBe(
'Lookup {"secondary":"lookup_0","transform":{"as":"lookedup","from":{"data":{"url":"data/lookup_people.csv"},"key":"name"},"lookup":"person"}}'
"Lookup {'secondary':'lookup_0','transform':{'as':'lookedup','from':{'data':{'url':'data/lookup_people.csv'},'key':'name'},'lookup':'person'}}"
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/pivot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('compile/data/pivot', () => {
value: 'b'
};
const pivot = new PivotTransformNode(null, transform);
expect(pivot.hash()).toBe('PivotTransform {"pivot":"a","value":"b"}');
expect(pivot.hash()).toBe("PivotTransform {'pivot':'a','value':'b'}");
});

describe('clone', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/quantile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('compile/data/fold', () => {
as: ['A', 'B']
};
const quantile = new QuantileTransformNode(null, transform);
expect(quantile.hash()).toBe('QuantileTransform {"as":["A","B"],"quantile":"x"}');
expect(quantile.hash()).toBe("QuantileTransform {'as':['A','B'],'quantile':'x'}");
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/sample.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('compile/data/sample', () => {
describe('producedFields', () => {
it('should generate the correct hash', () => {
const sample = new SampleTransformNode(null, transform);
expect(sample.hash()).toBe('SampleTransform {"sample":500}');
expect(sample.hash()).toBe("SampleTransform {'sample':500}");
});

it('should produce different hashes for different samples', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/compile/data/stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ describe('compile/data/stack', () => {
expect(assemble(model)).toEqual([
{
type: 'formula',
expr: '0.5*datum["bin_maxbins_10_b"]+0.5*datum["bin_maxbins_10_b_end"]',
expr: "0.5*datum['bin_maxbins_10_b']+0.5*datum['bin_maxbins_10_b_end']",
as: 'bin_maxbins_10_b_mid'
},
{
Expand Down Expand Up @@ -350,7 +350,7 @@ describe('compile/data/stack', () => {
});
const stack = StackNode.makeFromEncoding(null, model);
expect(stack.hash()).toBe(
'Stack {"as":["sum_a_start","sum_a_end"],"dimensionFieldDefs":[{"field":"b","type":"nominal"}],"facetby":[],"impute":false,"offset":"zero","sort":{"field":["c"],"order":["ascending"]},"stackField":"sum_a","stackby":["c"]}'
"Stack {'as':['sum_a_start','sum_a_end'],'dimensionFieldDefs':[{'field':'b','type':'nominal'}],'facetby':[],'impute':false,'offset':'zero','sort':{'field':['c'],'order':['ascending']},'stackField':'sum_a','stackby':['c']}"
);
});

Expand Down
6 changes: 3 additions & 3 deletions test/compile/data/timeunit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('compile/data/timeunit', () => {
});
const timeUnitNode = TimeUnitNode.makeFromEncoding(null, model);
expect(timeUnitNode.hash()).toBe(
'TimeUnit {"{\\"as\\":\\"month_a\\",\\"field\\":\\"a\\",\\"timeUnit\\":{\\"unit\\":\\"month\\"}}":{"as":"month_a","field":"a","timeUnit":{"unit":"month"}}}'
"TimeUnit {'{'as':'month_a','field':'a','timeUnit':{'unit':'month'}}':{'as':'month_a','field':'a','timeUnit':{'unit':'month'}}}"
);
});
it('should generate the correct hash for bar', () => {
Expand All @@ -260,7 +260,7 @@ describe('compile/data/timeunit', () => {
});
const timeUnitNode = TimeUnitNode.makeFromEncoding(null, model);
expect(timeUnitNode.hash()).toBe(
'TimeUnit {"{\\"as\\":\\"month_a\\",\\"field\\":\\"a\\",\\"timeUnit\\":{\\"unit\\":\\"month\\"}}":{"as":"month_a","field":"a","timeUnit":{"unit":"month"}}}'
"TimeUnit {'{'as':'month_a','field':'a','timeUnit':{'unit':'month'}}':{'as':'month_a','field':'a','timeUnit':{'unit':'month'}}}"
);
});

Expand All @@ -274,7 +274,7 @@ describe('compile/data/timeunit', () => {
});
const timeUnitNode = TimeUnitNode.makeFromEncoding(null, model);
expect(timeUnitNode.hash()).toBe(
'TimeUnit {"{\\"as\\":\\"utcmonth_step_10_a\\",\\"field\\":\\"a\\",\\"timeUnit\\":{\\"step\\":10,\\"unit\\":\\"month\\",\\"utc\\":true}}":{"as":"utcmonth_step_10_a","field":"a","timeUnit":{"step":10,"unit":"month","utc":true}}}'
"TimeUnit {'{'as':'utcmonth_step_10_a','field':'a','timeUnit':{'step':10,'unit':'month','utc':true}}':{'as':'utcmonth_step_10_a','field':'a','timeUnit':{'step':10,'unit':'month','utc':true}}}"
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/compile/data/window.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ describe('compile/data/window', () => {
const window = new WindowTransformNode(null, transform);
const hash = window.hash();
expect(hash).toBe(
'WindowTransform {"frame":[null,0],"groupby":["f"],"ignorePeers":false,"sort":[{"field":"f","order":"ascending"}],"window":[{"as":"ordered_row_number","op":"row_number"}]}'
"WindowTransform {'frame':[null,0],'groupby':['f'],'ignorePeers':false,'sort':[{'field':'f','order':'ascending'}],'window':[{'as':'ordered_row_number','op':'row_number'}]}"
);
});
});