@malloydata/render 0.0.225-dev250106171109 → 0.0.225-dev250111002123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3253,7 +3253,7 @@ class yce extends T2.Dialect {
3253
3253
  }
3254
3254
  sqlUnnestAlias(e, n, r, i, s, o) {
3255
3255
  const u = this.sqlMaybeQuoteIdentifier(n);
3256
- return s ? `,LATERAL FLATTEN(INPUT => ${e}) AS ${n}_1, LATERAL (SELECT ${n}_1.INDEX, object_construct('value', ${n}_1.value) as value ) as ${u}` : `LEFT JOIN LATERAL FLATTEN(INPUT => ifnull(${e},[1])) AS ${u}`;
3256
+ return s ? `LEFT JOIN lateral flatten(input => ${e}) as ${u}` : `LEFT JOIN LATERAL FLATTEN(INPUT => ifnull(${e},[1])) AS ${u}`;
3257
3257
  }
3258
3258
  /*
3259
3259
  // For comparison against the equivalent function implemented in standardsql dialect
@@ -3293,9 +3293,9 @@ class yce extends T2.Dialect {
3293
3293
  const s = this.sqlMaybeQuoteIdentifier(r);
3294
3294
  if (r === "__row_id")
3295
3295
  return `"${e}".INDEX::varchar`;
3296
- if (n === "array[scalar]" || n === "array[record]") {
3297
- const o = `"${e}".value:${s}`;
3298
- switch (i) {
3296
+ if (n.startsWith("array")) {
3297
+ let o = `"${e}".value`;
3298
+ switch (n === "array[record]" && (o += `:${s}`), i) {
3299
3299
  case "record":
3300
3300
  case "array":
3301
3301
  i = "VARIANT";
@@ -41129,48 +41129,46 @@ class fme extends ame.StaticSpace {
41129
41129
  structDef() {
41130
41130
  if (this.complete = !0, this.sourceDef === void 0) {
41131
41131
  const e = {};
41132
- for (const [l, c] of this.entries())
41133
- c instanceof MP.SpaceParam && (e[l] = c.parameter());
41132
+ for (const [a, l] of this.entries())
41133
+ l instanceof MP.SpaceParam && (e[a] = l.parameter());
41134
41134
  this.sourceDef = { ...this.fromSource, fields: [] }, this.sourceDef.parameters = e;
41135
- const n = /* @__PURE__ */ new Map(), r = [], i = [], s = [], o = [];
41136
- for (const [l, c] of this.entries())
41137
- c instanceof lme.StructSpaceFieldBase ? i.push([l, c]) : c instanceof ume.ViewField ? s.push([l, c]) : c instanceof sme.SpaceField && r.push([l, c]);
41138
- const u = [...r, ...i, ...s], a = this.parameterSpace();
41139
- for (const [l, c] of u)
41140
- if (c instanceof ome.JoinSpaceField) {
41141
- const f = c.join.structDef(a);
41142
- ime.ErrorFactory.didCreate(f) || (n.set(l, this.sourceDef.fields.length), this.sourceDef.fields.push(f), o.push([c.join, f]));
41135
+ const n = /* @__PURE__ */ new Map(), r = [], i = [], s = [];
41136
+ for (const [a, l] of this.entries())
41137
+ l instanceof lme.StructSpaceFieldBase ? i.push([a, l]) : l instanceof ume.ViewField ? s.push([a, l]) : l instanceof sme.SpaceField && r.push([a, l]);
41138
+ const o = [...r, ...i, ...s], u = this.parameterSpace();
41139
+ for (const [a, l] of o)
41140
+ if (l instanceof ome.JoinSpaceField) {
41141
+ const c = l.join.structDef(u);
41142
+ ime.ErrorFactory.didCreate(c) || (n.set(a, this.sourceDef.fields.length), this.sourceDef.fields.push(c), l.join.fixupJoinOn(this, c));
41143
41143
  } else {
41144
- const f = c.fieldDef();
41145
- f && (n.set(l, this.sourceDef.fields.length), this.sourceDef.fields.push(f));
41144
+ const c = l.fieldDef();
41145
+ c && (n.set(a, this.sourceDef.fields.length), this.sourceDef.fields.push(c));
41146
41146
  }
41147
- for (const [l, c] of o)
41148
- l.fixupJoinOn(this, c);
41149
- for (const [l, c] of this.newAccessModifiers) {
41150
- const f = this.sourceDef.fields.findIndex((x) => {
41151
- var h;
41152
- return (h = x.as) !== null && h !== void 0 ? h : x.name === l;
41147
+ for (const [a, l] of this.newAccessModifiers) {
41148
+ const c = this.sourceDef.fields.findIndex((f) => {
41149
+ var x;
41150
+ return (x = f.as) !== null && x !== void 0 ? x : f.name === a;
41153
41151
  });
41154
- if (f === -1)
41155
- throw new Error(`Can't find field '${l}' to set access modifier`);
41156
- c === "public" ? delete this.sourceDef.fields[f].accessModifier : this.sourceDef.fields[f] = {
41157
- ...this.sourceDef.fields[f],
41158
- accessModifier: c
41152
+ if (c === -1)
41153
+ throw new Error(`Can't find field '${a}' to set access modifier`);
41154
+ l === "public" ? delete this.sourceDef.fields[c].accessModifier : this.sourceDef.fields[c] = {
41155
+ ...this.sourceDef.fields[c],
41156
+ accessModifier: l
41159
41157
  };
41160
41158
  }
41161
- for (const [l, c] of this.newNotes) {
41162
- const f = this.sourceDef.fields.findIndex((h) => {
41163
- var p;
41164
- return (p = h.as) !== null && p !== void 0 ? p : h.name === l;
41159
+ for (const [a, l] of this.newNotes) {
41160
+ const c = this.sourceDef.fields.findIndex((x) => {
41161
+ var h;
41162
+ return (h = x.as) !== null && h !== void 0 ? h : x.name === a;
41165
41163
  });
41166
- if (f === -1)
41167
- throw new Error(`Can't find field '${l}' to set access modifier`);
41168
- const x = this.sourceDef.fields[f];
41169
- this.sourceDef.fields[f] = {
41170
- ...x,
41164
+ if (c === -1)
41165
+ throw new Error(`Can't find field '${a}' to set access modifier`);
41166
+ const f = this.sourceDef.fields[c];
41167
+ this.sourceDef.fields[c] = {
41168
+ ...f,
41171
41169
  annotation: {
41172
- ...c,
41173
- inherits: x.annotation
41170
+ ...l,
41171
+ inherits: f.annotation
41174
41172
  }
41175
41173
  };
41176
41174
  }