@malloydata/malloy-tests 0.0.253-dev250330190957 → 0.0.253-dev250401001016

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,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@jest/globals": "^29.4.3",
24
- "@malloydata/db-bigquery": "^0.0.253-dev250330190957",
25
- "@malloydata/db-duckdb": "^0.0.253-dev250330190957",
26
- "@malloydata/db-postgres": "^0.0.253-dev250330190957",
27
- "@malloydata/db-snowflake": "^0.0.253-dev250330190957",
28
- "@malloydata/db-trino": "^0.0.253-dev250330190957",
29
- "@malloydata/malloy": "^0.0.253-dev250330190957",
30
- "@malloydata/malloy-tag": "^0.0.253-dev250330190957",
31
- "@malloydata/render": "^0.0.253-dev250330190957",
24
+ "@malloydata/db-bigquery": "^0.0.253-dev250401001016",
25
+ "@malloydata/db-duckdb": "^0.0.253-dev250401001016",
26
+ "@malloydata/db-postgres": "^0.0.253-dev250401001016",
27
+ "@malloydata/db-snowflake": "^0.0.253-dev250401001016",
28
+ "@malloydata/db-trino": "^0.0.253-dev250401001016",
29
+ "@malloydata/malloy": "^0.0.253-dev250401001016",
30
+ "@malloydata/malloy-tag": "^0.0.253-dev250401001016",
31
+ "@malloydata/render": "^0.0.253-dev250401001016",
32
32
  "events": "^3.3.0",
33
33
  "jsdom": "^22.1.0",
34
34
  "luxon": "^2.4.0",
@@ -38,5 +38,5 @@
38
38
  "@types/jsdom": "^21.1.1",
39
39
  "@types/luxon": "^2.4.0"
40
40
  },
41
- "version": "0.0.253-dev250330190957"
41
+ "version": "0.0.253-dev250401001016"
42
42
  }
@@ -396,6 +396,19 @@ describe.each(runtimes.runtimeList)(
396
396
  `).malloyResultMatches(runtime, {b: 'b'});
397
397
  });
398
398
  test.todo('array or record where first entries are null');
399
+ // https://github.com/malloydata/malloy/issues/2206
400
+ test.skip('dereference of literal record (causes stack overflow at one point)', async () => {
401
+ await expect(`
402
+ run: ${conName}.sql("""
403
+ SELECT ${runtime.dialect.sqlLiteralString('Mark')} as first_name,
404
+ ${runtime.dialect.sqlLiteralString('Toy')} as last_name
405
+ """) extend {
406
+ dimension: owner is {first_name, last_name}
407
+ } -> {
408
+ group_by: x is owner.first_name
409
+ }
410
+ `).malloyResultMatches(runtime, {x: 'Mark'});
411
+ });
399
412
  });
400
413
  describe('repeated record', () => {
401
414
  const abType: ArrayTypeDef = {
@@ -525,19 +538,23 @@ describe.each(runtimes.runtimeList)(
525
538
  {val: 1, name: 'uno'},
526
539
  ]);
527
540
  });
528
- });
529
- // https://github.com/malloydata/malloy/issues/2206
530
- test.skip('dereference of literal record (causes stack overflow at one point)', async () => {
531
- await expect(`
532
- run: ${conName}.sql("""
533
- SELECT ${runtime.dialect.sqlLiteralString('Mark')} as first_name,
534
- ${runtime.dialect.sqlLiteralString('Toy')} as last_name
535
- """) extend {
536
- dimension: owner is {first_name, last_name}
537
- } -> {
538
- group_by: x is owner.first_name
539
- }
540
- `).malloyResultMatches(runtime, {x: 'Mark'});
541
+ test('group_by repeated record', async () => {
542
+ await expect(`
543
+ run: ${conName}.sql(""" ${selectAB('ab')} """) -> { group_by: ab }
544
+ `).malloyResultMatches(runtime, {ab: ab_eq});
545
+ });
546
+ // test for https://github.com/malloydata/malloy/issues/2065
547
+ test('nest a group_by repeated record', async () => {
548
+ await expect(`
549
+ run: ${conName}.sql(""" ${selectAB('ab')} """)
550
+ -> {
551
+ nest: gab is {group_by: ab }
552
+ } -> {
553
+ // mtoy todo fix malloyResultMatches, this un-nest should not be needed
554
+ select: gab.ab
555
+ }
556
+ `).malloyResultMatches(runtime, {ab: ab_eq});
557
+ });
541
558
  });
542
559
  }
543
560
  );
@@ -664,6 +664,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
664
664
  aircraft.aircraft.first_three
665
665
  aircraft_count
666
666
  order_by: 2 desc, 1
667
+ limit: 3
667
668
  }
668
669
  `).malloyResultMatches(expressionModel, {first_three: 'SAB'});
669
670
  }