@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
|
|
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
|
|
201
|
-
|
|
202
|
-
|
|
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':
|