@malloydata/malloy-tests 0.0.222-dev241212190052 → 0.0.222-dev241212204326
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.222-
|
|
25
|
-
"@malloydata/db-duckdb": "^0.0.222-
|
|
26
|
-
"@malloydata/db-postgres": "^0.0.222-
|
|
27
|
-
"@malloydata/db-snowflake": "^0.0.222-
|
|
28
|
-
"@malloydata/db-trino": "^0.0.222-
|
|
29
|
-
"@malloydata/malloy": "^0.0.222-
|
|
30
|
-
"@malloydata/render": "^0.0.222-
|
|
24
|
+
"@malloydata/db-bigquery": "^0.0.222-dev241212204326",
|
|
25
|
+
"@malloydata/db-duckdb": "^0.0.222-dev241212204326",
|
|
26
|
+
"@malloydata/db-postgres": "^0.0.222-dev241212204326",
|
|
27
|
+
"@malloydata/db-snowflake": "^0.0.222-dev241212204326",
|
|
28
|
+
"@malloydata/db-trino": "^0.0.222-dev241212204326",
|
|
29
|
+
"@malloydata/malloy": "^0.0.222-dev241212204326",
|
|
30
|
+
"@malloydata/render": "^0.0.222-dev241212204326",
|
|
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.222-
|
|
40
|
+
"version": "0.0.222-dev241212204326"
|
|
41
41
|
}
|
|
@@ -266,4 +266,45 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
266
266
|
run: x -> { aggregate: foo; group_by: bar, arr.each }
|
|
267
267
|
`).malloyResultMatches(runtime, {foo: 0});
|
|
268
268
|
});
|
|
269
|
+
it('complex nesting composite without join', async () => {
|
|
270
|
+
await expect(`
|
|
271
|
+
##! experimental.composite_sources
|
|
272
|
+
source: state_facts is ${databaseName}.table('malloytest.state_facts')
|
|
273
|
+
source: x is compose(
|
|
274
|
+
compose(
|
|
275
|
+
state_facts,
|
|
276
|
+
state_facts extend {
|
|
277
|
+
dimension: bar is 1
|
|
278
|
+
}
|
|
279
|
+
) extend {
|
|
280
|
+
measure: foo is sum(0)
|
|
281
|
+
},
|
|
282
|
+
state_facts extend {
|
|
283
|
+
measure: foo is sum(0) + 1
|
|
284
|
+
dimension: bar is 2
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
run: x -> { aggregate: foo; group_by: bar }
|
|
288
|
+
`).malloyResultMatches(runtime, {foo: 0, bar: 1});
|
|
289
|
+
});
|
|
290
|
+
it('complex nesting composite with join', async () => {
|
|
291
|
+
await expect(`
|
|
292
|
+
##! experimental.composite_sources
|
|
293
|
+
source: state_facts is ${databaseName}.table('malloytest.state_facts')
|
|
294
|
+
source: x is compose(
|
|
295
|
+
compose(
|
|
296
|
+
state_facts,
|
|
297
|
+
state_facts extend {
|
|
298
|
+
dimension: the_state is 'CA'
|
|
299
|
+
}
|
|
300
|
+
),
|
|
301
|
+
state_facts extend {
|
|
302
|
+
dimension: the_state is 'IL'
|
|
303
|
+
}
|
|
304
|
+
) extend {
|
|
305
|
+
join_one: state_facts on the_state = state_facts.state
|
|
306
|
+
}
|
|
307
|
+
run: x -> { group_by: state_facts.state }
|
|
308
|
+
`).malloyResultMatches(runtime, {state: 'CA'});
|
|
309
|
+
});
|
|
269
310
|
});
|