• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

getdozer / dozer / 4414871180

pending completion
4414871180

push

github

GitHub
feat: add object store validation (#1140)

40 of 40 new or added lines in 2 files covered. (100.0%)

28658 of 39135 relevant lines covered (73.23%)

92989.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

47.13
/dozer-sql/src/pipeline/expression/comparison.rs
1
use crate::pipeline::errors::PipelineError;
2
use dozer_types::rust_decimal::Decimal;
3
use dozer_types::types::Schema;
4
use dozer_types::{
5
    ordered_float::OrderedFloat,
6
    types::{Field, Record},
7
};
8
use num_traits::cast::*;
9

10
use crate::pipeline::expression::execution::{Expression, ExpressionExecutor};
11

12
macro_rules! define_comparison {
13
    ($id:ident, $op:expr, $function:expr) => {
14
        pub fn $id(
20,114✔
15
            schema: &Schema,
20,114✔
16
            left: &Expression,
20,114✔
17
            right: &Expression,
20,114✔
18
            record: &Record,
20,114✔
19
        ) -> Result<Field, PipelineError> {
20,114✔
20
            let left_p = left.evaluate(&record, schema)?;
20,114✔
21
            let right_p = right.evaluate(&record, schema)?;
20,114✔
22

23
            match left_p {
20,114✔
24
                Field::Null => match right_p {
60✔
25
                    // left: Null, right: Null
26
                    Field::Null => Ok(Field::Boolean(true)),
×
27
                    _ => Ok(Field::Boolean(false)),
60✔
28
                },
29
                Field::Boolean(left_v) => match right_p {
1✔
30
                    // left: Bool, right: Bool
31
                    Field::Boolean(right_v) => Ok(Field::Boolean($function(left_v, right_v))),
1✔
32
                    _ => Ok(Field::Boolean(false)),
×
33
                },
34
                Field::Int(left_v) => match right_p {
4,041✔
35
                    // left: Int, right: Int
36
                    Field::Int(right_v) => Ok(Field::Boolean($function(left_v, right_v))),
4,040✔
37
                    // left: Int, right: UInt
38
                    Field::UInt(right_v) => Ok(Field::Boolean($function(
×
39
                        left_v,
×
40
                        right_v.to_i64().ok_or(PipelineError::UnableToCast(
×
41
                            format!("{}", right_v),
×
42
                            "i64".to_string(),
×
43
                        ))?,
×
44
                    ))),
45
                    // left: Int, right: Float
46
                    Field::Float(right_v) => {
1✔
47
                        let left_v_f = OrderedFloat::<f64>::from_i64(left_v).unwrap();
1✔
48
                        Ok(Field::Boolean($function(left_v_f, right_v)))
1✔
49
                    }
50
                    // left: Int, right: Decimal
51
                    Field::Decimal(right_v) => {
×
52
                        let left_v_d =
×
53
                            Decimal::from_i64(left_v).ok_or(PipelineError::UnableToCast(
×
54
                                format!("{}", left_v),
×
55
                                "Decimal".to_string(),
×
56
                            ))?;
×
57
                        Ok(Field::Boolean($function(left_v_d, right_v)))
×
58
                    }
59
                    // left: Int, right: Null
60
                    Field::Null => Ok(Field::Boolean(false)),
×
61
                    _ => Err(PipelineError::InvalidTypeComparison(
×
62
                        left_p,
×
63
                        right_p,
×
64
                        $op.to_string(),
×
65
                    )),
×
66
                },
67
                Field::UInt(left_v) => match right_p {
2✔
68
                    // left: UInt, right: Int
69
                    Field::Int(right_v) => Ok(Field::Boolean($function(
×
70
                        left_v.to_i64().ok_or(PipelineError::UnableToCast(
×
71
                            format!("{}", left_v),
×
72
                            "i64".to_string(),
×
73
                        ))?,
×
74
                        right_v,
×
75
                    ))),
76
                    // left: UInt, right: UInt
77
                    Field::UInt(right_v) => Ok(Field::Boolean($function(left_v, right_v))),
1✔
78
                    // left: UInt, right: Float
79
                    Field::Float(right_v) => {
×
80
                        let left_v_f = OrderedFloat::<f64>::from_i64(left_v.to_i64().ok_or(
×
81
                            PipelineError::UnableToCast(format!("{}", left_v), "i64".to_string()),
×
82
                        )?)
×
83
                        .unwrap();
×
84
                        Ok(Field::Boolean($function(left_v_f, right_v)))
×
85
                    }
86
                    // left: UInt, right: Decimal
87
                    Field::Decimal(right_v) => {
×
88
                        let left_v_d = Decimal::from_i64(left_v.to_i64().ok_or(
×
89
                            PipelineError::UnableToCast(format!("{}", left_v), "i64".to_string()),
×
90
                        )?)
×
91
                        .ok_or(PipelineError::UnableToCast(
×
92
                            format!("{}", left_v),
×
93
                            "Decimal".to_string(),
×
94
                        ))?;
×
95
                        Ok(Field::Boolean($function(left_v_d, right_v)))
×
96
                    }
97
                    // left: UInt, right: Null
98
                    Field::Null => Ok(Field::Boolean(false)),
1✔
99
                    _ => Err(PipelineError::InvalidTypeComparison(
×
100
                        left_p,
×
101
                        right_p,
×
102
                        $op.to_string(),
×
103
                    )),
×
104
                },
105
                Field::Float(left_v) => match right_p {
10,004✔
106
                    // left: Float, right: Float
107
                    Field::Float(right_v) => Ok(Field::Boolean($function(left_v, right_v))),
1✔
108
                    // left: Float, right: Int
109
                    Field::UInt(right_v) => {
×
110
                        let right_v_f = OrderedFloat::<f64>::from_i64(right_v.to_i64().ok_or(
×
111
                            PipelineError::UnableToCast(
×
112
                                format!("{}", right_v),
×
113
                                "Decimal".to_string(),
×
114
                            ),
×
115
                        )?)
×
116
                        .unwrap();
×
117
                        Ok(Field::Boolean($function(left_v, right_v_f)))
×
118
                    }
119
                    // left: Float, right: Int
120
                    Field::Int(right_v) => {
10,001✔
121
                        let right_v_f = OrderedFloat::<f64>::from_i64(right_v).unwrap();
10,001✔
122
                        Ok(Field::Boolean($function(left_v, right_v_f)))
10,001✔
123
                    }
124
                    // left: Float, right: Decimal
125
                    Field::Decimal(right_v) => {
×
126
                        let left_v_d = Decimal::from_f64(left_v.to_f64().ok_or(
×
127
                            PipelineError::UnableToCast(format!("{}", left_v), "i64".to_string()),
×
128
                        )?)
×
129
                        .ok_or(PipelineError::UnableToCast(
×
130
                            format!("{}", left_v),
×
131
                            "Decimal".to_string(),
×
132
                        ))?;
×
133
                        Ok(Field::Boolean($function(left_v_d, right_v)))
×
134
                    }
135
                    // left: Float, right: Null
136
                    Field::Null => Ok(Field::Boolean(false)),
2✔
137
                    _ => Err(PipelineError::InvalidTypeComparison(
×
138
                        left_p,
×
139
                        right_p,
×
140
                        $op.to_string(),
×
141
                    )),
×
142
                },
143
                Field::Decimal(left_v) => match right_p {
4✔
144
                    // left: Decimal, right: Float
145
                    Field::Float(right_v) => {
×
146
                        let right_v_d = Decimal::from_f64(right_v.to_f64().ok_or(
×
147
                            PipelineError::UnableToCast(format!("{}", right_v), "f64".to_string()),
×
148
                        )?)
×
149
                        .ok_or(PipelineError::UnableToCast(
×
150
                            format!("{}", right_v),
×
151
                            "Decimal".to_string(),
×
152
                        ))?;
×
153
                        Ok(Field::Boolean($function(left_v, right_v_d)))
×
154
                    }
155
                    // left: Decimal, right: Int
156
                    Field::Int(right_v) => {
1✔
157
                        let right_v_d =
1✔
158
                            Decimal::from_i64(right_v).ok_or(PipelineError::UnableToCast(
1✔
159
                                format!("{}", right_v),
1✔
160
                                "Decimal".to_string(),
1✔
161
                            ))?;
1✔
162
                        Ok(Field::Boolean($function(left_v, right_v_d)))
1✔
163
                    }
164
                    // left: Decimal, right: UInt
165
                    Field::UInt(right_v) => {
1✔
166
                        let right_v_d = Decimal::from_i64(right_v.to_i64().ok_or(
1✔
167
                            PipelineError::UnableToCast(format!("{}", right_v), "i64".to_string()),
1✔
168
                        )?)
1✔
169
                        .ok_or(PipelineError::UnableToCast(
1✔
170
                            format!("{}", right_v),
1✔
171
                            "Decimal".to_string(),
1✔
172
                        ))?;
1✔
173
                        Ok(Field::Boolean($function(left_v, right_v_d)))
1✔
174
                    }
175
                    // left: Decimal, right: Decimal
176
                    Field::Decimal(right_v) => Ok(Field::Boolean($function(left_v, right_v))),
1✔
177
                    // left: Decimal, right: Null
178
                    Field::Null => Ok(Field::Boolean(false)),
1✔
179
                    _ => Err(PipelineError::InvalidTypeComparison(
×
180
                        left_p,
×
181
                        right_p,
×
182
                        $op.to_string(),
×
183
                    )),
×
184
                },
185
                Field::String(ref left_v) => match right_p {
6,002✔
186
                    Field::String(ref right_v) => Ok(Field::Boolean($function(left_v, right_v))),
6,001✔
187
                    Field::Null => Ok(Field::Boolean(false)),
1✔
188
                    _ => Err(PipelineError::InvalidTypeComparison(
×
189
                        left_p,
×
190
                        right_p,
×
191
                        $op.to_string(),
×
192
                    )),
×
193
                },
194
                Field::Timestamp(left_v) => match right_p {
×
195
                    Field::Timestamp(right_v) => Ok(Field::Boolean($function(left_v, right_v))),
×
196
                    Field::Null => Ok(Field::Boolean(false)),
×
197
                    _ => Err(PipelineError::InvalidTypeComparison(
×
198
                        left_p,
×
199
                        right_p,
×
200
                        $op.to_string(),
×
201
                    )),
×
202
                },
203
                Field::Binary(ref _left_v) => Err(PipelineError::InvalidTypeComparison(
×
204
                    left_p,
×
205
                    right_p,
×
206
                    $op.to_string(),
×
207
                )),
×
208
                _ => Err(PipelineError::InvalidTypeComparison(
×
209
                    left_p,
×
210
                    right_p,
×
211
                    $op.to_string(),
×
212
                )),
×
213
            }
214
        }
20,114✔
215
    };
216
}
217

218
pub fn evaluate_lt(
4,068✔
219
    schema: &Schema,
4,068✔
220
    left: &Expression,
4,068✔
221
    right: &Expression,
4,068✔
222
    record: &Record,
4,068✔
223
) -> Result<Field, PipelineError> {
4,068✔
224
    let left_p = left.evaluate(record, schema)?;
4,068✔
225
    let right_p = right.evaluate(record, schema)?;
4,068✔
226

227
    match left_p {
4,068✔
228
        Field::Null => match right_p {
×
229
            Field::Null => Ok(Field::Boolean(true)),
×
230
            _ => Ok(Field::Boolean(false)),
×
231
        },
232
        Field::Boolean(left_v) => match right_p {
×
233
            Field::Boolean(right_v) => Ok(Field::Boolean(!left_v & right_v)),
×
234
            _ => Ok(Field::Boolean(false)),
×
235
        },
236
        Field::Int(left_v) => match right_p {
4,068✔
237
            Field::Int(right_v) => Ok(Field::Boolean(left_v < right_v)),
4,068✔
238
            Field::Float(right_v) => {
×
239
                let left_v_f = OrderedFloat::<f64>::from_i64(left_v).unwrap();
×
240
                Ok(Field::Boolean(left_v_f < right_v))
×
241
            }
242
            Field::Null => Ok(Field::Boolean(false)),
×
243
            _ => Err(PipelineError::InvalidTypeComparison(
×
244
                left_p,
×
245
                right_p,
×
246
                "<".to_string(),
×
247
            )),
×
248
        },
249
        Field::Float(left_v) => match right_p {
×
250
            Field::Float(right_v) => Ok(Field::Boolean(left_v < right_v)),
×
251
            Field::Int(right_v) => {
×
252
                let right_v_f = OrderedFloat::<f64>::from_i64(right_v).unwrap();
×
253
                Ok(Field::Boolean(left_v < right_v_f))
×
254
            }
255
            Field::Null => Ok(Field::Boolean(false)),
×
256
            _ => Err(PipelineError::InvalidTypeComparison(
×
257
                left_p,
×
258
                right_p,
×
259
                "<".to_string(),
×
260
            )),
×
261
        },
262
        Field::String(ref left_v) => match right_p {
×
263
            Field::String(ref right_v) => Ok(Field::Boolean(left_v < right_v)),
×
264
            Field::Null => Ok(Field::Boolean(false)),
×
265
            _ => Err(PipelineError::InvalidTypeComparison(
×
266
                left_p,
×
267
                right_p,
×
268
                "<".to_string(),
×
269
            )),
×
270
        },
271
        Field::Timestamp(left_v) => match right_p {
×
272
            Field::Timestamp(right_v) => Ok(Field::Boolean(left_v < right_v)),
×
273
            Field::Null => Ok(Field::Boolean(false)),
×
274
            _ => Err(PipelineError::InvalidTypeComparison(
×
275
                left_p,
×
276
                right_p,
×
277
                "<".to_string(),
×
278
            )),
×
279
        },
280
        Field::Binary(ref _left_v) => Err(PipelineError::InvalidTypeComparison(
×
281
            left_p,
×
282
            right_p,
×
283
            "<".to_string(),
×
284
        )),
×
285
        _ => Err(PipelineError::InvalidTypeComparison(
×
286
            left_p,
×
287
            right_p,
×
288
            "<".to_string(),
×
289
        )),
×
290
    }
291
}
4,068✔
292

293
pub fn evaluate_gt(
2,169✔
294
    schema: &Schema,
2,169✔
295
    left: &Expression,
2,169✔
296
    right: &Expression,
2,169✔
297
    record: &Record,
2,169✔
298
) -> Result<Field, PipelineError> {
2,169✔
299
    let left_p = left.evaluate(record, schema)?;
2,169✔
300
    let right_p = right.evaluate(record, schema)?;
2,169✔
301

302
    match left_p {
2,169✔
303
        Field::Null => match right_p {
×
304
            Field::Null => Ok(Field::Boolean(true)),
×
305
            _ => Ok(Field::Boolean(false)),
×
306
        },
307
        Field::Boolean(left_v) => match right_p {
×
308
            Field::Boolean(right_v) => Ok(Field::Boolean(left_v & !right_v)),
×
309
            _ => Ok(Field::Boolean(false)),
×
310
        },
311
        Field::Int(left_v) => match right_p {
2,169✔
312
            Field::Int(right_v) => Ok(Field::Boolean(left_v > right_v)),
2,170✔
313
            Field::Float(right_v) => {
×
314
                let left_v_f = OrderedFloat::<f64>::from_i64(left_v).unwrap();
×
315
                Ok(Field::Boolean(left_v_f > right_v))
×
316
            }
317
            Field::Null => Ok(Field::Boolean(false)),
×
318
            _ => Err(PipelineError::InvalidTypeComparison(
×
319
                left_p,
×
320
                right_p,
×
321
                ">".to_string(),
×
322
            )),
×
323
        },
324
        Field::Float(left_v) => match right_p {
×
325
            Field::Float(right_v) => Ok(Field::Boolean(left_v > right_v)),
×
326
            Field::Int(right_v) => {
×
327
                let right_v_f = OrderedFloat::<f64>::from_i64(right_v).unwrap();
×
328
                Ok(Field::Boolean(left_v > right_v_f))
×
329
            }
330
            Field::Null => Ok(Field::Boolean(false)),
×
331
            _ => Err(PipelineError::InvalidTypeComparison(
×
332
                left_p,
×
333
                right_p,
×
334
                ">".to_string(),
×
335
            )),
×
336
        },
337
        Field::String(ref left_v) => match right_p {
×
338
            Field::String(ref right_v) => Ok(Field::Boolean(left_v > right_v)),
×
339
            Field::Null => Ok(Field::Boolean(false)),
×
340
            _ => Err(PipelineError::InvalidTypeComparison(
×
341
                left_p.clone(),
×
342
                right_p,
×
343
                ">".to_string(),
×
344
            )),
×
345
        },
346
        Field::Timestamp(left_v) => match right_p {
×
347
            Field::Timestamp(right_v) => Ok(Field::Boolean(left_v > right_v)),
×
348
            Field::Null => Ok(Field::Boolean(false)),
×
349
            _ => Err(PipelineError::InvalidTypeComparison(
×
350
                left_p,
×
351
                right_p,
×
352
                ">".to_string(),
×
353
            )),
×
354
        },
355
        Field::Binary(ref _left_v) => Err(PipelineError::InvalidTypeComparison(
×
356
            left_p.clone(),
×
357
            right_p,
×
358
            ">".to_string(),
×
359
        )),
×
360
        _ => Err(PipelineError::InvalidTypeComparison(
×
361
            left_p,
×
362
            right_p,
×
363
            ">".to_string(),
×
364
        )),
×
365
    }
366
}
2,170✔
367

368
define_comparison!(evaluate_eq, "=", |l, r| { l == r });
6,009✔
369
define_comparison!(evaluate_ne, "!=", |l, r| { l != r });
×
370
define_comparison!(evaluate_lte, "<=", |l, r| { l <= r });
4,040✔
371
define_comparison!(evaluate_gte, ">=", |l, r| { l >= r });
10,000✔
372

373
#[cfg(test)]
374
use crate::pipeline::expression::execution::Expression::Literal;
375

376
#[test]
1✔
377
fn test_float_float_eq() {
1✔
378
    let row = Record::new(None, vec![], None);
1✔
379
    let f0 = Box::new(Literal(Field::Float(OrderedFloat(1.3))));
1✔
380
    let f1 = Box::new(Literal(Field::Float(OrderedFloat(1.3))));
1✔
381
    assert!(matches!(
1✔
382
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
383
        Ok(Field::Boolean(true))
384
    ));
385
}
1✔
386

387
#[test]
1✔
388
fn test_float_null_eq() {
1✔
389
    let row = Record::new(None, vec![], None);
1✔
390
    let f0 = Box::new(Literal(Field::Float(OrderedFloat(1.3))));
1✔
391
    let f1 = Box::new(Literal(Field::Null));
1✔
392
    assert!(matches!(
1✔
393
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
394
        Ok(Field::Boolean(false))
395
    ));
396
}
1✔
397

398
#[test]
1✔
399
fn test_float_int_eq() {
1✔
400
    let row = Record::new(None, vec![], None);
1✔
401
    let f0 = Box::new(Literal(Field::Float(OrderedFloat(1.0))));
1✔
402
    let f1 = Box::new(Literal(Field::Int(1)));
1✔
403
    assert!(matches!(
1✔
404
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
405
        Ok(Field::Boolean(true))
406
    ));
407
}
1✔
408

409
#[test]
1✔
410
fn test_decimal_decimal_eq() {
1✔
411
    let row = Record::new(None, vec![], None);
1✔
412
    let d0 = Box::new(Literal(Field::Decimal(Decimal::from_f64(1.3).unwrap())));
1✔
413
    let d1 = Box::new(Literal(Field::Decimal(Decimal::from_f64(1.3).unwrap())));
1✔
414
    assert!(matches!(
1✔
415
        evaluate_eq(&Schema::empty(), &d0, &d1, &row),
1✔
416
        Ok(Field::Boolean(true))
417
    ));
418
}
1✔
419

420
#[test]
1✔
421
fn test_decimal_null_eq() {
1✔
422
    let row = Record::new(None, vec![], None);
1✔
423
    let d0 = Box::new(Literal(Field::Decimal(Decimal::from_f64(1.3).unwrap())));
1✔
424
    let d1 = Box::new(Literal(Field::Null));
1✔
425
    assert!(matches!(
1✔
426
        evaluate_eq(&Schema::empty(), &d0, &d1, &row),
1✔
427
        Ok(Field::Boolean(false))
428
    ));
429
}
1✔
430

431
#[test]
1✔
432
fn test_decimal_int_eq() {
1✔
433
    let row = Record::new(None, vec![], None);
1✔
434
    let d0 = Box::new(Literal(Field::Decimal(Decimal::from_f64(1.0).unwrap())));
1✔
435
    let d1 = Box::new(Literal(Field::Int(1)));
1✔
436
    assert!(matches!(
1✔
437
        evaluate_eq(&Schema::empty(), &d0, &d1, &row),
1✔
438
        Ok(Field::Boolean(true))
439
    ));
440
}
1✔
441

442
#[test]
1✔
443
fn test_int_null_eq() {
1✔
444
    let row = Record::new(None, vec![], None);
1✔
445
    let f0 = Box::new(Literal(Field::Float(OrderedFloat(1.0))));
1✔
446
    let f1 = Box::new(Literal(Field::Null));
1✔
447
    assert!(matches!(
1✔
448
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
449
        Ok(Field::Boolean(false))
450
    ));
451
}
1✔
452

453
#[test]
1✔
454
fn test_int_float_eq() {
1✔
455
    let row = Record::new(None, vec![], None);
1✔
456
    let f0 = Box::new(Literal(Field::Int(1)));
1✔
457
    let f1 = Box::new(Literal(Field::Float(OrderedFloat(1.0))));
1✔
458
    assert!(matches!(
1✔
459
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
460
        Ok(Field::Boolean(true))
461
    ));
462
}
1✔
463

464
#[test]
1✔
465
fn test_uint_uint_eq() {
1✔
466
    let row = Record::new(None, vec![], None);
1✔
467
    let u0 = Box::new(Literal(Field::UInt(2)));
1✔
468
    let u1 = Box::new(Literal(Field::UInt(2)));
1✔
469
    assert!(matches!(
1✔
470
        evaluate_eq(&Schema::empty(), &u0, &u1, &row),
1✔
471
        Ok(Field::Boolean(true))
472
    ));
473
}
1✔
474

475
#[test]
1✔
476
fn test_uint_null_eq() {
1✔
477
    let row = Record::new(None, vec![], None);
1✔
478
    let u0 = Box::new(Literal(Field::UInt(2)));
1✔
479
    let u1 = Box::new(Literal(Field::Null));
1✔
480
    assert!(matches!(
1✔
481
        evaluate_eq(&Schema::empty(), &u0, &u1, &row),
1✔
482
        Ok(Field::Boolean(false))
483
    ));
484
}
1✔
485

486
#[test]
1✔
487
fn test_uint_decimal_eq() {
1✔
488
    let row = Record::new(None, vec![], None);
1✔
489
    let u0 = Box::new(Literal(Field::Decimal(Decimal::from_f64(2.0).unwrap())));
1✔
490
    let u1 = Box::new(Literal(Field::UInt(2)));
1✔
491
    assert!(matches!(
1✔
492
        evaluate_eq(&Schema::empty(), &u0, &u1, &row),
1✔
493
        Ok(Field::Boolean(true))
494
    ));
495
}
1✔
496

497
#[test]
1✔
498
fn test_bool_bool_eq() {
1✔
499
    let row = Record::new(None, vec![], None);
1✔
500
    let f0 = Box::new(Literal(Field::Boolean(false)));
1✔
501
    let f1 = Box::new(Literal(Field::Boolean(false)));
1✔
502
    assert!(matches!(
1✔
503
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
504
        Ok(Field::Boolean(true))
505
    ));
506
}
1✔
507

508
#[test]
1✔
509
fn test_str_str_eq() {
1✔
510
    let row = Record::new(None, vec![], None);
1✔
511
    let f0 = Box::new(Literal(Field::String("abc".to_string())));
1✔
512
    let f1 = Box::new(Literal(Field::String("abc".to_string())));
1✔
513
    assert!(matches!(
1✔
514
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
515
        Ok(Field::Boolean(true))
516
    ));
517
}
1✔
518

519
#[test]
1✔
520
fn test_str_null_eq() {
1✔
521
    let row = Record::new(None, vec![], None);
1✔
522
    let f0 = Box::new(Literal(Field::String("abc".to_string())));
1✔
523
    let f1 = Box::new(Literal(Field::Null));
1✔
524
    assert!(matches!(
1✔
525
        evaluate_eq(&Schema::empty(), &f0, &f1, &row),
1✔
526
        Ok(Field::Boolean(false))
527
    ));
528
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc