You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql: "SELECT * FROM logs WHERE message LIKE '_foo'",
202
202
expected: "message:~\"^.foo$\"",
203
203
},
204
+
{
205
+
name: "compare fields equality",
206
+
sql: "SELECT * FROM logs WHERE user_id = customer_id",
207
+
expected: "user_id:eq_field(customer_id)",
208
+
},
209
+
{
210
+
name: "compare fields inequality",
211
+
sql: "SELECT * FROM logs WHERE duration != max_duration",
212
+
expected: "-duration:eq_field(max_duration)",
213
+
},
214
+
{
215
+
name: "compare fields less than",
216
+
sql: "SELECT * FROM logs WHERE duration < max_duration",
217
+
expected: "duration:lt_field(max_duration)",
218
+
},
219
+
{
220
+
name: "compare fields less or equal",
221
+
sql: "SELECT * FROM logs WHERE duration <= max_duration",
222
+
expected: "duration:le_field(max_duration)",
223
+
},
224
+
{
225
+
name: "compare fields greater than",
226
+
sql: "SELECT * FROM logs WHERE duration > max_duration",
227
+
expected: "-duration:le_field(max_duration)",
228
+
},
229
+
{
230
+
name: "compare fields greater or equal",
231
+
sql: "SELECT * FROM logs WHERE duration >= max_duration",
232
+
expected: "-duration:lt_field(max_duration)",
233
+
},
234
+
{
235
+
name: "compare function fields equality",
236
+
sql: "SELECT * FROM logs WHERE LOWER(user) = LOWER(customer)",
237
+
expected: "* | format \"<lc:user>\" as __filter_expr_1 | format \"<lc:customer>\" as __filter_expr_2 | filter __filter_expr_1:eq_field(__filter_expr_2) | delete __filter_expr_1, __filter_expr_2",
238
+
},
204
239
{
205
240
name: "arithmetic projection",
206
241
sql: "SELECT (duration_ms / 1000) AS duration_s FROM logs",
0 commit comments