@malloydata/malloy-tests 0.0.436 → 0.0.438

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/CONTEXT.md CHANGED
@@ -181,7 +181,7 @@ All cross-database tests (`test/src/databases/all/`) reference tables as `malloy
181
181
  | Trino/Presto | The hive connector reads the parquet in place: each file is mounted into the container and declared as an external table | `test/trino/hive_ddl.ts`, `test/trino/hive.properties`, `test/presto/hive.properties` | `trino_start.sh` / `presto_start.sh` derive the DDL from the parquet schemas at container start. The hive metastore lowercases names, so a table with nested columns (`ga_sample`) is a `_hive` table plus a view that casts the nested field names back; top-level column names stay lowercase, since Trino lowercases those in every connector |
182
182
  | BigQuery | Pre-loaded manually in `malloydata-org` project | (none) | No loader script in repo. Data assumed to exist. |
183
183
  | Snowflake | SQL: `PUT` local parquet → stage, `COPY INTO` table | `test/snowflake/load_test_data.sh` (wraps `load_test_data.sql`) | Run via `sh test/snowflake/load_test_data.sh` (needs the `snowsql` CLI) |
184
- | Databricks | TS script: upload to Volume via REST, `CREATE TABLE AS SELECT FROM read_files()` | `test/databricks/load_test_data.sh` (wraps `load_test_data.ts`) | Run manually with the `DATABRICKS_*` env vars set: `sh test/databricks/load_test_data.sh` |
184
+ | Databricks | TS script: upload to Volume via REST, `CREATE TABLE AS SELECT FROM read_files()` | `test/databricks/load_test_data.sh` (wraps `load_test_data.ts`) | Run manually with the `DATABRICKS_*` env vars set: `sh test/databricks/load_test_data.sh`. From a network that reaches the workspace only through a proxy, `DATABRICKS_HTTPS_PROXY` is the connection's `proxy` setting for the tests and `diag_databricks.ts`; the loader uploads with `fetch`, which does not use it |
185
185
 
186
186
  The DuckDB-driven loaders share `test/data/parquet_loader.ts`, which runs everything through Malloy's own `DuckDBConnection`, so a database is built by the same DuckDB the tests read it with. It reads the table list from the parquet directory and takes a `LoadPlan` naming what a target cannot hold.
187
187
 
@@ -17,6 +17,7 @@ async function main() {
17
17
  token: process.env['DATABRICKS_TOKEN'],
18
18
  defaultCatalog: process.env['DATABRICKS_CATALOG'],
19
19
  defaultSchema: process.env['DATABRICKS_SCHEMA'],
20
+ proxy: process.env['DATABRICKS_HTTPS_PROXY'],
20
21
  });
21
22
 
22
23
  const sql = process.argv[2];
package/package.json CHANGED
@@ -20,16 +20,16 @@
20
20
  "malloyc": "ts-node ../scripts/malloy-to-json"
21
21
  },
22
22
  "dependencies": {
23
- "@malloydata/db-bigquery": "0.0.436",
24
- "@malloydata/db-duckdb": "0.0.436",
25
- "@malloydata/db-postgres": "0.0.436",
26
- "@malloydata/db-snowflake": "0.0.436",
27
- "@malloydata/db-sqlserver": "0.0.436",
28
- "@malloydata/db-trino": "0.0.436",
29
- "@malloydata/malloy": "0.0.436",
30
- "@malloydata/malloy-tag": "0.0.436",
31
- "@malloydata/render": "0.0.436",
32
- "@malloydata/render-validator": "0.0.436",
23
+ "@malloydata/db-bigquery": "0.0.438",
24
+ "@malloydata/db-duckdb": "0.0.438",
25
+ "@malloydata/db-postgres": "0.0.438",
26
+ "@malloydata/db-snowflake": "0.0.438",
27
+ "@malloydata/db-sqlserver": "0.0.438",
28
+ "@malloydata/db-trino": "0.0.438",
29
+ "@malloydata/malloy": "0.0.438",
30
+ "@malloydata/malloy-tag": "0.0.438",
31
+ "@malloydata/render": "0.0.438",
32
+ "@malloydata/render-validator": "0.0.438",
33
33
  "events": "^3.3.0",
34
34
  "jsdom": "^22.1.0",
35
35
  "luxon": "^3.7.2",
@@ -43,5 +43,5 @@
43
43
  "overrides": {
44
44
  "typescript": "^6.0.3"
45
45
  },
46
- "version": "0.0.436"
46
+ "version": "0.0.438"
47
47
  }
@@ -13,7 +13,7 @@ DATADIR=$ROOTDIR/test/data/malloytest-parquet
13
13
  PRESTO_VERSION=0.287
14
14
  USE_SLIM=false
15
15
  CONTAINER_NAME="presto-malloy"
16
- PORT=${PRESTO_PORT:-8080}
16
+ PORT=${PRESTO_PORT:-8090}
17
17
 
18
18
  # Parse arguments
19
19
  for arg in "$@"; do
@@ -21,6 +21,26 @@ describe('misc tests for regressions that have no better home', () => {
21
21
  `).toMatchResult(testModel, {});
22
22
  });
23
23
 
24
+ test('rename a field in a join below a filtered join', async () => {
25
+ // A filtered join becomes a subquery, and the joins below it are packed
26
+ // into a struct under their column names, which a rename leaves different
27
+ // from the name the query uses.
28
+ await expect(`
29
+ source: two is duckdb.sql("""SELECT 1 as k, 'acme' as name""") extend {
30
+ rename: two_k is k
31
+ primary_key: two_k
32
+ }
33
+ source: one is duckdb.sql("""SELECT 1 as k, 2 as j""") extend {
34
+ where: j > 0
35
+ join_one: two with k
36
+ }
37
+ source: zero is duckdb.sql("""SELECT 1 as k""") extend {
38
+ join_one: one on one.k = k
39
+ }
40
+ run: zero -> { group_by: one.two.name, one.two.two_k }
41
+ `).toMatchResult(testModel, {name: 'acme', two_k: 1});
42
+ });
43
+
24
44
  test('ambiguous output names are auto-renamed and runnable', async () => {
25
45
  // `state` and `s2.state` both want the name `state`; the second is renamed
26
46
  // to `s2_state`. The query must compile to runnable SQL. (Small table with