@devrev/meerkat-node 0.0.112 → 0.0.115

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.
@@ -0,0 +1,297 @@
1
+ export declare const WITH_DOT_ALIAS_TEST_DATA: ({
2
+ testName: string;
3
+ expectedSQL: string;
4
+ cubeInput: {
5
+ measures: string[];
6
+ filters: never[];
7
+ dimensions: string[];
8
+ limit: number;
9
+ };
10
+ expectedOutput: {
11
+ 'orders.order_month': string;
12
+ 'orders.total_order_amount': number;
13
+ }[];
14
+ }[] | {
15
+ testName: string;
16
+ expectedSQL: string;
17
+ cubeInput: {
18
+ measures: string[];
19
+ filters: never[];
20
+ dimensions: string[];
21
+ order: {
22
+ 'orders.total_order_amount': string;
23
+ 'orders.customer_id': string;
24
+ };
25
+ };
26
+ expectedOutput: ({
27
+ 'orders.customer_id': string;
28
+ 'orders.total_order_amount': number;
29
+ } | {
30
+ 'orders.customer_id': null;
31
+ 'orders.total_order_amount': number;
32
+ })[];
33
+ }[] | {
34
+ testName: string;
35
+ expectedSQL: string;
36
+ cubeInput: {
37
+ measures: string[];
38
+ filters: {
39
+ member: string;
40
+ operator: string;
41
+ values: string[];
42
+ }[];
43
+ dimensions: never[];
44
+ };
45
+ expectedOutput: {
46
+ order_id: number;
47
+ customer_id: string;
48
+ 'orders.customer_id': string;
49
+ product_id: string;
50
+ order_date: string;
51
+ order_amount: number;
52
+ vendors: string[];
53
+ }[];
54
+ }[] | {
55
+ testName: string;
56
+ expectedSQL: string;
57
+ cubeInput: {
58
+ measures: string[];
59
+ filters: {
60
+ and: {
61
+ member: string;
62
+ operator: string;
63
+ values: string[];
64
+ }[];
65
+ }[];
66
+ dimensions: never[];
67
+ };
68
+ expectedOutput: ({
69
+ order_id: number;
70
+ customer_id: string;
71
+ 'orders.customer_id': string;
72
+ product_id: string;
73
+ order_date: string;
74
+ order_amount: number;
75
+ vendors: string[];
76
+ 'orders.order_date'?: undefined;
77
+ } | {
78
+ customer_id: string;
79
+ order_amount: number;
80
+ order_date: string;
81
+ order_id: number;
82
+ 'orders.customer_id': string;
83
+ 'orders.order_date': undefined;
84
+ product_id: string;
85
+ vendors: string[];
86
+ })[];
87
+ }[] | {
88
+ testName: string;
89
+ expectedSQL: string;
90
+ cubeInput: {
91
+ measures: string[];
92
+ filters: {
93
+ member: string;
94
+ operator: string;
95
+ values: string[];
96
+ }[];
97
+ dimensions: never[];
98
+ };
99
+ expectedOutput: ({
100
+ order_id: number;
101
+ customer_id: string;
102
+ product_id: string;
103
+ order_date: string;
104
+ order_amount: number;
105
+ 'orders.order_amount': number;
106
+ vendors: string[];
107
+ 'orders.order_date'?: undefined;
108
+ } | {
109
+ customer_id: null;
110
+ order_amount: number;
111
+ order_date: string;
112
+ order_id: number;
113
+ 'orders.order_amount': number;
114
+ 'orders.order_date': undefined;
115
+ product_id: string;
116
+ vendors: string[];
117
+ } | {
118
+ customer_id: string;
119
+ order_amount: number;
120
+ order_date: string;
121
+ order_id: number;
122
+ 'orders.order_amount': number;
123
+ 'orders.order_date': undefined;
124
+ product_id: string;
125
+ vendors: string[];
126
+ })[];
127
+ }[] | {
128
+ testName: string;
129
+ expectedSQL: string;
130
+ cubeInput: {
131
+ measures: string[];
132
+ filters: {
133
+ member: string;
134
+ operator: string;
135
+ values: string[];
136
+ }[];
137
+ dimensions: never[];
138
+ };
139
+ expectedOutput: ({
140
+ order_id: number;
141
+ customer_id: string;
142
+ product_id: string;
143
+ order_date: string;
144
+ order_amount: number;
145
+ 'orders.order_date': string;
146
+ vendors: string[];
147
+ } | {
148
+ customer_id: null;
149
+ order_amount: number;
150
+ order_date: string;
151
+ order_id: number;
152
+ 'orders.order_date': string;
153
+ product_id: string;
154
+ vendors: string[];
155
+ })[];
156
+ }[] | {
157
+ testName: string;
158
+ expectedSQL: string;
159
+ cubeInput: {
160
+ measures: string[];
161
+ filters: {
162
+ and: {
163
+ member: string;
164
+ operator: string;
165
+ values: string[];
166
+ }[];
167
+ }[];
168
+ dimensions: never[];
169
+ };
170
+ expectedOutput: {
171
+ order_id: number;
172
+ customer_id: string;
173
+ product_id: string;
174
+ order_date: string;
175
+ order_amount: number;
176
+ 'orders.order_amount': number;
177
+ 'orders.order_date': string;
178
+ vendors: string[];
179
+ }[];
180
+ }[] | {
181
+ testName: string;
182
+ expectedSQL: string;
183
+ cubeInput: {
184
+ measures: string[];
185
+ filters: {
186
+ and: ({
187
+ member: string;
188
+ operator: string;
189
+ values?: undefined;
190
+ } | {
191
+ member: string;
192
+ operator: string;
193
+ values: string[];
194
+ })[];
195
+ }[];
196
+ dimensions: never[];
197
+ };
198
+ expectedOutput: ({
199
+ customer_id: string;
200
+ order_amount: number;
201
+ order_date: string;
202
+ order_id: number;
203
+ 'orders.order_amount': number;
204
+ 'orders.order_date': undefined;
205
+ 'orders.product_id': string;
206
+ product_id: string;
207
+ vendors: string[];
208
+ } | {
209
+ customer_id: null;
210
+ order_amount: number;
211
+ order_date: string;
212
+ order_id: number;
213
+ 'orders.order_amount': number;
214
+ 'orders.order_date': undefined;
215
+ 'orders.product_id': string;
216
+ product_id: string;
217
+ vendors: string[];
218
+ })[];
219
+ }[] | {
220
+ testName: string;
221
+ expectedSQL: string;
222
+ cubeInput: {
223
+ measures: string[];
224
+ filters: {
225
+ and: ({
226
+ member: string;
227
+ operator: string;
228
+ values?: undefined;
229
+ } | {
230
+ member: string;
231
+ operator: string;
232
+ values: string[];
233
+ })[];
234
+ }[];
235
+ dimensions: never[];
236
+ };
237
+ expectedOutput: {
238
+ 'orders.customer_id': null;
239
+ customer_id: null;
240
+ order_amount: number;
241
+ order_date: string;
242
+ order_id: number;
243
+ 'orders.order_date': undefined;
244
+ 'orders.product_id': string;
245
+ product_id: string;
246
+ vendors: string[];
247
+ }[];
248
+ }[] | ({
249
+ testName: string;
250
+ expectedSQL: string;
251
+ cubeInput: {
252
+ measures: string[];
253
+ filters: {
254
+ and: {
255
+ member: string;
256
+ operator: string;
257
+ values: string[];
258
+ }[];
259
+ }[];
260
+ dimensions: never[];
261
+ };
262
+ expectedOutput: {
263
+ customer_id: string;
264
+ order_amount: number;
265
+ order_date: string;
266
+ order_id: number;
267
+ 'orders.customer_id': string;
268
+ 'orders.order_date': undefined;
269
+ 'orders.vendors': string[];
270
+ product_id: string;
271
+ vendors: string[];
272
+ }[];
273
+ } | {
274
+ testName: string;
275
+ expectedSQL: string;
276
+ cubeInput: {
277
+ measures: string[];
278
+ filters: {
279
+ and: {
280
+ member: string;
281
+ operator: string;
282
+ values: string[];
283
+ }[];
284
+ }[];
285
+ dimensions: never[];
286
+ };
287
+ expectedOutput: {
288
+ customer_id: string;
289
+ order_amount: number;
290
+ order_date: string;
291
+ order_id: number;
292
+ 'orders.order_date': undefined;
293
+ 'orders.vendors': string[];
294
+ product_id: string;
295
+ vendors: string[];
296
+ }[];
297
+ })[])[];
@@ -1,7 +1,13 @@
1
- import { ContextParams, Query, TableSchema } from '@devrev/meerkat-core';
1
+ import { ContextParams, Query, QueryOptions, TableSchema } from '@devrev/meerkat-core';
2
2
  export interface CubeQueryToSQLParams {
3
3
  query: Query;
4
4
  tableSchemas: TableSchema[];
5
5
  contextParams?: ContextParams;
6
+ /**
7
+ * Options for controlling output format.
8
+ * When useDotNotation is true, aliases use dot notation (e.g., "orders.customer_id")
9
+ * When useDotNotation is false, aliases use underscore notation (e.g., orders__customer_id)
10
+ */
11
+ options: QueryOptions;
6
12
  }
7
- export declare const cubeQueryToSQL: ({ query, tableSchemas, contextParams, }: CubeQueryToSQLParams) => Promise<string>;
13
+ export declare const cubeQueryToSQL: ({ query, tableSchemas, contextParams, options, }: CubeQueryToSQLParams) => Promise<string>;
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../meerkat-node/src/__tests__/test-data.ts"],"sourcesContent":["export 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`;\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\nexport const TEST_DATA = [\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: '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 },\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 },\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 },\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, 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']))))`,\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.vendors',\n operator: 'notIn',\n values: ['myntra', 'flipkart'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '4',\n order_amount: 45,\n order_date: '2022-04-01T00:00:00.000Z',\n order_id: 6,\n orders__customer_id: '4',\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__customer_id: '5',\n orders__order_date: undefined,\n orders__vendors: [],\n product_id: '2',\n vendors: [],\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__vendors: ['amazon'],\n product_id: '3',\n vendors: ['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 orders__vendors: [\"swiggy's\"],\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n];\n"],"names":["CREATE_TEST_TABLE","INPUT_DATA_QUERY","TABLE_SCHEMA","TEST_DATA","name","sql","measures","type","dimensions","testName","expectedSQL","cubeInput","filters","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":";;;;;;;;IAAaA,iBAAiB;eAAjBA;;IAWAC,gBAAgB;eAAhBA;;IAiBAC,YAAY;eAAZA;;IAiDAC,SAAS;eAATA;;;AA7EN,MAAMH,oBAAoB,CAAC;;;;;;;;;AASlC,CAAC;AAEM,MAAMC,mBAAmB,CAAC;;;;;;;;;;;;;;;AAejC,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;AAEO,MAAMJ,YAAY;IACvB;QACE;YACEM,UAAU;YACVC,aAAa,CAAC,2OAA2O,CAAC;YAC1PC,WAAW;gBACTL,UAAU;oBAAC;iBAA4B;gBACvCM,SAAS,EAAE;gBACXJ,YAAY;oBAAC;iBAAqB;gBAClCK,OAAO;YACT;YACAC,gBAAgB;gBACd;oBACEC,qBAAqB;oBACrBC,4BAA4B;gBAC9B;aACD;QACH;KACD;IACD;QACE;YACEP,UAAU;YACVC,aAAa,CAAC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