| 31 | const char* kRightSuffix = ".right"; |
| 32 | |
| 33 | TEST(FieldMap, Trivial) { |
| 34 | HashJoinSchema schema_mgr; |
| 35 | |
| 36 | auto left = schema({field("i32", int32())}); |
| 37 | auto right = schema({field("i32", int32())}); |
| 38 | |
| 39 | ASSERT_OK(schema_mgr.Init(JoinType::INNER, *left, {"i32"}, *right, {"i32"}, |
| 40 | literal(true), kLeftSuffix, kRightSuffix)); |
| 41 | |
| 42 | auto output = schema_mgr.MakeOutputSchema(kLeftSuffix, kRightSuffix); |
| 43 | EXPECT_THAT(*output, Eq(Schema({ |
| 44 | field("i32.left", int32()), |
| 45 | field("i32.right", int32()), |
| 46 | }))); |
| 47 | |
| 48 | auto i = |
| 49 | schema_mgr.proj_maps[0].map(HashJoinProjection::INPUT, HashJoinProjection::OUTPUT); |
| 50 | EXPECT_EQ(i.get(0), 0); |
| 51 | } |
| 52 | |
| 53 | TEST(FieldMap, TrivialDuplicates) { |
| 54 | HashJoinSchema schema_mgr; |
nothing calls this directly
no test coverage detected