MCPcopy Create free account
hub / github.com/apache/arrow / TEST_F

Function TEST_F

cpp/src/arrow/compute/kernels/vector_replace_test.cc:476–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476TEST_F(TestReplaceBoolean, ReplaceWithMask) {
477 std::vector<ReplaceWithMaskCase> cases = {
478 {this->array("[]"), this->mask_scalar(false), this->array("[]"), this->array("[]")},
479 {this->array("[]"), this->mask_scalar(true), this->array("[]"), this->array("[]")},
480 {this->array("[]"), this->null_mask_scalar(), this->array("[]"), this->array("[]")},
481
482 {this->array("[true]"), this->mask_scalar(false), this->array("[]"),
483 this->array("[true]")},
484 {this->array("[true]"), this->mask_scalar(true), this->array("[false]"),
485 this->array("[false]")},
486 {this->array("[true]"), this->null_mask_scalar(), this->array("[]"),
487 this->array("[null]")},
488
489 {this->array("[false, false]"), this->mask_scalar(false), this->scalar("true"),
490 this->array("[false, false]")},
491 {this->array("[false, false]"), this->mask_scalar(true), this->scalar("true"),
492 this->array("[true, true]")},
493 {this->array("[false, false]"), this->mask_scalar(true), this->scalar("null"),
494 this->array("[null, null]")},
495
496 {this->array("[]"), this->mask("[]"), this->array("[]"), this->array("[]")},
497 {this->array("[true, true, true, true]"),
498 this->mask("[false, false, false, false]"), this->array("[]"),
499 this->array("[true, true, true, true]")},
500 {this->array("[true, true, true, true]"), this->mask("[true, true, true, true]"),
501 this->array("[false, false, false, false]"),
502 this->array("[false, false, false, false]")},
503 {this->array("[true, true, true, true]"), this->mask("[null, null, null, null]"),
504 this->array("[]"), this->array("[null, null, null, null]")},
505 {this->array("[true, true, true, null]"),
506 this->mask("[false, false, false, false]"), this->array("[]"),
507 this->array("[true, true, true, null]")},
508 {this->array("[true, true, true, null]"), this->mask("[true, true, true, true]"),
509 this->array("[false, false, false, false]"),
510 this->array("[false, false, false, false]")},
511 {this->array("[true, true, true, null]"), this->mask("[null, null, null, null]"),
512 this->array("[]"), this->array("[null, null, null, null]")},
513 {this->array("[true, true, true, true, true, true]"),
514 this->mask("[false, false, null, null, true, true]"), this->array("[false, null]"),
515 this->array("[true, true, null, null, false, null]")},
516 {this->array("[null, null, null, null, null, null]"),
517 this->mask("[false, false, null, null, true, true]"), this->array("[false, null]"),
518 this->array("[null, null, null, null, false, null]")},
519 {this->array("[true, null, true]"), this->mask("[false, true, false]"),
520 this->array("[true]"), this->array("[true, true, true]")},
521
522 {this->array("[]"), this->mask("[]"), this->scalar("true"), this->array("[]")},
523 {this->array("[null, false, true]"), this->mask("[true, false, false]"),
524 this->scalar("false"), this->array("[false, false, true]")},
525 {this->array("[false, false]"), this->mask("[true, true]"), this->scalar("true"),
526 this->array("[true, true]")},
527 {this->array("[false, false]"), this->mask("[true, true]"), this->scalar("null"),
528 this->array("[null, null]")},
529 {this->array("[false, false, false]"), this->mask("[false, null, true]"),
530 this->scalar("true"), this->array("[false, null, true]")},
531 {this->array("[null, null]"), this->mask("[true, true]"),
532 this->array("[true, true]"), this->array("[true, true]")},
533 };

Callers

nothing calls this directly

Calls 13

ArrayFromJSONFunction · 0.85
fixed_size_binaryFunction · 0.85
mask_scalarMethod · 0.80
null_mask_scalarMethod · 0.80
maskMethod · 0.80
AssertRaisesMethod · 0.80
chunked_arrayMethod · 0.80
AssertFillNullArrayMethod · 0.80
arrayMethod · 0.45
scalarMethod · 0.45
AssertMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected