@malloydata/render 0.0.123-dev240205203117 → 0.0.123-dev240207162055
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.
|
@@ -4392,7 +4392,7 @@ $$ LANGUAGE SQL;
|
|
|
4392
4392
|
return `__udf${Math.floor(Math.random() * 1e5)}`;
|
|
4393
4393
|
}
|
|
4394
4394
|
quoteTablePath(tableName) {
|
|
4395
|
-
return tableName.match(
|
|
4395
|
+
return tableName.match(/[/*:]/) ? `'${tableName}'` : tableName;
|
|
4396
4396
|
}
|
|
4397
4397
|
sqlGroupSetTable(groupSetCount) {
|
|
4398
4398
|
return `CROSS JOIN (SELECT UNNEST(GENERATE_SERIES(0,${groupSetCount},1)) as group_set ) as group_set`;
|
|
@@ -53838,6 +53838,18 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
|
|
|
53838
53838
|
static eq(good, checkThis) {
|
|
53839
53839
|
return checkThis !== void 0 && good.dataType === checkThis.dataType && good.expressionType === checkThis.expressionType;
|
|
53840
53840
|
}
|
|
53841
|
+
/**
|
|
53842
|
+
* Checks if a given type is in a list, ignoring aggregate
|
|
53843
|
+
* @param check The type to check (can be undefined)
|
|
53844
|
+
* @param from List of types which are OK
|
|
53845
|
+
*/
|
|
53846
|
+
static typeIn(check, from) {
|
|
53847
|
+
if (check) {
|
|
53848
|
+
const found = from.find((okType) => _FT.typeEq(okType, check));
|
|
53849
|
+
return found !== void 0;
|
|
53850
|
+
}
|
|
53851
|
+
return false;
|
|
53852
|
+
}
|
|
53841
53853
|
/**
|
|
53842
53854
|
* Checks if the base types, ignoring aggregate, are equal
|
|
53843
53855
|
* @param left Left type
|
|
@@ -56326,7 +56338,7 @@ QUERY: ${(0, util_1.inspect)(opDesc, { breakLength: 72, depth: Infinity })}`);
|
|
|
56326
56338
|
}
|
|
56327
56339
|
getExpression(fs) {
|
|
56328
56340
|
const expr2 = this.expr.getExpression(fs);
|
|
56329
|
-
if (
|
|
56341
|
+
if (fragtype_utils_1.FT.typeIn(expr2, this.legalChildTypes)) {
|
|
56330
56342
|
if (expr2.value.length > 1) {
|
|
56331
56343
|
return { ...expr2, dataType: "number", value: ["-(", ...expr2.value, ")"] };
|
|
56332
56344
|
}
|