@malloydata/malloy-tests 0.0.144-dev240426181908 → 0.0.144-dev240503150037
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.144-
|
|
25
|
-
"@malloydata/db-duckdb": "^0.0.144-
|
|
26
|
-
"@malloydata/db-postgres": "^0.0.144-
|
|
27
|
-
"@malloydata/db-snowflake": "^0.0.144-
|
|
28
|
-
"@malloydata/db-trino": "^0.0.144-
|
|
29
|
-
"@malloydata/malloy": "^0.0.144-
|
|
30
|
-
"@malloydata/render": "^0.0.144-
|
|
24
|
+
"@malloydata/db-bigquery": "^0.0.144-dev240503150037",
|
|
25
|
+
"@malloydata/db-duckdb": "^0.0.144-dev240503150037",
|
|
26
|
+
"@malloydata/db-postgres": "^0.0.144-dev240503150037",
|
|
27
|
+
"@malloydata/db-snowflake": "^0.0.144-dev240503150037",
|
|
28
|
+
"@malloydata/db-trino": "^0.0.144-dev240503150037",
|
|
29
|
+
"@malloydata/malloy": "^0.0.144-dev240503150037",
|
|
30
|
+
"@malloydata/render": "^0.0.144-dev240503150037",
|
|
31
31
|
"jsdom": "^22.1.0",
|
|
32
32
|
"luxon": "^2.4.0",
|
|
33
33
|
"madge": "^6.0.0"
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"@types/jsdom": "^21.1.1",
|
|
37
37
|
"@types/luxon": "^2.4.0"
|
|
38
38
|
},
|
|
39
|
-
"version": "0.0.144-
|
|
39
|
+
"version": "0.0.144-dev240503150037"
|
|
40
40
|
}
|
|
@@ -430,6 +430,33 @@ expressionModels.forEach((expressionModel, databaseName) => {
|
|
|
430
430
|
expect(result.data.path(2, 'neg_r').value).toBe(-3);
|
|
431
431
|
expect(result.data.path(3, 'neg_r').value).toBe(-3);
|
|
432
432
|
});
|
|
433
|
+
|
|
434
|
+
it(`properly isolated nested calculations - ${databaseName}`, async () => {
|
|
435
|
+
const result = await expressionModel
|
|
436
|
+
.loadQuery(
|
|
437
|
+
`run: ${databaseName}.table('malloytest.airports') -> {
|
|
438
|
+
group_by: faa_region
|
|
439
|
+
aggregate: airport_count is count()
|
|
440
|
+
calculate: id is row_number()
|
|
441
|
+
nest: by_fac_type is {
|
|
442
|
+
group_by: fac_type
|
|
443
|
+
aggregate: airport_count is count()
|
|
444
|
+
calculate: id2 is row_number()
|
|
445
|
+
nest: elevation is {
|
|
446
|
+
aggregate: avg_elevation is elevation.avg()
|
|
447
|
+
}
|
|
448
|
+
limit: 2
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
-> {
|
|
452
|
+
// should be 2 rows, max of 2
|
|
453
|
+
group_by: by_fac_type.id2
|
|
454
|
+
order_by: id2 desc
|
|
455
|
+
}`
|
|
456
|
+
)
|
|
457
|
+
.run();
|
|
458
|
+
expect(result.data.path(0, 'id2').value).toBe(2);
|
|
459
|
+
});
|
|
433
460
|
});
|
|
434
461
|
|
|
435
462
|
describe('lag', () => {
|