@malloydata/malloy 0.0.225-dev250110175536 → 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.
@@ -145,7 +145,7 @@ class SnowflakeDialect extends dialect_1.Dialect {
145
145
  sqlUnnestAlias(source, alias, _fieldList, _needDistinctKey, isArray, _isInNestedPipeline) {
146
146
  const as = this.sqlMaybeQuoteIdentifier(alias);
147
147
  if (isArray) {
148
- return `,LATERAL FLATTEN(INPUT => ${source}) AS ${alias}_1, LATERAL (SELECT ${alias}_1.INDEX, object_construct('value', ${alias}_1.value) as value ) as ${as}`;
148
+ return `LEFT JOIN lateral flatten(input => ${source}) as ${as}`;
149
149
  }
150
150
  else {
151
151
  // have to have a non empty row or it treats it like an inner join :barf-emoji:
@@ -197,9 +197,11 @@ class SnowflakeDialect extends dialect_1.Dialect {
197
197
  if (childName === '__row_id') {
198
198
  return `"${parentAlias}".INDEX::varchar`;
199
199
  }
200
- else if (parentType === 'array[scalar]' ||
201
- parentType === 'array[record]') {
202
- const arrayRef = `"${parentAlias}".value:${sqlName}`;
200
+ else if (parentType.startsWith('array')) {
201
+ let arrayRef = `"${parentAlias}".value`;
202
+ if (parentType === 'array[record]') {
203
+ arrayRef += `:${sqlName}`;
204
+ }
203
205
  switch (childType) {
204
206
  case 'record':
205
207
  case 'array':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.225-dev250110175536",
3
+ "version": "0.0.225-dev250111002123",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",