@malloydata/malloy 0.0.102-dev231115033625 → 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 ROW(${fields}))`;
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(ROW(${structDef.fields
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 `ROW(${physicalFieldNames
186
+ return `STRUCT_PACK(${physicalFieldNames
187
187
  .map(name => `${alias}.${name}`)
188
188
  .join(', ')})`;
189
189
  }
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.102-dev231115033625",
3
+ "version": "0.0.102-dev231115164346",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",