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

Function ExpectBindsTo

cpp/src/arrow/compute/expression_test.cc:561–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561void ExpectBindsTo(Expression expr, std::optional<Expression> expected,
562 Expression* bound_out = nullptr,
563 const Schema& schema = *kBoringSchema) {
564 if (!expected) {
565 expected = expr;
566 }
567
568 ASSERT_OK_AND_ASSIGN(auto bound, expr.Bind(schema));
569 EXPECT_TRUE(bound.IsBound());
570
571 ASSERT_OK_AND_ASSIGN(expected, expected->Bind(schema));
572 EXPECT_EQ(bound, *expected) << " unbound: " << expr.ToString();
573
574 if (bound_out) {
575 *bound_out = bound;
576 }
577}
578
579TEST(Expression, BindFieldRef) {
580 // an unbound field_ref does not have the output type set

Callers 1

TESTFunction · 0.85

Calls 4

IsBoundMethod · 0.80
ASSERT_OK_AND_ASSIGNFunction · 0.70
BindMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected