@malloydata/malloy-tests 0.0.194-dev241001212731 → 0.0.194
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.194
|
|
25
|
-
"@malloydata/db-duckdb": "^0.0.194
|
|
26
|
-
"@malloydata/db-postgres": "^0.0.194
|
|
27
|
-
"@malloydata/db-snowflake": "^0.0.194
|
|
28
|
-
"@malloydata/db-trino": "^0.0.194
|
|
29
|
-
"@malloydata/malloy": "^0.0.194
|
|
30
|
-
"@malloydata/render": "^0.0.194
|
|
24
|
+
"@malloydata/db-bigquery": "^0.0.194",
|
|
25
|
+
"@malloydata/db-duckdb": "^0.0.194",
|
|
26
|
+
"@malloydata/db-postgres": "^0.0.194",
|
|
27
|
+
"@malloydata/db-snowflake": "^0.0.194",
|
|
28
|
+
"@malloydata/db-trino": "^0.0.194",
|
|
29
|
+
"@malloydata/malloy": "^0.0.194",
|
|
30
|
+
"@malloydata/render": "^0.0.194",
|
|
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.194
|
|
39
|
+
"version": "0.0.194"
|
|
40
40
|
}
|
|
@@ -32,19 +32,23 @@ describe.each(allDucks.runtimeList)('duckdb:%s', (dbName, runtime) => {
|
|
|
32
32
|
run: foo -> fooview;
|
|
33
33
|
`;
|
|
34
34
|
|
|
35
|
-
const qm = runtime.loadQuery(query, {
|
|
35
|
+
const qm = runtime.loadQuery(query, {
|
|
36
|
+
replaceMaterializedReferences: true,
|
|
37
|
+
materializedTablePrefix: 'myPipelinePrefix',
|
|
38
|
+
});
|
|
36
39
|
const preparedResult = await qm.getPreparedResult();
|
|
37
40
|
|
|
38
41
|
expect(preparedResult.sql).toBe(
|
|
39
|
-
'SELECT \n base."two"+1 as "three"\nFROM
|
|
42
|
+
'SELECT \n base."two"+1 as "three"\nFROM myPipelinePrefix_myMaterializedQuery_6037d4be_8b92_5ea7_95a0_27bd26c240ca as base\n'
|
|
40
43
|
);
|
|
41
44
|
expect(preparedResult.dependenciesToMaterialize).toStrictEqual({
|
|
42
|
-
'
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
'myPipelinePrefix_myMaterializedQuery_6037d4be_8b92_5ea7_95a0_27bd26c240ca':
|
|
46
|
+
{
|
|
47
|
+
'id': 'myPipelinePrefix_myMaterializedQuery_6037d4be_8b92_5ea7_95a0_27bd26c240ca',
|
|
48
|
+
'path': 'internal://internal.malloy',
|
|
49
|
+
'queryName': 'myMaterializedQuery',
|
|
50
|
+
'source': undefined,
|
|
51
|
+
},
|
|
48
52
|
});
|
|
49
53
|
});
|
|
50
54
|
|
|
@@ -76,11 +80,11 @@ describe.each(allDucks.runtimeList)('duckdb:%s', (dbName, runtime) => {
|
|
|
76
80
|
const preparedResult = await qm.getPreparedResult();
|
|
77
81
|
|
|
78
82
|
expect(preparedResult.sql).toBe(
|
|
79
|
-
'SELECT \n base."three"+1 as "four"\nFROM
|
|
83
|
+
'SELECT \n base."three"+1 as "four"\nFROM secondLevelMaterializedQuery_bd80d526_f867_587e_933e_89353d26d022 as base\n'
|
|
80
84
|
);
|
|
81
85
|
expect(preparedResult.dependenciesToMaterialize).toStrictEqual({
|
|
82
|
-
'
|
|
83
|
-
id: '
|
|
86
|
+
'secondLevelMaterializedQuery_bd80d526_f867_587e_933e_89353d26d022': {
|
|
87
|
+
id: 'secondLevelMaterializedQuery_bd80d526_f867_587e_933e_89353d26d022',
|
|
84
88
|
path: 'internal://internal.malloy',
|
|
85
89
|
queryName: 'secondLevelMaterializedQuery',
|
|
86
90
|
source: undefined,
|