@malloydata/malloy-tests 0.0.222-dev241212021944 → 0.0.222-dev241212190052

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-dev241212021944",
25
- "@malloydata/db-duckdb": "^0.0.222-dev241212021944",
26
- "@malloydata/db-postgres": "^0.0.222-dev241212021944",
27
- "@malloydata/db-snowflake": "^0.0.222-dev241212021944",
28
- "@malloydata/db-trino": "^0.0.222-dev241212021944",
29
- "@malloydata/malloy": "^0.0.222-dev241212021944",
30
- "@malloydata/render": "^0.0.222-dev241212021944",
24
+ "@malloydata/db-bigquery": "^0.0.222-dev241212190052",
25
+ "@malloydata/db-duckdb": "^0.0.222-dev241212190052",
26
+ "@malloydata/db-postgres": "^0.0.222-dev241212190052",
27
+ "@malloydata/db-snowflake": "^0.0.222-dev241212190052",
28
+ "@malloydata/db-trino": "^0.0.222-dev241212190052",
29
+ "@malloydata/malloy": "^0.0.222-dev241212190052",
30
+ "@malloydata/render": "^0.0.222-dev241212190052",
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-dev241212021944"
40
+ "version": "0.0.222-dev241212190052"
41
41
  }
@@ -253,4 +253,17 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
253
253
  run: x -> { select: * }
254
254
  `).malloyResultMatches(runtime, {foo: 1});
255
255
  });
256
+ it('composite with each', async () => {
257
+ await expect(`
258
+ ##! experimental.composite_sources
259
+ source: state_facts is ${databaseName}.table('malloytest.state_facts')
260
+ source: x is compose(
261
+ state_facts extend { measure: foo is sum(0); dimension: bar is 1 },
262
+ state_facts extend { measure: foo is count() }
263
+ ) extend {
264
+ dimension: arr is [1, 2, 3]
265
+ }
266
+ run: x -> { aggregate: foo; group_by: bar, arr.each }
267
+ `).malloyResultMatches(runtime, {foo: 0});
268
+ });
256
269
  });
@@ -313,6 +313,13 @@ describe.each(runtimes.runtimeList)(
313
313
  query: 'first_param=val_one&second_param=2',
314
314
  });
315
315
  });
316
+ test('string split function in tresto', async () => {
317
+ await expect(`
318
+ run: ${databaseName}.sql("SELECT 1 AS N") -> {
319
+ select: some_words is split('hello world', ' ')
320
+ }
321
+ `).malloyResultMatches(runtime, {some_words: ['hello', 'world']});
322
+ });
316
323
  }
317
324
  );
318
325
 
@@ -21,13 +21,13 @@
21
21
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  */
23
23
 
24
- import {composeSQLExpr, StructDef} from '@malloydata/malloy';
24
+ import {composeSQLExpr, SourceDef} from '@malloydata/malloy';
25
25
  import {fToQF} from '../util';
26
26
 
27
27
  // will it build?
28
28
 
29
29
  /** Medicare Model */
30
- export const medicareModel: StructDef = {
30
+ export const medicareModel: SourceDef = {
31
31
  as: 'medicare_test',
32
32
  dialect: 'standardsql',
33
33
  fields: [
@@ -218,7 +218,7 @@ export const medicareModel: StructDef = {
218
218
  tablePath: 'malloydata-org.malloytest.bq_medicare_test',
219
219
  };
220
220
 
221
- export const medicareStateFacts: StructDef = {
221
+ export const medicareStateFacts: SourceDef = {
222
222
  fields: [],
223
223
  name: 'medicare_state_facts',
224
224
  dialect: 'standardsql',