@malloydata/malloy-tests 0.0.123-dev240208001444 → 0.0.123-dev240209030627
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.
|
@@ -838,7 +838,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
838
838
|
}`).malloyResultMatches(expressionModel, { f: 'RUTHERFORD PAT R JR' });
|
|
839
839
|
});
|
|
840
840
|
it(`works with order by field - ${databaseName}`, async () => {
|
|
841
|
-
await expect(`##! experimental {
|
|
841
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
842
842
|
run: aircraft -> {
|
|
843
843
|
where: name ~ r'.*RUTHERFORD.*'
|
|
844
844
|
aggregate: f is string_agg(name, ',') {
|
|
@@ -849,7 +849,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
849
849
|
});
|
|
850
850
|
});
|
|
851
851
|
it(`works with order by direction - ${databaseName}`, async () => {
|
|
852
|
-
expect(`##! experimental {
|
|
852
|
+
expect(`##! experimental { aggregate_order_by }
|
|
853
853
|
run: aircraft -> {
|
|
854
854
|
where: name ~ r'.*RUTHERFORD.*'
|
|
855
855
|
aggregate: f is string_agg(name, ',') {
|
|
@@ -860,7 +860,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
860
860
|
});
|
|
861
861
|
});
|
|
862
862
|
it(`works with multiple order_bys - ${databaseName}`, async () => {
|
|
863
|
-
await expect(`##! experimental {
|
|
863
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
864
864
|
run: aircraft -> {
|
|
865
865
|
where: name ~ r'.*RUTHERFORD.*'
|
|
866
866
|
aggregate: f is string_agg(name, ',') {
|
|
@@ -871,7 +871,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
871
871
|
});
|
|
872
872
|
});
|
|
873
873
|
it(`works with order by expression - ${databaseName}`, async () => {
|
|
874
|
-
await expect(`##! experimental {
|
|
874
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
875
875
|
run: aircraft -> {
|
|
876
876
|
where: name ~ r'.*FLY.*'
|
|
877
877
|
group_by: name
|
|
@@ -886,7 +886,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
886
886
|
});
|
|
887
887
|
});
|
|
888
888
|
it(`works with order by join expression - ${databaseName}`, async () => {
|
|
889
|
-
await expect(`##! experimental {
|
|
889
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
890
890
|
run: aircraft -> {
|
|
891
891
|
where: name ~ r'.*ADVENTURE.*'
|
|
892
892
|
aggregate: f is string_agg(name, ',') { order_by: aircraft_models.model }
|
|
@@ -895,7 +895,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
895
895
|
});
|
|
896
896
|
});
|
|
897
897
|
it(`works with order asc - ${databaseName}`, async () => {
|
|
898
|
-
await expect(`##! experimental {
|
|
898
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
899
899
|
run: aircraft -> {
|
|
900
900
|
where: name ~ r'.*FLY.*'
|
|
901
901
|
group_by: name
|
|
@@ -908,7 +908,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
908
908
|
});
|
|
909
909
|
});
|
|
910
910
|
it(`works with order desc - ${databaseName}`, async () => {
|
|
911
|
-
await expect(`##! experimental {
|
|
911
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
912
912
|
run: aircraft -> {
|
|
913
913
|
where: name ~ r'.*FLY.*'
|
|
914
914
|
group_by: name
|
|
@@ -924,7 +924,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
924
924
|
// TODO bigquery cannot handle both fanout and order_by today
|
|
925
925
|
if (databaseName === 'bigquery')
|
|
926
926
|
return;
|
|
927
|
-
await expect(`##! experimental.
|
|
927
|
+
await expect(`##! experimental.aggregate_order_by
|
|
928
928
|
run: state_facts extend { join_many:
|
|
929
929
|
state_facts2 is ${databaseName}.table('malloytest.state_facts')
|
|
930
930
|
on state_facts2.state = state
|
|
@@ -939,7 +939,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
939
939
|
});
|
|
940
940
|
});
|
|
941
941
|
it(`works with fanout - ${databaseName}`, async () => {
|
|
942
|
-
await expect(`##! experimental.
|
|
942
|
+
await expect(`##! experimental.aggregate_order_by
|
|
943
943
|
run: state_facts extend { join_many:
|
|
944
944
|
state_facts2 is ${databaseName}.table('malloytest.state_facts')
|
|
945
945
|
on state_facts2.state = state
|
|
@@ -952,7 +952,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
952
952
|
});
|
|
953
953
|
});
|
|
954
954
|
it(`works with fanout and separator - ${databaseName}`, async () => {
|
|
955
|
-
await expect(`##! experimental.
|
|
955
|
+
await expect(`##! experimental.aggregate_order_by
|
|
956
956
|
run: state_facts extend { join_many:
|
|
957
957
|
state_facts2 is ${databaseName}.table('malloytest.state_facts')
|
|
958
958
|
on state_facts2.state = state
|
|
@@ -965,7 +965,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
965
965
|
});
|
|
966
966
|
});
|
|
967
967
|
it(`works with limit - ${databaseName}`, async () => {
|
|
968
|
-
const query = `##! experimental {
|
|
968
|
+
const query = `##! experimental { aggregate_order_by aggregate_limit }
|
|
969
969
|
run: aircraft -> {
|
|
970
970
|
where: name ~ r'.*FLY.*'
|
|
971
971
|
group_by: name
|
|
@@ -989,7 +989,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
989
989
|
});
|
|
990
990
|
describe('string_agg_distinct', () => {
|
|
991
991
|
it(`actually distincts - ${databaseName}`, async () => {
|
|
992
|
-
await expect(`##! experimental {
|
|
992
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
993
993
|
source: aircraft is ${databaseName}.table('malloytest.aircraft') extend {
|
|
994
994
|
primary_key: tail_num
|
|
995
995
|
}
|
|
@@ -1025,7 +1025,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1025
1025
|
});
|
|
1026
1026
|
});
|
|
1027
1027
|
it(`works with order by direction - ${databaseName}`, async () => {
|
|
1028
|
-
await expect(`##! experimental {
|
|
1028
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1029
1029
|
run: aircraft -> {
|
|
1030
1030
|
where: name ~ r'.*RUTHERFORD.*'
|
|
1031
1031
|
aggregate: f is string_agg_distinct(name, ',') {
|
|
@@ -1036,7 +1036,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1036
1036
|
});
|
|
1037
1037
|
});
|
|
1038
1038
|
it(`works with order asc - ${databaseName}`, async () => {
|
|
1039
|
-
await expect(`##! experimental {
|
|
1039
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1040
1040
|
run: aircraft -> {
|
|
1041
1041
|
where: name ~ r'.*FLY.*'
|
|
1042
1042
|
group_by: name
|
|
@@ -1049,7 +1049,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1049
1049
|
});
|
|
1050
1050
|
});
|
|
1051
1051
|
it(`works with order desc - ${databaseName}`, async () => {
|
|
1052
|
-
await expect(`##! experimental {
|
|
1052
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1053
1053
|
run: aircraft -> {
|
|
1054
1054
|
where: name ~ r'.*FLY.*'
|
|
1055
1055
|
group_by: name
|
|
@@ -1062,7 +1062,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1062
1062
|
});
|
|
1063
1063
|
});
|
|
1064
1064
|
it(`works with limit - ${databaseName}`, async () => {
|
|
1065
|
-
const query = `##! experimental {
|
|
1065
|
+
const query = `##! experimental { aggregate_order_by aggregate_limit }
|
|
1066
1066
|
run: aircraft -> {
|
|
1067
1067
|
where: name ~ r'.*FLY.*'
|
|
1068
1068
|
group_by: name
|
|
@@ -1086,7 +1086,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1086
1086
|
});
|
|
1087
1087
|
describe('partition_by', () => {
|
|
1088
1088
|
it(`works - ${databaseName}`, async () => {
|
|
1089
|
-
await expect(
|
|
1089
|
+
await expect(`
|
|
1090
1090
|
run: flights -> {
|
|
1091
1091
|
group_by:
|
|
1092
1092
|
yr is year(dep_time)
|
|
@@ -1114,7 +1114,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1114
1114
|
]);
|
|
1115
1115
|
});
|
|
1116
1116
|
it(`works with multiple order_bys - ${databaseName}`, async () => {
|
|
1117
|
-
await expect(
|
|
1117
|
+
await expect(`
|
|
1118
1118
|
run: aircraft -> {
|
|
1119
1119
|
where: name =
|
|
1120
1120
|
"UNITED AIR LINES INC"
|
package/package.json
CHANGED
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@jest/globals": "^29.4.3",
|
|
21
|
-
"@malloydata/db-bigquery": "^0.0.123-
|
|
22
|
-
"@malloydata/db-duckdb": "^0.0.123-
|
|
23
|
-
"@malloydata/db-postgres": "^0.0.123-
|
|
24
|
-
"@malloydata/malloy": "^0.0.123-
|
|
25
|
-
"@malloydata/render": "^0.0.123-
|
|
21
|
+
"@malloydata/db-bigquery": "^0.0.123-dev240209030627",
|
|
22
|
+
"@malloydata/db-duckdb": "^0.0.123-dev240209030627",
|
|
23
|
+
"@malloydata/db-postgres": "^0.0.123-dev240209030627",
|
|
24
|
+
"@malloydata/malloy": "^0.0.123-dev240209030627",
|
|
25
|
+
"@malloydata/render": "^0.0.123-dev240209030627",
|
|
26
26
|
"jsdom": "^22.1.0",
|
|
27
27
|
"luxon": "^2.4.0",
|
|
28
28
|
"madge": "^6.0.0"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"@types/jsdom": "^21.1.1",
|
|
32
32
|
"@types/luxon": "^2.4.0"
|
|
33
33
|
},
|
|
34
|
-
"version": "0.0.123-
|
|
34
|
+
"version": "0.0.123-dev240209030627"
|
|
35
35
|
}
|
|
@@ -1195,7 +1195,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1195
1195
|
});
|
|
1196
1196
|
|
|
1197
1197
|
it(`works with order by field - ${databaseName}`, async () => {
|
|
1198
|
-
await expect(`##! experimental {
|
|
1198
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1199
1199
|
run: aircraft -> {
|
|
1200
1200
|
where: name ~ r'.*RUTHERFORD.*'
|
|
1201
1201
|
aggregate: f is string_agg(name, ',') {
|
|
@@ -1207,7 +1207,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1207
1207
|
});
|
|
1208
1208
|
|
|
1209
1209
|
it(`works with order by direction - ${databaseName}`, async () => {
|
|
1210
|
-
expect(`##! experimental {
|
|
1210
|
+
expect(`##! experimental { aggregate_order_by }
|
|
1211
1211
|
run: aircraft -> {
|
|
1212
1212
|
where: name ~ r'.*RUTHERFORD.*'
|
|
1213
1213
|
aggregate: f is string_agg(name, ',') {
|
|
@@ -1219,7 +1219,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1219
1219
|
});
|
|
1220
1220
|
|
|
1221
1221
|
it(`works with multiple order_bys - ${databaseName}`, async () => {
|
|
1222
|
-
await expect(`##! experimental {
|
|
1222
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1223
1223
|
run: aircraft -> {
|
|
1224
1224
|
where: name ~ r'.*RUTHERFORD.*'
|
|
1225
1225
|
aggregate: f is string_agg(name, ',') {
|
|
@@ -1231,7 +1231,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1231
1231
|
});
|
|
1232
1232
|
|
|
1233
1233
|
it(`works with order by expression - ${databaseName}`, async () => {
|
|
1234
|
-
await expect(`##! experimental {
|
|
1234
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1235
1235
|
run: aircraft -> {
|
|
1236
1236
|
where: name ~ r'.*FLY.*'
|
|
1237
1237
|
group_by: name
|
|
@@ -1247,7 +1247,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
|
|
1249
1249
|
it(`works with order by join expression - ${databaseName}`, async () => {
|
|
1250
|
-
await expect(`##! experimental {
|
|
1250
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1251
1251
|
run: aircraft -> {
|
|
1252
1252
|
where: name ~ r'.*ADVENTURE.*'
|
|
1253
1253
|
aggregate: f is string_agg(name, ',') { order_by: aircraft_models.model }
|
|
@@ -1257,7 +1257,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1257
1257
|
});
|
|
1258
1258
|
|
|
1259
1259
|
it(`works with order asc - ${databaseName}`, async () => {
|
|
1260
|
-
await expect(`##! experimental {
|
|
1260
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1261
1261
|
run: aircraft -> {
|
|
1262
1262
|
where: name ~ r'.*FLY.*'
|
|
1263
1263
|
group_by: name
|
|
@@ -1271,7 +1271,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1271
1271
|
});
|
|
1272
1272
|
|
|
1273
1273
|
it(`works with order desc - ${databaseName}`, async () => {
|
|
1274
|
-
await expect(`##! experimental {
|
|
1274
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1275
1275
|
run: aircraft -> {
|
|
1276
1276
|
where: name ~ r'.*FLY.*'
|
|
1277
1277
|
group_by: name
|
|
@@ -1287,7 +1287,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1287
1287
|
it(`works with fanout and order_by - ${databaseName}`, async () => {
|
|
1288
1288
|
// TODO bigquery cannot handle both fanout and order_by today
|
|
1289
1289
|
if (databaseName === 'bigquery') return;
|
|
1290
|
-
await expect(`##! experimental.
|
|
1290
|
+
await expect(`##! experimental.aggregate_order_by
|
|
1291
1291
|
run: state_facts extend { join_many:
|
|
1292
1292
|
state_facts2 is ${databaseName}.table('malloytest.state_facts')
|
|
1293
1293
|
on state_facts2.state = state
|
|
@@ -1303,7 +1303,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1303
1303
|
});
|
|
1304
1304
|
|
|
1305
1305
|
it(`works with fanout - ${databaseName}`, async () => {
|
|
1306
|
-
await expect(`##! experimental.
|
|
1306
|
+
await expect(`##! experimental.aggregate_order_by
|
|
1307
1307
|
run: state_facts extend { join_many:
|
|
1308
1308
|
state_facts2 is ${databaseName}.table('malloytest.state_facts')
|
|
1309
1309
|
on state_facts2.state = state
|
|
@@ -1317,7 +1317,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1317
1317
|
});
|
|
1318
1318
|
|
|
1319
1319
|
it(`works with fanout and separator - ${databaseName}`, async () => {
|
|
1320
|
-
await expect(`##! experimental.
|
|
1320
|
+
await expect(`##! experimental.aggregate_order_by
|
|
1321
1321
|
run: state_facts extend { join_many:
|
|
1322
1322
|
state_facts2 is ${databaseName}.table('malloytest.state_facts')
|
|
1323
1323
|
on state_facts2.state = state
|
|
@@ -1331,7 +1331,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1331
1331
|
});
|
|
1332
1332
|
|
|
1333
1333
|
it(`works with limit - ${databaseName}`, async () => {
|
|
1334
|
-
const query = `##! experimental {
|
|
1334
|
+
const query = `##! experimental { aggregate_order_by aggregate_limit }
|
|
1335
1335
|
run: aircraft -> {
|
|
1336
1336
|
where: name ~ r'.*FLY.*'
|
|
1337
1337
|
group_by: name
|
|
@@ -1357,7 +1357,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1357
1357
|
|
|
1358
1358
|
describe('string_agg_distinct', () => {
|
|
1359
1359
|
it(`actually distincts - ${databaseName}`, async () => {
|
|
1360
|
-
await expect(`##! experimental {
|
|
1360
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1361
1361
|
source: aircraft is ${databaseName}.table('malloytest.aircraft') extend {
|
|
1362
1362
|
primary_key: tail_num
|
|
1363
1363
|
}
|
|
@@ -1397,7 +1397,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1397
1397
|
});
|
|
1398
1398
|
|
|
1399
1399
|
it(`works with order by direction - ${databaseName}`, async () => {
|
|
1400
|
-
await expect(`##! experimental {
|
|
1400
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1401
1401
|
run: aircraft -> {
|
|
1402
1402
|
where: name ~ r'.*RUTHERFORD.*'
|
|
1403
1403
|
aggregate: f is string_agg_distinct(name, ',') {
|
|
@@ -1409,7 +1409,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1409
1409
|
});
|
|
1410
1410
|
|
|
1411
1411
|
it(`works with order asc - ${databaseName}`, async () => {
|
|
1412
|
-
await expect(`##! experimental {
|
|
1412
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1413
1413
|
run: aircraft -> {
|
|
1414
1414
|
where: name ~ r'.*FLY.*'
|
|
1415
1415
|
group_by: name
|
|
@@ -1423,7 +1423,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1423
1423
|
});
|
|
1424
1424
|
|
|
1425
1425
|
it(`works with order desc - ${databaseName}`, async () => {
|
|
1426
|
-
await expect(`##! experimental {
|
|
1426
|
+
await expect(`##! experimental { aggregate_order_by }
|
|
1427
1427
|
run: aircraft -> {
|
|
1428
1428
|
where: name ~ r'.*FLY.*'
|
|
1429
1429
|
group_by: name
|
|
@@ -1437,7 +1437,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1437
1437
|
});
|
|
1438
1438
|
|
|
1439
1439
|
it(`works with limit - ${databaseName}`, async () => {
|
|
1440
|
-
const query = `##! experimental {
|
|
1440
|
+
const query = `##! experimental { aggregate_order_by aggregate_limit }
|
|
1441
1441
|
run: aircraft -> {
|
|
1442
1442
|
where: name ~ r'.*FLY.*'
|
|
1443
1443
|
group_by: name
|
|
@@ -1463,7 +1463,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1463
1463
|
|
|
1464
1464
|
describe('partition_by', () => {
|
|
1465
1465
|
it(`works - ${databaseName}`, async () => {
|
|
1466
|
-
await expect(
|
|
1466
|
+
await expect(`
|
|
1467
1467
|
run: flights -> {
|
|
1468
1468
|
group_by:
|
|
1469
1469
|
yr is year(dep_time)
|
|
@@ -1492,7 +1492,7 @@ describe.each(runtimes.runtimeList)('%s', (databaseName, runtime) => {
|
|
|
1492
1492
|
});
|
|
1493
1493
|
|
|
1494
1494
|
it(`works with multiple order_bys - ${databaseName}`, async () => {
|
|
1495
|
-
await expect(
|
|
1495
|
+
await expect(`
|
|
1496
1496
|
run: aircraft -> {
|
|
1497
1497
|
where: name =
|
|
1498
1498
|
"UNITED AIR LINES INC"
|