@malloydata/malloy-tests 0.0.276-crs-composite-joins-2-250513155820 → 0.0.277

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.
package/package.json CHANGED
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@jest/globals": "^29.4.3",
24
- "@malloydata/db-bigquery": "0.0.276-crs-composite-joins-2-250513155820",
25
- "@malloydata/db-duckdb": "0.0.276-crs-composite-joins-2-250513155820",
26
- "@malloydata/db-postgres": "0.0.276-crs-composite-joins-2-250513155820",
27
- "@malloydata/db-snowflake": "0.0.276-crs-composite-joins-2-250513155820",
28
- "@malloydata/db-trino": "0.0.276-crs-composite-joins-2-250513155820",
29
- "@malloydata/malloy": "0.0.276-crs-composite-joins-2-250513155820",
30
- "@malloydata/malloy-tag": "0.0.276-crs-composite-joins-2-250513155820",
31
- "@malloydata/render": "0.0.276-crs-composite-joins-2-250513155820",
24
+ "@malloydata/db-bigquery": "0.0.277",
25
+ "@malloydata/db-duckdb": "0.0.277",
26
+ "@malloydata/db-postgres": "0.0.277",
27
+ "@malloydata/db-snowflake": "0.0.277",
28
+ "@malloydata/db-trino": "0.0.277",
29
+ "@malloydata/malloy": "0.0.277",
30
+ "@malloydata/malloy-tag": "0.0.277",
31
+ "@malloydata/render": "0.0.277",
32
32
  "events": "^3.3.0",
33
33
  "jsdom": "^22.1.0",
34
34
  "luxon": "^2.4.0",
@@ -38,5 +38,5 @@
38
38
  "@types/jsdom": "^21.1.1",
39
39
  "@types/luxon": "^2.4.0"
40
40
  },
41
- "version": "0.0.276-crs-composite-joins-2-250513155820"
41
+ "version": "0.0.277"
42
42
  }
@@ -318,4 +318,33 @@ describe('tags in results', () => {
318
318
  const fromVal = nestedTags.tag.text('from');
319
319
  expect(fromVal).toEqual('notes');
320
320
  });
321
+ test('run: from turtle inherits can disable turtle tags', async () => {
322
+ const run1 = runtime.loadQuery(`
323
+ source: one is duckdb.sql("SELECT 1 as one") extend {
324
+ # blockNote b1
325
+ view:
326
+ # note n2
327
+ view1 is { select: * }
328
+ }
329
+ # -blockNote b3
330
+ run:
331
+ # -note n4
332
+ one -> view1
333
+ `);
334
+ const result = await run1.run();
335
+ const lineSrc = result.resultExplore.getTaglines().map(s => s.trim());
336
+ expect(lineSrc).toEqual([
337
+ '# blockNote b1',
338
+ '# note n2',
339
+ '# -blockNote b3',
340
+ '# -note n4',
341
+ ]);
342
+ const tags = result.resultExplore.tagParse().tag;
343
+ expect(tags.has('blockNote')).toBeFalsy();
344
+ expect(tags.has('note')).toBeFalsy();
345
+ expect(tags.has('b1')).toBeTruthy();
346
+ expect(tags.has('b3')).toBeTruthy();
347
+ expect(tags.has('n2')).toBeTruthy();
348
+ expect(tags.has('n4')).toBeTruthy();
349
+ });
321
350
  });
@@ -62,6 +62,26 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
62
62
  run: c -> { group_by: j.f2 }
63
63
  `).malloyResultMatches(runtime, {f2: 2});
64
64
  });
65
+ it('selects correct join', async () => {
66
+ await expect(`
67
+ ##! experimental.composite_sources
68
+ source: state_facts is ${databaseName}.table('malloytest.state_facts')
69
+ source: s1 is state_facts extend {
70
+ join_one: j is state_facts extend {
71
+ dimension: jf is 1
72
+ } on true
73
+ dimension: f1 is 1
74
+ }
75
+ source: s2 is state_facts extend {
76
+ join_one: j is state_facts extend {
77
+ dimension: jf is 2
78
+ } on true
79
+ dimension: f2 is 2
80
+ }
81
+ source: c is compose(s1, s2)
82
+ run: c -> { group_by: j.jf, f2 }
83
+ `).malloyResultMatches(runtime, {f2: 2, jf: 2});
84
+ });
65
85
  it('join on depends on selected join', async () => {
66
86
  await expect(`
67
87
  ##! experimental.composite_sources