@malloydata/malloy 0.0.102-dev231115031800 → 0.0.102-dev231115164346
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.
|
@@ -101,7 +101,7 @@ class DuckDBDialect extends dialect_1.Dialect {
|
|
|
101
101
|
const fields = fieldList
|
|
102
102
|
.map(f => `${f.sqlExpression} as ${f.sqlOutputName}`)
|
|
103
103
|
.join(', ');
|
|
104
|
-
return `ANY_VALUE(CASE WHEN group_set=${groupSet} THEN
|
|
104
|
+
return `ANY_VALUE(CASE WHEN group_set=${groupSet} THEN STRUCT_PACK(${fields}))`;
|
|
105
105
|
}
|
|
106
106
|
sqlAnyValueLastTurtle(name, groupSet, sqlName) {
|
|
107
107
|
return `MAX(CASE WHEN group_set=${groupSet} THEN ${name} END) as ${sqlName}`;
|
|
@@ -178,12 +178,12 @@ class DuckDBDialect extends dialect_1.Dialect {
|
|
|
178
178
|
return `DROP MACRO IF EXISTS ${id}; \n${hackSplitComment}\n CREATE MACRO ${id}(_param) AS (\n${(0, utils_1.indent)(funcText)}\n);\n${hackSplitComment}\n`;
|
|
179
179
|
}
|
|
180
180
|
sqlCreateFunctionCombineLastStage(lastStageName, structDef) {
|
|
181
|
-
return `SELECT LIST(
|
|
181
|
+
return `SELECT LIST(STRUCT_PACK(${structDef.fields
|
|
182
182
|
.map(fieldDef => this.sqlMaybeQuoteIdentifier((0, malloy_types_1.getIdentifier)(fieldDef)))
|
|
183
183
|
.join(',')})) FROM ${lastStageName}\n`;
|
|
184
184
|
}
|
|
185
185
|
sqlSelectAliasAsStruct(alias, physicalFieldNames) {
|
|
186
|
-
return `
|
|
186
|
+
return `STRUCT_PACK(${physicalFieldNames
|
|
187
187
|
.map(name => `${alias}.${name}`)
|
|
188
188
|
.join(', ')})`;
|
|
189
189
|
}
|
package/dist/malloy.d.ts
CHANGED
|
@@ -1124,6 +1124,7 @@ export declare class Result extends PreparedResult {
|
|
|
1124
1124
|
get data(): DataArray;
|
|
1125
1125
|
get totalRows(): number;
|
|
1126
1126
|
get runStats(): QueryRunStats | undefined;
|
|
1127
|
+
get profilingUrl(): string | undefined;
|
|
1127
1128
|
toJSON(): ResultJSON;
|
|
1128
1129
|
static fromJSON({ queryResult, modelDef }: ResultJSON): Result;
|
|
1129
1130
|
}
|
package/dist/malloy.js
CHANGED
|
@@ -250,6 +250,7 @@ class Malloy {
|
|
|
250
250
|
// TODO feature-sql-block There is no source explore...
|
|
251
251
|
sourceExplore: '',
|
|
252
252
|
sourceFilters: [],
|
|
253
|
+
profilingUrl: data.profilingUrl,
|
|
253
254
|
}, {
|
|
254
255
|
name: 'empty_model',
|
|
255
256
|
exports: [],
|
|
@@ -2242,6 +2243,9 @@ class Result extends PreparedResult {
|
|
|
2242
2243
|
get runStats() {
|
|
2243
2244
|
return this.inner.runStats;
|
|
2244
2245
|
}
|
|
2246
|
+
get profilingUrl() {
|
|
2247
|
+
return this.inner.profilingUrl;
|
|
2248
|
+
}
|
|
2245
2249
|
toJSON() {
|
|
2246
2250
|
return { queryResult: this.inner, modelDef: this._modelDef };
|
|
2247
2251
|
}
|
|
@@ -1672,6 +1672,7 @@ class QueryQuery extends QueryField {
|
|
|
1672
1672
|
prepare(_stageWriter) {
|
|
1673
1673
|
if (!this.prepared) {
|
|
1674
1674
|
this.expandFields(this.rootResult);
|
|
1675
|
+
this.rootResult.addStructToJoin(this.parent, this, false, []);
|
|
1675
1676
|
this.rootResult.findJoins(this);
|
|
1676
1677
|
this.rootResult.calculateSymmetricAggregates();
|
|
1677
1678
|
this.prepared = true;
|