@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.
|
@@ -4170,7 +4170,7 @@ class hxe extends lp.Dialect {
|
|
|
4170
4170
|
}
|
|
4171
4171
|
sqlUnnestAlias(e, n, r, i, s, o) {
|
|
4172
4172
|
const u = this.sqlMaybeQuoteIdentifier(n);
|
|
4173
|
-
return s ?
|
|
4173
|
+
return s ? `LEFT JOIN lateral flatten(input => ${e}) as ${u}` : `LEFT JOIN LATERAL FLATTEN(INPUT => ifnull(${e},[1])) AS ${u}`;
|
|
4174
4174
|
}
|
|
4175
4175
|
/*
|
|
4176
4176
|
// For comparison against the equivalent function implemented in standardsql dialect
|
|
@@ -4210,9 +4210,9 @@ class hxe extends lp.Dialect {
|
|
|
4210
4210
|
const s = this.sqlMaybeQuoteIdentifier(r);
|
|
4211
4211
|
if (r === "__row_id")
|
|
4212
4212
|
return `"${e}".INDEX::varchar`;
|
|
4213
|
-
if (n
|
|
4214
|
-
|
|
4215
|
-
switch (i) {
|
|
4213
|
+
if (n.startsWith("array")) {
|
|
4214
|
+
let o = `"${e}".value`;
|
|
4215
|
+
switch (n === "array[record]" && (o += `:${s}`), i) {
|
|
4216
4216
|
case "record":
|
|
4217
4217
|
case "array":
|
|
4218
4218
|
i = "VARIANT";
|
|
@@ -42046,48 +42046,46 @@ class uye extends iye.StaticSpace {
|
|
|
42046
42046
|
structDef() {
|
|
42047
42047
|
if (this.complete = !0, this.sourceDef === void 0) {
|
|
42048
42048
|
const e = {};
|
|
42049
|
-
for (const [
|
|
42050
|
-
|
|
42049
|
+
for (const [a, l] of this.entries())
|
|
42050
|
+
l instanceof _M.SpaceParam && (e[a] = l.parameter());
|
|
42051
42051
|
this.sourceDef = { ...this.fromSource, fields: [] }, this.sourceDef.parameters = e;
|
|
42052
|
-
const n = /* @__PURE__ */ new Map(), r = [], i = [], s = []
|
|
42053
|
-
for (const [
|
|
42054
|
-
|
|
42055
|
-
const
|
|
42056
|
-
for (const [
|
|
42057
|
-
if (
|
|
42058
|
-
const
|
|
42059
|
-
eye.ErrorFactory.didCreate(
|
|
42052
|
+
const n = /* @__PURE__ */ new Map(), r = [], i = [], s = [];
|
|
42053
|
+
for (const [a, l] of this.entries())
|
|
42054
|
+
l instanceof sye.StructSpaceFieldBase ? i.push([a, l]) : l instanceof rye.ViewField ? s.push([a, l]) : l instanceof tye.SpaceField && r.push([a, l]);
|
|
42055
|
+
const o = [...r, ...i, ...s], u = this.parameterSpace();
|
|
42056
|
+
for (const [a, l] of o)
|
|
42057
|
+
if (l instanceof nye.JoinSpaceField) {
|
|
42058
|
+
const c = l.join.structDef(u);
|
|
42059
|
+
eye.ErrorFactory.didCreate(c) || (n.set(a, this.sourceDef.fields.length), this.sourceDef.fields.push(c), l.join.fixupJoinOn(this, c));
|
|
42060
42060
|
} else {
|
|
42061
|
-
const
|
|
42062
|
-
|
|
42061
|
+
const c = l.fieldDef();
|
|
42062
|
+
c && (n.set(a, this.sourceDef.fields.length), this.sourceDef.fields.push(c));
|
|
42063
42063
|
}
|
|
42064
|
-
for (const [
|
|
42065
|
-
|
|
42066
|
-
|
|
42067
|
-
|
|
42068
|
-
var h;
|
|
42069
|
-
return (h = x.as) !== null && h !== void 0 ? h : x.name === l;
|
|
42064
|
+
for (const [a, l] of this.newAccessModifiers) {
|
|
42065
|
+
const c = this.sourceDef.fields.findIndex((f) => {
|
|
42066
|
+
var x;
|
|
42067
|
+
return (x = f.as) !== null && x !== void 0 ? x : f.name === a;
|
|
42070
42068
|
});
|
|
42071
|
-
if (
|
|
42072
|
-
throw new Error(`Can't find field '${
|
|
42073
|
-
|
|
42074
|
-
...this.sourceDef.fields[
|
|
42075
|
-
accessModifier:
|
|
42069
|
+
if (c === -1)
|
|
42070
|
+
throw new Error(`Can't find field '${a}' to set access modifier`);
|
|
42071
|
+
l === "public" ? delete this.sourceDef.fields[c].accessModifier : this.sourceDef.fields[c] = {
|
|
42072
|
+
...this.sourceDef.fields[c],
|
|
42073
|
+
accessModifier: l
|
|
42076
42074
|
};
|
|
42077
42075
|
}
|
|
42078
|
-
for (const [
|
|
42079
|
-
const
|
|
42080
|
-
var
|
|
42081
|
-
return (
|
|
42076
|
+
for (const [a, l] of this.newNotes) {
|
|
42077
|
+
const c = this.sourceDef.fields.findIndex((x) => {
|
|
42078
|
+
var h;
|
|
42079
|
+
return (h = x.as) !== null && h !== void 0 ? h : x.name === a;
|
|
42082
42080
|
});
|
|
42083
|
-
if (
|
|
42084
|
-
throw new Error(`Can't find field '${
|
|
42085
|
-
const
|
|
42086
|
-
this.sourceDef.fields[
|
|
42087
|
-
...
|
|
42081
|
+
if (c === -1)
|
|
42082
|
+
throw new Error(`Can't find field '${a}' to set access modifier`);
|
|
42083
|
+
const f = this.sourceDef.fields[c];
|
|
42084
|
+
this.sourceDef.fields[c] = {
|
|
42085
|
+
...f,
|
|
42088
42086
|
annotation: {
|
|
42089
|
-
...
|
|
42090
|
-
inherits:
|
|
42087
|
+
...l,
|
|
42088
|
+
inherits: f.annotation
|
|
42091
42089
|
}
|
|
42092
42090
|
};
|
|
42093
42091
|
}
|