MCPcopy Create free account
hub / github.com/alignoth/alignoth / assemble

Method assemble

resources/vega-lite.min.js:10429–10467  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10427 return `WindowTransform ${d(this.transform)}`;
10428 }
10429 assemble() {
10430 const e = [],
10431 t = [],
10432 n = [],
10433 i = [];
10434 for (const r of this.transform.window)
10435 (t.push(r.op),
10436 n.push(this.getDefaultName(r)),
10437 i.push(void 0 === r.param ? null : r.param),
10438 e.push(void 0 === r.field ? null : r.field));
10439 const r = this.transform.frame,
10440 o = this.transform.groupby;
10441 if (r && null === r[0] && null === r[1] && t.every((e) => sn(e)))
10442 return {
10443 type: "joinaggregate",
10444 as: n,
10445 ops: t,
10446 fields: e,
10447 ...(void 0 !== o ? { groupby: o } : {}),
10448 };
10449 const a = [],
10450 s = [];
10451 if (void 0 !== this.transform.sort)
10452 for (const e of this.transform.sort)
10453 (a.push(e.field), s.push(e.order ?? "ascending"));
10454 const l = { field: a, order: s },
10455 c = this.transform.ignorePeers;
10456 return {
10457 type: "window",
10458 params: i,
10459 as: n,
10460 ops: t,
10461 fields: e,
10462 sort: l,
10463 ...(void 0 !== c ? { ignorePeers: c } : {}),
10464 ...(void 0 !== o ? { groupby: o } : {}),
10465 ...(void 0 !== r ? { frame: r } : {}),
10466 };
10467 }
10468 }
10469 function em(e) {
10470 if (e instanceof Dd)

Callers

nothing calls this directly

Calls 2

getDefaultNameMethod · 0.95
snFunction · 0.85

Tested by

no test coverage detected