@malloydata/malloy-tests 0.0.225-dev241217223852 → 0.0.225-dev241220203531

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-dev241217223852",
25
- "@malloydata/db-duckdb": "^0.0.225-dev241217223852",
26
- "@malloydata/db-postgres": "^0.0.225-dev241217223852",
27
- "@malloydata/db-snowflake": "^0.0.225-dev241217223852",
28
- "@malloydata/db-trino": "^0.0.225-dev241217223852",
29
- "@malloydata/malloy": "^0.0.225-dev241217223852",
30
- "@malloydata/render": "^0.0.225-dev241217223852",
24
+ "@malloydata/db-bigquery": "^0.0.225-dev241220203531",
25
+ "@malloydata/db-duckdb": "^0.0.225-dev241220203531",
26
+ "@malloydata/db-postgres": "^0.0.225-dev241220203531",
27
+ "@malloydata/db-snowflake": "^0.0.225-dev241220203531",
28
+ "@malloydata/db-trino": "^0.0.225-dev241220203531",
29
+ "@malloydata/malloy": "^0.0.225-dev241220203531",
30
+ "@malloydata/render": "^0.0.225-dev241220203531",
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-dev241217223852"
40
+ "version": "0.0.225-dev241220203531"
41
41
  }
@@ -1741,6 +1741,42 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
1741
1741
  {name: 'UNITED AIR LINES INC', r: 1},
1742
1742
  ]);
1743
1743
  });
1744
+
1745
+ // TODO remove the need for the `##! unsafe_complex_select_query` compiler flag
1746
+ it('can be used in a select', async () => {
1747
+ await expect(`
1748
+ ##! experimental { function_order_by partition_by }
1749
+ ##! unsafe_complex_select_query
1750
+ run: state_facts -> {
1751
+ select: state, births, popular_name
1752
+ calculate: prev_births_by_name is lag(births) {
1753
+ partition_by: popular_name
1754
+ order_by: births desc
1755
+ }
1756
+ order_by: births desc
1757
+ limit: 3
1758
+ }
1759
+ `).malloyResultMatches(expressionModel, [
1760
+ {
1761
+ state: 'CA',
1762
+ births: 28810563,
1763
+ popular_name: 'Isabella',
1764
+ prev_births_by_name: null,
1765
+ },
1766
+ {
1767
+ state: 'NY',
1768
+ births: 23694136,
1769
+ popular_name: 'Isabella',
1770
+ prev_births_by_name: 28810563,
1771
+ },
1772
+ {
1773
+ state: 'TX',
1774
+ births: 21467359,
1775
+ popular_name: 'Isabella',
1776
+ prev_births_by_name: 23694136,
1777
+ },
1778
+ ]);
1779
+ });
1744
1780
  });
1745
1781
  });
1746
1782