@malloydata/malloy-tests 0.0.225-dev250106171109 → 0.0.225-dev250110175536

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,13 +21,13 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@jest/globals": "^29.4.3",
24
- "@malloydata/db-bigquery": "^0.0.225-dev250106171109",
25
- "@malloydata/db-duckdb": "^0.0.225-dev250106171109",
26
- "@malloydata/db-postgres": "^0.0.225-dev250106171109",
27
- "@malloydata/db-snowflake": "^0.0.225-dev250106171109",
28
- "@malloydata/db-trino": "^0.0.225-dev250106171109",
29
- "@malloydata/malloy": "^0.0.225-dev250106171109",
30
- "@malloydata/render": "^0.0.225-dev250106171109",
24
+ "@malloydata/db-bigquery": "^0.0.225-dev250110175536",
25
+ "@malloydata/db-duckdb": "^0.0.225-dev250110175536",
26
+ "@malloydata/db-postgres": "^0.0.225-dev250110175536",
27
+ "@malloydata/db-snowflake": "^0.0.225-dev250110175536",
28
+ "@malloydata/db-trino": "^0.0.225-dev250110175536",
29
+ "@malloydata/malloy": "^0.0.225-dev250110175536",
30
+ "@malloydata/render": "^0.0.225-dev250110175536",
31
31
  "events": "^3.3.0",
32
32
  "jsdom": "^22.1.0",
33
33
  "luxon": "^2.4.0",
@@ -37,5 +37,5 @@
37
37
  "@types/jsdom": "^21.1.1",
38
38
  "@types/luxon": "^2.4.0"
39
39
  },
40
- "version": "0.0.225-dev250106171109"
40
+ "version": "0.0.225-dev250110175536"
41
41
  }
@@ -305,7 +305,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
305
305
  run: x -> { aggregate: foo; group_by: bar }
306
306
  `).malloyResultMatches(runtime, {foo: 0, bar: 1});
307
307
  });
308
- it('complex nesting composite with join', async () => {
308
+ it('complex nesting composite with join -- literal view', async () => {
309
309
  await expect(`
310
310
  ##! experimental.composite_sources
311
311
  source: state_facts is ${databaseName}.table('malloytest.state_facts')
@@ -325,6 +325,50 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
325
325
  run: x -> { group_by: state_facts.state }
326
326
  `).malloyResultMatches(runtime, {state: 'CA'});
327
327
  });
328
+ it('complex nesting composite with join -- double extend to define view', async () => {
329
+ await expect(`
330
+ ##! experimental.composite_sources
331
+ source: state_facts is ${databaseName}.table('malloytest.state_facts')
332
+ source: x is compose(
333
+ compose(
334
+ state_facts,
335
+ state_facts extend {
336
+ dimension: the_state is 'CA'
337
+ }
338
+ ),
339
+ state_facts extend {
340
+ dimension: the_state is 'IL'
341
+ }
342
+ ) extend {
343
+ join_one: state_facts on the_state = state_facts.state
344
+ } extend {
345
+ view: y is { group_by: state_facts.state }
346
+ }
347
+ run: x -> y
348
+ `).malloyResultMatches(runtime, {state: 'CA'});
349
+ });
350
+ it('complex nesting composite with join -- defined view', async () => {
351
+ await expect(`
352
+ ##! experimental.composite_sources
353
+ source: state_facts is ${databaseName}.table('malloytest.state_facts')
354
+ source: x is compose(
355
+ compose(
356
+ state_facts,
357
+ state_facts extend {
358
+ dimension: the_state is 'CA'
359
+ }
360
+ ),
361
+ state_facts extend {
362
+ dimension: the_state is 'IL'
363
+ }
364
+ ) extend {
365
+ join_one: state_facts on the_state = state_facts.state
366
+
367
+ view: y is { group_by: state_facts.state }
368
+ }
369
+ run: x -> y
370
+ `).malloyResultMatches(runtime, {state: 'CA'});
371
+ });
328
372
  describe('index queries against composite sources', () => {
329
373
  it('index query selects second input', async () => {
330
374
  await expect(`