Validate the number of expected ProjectNodes Project nodes are sometimes added by emit elements and we may want to verify that we are not adding too many
| 220 | /// Project nodes are sometimes added by emit elements and we may want to |
| 221 | /// verify that we are not adding too many |
| 222 | void ValidateNumProjectNodes(int expected_projections, const std::shared_ptr<Buffer>& buf, |
| 223 | const ConversionOptions& conversion_options) { |
| 224 | std::shared_ptr<ExtensionIdRegistry> sp_ext_id_reg = MakeExtensionIdRegistry(); |
| 225 | ExtensionIdRegistry* ext_id_reg = sp_ext_id_reg.get(); |
| 226 | ExtensionSet ext_set(ext_id_reg); |
| 227 | ASSERT_OK_AND_ASSIGN(auto sink_decls, DeserializePlans( |
| 228 | *buf, [] { return kNullConsumer; }, |
| 229 | ext_id_reg, &ext_set, conversion_options)); |
| 230 | auto& other_declrs = std::get<acero::Declaration>(sink_decls[0].inputs[0]); |
| 231 | int num_projections = CountProjectNodeOptionsInDeclarations(other_declrs); |
| 232 | ASSERT_EQ(num_projections, expected_projections); |
| 233 | } |
| 234 | |
| 235 | TEST(Substrait, SupportedTypes) { |
| 236 | auto ExpectEq = [](std::string_view json, std::shared_ptr<DataType> expected_type) { |
no test coverage detected