@malloydata/malloy 0.0.189-dev240924171744 → 0.0.189-dev240925135337

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.
@@ -571,6 +571,12 @@ describe('query:', () => {
571
571
  extend: { join_one: b with astr }
572
572
  group_by: b.ai
573
573
  }`).toTranslate();
574
+ });
575
+ test.skip('reference join as field', () => {
576
+ expect(`run: a -> {
577
+ extend: { join_one: b with astr }
578
+ group_by: b
579
+ }`).translationToFailWith('foo');
574
580
  });
575
581
  test('can reference select: inline join.* field in calculate', () => {
576
582
  expect(`run: a -> {
@@ -3318,10 +3318,14 @@ class QueryStruct extends QueryNode {
3318
3318
  const field = this.getQueryFieldByName(name);
3319
3319
  if (refAnnoatation) {
3320
3320
  // Made the field object from the source, but the annotations were computed by the compiler
3321
- // and have noth the source and reference annotations included, use those.
3322
- const newDef = { ...field.fieldDef };
3323
- newDef.annotation = refAnnoatation;
3324
- field.fieldDef = newDef;
3321
+ // and have none of the source and reference annotations included, use those.
3322
+ if (field.parent === undefined) {
3323
+ throw new Error('Expected field to have a parent');
3324
+ }
3325
+ return field.parent.makeQueryField({
3326
+ ...field.fieldDef,
3327
+ annotation: refAnnoatation,
3328
+ });
3325
3329
  }
3326
3330
  return field;
3327
3331
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.189-dev240924171744",
3
+ "version": "0.0.189-dev240925135337",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",