@devrev/meerkat-node 0.0.112 → 0.0.116

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.
@@ -1,99 +1,11 @@
1
1
  "use strict";
2
- function _export(target, all) {
3
- for(var name in all)Object.defineProperty(target, name, {
4
- enumerable: true,
5
- get: all[name]
6
- });
7
- }
8
- _export(exports, {
9
- CREATE_TEST_TABLE: function() {
10
- return CREATE_TEST_TABLE;
11
- },
12
- INPUT_DATA_QUERY: function() {
13
- return INPUT_DATA_QUERY;
14
- },
15
- TABLE_SCHEMA: function() {
16
- return TABLE_SCHEMA;
17
- },
18
- TEST_DATA: function() {
19
- return TEST_DATA;
2
+ Object.defineProperty(exports, "TEST_DATA_WITH_SAFE_ALIAS", {
3
+ enumerable: true,
4
+ get: function() {
5
+ return TEST_DATA_WITH_SAFE_ALIAS;
20
6
  }
21
7
  });
22
- const CREATE_TEST_TABLE = `
23
- CREATE TABLE orders (
24
- order_id INTEGER,
25
- customer_id VARCHAR,
26
- product_id VARCHAR,
27
- order_date DATE,
28
- order_amount FLOAT,
29
- vendors VARCHAR[]
30
- );
31
- `;
32
- const INPUT_DATA_QUERY = `
33
- INSERT INTO orders VALUES
34
- (1, '1', '1', '2022-01-01', 50, ['myntra', 'amazon', 'flipkart']),
35
- (2, '1', '2', '2022-01-02', 80, ['myntra']),
36
- (3, '2', '3', '2022-02-01', 25, []),
37
- (4, '2', '1', '2022-03-01', 75, ['flipkart']),
38
- (5, '3', '1', '2022-03-02', 100, ['myntra', 'amazon', 'flipkart']),
39
- (6, '4', '2', '2022-04-01', 45, []),
40
- (7, '4', '3', '2022-05-01', 90, ['myntra', 'flipkart']),
41
- (8, '5', '1', '2022-05-02', 65, ['amazon', 'flipkart']),
42
- (9, '5', '2', '2022-05-05', 85, []),
43
- (10, '6', '3', '2022-06-01', 120, ['myntra', 'amazon']),
44
- (11, '6aa6', '3', '2024-06-01', 0, ['amazon']),
45
- (12, NULL, '3', '2024-07-01', 100, ['flipkart']),
46
- (13, '7', '6', '2024-08-01', 100, ['swiggy''s']);
47
- `;
48
- const TABLE_SCHEMA = {
49
- name: 'orders',
50
- sql: 'select * from orders',
51
- measures: [
52
- {
53
- name: 'order_amount',
54
- sql: 'order_amount',
55
- type: 'number'
56
- },
57
- {
58
- name: 'total_order_amount',
59
- sql: 'SUM(order_amount)',
60
- type: 'number'
61
- }
62
- ],
63
- dimensions: [
64
- {
65
- name: 'order_date',
66
- sql: 'order_date',
67
- type: 'time'
68
- },
69
- {
70
- name: 'order_id',
71
- sql: 'order_id',
72
- type: 'number'
73
- },
74
- {
75
- name: 'customer_id',
76
- sql: 'customer_id',
77
- type: 'string'
78
- },
79
- {
80
- name: 'product_id',
81
- sql: 'product_id',
82
- type: 'string'
83
- },
84
- {
85
- name: 'order_month',
86
- sql: `DATE_TRUNC('month', order_date)`,
87
- type: 'string'
88
- },
89
- {
90
- name: 'vendors',
91
- sql: 'vendors',
92
- type: 'string_array'
93
- }
94
- ]
95
- };
96
- const TEST_DATA = [
8
+ const TEST_DATA_WITH_SAFE_ALIAS = [
97
9
  [
98
10
  {
99
11
  testName: 'GroupBySQLInnerQuery',
@@ -138,6 +50,10 @@ const TEST_DATA = [
138
50
  orders__customer_id: '6aa6',
139
51
  orders__total_order_amount: 0
140
52
  },
53
+ {
54
+ orders__customer_id: '8',
55
+ orders__total_order_amount: 50
56
+ },
141
57
  {
142
58
  orders__customer_id: '2',
143
59
  orders__total_order_amount: 100
@@ -369,6 +285,15 @@ const TEST_DATA = [
369
285
  vendors: [
370
286
  "swiggy's"
371
287
  ]
288
+ },
289
+ {
290
+ order_id: 14,
291
+ customer_id: '8',
292
+ orders__customer_id: '8',
293
+ product_id: '1',
294
+ order_date: '2024-09-01',
295
+ order_amount: 50.0,
296
+ vendors: null
372
297
  }
373
298
  ]
374
299
  }
@@ -489,6 +414,16 @@ const TEST_DATA = [
489
414
  vendors: [
490
415
  "swiggy's"
491
416
  ]
417
+ },
418
+ {
419
+ customer_id: '8',
420
+ order_amount: 50,
421
+ order_date: '2024-09-01T00:00:00.000Z',
422
+ order_id: 14,
423
+ orders__customer_id: '8',
424
+ orders__order_date: undefined,
425
+ product_id: '1',
426
+ vendors: null
492
427
  }
493
428
  ]
494
429
  }
@@ -860,6 +795,15 @@ const TEST_DATA = [
860
795
  vendors: [
861
796
  "swiggy's"
862
797
  ]
798
+ },
799
+ {
800
+ customer_id: '8',
801
+ order_amount: 50,
802
+ order_date: '2024-09-01T00:00:00.000Z',
803
+ order_id: 14,
804
+ orders__order_date: '2024-09-01T00:00:00.000Z',
805
+ product_id: '1',
806
+ vendors: null
863
807
  }
864
808
  ]
865
809
  }
@@ -1294,7 +1238,7 @@ const TEST_DATA = [
1294
1238
  [
1295
1239
  {
1296
1240
  testName: 'Not In',
1297
- expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id NOT IN ('1', '2')) AND (NOT (orders__vendors && (ARRAY['myntra', 'flipkart']))))`,
1241
+ expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, product_id AS orders__product_id, * FROM (select * from orders) AS orders) AS orders WHERE (((orders__customer_id NOT IN ('1', '2')) OR (orders__customer_id IS NULL)) AND (orders__product_id = '3'))`,
1298
1242
  cubeInput: {
1299
1243
  measures: [
1300
1244
  '*'
@@ -1311,11 +1255,10 @@ const TEST_DATA = [
1311
1255
  ]
1312
1256
  },
1313
1257
  {
1314
- member: 'orders.vendors',
1315
- operator: 'notIn',
1258
+ member: 'orders.product_id',
1259
+ operator: 'equals',
1316
1260
  values: [
1317
- 'myntra',
1318
- 'flipkart'
1261
+ '3'
1319
1262
  ]
1320
1263
  }
1321
1264
  ]
@@ -1324,12 +1267,111 @@ const TEST_DATA = [
1324
1267
  dimensions: []
1325
1268
  },
1326
1269
  expectedOutput: [
1270
+ {
1271
+ customer_id: '4',
1272
+ order_amount: 90,
1273
+ order_date: '2022-05-01T00:00:00.000Z',
1274
+ order_id: 7,
1275
+ orders__customer_id: '4',
1276
+ orders__order_date: undefined,
1277
+ orders__product_id: '3',
1278
+ product_id: '3',
1279
+ vendors: [
1280
+ 'myntra',
1281
+ 'flipkart'
1282
+ ]
1283
+ },
1284
+ {
1285
+ customer_id: '6',
1286
+ order_amount: 120,
1287
+ order_date: '2022-06-01T00:00:00.000Z',
1288
+ order_id: 10,
1289
+ orders__customer_id: '6',
1290
+ orders__order_date: undefined,
1291
+ orders__product_id: '3',
1292
+ product_id: '3',
1293
+ vendors: [
1294
+ 'myntra',
1295
+ 'amazon'
1296
+ ]
1297
+ },
1298
+ {
1299
+ customer_id: '6aa6',
1300
+ order_amount: 0,
1301
+ order_date: '2024-06-01T00:00:00.000Z',
1302
+ order_id: 11,
1303
+ orders__customer_id: '6aa6',
1304
+ orders__order_date: undefined,
1305
+ orders__product_id: '3',
1306
+ product_id: '3',
1307
+ vendors: [
1308
+ 'amazon'
1309
+ ]
1310
+ },
1311
+ {
1312
+ customer_id: null,
1313
+ order_amount: 100,
1314
+ order_date: '2024-07-01T00:00:00.000Z',
1315
+ order_id: 12,
1316
+ orders__customer_id: null,
1317
+ orders__order_date: undefined,
1318
+ orders__product_id: '3',
1319
+ product_id: '3',
1320
+ vendors: [
1321
+ 'flipkart'
1322
+ ]
1323
+ }
1324
+ ]
1325
+ },
1326
+ {
1327
+ testName: 'Not In for array type',
1328
+ expectedSQL: `SELECT orders.* FROM (SELECT vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((NOT (orders__vendors && (ARRAY['myntra', 'amazon']))) OR (orders__vendors IS NULL))`,
1329
+ cubeInput: {
1330
+ measures: [
1331
+ '*'
1332
+ ],
1333
+ filters: [
1334
+ {
1335
+ member: 'orders.vendors',
1336
+ operator: 'notIn',
1337
+ values: [
1338
+ 'myntra',
1339
+ 'amazon'
1340
+ ]
1341
+ }
1342
+ ],
1343
+ dimensions: []
1344
+ },
1345
+ expectedOutput: [
1346
+ {
1347
+ customer_id: '2',
1348
+ order_amount: 25,
1349
+ order_date: '2022-02-01T00:00:00.000Z',
1350
+ order_id: 3,
1351
+ orders__order_date: undefined,
1352
+ orders__vendors: [],
1353
+ product_id: '3',
1354
+ vendors: []
1355
+ },
1356
+ {
1357
+ customer_id: '2',
1358
+ order_amount: 75,
1359
+ order_date: '2022-03-01T00:00:00.000Z',
1360
+ order_id: 4,
1361
+ orders__order_date: undefined,
1362
+ orders__vendors: [
1363
+ 'flipkart'
1364
+ ],
1365
+ product_id: '1',
1366
+ vendors: [
1367
+ 'flipkart'
1368
+ ]
1369
+ },
1327
1370
  {
1328
1371
  customer_id: '4',
1329
1372
  order_amount: 45,
1330
1373
  order_date: '2022-04-01T00:00:00.000Z',
1331
1374
  order_id: 6,
1332
- orders__customer_id: '4',
1333
1375
  orders__order_date: undefined,
1334
1376
  orders__vendors: [],
1335
1377
  product_id: '2',
@@ -1340,25 +1382,23 @@ const TEST_DATA = [
1340
1382
  order_amount: 85,
1341
1383
  order_date: '2022-05-05T00:00:00.000Z',
1342
1384
  order_id: 9,
1343
- orders__customer_id: '5',
1344
1385
  orders__order_date: undefined,
1345
1386
  orders__vendors: [],
1346
1387
  product_id: '2',
1347
1388
  vendors: []
1348
1389
  },
1349
1390
  {
1350
- customer_id: '6aa6',
1351
- order_amount: 0,
1352
- order_date: '2024-06-01T00:00:00.000Z',
1353
- order_id: 11,
1354
- orders__customer_id: '6aa6',
1391
+ customer_id: null,
1392
+ order_amount: 100,
1393
+ order_date: '2024-07-01T00:00:00.000Z',
1394
+ order_id: 12,
1355
1395
  orders__order_date: undefined,
1356
1396
  orders__vendors: [
1357
- 'amazon'
1397
+ 'flipkart'
1358
1398
  ],
1359
1399
  product_id: '3',
1360
1400
  vendors: [
1361
- 'amazon'
1401
+ 'flipkart'
1362
1402
  ]
1363
1403
  },
1364
1404
  {
@@ -1366,7 +1406,6 @@ const TEST_DATA = [
1366
1406
  order_amount: 100,
1367
1407
  order_date: '2024-08-01T00:00:00.000Z',
1368
1408
  order_id: 13,
1369
- orders__customer_id: '7',
1370
1409
  orders__order_date: undefined,
1371
1410
  orders__vendors: [
1372
1411
  "swiggy's"
@@ -1375,10 +1414,20 @@ const TEST_DATA = [
1375
1414
  vendors: [
1376
1415
  "swiggy's"
1377
1416
  ]
1417
+ },
1418
+ {
1419
+ customer_id: '8',
1420
+ order_amount: 50,
1421
+ order_date: '2024-09-01T00:00:00.000Z',
1422
+ order_id: 14,
1423
+ orders__order_date: undefined,
1424
+ orders__vendors: null,
1425
+ product_id: '1',
1426
+ vendors: null
1378
1427
  }
1379
1428
  ]
1380
1429
  }
1381
1430
  ]
1382
1431
  ];
1383
1432
 
1384
- //# sourceMappingURL=test-data.js.map
1433
+ //# sourceMappingURL=test-data-with-safe-alias.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../meerkat-node/src/__fixtures__/test-data-with-safe-alias.ts"],"sourcesContent":["export const TEST_DATA_WITH_SAFE_ALIAS = [\n [\n {\n testName: 'GroupBySQLInnerQuery',\n expectedSQL: `SELECT SUM(order_amount) AS orders__total_order_amount , orders__order_month FROM (SELECT DATE_TRUNC('month', order_date) AS orders__order_month, * FROM (select * from orders) AS orders) AS orders GROUP BY orders__order_month LIMIT 1`,\n cubeInput: {\n measures: ['orders.total_order_amount'],\n filters: [],\n dimensions: ['orders.order_month'],\n limit: 1,\n },\n expectedOutput: [\n {\n orders__order_month: '2022-01-01T00:00:00.000Z',\n orders__total_order_amount: 130,\n },\n ],\n },\n ],\n [\n {\n testName: 'GroupBy',\n expectedSQL: `SELECT SUM(order_amount) AS orders__total_order_amount , orders__customer_id FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders GROUP BY orders__customer_id ORDER BY orders__total_order_amount ASC, orders__customer_id ASC`,\n cubeInput: {\n measures: ['orders.total_order_amount'],\n filters: [],\n dimensions: ['orders.customer_id'],\n order: {\n 'orders.total_order_amount': 'asc',\n 'orders.customer_id': 'asc',\n },\n },\n expectedOutput: [\n {\n orders__customer_id: '6aa6',\n orders__total_order_amount: 0,\n },\n {\n orders__customer_id: '8',\n orders__total_order_amount: 50,\n },\n {\n orders__customer_id: '2',\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: '3',\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: '7',\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: null,\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: '6',\n orders__total_order_amount: 120,\n },\n {\n orders__customer_id: '1',\n orders__total_order_amount: 130,\n },\n {\n orders__customer_id: '4',\n orders__total_order_amount: 135,\n },\n {\n orders__customer_id: '5',\n orders__total_order_amount: 150,\n },\n ],\n },\n ],\n [\n {\n testName: 'Equals',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE (orders__customer_id = '1')`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'equals',\n values: ['1'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 1,\n customer_id: '1',\n orders__customer_id: '1',\n product_id: '1',\n order_date: '2022-01-01',\n order_amount: 50.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 2,\n customer_id: '1',\n orders__customer_id: '1',\n product_id: '2',\n order_date: '2022-01-02',\n order_amount: 80.0,\n vendors: ['myntra'],\n },\n ],\n },\n {\n testName: 'Equals for multiple values',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id = '1') AND (orders__customer_id = '2'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'equals',\n values: ['1', '2'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [],\n },\n ],\n [\n {\n testName: 'NotEquals',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE (orders__customer_id != '1')`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'notEquals',\n values: ['1'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 3,\n customer_id: '2',\n orders__customer_id: '2',\n product_id: '3',\n order_date: '2022-02-01',\n order_amount: 25.0,\n vendors: [],\n },\n {\n order_id: 4,\n customer_id: '2',\n orders__customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n order_amount: 75.0,\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n orders__customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 6,\n customer_id: '4',\n orders__customer_id: '4',\n product_id: '2',\n order_date: '2022-04-01',\n order_amount: 45.0,\n vendors: [],\n },\n {\n order_id: 7,\n customer_id: '4',\n orders__customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n orders__customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n order_amount: 65.0,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n orders__customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n orders__customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n {\n order_id: 11,\n customer_id: '6aa6',\n orders__customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n order_amount: 0.0,\n vendors: ['amazon'],\n },\n {\n order_id: 13,\n customer_id: '7',\n orders__customer_id: '7',\n product_id: '6',\n order_date: '2024-08-01',\n order_amount: 100.0,\n vendors: [\"swiggy's\"],\n },\n {\n order_id: 14,\n customer_id: '8',\n orders__customer_id: '8',\n product_id: '1',\n order_date: '2024-09-01',\n order_amount: 50.0,\n vendors: null,\n },\n ],\n },\n ],\n [\n {\n testName: 'Contains',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE (orders__customer_id ~~* '%aa%')`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'contains',\n values: ['aa'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 11,\n customer_id: '6aa6',\n orders__customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n order_amount: 0.0,\n vendors: ['amazon'],\n },\n ],\n },\n ],\n [\n {\n testName: 'NotContains',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id !~~ '%1%') AND (orders__customer_id !~~ '%2%') AND (orders__customer_id !~~ '%3%') AND (orders__customer_id !~~ '%4%') AND (orders__customer_id !~~ '%5%') AND (orders__customer_id !~~ '%aa%'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['1'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['2'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['3'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['4'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['5'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['aa'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 10,\n customer_id: '6',\n orders__customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n order_amount: 120,\n vendors: ['myntra', 'amazon'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__customer_id: '7',\n orders__order_date: undefined,\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n {\n customer_id: '8',\n order_amount: 50,\n order_date: '2024-09-01T00:00:00.000Z',\n order_id: 14,\n orders__customer_id: '8',\n orders__order_date: undefined,\n product_id: '1',\n vendors: null,\n },\n ],\n },\n ],\n [\n {\n testName: 'GreaterThan',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, * FROM (select * from orders) AS orders) AS orders WHERE (orders__order_amount > 50)`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_amount',\n operator: 'gt',\n values: ['50'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 2,\n customer_id: '1',\n product_id: '2',\n order_date: '2022-01-02',\n order_amount: 80.0,\n orders__order_amount: 80.0,\n vendors: ['myntra'],\n },\n {\n order_id: 4,\n customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n order_amount: 75.0,\n orders__order_amount: 75.0,\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n order_amount: 100.0,\n orders__order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 7,\n customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n order_amount: 90.0,\n orders__order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n order_amount: 65.0,\n orders__order_amount: 65.0,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n order_amount: 85.0,\n orders__order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n order_amount: 120.0,\n orders__order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_amount: 100,\n orders__order_date: undefined,\n product_id: '3',\n vendors: ['flipkart'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__order_amount: 100,\n orders__order_date: undefined,\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n [\n {\n testName: 'LessThan',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, * FROM (select * from orders) AS orders) AS orders WHERE (orders__order_amount < 50)`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_amount',\n operator: 'lt',\n values: ['50'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 3,\n customer_id: '2',\n product_id: '3',\n order_date: '2022-02-01',\n order_amount: 25.0,\n orders__order_amount: 25.0,\n vendors: [],\n },\n {\n order_id: 6,\n customer_id: '4',\n product_id: '2',\n order_date: '2022-04-01',\n order_amount: 45.0,\n orders__order_amount: 45.0,\n vendors: [],\n },\n {\n order_id: 11,\n customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n order_amount: 0.0,\n orders__order_amount: 0.0,\n vendors: ['amazon'],\n },\n ],\n },\n ],\n [\n {\n testName: 'InDateRange',\n expectedSQL: `SELECT orders.* FROM (SELECT order_date AS orders__order_date, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_date >= '2022-02-01') AND (orders__order_date <= '2022-03-31'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_date',\n operator: 'inDateRange',\n values: ['2022-02-01', '2022-03-31'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 3,\n customer_id: '2',\n product_id: '3',\n order_date: '2022-02-01',\n orders__order_date: '2022-02-01',\n order_amount: 25.0,\n vendors: [],\n },\n {\n order_id: 4,\n customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n orders__order_date: '2022-03-01',\n order_amount: 75.0,\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n orders__order_date: '2022-03-02',\n order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n ],\n },\n ],\n [\n {\n testName: 'NotInDateRange',\n expectedSQL: `SELECT orders.* FROM (SELECT order_date AS orders__order_date, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_date < '2022-02-01') OR (orders__order_date > '2022-03-31'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_date',\n operator: 'notInDateRange',\n values: ['2022-02-01', '2022-03-31'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 1,\n customer_id: '1',\n product_id: '1',\n order_date: '2022-01-01',\n order_amount: 50.0,\n orders__order_date: '2022-01-01',\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 2,\n customer_id: '1',\n product_id: '2',\n order_date: '2022-01-02',\n order_amount: 80.0,\n orders__order_date: '2022-01-02',\n vendors: ['myntra'],\n },\n {\n order_id: 6,\n customer_id: '4',\n product_id: '2',\n order_date: '2022-04-01',\n orders__order_date: '2022-04-01',\n order_amount: 45.0,\n vendors: [],\n },\n {\n order_id: 7,\n customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n orders__order_date: '2022-05-01',\n order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n orders__order_date: '2022-05-02',\n order_amount: 65.0,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n orders__order_date: '2022-05-05',\n order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n orders__order_date: '2022-06-01',\n order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n {\n order_id: 11,\n customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n orders__order_date: '2024-06-01',\n order_amount: 0.0,\n vendors: ['amazon'],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_date: '2024-07-01T00:00:00.000Z',\n product_id: '3',\n vendors: ['flipkart'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__order_date: '2024-08-01T00:00:00.000Z',\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n {\n customer_id: '8',\n order_amount: 50,\n order_date: '2024-09-01T00:00:00.000Z',\n order_id: 14,\n orders__order_date: '2024-09-01T00:00:00.000Z',\n product_id: '1',\n vendors: null,\n },\n ],\n },\n ],\n // {\n // testName: 'Or',\n // expectedSQL: `SELECT orders.* FROM (select * from orders) AS orders WHERE ((orders.order_amount > 80) OR ((orders.order_date >= '2022-02-01') AND (orders.order_date <= '2022-03-01')))`,\n // cubeInput: {\n // measures: ['*'],\n // filters: [\n // {\n // or: [\n // {\n // member: 'orders.order_amount',\n // operator: 'gt',\n // values: ['80'],\n // },\n // {\n // member: 'orders.order_date',\n // operator: 'inDateRange',\n // values: ['2022-02-01', '2022-03-01'],\n // },\n // ],\n // },\n // ],\n // dimensions: [],\n // },\n // expectedOutput: [\n // {\n // order_id: 3,\n // customer_id: '2',\n // product_id: '3',\n // order_date: '2022-02-01',\n // order_amount: 25.0,\n // },\n // {\n // order_id: 4,\n // customer_id: '2',\n // product_id: '1',\n // order_date: '2022-03-01',\n // order_amount: 75.0,\n // },\n // {\n // order_id: 5,\n // customer_id: '3',\n // product_id: '1',\n // order_date: '2022-03-02',\n // order_amount: 100.0,\n // },\n // {\n // order_id: 7,\n // customer_id: '4',\n // product_id: '3',\n // order_date: '2022-05-01',\n // order_amount: 90.0,\n // },\n // {\n // order_id: 9,\n // customer_id: '5',\n // product_id: '2',\n // order_date: '2022-05-05',\n // order_amount: 85.0,\n // },\n // {\n // order_id: 10,\n // customer_id: '6',\n // product_id: '3',\n // order_date: '2022-06-01',\n // order_amount: 120.0,\n // },\n // ],\n // },\n [\n {\n testName: 'And',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, order_date AS orders__order_date, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_amount > 50) AND ((orders__order_date >= '2022-02-01') AND (orders__order_date <= '2022-06-01')))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.order_amount',\n operator: 'gt',\n values: ['50'],\n },\n {\n member: 'orders.order_date',\n operator: 'inDateRange',\n values: ['2022-02-01', '2022-06-01'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 4,\n customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n order_amount: 75.0,\n orders__order_amount: 75.0,\n orders__order_date: '2022-03-01',\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n orders__order_date: '2022-03-02',\n order_amount: 100.0,\n orders__order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 7,\n customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n orders__order_date: '2022-05-01',\n order_amount: 90.0,\n orders__order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n orders__order_date: '2022-05-02',\n order_amount: 65,\n orders__order_amount: 65,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n orders__order_date: '2022-05-05',\n order_amount: 85.0,\n orders__order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n orders__order_date: '2022-06-01',\n order_amount: 120.0,\n orders__order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n ],\n },\n ],\n [\n {\n testName: 'Set',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, product_id AS orders__product_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_amount IS NOT NULL) AND (orders__product_id = '3'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.order_amount',\n operator: 'set',\n },\n {\n member: 'orders.product_id',\n operator: 'equals',\n values: ['3'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '2',\n order_amount: 25,\n order_date: '2022-02-01T00:00:00.000Z',\n order_id: 3,\n orders__order_amount: 25,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: [],\n },\n {\n customer_id: '4',\n order_amount: 90,\n order_date: '2022-05-01T00:00:00.000Z',\n order_id: 7,\n orders__order_amount: 90,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['myntra', 'flipkart'],\n },\n {\n customer_id: '6',\n order_amount: 120,\n order_date: '2022-06-01T00:00:00.000Z',\n order_id: 10,\n orders__order_amount: 120,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['myntra', 'amazon'],\n },\n {\n customer_id: '6aa6',\n order_amount: 0,\n order_date: '2024-06-01T00:00:00.000Z',\n order_id: 11,\n orders__order_amount: 0,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['amazon'],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_amount: 100,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['flipkart'],\n },\n ],\n },\n ],\n [\n {\n testName: 'Not Set',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, product_id AS orders__product_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id IS NULL) AND (orders__product_id = '3'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'notSet',\n },\n {\n member: 'orders.product_id',\n operator: 'equals',\n values: ['3'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n orders__customer_id: null,\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['flipkart'],\n },\n ],\n },\n ],\n [\n {\n testName: 'In',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id IN ('1', '2')) AND (orders__vendors && (ARRAY['myntra', 'amazon'])))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'in',\n values: ['1', '2'],\n },\n {\n member: 'orders.vendors',\n operator: 'in',\n values: ['myntra', 'amazon'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '1',\n order_amount: 50,\n order_date: '2022-01-01T00:00:00.000Z',\n order_id: 1,\n orders__customer_id: '1',\n orders__order_date: undefined,\n orders__vendors: ['myntra', 'amazon', 'flipkart'],\n product_id: '1',\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n customer_id: '1',\n order_amount: 80,\n order_date: '2022-01-02T00:00:00.000Z',\n order_id: 2,\n orders__customer_id: '1',\n orders__order_date: undefined,\n orders__vendors: ['myntra'],\n product_id: '2',\n vendors: ['myntra'],\n },\n ],\n },\n {\n testName: 'In with single quotes',\n expectedSQL: `SELECT orders.* FROM (SELECT vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__vendors && (ARRAY['swiggy''s'])))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.vendors',\n operator: 'in',\n values: [\"swiggy's\"],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__order_date: undefined,\n orders__vendors: [\"swiggy's\"],\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n [\n {\n testName: 'Not In',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, product_id AS orders__product_id, * FROM (select * from orders) AS orders) AS orders WHERE (((orders__customer_id NOT IN ('1', '2')) OR (orders__customer_id IS NULL)) AND (orders__product_id = '3'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'notIn',\n values: ['1', '2'],\n },\n {\n member: 'orders.product_id',\n operator: 'equals',\n values: ['3'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '4',\n order_amount: 90,\n order_date: '2022-05-01T00:00:00.000Z',\n order_id: 7,\n orders__customer_id: '4',\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['myntra', 'flipkart'],\n },\n {\n customer_id: '6',\n order_amount: 120,\n order_date: '2022-06-01T00:00:00.000Z',\n order_id: 10,\n orders__customer_id: '6',\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['myntra', 'amazon'],\n },\n {\n customer_id: '6aa6',\n order_amount: 0,\n order_date: '2024-06-01T00:00:00.000Z',\n order_id: 11,\n orders__customer_id: '6aa6',\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['amazon'],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__customer_id: null,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['flipkart'],\n },\n ],\n },\n {\n testName: 'Not In for array type',\n expectedSQL: `SELECT orders.* FROM (SELECT vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((NOT (orders__vendors && (ARRAY['myntra', 'amazon']))) OR (orders__vendors IS NULL))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.vendors',\n operator: 'notIn',\n values: ['myntra', 'amazon'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '2',\n order_amount: 25,\n order_date: '2022-02-01T00:00:00.000Z',\n order_id: 3,\n orders__order_date: undefined,\n orders__vendors: [],\n product_id: '3',\n vendors: [],\n },\n {\n customer_id: '2',\n order_amount: 75,\n order_date: '2022-03-01T00:00:00.000Z',\n order_id: 4,\n orders__order_date: undefined,\n orders__vendors: ['flipkart'],\n product_id: '1',\n vendors: ['flipkart'],\n },\n {\n customer_id: '4',\n order_amount: 45,\n order_date: '2022-04-01T00:00:00.000Z',\n order_id: 6,\n orders__order_date: undefined,\n orders__vendors: [],\n product_id: '2',\n vendors: [],\n },\n {\n customer_id: '5',\n order_amount: 85,\n order_date: '2022-05-05T00:00:00.000Z',\n order_id: 9,\n orders__order_date: undefined,\n orders__vendors: [],\n product_id: '2',\n vendors: [],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_date: undefined,\n orders__vendors: ['flipkart'],\n product_id: '3',\n vendors: ['flipkart'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__order_date: undefined,\n orders__vendors: [\"swiggy's\"],\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n {\n customer_id: '8',\n order_amount: 50,\n order_date: '2024-09-01T00:00:00.000Z',\n order_id: 14,\n orders__order_date: undefined,\n orders__vendors: null,\n product_id: '1',\n vendors: null,\n },\n ],\n },\n ],\n];\n"],"names":["TEST_DATA_WITH_SAFE_ALIAS","testName","expectedSQL","cubeInput","measures","filters","dimensions","limit","expectedOutput","orders__order_month","orders__total_order_amount","order","orders__customer_id","member","operator","values","order_id","customer_id","product_id","order_date","order_amount","vendors","and","orders__order_date","undefined","orders__order_amount","orders__product_id","orders__vendors"],"mappings":";+BAAaA;;;eAAAA;;;AAAN,MAAMA,4BAA4B;IACvC;QACE;YACEC,UAAU;YACVC,aAAa,CAAC,2OAA2O,CAAC;YAC1PC,WAAW;gBACTC,UAAU;oBAAC;iBAA4B;gBACvCC,SAAS,EAAE;gBACXC,YAAY;oBAAC;iBAAqB;gBAClCC,OAAO;YACT;YACAC,gBAAgB;gBACd;oBACEC,qBAAqB;oBACrBC,4BAA4B;gBAC9B;aACD;QACH;KACD;IACD;QACE;YACET,UAAU;YACVC,aAAa,CAAC,gRAAgR,CAAC;YAC/RC,WAAW;gBACTC,UAAU;oBAAC;iBAA4B;gBACvCC,SAAS,EAAE;gBACXC,YAAY;oBAAC;iBAAqB;gBAClCK,OAAO;oBACL,6BAA6B;oBAC7B,sBAAsB;gBACxB;YACF;YACAH,gBAAgB;gBACd;oBACEI,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;gBACA;oBACEE,qBAAqB;oBACrBF,4BAA4B;gBAC9B;aACD;QACH;KACD;IACD;QACE;YACET,UAAU;YACVC,aAAa,CAAC,qJAAqJ,CAAC;YACpKC,WAAW;gBACTC,UAAU;oBAAC;iBAAI;gBACfC,SAAS;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Ac;oBACdD,YAAY;oBACZH,UAAU;oBACVO,oBAAoBC;oBACpBG,iBAAiB;wBAAC;qBAAW;oBAC7BT,YAAY;oBACZG,SAAS;wBAAC;qBAAW;gBACvB;gBACA;oBACEJ,aAAa;oBACbG,cAAc;oBACdD,YAAY;oBACZH,UAAU;oBACVO,oBAAoBC;oBACpBG,iBAAiB;oBACjBT,YAAY;oBACZG,SAAS;gBACX;aACD;QACH;KACD;CACF"}
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ function _export(target, all) {
3
+ for(var name in all)Object.defineProperty(target, name, {
4
+ enumerable: true,
5
+ get: all[name]
6
+ });
7
+ }
8
+ _export(exports, {
9
+ CREATE_TEST_TABLE: function() {
10
+ return CREATE_TEST_TABLE;
11
+ },
12
+ INPUT_DATA_QUERY: function() {
13
+ return INPUT_DATA_QUERY;
14
+ },
15
+ TABLE_SCHEMA: function() {
16
+ return TABLE_SCHEMA;
17
+ },
18
+ getTestData: function() {
19
+ return getTestData;
20
+ }
21
+ });
22
+ const _testdatawithsafealias = require("./test-data-with-safe-alias");
23
+ const _withdotalias = require("./with-dot-alias");
24
+ const CREATE_TEST_TABLE = `
25
+ CREATE TABLE orders (
26
+ order_id INTEGER,
27
+ customer_id VARCHAR,
28
+ product_id VARCHAR,
29
+ order_date DATE,
30
+ order_amount FLOAT,
31
+ vendors VARCHAR[]
32
+ );
33
+ `;
34
+ const INPUT_DATA_QUERY = `
35
+ INSERT INTO orders VALUES
36
+ (1, '1', '1', '2022-01-01', 50, ['myntra', 'amazon', 'flipkart']),
37
+ (2, '1', '2', '2022-01-02', 80, ['myntra']),
38
+ (3, '2', '3', '2022-02-01', 25, []),
39
+ (4, '2', '1', '2022-03-01', 75, ['flipkart']),
40
+ (5, '3', '1', '2022-03-02', 100, ['myntra', 'amazon', 'flipkart']),
41
+ (6, '4', '2', '2022-04-01', 45, []),
42
+ (7, '4', '3', '2022-05-01', 90, ['myntra', 'flipkart']),
43
+ (8, '5', '1', '2022-05-02', 65, ['amazon', 'flipkart']),
44
+ (9, '5', '2', '2022-05-05', 85, []),
45
+ (10, '6', '3', '2022-06-01', 120, ['myntra', 'amazon']),
46
+ (11, '6aa6', '3', '2024-06-01', 0, ['amazon']),
47
+ (12, NULL, '3', '2024-07-01', 100, ['flipkart']),
48
+ (13, '7', '6', '2024-08-01', 100, ['swiggy''s']),
49
+ (14, '8', '1', '2024-09-01', 50, NULL);
50
+ `;
51
+ const TABLE_SCHEMA = {
52
+ name: 'orders',
53
+ sql: 'select * from orders',
54
+ measures: [
55
+ {
56
+ name: 'order_amount',
57
+ sql: 'order_amount',
58
+ type: 'number'
59
+ },
60
+ {
61
+ name: 'total_order_amount',
62
+ sql: 'SUM(order_amount)',
63
+ type: 'number'
64
+ }
65
+ ],
66
+ dimensions: [
67
+ {
68
+ name: 'order_date',
69
+ sql: 'order_date',
70
+ type: 'time'
71
+ },
72
+ {
73
+ name: 'order_id',
74
+ sql: 'order_id',
75
+ type: 'number'
76
+ },
77
+ {
78
+ name: 'customer_id',
79
+ sql: 'customer_id',
80
+ type: 'string'
81
+ },
82
+ {
83
+ name: 'product_id',
84
+ sql: 'product_id',
85
+ type: 'string'
86
+ },
87
+ {
88
+ name: 'order_month',
89
+ sql: `DATE_TRUNC('month', order_date)`,
90
+ type: 'string'
91
+ },
92
+ {
93
+ name: 'vendors',
94
+ sql: 'vendors',
95
+ type: 'string_array'
96
+ }
97
+ ]
98
+ };
99
+ const getTestData = ({ useSafeAlias })=>{
100
+ if (useSafeAlias) {
101
+ return _withdotalias.WITH_DOT_ALIAS_TEST_DATA;
102
+ }
103
+ return _testdatawithsafealias.TEST_DATA_WITH_SAFE_ALIAS;
104
+ };
105
+
106
+ //# sourceMappingURL=test-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../meerkat-node/src/__fixtures__/test-data.ts"],"sourcesContent":["import { TEST_DATA_WITH_SAFE_ALIAS } from './test-data-with-safe-alias';\nimport { WITH_DOT_ALIAS_TEST_DATA } from './with-dot-alias';\n\nexport const CREATE_TEST_TABLE = `\nCREATE TABLE orders (\n order_id INTEGER,\n customer_id VARCHAR,\n product_id VARCHAR,\n order_date DATE,\n order_amount FLOAT,\n vendors VARCHAR[]\n);\n`;\n\nexport const INPUT_DATA_QUERY = `\nINSERT INTO orders VALUES\n(1, '1', '1', '2022-01-01', 50, ['myntra', 'amazon', 'flipkart']),\n(2, '1', '2', '2022-01-02', 80, ['myntra']),\n(3, '2', '3', '2022-02-01', 25, []),\n(4, '2', '1', '2022-03-01', 75, ['flipkart']),\n(5, '3', '1', '2022-03-02', 100, ['myntra', 'amazon', 'flipkart']),\n(6, '4', '2', '2022-04-01', 45, []),\n(7, '4', '3', '2022-05-01', 90, ['myntra', 'flipkart']),\n(8, '5', '1', '2022-05-02', 65, ['amazon', 'flipkart']),\n(9, '5', '2', '2022-05-05', 85, []),\n(10, '6', '3', '2022-06-01', 120, ['myntra', 'amazon']),\n(11, '6aa6', '3', '2024-06-01', 0, ['amazon']),\n(12, NULL, '3', '2024-07-01', 100, ['flipkart']),\n(13, '7', '6', '2024-08-01', 100, ['swiggy''s']),\n(14, '8', '1', '2024-09-01', 50, NULL);\n`;\n\nexport const TABLE_SCHEMA = {\n name: 'orders',\n sql: 'select * from orders',\n measures: [\n {\n name: 'order_amount',\n sql: 'order_amount',\n type: 'number',\n },\n {\n name: 'total_order_amount',\n sql: 'SUM(order_amount)',\n type: 'number',\n },\n ],\n dimensions: [\n {\n name: 'order_date',\n sql: 'order_date',\n type: 'time',\n },\n {\n name: 'order_id',\n sql: 'order_id',\n type: 'number',\n },\n {\n name: 'customer_id',\n sql: 'customer_id',\n type: 'string',\n },\n {\n name: 'product_id',\n sql: 'product_id',\n type: 'string',\n },\n {\n name: 'order_month',\n sql: `DATE_TRUNC('month', order_date)`,\n type: 'string',\n },\n {\n name: 'vendors',\n sql: 'vendors',\n type: 'string_array',\n },\n ],\n};\n\n/**\n * Get test data based on alias configuration.\n * @param useSafeAlias - When true, returns test data with dot notation aliases (e.g., \"orders.customer_id\")\n * When false, returns test data with underscore notation aliases (e.g., orders__customer_id)\n */\nexport const getTestData = ({ useSafeAlias }: { useSafeAlias: boolean }) => {\n if (useSafeAlias) {\n return WITH_DOT_ALIAS_TEST_DATA;\n }\n return TEST_DATA_WITH_SAFE_ALIAS;\n};\n"],"names":["CREATE_TEST_TABLE","INPUT_DATA_QUERY","TABLE_SCHEMA","getTestData","name","sql","measures","type","dimensions","useSafeAlias","WITH_DOT_ALIAS_TEST_DATA","TEST_DATA_WITH_SAFE_ALIAS"],"mappings":";;;;;;;;IAGaA,iBAAiB;eAAjBA;;IAWAC,gBAAgB;eAAhBA;;IAkBAC,YAAY;eAAZA;;IAsDAC,WAAW;eAAXA;;;uCAtF6B;8BACD;AAElC,MAAMH,oBAAoB,CAAC;;;;;;;;;AASlC,CAAC;AAEM,MAAMC,mBAAmB,CAAC;;;;;;;;;;;;;;;;AAgBjC,CAAC;AAEM,MAAMC,eAAe;IAC1BE,MAAM;IACNC,KAAK;IACLC,UAAU;QACR;YACEF,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;KACD;IACDC,YAAY;QACV;YACEJ,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK,CAAC,+BAA+B,CAAC;YACtCE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;KACD;AACH;AAOO,MAAMJ,cAAc,CAAC,EAAEM,YAAY,EAA6B;IACrE,IAAIA,cAAc;QAChB,OAAOC,sCAAwB;IACjC;IACA,OAAOC,gDAAyB;AAClC"}