@malloydata/malloy 0.0.226-dev250113232339 → 0.0.226
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.
|
@@ -170,7 +170,7 @@ class QueryOperationSpace extends refined_space_1.RefinedSpace {
|
|
|
170
170
|
const lookup = this.exprSpace.lookup(reference);
|
|
171
171
|
// Should always be found...
|
|
172
172
|
if (lookup.found && lookup.found instanceof struct_space_field_base_1.StructSpaceFieldBase) {
|
|
173
|
-
return ((_a = lookup.found.fieldDef().onCompositeFieldUsage) !== null && _a !== void 0 ? _a : (0, composite_source_utils_1.emptyCompositeFieldUsage)());
|
|
173
|
+
return (0, composite_source_utils_1.joinedCompositeFieldUsage)(joinPath.slice(0, -1), (_a = lookup.found.fieldDef().onCompositeFieldUsage) !== null && _a !== void 0 ? _a : (0, composite_source_utils_1.emptyCompositeFieldUsage)());
|
|
174
174
|
}
|
|
175
175
|
throw new Error('Unexpected join lookup was not found or not a struct');
|
|
176
176
|
}
|
|
@@ -571,6 +571,19 @@ describe('query:', () => {
|
|
|
571
571
|
extend: { join_one: b with astr }
|
|
572
572
|
group_by: b.ai
|
|
573
573
|
}`).toTranslate();
|
|
574
|
+
});
|
|
575
|
+
test('reference field in double nested join inside nest', () => {
|
|
576
|
+
expect(`
|
|
577
|
+
source: a_2 is a extend { join_one: b is b extend {
|
|
578
|
+
join_one: c is b on 1 = c.ai
|
|
579
|
+
} with astr }
|
|
580
|
+
|
|
581
|
+
run: a_2 -> {
|
|
582
|
+
nest: x is {
|
|
583
|
+
group_by: ai is b.c.ai
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
`).toTranslate();
|
|
574
587
|
});
|
|
575
588
|
test.skip('reference join as field', () => {
|
|
576
589
|
expect(`run: a -> {
|