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

Function TEST_F

cpp/src/gandiva/tree_expr_test.cc:52–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50};
51
52TEST_F(TestExprTree, TestField) {
53 Annotator annotator;
54
55 auto n0 = TreeExprBuilder::MakeField(i0_);
56 EXPECT_EQ(n0->return_type(), int32());
57
58 auto n1 = TreeExprBuilder::MakeField(b0_);
59 EXPECT_EQ(n1->return_type(), boolean());
60
61 ExprDecomposer decomposer(*registry_, annotator);
62 ValueValidityPairPtr pair;
63 auto status = decomposer.Decompose(*n1, &pair);
64 DCHECK_EQ(status.ok(), true) << status.message();
65
66 auto value = pair->value_expr();
67 auto value_dex = std::dynamic_pointer_cast<VectorReadFixedLenValueDex>(value);
68 EXPECT_EQ(value_dex->FieldType(), boolean());
69
70 EXPECT_EQ(pair->validity_exprs().size(), 1);
71 auto validity = pair->validity_exprs().at(0);
72 auto validity_dex = std::dynamic_pointer_cast<VectorReadValidityDex>(validity);
73 EXPECT_NE(validity_dex->ValidityIdx(), value_dex->DataIdx());
74}
75
76TEST_F(TestExprTree, TestBinary) {
77 Annotator annotator;

Callers

nothing calls this directly

Calls 9

FunctionSignatureClass · 0.85
DecomposeMethod · 0.80
LookupSignatureMethod · 0.80
MakeFunctionFunction · 0.50
fieldFunction · 0.50
return_typeMethod · 0.45
okMethod · 0.45
sizeMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected